cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] ccvs ./ChangeLog ./Makefile.in ./aclocal.m4 ./c... [signed-com


From: Derek Robert Price
Subject: [Cvs-cvs] ccvs ./ChangeLog ./Makefile.in ./aclocal.m4 ./c... [signed-commits3]
Date: Wed, 21 Dec 2005 13:25:14 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Branch:         signed-commits3
Changes by:     Derek Robert Price <address@hidden>     05/12/21 13:25:10

Modified files:
        .              : ChangeLog Makefile.in aclocal.m4 config.h.in 
                         configure configure.in 
        contrib        : Makefile.in 
        contrib/pam    : Makefile.in 
        diff           : Makefile.in 
        doc            : ChangeLog Makefile.in RCSFILES cvs.1 
                         cvs.texinfo cvsclient.texi stamp-1 stamp-vti 
                         version-client.texi version.texi 
        doc/i18n       : Makefile.in 
        doc/i18n/pt_BR : Makefile.in 
        lib            : ChangeLog Makefile.am Makefile.gnulib 
                         Makefile.in wait.h 
        m4             : ChangeLog gnulib-cache.m4 gnulib-comp.m4 
        maint-aux      : Makefile.in 
        man            : Makefile.in 
        src            : ChangeLog Makefile.am Makefile.in add.c admin.c 
                         buffer.c buffer.h checkin.c classify.c client.c 
                         client.h commit.c cvs.h diff.c edit.c entries.c 
                         filesubr.c hash.c hash.h import.c main.c rcs.c 
                         rcs.h rcscmds.c root.c root.h run.c 
                         sanity.config.sh.in sanity.sh server.c server.h 
                         subr.c subr.h tag.c update.c vers_ts.c zlib.c 
        tools          : Makefile.in 
        vms            : Makefile.in 
        windows-NT     : Makefile.in config.h config.h.in stamp-chi 
        windows-NT/SCC : Makefile.in 
Added files:
        .              : GPG-TODO 
        lib            : base64.c base64.h 
        m4             : base64.m4 uint32_t.m4 
        src            : base.c base.h difflib.c difflib.h entries.h 
                         filesubr.h gpg.c gpg.h run.h sign.c sign.h 
                         vers_ts.h 

Log message:
        Merge from signed-commits2.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/ChangeLog.diff?only_with_tag=signed-commits3&tr1=1.1274&tr2=1.1274.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/GPG-TODO?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.181&tr2=1.181.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/aclocal.m4.diff?only_with_tag=signed-commits3&tr1=1.147&tr2=1.147.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/config.h.in.diff?only_with_tag=signed-commits3&tr1=1.191&tr2=1.191.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/configure.diff?only_with_tag=signed-commits3&tr1=1.430&tr2=1.430.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/configure.in.diff?only_with_tag=signed-commits3&tr1=1.362&tr2=1.362.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.120&tr2=1.120.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/pam/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.41&tr2=1.41.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/diff/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.89&tr2=1.89.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/ChangeLog.diff?only_with_tag=signed-commits3&tr1=1.944&tr2=1.944.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.136&tr2=1.136.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/RCSFILES.diff?only_with_tag=signed-commits3&tr1=1.16&tr2=1.16.8.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/cvs.1.diff?only_with_tag=signed-commits3&tr1=1.38&tr2=1.38.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/cvs.texinfo.diff?only_with_tag=signed-commits3&tr1=1.673&tr2=1.673.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/cvsclient.texi.diff?only_with_tag=signed-commits3&tr1=1.143&tr2=1.143.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/stamp-1.diff?only_with_tag=signed-commits3&tr1=1.76&tr2=1.76.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/stamp-vti.diff?only_with_tag=signed-commits3&tr1=1.170&tr2=1.170.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/version-client.texi.diff?only_with_tag=signed-commits3&tr1=1.76&tr2=1.76.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/version.texi.diff?only_with_tag=signed-commits3&tr1=1.171&tr2=1.171.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/i18n/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.24&tr2=1.24.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/doc/i18n/pt_BR/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.25&tr2=1.25.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/ChangeLog.diff?only_with_tag=signed-commits3&tr1=1.489&tr2=1.489.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/Makefile.am.diff?only_with_tag=signed-commits3&tr1=1.106&tr2=1.106.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/Makefile.gnulib.diff?only_with_tag=signed-commits3&tr1=1.65&tr2=1.65.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.200&tr2=1.200.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/base64.c?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/base64.h?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/wait.h.diff?only_with_tag=signed-commits3&tr1=1.5&tr2=1.5.22.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/m4/ChangeLog.diff?only_with_tag=signed-commits3&tr1=1.153&tr2=1.153.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/m4/base64.m4?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/m4/gnulib-cache.m4.diff?only_with_tag=signed-commits3&tr1=1.4&tr2=1.4.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/m4/gnulib-comp.m4.diff?only_with_tag=signed-commits3&tr1=1.9&tr2=1.9.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/m4/uint32_t.m4?only_with_tag=signed-commits3&rev=1.5.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/maint-aux/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.19&tr2=1.19.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/man/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.91&tr2=1.91.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/ChangeLog.diff?only_with_tag=signed-commits3&tr1=1.3328&tr2=1.3328.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/Makefile.am.diff?only_with_tag=signed-commits3&tr1=1.47&tr2=1.47.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.162&tr2=1.162.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/add.c.diff?only_with_tag=signed-commits3&tr1=1.121&tr2=1.121.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/admin.c.diff?only_with_tag=signed-commits3&tr1=1.111&tr2=1.111.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/base.c?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/base.h?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/buffer.c.diff?only_with_tag=signed-commits3&tr1=1.65&tr2=1.65.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/buffer.h.diff?only_with_tag=signed-commits3&tr1=1.26&tr2=1.26.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/checkin.c.diff?only_with_tag=signed-commits3&tr1=1.56&tr2=1.56.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/classify.c.diff?only_with_tag=signed-commits3&tr1=1.37&tr2=1.37.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/client.c.diff?only_with_tag=signed-commits3&tr1=1.438&tr2=1.438.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/client.h.diff?only_with_tag=signed-commits3&tr1=1.61&tr2=1.61.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/commit.c.diff?only_with_tag=signed-commits3&tr1=1.257&tr2=1.257.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/cvs.h.diff?only_with_tag=signed-commits3&tr1=1.345&tr2=1.345.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/diff.c.diff?only_with_tag=signed-commits3&tr1=1.116&tr2=1.116.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/difflib.c?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/difflib.h?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/edit.c.diff?only_with_tag=signed-commits3&tr1=1.90&tr2=1.90.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/entries.c.diff?only_with_tag=signed-commits3&tr1=1.66&tr2=1.66.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/entries.h?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/filesubr.c.diff?only_with_tag=signed-commits3&tr1=1.105&tr2=1.105.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/filesubr.h?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/gpg.c?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/gpg.h?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/hash.c.diff?only_with_tag=signed-commits3&tr1=1.48&tr2=1.48.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/hash.h.diff?only_with_tag=signed-commits3&tr1=1.21&tr2=1.21.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/import.c.diff?only_with_tag=signed-commits3&tr1=1.175&tr2=1.175.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/main.c.diff?only_with_tag=signed-commits3&tr1=1.262&tr2=1.262.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/rcs.c.diff?only_with_tag=signed-commits3&tr1=1.356&tr2=1.356.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/rcs.h.diff?only_with_tag=signed-commits3&tr1=1.82&tr2=1.82.8.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/rcscmds.c.diff?only_with_tag=signed-commits3&tr1=1.72&tr2=1.72.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/root.c.diff?only_with_tag=signed-commits3&tr1=1.121&tr2=1.121.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/root.h.diff?only_with_tag=signed-commits3&tr1=1.23&tr2=1.23.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/run.c.diff?only_with_tag=signed-commits3&tr1=1.62&tr2=1.62.4.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/run.h?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sanity.config.sh.in.diff?only_with_tag=signed-commits3&tr1=1.3&tr2=1.3.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sanity.sh.diff?only_with_tag=signed-commits3&tr1=1.1105&tr2=1.1105.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/server.c.diff?only_with_tag=signed-commits3&tr1=1.453&tr2=1.453.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/server.h.diff?only_with_tag=signed-commits3&tr1=1.44&tr2=1.44.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sign.c?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sign.h?only_with_tag=signed-commits3&rev=1.1.6.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/subr.c.diff?only_with_tag=signed-commits3&tr1=1.148&tr2=1.148.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/subr.h.diff?only_with_tag=signed-commits3&tr1=1.7&tr2=1.7.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/tag.c.diff?only_with_tag=signed-commits3&tr1=1.142&tr2=1.142.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/update.c.diff?only_with_tag=signed-commits3&tr1=1.259&tr2=1.259.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/vers_ts.c.diff?only_with_tag=signed-commits3&tr1=1.65&tr2=1.65.6.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/vers_ts.h?only_with_tag=signed-commits3&rev=1.1.4.1
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/zlib.c.diff?only_with_tag=signed-commits3&tr1=1.32&tr2=1.32.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/tools/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.81&tr2=1.81.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/vms/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.84&tr2=1.84.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.113&tr2=1.113.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/config.h.diff?only_with_tag=signed-commits3&tr1=1.173&tr2=1.173.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/config.h.in.diff?only_with_tag=signed-commits3&tr1=1.101&tr2=1.101.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/stamp-chi.diff?only_with_tag=signed-commits3&tr1=1.87&tr2=1.87.2.1&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/SCC/Makefile.in.diff?only_with_tag=signed-commits3&tr1=1.75&tr2=1.75.2.1&r1=text&r2=text

Patches:
Index: ccvs/ChangeLog
diff -u /dev/null ccvs/ChangeLog:1.1274.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/ChangeLog      Wed Dec 21 13:25:08 2005
@@ -0,0 +1,7189 @@
+2005-11-10  Derek Price  <address@hidden>
+
+       * GPG-TODO: Note progress.
+
+2005-11-07  Derek Price  <address@hidden>
+
+       * GPG-TODO: Keep up to date.  Mark EOL delay unneeded due to GPG
+       --textmode option.
+
+2005-10-28  Derek Price  <address@hidden>
+
+       * configure.in: Verify that `$GPG --version' works.  Print a warning
+       when it doesn't.
+
+2005-10-27  Derek Price  <address@hidden>
+
+       * GPG-TODO: Update status.
+
+2005-12-09  Derek Price  <address@hidden>
+
+       * NEWS: Note misc doc & bug fixes.
+
+2005-12-07  Derek Price  <address@hidden>
+
+       * NEWS: Note recognition of :extssh:.
+
+2005-11-18  Derek Price  <address@hidden>
+
+       * cvs.spec.in (%files): Install PDFs, not PSs.
+       (%changelog): Correct date to a format RPM accepts.
+
+2005-11-15  Derek Price  <address@hidden>
+
+       * NEWS: Note s/P/U/g.
+
+2005-11-14  Derek Price  <address@hidden>
+
+       * HACKING (Rebuilding YACC sources): Expound on Bison/YACC requirement.
+
+2005-11-12  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Note new admin [--execute|--no-execute] options.
+
+2005-11-09  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add build-aux/bison-missing.
+
+2005-10-28  Derek Price  <address@hidden>
+
+       * NEWS: Note compression buffer fix.
+
+2005-10-18  Derek Price  <address@hidden>
+
+       * KEYS: New file, suggested by Antoine Lexy-Lambert <address@hidden>.
+       * README: Mention KEYS file.
+
+2005-10-16  Derek Price  <address@hidden>
+
+       * configure.in: Define DEFAULT_SIGN_TEMPLATE & DEFAULT_SIGN_TEXTMODE
+       here.  Don't define GPG_PROGRAM.
+
+2005-10-11  Derek Price  <address@hidden>
+
+       * GPG-TODO: New file.
+       * configure.in: Search for gpg.
+
+2005-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Generate contrib Perl scripts from *.pl rather than
+       *.in.
+
+2005-10-04  Derek Price  <address@hidden>
+
+       * HACKING: Document GNULIB's assumption of <unistd.h>.
+       * configure.in: Don't check for unistd.h.
+
+2005-10-03  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-update: Maintenance of modules list is now
+       automated.
+       * maint-aux/gnulib-modules: Remove this file.
+
+       * NEWS: Note ZLib security issues.
+
+2005-09-30  Derek Price  <address@hidden>
+
+       * NEWS: Mention Conrad's Windows client fix.
+
+2005-09-28  Derek Price  <address@hidden>
+
+       * NEWS: Consolidate TmpDir with the other new config keys.
+
+2005-09-26  Derek Price  <address@hidden>
+
+       * NEWS: Note FreeBSD 5.x GSSAPI fix.
+
+       * NEWS: Note fsync'd commits.
+
+2005-09-25  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add files (lib\getdelim.h lib\setenv.h) to project.
+
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" changes.
+
+2005-09-24  Derek Price  <address@hidden>
+
+       * NEWS, HACKING: Standardize on Automake 1.9.6.
+
+2005-09-22  Derek Price  <address@hidden>
+
+       * NEWS: Mention conflict fixes.
+
+2005-09-20  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add files (lib\canon-host.h lib\glob-libc.h) to project.
+
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" changes.
+
+2005-09-19  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-update: Default $GNULIB path rather than setting.
+       Check for error return from gnulib-tool before expecting results.
+
+2005-09-13  Derek Price  <address@hidden>
+
+       * TESTS: Mention new $username8 & $anyusername variables.
+
+2005-09-06  Derek Price  <address@hidden>
+
+       * TESTS: Reword slightly.  s/\$PROG/\$CPROG/.  Document $tempfile &
+       $tempname.
+
+       * NEWS: Note Kerberos4 build fix.
+
+2005-09-05  Derek Price  <address@hidden>
+
+       * NEWS: Note TmpDir config key.  Reorder config news items.  Reword
+       the [root] specification item.
+
+       * configure.in (--enable-config-override): Verify $prefix is set before
+       expanding $sysconfdir.
+
+2005-09-04  Derek Price  <address@hidden>
+
+       * configure.in: Remove putenv cruft.
+
+       * maint-aux/gnulib-modules: Add glob.
+
+       * NEWS: Note new [root] specification in config files.
+
+       * configure.in: Remove unneeded search for hstrerror.
+       * maint-aux/gnulib-modules: Add canon-host.
+
+2005-09-04  Larry Jones  <address@hidden>
+
+       * NEWS: s/address@hidden/address@hidden/.
+       * configure.in: s/address@hidden/address@hidden/.
+       * configure: Regenerated.
+
+2005-09-03  Larry Jones  <lawrence.jones.ugs.com>
+
+       * configure: Regenerated.
+
+2005-09-01  Derek Price  <address@hidden>
+
+       * DEVEL-CVS, FAQ, HACKING, INSTALL-CVS, README, README.VMS,
+       configure.in, build-aux/bison-missing: Update links and email
+       addresses.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * www/.htaccess: Remove this file.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * cvs.spec.in: Note last spec file change in internal ChangeLog.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * NEWS: Note spec file repair.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * cvs.spec.in: Update links to point to Savannah.  s/Copyright/License/
+       for RPM 4.mumble.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * NEWS: Note configurable config file path.
+       * configure.in (--enable-config-override): New option.
+
+2005-08-30  Larry Jones  <address@hidden>
+
+       * NEWS: Note import locking fix.
+
+2005-08-29  Derek Price  <address@hidden>
+
+       * NEWS: Note new verifymsg %{sV} format strings.
+
+2005-08-04  Derek Price  <address@hidden>
+
+       * NEWS: Move 1.12 change from BUG FIXES to NEW FEATURES and rephrase.
+       Correct spelling error in different entry.
+
+2005-07-20  Derek Price  <address@hidden>
+
+       * AUTHORS, HACKING, README, cvs.spec.in:
+       s/cvshome.org/nongnu.org.etc.../.
+       * DEVEL-CVS: Ditto.  Remove devel-cvs mailing list charter.
+
+2005-07-12  Derek Price  <address@hidden>
+
+       * FAQ, HACKING, INSTALL: Add copyright notices.
+
+2005-07-11  Derek Price  <address@hidden>
+
+       * FAQ, HACKING, INSTALL-CVS: Update license notices.
+
+2005-06-15  Derek Price  <address@hidden>
+
+       * build-aux/missing: Add hack to fail gracefully when Bison is too old.
+
+2005-06-15  Derek Price  <address@hidden>
+
+       * HACKING: Note GNU Bison 1.875 requirement.
+
+2005-06-12  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add file "lstat.h" to project.
+       * cvsnt.dep: Regenerate for "cvsnt.dsp" change.
+
+2005-06-10  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-modules: Remove stat module.
+
+2005-06-10  Mark D. Baushke  <address@hidden>
+
+       * HACKING: Add a few more guidelines.  Adjust examples for switch
+       labels.  Fix some spelling mistakes.
+       * cvs-format.el (c-label-offset, case-label): Adjust indentation
+       to agree with changes in the HACKING document.
+       
+2005-06-03  Derek Price  <address@hidden>
+
+       * HACKING: Remove `!= NULL' in example conditional.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * NEWS: Note new server compression limit config options.  Correct
+       HistorySearchPath name.
+
+2005-06-02  Derek Price  <address@hidden>
+
+       * NEWS: Note server compression hang fix.
+
+2005-06-01  Derek Price  <address@hidden>
+
+       * TODO (214): Remove completed item.
+
+2005-06-01  Conrad T. Pino  <address@hidden>
+
+       * makewin32.cmd: Add options to support CLEAN build target.
+
+2005-06-01  Conrad T. Pino  <address@hidden>
+
+       * makewin32.cmd: Add Windows NT command file to build CVS Project.
+
+2005-05-31  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep: Regenerate after build for #include changes.
+
+2005-05-30  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add files "lib/quotearg.h", "lib/stat-macros.h",
+         "windows-NT/woe32.h" and "windows-NT/unistd.c" to project.
+       * cvsnt.dep, cvsnt.mak: Regenerate for "cvsnt.dsp" changes.
+
+2005-05-27  Derek Price  <address@hidden>
+
+       * NEWS: Note diff space split fix.
+       * BUGS: Remove diff space split note.
+
+2005-05-27  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-modules: Add quotearg module.
+
+2005-05-26  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-modules: Add stat-macros module.
+
+2005-05-25  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-modules: Add getlogin_r module.
+
+2005-05-24  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add lib/canonicalize.h and lib/glob.h to project.
+       * cvsnt.dep: Regenerate for cvsnt.dsp changes.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * maint-aux/gnulib-modules: Add GNULIB canonicalize module.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * configure.in: Update Copyright years.
+
+2005-05-17  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep: Regenerated for "lib/libcvs.dsp" change.
+
+2005-05-11  Derek Price  <address@hidden>
+
+       * NEWS: Note new History* config options.
+       * maint-aux/gnulib-filelist.txt: Add strdup module.
+
+2005-05-09  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep, cvsnt.mak: Regenerated after Windows full rebuild.
+
+2005-05-09  Derek Price  <address@hidden>
+
+       * cvs.spec.in: Find install-sh in its new location.
+
+2005-05-06  Derek Price  <address@hidden>
+
+       * NEWS: Note Solaris 10 command option parsing fix.
+
+2005-05-04  Mark D. Baushke  <address@hidden>
+
+       * maint-aux/gnulib-update: Depend on maint-aux/gnulib-modules
+       which needs to exist relative to the top-level directory rather
+       than config.h which may be sitting in a build subdirectory.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * INSTALL-CVS: Add footnote about compiling a CVS checkout of CVS on a
+       case-insensitive UNIX file system like Mac OS X.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * NEWS: Note GNULIB updates as misc efficiency and portability fixes.
+
+2005-05-02  Derek Price  <address@hidden>
+
+       * TODO (231): New item.
+       (22, 30, 31): Remove completed items.
+
+2005-05-02  Derek Price  <address@hidden>
+
+       * NEWS: Note new val-tags locks.
+
+2005-05-02  Derek Price  <address@hidden>
+
+       * NEWS: Note that lock compatibility is now enabled on Windows by
+       default.
+
+2005-05-01  Mark D. Baushke  <address@hidden>
+
+       * maint-aux/gnulib-filelist.txt: Update from GNULIB.
+       * configure: Regenerated.
+
+2005-04-30  Derek Price  <address@hidden>
+
+       * NEWS: Note new history locks.
+
+2005-04-25  Mark D. Baushke  <address@hidden>
+
+       * configure.in: Add support for <pam/pam_appl.h> to allow
+       --enable-pam to work on MacOSX 10.2 and newer.
+       (Pach from Moriyoshi Koizumi <address@hidden>.)
+       * configure, config.h.in: Regenerated.
+       
+2005-04-20  Derek Price  <address@hidden>
+
+       * NEWS: Note log overflow fix.
+
+2005-04-15  Derek Price  <address@hidden>
+
+       * NEWS: Note Klocwork fixes.
+
+2005-04-14  Derek Price  <address@hidden>
+
+       * NEWS: Note contrib Perl taint vulnerability fix.
+
+2005-04-12  Derek Price  <address@hidden>
+
+       * NEWS: Avoid self-aggrandizement.
+
+2005-04-08  Derek Price  <address@hidden>
+
+       * NEWS: Note GMT/get_date fix.
+
+2005-04-06  Derek Price  <address@hidden>
+
+       * gnulib.txt: Move to...
+       * gnulib-filelist.txt: ...this new file.
+       * gnulib-update: Clean up slightly.  Use new file.
+
+2005-04-06  Derek Price  <address@hidden>
+
+       * maint-aux/.cvsignore: New file.
+
+2005-04-06  Derek Price  <address@hidden>
+
+       * configure.in: Generate maint-aux/Makefile.
+       * Makefile.am (SUBDIRS): Add maint-aux.
+       * maint-aux/Makefile.am, maint-aux/Makefile.in: New files.
+
+2005-04-06  Derek Price  <address@hidden>
+
+       * gnulib-modules, gnulib-update, gnulib.txt, srclist.txt: Move these...
+       * maint-aux: ...to this new directory, with minor modifications.
+       * Makefile.am (EXTRA_DIST): Accomodate move of the above files.  Add
+       maint-aux/gnulib-modules.
+       * HACKING: s#srclist.txt#maint-aux/srclist.txt#.
+
+2005-04-05  Derek Price  <address@hidden>
+
+       * mkinstalldirs: Remove this obsolete file.  It's work is now done by
+       `build-aux/install-sh -d'.
+
+2005-04-05  Derek Price  <address@hidden>
+
+       * configure.in: Specify new build-aux directory for auxiliary build
+       files.
+       * compile, config.guess, config.rpath, config.sub, depcomp, install-sh,
+       mdate-sh, missing, texinfo.tex, ylwrap: Move to...
+       * build-aux: ...this new directory.
+       * INSTALL: Replace with generic version from Automake, moving...
+       * INSTALL-CVS: ...original to here.  Reference INSTALL for more
+       configure information.
+       * FAQ, README: Reference INSTALL-CVS rather than INSTALL.
+
+2005-03-29  Mark D. Baushke  <address@hidden>
+
+       * config.guess, config.rpath, config.sub, depcomp, gnulib.txt,
+       install-sh, mdate-sh, missing, mkinstalldirs: Update from GNULIB.
+       * configure: Regenerated.
+       
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * aclocal.m4, gnulib.txt: Update from GNULIB.
+       * Makefile.in, config.h.in, configure: Regenerated.
+
+2005-03-16  Mark Baushke  <address@hidden>
+
+       * cvs-format.el: Update to work with modern GNU Emacs versions
+       that have cc-mode instead of c-mode.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * NEWS: Note that writeproxy primary failures are now detected.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * NEWS: Note that failure to open debug logs is no longer fatal.
+
+2005-03-15  Derek Price  <address@hidden>
+
+       * HACKING, NEWS: Note new Automake version.
+
+2005-03-10  Mark D. Baushke  <address@hidden>
+
+       * configure: Regenerated.
+
+2005-03-09 Derek Price <address@hidden>
+
+       * configure.in: Don't generate windows-NT/mkconfig or
+       windows-NT/fix-msvc-mak.
+       * configure: Regenerated.
+
+2005-03-07  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add .\lib\closeout.h, .\lib\getpagesize.h and
+       .\lib\pagealign_alloc.h files.
+       * cvsnt.dep, cvsnt.mak: Regenerate for cvsnt.dsp changes.
+
+2005-03-07  Mark D. Baushke  <address@hidden>
+
+       * config.h.in, configure: Regenerated.
+
+2005-03-04  Jim Hyslop  <address@hidden>
+
+       * NEWS: Note fix for compile errors on IRIX 5.3.
+
+2005-03-03 Derek Price <address@hidden>
+
+       * configure.in: Remove checks for valloc and mmap.
+       * gnulib-modules: Add pagealign_alloc.
+       * NEWS: Note new buffer allocation method.
+
+2005-03-03 Derek Price <address@hidden>
+
+       * gnulib-update: Clean up "saved" files on interrupt.
+
+2005-03-02  Jim Meyering  <address@hidden>
+
+       * NEWS: Note that cvs now detects write errors on stdout.
+       * gnulib-modules: Add closeout.
+       * gnulib.txt: Regenerate.
+
+2005-03-02 Derek Price <address@hidden>
+
+       * configure.in: Remove checks for funcs covered by GNULIB.
+
+2005-03-02 Derek Price <address@hidden>
+
+       * gnulib-update: Redirect gnulib-tool output back to /dev/null.
+
+2005-03-02 Derek Price <address@hidden>
+
+       * gnulib-update: Avoid munging timestamps when files haven't changed.
+
+2005-03-01 Derek Price <address@hidden>
+
+       * NEWS: Note GNULIB update.  Expand --disables-* note.
+
+2005-03-01 Derek Price <address@hidden>
+
+       * gnulib-update: Correct m4/error.m4 to avoid compiling the GNULIB
+       lib/error.c.
+       (MODULES): Move content to...
+       * gnulib-modules: This new file.
+
+2005-02-25 Derek Price <address@hidden>
+
+       * NEWS: Note commitid feature.
+       (Patch from Frank Hemer <address@hidden>.)
+
+2005-02-24 Derek Price <address@hidden>
+
+       * configure.in:  Disable proxy when either the client or server are
+       disabled.  Other minor cleanup.
+       * NEWS: Note --disable-client fix.
+
+2005-02-23  Derek Price  <address@hidden>
+
+       * NEWS: Note -r<tag>:<date> change.
+
+2005-02-21  Derek Price  <address@hidden>
+
+       * NEWS: Note zlib update.
+       * srclist.txt: Note new source for zlib.
+
+2005-02-20  Derek Price  <address@hidden>
+
+       * NEWS: Note `cvs -n release' fix.
+
+2005-02-19  Derek Price  <address@hidden>
+
+       * configure.in (--with-rsh): Prefer ssh to rsh.
+       * NEWS: Note this.
+
+2005-02-04  Derek Price  <address@hidden>
+
+       * NEWS: Note zlib fix.
+
+2005-01-31  Derek Price  <address@hidden>
+
+       * AUTHORS: Add Conrad Pino.
+       * README: Update copyright notice.
+
+2005-01-29  Derek Price  <address@hidden>
+
+       * NEWS: Note some recent changes.
+
+2004-12-14  Derek Price  <address@hidden>
+
+       * NEWS: Note no-longer missing files.
+       * Makefile.am (EXTRA_DIST): Add m4/README, gnulib-update, gnulib.txt,
+       and srclist.txt.
+       * configure.in (AC_OUTPUT): Add doc/i18n/Makefile &
+       doc/i18n/pt_BR/Makefile.
+
+2004-12-13  Derek Price  <address@hidden>
+
+       * NEWS: Note Windows build fixes.
+
+2004-12-09  Derek Price  <address@hidden>
+
+       * NEWS: Note `Redirect' CVSROOT method option and doc improvements.
+
+2004-12-09  Mark D. Baushke  <address@hidden>
+
+       * README: Remove Dr. Pascal Molli's CVS URL from the
+       documentation.
+       * FAQ: Ditto.
+
+2004-12-03  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Document new CVSROOT options and case insensitivity.
+
+2004-11-30  Mark D. Baushke  <address@hidden>
+
+       * HACKING (Coding standards): Add the primary URL for the GNU
+       coding standards.
+
+2004-11-30  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "src/subr.h" to project.
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerated for "cvsnt.dsp" change.
+
+2004-11-21  Mark D. Baushke  <address@hidden>
+
+       * cvsnt.dep: Add "xgethostname.h" to project.
+       * cvsnt.dsp: Add "xgethostname.h" to project.
+
+2004-11-20  Derek Price  <address@hidden>
+
+       * BUGS: Remove note about BSDI test failure.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add xgethostname.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * NEWS: Note "red file" fix source inclusion.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * NEWS: Note Windows distribution fix.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * NEWS: Note most recent GNULIB update.
+
+2004-11-15  Derek Price  <address@hidden>
+
+       * BUGS: Note current CVS test failures on BSD/OS & Cray.
+
+2004-11-11  Derek Price  <address@hidden>
+
+       * BUGS: Note current CVS server turds on AIX.
+
+2004-11-11  Mark D. Baushke  <address@hidden>
+
+       * config.h.in, configure: Regenerated.
+
+2004-11-09  Mark D. Baushke  <address@hidden>
+
+       * configure: Regenerated.
+
+2004-11-04  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Remove "lib/allocsa.c", "lib/readlink.c", "lib/xreadlink.c"
+       and "allocsa.h" from project.
+       * cvsnt.dep: Regenerate for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerate for "cvsnt.dsp" change.
+
+2004-11-04  Derek Price  <address@hidden>
+
+       * TODO (233): New item.
+
+2004-11-04  Mark D. Baushke  <address@hidden>
+
+       * cvsnt.dsp: Add entries for allocsa.c and allocsa.h.
+       * cvsnt.dep: Re-order sources in front of includes.
+       * Makefile.am: Update allocsa from GNULIB.
+       * gnulib.txt, Makefile.gnulib: Regenerated.
+
+2004-11-03  Derek Price  <address@hidden>
+
+       * HACKING, NEWS: Note new Autoconf & Automake versions.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * cvsnt.dsp: Add readlink.c, xreadlink.c and xreadlink.h.
+       * cvsnt.dep: Add readlink.c and xreadlink.c dependencies.
+
+       * gnulib-update (MODULES): Add readlink xreadlink.
+       * Makefile.in, aclocal.m4, configure, configure.in, gnulib.txt:
+       Regenerated.
+
+2004-11-02  Mark D. Baushke  <address@hidden>
+
+       * config.h.in, configure: Regenerated.
+
+2004-11-01  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep: Regenerated for "lib/libcvs.dsp" change.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * NEWS: Note new date format documentation.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * NEWS: Note that CVS handles new time zones.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * srclist.txt: Remove getdate module.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add allocsa, setenv, getdate.
+
+2004-10-30  Mark D. Baushke  <address@hidden>
+
+       * configure.in: Add AC_SEARCH_LIBS for hstrerror in resolv to also
+       define HAVE_HSTRERROR if it is found.
+       * configure: Regenerated.
+
+2004-10-29  Mark D. Baushke  <address@hidden>
+
+       * configure.in: Add AC_SEARCH_LIBS for hstrerror in resolv.
+       * configure: Regenerated.
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * NEWS: Note xreadlink fix.
+
+2004-10-26  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/yesno.h" to project.
+       * cvsnt.dep: Regenerate for "cvsnt.dsp" change.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * NEWS: Note GSSAPI error message fix.
+
+2004-10-25  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add yesno.
+
+2004-10-23  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep: Regenerate for "lib/libcvs.dsp" change.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * cvsnt.dsp: Add "windows-NT/stdint.h" to project.
+       * cvsnt.dep: Regenerated.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * configure: Regenerated.
+
+2004-10-22  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/strftime.h" to project.
+       * cvsnt.dep: Regenerate for "cvsnt.dsp" change.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * gnulib-update (MODULES): Add stdint.
+       * Makefile.in, aclocal.m4, config.h.in, configure, gnulib.txt:
+       Regenerated.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am (proxycheck): Add new test target.
+       * Makefile.in: Regenerated.
+
+2004-10-22  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add md5.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Backout addition of rpmatch & yesno.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * srclist.txt (error): Update from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add rpmatch & yesno.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add getpagesize.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add xsize module explicitly.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * configure.in: Remove outdated comment.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_GNU_STRFTIME.
+       * gnulib-update (MODULES): Add strftime module.
+       * srclist.txt: Remove GNULIB strftime module.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to jm_REALLOC.
+       * gnulib-update (MODULES): Add realloc module.
+       * srclist.txt: Remove GNULIB realloc module.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to jm_MALLOC.
+       * gnulib-update (MODULES): Add malloc module.
+       * srclist.txt: Remove GNULIB malloc module.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * TODO (22, 31): Remove completed items.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * BUGS: Remove ls assertion failure bug.
+
+2001-10-21  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep: Regenerated for "../zlib/lib.dsp" change.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * NEWS: Note `cvs ls filename' fix.
+
+2004-10-20  Mark D. Baushke  <address@hidden>
+
+       * configure.in (ccvs_FUNC_SELECT): Work around Solaris 7 select()
+       hang.
+       * Makefile.in, aclocal.m4, config.h.in, configure:
+       Regenerate for new configure.in.
+
+2004-10-20  Derek Price  <address@hidden>
+
+       * NEWS: Note validate_repo change.
+
+2004-10-19  Derek Price  <address@hidden>
+
+       * NEWS: Note resurrection fix.
+
+2004-10-19  Derek Price  <address@hidden>
+
+       * HACKING (Portability): Note assumption of sys/stat.h.
+
+2004-10-16  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/vasprintf.h" to project.
+       * cvsnt.dep: Regenerate for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerate for "cvsnt.dsp" change.
+
+2004-10-15  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add vasprintf.
+
+2004-10-14  Derek Price  <address@hidden>
+
+       * NEWS: Note new import branch verification.
+
+2004-10-10  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_STRERROR.
+       * gnulib-update (MODULES): Add strerror.
+       * srclist.txt (strerror): Remove list generated by gnulib-update.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_LSTAT.
+       * gnulib-update (MODULES): Add lstat.
+       * srclist.txt (lstat): Remove list generated by gnulib-update.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_STAT.
+       * gnulib-update (MODULES): Add stat.
+       * srclist.txt (stat): Remove list generated by gnulib-update.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_NANOSLEEP.
+       * gnulib-update (MODULES): Add nanosleep.
+       * srclist.txt (nanosleep): Remove list generated by gnulib-update.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_MEMMOVE.
+       * gnulib-update (MODULES): Add memmove.
+       * srclist.txt (memmove): Remove list generated by gnulib-update.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add minmax.
+       * srclist.txt (minmax): Remove list generated by gnulib-update.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_TIME_R, gl_FUNC_MKTIME.
+       * gnulib-update (MODULES): Add restrict, time_r, & mktime.
+       * srclist.txt (restrict, time_r, mktime): Remove lists generated by
+       gnulib-update.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_TZSET_CLOBBER.
+       * gnulib-update (MODULES): Add tzset.
+       * srclist.txt (tzset): Remove list generated by gnulib-update.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_GLIBC_UNLOCKED_IO.
+       * gnulib-update (MODULES): Add unlocked-io.
+       * srclist.txt (unlocked-io): Remove list generated by gnulib-update.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_GETTIME.
+       * gnulib-update (MODULES): Add gettime.
+       * srclist.txt (gettime): Remove list generated by gnulib-update.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * HACKING, NEWS: Note new Autoconf & Automake version requirements.
+       * Makefile.am (SUBDIRS): Remove m4.
+       (EXTRA_DIST): Distribute m4/ChangeLog.
+       * configure.in (AM_INIT_AUTOMAKE): Require Automake 1.9.2.
+       (AC_PREREQ): Require Automake 2.59.
+
+2004-10-07  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/getpass.h" and "lib/strcase.h" to project.
+       * cvsnt.dep: Regenerate for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerate for "cvsnt.dsp" change.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_TIMESPEC.
+       * gnulib-update (MODULES): Add timespec.
+       * srclist.txt (timespec): Remove list generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to AC_FUNC_GETTIMEOFDAY_CLOBBER.
+       * gnulib-update (MODULES): Add gettimeofday.
+       * srclist.txt (gettimeofday): Remove list generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_GETPASS.
+       * gnulib-update (MODULES): Add getpass.
+       * srclist.txt (getpass): Remove list generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add strcase.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_GETHOSTNAME.
+       * gnulib-update (MODULES): Add gethostname.
+       * srclist.txt (gethostname): Remove list generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove calls to AM_FUNC_GETLINE, gl_GETNLINE,
+       & gl_GETNDELIM2.
+       * gnulib-update (MODULES): Add getline, getnline, & getndelim2.
+       * srclist.txt (getline, getnline, getndelim2): Remove lists now
+       generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to AM_STDBOOL_H.
+       * gnulib-update (MODULES): Add stdbool.
+       * srclist.txt (stdbool): Remove list now generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_GETOPT.
+       * gnulib-update (MODULES): Add getopt.
+       * srclist.txt (getopt): Remove list now generated by gnulib-update.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to UTILS_FUNC_MKSTEMP.
+       * gnulib-update (MODULES): Add mkstemp.
+       * srclist.txt (mkstemp): Remove list now generated by gnulib-update.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_FUNC_FNMATCH_POSIX.
+       * gnulib-update (MODULES): Add fnmatch & fnmatch-posix.
+       * srclist.txt (fnmatch, fnmatch-posix): Remove list now generated by
+       gnulib-update.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add extensions.
+       * srclist.txt (extensions): Remove list now generated by gnulib-update.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_EXITFAIL.
+       * gnulib-update (MODULES): Add exitfail.
+       * srclist.txt (exitfail): Remove list now generated by gnulib-update.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * gnulib-update (MODULES): Add exit.
+       * srclist.txt (exit): Remove list now generated by gnulib-update.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * srclist.txt (xalloc): Remove list since it is now generated by
+       gnulib-update.
+
+2004-10-05  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/save-cwd.h" and "lib/xgetcwd.h" to project.
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerated for "cvsnt.dsp" change.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to gl_DIRNAME.
+       * gnulib-update (MODULES): Add dirname.
+       * srclist.txt: Remove auto-updated GNULIB modules.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * gnulib.txt: New file.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * gnulib-update: Keep track of file changes.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Consolidate some GNULIB macro calls into a call to the
+       autogenerated gl_INIT.
+       * gnulib-update: New script.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Rename some GNULIB macro calls.
+       * srclist.txt (gettext, vasnprintf, shared): Add new files.
+       * config.rpath: Import new version from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_SAVE_CWD.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_XGETCWD.
+       * srclist.txt (xgetcwd): New module.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * srclist.txt (pathmax): Remove dependency on onceonly_2_57.m4.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * srclist.txt (unlocked-io): Remove dependency on onceonly_2_57.m4.
+
+2004-10-05  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/dirname.h" and "src/parseinfo.h" to project.
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerated for "cvsnt.dsp" change.
+
+2004-10-04  Derek Price  <address@hidden>
+
+       * TODO: Item 180 is now done (cvs edit should report editors).
+       It reports editors as long as it can successfully contact the
+       server.  (Part of advisary locks patch originally from Noel Yap
+       <address@hidden>, originally ported forward and enhanced by Matthew
+       Ogilvie <address@hidden>.)
+
+2004-10-01  Derek Price  <address@hidden>
+
+       * configure.in (getpass): Don't define twice.
+       (Report and original patch from Martin Neitzel
+       <address@hidden>.)
+
+2004-09-25  Derek Price  <address@hidden>
+
+       * configure.in: Use doc/mkman.pl as source for doc/mkman.
+
+2004-09-23  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Fix spelling.
+       (Reported by Shane Turner <address@hidden>.)
+
+2004-09-17  Derek Price  <address@hidden>
+
+       * NEWS: Correct file cache note.
+       * configure.in (--enable-trust-file-cache): Remove option.
+
+2004-09-16  Derek Price  <address@hidden>
+
+       * HACKING: Correct obsolete note about configure not remembering -Wall.
+
+2004-09-14  Derek Price  <address@hidden>
+
+       * NEWS: Note potential new Log keyword expansion behaviors.
+
+2004-09-13  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Note change to contrib/cvs_acls and addition of
+       contrib/cvs_acls.html
+
+2004-09-09  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" changes made 2004-09-08.
+       * cvsnt.mak: Regenerated for "cvsnt.dsp" changes made 2004-09-08.
+
+2004-09-08  Conrad T. Pino  <address@hidden>
+
+       * cvsnt.dsp: Add "windows-NT/JmgStat.c" to project.  Add
+       "windows-NT/JmgStat.h" to project.  Add "src/ms-buffer.h" to project.
+
+2004-09-07  Derek Price  <address@hidden>
+
+       * NEWS: Note Windows DST fix.
+       * srclist.txt: Add Windows stat files.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * NEWS: Note new commit message format.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * HACKING: Codify backwards compatibility conventions.  Remove outdated
+       reference to very old MSVC++ releases.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * NEWS: Mention Juniper's funding for other items.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * configure.in: Enable proxy support by default.
+       * NEWS: Note this.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * configure.in: s/SECONDARY_SUPPORT/PROXY_SUPPORT/.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * NEWS: Note recent attempts at improving I/O efficiency.
+       * configure.in (--enable-file-cache-trust): New option.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * NEWS: Credit Juniper Networks funding for writeproxy code and add a
+       few other details.
+
+2004-08-05  Derek Price  <address@hidden>
+
+       * configure.in (--enable-proxy): Switch to turn off writeproxy support.
+
+2004-06-29  Derek Price  <address@hidden>
+
+       * NEWS: Note new scripting hooks and new loginfo behavior.
+
+2004-06-28  Derek Price  <address@hidden>
+
+       * srclist.txt: Note minmax imported from GNULIB.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * Note addition of write proxy functionality.
+
+2004-08-30  Derek Price  <address@hidden>
+
+       * NEWS: Note compliance of log_accum.pl with Perl 5.8.5.
+
+2004-08-27  Derek Price  <address@hidden>
+
+       * srclist.txt: Note minmax imported from GNULIB.
+
+2004-08-27  Derek Price  <address@hidden>
+
+       * configure.in (--enable-file-cache-trust, --enable-proxy): New
+       options.
+
+2004-08-25  Derek Price  <address@hidden>
+
+       * TODO (232): New item.
+
+2004-08-24  Derek Price  <address@hidden>
+
+       * TODO (24, 49, 92, 113): Remove completed/obsolescent items.
+
+2004-08-24  Derek Price  <address@hidden>
+
+       * BUGS: Remove release subdir note.  This was fixed with the commit on
+       2004-02-25, based on Matthew Ogilvie's patch.
+
+2004-08-24  Derek Price  <address@hidden>
+
+       * NEWS: Note r* . fix.
+       * BUGS: Remove r* . note.
+
+2004-08-24  Derek Price  <address@hidden>
+
+       * NEWS: Note invalid tag fix.
+
+2004-08-24  Derek Price  <address@hidden>
+
+       * NEWS: Note error message corrections.
+
+2004-08-24  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Note that modules -a bugfix has a change in behavior.
+
+2004-06-29  Derek Price  <address@hidden>
+
+       * NEWS: Note new scripting hooks and val-tags behavior.
+
+2004-07-17  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Add note about new ImportNewFilesToVendorBranchOnly
+       option.
+
+2004-07-17  Derek Price  <address@hidden>
+
+       * NEWS: Note PAM session management support.
+
+2004-07-16  Derek Price  <address@hidden>
+
+       * configure.in: Generate contrib/pam/Makefile.
+       * NEWS: Note distribution of sample PAM configs.
+       (Thanks to a report from Brian Murphy <address@hidden>.)
+
+2004-07-12  Derek Price  <address@hidden>
+
+       * NEWS: Note improved time zone handling.  Attribute previous change.
+
+2004-07-12  Derek Price  <address@hidden>
+
+       * configure.in: Update copyright year.
+
+2004-06-29  Derek Price  <address@hidden>
+
+       * NEWS: Note client/server sending short repositories.
+
+2004-06-24  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Add "./lib/xsize.h" to Header file list.
+       * cvsnt.dep: Regenerated for "./cvsnt.dsp" change.
+       (Patch submitted by Conrad T. Pino <address@hidden>.)
+
+2004-06-22  Derek Price  <address@hidden>
+
+       * NEWS: Note Conrad's Windows fix.
+
+2004-06-21  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore GPG signature files for distributions.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * NEWS: Note manual update.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * NEWS: Note Stefan & Sebastian's security fixes.
+       * acinclude.m4 (gl_SIZE_MAX, gl_XSIZE): Import from GNULIB.
+       * configure.in: Call gl_XSIZE.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * NEWS: Note CAN-2004-0414 fix.
+
+2004-06-02  Derek Price  <address@hidden>
+
+       * TODO (231): New item.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * configure.in: Add calls to gl_FUNC_TZSET_CLOBBER &
+       gl_FUNC_GNU_STRFTIME.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+       * srclist.txt (strftime): New module.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * srclist.txt (tzet): New GNULIB module.
+       * configure: Regenerated.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * NEWS: Add `cvs ls' to localtime item.  1.12.9, not 1.12.8.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * TODO (224): Remove completed item.
+       (Patch from Bart Robinson <address@hidden>.)
+
+       * NEWS: Note new local time output.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * NEWS: Note generation of windows-NT/config.h.in.
+       * configure.in: Use new plhead.pl for windows-NT/fix-msvc-mak.  Add
+       windows-NT/mkconfig target.
+       * configure: Regenerated.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * NEWS: Note CAN-2004-0396 fix.
+
+2004-05-17  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Add "lib/xtime.h" to project header files.
+       * cvsnt.dep: Regnerated for "cvsnt.dsp" file change.
+
+2004-05-17  Derek Price  <address@hidden>
+
+       * BUGS: Note assertion failure of r* commands.
+
+2004-05-17  Derek Price  <address@hidden>
+
+       * BUGS: Note current `cvs ls' assertion failure.  Remove out of date
+       comment about out of date Windows build files and several bug reports
+       that are so old, without similar recent reports, that I'm assuming that
+       the problems have been fixed.
+
+2004-05-15  Derek Price  <address@hidden>
+
+       Back out getdate.y update.
+       * NEWS: Remove note about half-hour time zones.
+
+2004-05-15  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Move "lib/*.c" to project "lib/libcvs".  Header file list
+       updated for GNULIB updates.
+       * cvsnt.dep: Regenerated for "cvsnt.dsp" change.
+       * cvsnt.mak: Regenerated for "cvsnt.dsp" change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-05-11  Derek Price  <address@hidden>
+
+       * NEWS: Note commit output suppression.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * srclist.txt: Note bison.m4 forked from GNULIB.
+       * aclocal.m4, configure: Regenerated.
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * configure.in: Call AC_FUNC_STRERROR_R.
+       * srclist.txt (error): New module, kinda.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * NEWS: Note that man page is generated from cvs.texinfo now.
+       * configure.in: Build doc/mkman.
+       * configure, Makefile.in: Regenerated.
+
+2004-04-29  Derek Price  <address@hidden>
+
+       * configure.in: Remove AC_PROG_YACC invocation in favor of gl_BISON.
+       * configure: Regenerated.
+
+2004-04-29  Derek Price  <address@hidden>
+
+       * configure.in: s/jm_FUNC_GLIBC_UNLOCKED_IO/gl_FUNC_GLIBC_UNLOCKED_IO/.
+       * aclocal.m4, configure: Regenerated.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * ylwrap: Add from Automake to support YACC.
+       * Makefile.in: Regenerated.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * NEWS: Note half-hour timezone strings handled.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_GETDATE and remove obsoleted cruft.
+       * srclist.txt (getdate): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_FUNC_MKTIME.
+       * srclist.txt (mktime): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_TIME_R.
+       * srclist.txt (time_r): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_FUNC_NANOSLEEP.
+       * srclist.txt (nanosleep): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_GETTIME.
+       * srclist.txt (gettime): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call AC_FUNC_GETTIMEOFDAY_CLOBBER.
+       * srclist.txt (gettimeofday): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_TIMESPEC.
+       * srclist.txt (timespec): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Replace calls to AC_AIX, AC_MINIX, & AC_GNU_SOURCE
+       with gl_USE_SYSTEM_EXTENSIONS.
+       * srclist.txt (extensions): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * srclist.txt (dirname): Mark as not forked.
+       * aclocal.m4: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       Add dirname module from GNULIB.
+
+       * configure.in: Use gl_DIRNAME.
+       * srclist.txt (dirname): New module.
+       * Makefile.in, aclocal.m4, config.h.in, configure: Regenerated.
+
+2004-04-26  Derek Price  <address@hidden>
+
+       * NEWS: Note that :ext: no longer relies on an external transport with
+       a GNU argument processor.
+
+2004-04-26  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Add ls.c & stdbool.h as dependencies.
+       * cvsnt.dep, cvsnt.mak: Regenerated.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * NEWS: Note new cvs ls subcommand.
+       (Thanks for patches from Mark D Baushke <address@hidden>
+       & Alexander Taler <address@hidden>.)
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * cvsnt.dep, cvsnt.mak: Back out previous change.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * cvsnt.dep, cvsnt.mak: Regenerated.
+
+2004-04-21  Derek Price  <address@hidden>
+
+       Add stdbool module from GNULIB.
+
+       * HACKING: Note availability of stdbool, fnmatch, alloca & GNULIB
+       substitutes in general.
+       * configure.in: Call AM_STDBOOL_H.
+       * srclist.txt: Add stdbool.
+       * aclocal.m4, configure, config.h.in, Makefile.in: Regenerated.
+
+2004-04-20  Derek Price  <address@hidden>
+
+       * NEWS: Note XP directory deletion fix.
+
+2004-04-19  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Regenerated for "zlib/libz.dsp" change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-17  Derek Price  <address@hidden>
+
+       * cvsnt.dsw, cvsnt.dsp: Rename "lib/lib.*" to "lib/libcvs.*" and
+       "zlib/zlib.*" to "zlib/libz.*".
+       * cvsnt.dep, cvsnt.mak: Regenerated.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-16  Derek Price  <address@hidden>
+
+       * NEWS: Correct CVS name for piped checkout issue now that we have one.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Set PROP BASE directories to projet standard,
+       synchronize ADD BASE statements with ADD counter part,
+       remove child note property overrides which taken together
+       reduce file size and "Reset" function uses project defaults.
+       Place project libraries first in link library order.
+       * cvsnt.mak: Regenerated for cvsnt.dsp change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * cvsnt.dep: Regenerated for lib/lib.dsp change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * NEWS: Retroactively add CVE issue name for the piped etc issue.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * NEWS: Retroactively add CVE issue name for the trojan server issue.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Set default configuration on generated make files to
+       Win32 Debug.
+       (Patch from Conrad T. Pino <address@hidden>.)
+       * cvsnt.dep, cvsnt.mak: Regenerated.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * NEWS: Note MSVC++ project file regeneration.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add cvsnt.dep.
+       * Makefile.in: Regenerated.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * cvsnt.dep: New generated file.
+       * cvsnt.mak: Regenerated.
+       (Original patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-14  Derek Price  <address@hidden>
+
+       * NEWS: Note use of POSIX.2 fnmatch.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       * HACKING: s/cvsntfix.pl/fix-msvc-head.pl/.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       * configure.in: Generate windows-NT/fix-msvc-mak.
+       * configure, Makefile.in: Regenerated.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       * INSTALL (Building from source code under Unix): Move Autoconf &
+       Automake notes...
+       * HACKING (Regenerating Build Files (UNIX)): ...here.
+       (Regenerating Build Files (Windows)): New section.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       Update to current fnmatch module from GNULIB.
+
+       * configure.in: Call gl_FUNC_FNMATCH_POSIX.
+       (AC_CHECK_HEADERS): Don't bother checking for fnmatch.h - we can assume
+       it.
+       * srclist.txt: Note origins of fnmatch.
+       * aclocal.m4, config.h.in, configure, Makefile.in: Regenerated.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Remove cvsnt.dep.
+       * Makefile.in: Regenerated.
+
+2004-04-13  Derek Price  <address@hidden>
+
+       * NEWS: Note validation of paths passed to the client.
+
+2004-04-13  Derek Price  <address@hidden>
+
+       * NEWS: Note restriction of modules to within $CVSROOT.
+
+2004-04-07  Derek Price  <address@hidden>
+
+       * NEWS: Clarify relative-path up-reference article.
+
+2004-04-07  Derek Price  <address@hidden>
+
+       Update regex module from GNULIB.
+
+       * NEWS: Note update.
+       * configure.in: Call gl_REGEX.
+       * srclist.txt: Note origins of regex module.
+       * Makefile.in, configure, config.h.in, aclocal.m4: Regenerated.
+
+2004-04-06  Derek Price  <address@hidden>
+
+       * NEWS: Note web proxy support.
+
+2004-04-06  Derek Price  <address@hidden>
+
+       * TODO (196, 217, 219, 220, 222, 226): Remove completed items.
+       (230): New item.
+
+2004-04-06  Derek Price  <address@hidden>
+
+       * NEWS: Note this change.
+       * configure.in: Do not try and use TMP, TEMP, or TMPDIR as default
+       temporary directories.
+       * configure: Regenerated.
+
+2004-04-05  Derek Price  <address@hidden>
+
+       * srclist.txt: Note new location for GNULIB CVS repository.
+
+2004-04-04  Derek Price  <address@hidden>
+
+       * NEWS: Note Cygwin handles paths like X:\.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * NEWS: Note Windows ISDIRSEP fix.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * INSTALL: Instruct users to use the Workspace file and not the project
+       file for MSVC++.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * NEWS: Make some notes as to client/serverness of changes.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * NEWS: Note relative path fix.
+
+2004-04-01  Derek Price  <address@hidden>
+
+       * NEWS: Record run race removal.
+
+2004-03-31  Derek Price  <address@hidden>
+
+       * NEWS: Note contrb script renames.
+       * configure.in: Rename contrib scripts.
+       * configure: Regenerated.
+
+2004-03-31  Mark D. Baushke  <address@hidden>
+
+       * cvs.spec.in (BuildRequires): Do not fail if info DIR file does
+       not exist. (Not everyone has an install-info that generates the
+       dir file that we want deleted.)
+       (Report from Geoff Beier <address@hidden>.)
+
+2004-03-29  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Regenerated with VC++ 5.0.
+       (Original sent by Dennis Jones <address@hidden>.)
+       * cvsnt.dep: Removed.
+
+2004-03-28  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Print "Debug" when defaulting to Debug.
+
+2004-03-28  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Default to using debugging symbols so that folks who don't
+       know enough to remove the debugging symbols might still be able to send
+       us stack traces after encountering problems.
+
+2004-03-28  Derek Price  <address@hidden>
+
+       * cvsnt.dep, cvsnt.mak: Regnerated.  Remove system specific
+       dependency reference.
+
+2004-03-27  Derek Price  <address@hidden>
+
+       * cvsnt.dep, cvsnt.mak: Regnerated.
+
+2004-03-26  Derek Price  <address@hidden>
+
+       * INSTALL: Note that build files have been regenerated with MSVC 6.0.
+
+2004-03-26  Derek Price  <address@hidden>
+
+       * NEWS: Note Windows build file regeneration.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * NEWS: Note failure of Cygwin to convert back slashes to slashes.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * cvs.spec.in (BuildRoot): Use a more unique directory name.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add cvsnt.dep.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * cvsnt.dep: New files created by Visual C++ 6.0.
+       * cvsnt.dsp, cvsnt.dsw, cvsnt.mak: Updated by Visual C++ 6.0.
+       * .cvsignore: Add and remove files for new MSVC++ setup.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * NEWS: Note Windows memory allocation fix.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * INSTALL: Note compilation & --without-gssapi requirement for HPPA
+       with HP-UX 11.11.
+       (Report from Nicolas Vervelle <address@hidden>.)
+
+2004-03-20  Derek Price  <address@hidden>
+
+       * NEWS: Note resurrection fixes.
+
+2004-03-18  Derek Price  <address@hidden>
+
+       * NEWS: Back out previous NEWS change at Larry Jones' suggestion.
+
+2004-03-17  Derek Price  <address@hidden>
+
+       * NEWS: Note spelling fix.
+
+2004-03-17  Derek Price  <address@hidden>
+
+       * configure.in (--enable-password-authentication-client): Correct
+       error message text.
+       * NEWS: Note this change.
+       * configure: Regenerated.
+
+2004-03-15  Derek Price  <address@hidden>
+
+       * NEWS: Note cvs release + Kerberos fix.
+
+2004-03-15  Derek Price  <address@hidden>
+
+       * configure.in: Correct grammar in help text.
+       * configure: Regenerated.
+
+2004-03-15  Derek Price  <address@hidden>
+
+       * macintosh/.cvsignore: Complete pruning of directory started in 1999.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * NEWS: Note resurrection fix.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * NEWS: Note error & status message corrections.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * NEWS: Note diff of added files against arbitrary revisions fix.
+
+2004-03-12  Derek Price  <address@hidden>
+
+       * NEWS: Remove header comment fix note, per GNU coding standards.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * NEWS: Note sanity.sh client/server message fix.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * NEWS: Note add.c message changes.
+
+2004-03-13  Derek Price  <address@hidden>
+
+       * NEWS: Note server.c header comment fix.
+
+2004-03-13  Derek Price  <address@hidden>
+
+       * NEWS: Restore since 1.12.5 section since 1.12.6 distcheck failed.
+
+2004-03-11  Derek Price  <address@hidden>
+
+       * cvsnt.mak (alloca.obj, alloca.h): New targets.
+       (CLEAN): Clean generated headers.
+       (vasnprintf.c): Add dependency on alloca.h.
+
+2004-03-11  Derek Price  <address@hidden>
+
+       * srclist.txt: Note unfork of lib/xsize.h.
+
+2004-03-07  Derek Price  <address@hidden>
+
+       * cvsnt.mak (asnprintf, vasnprintf, printf-args, printf-parse):
+       New targets.
+       * srclist.txt: Note fork of lib/xsize.h.
+       * NEWS: Note that CVSROOT/*info scripts may not work as expected under
+       Windows.
+
+2004-03-03  Derek Price  <address@hidden>
+
+       * NEWS: Note that directories and files named `CVS' are now also
+       rejected by import.
+
+2004-02-26  Derek Price  <address@hidden>
+
+       * cvsnt.mak (cvs.exe): Build xmalloc.obj, not xalloc.obj.
+
+2004-02-26  Derek Price  <address@hidden>
+
+       * cvsnt.mak (xmalloc.obj, xstrdup.obj): s/windows-NT/lib/.
+
+2004-02-25  Derek Price  <address@hidden>
+
+       * NEWS: Note `checkout -d' behavior change.
+
+2004-02-25  Derek Price  <address@hidden>
+
+       * NEWS: Update dying gasp note.
+
+2004-02-25  Derek Price  <address@hidden>
+
+       * cvsnt.mak (exitfail.obj): s/windows-NT/lib/.
+
+2004-02-25  Derek Price  <address@hidden>
+
+       * NEWS: Note `cvs release' Entries corruption fix.
+
+2004-02-24  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Add xstrdup, xalloc, exitfail.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       * NEWS: Note that the dying gasp check has now been completely removed.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       Import xalloc module from GNULIB, as well as its remaining unimported
+       dependency, the exitfail module.
+
+       * NEWS: Note addition of xalloc & vasnprintf modules from GNULIB.
+       * configure.in: Call gl_XALLOC & gl_EXITFAIL.
+       * cvsnt.mak: Add new objects & sources.
+       * srclist.txt (exitfail, xalloc): New GNULIB modules.
+       * Makefile.in, aclocal.m4, configure: Regenerated.
+
+2004-02-20  Larry Jones  <address@hidden>
+
+       * configure.in: Don't use grep -w, it's not portable.
+       * configure: Regenerated.
+
+2004-02-19  Larry Jones  <address@hidden>
+
+       * configure.in: Move the wint_t size check after all the base type
+       size checks and include the relevant header file, use "short" rather
+       than "short int" (ala "long" and "long long"), add a size check for
+       intmax_t, remove "CVSROOT/*" since it ends up embedded in a C
+       comment where the "/*" looks like an attempt to have a nested comment.
+       * config.h.in, configure: Regenerated.
+
+2004-02-19  Derek Price <address@hidden>
+
+       * configure.in: AC_REQUIRE some HAVE_TYPE functions to avoid using
+       post-C89 constructs in the new format_cmdline stuff when they are not
+       available.  Update comments.  s/_LONG_INT\>/_LONG/i;
+       s/\<long int\>/long/.  Don't check size of types that are not
+       available.  Check size of size_t and ptrdiff_t.
+       * config.h.in, configure:  Regenerated.
+
+2004-02-18  Derek Price <address@hidden>
+
+       * configure.in: Don't require AC_C_INLINE, now that m4/xsize.m4 does
+       this itself.
+       * aclocal.m4, configure:  Regenerated.
+
+2004-02-17  Derek Price <address@hidden>
+
+       * configure.in:  added macros to set the UNIQUE_*_TYPE_* flags and
+       HAVE_STDINT_T (for intmax_t) for some stuff involving varargs in
+       format_cmdline() in src/run.c.  UNIQUE_X_TYPE_Y means that
+       type Y (e.g. INT, SHORT_INT, or DOUBLE) is the first type, according
+       to an arbitrary order of precedence within type group X (e.g. INT or
+       FLOAT), that has a particular size, in bytes.  Added
+       SUPPORT_OLD_INFO_FMT_STRINGS in order to make configurable whether to
+       support the old style info file command line format strings.  The idea
+       is to deprecate the use of the old strings until one day this can be
+       switched to off.  This option can be enabled/disabled with
+       --enable-old-info-format-support and --disable-old-info-format-support.
+       * HACKING (Run-time behaviors): Remove reference to Parse_Info not
+       accepting a void * argument.
+
+       * config.h.in:  Regenerated.
+       * configure:  Ditto..
+
+2004-02-17  Derek Price  <address@hidden>
+
+       * NEWS: Note spec file fix.
+       * cvs.spec: Update to avoid the error checking algorithm's of more
+       recent version of RPM.
+
+2004-02-17  Derek Price  <address@hidden>
+
+       * NEWS: Note recent commenting of src/checkout.c and Mark's leak fixes.
+
+2004-02-16  Larry Jones  <address@hidden>
+
+       * configure.in: Add AC_C_INLINE for vasnprintf and friends.
+       * config.h.in, configure: Regenerated.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import vasnprintf module from GNULIB.
+       * configure.in: Call gl_FUNC_VASNPRINTF.
+       * srclist.txt: Add vasnprintf module.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import xsize module from GNULIB for vasnprintf().
+       * configure.in: Call gl_XSIZE.
+       * srclist.txt: Add xsize module.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import alloca module from GNULIB for vasnprintf().
+       * configure.in: Use gl_FUNC_ALLOCA.
+       * srclist.txt: Add alloca module.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       * NEWS: Note GNULIB updates.
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * NEWS: Note Mark D. Baushke's recent memory leak plugs.
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * NEWS: Note Ville Skyttä's other recent man page patch.
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * NEWS: Note lock wait seg fault fix.
+
+2004-02-11  Derek Price  <address@hidden>
+
+       * NEWS: Note :fork: segfault avoidance.
+
+2004-02-11  Derek Price  <address@hidden>
+
+       * NEWS: Note readability improvements.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * NEWS: Note dying gasp check.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * NEWS: Note flow control pipe race fix.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * BUGS: Note problems building with MSVC++ under Windows and
+       workaround.
+       * INSTALL: Ditto.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Add stack.c and stack.h in order to compile under Windows.
+       * README: Update copyright notice.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       * NEWS: Note new tests in sanity.sh.
+
+2004-02-06  Derek Price  <address@hidden>
+
+       * README: Undo accidental overwrite.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * NEWS: Note that alias module recursion is now more comprehensive.
+
+2004-02-03  Derek Price  <address@hidden>
+
+       * NEWS: Note case insensitive client directory case preservation.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * NEWS: Correct "error message" from two commits back to read
+       "status mesage".
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * NEWS: Note new join-rm tests.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * NEWS: Note update error message correction.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * NEWS: Note that the server no longer claims to support the "Case"
+       request.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * NEWS: Ammend last note to specify the continued lack of any server
+       support for case insensitive clients more clearly.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * NEWS: Note that client handling of case insensitivity is restored.
+
+2004-01-30  Derek Price  <address@hidden>
+
+       * NEWS: Note man page fix.
+
+2004-01-30  Derek Price  <address@hidden>
+
+       * NEWS: Note contrib/log_accum tidy.
+
+2004-01-25  Derek Price  <address@hidden>
+
+       * NEWS: Note Kerberos 4 fix.
+
+2004-01-22  Derek Price  <address@hidden>
+
+       * NEWS: Note recent infinite alias loop fix.
+
+2004-01-22  Derek Price  <address@hidden>
+
+       * INSTALL: Remove a note about an Automake bug that has been fixed for
+       quite awhile.
+
+2004-01-22  Derek Price  <address@hidden>
+
+       * INSTALL: s/Automake 1.7.5/Automake 1.7.9/.
+
+2004-01-14  Derek Price  <address@hidden>
+
+       * NEWS: Note Larrys recent mktemp.sh inclusion, documentation reorg,
+       and zlib code fix.
+
+2003-12-23  Larry Jones  <address@hidden>
+
+       * Makefile.am: Add mktemp.sh to EXTRA_DIST.
+       * Makefile.in: Regenerated.
+
+       * configure.in: Get mktemp.sh from $srcdir.
+       * configure: Regenerated.
+       (Reported by Matt Selsky <address@hidden>.)
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * NEWS: Add since 1.12.5 section.
+       * configure.in: Update for dev 1.12.5.1.
+       * configure: Regenerated.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * configure.in: Update for release 1.12.5.
+       * configure: Regenerated.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       *  NEWS: Note Mark and Rob Clevenger's recent Windows build fixes.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * NEWS: Note syslog of root attempts.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * NEWS: Note that pserver can no longer run as root.
+
+2003-12-12  Derek Price  <address@hidden>
+
+       * cvs.spec.in (%post): Do the same for cvsclient.info.
+
+2003-12-12  Derek Price  <address@hidden>
+
+       * cvs.spec.in (%post): Remove info's uncompressed info file cache after
+       installing the new gzipped files.
+
+2003-12-10  Mark D. Baushke  <address@hidden>
+
+       * configure.in(AC_FUNC_FSEEKO): Add. Include handling for fseeko
+       and ftello with AC_LIBOBJ.
+       (AC_REPLACE_FUNCS): Remove fseeko and ftello.
+       * config.h.in, configure: Regenerated.
+
+2003-12-10  Mark D. Baushke  <address@hidden>
+
+       * cvsnt.mak (CLEAN, CPP_SBRS): Add ftello, fseeko, exithandle and
+       getndelim2.
+       (ftello.c, fseeko.c, exithandle.c, getndelim2): Add new source
+       file definitions.
+       (Patch from Rob Clevenger <address@hidden>.)
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * NEWS: Add section for 1.12.4.
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * configure.in: Update for release 1.12.4.1.
+       * configure: Regenerated.
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * NEWS: Note new promotable read locks.
+       * configure.in (--enable-lock-compatibility): New option.
+       * configure, config.h.in: Regenerated.
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * configure.in: Reorder enables slightly and improve commenting.
+       * configure: Regenerated.
+
+2003-12-09  Mark D. Baushke  <address@hidden>
+
+       * configure.in (fseeko, ftello): Add to AC_REPLACE_FUNCS list.
+       * configure, config.h.in: Regenerated.
+
+2003-12-08  Mark D. Baushke  <address@hidden>
+
+       * configure.in (AC_SYS_LARGEFILE). Add.
+       * configure, config.h.in: Regenerated.
+       * NEWS: Document.
+
+2003-12-07  Mark D. Baushke  <address@hidden>
+
+       * configure.in (AC_SYS_LARGEFILE): Remove. More work is needed
+       before AC_SYS_LARGEFILE will work on all platforms.
+       * configure, config.h.in: Regenerated.
+       * NEWS: Remove last note.
+
+       * configure.in (AC_SYS_LARGEFILE): Add. The history file on
+       Solaris boxes can grow beyond 2GB.
+       * configure, config.h.in: Regenerated.
+       * NEWS: Note addition of --disable-largefiles option.
+
+2003-12-05  Derek Price  <address@hidden>
+
+       * configure.in: Update to require Automake 1.7.9.
+
+2003-12-05  Derek Price  <address@hidden>
+
+       * NEWS: Add since 1.12.3 section.
+       * configure.in: Update for dev version 1.12.3.1.
+       * configure: Regenerated.
+
+2003-12-04  Derek Price  <address@hidden>
+
+       * configure.in: Update for release 1.12.3.
+       * configure: Regenerated.
+
+2003-12-03  Derek Price  <address@hidden>
+
+       * configure.in (--enable-case-sensitivity): Restore this option.
+       Always AC_LIBOBJ(fncase) when filenames are found to be case
+       insensitive.
+       * configure, config.h.in: Regenerated.
+
+2003-11-26  Derek Price  <address@hidden>
+
+       * configure.in (--enable-case-sensitivity): Remove this option.
+       * NEWS: Note removal of case sensitivity support.
+
+       * config.h.in, configure: Regenerated.
+
+2003-11-26  Derek Price  <address@hidden>
+
+       * NEWS: Note recase tests.
+
+2003-11-26  Derek Price  <address@hidden>
+
+       * NEWS: Note new test suite functionality.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * configure.in (RSH_DFLT): Macro substitution for configured CVS_RSH.
+       * Makefile.in, configure: Regenerated.
+
+2003-11-19  Derek Price  <address@hidden>
+
+       * srclist.txt (getline): Update to match new module definitions and
+       imports.
+       * aclocal.m4, configure: Regenerated.
+
+2003-11-19  Derek Price  <address@hidden>
+
+       * NEWS: Rename "OTHER ISSUES" to "GENERAL USER ISSUES" and move the
+       note about the Autoconf upgrade to a new "DEVELOPER ISSUES" section.
+       Add a note about upgrading Automake.
+       * aclocal.m4, configure, **/Makefile.in: Regenerated with Automake
+       1.7.9.
+
+2003-11-18  Derek Price  <address@hidden>
+
+       * NEWS: Subdivide Changes section into "SERVER SECURITY ISSUES" and
+       "OTHER ISSUES".  Note module abspath issue in security section.
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * BUGS: Add some detail to the last two notes Mark added.
+
+2003-11-10  Mark D. Baushke  <address@hidden>
+
+       * BUGS: Note bugs symlinks to files will not work with or without
+       LockDir. Note that symlinks to directories will not work with
+       LockDir.
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * configure.in: Require Autoconf 2.58.
+       * INSTALL, NEWS: Note new Autoconf requirements.
+
+       * configure: Regenerated.
+
+2003-11-04  Derek Price  <address@hidden>
+
+       * configure.in: Add some more help text for --enable-case-sensitivity.
+       * configure: Regenerated.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * configure.in (AM_INIT_AUTOMAKE): Require Automake 1.7.5.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * INSTALL: Add some notes on Autoconf requirements.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-11-03  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am (ACLOCAL_AMFLAGS): autoreconf does not understand
+       what to do with $(srcdir) so remove it -- autoreconf needs to be
+       done in the srcdir in order to regenerate all the files properly
+       in any case.
+
+       * configure.in (AM_GNU_GETTEXT_VERSION): Add to allow autoreconf
+       to regenerate files instead of using the incantation:
+       'aclocal -I m4 && autoconf && automake && autoheader' to do the
+       same thing as 'autoreconf' should do.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * NEWS: Note that we're better at detecting ZLIB versions now.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * aclocal.m4, configure: Regenerated.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * NEWS: Note that server ignores `-l' rather than rejecting it with a
+       fatal error.
+
+2003-10-31  Derek Price  <address@hidden>
+
+       * INSTALL: Note Cygwin as an option for building CVS under Windows.
+
+2003-10-31  Derek Price  <address@hidden>
+
+       * INSTALL: s/cvsgui/wincvs/.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * configure.in: Move case sensitivity test to the enable-* section and
+       allow override via command line switch.
+       * NEWS: Update last news item to reflect new command line switch.
+       * configure, config.h.in: Regenerated.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * configure.in: Add new test for a case insensitive file system.
+       * configure, config.h.in: Regenerated.
+       * NEWS: Note the above change.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * configure.in: Update version to 1.12.2.1.
+       * NEWS (Changes since 1.12.2): New section.
+       * configure: Regenerated.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * configure.in: Update version to 1.12.2.
+       * configure: Regenerated.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * cvsnt.mak: /PROTO\.h/d;.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * NEWS: Update recent text about joins to reflect new behavior.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * BUGS: Note that release of a project subdir does not remove the entry
+       from `./CVS/Entries'.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * NEWS: Note things like plugging memory leaks and code cleanup and
+       reorganization under misc.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * BUGS: Remove obsolete bug report.
+       (Patch from Paul Edwards <somewhere in Australia>.)
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * BUGS: Remove obsolete bug report.
+       (Patch from Paul Edwards <somewhere in Australia>.)
+
+2003-10-23  Mark D. Baushke  <address@hidden>
+
+       * NEWS: Note behavior change for cvs update -jrev1 -jrev2.
+
+2003-10-23  Derek Price  <address@hidden>
+
+       * NEWS: Note that double include of getndelim2.o problem is gone from
+       OS X.
+       * srclist.txt (getline, getndelim2): Note divergence from GNULIB.
+       * aclocal.m4, configure: Regenerated.
+
+2003-10-22  Derek Price  <address@hidden>
+
+       * NEWS: Note that we build on systems with gettext installed now.
+
+2003-10-21  Derek Price  <address@hidden>
+
+       * NEWS: Note Mark's recent admin -m fix.
+
+2003-10-21  Derek Price  <address@hidden>
+
+       * NEWS: Note the @email{} and @url{} fixes as misc documentation fixes.
+
+2003-10-14  Derek Price  <address@hidden>
+
+       * NEWS: Note POSIX 1003.1-2001 compatibility of docs and scripts.
+
+2003-10-14  Derek Price  <address@hidden>
+
+       Port to pedantic POSIX 1003.1-2001 hosts, such as Debian GNU/Linux
+       testing with _POSIX2_VERSION=200112 in the environment.
+
+       * BUGS: Suggest 'diff -C2', not 'diff -c2'.
+       * FAQ: Suggest 'sort -k 1.2', not 'sort +0.1'.
+       * depcomp: Sync to the depcomp shipped with Automake 1.7.8, as
+       it has the bug fixed and that's better than maintaining our
+       own depcomp.
+       (Patch from Paul Eggert <address@hidden>.)
+
+2003-10-14  Derek Price  <address@hidden>
+
+       * INSTALL: Add HPPA 2.0 running HP-UX 10.20 for CVS 1.11.9.
+       (Report from Tom Kuiper <address@hidden>.)
+
+2003-10-09  Derek Price  <address@hidden>
+
+       * HACKING (Other style issues): Note the dev team's preference for
+       consistency in the use of the `extern' storage-class identifier.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * NEWS: Note history reporting fix.
+
+2003-10-08  Larry Jones  <address@hidden>
+
+       * TESTS: Add pointer to debug_check_log script.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * NEWS: Improve syntax and punctuation of my last entry.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * NEWS: Note history fix for clients requesting `P' records.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * NEWS: Note case insensitive file lookup fix.  Note getpass fix.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       Add the GNULIB restrict module.
+
+       * configure.in: Add call to gl_C_RESTRICT.
+       * srclist.txt: Add m4/restrict.m4.
+       * aclocal.m4, configure, config.h.in: Regenerated.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * configure.in: Remove check for getopt function.  Add call to
+       gl_GETOPT.
+       * srclist.txt: Add entries for GNULIB getopt module.
+       * aclocal.m4, config.h.in, configure: Regenerated.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       Assume headers in m4/gettext.m4 per notes in HACKING.
+
+       * aclocal.m4: Regenerated.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * configure.in: Remove call to AC_TYPE_SIZE_T since size_t can be
+       assumed via our C89 assumption of stddef.h.  Don't check for errno.h
+       or string.h.  We are assuming these headers.
+       * HACKING (Portability): Add a few more notes on our header assumptions
+       based on some comments from Paul Eggert <address@hidden> on the
+       GNULIB list.
+       * config.h.in, configure.in: Regenerated.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       Provide an atexit() function on systems which provide on_exit() but not
+       atexit().
+
+       * configure.in: Add a call to gl_FUNC_ATEXIT.
+       * srclist.txt: List atexit sources.
+       * aclocal.m4, config.h.in, configure: Regenerated.
+
+2003-09-29  Derek Price  <address@hidden>
+
+       * NEWS: Note recent fix of the potential segfault during a diff.
+
+2003-09-29  Derek Price  <address@hidden>
+
+       * HACKING (Indentation style): Put an ANSI function prototype in the
+       indentation style example.
+       (Portability): Add a few more notes on assuming a freestanding C89
+       compiler and what that means.
+
+2003-09-26  Derek Price  <address@hidden>
+
+       * BUGS: Note bug in options passed to diff via `cvs diff'.
+
+2003-09-12  Derek Price  <address@hidden>
+
+       * NEWS: Move last blurb into an item with more detail.
+
+2003-09-12  Derek Price  <address@hidden>
+
+       * NEWS: Add the recent checkoutlist fix as "Other miscellaneous
+       bug fixes."
+
+2003-09-08  Derek Price  <address@hidden>
+
+       * NEWS: Note removal of the workaround for a bug in GLIBC prior to
+       GLIBC 2.0.7 and advise upgrading GLIBC rather than depending on silly
+       hacks that don't fix other programs installed on the system.
+
+2003-08-29  Derek Price  <address@hidden>
+
+       * NEWS: Note removal of CVSROOT/editinfo functionality.
+
+2003-08-29  Derek Price  <address@hidden>
+
+       * NEWS: Remove typo in recent getpass() note.
+
+2003-08-27  Larry Jones  <address@hidden>
+
+       * NEWS: Note client/server messages have real command name, client/
+       server updates get logged in history file, history file has "P"
+       record type.
+
+2003-08-19  Derek Price  <address@hidden>
+
+       * HACKING (Portability): Add further comments about which headers we
+       can use.
+
+2003-08-12  Derek Price  <address@hidden>
+
+       * aclocal.m4, configure: Regenerated.
+
+2003-07-31  Derek Price  <address@hidden>
+
+       * configure.in: Call the newly prescribed gl_FUNC_GETPASS_GNU rather
+       than the internal gl_PREREQ_GETPASS.
+       * srclist.txt ($GNULIB/modules/getpass): Rename to...
+       ($GNULIB/modules/getpass-gnu): ...this new module.
+       * aclocal.m4, configure: Regenerated.
+
+2003-07-29  Derek Price  <address@hidden>
+
+       * configure.in: Replace my recent misuse of AH_VERBATIM with a call to
+       AC_DEFINE.
+       * config.h.in, configure: Regenerated.
+
+2003-07-29  Derek Price  <address@hidden>
+
+       * configure.in: Do not check for getpassphrase.  Define `getpass' to
+       `cvs_getpass' in config.h to avoid conflicts with system decls.
+       * srclist.txt ($GNULIB/modules/getpass): New entry.
+       * NEWS: Note use of GNULIB getpass.
+
+       * config.h.in, configure: Regenerated.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * INSTALL: Note --without-gssapi required to configure on OS X.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * srclist.txt (lstat, stat): Correct typo.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * srclist.txt (getline, getnline, getndelim2): Mark some files sync'd.
+       * aclocal.m4, config.h.in, configure: Regenerated.
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * configure.in: Remove gethostname from AC_REPLACE_FUNCS call and add a
+       call to gl_FUNC_GETHOSTNAME.
+       * srclist.txt ($GNULIB/modules/gethostname): Add this source.
+
+       * aclocal.m4, config.h.in, configure: Regenerated.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * HACKING (Indentation style): Note the new C89 literal string
+       standard.
+       (Portability): Ditto, plus mention the headers we assume from C89.
+       * NEWS: Mention that we dropped K&R support.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * configure.in: We can assume <limits.h> and <stdarg.h>, so we no
+       longer need to check for <limits.h> or <varargs.h>.
+       * srclist.txt (m4/gettext): Note local modifications.
+
+       * aclocal.m4: Regenerate.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * configure.in: Add call to gl_FUNC_STRERROR,
+       s/jm_FUNC_MEMMOVE/gl_FUNC_MEMMOVE/, and alphebetize list.
+       * srclist.txt: Add GNULIB strerror module.
+
+       * aclocal.m4: Regenerated.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * configure.in: Add call to gl_FUNC_MEMMOVE and remove memmove from the
+       call to AC_REPLACE_FUNCS.
+       * srclist.txt: Note import of GNULIB memmove module.
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * srclist.txt: Note GNULIB exit() function support.
+
+2003-07-20  Derek Price  <address@hidden>
+
+       * NEWS: Mention experimental PAM support.
+
+2003-07-20  Derek Price  <address@hidden>
+
+       * configure.in (--enable-pam): New experimental option to enable PAM
+       support on systems that support it.
+       (--with-hardcoded-pam-service-name): PAM configuration option.
+       (Original patch from Brian Murphy <address@hidden>.)
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * srclist.txt: Add a few missed files and reorganize slightly.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * srclist.txt: New file which describes where various external source
+       files come from.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * configure.in: Always call gl_GETNDELIM2 as per new API.
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * BUGS: Remove mention of wrappers -t/-f since they are no longer
+       supported.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add cvs.spec so that RPMs can be built
+       directly from tarballs.
+       * Makefile.in: Regenerated.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * TODO (72): Remove mention of the -i/-o in the modules file since they
+       have been removed.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * NEWS: Note new keyword expansion mode behavior.
+       * TODO (216): Remove completed item.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * configure.in: Use gl_GETNLINE rather than the obsolete
+       gl_FUNC_GETNLINE.
+       * aclocal.m4: Regenerated.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * configure.in: Use gl_FUNC_GETNLINE rather than the obsolete
+       gl_PREREQ_GETNLINE,
+
+       * aclocal.m4: Regenerated.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * configure.in: Call gl_PATHMAX, not gl_PATH_MAX.
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * configure.in: Remove AC_C_PROTOTYPES call.
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * configure.in: Add calls to new pathmax macro.
+
+       * aclocal.m4: Regenerated.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * configure.in: Add calls to new getline & getnline macros.
+
+       * aclocal.m4: Regenerated.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-07-15  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-06-27  Larry Jones  <address@hidden>
+
+       * NEWS: Note LockDir fix.
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * configure.in: Debian Woody has -lkrb4, so check for that.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * INSTALL: Add some OS X platforms to the compile list. Correct link to
+       cvsgui.org -> wincvs.org.
+
+2003-06-20  Derek Price  <address@hidden>
+
+       * configure.in: Compile kerberos4-client.[ch] if needed.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * configure: Regenerated.
+
+2003-06-14  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * configure.in: Call UTILS_FUNC_MKSTEMP for lib/mkstemp.c.
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+       * config.h.in: Ditto.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * HACKING: Update note on reentrancy.
+       (Original patch from Ken Lorber <address@hidden>.)
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * configure.in: Call AM_GNU_GETTEXT.
+       * ABOUT-NLS: New file for GNU gettext support.
+       * config.guess: Ditto.
+       * config.rpath: Ditto.
+       * config.sub: Ditto.
+
+       * Makefile.in: Regenerated.
+       * aclocal.m4: Ditto.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-06-10  Mark D. Baushke  <address@hidden>
+
+       * NEWS: New LocalKeyword and KeywordExpand options.
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Rename win32.c to woe32.c in accordance with the GNU
+       convention to avoid implying that we consider the Microsoft Windows
+       Operating Environment any sort of "win".
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * NEWS: Note short patch fix.
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * TODO (45): Combine this with...
+       (30): ...this item (as #30).  Remove reference to diff since the
+       modules file is only consulted for the r* commands.
+
+2003-06-02  Derek Price  <address@hidden>
+
+       * NEWS: Note empty diff change text fix.
+
+2003-05-31  Derek Price  <address@hidden>
+
+       * TESTS: Note new $SPROG & $testcvs_server_support variables.
+
+2003-05-29  Derek Price  <address@hidden>
+
+       * NEWS: Note removal of global -l option.
+
+2003-05-28  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Add lib\PROTO.h to appropriate DEPS.
+
+2003-05-27  Derek Price  <address@hidden>
+
+       * AUTHORS: Give Mark an email address.
+
+2003-05-27  Derek Price  <address@hidden>
+
+       * cvs.spec.in: Add some files to doc.  Remove redundant %defattr.
+
+2003-05-27  Derek Price  <address@hidden>
+
+       * README (Credits): Move...
+       * AUTHORS: ...here and update.
+
+2003-05-26  Derek Price  <address@hidden>
+
+       * configure.in: Update CVS version to 1.12.1.1.
+
+       * configure: Regenerated.
+
+2003-05-25  Derek Price  <address@hidden>
+
+       * configure.in: Update CVS version to 1.12.1.
+
+       * configure: Regenerated.
+
+2003-05-25  Derek Price  <address@hidden>
+
+       * BUGS: Note current intermittant BSDI failures.
+
+2003-05-22  Derek Price  <address@hidden>
+
+       * TODO (230): Remove this completed item.
+
+2003-05-22  Derek Price  <address@hidden>
+
+       * NEWS: Note new --with-external-zlib option.
+       * configure.in (AC_PREREQ): 2.57.
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-05-22  Larry Jones  <address@hidden>
+
+       * NEWS: Note recent administrative file changes.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * INSTALL: Mention new Automake version.
+       * NEWS: Ditto.
+
+       * Makefile.in: Regenerated.
+       * aclocal.m4: Ditto.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * configure.in: Add call to AC_GNU_SOURCE & jm_FUNC_GLIBC_UNLOCKED_IO.
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * configure.in: Add call to jm_FUNC_REALLOC.
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+       * aclocal.m4: Ditto.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * INSTALL: Using Autoconf version 2.57.
+       * NEWS: Ditto.  Reorder NEWS items to put the stuff which it is likely
+       that only developers care about last.
+       * configure: Regenerated with Autoconf 2.57.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * BUGS: Remove note about build being broken on windows.  That was
+       fixed a few commits back.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * configure.in: Add call to ACX_WITH_SYSTEM_VLIB.
+       * Makefile.am: Macro substitution for "zlib" subdir.
+       (Original patch from Anthon Pang <address@hidden>.)
+
+       * TODO (230): Add note about possible improvements to
+       ACX_WITH_EXTERNAL_ZLIB.
+       * aclocal.m4: Regenerated
+       * config.h.in: Ditto
+       * configure: Ditto
+       * Makefile.in: Ditto
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * configure.in: Add calls to support lib/malloc.c from GNULIB.
+
+       * aclocal: Regenerated.
+       * configure: Ditto.
+       * config.h.in: Ditto.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * configure.in: Add calls to support lib/lstat.c and lib/stat.c.  Add
+       m4/Makefile to AC_OUTPUT.
+
+       * aclocal: Regenerated.
+       * configure: Ditto.
+       * config.h.in: Ditto.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * Makefile.am (SUBDIRS): Add m4 subdir.
+       (ACLOCAL_AMFLAGS): Include m4 subdir when generating aclocal.m4.
+       * acinclude.m4: Remove this file, moving contents into two files in the
+       m4 subdirectory to ease maintenance.
+
+       * Makefile.in: Regenerated.
+       * aclocal.m4: Ditto.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * cvsnt.mak: added rules and dependencies for log-buffer.[c,obj],
+       socket-client.[c,obj], and rsh-client.[c,obj]
+       (Patch from Anthon Pang <address@hidden>.)
+
+2003-05-18  Larry Jones  <address@hidden>
+
+       * acinclude.m4 (CVS_FUNC_PRINTF_PTR): New test.
+       * configure.in: Use it.
+       * aclocal.m4: Regenerated.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * configure.in: Back out all the S_ISSOCK changes I just made and move
+       the equivalent to lib/system.h.
+
+       * configure.in: Regenerated.
+       * config.h.in: Ditto.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * acinclude.m4: set cvs_client_objects in order to support optional
+       compilation of src/gssapi-client.c.
+       * configure.in: AC_SUBST(cvs_client_objects).
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+       * Makefile.in: Ditto.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * configure.in: Try again, with AC_TRY_LINK this time.
+
+       * configure: Regenerated.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * configure.in: Correct a typo in my last patch.
+
+       * configure: Regenerated.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * configure.in: Add some checks for S_ISSOCK to avoid a problem on
+       SCO OpenServer 5.0.6a.
+       (Reported by Boyd Lynn Gerber <address@hidden>.)
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2003-05-07  Derek Price  <address@hidden>
+
+       * BUGS: Add rsh-client.{h,c} to the note that I probably just broke the
+       Windows build by comitting Alexey Mahotkin's patches.
+
+2003-05-06  Derek Price  <address@hidden>
+
+       * BUGS: Note that I probably just broke the Windows build by comitting
+       Alexey Mahotkin's patch.
+
+2003-05-01  Derek Price  <address@hidden>
+
+       * TODO (149): Remove reference to defunct RELATIVE_REPOS macro.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * acinclude.m4 (ACX_WITH_GSSAPI): Get rid of $includeopt, using
+       $CPPFLAGS as intended by the Autoconf folk.
+       * configure.in: Ditto.
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+       * Makefile.in: Ditto.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * acinclude.m4 (ACX_WITH_GSSAPI): Fix typo in broken conditional.
+       (Thanks to Alexey Mahotkin <address@hidden>.)
+
+       * configure: Regenerated.
+       * aclocal.m4: Ditto.
+
+2003-04-28  Derek Price  <address@hidden>
+
+       * NEWS (Changes since 1.11.5): Note removal of Checkin.prog and
+       Update.prog functionality.
+
+2003-04-10  Larry Jones  <address@hidden>
+
+       * aclocal.m4 (AM_MAINTAINER_MODE): New macro to support
+       --enable-maintainer-mode.
+       * configure.in: Use it.
+       * configure: Regenerated.
+       * Makefile.in: Regenerated.
+       * noautomake.sh: Removed; no longer needed.
+       * INSTALL: Remove reference to noautomake.sh, add reference to
+       --enable-maintainer-mode.
+       * Makefile.am: Remove noautomake.sh.
+       * NEWS: Add note about --enable-maintainer-mode and noautomake.sh.
+       * README: Remove noautomake.sh.
+
+2003-04-01  Derek Price  <address@hidden>
+
+       * BUGS: Remove a pcl-cvs bug.  pcl-cvs is no longer part of the CVS
+       source distribution.
+
+2003-04-01  Derek Price  <address@hidden>
+
+       * BUGS: Remove reference to cvs admin SEGV bug Larry Jones fixed
+       on 2003-02-19.
+
+2003-04-01  Derek Price  <address@hidden>
+
+       * BUGS: Remove obsolete bug.
+       * configure.in: Tail the BUGS file for status.
+
+       * configure: Regenerated.
+
+2003-03-31  Derek Price  <address@hidden>
+
+       * NEWS (Changes since 1.11.5): Note symlinked CVSROOT now works.
+
+2003-03-28  Derek Price  <address@hidden>
+
+       * configure.in (--with-editor): Quit with an error message when no
+       editor is found.  Allow --with-editor to override $EDITOR from the
+       user's environment.  Add vim to the list of defaults.
+
+       * configure: Regenerated.
+
+2003-03-26  Derek Price  <address@hidden>
+
+       * configure.in (--with-editor): Quit with an error message when
+       --without-editor is specified.
+       (Report from Jim Salter <address@hidden>.)
+
+       * configure: Regenerated.
+
+2003-03-24  Derek Price  <address@hidden>
+
+       * configure.in: Add copyright notice.
+       * Makefile.am: Update copyright notice.
+
+       * Makefile.in: Regenerated.
+       * configure: Ditto.
+
+2003-03-19  Mark D. Baushke  <address@hidden>
+
+       * configure.in (WITH_RSH): Add --with-rsh configure option. The
+       default is still "rsh" but it will look for "ssh" if "rsh" is not
+       found on the system.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+       * Makefile.in: Ditto.
+
+2003-03-19  Derek Price  <address@hidden>
+
+       * configure.in: AC_SUBST HAVE_PUTENV and create a dynamic config file
+       for src/sanity.sh.
+
+       * Makefile.in: Regenerated.
+       * configure: Ditto.
+
+2003-03-16  Mark D. Baushke  <address@hidden>
+
+       * NEWS (changes since 1.11.5): Mention CVSREADONLYFS environment
+       variable and new `-R' cvs global option for read-only file-system
+       repository mode.
+
+2003-03-07  Mark D. Baushke  <address@hidden>
+
+       * NEWS: (Changes since 1.11.5): Mention rcsinfo template updates.
+
+       * TESTS: Document some new global variables.
+
+       * TESTS: Remove some obsolete global variables.
+
+2003-03-07  Derek Price  <address@hidden>
+
+       * TESTS: Document some more global variables.
+
+2003-03-04  Mark D Baushke <address@hidden>
+
+       * NEWS (Changes since 1.11.5): Mention CVS_LOCAL_BRANCH_NUM
+       environment varaible.
+
+2003-02-28  Larry Jones  <address@hidden>
+
+       * TODO (206): Done in 1.11.3.
+       (226): Add comment about deadlock.
+       (228, 229): New items.
+
+2003-02-26  Derek Price  <address@hidden>
+
+       * mktemp.sh: Add copyright notice, some comments, and attempt to return
+       success and error codes.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * configure.in (WITH_KRB4): Import KRB4 patch from Redhat 8.0's CVS
+       1.11.2-5 SRPM.  It's not the right fix, but it will work until I get
+       around to merging some of the code with WITH_GSSAPI and seperating the
+       bits into separate M4 files.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * configure.in: Remove the forced nondetection of mktemp I was using
+       to test the scripts.
+
+       * configure: Regenerated.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * configure.in: Add checks for mktemp and sendmail.
+       * mktemp.sh: New file.
+
+       * Makefile.in: Regenerated.
+       * configure: Ditto.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * NEWS (Changes since 1.11.5): Mention UserAdminOptions.
+
+2003-02-06  Derek Price  <address@hidden>
+
+       * NEWS (Changes since 1.11.5): Note error message corrections and
+       documentation corrections.
+
+2003-01-31  Derek Price  <address@hidden>
+
+       * configure.in: Check for varargs.h.  Use the AC_C_PROTOTYPES macro
+       to check for handling of prototypes.
+
+       * configure: Regenerated.
+       * config.h.in: Regenerated.
+
+2003-01-31  Derek Price  <address@hidden>
+
+       * acinclude.m4 (ACX_WITH_GSSAPI): Move the checkin from 1/23 to here.
+       * configure.in: Update version to 1.12.10.1.
+
+       * aclocal.m4: Regenerated.
+       * configure: Regenerated.
+
+2003-01-30  Larry Jones  <address@hidden>
+
+       * FAQ: Update URL for tkCVS info.
+
+       * NEWS (Changes from 1.11.2 to 1.11.3): Add note about fixing watch
+       in server mode.
+
+2003-01-28  Derek Price  <address@hidden>
+
+       * INSTALL: Remove a reference to options.h.
+       (Thanks to Jenn Vesperman <address@hidden> for the report.)
+
+2003-01-28  Larry Jones  <address@hidden>
+
+       * NEWS: Update for 1.11.5, add notes about bug fixes in older
+       versions.
+
+2003-01-23  Derek Price  <address@hidden>
+
+       * aclocal.m4 (WITH_GSSAPI): Check for libcrypt before libroken to
+       satisfy a FreeBSD 4.6 dependency.
+       (Thanks to Jan Ruzicka <address@hidden> for the bug
+       report and a partial fix.)
+
+       * configure: regenerated.
+
+2003-01-20  Derek Price  <address@hidden>
+
+       * NEWS: Update the news for the last release to mention that client
+       builds are not affected by the security vulnerability.
+
+2003-01-20  Derek Price  <address@hidden>
+
+       * configure.in: Update to dev version 1.11.5.1.
+       * configure: Regenerated.
+
+2003-01-16  Derek Price  <address@hidden>
+
+       * NEWS: Add 1.11.4 entry in regards to
+       <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0015>.
+       The Common Vulnerabilities and Exposures project (cve.mitre.org)
+       has assigned the name CAN-2003-0015 to this issue.
+       * configure.in: Update to CVS version 1.11.5.
+
+       * configure: Regenerated.
+
+2002-01-16  Derek Price  <address@hidden>
+
+       * configure.in (--with-editor): Look for nano, the GNU GPL pico clone.
+       (Reported by Robin Cook <address@hidden>.)
+
+       * configure: Regenerated.
+
+2002-01-16  Derek Price  <address@hidden>
+
+       * configure.in: Update to dev version (1.11.4.1).
+       * configure: Regenerated.
+
+2002-12-28  Derek Price  <address@hidden>
+
+       * NEWS: Add since 1.11.3 entry.
+       * configure.in: Update to version 1.11.4.
+       * configure: Regenerated.
+
+2002-12-27  Derek Price  <address@hidden>
+
+       * NEWS: Add dummy entry for since 1.11.3.
+       * configure.in: Update to dev version 1.11.3.1.
+       * configure: Regenerated.
+
+2002-12-27  Derek Price  <address@hidden>
+
+       * .cvsignore: Add bz2.
+       * NEWS: Add note about options.h.
+       * configure.in: Set version to 1.11.3.
+       * cvs.spec.in: No longer need to remove config.cache between runs
+       of configure.
+
+       * configure: Regenerated.
+
+2002-12-20  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Make previous rule more like Visual Studio expects.
+
+2002-12-19  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Add lib/fnmatch.h.in -> lib/fnmatch.h rule.
+
+2002-12-19  Derek Price  <address@hidden>
+
+       * INSTALL: Remove references to options.h.
+       * cvsnt.mak: Ditto.
+       * FAQ: Ditto, plus some references to installing RCS & DIFF.  Wow.
+       That was _really_ out of date.
+       * configure.in: Define MY_NDBM here rather than in src/options.h.
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2002-12-16  Derek Price  <address@hidden>
+
+       * INSTALL: Add a platform to the tested platforms list.
+       (Thanks to Johan Vermeire <address@hidden>.)
+
+2002-12-04  Derek Price  <address@hidden>
+
+       * configure.in: Add --with switch for specifying CVS_ADMIN_GROUP.
+
+       * config.h.in: Regenerated.
+       * configure: Ditto.
+
+2002-11-21  Larry Jones  <address@hidden>
+
+       * configure.in: Add contrib/check_cvs.
+       * configure: Regenerated.
+
+2002-11-12  Derek Price  <address@hidden>
+
+       * .cvsignore: Update autom4te ignore pattern for version number
+       included in path name by new versions of autom4te.
+
+2002-10-28  Derek Price  <address@hidden>
+
+       * configure.in: Flesh out some comments in regards to Sun Interactive
+       UNIX (ISC).
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * configure.in (WITH_KRB4): Update WITH_KRB4 output to use
+       AC_MSG_CHECKING and AC_MSG_RESULT for consitency.
+       (with-editor): Update comment.
+
+       * configure: Regenerated.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * configure.in (--enable-password-authenticated-client): New option.
+       (--enable-encryption): Increase the readability of the help text.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * configure.in (enable-encryption): Move to a more sensible location
+       and print a warning if it is specified with neither the client or the
+       server enabled.
+       (--with-editor): Move to a closer resemblance to alphabetical order.
+       (enables and withs): Reformat help strings for consistency.
+       * acinclude.m4: Ditto.
+
+       * configure: Regenerated.
+       * aclocal.m4: Ditto.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * configure.in (enable-force-editor): New option.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * acinclude.m4 (ACX_WITH_GSAPI): Use AC_MSG_CHECKING & AC_MSG_RESULT
+       instead of AS_MESSAGE for consistent appearance of the output even
+       though it makes the code look a little clunky.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * INSTALL: Document --with-umask.
+       * configure.in (--with-umask): New option.
+       (--with-tmpdir): Move to something more closely resembling alphabetical
+       order of the --with- arguments.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * INSTALL: Note new Automake version.
+       * NEWS: Ditto.
+       * configure.in (AC_ISC_POSIX): Remove this obsolete call and comment
+       out some related code with an explanation.
+
+       * Makefile.in: Regenerated using Automake 1.6.3.
+       * aclocal.m4: Ditto.
+       * configure: Regenerated.
+
+2002-09-24  Larry Jones  <address@hidden>
+
+       * aclocal.m4: Remove no longer needed definition of AC_ISC_POSIX
+       from gettext-0.10.40.
+       * configure.in: Remove warnings about obsolete AC_STRUCT_ST_BLKSIZE
+       and AC_STRUCT_ST_RDEV, add check for geteuid().
+       * configure, config.h.in: Regenerated.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * TODO (227): New item.
+
+2002-09-24  Larry Jones  <address@hidden>
+
+       * configure.in (--enable-server-flow-control): Fix nonportable code.
+       * configure: Regenerated.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * INSTALL: Explain --with-tmpdir.
+       * configure.in (--with-tmpdir): New configure argument.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * INSTALL: Explain --with-editor.
+       * configure.in (--with-editor): New configure argument.
+
+       * Makefile.in: Regenerated.
+       * configure: Ditto.
+       * config.h.in: Ditto.
+
+2002-09-24  Larry Jones  <address@hidden>
+
+       * TODO (226): New item.
+
+       * configure.in: Remove PATCH_PROGRAM.
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-20  Derek Price  <address@hidden>
+
+       * INSTALL: Explain --enable-server-flow-control.
+       * configure.in (--enable-server-flow-control): New configure argument.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-20  Derek Price  <address@hidden>
+
+       * configure.in: Set PATCH_PROGRAM as possible, autodetecting with
+       a user override.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-09-20  Derek Price  <address@hidden>
+
+       * configure.in: Use AC_HELP_STRING to create pretty help strings.
+       Reformat some lines for legibility.
+       (with-krb4): Fix help strings and logging.
+
+       * configure.in: Regenerated.
+
+2002-08-16  Derek Price  <address@hidden>
+
+       * configure.in: Make CVS_BADROOT a configure option.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-08-12  Derek Price  <address@hidden>
+
+       * configure.in: Move ftruncate from AC_CHECK_FUNC to AC_REPLACE_FUNC.
+       (Symptoms reported by
+       Andrey Aristarkhov <address@hidden>.)
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2002-07-09  Larry Jones  <address@hidden>
+
+       * NEWS (Changes since 1.11.2): Note lock message times now UTC.
+
+2002-06-28  Derek Price  <address@hidden>
+
+       * INSTALL (Building [on] other platforms): Don't reference the Mac
+       README file since it has been missing for several releases.  Mention
+       the UNIXness of Mac OS X and correct references to wincvs.org to point
+       to the new cvsgui.org .
+       (Reported by Sarah Gonzales <address@hidden>.)
+
+2002-05-22  Larry Jones  <address@hidden>
+
+       * TODO (173, 202): Update to reflect current state of affairs.
+       (207): Defunct as of 1.11.2.
+
+       * NEWS (Changes from 1.11.1p1 to 1.11.2): Note new RereadLogAfterVerify
+       config option.
+
+2002-05-15  Larry Jones  <address@hidden>
+
+       * NEWS (Changes from 1.11.1p1 to 1.11.2): Note log/rlog changes.
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * configure.in: Add code to use lib/fnmatch.h.in redirection when
+       necessary to avoid namespace conflicts in #includes.
+       * configure: Regenerated.
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * TODO (215): Add note.
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * TODO (214): Clarify item.
+
+2002-05-02  Derek Price  <address@hidden>
+
+       * configure.in: Add check for fnmatch.h so we can avoid namespace
+       conflicts on systems where the fnmatch function is broken.  Not sure
+       this applies to any systems but Mac OS X.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-05-02  Derek Price  <address@hidden>
+
+       * .cvsignore: Remove config.cache and add autom4te.cache.
+
+2002-05-02  Derek Price  <address@hidden>
+
+       * noautoconf.sh: Update this script for operation with the new 
autotools.
+       * stamp-h1.in: Remove this obsolete file.
+
+2002-05-01  Derek Price  <address@hidden>
+
+       * TODO (224): Comment on this item.
+
+2002-05-01  Larry Jones  <address@hidden>
+
+       * TODO (215 - 225): New items.
+
+2002-05-01  Derek Price  <address@hidden>
+
+       * TODO (214): Add note about moving options.h options into the configure
+       script.
+       * configure.in: Remove last few references to options.h.
+       * configure: Regenerated.
+
+2002-04-30  Derek Price  <address@hidden>
+
+       * acconfig.h: Remove this file, it is deprecated.
+
+       * Makefile.am (AUTOMAKE_OPTIONS): Move these into configure.in.
+       * acinclude.m4: Some minor updates for compatibility with the new
+       Autotools, some reformatting for readability, and a minor bugfix or
+       two.
+       * configure.in: Add new AC_DEFINE arguments and replace some direct
+       assignments to LIBOBJS with calls to AC_LIBOBJ.  Call AC_INIT and
+       AM_INIT_AUTOMAKE with the new APIs.  Call AC_PACKAGE_NAME,
+       AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, and AC_PACKAGE_STRING to
+       subst/define the corresponding variables.  Call AC_CONFIG_FILES with
+       the old AC_OUTPUT args and call AC_OUTPUT without args.  Remove
+       references to version.h.
+       * cvs.spec.in: Use the new substs.
+
+       * INSTALL: Mention new versions of Automake & Autoconf.
+       * NEWS: Ditto.
+
+       * Makefile.in: Regenerated.
+       * aclocal.m4: Ditto.
+       * configure: Ditto.
+       * config.h.in: Ditto.
+
+2002-04-28  Derek Price  <address@hidden>
+
+       * TODO (208, 209, 210, 211, 212, 213): New items.
+
+2002-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Set LIBOBJ for fnmatch.c and fnmatch.h using the
+       correct functions.  Add checks for some functions whose names conflict
+       with functions on Mac OS X 10.1 with the most recent dev packages.
+       This should be removable after the Mac dev packages are fixed.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2002-04-18  Derek Price  <address@hidden>
+
+       * NEWS: Add a dummy entry so automake will let me update the version.
+       * configure.in: Update the version number.
+       * configure: Regenerated.
+
+2002-04-17  Derek Price  <address@hidden>
+
+       * configure.in: Update version number.
+       * configure: Regenerated.
+
+2002-04-03  Derek Price  <address@hidden>
+
+       * cvs.spec.in: Use a lowercase "cvshome.org".  Add some RedHat safety
+       features to avoid "rm -rf /".  No need to rebuild the docs in the
+       distribution.  Don't strip the binary.
+
+2002-03-26  Derek Price  <address@hidden>
+
+       * configure.in: Add a FIXME comment.
+
+2002-03-21  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerate with recent version of Autoconf.  It looks
+       like things changed because of some RedHat patches or the like which
+       didn't change the Autoconf version number, but the differences look
+       like useful changes so I'm going to use them for consistency.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+
+2002-03-19  Larry Jones  <address@hidden>
+
+       * NEWS (Changes since 1.11.1p1): Note -S flag for [r]log.
+
+2002-02-08  Larry Jones  <address@hidden>
+
+       * NEWS (Changes since 1.11.1p1): Note read-only tag fix.
+
+2002-02-01  Larry Jones  <address@hidden>
+
+       * NEWS (Changes from 1.9 to 1.10): Note -t/-f wrappers disabled.
+
+2001-12-12  Larry Jones  <address@hidden>
+
+       * NEWS (Changes from 1.10 to 1.11): Note update -C.
+
+2001-12-03  Larry Jones  <address@hidden>
+
+       * TODO (206, 207): New items.
+
+       * NEWS (Changes since 1.11.1p1): Note -F flag for [r]annotate.
+       (Changes from 1.11 to 1.11.1): Note :: for log.
+
+2001-10-18  Derek Price  <address@hidden>
+
+       * TESTS: Remove outdated note about tests that don't use the dotest
+       function and add some notes on writing tests.
+       * HACKING: Reference TESTS file in note about submitting test cases
+       with patches.
+
+2001-09-28  Larry Jones  <address@hidden>
+
+       * noautomake.sh: Protect wildcards from shell expansion.
+       (Patch submitted by Stephen Cameron <address@hidden>.)
+
+2001-09-22  Derek Price  <address@hidden>
+
+       * INSTALL (Building from source code under Unix): Continue
+       noautoconf.sh note, stressing source checked out from CVS.
+
+2001-09-22  Derek Price  <address@hidden>
+
+       * noautomake.sh: Correct usage.
+
+2001-09-13  Derek Price  <address@hidden>
+
+       * Makefile.am (AUTOMAKE_OPTIONS): Updated to require Automake 1.5.
+       * NEWS (Changes since 1.11.1p1): Added note about standardizing on
+       Automake 1.5.
+       * INSTALL (Building from source code under UNIX): It's Automake version
+       `1.5', not `2.5'.
+       (Detailed information about your interaction with "configure"): Added
+       note about using `configure --help'.
+       * README (Installation): Add noautoconf.sh to the list of build and
+       installation commands.
+
+       * Makefile.in: Regenerated.
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with automake 1.5.
+       * aclocal.m4: Ditto.
+       * configure: Ditto.
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * INSTALL (Building from source code under UNIX): Add a comment about
+       the noautomake.sh script and autotool versions.
+
+2001-08-20  Derek Price  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Add src/version.h.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * configure: Regenerated.
+
+2001-08-20  Derek Price  <address@hidden>
+
+       * .cvsignore: Add cvs.spec.
+
+2001-08-14  Derek Price  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Add cvs.spec.
+       * Makefile.am (EXTRA_DIST): Remove cvs.spec.in and cvs.spec.
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * cvs.spec.in: Use @PACKAGE@ from configure.
+       * cvs.spec: Remove this file.
+
+       * configure: Regenerated.
+       * Makefile.in: Ditto.
+
+2001-08-14  Derek Price  <address@hidden>
+
+       * DEVEL-CVS: Update mailing list addresses.
+       * HACKING: Ditto.
+
+2001-08-09  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Add entry for annotate.c.
+
+2001-08-07  Derek Price  <address@hidden>
+
+       * build.com: correct name of build .com for zlib.
+       (Patch from Mike Marciniszyn <address@hidden>.)
+
+2001-08-06  Derek Price  <address@hidden>
+
+       * configure.in: Remove some redundant macros (they appear to be run
+       automatically by AC_INIT).
+
+       * configure: Regenerated.
+
+2001-08-06  Derek Price  <address@hidden>
+
+       * configure.in: Add AC_EXEEXT to get things right when under Windows.
+       (Report and patch from address@hidden)
+
+       * configure.in: Reorder some macros to prevent Autoconf warnings.
+
+       * configure: Regenerated.
+       * Makefile.in: Ditto.
+
+2001-07-26  Larry Jones  <address@hidden>
+
+       * NEWS: Fix format, add note about tag -B.
+
+2001-07-16  Derek Price  <address@hidden>
+
+       * compile: New Automake file.
+       * configure.in: Add AM_PROG_CC_C_O to work around problems with some
+       compilers.
+
+       * aclocal.m4: Regenerated.
+       * Makefile.in: Ditto.
+       * config.h.in: Ditto.
+       * configure: Ditto.
+       (Thanks to Stephen Cameron <address@hidden> and
+       Tom Tromey <address@hidden>.)
+
+2001-07-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new Automake release candidate 1.4h.
+       * aclocal.m4: Ditto.
+
+2001-07-04  Derek Price  <address@hidden>
+
+       * configure.in: Tidy and add some comments.
+
+       * configure: Regenerated.
+
+2001-07-03  Derek Price  <address@hidden>
+
+       * HACKING (Source): Add a note about where to obtain the development
+       sources.
+       (Thanks to Bear Giles <address@hidden>.)
+
+2001-07-03  Derek Price  <address@hidden>
+
+       * configure.in: Test for mmap.
+
+       * configure: Regenerated.
+       * config.h.in: Ditto.
+
+2001-06-28  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new version of Automake.
+       * aclocal.m4: Ditto.
+       * configure: Regenerated.
+
+2001-06-28  Derek Price  <address@hidden>
+
+       * mdate-sh: New file to support doc/version.texi.
+
+2001-06-27  Larry Jones  <address@hidden>
+
+       * TESTS: Note environment variables to select certain tools,
+       potential problems with big environments.
+
+       * TODO: Add note about non-canonical paths.  Reformat long lines.
+
+       * NEWS (Changes since 1.11): Note new loginfo format string expansion.
+       Reformat some long lines.
+
+2001-06-11  Derek Price  <address@hidden>
+
+       * cvsnt.dsp: Add src/annotate.c to source file list.
+       (Thanks to Jerzy Kaczorowski <address@hidden>.)
+
+2001-05-30  Derek Price  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Change contrib/pvcs2cvs to contrib/pvcs2rcs.
+
+       * configure: Regenerated.
+
+2001-05-29  Derek Price  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Add pvcs2cvs.
+
+       * configure: Regenerated.
+
+2001-05-21  Derek Price  <address@hidden>
+
+       * NEWS (Changes since 1.11): It's "noautomake.sh", not "noautoconf.sh".
+       * Makefile.am (EXTRA_DIST): Include noautomake.sh.
+       (AUTOMAKE_OPTIONS): Update required Automake version to 1.4e.
+       (Reported by Alexey Mahotkin <address@hidden>).
+
+2001-05-21  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add noautoconf.sh.
+
+2001-05-17  Larry Jones  <address@hidden>
+
+       * depcomp: Yet another newer (unofficial) version from Automake.
+
+2001-05-10  Larry Jones  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Remove -f from chmod -- not portable.
+       * configure: Regenerated.
+
+2001-05-03  Derek Price  <address@hidden>
+
+       * TODO (204): New item.
+
+2001-05-02  Derek Price  <address@hidden>
+
+       * acinclude.m4 (ACX_WITH_GSSAPI): Make krb5.h a requirement for GSSAPI.
+       krb5.h shouldn't be required, but CVS's GSSAPI implementation is
+       broken.
+       (Reported by Stephen Rasku  <address@hidden>.)
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+
+2001-04-29  Derek Price  <address@hidden>
+
+       * Makefile.am (distcheck-hook): Undo last change.
+       (localcheck): New target.
+
+       * Makefile.in: Regenerated.
+
+2001-04-29  Derek Price  <address@hidden>
+
+       * Makefile.am: Add remotecheck to distcheck-hook.
+
+       * Makefile.in: Regenerated.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * TODO (202): Remove my claim.
+       (203): New item.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Update version number.
+
+       * configure: Regenerated.
+       * cvs.spec: Ditto.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * configure.in: Update version number.
+       * NEWS (new since 1.11.1): Broke read-only fix.
+       (new since 1.11): Diff fix.
+
+       * configure: Regenerated.
+       * cvs.spec: Ditto.
+
+2001-04-26  Derek Price  <address@hidden>
+
+       * cvs.spec.in: Don't include %{_infodir}/dir.
+       (krb5): Remove krb5-config from dependencies.
+
+       * cvs.spec: Regenerated.
+
+2001-04-25  Derek Price  <address@hidden>
+
+       * configure.in: Update version to 1.11.1.
+
+       * Makefile.in: Regenerated with AM 1.4e as of today at 18:10 -0400
+       (EDT).
+       * aclocal.m4: Ditto.
+       * configure: Ditto.
+
+2001-04-25  Derek Price  <address@hidden>
+
+       * NEWS: Correct punctuation.
+
+2001-04-25  Larry Jones  <address@hidden>
+
+       * depcomp (aix, sgi): Correct previous fixes.
+
+2001-04-24  Larry Jones  <address@hidden>
+
+       * depcomp (sgi): Remove stray HP-UX code.
+
+2001-04-18  Derek Price  <address@hidden>
+
+       * noautoconf.sh: New shell script to touch Makefile.in files and
+       prevent unecessary AUtomake rebuilds after updates.
+       * NEWS: Note this new scipt.
+
+2001-04-16  Larry Jones  <address@hidden>
+
+       * depcomp (aix): Remove stray HP-UX code.
+
+2001-04-12  Larry Jones  <address@hidden>
+
+       * mkinstalldirs: Newer version from Automake.
+
+2001-04-12  Larry Jones  <address@hidden>
+
+       * depcomp: Newer version from Automake.
+
+2001-04-04  Larry Jones  <address@hidden>
+
+       * depcomp: Don't count on $? being set in then or else clauses.
+
+2001-03-30  Larry Jones  <address@hidden>
+
+       * NEWS: Note new rlog and rannotate commands.
+
+2001-03-14  Derek Price  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Look for gettimeofday.
+
+       * config.h.in: Regenerated:
+       * configure: Ditto.
+       * stamp-h1.in: Ditto.
+
+2001-03-14  Derek Price  <address@hidden>
+
+       New version of Automake (1.4e).  With luck it works with the quirky BSD
+       Make.
+
+       * aclocal.m4: Regenerated.
+       * configure: Ditto.
+       * Makefile.in: Ditto.
+       * stamp-h1.in: Ditto.
+
+2001-02-28  Derek Price  <address@hidden>
+
+       * acinclude.m4 (ACX_WITH_GSSAPI): Move the -L linker option back into
+       LIBS where it should be.  LDFLAGS is a user variable.
+
+       * aclocal.m4: Regenerated.
+       * configure: Regenerated.
+
+2001-02-23  Derek Price  <address@hidden>
+
+       * configure.in: Comment definition of PR_PROGRAM.
+
+       * configure: Regenerated.
+
+2001-02-22  Derek Price  <address@hidden>
+           Pavel Roskin  <address@hidden>
+
+       * configure.in: Define PR_PROGRAM if `pr' has been found.
+
+       * config.h.in: Regenerated.
+       * configure: Regenerated.
+
+2001-02-20  Derek Price  <address@hidden>
+
+       * acconfig.h (HAVE_GSSAPI): Removed.  Entries in acconfig.h aren't
+       necesary when the full functionality of AC_DEFINE is used.
+       (HAVE_GSS_C_NT_HOSTBASED_SERVICE): Ditto.
+       * acinclude.m4 (ACX_WITH_GSSAPI): New file with GSSAPI configure code.
+       * configure.in: Use ACX_WITH_GSSAPI instead of writing GSSAPI code in
+       place.
+
+       * aclocal.m4: Regenerated.
+       * config.h.in: Regenerated.
+       * configure: Regenerated.
+
+2001-02-15  Derek Price  <address@hidden>
+
+       * configure: Regenerated without beta automake macros.
+
+2001-02-14  Derek Price  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Alphebetize & reorganize.  Add
+       cascading search for nanosleep, usleep, & select, in that order.
+       * config.h.in: Regenerated.
+       * configure: Regenerated.
+       * cvsnt.mak: List xtime.h & xselect.h dependancies.
+
+2001-02-14  Larry Jones  <address@hidden>
+
+       * cvsnt.dsp: Remove references to rtag.c & rtag.obj.
+       * cvsnt.mak: Ditto.
+
+2001-02-13  Derek Price  <address@hidden>
+
+       * TODO: Add note about merging rdiff & diff.
+
+2001-02-13  Derek Price  <address@hidden>
+
+       * TODO: Add note about cvs_temp_file.
+
+2001-02-07  Derek Price  <address@hidden>
+
+       * cvs.spec.in (build): Remove the info 'dir' file so it doesn't get
+       installed accidentally.
+       (post): Install info files _into_ system dir file
+       (preun): uninstall info files from dir file
+       * cvs.spec: regenerated
+
+2001-01-31  Derek Price  <address@hidden>
+
+       * TODO: Add a note about 'cvs add' w/o write access
+
+2001-01-29  Derek Price  <address@hidden>
+
+       * NEWS: Rewrite the comment on the new ~/.cvspass functionality
+       * TODO: Add a note about testing login/logout
+
+2001-01-29  Derek Price  <address@hidden>
+
+       * configure.in: Rewrite args to AC_TRY_COMMAND in a form that is
+       acceptable to both Autoconf 1.13 and the new 1.49 beta.
+
+       * configure: regenerated
+
+2001-01-29  Larry Jones  <address@hidden>
+
+       * configure.in: Check for syslog.h.
+       * configure, config.h.in: Regenerated.
+
+2001-01-17  Derek Price  <address@hidden>
+
+       * configure.in: add machinery to check for the BSD VPATH bug
+       and check for texi2dvi.
+       * doc/Makefile.am: use the machinery
+       * diff/Makefile.in: changes to support 'make dist' from a build dir
+       * emx/Makefile.in: changes to support 'make dist' from a build dir
+       * os2/Makefile.in: changes to support 'make dist' from a build dir
+       * zlib/Makefile.in: changes to support 'make dist' from a build dir
+
+       * Makefile.in: regenerated
+       * aclocal.m4: regenerated
+       * configure: regenerated
+       * contrib/Makefile.in: regenerated
+       * doc/Makefile.in: regenerated
+       * lib/Makefile.in: regenerated
+       * man/Makefile.in: regenerated
+       * src/Makefile.in: regenerated
+       * tools/Makefile.in: regenerated
+       * vms/Makefile.in: regenerated
+       * windows-NT/Makefile.in: regenerated
+       * windows-NT/SCC/Makefile.in: regenerated
+
+2001-01-10  Derek Price  <address@hidden>
+           Rex Jolliff  <address@hidden>
+
+       * NEWS (new since 1.11): Add comment about VMS wildcards
+
+2001-01-05  Derek Price  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Move some script targets here
+       * contrib/Makefile.am (EXTRA_DIST, SUFFIXES, .pl:, .csh:): Move some
+       script targets to configure.in
+       * src/Makefile.am (cvsbug, cvsbug_EXTRA_DIST, EXTRA_DIST): move cvsbug
+       target to configure.in
+
+       * aclocal.m4: Regenerated due to change in Automake installation
+
+       * Makefile.in: Regenerated
+       * configure: ditto
+       * contrib/Makefile.in: ditto
+       * doc/Makefile.in: ditto
+       * lib/Makefile.in: ditto
+       * man/Makefile.in: ditto
+       * src/Makefile.in: ditto
+       * tools/Makefile.in: ditto
+       * vms/Makefile.in: ditto
+       * windows-NT/Makefile.in: ditto
+       * windows-NT/SCC/Makefile.in: ditto
+
+       * cvs.spec: updated timestamp
+       * stamp-h1.in: ditto
+       * doc/CVSvn.texi: ditto
+       * src/stamp-h2.in: ditto
+       * src/version.c: ditto
+
+       * contrib/clmerge.in: Rename from clmerge.pl
+       * contrib/cln_hist.in: Rename from cln_hist.pl
+       * contrib/commit_prep.in: Rename from commit_prep.pl
+       * contrib/cvs_acls.in: Rename from cvs_acls.pl
+       * contrib/log.in: Rename from log.pl
+       * contrib/log_accum.in: Rename from log_accum.pl
+       * contrib/mfpipe.in: Rename from mfpipe.pl
+       * contrib/rcslock.in: Rename from rcslock.pl
+       * contrib/sccs2rcs.in: Rename from scc2rcs.csh
+       * src/cvsbug.in: Rename from cvsbug.sh
+
+       * contrib/clmerge.pl: Rename to clmerge.in
+       * contrib/cln_hist.pl: Rename to cln_hist.in
+       * contrib/commit_prep.pl: Rename to commit_prep.in
+       * contrib/cvs_acls.pl: Rename to cvs_acls.in
+       * contrib/log.pl: Rename to log.in
+       * contrib/log_accum.pl: Rename to log_accum.in
+       * contrib/mfpipe.pl: Rename to mfpipe.in
+       * contrib/rcslock.pl: Rename to rcslock.in
+       * contrib/sccs2rcs.csh: Rename to sccs2rcs.in
+       * src/cvsbug.sh: Rename to cvsbug.in
+
+2001-01-03  Derek Price  <address@hidden>
+
+       * Makefile.am (remotecheck): depend on 'all'
+       * Makefile.in: regenerated
+
+2001-01-03  Derek Price  <address@hidden>
+
+       * Makefile.in (DEP_FILES): Regenerated with new version of Automake
+       (DEP_FILES_conditional patch for BSD make compatibility)
+       * contrib/Makefile.in: ditto
+       * doc/Makefile.in: ditto
+       * lib/Makefile.in: ditto
+       * man/Makefile.in: ditto
+       * src/Makefile.in: ditto
+       * tools/Makefile.in: ditto
+       * vms/Makefile.in: ditto
+       * windows-NT/Makefile.in: ditto
+       * windows-NT/SCC/Makefile.in: ditto
+
+2000-12-28  Derek Price  <address@hidden>
+
+       * INSTALL (BUILDING FROM SOURCES): Added a couple more platforms to the
+       build and test list.
+       (Building ... under Unix): Added note about BSD make and
+       --disable-dependency-tracking
+       (Building ... under Windows ...): Added note about using MSVC++ 6.0
+       (Building [on] other platforms): Added note about wincvs.org and
+       cvsnt.org.  Added more complete note about BSD make and
+       --disable-dependency-tracking than the above
+
+2000-12-27  Derek Price  <address@hidden>
+
+       * NEWS: Fix comments about the changes to ~/.cvspass
+
+2000-12-26  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add cvs.spec.in
+       (cvs.spec): new target
+       * Makefile.in: Regenerated
+       * aclocal.m4: update timestamp
+       * configure: Regenerated
+       * configure.in (AC_OUTPUT): Remove cvs.spec, doc/CVSvn.texi,
+       & src/version.c
+       * stamp-h1.in: update timestamp
+       * contrib/Makefile.in: ditto
+       * lib/Makefile.in: ditto
+       * man/Makefile.in: ditto
+       * tools/Makefile.in: ditto
+       * vms/Makefile.in: ditto
+       * windows-NT/Makefile.in: ditto
+       * windows-NT/SCC/Makefile.in: ditto
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Stretched
+       * configure: Regenerated
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * aclocal.m4: Regenerated due to Automake update
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated
+       * aclocal.m4: Regenerated due to a change to AM_PROG_ETAGS
+       * configure: Regenerated
+
+2000-12-21  Derek Price  <address@hidden>
+
+       * .cvsignore: removed newly unused files, added new stamp file,
+       and alphabetized.
+       * AUTHORS: Added this file to please Automake.  Apparently, its
+       presence is mandated by the GNU coding standards.
+       * Makefile.am: New file needed by Automake
+       * Makefile.in: Regenerated
+       * NEWS: Add a comment about the Automake conversion
+       * aclocal.m4: Added this file for Automake
+       * config.h.in: Regenerated
+       * configure: Regenerated
+       * configure.in: Some changes to support Automake and support for
+       missing roff & ps2pdf programs.
+       * cvs.spec: Regenerated
+       * cvs.spec.in: New file leveraging Automake support
+       * depcomp: New Automake file
+       * install-sh: Newer version from Automake
+       * missing: New Automake file
+       * mkinstalldirs: Newer version from Automake
+       * stamp-h.in: Remove unused file
+       * stamp-h1.in: New Automake generated stamp file
+
+2000-11-30  Derek Price  <address@hidden>
+           Stephen Kennedy  <address@hidden>
+
+       * cvs.spec (krb5): Require krb5-devel for a build of the krb5 target
+
+2000-11-29  Derek Price  <address@hidden>
+           Stephen Kennedy  <address@hidden>
+
+       * cvs.spec (build, post, preun): remove an old, commented out
+       line and replace hardcoded paths with _infodir and _bindir as
+       appropriate
+       (files): replace file list with more generic and succinct one
+
+2000-11-15  Derek Price  <address@hidden>
+
+       * TODO (198): added note about deprecating cvs_temp_name
+       * configure.in (AC_CHECK_FUNCS): added mkstemp to support
+       new cvs_temp_file function.
+       * config.h.in: regenerated
+       * configure: regenerated
+
+2000-11-08  Larry Jones  <address@hidden>
+
+       * configure.in: Check for getgroups function.
+       * configure, config.h.in: Regenerated.
+
+2000-11-07  Larry Jones  <address@hidden>
+
+       * Makefile.in (FLAGS_TO_PASS): Add INSTALL, INSTALL_DATA, and
+       INSTALL_PROGRAM.
+       (Reported by Christian Brechbuehler <address@hidden>.)
+
+2000-11-03  Derek Price  <address@hidden>
+
+       * cvs.spec (build): pass in --without-gssapi when configuring the main
+       package so that the Kerberized version of CVS doesn't get built when
+       the user happens to have Kerberos installed in the default location.
+
+2000-10-31  Derek Price  <address@hidden>
+
+       * NEWS: Mention zlib was updated to 1.1.3.
+
+2000-10-30  Derek Price  <address@hidden>
+
+       * cvs.spec: Fixed trapping for gssapi so that the RPM can be built
+       on a machine without Kerberos.  Should now build standard RPM on a
+       machine without Kerberos and the standard RPM + the Kerberos RPM on
+       a machine with the Kerberos devel libraries.
+
+2000-10-26  Larry Jones  <address@hidden>
+
+       * configure.in: Get path to pr for diff.
+       (Patch submitted by Urs Thuermann <address@hidden>.)
+       * configure: Regenerated.
+
+2000-10-18  Derek Price  <address@hidden>
+
+       * .cvsignore: Added .fname & .version, two temporary files used in spec
+       file creation.
+       * Makefile.in (distclean-local): clean .fname & .version
+       * cvs.spec: Replaced with a new version based on RedHat 6.2's spec file
+       for cvs 1.10.7.  Edited heavily to include a krb5 subpackage for the
+       gssapi binary and fixed RedHat's info and man file placement.
+
+2000-10-17  Derek Price  <address@hidden>
+
+       * NEWS: added a comment about the new CVSROOT format for pserver.
+
+2000-10-17  Derek Price  <address@hidden>
+
+       * NEWS: added a comment about the new format of ~/.cvspass
+
+2000-10-09  Derek Price  <address@hidden>
+
+       * cvsnt.mak: Some minor changes to allow CVS to compile correctly
+       under NT and Visual C++ 6.0.
+
+2000-09-07  Larry Jones  <address@hidden>
+
+       * Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
+       from autoconf.
+
+       * acconfig.h: Copy HAVE_CRYPT, HAVE_GETSPNAM, REGEX_MALLOC, and
+       _REGEX_RE_COMP from config.h.in to here, where they should have
+       been in the first place.
+       * config.h.in: Regenerated.
+
+2000-08-30  Larry Jones  <address@hidden>
+
+       * NEWS: Note additional history enhancements.
+
+2000-08-01  Larry Jones  <address@hidden>
+
+       * configure.in, config.h.in: Add check for getpassphrase (Solaris).
+       * configure: Regenerated.
+
+2000-07-11  Larry Jones  <address@hidden>
+
+       * configure.in, config.h.in: Add checks for mknod() and st_rdev
+       since some systems (notably Plan 9) don't have them.
+       * configure: Regenerated.
+
+2000-07-10  Larry Jones  <address@hidden>
+
+       * NEWS: Note the new "version" command.
+
+2000-07-06  Larry Jones  <address@hidden>
+
+       * NEWS: Note that admin -t works in client/server.
+
+2000-06-19  Larry Jones  <address@hidden>
+
+       * configure.in (AC_DEFINE): Define REGEX_MALLOC and _REGEX_RE_COMP
+       to configure lib/regex.c the way we want without messing with the
+       code.
+       * config.h.in: Ditto.
+       * configure: Regenerated.
+
+2000-05-16  Jim Kingdon  <address@hidden>
+
+       * TODO (186): Remove paragraph about Eric Raymond's interest.
+       This is still on the future projects on his site, it just seems to
+       brief (and too long ago updated) that I don't really see the need
+       to mention it.
+
+2000-05-05  Larry Jones  <address@hidden>
+
+       * TESTS: Add notes about required tools and where to get them.
+
+2000-05-02  Donald Sharp <address@hidden>
+       and Larry Jones  <address@hidden>
+
+       * NEWS: Note history output format change.
+
+2000-02-17  Larry Jones  <address@hidden>
+
+       * NEWS: Note that PreservePermissions is disabled.
+       * configure.in: Don't define PRESERVE_PERMISSIONS_SUPPORT.
+       * configure: Regenerated.
+
+2000-02-01  Larry Jones  <address@hidden>
+
+       * configure.in: Try again to handle systems that need both libsocket
+       and libnsl.
+       * configure: Regenerated.
+
+1999-12-09  Larry Jones  <address@hidden>
+
+       * configure.in: Correctly handle systems that need both libsocket
+       and libnsl.
+       * configure: Regenerated.
+
+1999-12-06  Larry Jones  <address@hidden>
+
+       * configure.in: Update to autoconf 2.13; use new AC_SEARCH_LIBS
+       to handle getspnam, connect, gethostbyname, and crypt correctly;
+       use new AC_FUNC_FNMATCH instead of doing it by hand.
+       * configure: Regenerated with autoconf 2.13.
+
+1999-12-06  Larry Jones  <address@hidden>
+
+       * INSTALL (Tested platforms): Update info.
+
+1999-11-04  Jim Kingdon  <http://developer.redhat.com/>
+
+       * README (Installation): Yet another prep.ai.mit.edu -> gnu.org
+       change (can't believe we still haven't gotten them all).
+
+1999-11-04  Karl Fogel  <address@hidden>
+
+       * NEWS: added item about anon cvs no longer needing password.
+
+1999-10-28  Larry Jones  <address@hidden>
+
+       * TESTS: Add note about not running as root.  Remove note about
+       Solaris sort since sanity.sh was changed to avoid the problem.
+
+1999-07-12  Larry Jones  <address@hidden>
+
+       * TESTS: Remove suspicion that setting LC_COLLATE has fixed the
+       problem with Solaris sort -- people are still reporting it.
+
+1999-05-17  Jim Kingdon  <http://www.cyclic.com>
+
+       (These changes were run by devel-cvs; feedback was "They look fine"
+       from Jim Meyering and "I concur" from Noel Cragg).
+       * HACKING (Submitting patches): Rewrite parts to try to sketch out
+       a process which is less centralized and hopefully describes the
+       status quo better (for example, I've mostly removed the word
+       "submit" because it describes a process of sending your patch to a
+       central authority rather than to whoever wants it).  Update to
+       reflect some of the current practices/thinking regarding quality
+       and other matters.  Try to be more concise where feasible.
+
+1999-05-13  Jim Kingdon  <http://www.cyclic.com>
+
+       * BUGS: Remove item about RELATIVE_REPOS not working with
+       client/server CVS; it must have been fixed because the testsuite
+       is working fine with RELATIVE_REPOS.
+
+1999-05-07  Jim Kingdon  <http://www.cyclic.com>
+
+       * TESTS: Add note about send-expect style interaction.
+
+1999-04-26  Jim Kingdon
+
+       * cvsnt.mak: Revert to the version before today's changes
+       (modulo one "because the IDE feels like it" change).  I
+       couldn't get O'Connor's cvsnt.mak to work with MSVC 4.0 at
+       all (I tried the IDE, which tried to wrap the makefile and
+       wouldn't build even with the wrap, and the command line NMAKE).
+       * .cvsignore: Add back cvsnt.mdp WinDebug WinRel, accordingly.
+
+1999-04-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * Makefile.in (DISTFILES): Add cvsnt.dsw.
+
+1999-04-26 (submitted 1999-03-24) John O'Connor  <address@hidden>
+
+       * cvsnt.dsw: new file.  The workspace file used by MSVC 5+ to
+       manage multiple projects.  It contains three projects: cvsnt,
+       zlib and diff.
+
+       * cvsnt.dsp: Fixed problem where CVS wouldn't build because of
+       file name conflicts.  Removed all the files from zlib and diff
+       directories and moved to separate project files.
+
+       * cvsnt.mak: Re-generated due to the changes in cvsnt.dsp.
+
+       * .cvsignore: Removed un-used entries related to MSVC.  Added
+       entries to cover all files generated by the NT build: *.ncb,
+       *.opt, *.plg, Debug and Release.
+
+1999-04-09  Jim Kingdon  <http://www.cyclic.com>
+
+       * HACKING: Add a sentence about sending patches somewhere other
+       than bug-cvs, while still granting permission for people to use
+       them under the GPL.
+
+1999-04-08  Jim Kingdon  <http://www.cyclic.com>
+
+       * configure.in (AC_OUTPUT): Remove macintosh/Makefile (overlooked
+       in change of 1999-02-26; thanks to Erik Bertelsen for reporting it).
+       * configure: Regenerated.
+
+1999-02-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * macintosh: Remove this subdirectory and all its contents.  It
+       contained MacCVS 2.x, but pretty much everyone has moved on to
+       MacCVS 3.x, MacCVS Pro, or MacCVSClient.
+       * Makefile.in (SUBDIRS): Remove macintosh.
+
+1999-02-25  Mehul N. Sanghvi (and Jim Kingdon)
+
+       * INSTALL: Add MkLinux on PowerPC.
+
+1999-02-18  Jim Kingdon
+
+       * cvsnt.mak: Remove vasprintf.  Plus of course the usual
+       "because the IDE feels like it" changes.
+
+1999-02-09  Jim Kingdon  <http://www.cyclic.com>
+
+       * configure.in (AC_REPLACE_FUNCS): Remove vasprintf; see
+       lib/ChangeLog for rationale.
+       * configure: Regenerated.
+
+1999-01-31  Assar Westerlund of sics.se
+           and Jim Kingdon
+
+       * configure.in: The GSSAPI code in CVS requires krb5.h which
+       Solaris 2.7 doesn't have.  Check for it.
+       * configure: Regenerated.
+
+1999-01-12  Jim Kingdon  <http://www.cyclic.com>
+
+       * COPYING, COPYING.LIB: Remove obsolete snail address of the Free
+       Software Foundation.
+
+1998-12-01  Jim Kingdon
+
+       * TODO (195): Check in a few clarifications from Andrew Tridgell,
+       the rsync author.
+
+1998-11-11  Jim Kingdon
+
+       * HACKING: Change prep.ai.mit.edu to gnu.org.
+
+1998-10-26  Jim Kingdon
+
+       * INSTALL: Add information for Sequent DYNIX/ptx4.0, from a report
+       by Marco Franzen.
+
+1998-10-14  Jim Kingdon
+
+       * configure.in (AC_OUTPUT): Remove contrib/elib/Makefile.
+       * configure: Regenerated using autoconf 2.10.
+
+1998-10-13  Jim Kingdon
+
+       * TODO (149): Update since -d doesn't rewrite CVS/Root any more.
+
+1998-10-03  Jim Kingdon  <address@hidden>
+
+       * TODO (31): Mention the ,foo.c, and SIGINT issue.
+
+1998-09-25  Jim Kingdon  <address@hidden>
+
+       * FAQ: Update from FAQ-O-Matic.  This features fewer blank lines
+       and a few more minor formatting changes (not sure whether the
+       FAQ-O-Matic changed or whether this is because I upgraded Lynx).
+       I read through the diffs, and the real changes are: (A) In
+       /Advanced_Topics_/Setting_up_and_Manag/, #1, describe "cvs init",
+       don't describe committing modules file twice
+       (no longer needed now that mkmodules is not a separate program),
+       don't mention "cvs import" here. (B)
+       /Advanced_Topics_/Setting_up_and_Manag/, #5, describe special
+       issues with pserver and repository permissions,
+       (C), /Advanced_Topics_/Tricks_of_the_Trade/, renumber the question
+       "Why do timestamps sometimes get set to the date of the revision"
+       from #17 to #9.  Renumber the questions between #9 and #17
+       accordingly, (D) /User_Tasks_/Less_Common_User_Tas/, "8. How do I
+       split a file into pieces, retaining revision histories?", include
+       a script which may help with this, (E)
+       /What_is_CVS_/How_does_CVS_differ_/, correct the name of SABLIME,
+       (F) /What_is_CVS_/Where_do_I_find_CVS_/, "2. Is there an archive
+       of CVS material?", note that http://www.delos.com/cvs doesn't
+       exist any more.
+
+       * NEWS: Mention :fork:.
+
+1998-09-24  Jim Kingdon  <address@hidden>
+
+       * INSTALL (Tested platforms): Update SCO OpenServer information,
+       from a report by Robert address@hidden
+
+1998-09-22  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add items about multiple roots and -d not updating
+       CVS/Root.
+
+1998-09-09  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Remove tools/pcl-cvs/Makefile.
+       * configure: Regenerated using autoconf 2.10.
+
+1998-09-07  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add item about LockDir.
+
+1998-08-31  Jim Kingdon  <address@hidden>
+
+       * INSTALL (Tested platforms): Add Solaris x86 (reported by Jeremy of
+       exit109.com) and Irix 6.4 (reported by Russ Allbery).
+
+       * INSTALL (Tested platforms): Add Solaris 2.6 (reported by Russ
+       Allbery).
+
+1998-08-28  Noel Cragg  <address@hidden>
+
+       * TODO (196): new item.
+
+1998-08-26  Jim Kingdon  <address@hidden>
+
+       * TESTS: Update comments concerning Solaris sort and LC_COLLATE.
+
+1998-08-17  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update Irix, Ultrix, and NetBSD/Alpha with test results
+       from Noel.
+
+1998-08-14  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Add NetBSD/mac68k (reported by Hauke Fath of melog.de).
+       Add alpha-dec-osf4.0 and update SunOS and linux entries (reported
+       by Jim Kingdon and Noel Cragg).
+
+1998-08-06  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update for SCO OpenServer 5 (reported by Jeffery
+       Cann).
+
+1998-08-01  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Add Unixware 7 (reported by Phillip Porch).
+
+1998-07-29  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: For rcscmds.c, also include files from the diff
+       directory.  Plus of course the usual voluminous "because Visual
+       C++ 4.0 feels like it" changes.
+
+Tue Jul 28 22:16:48 1998  Noel Cragg  <address@hidden>
+
+       * Makefile.in (dist): unset the GZIP shell variable before calling
+       gzip to avoid invocation problems.
+
+Sun Jul 26 16:22:21 1998  Noel Cragg  <address@hidden>
+
+       * NEWS: add info about TopLevelAdmin.
+
+1998-07-20  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update entries for HPUX and AIX (based on a submission
+       from Andreas Ley).
+
+1998-06-25  Jim Kingdon  <address@hidden>
+
+       * README.VMS: We generally don't need GNU patch any more.
+
+1998-06-03  Jim Kingdon  <address@hidden>
+
+       * TESTS: Don't mention the version of Solaris; Mark Borges says
+       that it applies to Solaris 2.5 as well as 2.6.
+
+1998-06-02  Assar Westerlund  <address@hidden>
+
+       * configure.in: Test for GSS_C_NT_HOSTBASED_SERVICE in gssapi.h.
+       * acconfig.h: Add undef for HAVE_GSS_C_NT_HOSTBASED_SERVICE.
+       * configure, config.h.in: Rebuild.
+
+1998-06-01  Assar Westerlund  <address@hidden>
+       and Ian Lance Taylor  <address@hidden>
+
+       * configure.in: Check for GSSAPI headers individually.  Use a
+       different set of GSSPI libraries if gssapi.h rather than
+       gssapi/gssapi.h is found.  Adds Heimdal support.
+       * configure, config.h.in: Rebuild.
+
+1998-05-25  Jim Kingdon  <address@hidden>
+
+       * cvs.spec (%description): Rewrite to be slightly more verbose
+       about the basic features.  Don't try to mention what CVS lacks.
+
+1998-05-23  Jim Kingdon  <address@hidden>
+
+       * BUGS: Remove items about binary file bugs which were fixed
+       approximately 6 months ago.
+
+1998-04-28  Jim Kingdon  <address@hidden>
+
+       * TESTS: Add note about Solaris sort program (reported by Mark
+       D. Baushke).
+
+1998-03-16  Larry Jones  <address@hidden>
+
+       * configure.in: Simplify test for shadow password support since
+       the code now handles the case where shadow passwords are supported
+       but are not in use.
+       * configure: Regenerated.
+
+1998-03-07  Jim Kingdon  <address@hidden>
+
+       * TESTS: Remove note about SGI's XFS.  Someone reports that it
+       works (I would assume due to the 13 Feb 1998, and earlier, changes
+       to sanity.sh).
+
+       * NEWS: Add item about PreservePermissions.  Fix unclear wording
+       in gserver item.
+
+1998-03-04  Jim Kingdon  <address@hidden>
+
+       * acconfig.h, configure.in: Add PRESERVE_PERMISSIONS_SUPPORT and
+       always define it.
+       * configure, config.h.in: Regenerated.
+
+Tue Feb 17 18:32:36 1998  Ian Lance Taylor  <address@hidden>
+
+       * configure.in: Add memmove back to AC_REPLACE_FUNCS list.
+       * configure: Rebuild.
+
+1998-02-16  Jim Kingdon  <address@hidden>
+
+       * TODO (190): Remove "failed to check out" from commit.c from
+       lists of error messages suppressed by -q; it no longer is.
+
+4 Feb 1998  Jim Kingdon
+
+       * cvsnt.mak: The usual "because Visual C++ feels like it"
+       changes.  These ones seem to have to do with reordering
+       files and release versus debug configurations, mainly.
+
+Fri Jan 30 10:37:40 1998  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update which version of CVS was tested with EMX.
+
+15 Jan 1998  W. L. Estes  <address@hidden>
+       and Jim Kingdon  <address@hidden>
+
+       * cvs.spec, Makefile.in: Fix some problems with the spec file
+       distributed with cvs.  RPM chokes on a build root of slash, so
+       that is gone now.  CVS is relocatable (as far as I know) so I
+       added a prefix tag.  The source location was incorrect and in
+       fixing that I had to add a `g' flag to one of the sed commands in
+       the Makefile.in so the spec file gets generated correctly.
+
+13 Jan 1998  Jim Kingdon
+
+       * cvsnt.mak: Add lib/fncase.c.  Plus of course the usual
+       "because Visual C++ feels like it" changes.
+
+Tue Jan 13 16:49:38 1998  Ian Lance Taylor  <address@hidden>
+
+       * acconfig.h (USE_SETMODE_STDOUT): Add undef line.
+       (HAVE_SETMODE): Likewise.
+       * configure.in: If cygwin32, define USE_SETMODE_STDOUT and
+       HAVE_SETMODE.
+       * configure, config.h.in: Regenerate.
+
+       * acconfig.h (UTIME_EXPECTS_WRITABLE): Add undef line.
+       * configure.in: If cygwin32, define UTIME_EXPECTS_WRITABLE.
+       * configure, config.h.in: Regenerate.
+
+       * configure.in: Add test for cygwin32, and set LIBOBJS and LIBS
+       accordingly.
+       * configure: Regenerate.
+
+Sun Jan 11 11:43:55 1998  Jim Kingdon  <address@hidden>
+
+       * HACKING: Add example of indentation for switch statement.  I
+       always have to look this one up, and it seems worthwhile to
+       specify it here rather than be unsure which switch statement in
+       CVS to use as an example.
+
+Wed Jan  7 09:41:08 1998  Jim Kingdon  <address@hidden>
+
+       * TODO: Revise item 149 (concerning changing CVS/Root and such).
+       "This whole area is a rather bad pile of individual decisions which
+       accumulated over time, some of them probably bad decisions with
+       hindsight."
+
+Wed Dec 31 09:25:20 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Re-import from FAQ-O-Matic.  Features a change regarding
+       removing directories.
+
+Tue Dec 23 08:28:44 1997  Jim Kingdon  <address@hidden>
+
+       * README.VMS, INSTALL, HACKING, BUGS, README: Change bug-cvs
+       address from prep.ai.mit.edu to gnu.org per email from Martin
+       Hamilton.  When referring to bug-reporting procedure refer to
+       Cederqvist not README.
+
+Tue Dec 16 13:13:53 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Re-import from FAQ-O-Matic.  The content is the same, but
+       instead of being from Mosaic, it is from "lynx -dump -nolist".
+       This output is somewhat better (for example, it is formatted for
+       80 columns or so, rather than Mosaic which is rather
+       inconsistent), and also lynx is free and still maintained whereas
+       NCSA Mosaic is proprietary and no longer maintained.
+
+       * FAQ: Re-import from FAQ-O-Matic.  Features an update to the
+       Sablime question.
+
+       * NEWS: Add item about GSSAPI.
+
+Fri Dec 12 14:00:57 1997  Ian Lance Taylor  <address@hidden>
+
+       * configure.in: Add --with-gssapi option, and look for gssapi.h
+       and GSSAPI Kerberos v5 libraries.
+       * acconfig.h: Add HAVE_GSSAPI.
+       * configure, config.h.in: Regenerate.
+
+Thu Dec 11 15:58:06 1997  Eric Mumpower  <address@hidden>
+
+       * configure.in: Let --with-krb4 override the system Kerberos
+       header files and libraries, if any.
+       * configure: Regenerate.
+
+Thu Dec  4 20:01:02 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Remove mempcpy per change to
+       src/rcs.c.
+       * configure: Regenerated (never was regenerated after getwd change).
+
+1997-12-04  Jim Meyering  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Add mempcpy.
+
+Thu Dec  4 10:42:32 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Update for kfogel .cvswrappers fix.
+
+Tue Dec  2 22:14:03 1997  Jim Kingdon  <address@hidden>
+
+       * MINOR-BUGS: Update per info-cvs mail from Steve Cameron.
+
+1997-11-29  Jim Kingdon
+
+       * cvsnt.mak: Remove lib/getwd.c (see lib/ChangeLog for rationale).
+
+       * cvsnt.mak: The usual "because Developer Studio feels like
+       it" changes.
+
+Sat Nov 29 22:10:32 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS): Remove getwd (see lib/ChangeLog
+       for rationale).
+
+Mon Nov 24 10:36:39 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update QNX information per email from Michael Hunter of
+       QNX.
+
+Wed Nov 19 17:44:21 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Add Sequent entry per bug-cvs report.
+
+1997-11-17  Karl Fogel  <address@hidden>
+
+       * BUGS: Remove item about exporting binary files to non-unix
+       clients; this is fixed.
+
+Mon Nov 17 09:07:44 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add yet another binary files problem.
+
+1997-11-14  Karl Fogel  <address@hidden>
+
+       * cvsnt.mak: updated for diff/ subdir.
+
+Fri Nov 14 12:25:10 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Remove item about dying gasps message.  At least one known
+       cause has been fixed.
+
+Wed Nov 12 20:24:49 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Re-import from FAQ-O-Matic.  Features a wording fix to
+       "What do I do first? How do I create a Repository?" and a
+       formatting fix (makes it clear which bullets are under what)
+       to "What is a module?"
+
+       * NEWS: Add item about RCS library.  Remove item about RCSBIN in
+       CVSROOT/config.
+       * INSTALL: Simplify instructions to reflect the fact that one need
+       not any longer install RCS and GNU diff.
+       * PROJECTS: Remove item about RCS library; it is done.
+
+Mon, 10 Nov 1997  Jim Kingdon
+
+       * cvsnt.dsp: For diff/diff.c, also look for include files in
+       diff directory.  This means we get diff/system.h not lib/system.h.
+
+Sun Nov  9 16:16:56 1997  Jim Kingdon  <address@hidden>
+
+       * TODO (#195): New item, about rsync and such issues.
+
+Thu Nov  6 14:29:14 1997  Jim Kingdon  <address@hidden>
+
+       * TODO (#194): New item, about separated metadata.
+
+       * TODO (#186): Rewrite paragraph on CVSclusters to be clearer
+       about what this can do and why I think it is a cool idea.
+
+Sun Nov  2 19:34:30 1997  Jim Kingdon  <address@hidden>
+
+       * DEVEL-CVS: Wording fix: want to specify that new developers are
+       granted checkin access and the ability to send to devel-cvs, not
+       specify whether this is implemented via an "account" (whatever
+       that is) (editorial change, not run by devel-cvs).
+
+Fri Oct 31 16:30:57 1997  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention admin -o rev1::rev2.
+
+Wed Oct 29 08:40:05 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Add item 193, about alternatives to timestamps in CVS/Entries.
+
+Tue Oct 28 19:59:48 1997  Jim Kingdon  <address@hidden>
+
+       * TODO (190): "rcs failed" message is no longer affected by global
+       -q option.
+
+1997-10-28  Jim Kingdon
+
+       * .cvsignore: Add Visual C++ files du jour, namely
+       {diff,vc50}.{pdb,idb,pch}.
+
+       * cvsnt.dsp: Add files for diff library.  The custom build
+       stuff for diff/version.c and diff/diff.c was to deal with
+       there also being a src/version.c and src/diff.c.  There
+       might be an easier way.
+
+Mon Oct 27 11:21:15 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Re-import from FAQ-O-Matic.  Features an edit from Larry
+       Jones regarding CVS on Windows.
+
+Mon Oct 20 15:23:17 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add item about spaces in login names.
+
+Mon Oct 20 10:25:42 1997  Hannes R. Boehm  <address@hidden>
+
+       * INSTALL (Tested platforms): Add Red Hat Linux 4.2.
+
+Wed Oct 15 10:55:20 1997  Jim Kingdon  <address@hidden>
+
+       * TODO (#192): Also mention issue with opening connections to new
+       servers if CVSROOT changes.
+
+       * TODO (#191): Add thoughts on external difference programs.
+
+1997-10-11  Noel Cragg  <address@hidden>
+
+       * BUGS: remove note about the `-d' flag bug that was just fixed.
+
+       * TODO: new item 192.
+
+Thu Oct  9 12:59:28 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Revise item #182 to be clearer and to point to the
+       unofficial patch.
+
+Thu Sep 25 14:48:26 1997  Jim Kingdon  <address@hidden>
+
+       * build.com: Also recurse into diff directory.
+
+Wed Sep 24 10:35:50 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in: Don't check for system-supplied regex matcher; see
+       comment for rationale.
+       * configure: Regenerated.
+
+Tue Sep 23 16:00:25 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add item about cvs add and -k wrappers.
+
+Mon Sep 22 11:21:11 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Revise item #191 in response to xdelta 1.10 release and a
+       few other random thoughts.
+
+Sun Sep 21 17:56:28 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in: Instead of checking for memchr, just define
+       HAVE_MEMCHR and HAVE_STRCHR.
+       Add comment about AC_FUNC_VFORK and vfork in general.
+       * acconfig.h: Add HAVE_MEMCHR and HAVE_STRCHR.
+       * configure, config.h.in: Regenerated.
+
+       * config.h.in: Regenerate using autoheader from autoconf 2.10.
+
+Sat Sep 20 01:17:10 1997  Tim Pierce  <address@hidden>
+
+       [notes: (1) includes the patches to config.h.in which he sent
+       (presumably generated), (2) I have omitted a change, which was
+       sent without a ChangeLog entry, to change re_exec to
+       re_compile_pattern in configure.in, (3) Also adds diff/Makefile in
+       AC_OUTPUT -kingdon]
+
+       * Makefile.in (USOURCE_SUBDIRS, check, remotecheck, installcheck):
+       Add diff.
+
+       Note that AC_CHECK_FUNCS(vfork)
+       has been replaced by AC_FUNC_VFORK... libdiff wants the more
+       specific test, and it seems unlikely to break CVS.
+
+       * configure.in: Add AC_FUNC_CLOSEDIR_VOID, AC_FUNC_VFORK,
+       AC_STRUCT_ST_BLKSIZE.
+       (AC_CHECK_HEADERS): Add limits.h and sys/file.h.
+       (AC_REPLACE_FUNCS): Add memchr.
+       (AC_CHECK_FUNCS): Remove vfork.
+
+Fri Sep 19 09:59:33 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Add item #191, concerning how to store binary files.
+
+Wed Sep 17 16:13:49 1997  Jim Kingdon  <address@hidden>
+
+       * TESTS: Add ideas about ability to pass spaces in arguments, and
+       stdin, to the program under test, as something to consider for the
+       different test frameworks.
+
+Tue Sep 16 00:14:55 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add item about importing binary files.
+
+       * TODO: Adjust item #150 to reflect the fact that the client is
+       not quite so mean about tossing the log message as it was.
+
+Fri Sep 12 13:04:31 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update Windows entries per email from Greg Strockbine
+       <address@hidden>.
+
+Thu Sep 11 15:03:21 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: New item #190, about meaning of -q and -Q global options.
+
+Wed Sep 10 18:48:41 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: A few more thoughts on "cvs message" (item 150).
+
+Tue Sep  9 22:20:15 1997  Jim Kingdon  <address@hidden>
+
+       * README.VMS (Notes regarding compiling on VAX/VMS): Add item
+       about mode_t and pid_t.
+
+Sun Sep  7 17:34:03 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Re-import from FAQ-O-Matic.  The metavariables are back.
+
+       * FAQ: Re-import from FAQ-O-Matic.  Features comment from
+       address@hidden about update -r branch:date.  It also clobbered the
+       metavariables (confusion about "<" as data vs. HTML tag I would
+       guess), which I plan on fixing in a moment.
+
+       * configure.in: Add comment about re_exec and regexp syntax.
+
+       * configure.in (AC_REPLACE_FUNCS): Remove strdup; CVS was long
+       ago converted to use its own routine xstrdup.
+       * configure: Regenerated.
+
+Sat Sep  6 00:08:20 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Re-import from FAQ-O-Matic.  In particular: GIC info
+       updated, binary files updated (e.g. -kb not -ko), rename database
+       and rCVS info updated (refer to TODO), tweaks to section on
+       contributing (HACKING, DEVEL-CVS, &c), Cyclic info updated
+       (e.g. remove Indiana address), usenet info updated
+       (e.g. comp.software.config-mgmt not gnu.*).
+
+Fri Sep  5 20:46:26 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: Add another introductory paragraph which talks about out of
+       date material from 1995 FAQ.
+
+       * FAQ: Re-import from FAQ-O-Matic.  This was mainly as a proof of
+       concept that I could edit the Cygnus question and have the diffs
+       come out looking right (which worked), but I also discovered that
+       the previous checkin was truncated partway through.
+
+       * FAQ: Replace file with an introductory paragraph plus a
+       downloaded copy of Molli's FAQ-O-Matic.  I believe the content
+       closely matches the 1995 Grubbs FAQ but because everything is
+       re-ordered it would be painstaking work to verify this.
+
+Thu Sep  4 17:33:53 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add item about -w global option and client/server.
+
+Wed Sep  3 23:03:34 1997  Noel Cragg  <address@hidden>
+
+       * TODO: Verbosify verbiage in item #189.
+
+Wed Sep  3 14:14:54 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Add item #189, concerning renames.
+
+Sat Aug 30 03:26:57 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Fix typo in Noel's change.
+
+Sat Aug 30 03:17:36 1997  Noel Cragg  <address@hidden>
+
+       * TODO: Add a header so emacs chooses the correct editing mode.
+       Made several entries more verbose (expanded some of the less
+       well-known acronyms and/or added pointers to further
+       documentation).
+
+Wed Aug 20 09:51:52 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Remove "SparcClassing" typo that has been there for
+       a while.
+
+Wed Aug 20 09:51:52 1997  Jim Kingdon  <address@hidden>
+                         and Loren James Rittle <address@hidden>
+
+       * INSTALL: Update information for SunOS4, Solaris, Digital Unix,
+       and HPUX.
+
+Fri Aug 15 16:42:12 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Remove the "CVS 1.6" crud; it really isn't needed.  Add
+       paragraph about the meaning of the last three arguments to cvs
+       import.
+
+Thu Aug 14 14:42:53 1997  Jim Kingdon  <address@hidden>
+                         and Loren James Rittle <address@hidden>
+
+       * INSTALL: Update information for SunOS4 and Solaris.
+
+Mon Aug  4 00:02:24 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Be specific about wrappers not working client/server.
+
+Sat Aug  2 09:23:50 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: In step 4, be more generic (the CVS sources are just an
+       example, and people might not have them handy).
+
+Fri Jul 25 17:02:30 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Refer to cvs.texinfo as the Cederqvist manual; that
+       seems to be the description which best applies no matter how it
+       was obtained.  Be a little more explicit about the "$" prompt
+       convention and setting environment variables.  Use double quotes
+       because they work on both DOS and Unix.
+
+Thu Jul 24 12:22:49 1997  Jim Kingdon  <address@hidden>
+
+       * NEWS: Also mention SystemAuth.
+
+       * INSTALL (MIPS): Add more detailed report concerning Irix 6.2,
+       as reported by address@hidden (Larry Jones).
+
+Tue Jul 22 17:35:31 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL (PowerPC): Add item for Lynx 2.5.
+
+21 Jul 1997  Jim Kingdon
+
+       * Makefile.in (DISTFILES): Add cvsnt.dsp.
+
+Mon Jul 21 09:40:10 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in: Adjust comment regarding version of autoconf which
+       introduced --bindir.
+
+Fri Jul 18 09:47:12 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove item 161 (the comments in cvs.texinfo have a much
+       more complete discussion of date format issues).  In item 30,
+       change "patch" to "rdiff" and expand discussion slightly.  Remove
+       item 64 (the performance issues in initial checkout have probably
+       changed quite a bit since that was written and in any event it
+       isn't particularly useful without specifics of what is slow and
+       ideas for speeding it up).
+
+       * INSTALL: Reorganize to separate out building/installing CVS
+       executables from what to do once you have them.  Adjust Visual C++
+       instructions to deal with Visual C++ 5.x.  Add brief mentions of
+       platforms other than unix and Windows.
+
+Thu Jul 17 21:13:16 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: In item 39, talk about how PRCS 1.2 as a possible model.
+
+Sat Jul 12 15:43:01 1997  Jim Kingdon  <address@hidden>
+
+       * HACKING: Rewrite paragraph on arbitrary limits to reflect the
+       fact that the known arbitrary limits are gone.
+
+8 Jul 1997  Jim Kingdon
+
+       * cvsnt.dsp: Turn on browse information.
+
+Thu Jul  3 10:07:01 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Sending exact suggested text is almost as good as a diff.
+
+       * INSTALL (i386 family): Add lines about Watcom and EMX on OS/2.
+
+       * TODO: Add notes about popt and option parsing in general.
+
+Wed Jul  2 13:11:03 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Update item 149 to reflect CVS/Root.
+
+       * TODO: Add item 187, about usage errors vs. help messages.
+
+Mon Jun 23 18:24:13 1997  Jim Kingdon  <address@hidden>
+
+       * NEWS: Adjust mention of read-only access in the light of
+       changes to cvs.texinfo.
+
+       * TODO: Add item 186, concerning multisite.
+
+Sun, 22 Jun 1997  Jim Kingdon
+
+       * cvsnt.dsp: New file.  This apparently is what Visual C++ 5.0
+       uses in lieu of a .mak file (or so it seems).
+       * .cvsignore: Add cvsnt.opt cvsnt.dsw cvsnt.plg.  These seem to
+       be the generated files du jour for Visual C++ 5.0.
+
+Thu Jun 19 17:16:39 1997  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add item about CVSROOT/config.
+
+Wed Jun 18 00:00:02 1997  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention pserver --allow-root.
+
+Mon Jun 16 19:07:34 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (SUBDIRS): Add emx.
+       * configure.in (AC_OUTPUT): Add emx.
+       * configure: Regenerated.
+
+Sun Jun  8 23:44:00 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Remove mkfifo; not used anywhere.
+       * configure, config.h.in: Regenerated.
+
+Thu May 29 15:53:06 1997  Jim Kingdon  <address@hidden>
+
+       * DEVEL-CVS: Add "Policy regarding checkout-only access" to
+       replace parenthetical remark about checkout-only access.  This is
+       more of a cosmetic/editorial change than a new policy.
+
+Wed May 21 17:02:29 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add item about wrappers.
+
+Fri May 16 13:43:53 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add item about "cvs export" and binary files.
+
+Sun May 11 11:38:03 1997  Jim Kingdon  <address@hidden>
+
+       * README.VMS: Remove information about "direct TCP".  Noone has
+       been complaining about it being broken (the code bitrotted not long
+       after it was written), nor has anyone complained
+       that contrib/listener.c was omitted from the distribution (because
+       it wasn't mentioned in contrib/Makefile.in DISTFILES).  If there
+       is a desire to resurrect such a feature, it should use port 2401
+       as now discussed in doc/cvsclient.texi.
+
+Thu May  8 12:14:40 1997  Larry Jones  <address@hidden>
+       and Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update MIPS/SGI Irix 6.2
+       * TESTS: Add note about TESTDIR and SGI Irix 6's XFS.
+
+Wed May  7 12:01:21 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Fix keywords accidentally expanded in previous checkin.
+
+       * TODO: Add item #185, concerning keyword expansion and merges.
+
+Sun May  4 19:46:03 1997  Jim Kingdon  <address@hidden>
+
+       * README: Replace section on reporting bugs with a reference to
+       the bug-reporting section in cvs.texinfo.
+
+Fri May  2 22:50:04 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Remove item about importing binary files; the bug is fixed.
+
+Sun Apr 27 19:54:34 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Refer to doc/DIFFUTILS-2.7-BUG.
+
+       * INSTALL: Don't mention GREP; CVS no longer uses it.
+
+       * configure.in: Add comment about --bindir.
+
+Thu Apr 24 15:21:17 1997  Norbert Kiesel  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): added tempnam and mktemp
+       * config.h.in, configure: Regenerated with autoconf 2.10.
+
+21 Apr 1997  Jim Kingdon
+
+       * cvsnt.mak: Visual C++, as usual, wants to fiddle with this.
+       This time it would appear to be chiefly the dependencies.
+
+Mon Apr 21 01:06:31 1997  Ian Lance Taylor  <address@hidden>
+
+       * NEWS: Document that the client no longer needs an external patch
+       program.
+
+Thu Apr 17 14:28:20 1997  Jim Kingdon  <address@hidden>
+
+       * TODO: Combine items 150 and 181 since they are basically the same.
+
+Tue Apr 15 12:32:26 1997  Jim Kingdon  <address@hidden>
+
+       * FAQ: The URL of yahoo's Configuration Management category has
+       changed.  As it might change again, just cite their top-level page
+       rather than the entire URL.
+
+8 Apr 1997  Jim Kingdon
+
+       * cvsnt.mak: Add windows-NT/sockerror.c.
+
+Wed Mar 26 15:51:33 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Further note on import -kb bug.
+
+Tue Mar 25 17:51:32 1997  Jim Kingdon  <address@hidden>
+
+       * cvs-format.el: Add comment concerning c-label-offset.
+
+Wed Mar 19 14:06:40 1997  Jim Meyering  <address@hidden>
+
+       * configure.in (test for shadow passwords): Use AC_MSG_RESULT
+       rather than echo, so configure obeys --quiet.
+       Use yes and no in message rather than yup and nope.
+
+19 Mar 1997  Jim Kingdon
+
+       * cvsnt.mak: Now Visual C++ wants to add a bunch of dependencies
+       for the Release configuration as well as the Debug one.  Why it
+       didn't do this before, I have no idea.
+
+13 Mar 1997  Jim Kingdon
+
+       * cvsnt.mak: Recent changes have added a number of getline.h
+       dependencies.
+
+Thu Mar 13 08:43:04 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_C_CROSS): Add comment about obsolescence
+       thereof.
+       * config.h.in, configure: Regenerated with autoconf 2.10.
+
+Thu Mar 13 05:50:29 1997  Philippe De Muyter  <address@hidden>
+
+       Here are the fixes I needed to make to cvs-1.9 to get it to
+       compile and successfully pass 'make check' on m68k-motorola-sysv.
+       * lib/getwd.c (getwd): Added declaration for getcwd().
+       * lib/wait.h (WIFSTOPPED et al.): Macro defined if not defined.
+       * lib/waitpid.c (waitpid): Use wait, not wait3, if !HAVE_WAIT3.
+       * src/admin.c (admin): Added declaration for getgrnam().
+       * src/server.c (fcntl.h): Do not include file twice.  Already included
+       from system.h from cvs.h.
+       * src/sanity.sh (imported-f*): Renamed from imported-file*, that were
+       too long for sysv.
+       * configure.in (wait3): Added to AC_CHECK_FUNCS list.
+
+Wed Mar 12 14:32:50 1997  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add "failed assertion `rev == NULL || isdigit (*rev)'" bug.
+
+       * TODO: Remove item 135; this is solved by %v and %V in loginfo.
+
+       * configure.in (AC_CHECK_FUNCS): Don't check for setvbuf;
+       HAVE_SETVBUF is no longer used.
+       * config.h, configure: Regenerated with autoconf 2.10.
+
+       * TODO: Add item 184, concerning MD5-based password hash.
+       Remove item 14, concerning "pathname stripper".  I think that was
+       a reference to the late unlamented strip_path.
+
+Sat Mar  8 21:22:54 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: NT 4.0 is client and local (like other NT 3.51 & Win95).
+
+Fri Mar  7 16:51:13 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Just talked to a NT 4.0 user; add it to the list.
+
+Sun Mar  2 22:01:23 1997  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add item about "cvs admin" vs. "cvs admin .".
+
+       * TODO: Remove item #169.  It doesn't really explain what an
+       "archive library" is or in general what the feature they discuss is
+       supposed to do--I mean, CVS _can_ be used to store .o's, if
+       that is what they are talking about.
+
+       * TODO: Add item #183, about greater documentation/visiblity for
+       Entries.Static and CVS/Tag.
+
+       * INSTALL (footnote 5): Add note about how /usr/tmp vs. /var/tmp
+       shouldn't be an issue anymore
+
+Thu Feb 20 13:53:19 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Update Cray entry per mail from John Bowman
+       <address@hidden>
+
+       * configure.in: Add comments about autoconf version.
+
+Mon Feb 17 09:55:35 1997  Jim Kingdon  <address@hidden>
+
+       * configure: Regenerated.
+
+Sat Feb 15 15:37:39 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Add windows-NT/SCC/Makefile.
+
+Sun Dec 15 13:12:30 1996  Michael Douglass <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention "cvs logout".
+
+1997-02-12  Jim Kingdon
+
+       * cvsnt.mak: Visual C++ seems to want to make some cosmetic
+       changes (reordering *.obj files), perhaps prodded by "Save
+       All".  I hope that putting in these changes will make it
+       happy...
+
+1997-02-11  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Replace with version from Visual C++ 4.0.  If someone
+       wants the 2.x one back, I suppose we can put them side by side,
+       but I won't be able to update the 2.x one any more as I won't be
+       having access to 2.x.
+
+Tue Feb 11 16:43:43 1997  Jim Kingdon  <address@hidden>
+
+       * .cvsignore: Add cvsnt.mdp and cvsnt.ncb.  They seem to be files
+       created by Visual C++ 4.x which were not created by Visual C++ 2.x.
+
+Tue Feb  4 11:42:30 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: OS/2 port is client only.
+
+       * Rename devel-cvs (which had only been in the repository, not the
+       distribution) to DEVEL-CVS.  Add "Charter for the devel-cvs
+       mailing list:" heading, "CVS Development Policies" title, and
+       one-sentence introduction (editorial changes, not run by
+       devel-cvs).  Revise paragraph concerning membership in the list to
+       reflect policy change to make read-only membership different from
+       the ability to send to the list (the new wording was approved by
+       devel-cvs, as was the rename and including it in the
+       distribution).
+       * Makefile.in (DISTFILES): Add DEVEL-CVS.
+       * HACKING: Add "Mailing lists" section.
+
+Tue Jan 28 10:41:05 1997  Jim Kingdon  <address@hidden>
+
+       * configure.in: Remove AC_CHECK_SIZEOF; no longer needed with
+       lib/md5.c changes.
+       * acconfig.h: Add HAVE_CONNECT.  This is needed so that autoheader
+       2.10 works; I think this has been broken since 2 Dec 1996.
+       * config.h.in: Regenerated with autoheader 2.10.
+       * configure: Regenerated with autoconf 2.10.
+
+       * HACKING: Revise criterion for whether something goes in NEWS
+       again (now "user-visible change worth mentioning"--the language
+       from the GNU coding standards).
+
+Mon Jan 27 23:05:24 1997  Jim Kingdon  <address@hidden>
+
+       * HACKING: Criterion for whether something goes in NEWS is not
+       whether it is user-visible; it is whether it is a bugfix or a
+       feature.
+
+Tue Jan 21 10:21:53 1997  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Warn people against pre-5.x RCS; describe how to find
+       out what version of RCS you have.
+
+Wed Jan  8 14:50:47 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in, NEWS, README, TODO, configure.in: Remove CVSid; we
+       decided to get rid of these some time ago.
+
+Wed Jan  8 00:17:13 1997  Jim Kingdon  <address@hidden>
+
+       * README (Credits): Refer to NEWS not ChangeLog; the ChangeLog in
+       question got renamed a bit but ended up as the bottom of the NEWS
+       file.  Eliminate use of first person in a few places where it is
+       unclear who it refers to.  Explicitly say that the lists
+       of contributors are not comprehensive.
+
+Thu Jan  2 12:59:45 1997  Jim Kingdon  <address@hidden>
+
+       * README, Makefile.in: Remove paragraph about writing to the Free
+       Software Foundation at 675 Massachusetts Avenue.  (1) They are no
+       longer at that address; (2) the Free Software Foundation are not
+       the ones to write to concerning CVS licensing.  bug-cvs would be a
+       more appropriate choice; (3) there is probably little need for
+       this paragraph anyway.
+
+Thu Jan  2 09:46:37 1997  Karl Fogel  <address@hidden>
+
+        * NEWS: mention read-only repository access feature.
+
+Wed Jan  1 18:47:08 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.spec: Don't include ChangeLog and ChangeLog.zoo in %doc.
+       There is no point in including them without src/ChangeLog,
+       src/ChangeLog-96, etc., but more to the point they really belong
+       in the source distribution rather than a binary distribution anyway.
+
+Mon Dec 30 16:55:54 1996  Abe Feldman  <address@hidden>
+
+       * NEWS: Add entry for changes to checkout command (creating CVS
+       directory at top of working directory)
+
+Tue Dec 17 13:13:30 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add entry for verifymsg.
+
+Tue Dec 10 19:22:20 1996  Jim Kingdon  <address@hidden>
+
+       * cvs-format.el: Revise comments to explain how to use it and
+       general minor tidying of comments.
+
+Mon Dec  2 13:05:44 1996  Ian Lance Taylor  <address@hidden>
+
+       * configure.in: Don't call AC_CHECK_FUNCS(connect) a second time,
+       because the value will have been cached; instead, check whether
+       the library was found with connect defined.
+       * configure: Rebuild with autoconf 2.12.
+
+Sat Nov 30 23:04:52 1996  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add note about mysterious failure in test 187a3.
+
+Fri Nov 29 10:19:50 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Also check for readlink.
+       * config.h.in: Regenerated using autoheader 2.10.
+
+Fri Nov 22 16:30:27 1996  Brendan Kehoe  <address@hidden>
+
+       * configure.in: Check for -lsocket, etc., before checking for
+       Kerberos libraries.
+       * configure: Rebuild.
+
+1996-11-19  Jim Kingdon
+
+       * cvsnt.mak: Remove strippath.c.
+
+Sun Nov  3 21:54:18 1996  Jim Kingdon  <address@hidden>
+
+       * README: Move detailed information on compatibility to
+       the manual; simply point to it here.
+
+Thu Oct 31 07:20:45 1996  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add note about cvs import of binary files on non-unix.
+
+Tue Oct 29 13:59:14 1996  Jim Kingdon  <address@hidden>
+
+       * BUGS: Add note about "dying gasps" message.
+
+Sat Oct 26 16:17:09 1996  Jim Blandy  <address@hidden>
+
+       * configure.in (AC_CHECK_FUNCS): Check for tzset.
+
+Fri Oct 25 10:27:08 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention new loginfo features.
+
+Thu Oct 24 08:21:48 1996  address@hidden
+
+       * INSTALL: Update to "DEC Alpha running OSF/1 version 3.2 (1.9)"
+
+Tue Oct 22 10:34:21 1996  Noel Cragg  <address@hidden>
+
+       * configure.in: don't check for the existence of the /etc/security
+       directory, because it's possible to have PAM installed without
+       using shadow passwords.
+       * configure: regenerated.
+
+Sat Oct 19 18:34:29 1996  Jim Kingdon  <address@hidden>
+
+       * README: Say that the remote protocol is not interoperable before
+       CVS 1.5.
+
+Sat Oct 19 13:06:53 1996  Mark H. Wilkinson  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * configure.in, INSTALL: New options for configure to enable or
+       disable client and server code, overriding configure's defaults.
+       * confiugre: Regenerated.
+
+Sat Oct 19 13:06:53 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Add note about what to do if you got a binary
+       distribution of CVS.  Add VAX/VMS entry.
+
+Thu Oct 17 15:38:03 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS, README: Reinstate 30 Sep 96 changes concerning US letter
+       vs. A4 paper.
+
+Wed Oct 16 16:59:57 1996  Jim Blandy  <address@hidden>
+
+       * configure.in: Simplify code to check for crypt.  Check for
+       -lcrypt first, and then check for the crypt function.  The old
+       code did slightly funky things with cache variables, which JimK's
+       last change disturbed.  Let's just keep it simple.
+       * configure: Rebuilt.
+
+Wed Oct 16 15:01:59 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in: Don't call unset.  It isn't portable to Ultrix,
+       but perhaps more to the point, seems like we should be using the
+       cached values (there was no comment explaining why we should
+       ignore the cached values, and none of the CVS developers were
+       able to provide an explanation when I asked).
+       * configure: Regenerated.
+
+       * NEWS: Add item regarding export and "cvs history".
+
+Tue Oct 15 07:40:42 1996  Jim Kingdon  <address@hidden>
+
+       * TESTS: Mention the fact that expr is only for the tests, not for
+       CVS itself.  At least one person was unclear on this.
+
+Mon Oct 14 12:13:03 1996  Jim Kingdon  <address@hidden>
+
+       * HACKING: Add "Submitting patches (strategy)" section and
+       sentence about test cases.  These changes have been run by
+       devel-cvs and there was no objection.
+
+Sat Oct 12 19:43:56 1996  Jim Kingdon  <address@hidden>
+
+       * README.VMS: Add notes about some build problems on VAX/VMS.
+
+Thu Oct 10 09:20:25 1996  Jim Kingdon  <address@hidden>
+
+       * BUGS: Remove item about & in modules file and client/server; the
+       bug is fixed.
+
+       * README.VMS: Rewrite sections about wildcard expansion and
+       calling editors to suggest technical approaches and to make it
+       clear that fixes will only happen if someone gets around to them.
+
+Sat Oct  5 15:01:22 1996  Jim Blandy  <address@hidden>
+
+       * Version 1.9 released.
+
+Tue Oct  1 14:32:44 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS, README: Revert changes regarding -D, -g, and A4.  They
+       are for new features which are not appropriate at this stage of
+       the release process.
+
+Mon Sep 30 14:51:36 1996  Greg A. Woods  <address@hidden>
+
+       * INSTALL (sun3): 1.8.86+ builds and runs make check.
+
+       * NEWS: describe -D and -g; DIFFBIN and GREPBIN
+
+       * MINOR-BUGS: yet another couple of annoyances...
+
+Mon Sep 30 08:33:51 1996  Jim Kingdon  <address@hidden>
+
+       * BUGS: Mention "cvs add -m" client/server bug.
+
+       * NEWS: Document change from A4 to US letter.  It may seem minor,
+       but it affects a *lot* of people.
+
+       * README: Revise discussion of US letter vs. A4 to reflect recent
+       change to cvs.texinfo.
+
+Sun Sep 29 16:32:47 1996  Greg A. Woods  <address@hidden>
+
+       * MINOR-BUGS: describe a minor annoyance or two
+
+       * BUGS: describe a couple of new bugs
+
+Sun Sep 29 14:09:49 1996  Noel Cragg  <address@hidden>
+
+       * configure.in: check for shadow password files as well as for
+       getspnam.  Some systems (like Linux) have getspnam in the C
+       library, but aren't necessarily using shadow passwords.
+       * configure, config.h.in: Regenerate.
+
+Fri Sep 27 16:49:53 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (TSUBDIRS): Remove comment about order of
+       directories mattering.  That was only for an old set of hacks,
+       since gone, which tried to combine several tag files into one
+       (before emacs could use several tag files at once).
+
+Wed Sep 25 10:35:06 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add note about "cvs log -d" date formats changing.  See
+       comment I added to cvs.texinfo for more whining about this situation.
+
+       * BUGS: Remove item about ~/.cvsignore on NT; it is fixed.
+
+Wed Sep 25 10:22:00 1996  Larry Jones  <address@hidden>
+
+       * configure.in: Add hack for ISC crypt (the version in the posix C
+       library doesn't work -- why am I not surprised).  Add check for
+       libsec.a for shadow password functions.
+
+       * Makefile.in: Make zlib along with lib in the check targets.
+
+Wed Sep 25 08:34:01 1996  Jim Blandy  <address@hidden>
+
+       Fix from Mark A. Solinski <address@hidden>:
+       * cvsnt.mak: The debug configuration adds the zlib directory to
+       the include path but it is missing from the release configuration.
+       Add it to the "ADD CPP" and "CPP_PROJ" lines.
+
+Tue Sep 24 11:32:20 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Add VMS entry.  Clarify what "tested" means.
+
+       * README: Replace section about what CVS is with the blurb from
+       cvs.spec (which is also the paragraph we use in the release
+       announcements).
+       Change location of pcl-cvs from contrib/pcl-cvs to tools/pcl-cvs.
+
+       * BUGS: Remove item about version numbers; we now have version
+       numbers.  Remove item about server using /usr/tmp; this has been
+       changed.  Remove item about deadlocks between server and client
+       and file contents being interpreted as commands; I believe this
+       refers to the case which was fixed by Ian's 7 Aug 96 change to
+       receive_partial_file.  Remove item about server temp directory
+       becoming full; I'm not sure all bugs related to that have been
+       fixed, but I think the ones mentioned have been.  Remove item
+       about .# files; this is a documented behavior.  Refer to
+       platform-specific documentation.  Add bug with & in modules file
+       and client/server CVS.  Move bug about weird use of long file
+       names to end; the bug report is so long people won't want to read
+       past it.  Refer to README concerning reporting bugs.  Add
+       introduction.  Reword some bug descriptions.  Add bug concerning
+       ~/.cvsignore on NT.
+       * MINOR-BUGS: Add introduction.  Reword some bug descriptions.
+       Remove item about "premature end of file"--we've improved that
+       error message as much as we can figure out how.  Remove item about
+       filenames getting truncated (with rcs2log?)--I think this is a fixed
+       bug although I couldn't quickly find a ChangeLog entry for the fix.
+
+Tue Sep 17 12:46:37 1996  Jim Kingdon  <address@hidden>
+
+       * .cvsignore: Add cvs-*.spec.
+
+Mon Sep 16 17:42:30 1996  Jim Kingdon  <address@hidden>
+
+       * TODO: In 180, mention issue of network being down.  Add item
+       182, about inclusiveness of "cvs log -r foo -r bar".
+
+       * HACKING: Also mention arbitrary limits and reentrancy.
+       User-visible changes should be documented in cvs.texinfo as well
+       as NEWS.
+
+Thu Sep 12 16:06:33 1996  Jim Kingdon  <address@hidden>
+
+       * README.VMS: Put authorship info at end.  Add disclaimer.  Say
+       that patch is mandatory not optional.  Don't mention gzip; we
+       don't require it any more.  Remove section on filename case; the
+       bugs described there are fixed.  Miscellaneous tweaks and updates.
+
+Wed Sep 11 11:08:39 1996  Jim Blandy  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Don't forget to create vms/Makefile.
+
+Tue Sep 10 19:55:07 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (DISTFILES): Add build.com and README.VMS.
+       (SUBDIRS): Add vms.
+       * build.com: Also recurse into zlib directory.
+
+       * NEWS: Mention Win95.
+
+Fri Sep  6 11:43:26 1996  Ian Lance Taylor  <address@hidden>
+
+       * configure.in: Add AC_ARG_ENABLE for encryption.
+       * acconfig.h: Add ENCRYPTION.
+       * configure, config.h.in: Regenerate.
+       * NEWS: Modify the entry on encryption to mention that you must
+       configure with --enable-encryption.
+       * INSTALL: Mention the --with-krb4 and --enable-encryption
+       configure options.
+
+Thu Sep  5 11:30:45 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Revise access method item to mention both :ext: and
+       :server:.
+
+       * README.VMS: Change bug reporting address to bug-cvs.  In
+       discussing filenames, don't mention a hypothetical behavior
+       involving folding to lowercase (I'm not sure what is meant, and it
+       doesn't sound right to me) and do mention that things might be
+       different now (as a result of recent changes to case sensitivity
+       code).
+
+Wed Sep  4 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Add windows-NT/ChangeLog.
+
+Wed Sep  4 13:55:11 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (DISTFILES): Add cvs.spec.
+
+Mon Aug 26 15:30:13 1996  Jim Kingdon  <address@hidden>
+
+       * TODO: Add item suggesting "cvs message" command.
+
+Tue Aug 20 12:22:53 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_C_INLINE): Removed; see src/ChangeLog.
+       * config.h.in, configure: Regenerated.
+       * os2/config.h, windows-NT/config.h: Remove #define of inline.
+
+       * configure.in (AC_C_CHAR_UNSIGNED): Removed; it is not used
+       anywhere.
+       * config.h.in, configure: Regenerated.
+       * os2/config.h, vms/config.h, windows-NT/config.h: Likewise,
+       remove __CHAR_UNSIGNED__.
+
+Fri Aug 16 13:37:19 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.spec (%description): Replace description with one that
+       resembles the release announcements we have been sending out.  The
+       previous one was out of date and not really focused on describing
+       what CVS does.
+       (%build): Don't define SERVER_FLOWCONTROL; if we are ready to make
+       this is the default it should be for all kinds of builds, not just
+       those via RPM.
+
+Fri Aug 16 16:09:59 1996  Norbert Kiesel  <address@hidden>
+
+       * cvs.spec: new file.  This is a template for a RPM specification
+       file (which is used by 'make spec').
+
+       * Makefile.in (installdirs-local): new (empty) target
+       (all install uninstall installdirs): add installdirs to list of
+       targets which are done for all subdirs
+       (spec): new target to create a rpm specification file (which can
+       be used to create RPM source and binary packages)
+       (dist): depend on spec (which now also creates .fname)
+
+Wed Aug 14 13:59:11 1996  Norbert Kiesel  <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS): add getspnam for reading shadow
+       password entries
+       * configure: regenerated
+       * config.h.in: regenerated
+
+Mon Aug 12 14:15:31 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (config.status): When running config.status
+       --recheck, preserve the value of CFLAGS.
+
+Fri Aug  9 14:11:31 1996  Jim Kingdon  <address@hidden>
+
+       * TESTS: Also mention dejagnu advantages.
+
+Thu Aug  8 16:00:55 1996  Jim Kingdon  <address@hidden>
+
+       * TESTS (ABOUT STDOUT AND STDERR): New section.
+       (ABOUT TEST FRAMEWORKS): Add sed/cmp/diff (a la C News) as an option.
+
+       * NEWS: Change entry regarding "cvs log" not invoking "rlog" so
+       that it emphasizes user-visible behaviors.
+
+Tue Aug  6 17:01:23 1996  Ian Lance Taylor  <address@hidden>
+
+       * TODO: Remove item #167 (cvs log doesn't understand symbolic
+       branch names).  It works now.
+
+       * NEWS: Mention that "cvs log" no longer invokes "rlog".
+
+Wed Jul 31 16:06:03 1996  Jim Kingdon  <address@hidden>
+
+       * HACKING: Mention rule about _ vs - in file names.
+
+Wed Jul 24 19:10:38 1996  Ian Lance Taylor  <address@hidden>
+
+       * NEWS: Mention that Kerberos encryption is now supported.
+
+Mon Jul 22 23:48:39 1996  Ian Lance Taylor  <address@hidden>
+
+       * NEWS: Mention that the commit message has changed slightly when
+       committing changes on a branch.
+
+Fri Jul 19 16:10:04 1996  Jim Kingdon  <address@hidden>
+
+       * TESTS: Say that GNU expr is part of sh-utils.
+
+Thu Jul 18 18:16:33 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention -k wrappers option.
+
+       * TESTS: In list of what we would like in a test framework, only
+       mention portable once, and other wording cleanups.
+
+Mon Jul 15 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Add src/ChangeLog (lets us edit it from within
+       the integrated development environment).
+
+Sun Jul 14 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Add src/zlib.c.  Add zlib group containing the .c
+       files in zlib.  Add /I "zlib" compiler options.
+
+Sun Jul 14 10:26:21 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Expand zlib item to emphasize user-visible (and
+       CVS-installer-visible) consequences.
+
+Sat Jul 13 21:11:50 1996  Ian Lance Taylor  <address@hidden>
+
+       * NEWS: Mention that -z now uses zlib.
+
+Fri Jul 12 18:54:21 1996  Ian Lance Taylor  <address@hidden>
+
+       * Makefile.in (USOURCE_SUBDIRS): Add zlib.
+       * configure.in (AC_OUTPUT): Add zlib/Makefile.
+       * configure: Regenerate.
+
+       * zlib/*: Import zlib 1.0.3.  Remove zlib/Makefile.  Modify
+       zlib/Makefile.in for use with CVS.
+
+Fri Jul 12 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Add src/buffer.c
+
+Wed Jul 10 18:44:58 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Say that rlog is deprecated.
+
+Tue Jul  9 14:37:41 1996  Jim Kingdon  <address@hidden>
+
+       * PROJECTS: Refer to comment in rcscmds.c regarding RCS library.
+
+       * HACKING: Expand comments on portability.
+
+Sun Jul  7 23:21:02 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS): Remove memmove; it was used by
+       a very old version of the CVS server for nefarious purposes and it
+       has been long gone.
+       * configure: Regenerated.
+
+Tue Jul  2 22:36:31 1996  Jim Kingdon  <address@hidden>
+
+       * TESTS: Add discussion of test frameworks.
+
+Fri Jun 28 20:27:56 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Describe "cvs diff -q" removal and new diff options.
+
+Thu Jun 13 17:29:30 1996  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove item #67 about having cvs import create CVS
+       directories; I don't think it is wise to have cvs import mess with
+       the directory it is working in at all.  Remove item #69 about
+       having import edit modules--in many cases there is no need for an
+       entry in modules.  Remove item #76 about running on top of SCCS;
+       we are clearly not evolving in that direction.  Remove item #91
+       about documenting how to import sources from SCCS or RCS; this is
+       now documented in cvs.texinfo.  Remove item #129 about "U CFTS/";
+       without more information it is impossible to know what behavior is
+       being discussed.  Remove item #157 concerning module names in cvs
+       release; cvs release takes a directory name, not a module name.
+       Remove item #159 about checking access times; this is as likely to
+       be an annoyance as a help, and people who are into that can just
+       look at the result from "cvs update" (directly or with a script).
+       Remove item #164 concerning variables in *info files; it is done.
+       Remove item #35 (it just says "cvs admin" is cheesy, which isn't
+       specific enough to be useful).  Rewrite #39 to be specific about
+       what would be nice in having branches track each other.  Remove
+       item #46--I'm not sure what it means and if it means that one
+       should check in with "cci" or some such instead of "cvs ci" then
+       that is an installation hassle and a minimal convenience.  Add
+       item #180.
+
+       * config.h.in: Regenerated.
+
+Thu Jun 13 1996  Ian Lance Taylor  <address@hidden>
+                and Jim Kingdon  <address@hidden>
+
+       * configure.in: Put -L${krb_libdir} in LDFLAGS temporarily when
+       looking for -ldes.
+       * configure: Regenerated.
+
+Mon Jun 10 13:13:35 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention NT local.
+
+Fri Jun  7 18:02:36 1996  Ian Lance Taylor  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention new annotate options.
+
+Thu Jun  6 14:08:31 1996  Jim Kingdon  <address@hidden>
+
+       * lib/savecwd.c: Revert CVS_* patch.  The include files where
+       CVS_* is defined were not included, and the code in question was
+       inside HAVE_FCHDIR which isn't defined on the Mac anyway.
+
+       * src/filesubr.c: Revert CVS_* patch in this one file.  The mac
+       port should have its own copy of filesubr.c instead.
+
+Wed Jun 05 10:03:10 1996  Mike Ladwig  <address@hidden>
+
+       * lib/{system.h,savecwd.c}, src/{add.c,checkout.c,client.c,
+       commit.c,create_adm.c,diff.c,edit.c,entries.c,fileattr.c,
+       filesubr.c,find_names.c,history.c,ignore.c,import.c,lock.c,
+       login.c,logmsg.c,mkmodules.c,modules.c,myndbm.c,no_diff.c,
+       parseinfo.c,patch.c,rcs.c,recurse.c,release.c,remove.c,root.c,
+       rtag.c,server.c,tag.c,update.c,vers_ts.c,wrapper.c}:
+       Under non-UNIX operating systems (MS-DOS, WinNT, MacOS), many
+       filesystem calls take only one argument; permission is handled
+       very differently on those systems than in UNIX.  On MacOS,
+       the naming scheme for volumes and subdirectories is quite
+       different.  This patch leaves hooks in the form of CVS_ACCESS,
+       CVS_CHDIR, CVS_CREAT, CVS_FOPEN, CVS_MKDIR, CVS_OPEN, CVS_OPENDIR,
+       CVS_RENAME, CVS_RMDIR, CVS_STAT, and CVS_UNLINK to accomodate
+       these differences.
+
+Thu Jun  6 11:11:53 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Say "changes from 1.7 to 1.8" not "changes since 1.7".
+
+Wed Jun  5 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Visual C++ 2.1 seems to want to reformat the line
+       breaks.  No substantive changes, I think.
+
+Thu May 30 15:35:57 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (DISTFILES): add TESTS.
+
+Tue May 28 13:10:42 1996  Jim Kingdon  <address@hidden>
+
+       * src/server.c: Add comment regarding out-of-order bug.
+       * TESTS: Explain out-of-order bug.
+
+       * INSTALL: Remove $CVSId$.  More strongly encourage people to skip
+       the tests if they don't have the time to look at the results.
+       Move most of the discussion of tests to new file TESTS, and add
+       some information on interpreting check.log output.
+       * README: In brief summary of install, don't spell out details of
+       "make check" or "cvs init" steps.
+
+Sun May 26 17:59:46 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Change "up-to-date" to "not locally modified"; the file
+       need not match the head revision it only need match some revision.
+
+Sun May 26 17:02:49 1996  Norbert Kiesel  <address@hidden>
+
+       * NEWS: document new option "-c" for tag
+
+Thu May 23 21:49:33 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Remove footnote 10.  The only kind of change suitable
+       for listing here is fairly easy portability stuff.
+
+Fri May 17 11:49:11 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Refer to cvs.texinfo and say "filesystem" not "fs".
+
+Thu May 16 17:13:56 1996  Noel Cragg  <address@hidden>
+
+       * NEWS: Mention all access methods.
+
+Wed May 15 23:38:15 1996  Noel Cragg  <address@hidden>
+
+       * NEWS: add info about access methods and document behavior change
+       for "cvs login."
+
+Mon May 13 10:37:09 1996  Greg A. Woods  <address@hidden>
+
+       * INSTALL: updated for Sun-3 SunOS 4.1.1_U1 (1.8.2)
+
+Fri May 10 09:39:49 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Document that -d overrides CVS/Root.
+
+Mon May  6 06:00:10 1996  Benjamin J. Lee  <address@hidden>
+
+       * Version 1.8.1
+
+Sun May  5 17:38:21 1996  Benjamin J. Lee  <address@hidden>
+
+       Integrated changes submitted by Ian Taylor <address@hidden>
+
+       * update.c (update_dirent_proc): cvs co -p doesn't print
+       anything when run from an empty directory.
+
+        * import.c (import_descend_dir): Check for a file in the
+        repository which will be checked out to the same name as the
+        directory.
+
+Sun May  5 15:49:00 1996  Benjamin J. Lee  <address@hidden>
+
+       * configure.in: autoconf 2.9 handles AC_CHECK_LIB in a
+       way that it can not be used to check for main().  Check
+       for printf() instead. (Reported by address@hidden)
+
+       * configure: Regenerated.
+
+Thu May  2 13:34:37 1996  Benjamin J. Lee  <address@hidden>
+
+       * Version 1.7.88
+
+Thu May  2 10:42:13 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Clarify what happened to examples directory.
+
+Thu May  2 02:06:49 1996  Benjamin J. Lee  <address@hidden>
+
+       * INSTALL: Updated for NeXTSTEP 3.3 (1.7)
+
+Thu May  2 01:40:55 1996  Benjamin J. Lee  <address@hidden>
+
+       * Compatibility fixes affecting QNX, NetBSD, and SCO
+
+       * configure.in (AC_CHECK_FUNCS): Added check for initgroups(),
+          (ac_cv_func_crypt) Added check for crypt() in -lcrypt;
+          define AUTH_SERVER_SUPPORT only if crypt() is found.
+
+       * configure: Regenerated.
+
+       * src/server.c (HAVE_INITGROUPS): Use initgroups() only if
+        located by configure.
+
+Wed May  1 15:38:56 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Remove item about reserving all-uppercase tag names.
+
+Wed May 01 00:18:01 1996  noel  <address@hidden>
+
+       * cvsnt.mak: remove all of those unnecessary libraries!  We only
+       need advapi32.lib and wsock32.lib.
+
+Wed Apr 24 16:48:35 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Document that -d overrides CVS/Root.
+
+Fri Apr 19 11:22:35 1996  Benjamin J. Lee  <address@hidden>
+
+       * Version 1.7.86
+
+Sun Apr 14 11:06:44 1996  Karl Fogel  <address@hidden>
+
+        * configure.in (AC_OUTPUT): generate contrib/elib/Makefile,
+        tools/Makefile, and tools/pcl-cvs/Makefile.  Do not any longer
+        generate contrib/pcl-cvs/Makefile.
+
+        * Makefile.in: deal w/ above changes.
+
+        * configure: regenerated.
+
+        * Added `tools' subdir (pcl-cvs will live there, as will other
+        things maintained along with the CVS distribution).
+
+Wed Apr 10 17:15:25 1996  Jim Kingdon  <address@hidden>
+
+       * README: Mention documentation and A4 paper in particular.
+
+Thu Mar 28 12:31:38 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Add "cvs annotate".
+
+Tue Mar 26 10:46:59 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: In example, change tag name to avoid using a tag name
+       reserved to CVS.
+
+       * NEWS: Document reservation of some tag names.
+
+Fri Mar 22 10:45:23 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Clarify that RCS is only for server or local.
+
+Mon Mar 18 10:15:18 1996  Jim Kingdon  <address@hidden>
+
+       * README: Mention address@hidden where we mention support
+       contracts, not at the end where people might be tempted to view it
+       as a generic help line.
+
+Thu Mar 14 16:34:26 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (stamp-h): Don't run ./config.status --recheck.
+
+Thu Mar 14 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Regenerate dependencies.
+
+Thu Mar 14 13:45:11 1996  Jim Blandy  <address@hidden>
+
+       * configure.in (AC_OUTPUT): Don't create examples/Makefile; we're
+       not using the examples directory any more.
+
+Wed Mar 13 17:02:00 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Refer to cvs.texinfo rather than out-of-date cvsinit
+       instructions.  Instead of telling everyone to update modules
+       whenever adding directories (which is optional), refer to the
+       manual regarding all administrative files.  Revise "make check"
+       instructions to be even less encouraging about submitting bug
+       reports.
+
+       * examples/*: Removed.
+       * Makefile.in (SUBDIRS): Remove examples.
+       * cvsinit.sh: Removed.
+       * Makefile.in: Remove all cvsinit and PROGS stuff.
+       * NEWS: Mention cvsinit -> cvs init change.
+
+Mon Mar 11 13:12:35 1996  Samuel Tardieu  <address@hidden>
+
+       * BUGS: removed previous description from Greg Woods (3/6/96)
+       since the bug seems to be corrected
+
+Wed Mar  6 10:35:32 1996  Greg A. Woods  <address@hidden>
+
+       * BUGS: describe a weird core-dump with 'cvs co -c'.  Now I can't
+       even get a stack backtrace again -- dbx dumps core!
+
+Fri Mar  1 09:21:56 1996  Jim Kingdon  <address@hidden>
+
+       * README.VMS: Remove distribution information (since it is no
+       longer different for VMS).  Various wording fixes to reflect the
+       fact that using rsh is just one of several ways to connect to a
+       cvs server, not "the official" one.  Say that the unsuitable rsh
+       is the UCX one.  Clarify what rsh uses privileged ports for.
+
+Fri Mar  1 01:26:28 1996  Benjamin J. Lee  <address@hidden>
+
+       * README.VMS, build.com: Added for VMS.
+
+Thu Feb 29 10:04:20 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention change to default ignore list.
+
+Thu Feb 29 00:28:08 1996  Peter Wemm  <address@hidden>
+
+       * configure.in: correctly spell FNM_PATHNAME in fnmatch() test,
+       the supplied test fails on proposed POSIX.2, lib/fnmatch.*, Linux,
+       FreeBSD, etc.
+       * configure: Regenerated.
+
+Tue Feb 27 10:43:14 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Change submission address to bug-cvs from info-cvs.
+       Encourage submissions to be in the form of diffs to INSTALL.
+
+Sun Feb 25 15:23:31 1996  Jim Kingdon  <address@hidden>
+
+       * HACKING: Fix typo.
+
+Fri Feb 23 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Add login.c and scramble.c.
+
+Fri Feb 23 16:36:11 1996  Jim Kingdon  <address@hidden>
+
+       * README: Mention comp.software.config-mgmt.  Don't mention old
+       cyclic-cvs mailing list.
+
+       * acconfig.h: Add AUTH_SERVER_SUPPORT.  Remove DIFF and GREP (no
+       longer used).
+       * configure.in: Define AUTH_SERVER_SUPPORT.
+       * config.h.in, configure: Regenerated.
+
+Thu Feb 22 22:32:09 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in: Remove AC_FUNC_ALLOCA.
+       * configure: Regenerated.
+
+Mon Feb 19 09:39:21 1996  Jim Kingdon  <address@hidden>
+
+       * HACKING: Add comments about portability and assert().
+
+Thu Feb 15 16:40:13 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention $USER internal variable.
+
+Thu Feb 15 14:00:00 1996  Gary Oberbrunner  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Add vasprintf.c and mkmodules.c
+
+Tue Feb 13 20:05:47 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS): Add strtoul.
+       * configure: Regenerated.
+
+Mon Feb 12 10:06:27 1996  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove mkmodules stuff.
+       * NEWS: Add item concerning mkmodules.
+
+       * configure.in (AC_REPLACE_FUNCS): Add vasprintf.
+       * configure: Regenerated.
+
+Sun Feb 11 16:43:38 1996  Karl Fogel  <address@hidden>
+
+        * Makefile.in (DISTFILES): added HACKING.
+
+Sun Feb 11 12:38:51 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Revise *info files feature (now user vars, not env vars).
+
+Fri Feb  9 23:51:39 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention env var in *info files feature.
+
+Fri Feb  9 02:41:50 1996  Jim Blandy  <address@hidden>
+
+       * Makefile.in (DISTFILES): Remove config.sub and config.guess from
+       the list; they're not distributed any more.
+
+Thu Feb  1 19:47:46 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Remove RM; no longer used.
+
+Thu Feb  1 14:38:04 1996  Karl Fogel  <address@hidden>
+
+        * configure: re-ran autoconf.
+
+        * Makefile.in (USOURCE_SUBDIRS, SUBDIRS): abstract unix source
+        subdirs to new var USOURCE_SUBDIRS, for lint's sake and possibly
+        etags's someday.
+        (lint): run in USOURCE_SUBDIRS only.
+
+Thu Feb  1 13:06:47 1996  Roland McGrath  <address@hidden>
+
+       * configure.in (WITH_KRB4): Escape $ in help text.
+
+Wed Jan 31 19:03:37 1996  Jim Kingdon  <address@hidden>
+
+       * HACKING: Add info about NEWS file and release process.
+
+Tue Jan 30 16:00:00 1996  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Change save-cwd.c to savecwd.c and regenerate
+       dependencies to take care of save-cwd.h.
+       * windows-NT/README: Update information about Visual C++ 4.0.
+
+Tue Jan 30 16:09:53 1996  Jim Kingdon  <address@hidden>
+
+       * Rename lib/save-cwd.c to lib/savecwd.c.  Avoiding a hyphen
+       seems to be the only way to get Visual C++ 2.1 to generate a
+       cvsnt.mak which Visual C++ 4.0 will accept.
+       * Rename lib/save-cwd.h to lib/savecwd.h for consistency.
+       * os2/Makefile.in, lib/Makefile.in, lib/savecwd.c, src/add.c,
+       src/import.c, src/modules.c, src/recurse.c, src/tag.c: Update
+       accordingly.
+
+       * INSTALL, os2/options.h, windows-NT/options.h,
+       macintosh/options.h, src/options.h.in: Remove SORT; it is no
+       longer used.
+
+Mon Jan 29 15:16:39 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Mention -b.  Don't talk about RCS 5.6.[5-7] beta
+       releases; this will be an issue for few if any people.  Remove
+       stuff about diff and --with-diffutils which is no longer true.
+
+       * README: Refer to HACKING file.  Refer to cvs.texinfo not
+       manpage.  Rewrite section about compatibility between CVS versions.
+       * HACKING: New file.
+       * INSTALL: Move -Wall section to HACKING; refer to HACKING.
+
+Wed Jan 24 20:26:55 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in: Remove diff stuff.  Also remove AC_CANONICAL_HOST
+       and bindir crud as that was the only place they were used.
+       * config.h.in, configure: Regenerated.
+       * config.sub, config.guess: Removed.
+       * src/options.h.in (DIFF): Change to "diff" and change comment to tell
+       people not to use -a.
+       * src/sanity.sh: New test binfiles tests for above-fixed bug (see
+       comments in patch_file in update.c--passing -a to diff generates a
+       patch which patch cannot apply).
+
+       * NEWS: Adjust to reflect existence of 1.7.
+
+Tue Jan 23 14:20:39 1996  Jim Blandy  <address@hidden>
+
+       * devel-cvs: New file, not to be included in the distribution.
+
+Thu Jan 18 21:46:56 1996  Jim Blandy  <address@hidden>
+
+       * BUGS: Remove all mention of the outdated address@hidden
+       and address@hidden addresses.  It turns out that people see
+       these addresses and use them.  Mention the proper way to report
+       bugs.
+
+Wed Jan 17 16:40:01 1996  Jim Kingdon  <address@hidden>
+
+       * README: Fix typo (info-cvs-requests -> info-cvs-request).
+
+Fri Jan 12 13:38:12 1996  Jim Kingdon  <address@hidden>
+
+       * configure.in, configure: Revert "Checking user's gender" change.
+       Sure, you only live once, but I want mine to be a *long* life, not
+       one interrupted by a CVS user who is not amused coming after me
+       with an axe.
+
+Fri Jan 12 12:46:23 1996  Karl Fogel  <address@hidden>
+
+        * configure: regenerated.
+
+        * configure.in: print "Checking user's gender... ok".  I mean,
+        what the heck, you only live once.
+
+Thu Jan 11 14:00:00 1996  Jim Kingdon  <peary.cyclic.com>
+
+       * cvsnt.mak: Update dependencies.
+
+Thu Jan 11 12:03:10 1996  Norbert Kiesel  <address@hidden>
+
+       * NEWS: document loss of CVS_NOADMIN.  Also, mention the
+         possibility to use "cvs" in .cvsrc.
+
+Wed Jan 10 20:40:23 1996  Karl Fogel  <address@hidden>
+
+        * configure: regenerated.
+
+        * configure.in (AC_OUTPUT): added `macintosh/Makefile'.
+
+        * Makefile.in (SUBDIRS): added `macintosh'.
+
+Wed Jan 10 01:17:18 1996  Jim Kingdon  <address@hidden>
+
+       * README: Remove URL of obsolete David Zuhn web page.
+
+       * FAQ: Replace entire file with short paragraph explaining the FAQ
+       is dead.
+
+       * configure.in: Don't set exec_prefix.  Set bindir from prefix if
+       exec_prefix isn't set.
+       * configure: Regenerated.
+
+       * INSTALL: Update list of machines for 1.6.85 (further changes to
+       the list of machines will not receive ChangeLog entries).
+
+Tue Jan  9 09:02:05 1996  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention changes in default ignore list.
+
+       * INSTALL: check.log is not in /tmp/cvs-sanity.  Mention
+       submitting bug reports as a possibility, not a request from us.
+       Separate out "make check" a bit to make clear it is optional.
+
+Mon Jan  8 11:42:40 1996  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Remove grep stuff; no longer necessary.
+       Don't say that patch must understand unidiffs; no longer true.
+       Suggest configuring with -Wall (here until we have a "how to hack
+       CVS document").
+
+Wed Jan  3 19:00:00 1996  Jim Kingdon  <address@hidden>
+
+       * .cvsignore: Add cvsnt.vcp.
+
+Mon Jan  1 22:45:50 1996  Jim Kingdon  <address@hidden>
+
+       * os2/Makefile.in (Makefile), windows-NT/Makefile.in (Makefile):
+       New rules.
+
+Sun Dec 31 16:52:49 1995  Karl Fogel  <address@hidden>
+
+        * NEWS: add a blurb about password authentication.
+
+Sun Dec 31 16:16:38 1995  Jim Kingdon  <address@hidden>
+
+       * README: Add "submissions will be distributed under the GPL"
+       language (like the newspapers have for letters to the editor).
+
+Thu Dec 21 16:00:00 1995  Jim Kingdon  <address@hidden>
+
+       * cvsnt.mak: Revert to an old version, then add in recent changes
+       to lists of files (using Visual C++; not by hand editing--this way
+       it can be used as an internal project not just an external one).
+
+Tue Dec 19 17:13:14 1995  Jim Kingdon  <address@hidden>
+
+       * NEWS: Mention -kb (strictly speaking a bugfix, not a new
+       feature, I guess, but it seems worth mentioning anyway).
+
+Tue Dec 19 17:00:00 1995  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove "regular TODO list:" line which accidentally got
+       checked in.
+
+Mon Dec 18 18:59:30 1995  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (TAR_VERBOSE): Default to empty, not "v".  I don't
+       want that whole long list of files any more than jimb's daily
+       update script does.
+
+Sun Dec 17 23:59:11 1995  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS): Remove vasprintf.
+       * configure: Regenerated.
+
+Sat Dec 16 17:19:45 1995  Jim Kingdon  <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS): Add vasprintf.
+       * configure: Regenerated.
+
+Mon Nov 20 14:19:47 1995  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove items about developer communications; they are done.
+       * NEWS: Mention developer communication features.
+       * cvsinit.sh: Also add notify file.
+
+Mon Dec 11 22:44:58 1995  Karl Fogel  <address@hidden>
+
+        * New subdir "macintosh", for Mike Ladwig's
+        <address@hidden> port-in-progress.
+
+Thu Dec  7 14:32:49 1995  Jim Meyering (address@hidden)
+
+       * Makefile.in (check): Make sure library is built before running
+       make in src.
+       (remotecheck): Likewise.
+       (installcheck): Likewise.
+
+Wed Dec  6 11:40:37 1995  J.T. Conklin  <address@hidden>
+
+       * configure.in: Remove leading -l from first argument of
+       AC_CHECK_LIB for -lkrb and -ldes checks.
+
+Mon Dec  4 08:06:31 1995  Jim Kingdon  <address@hidden>
+
+       * config.h.in: Regenerated.
+
+Sun Dec  3 20:05:10 1995  Jim Kingdon  <address@hidden>
+
+       * configure.in: Remove grep stuff.
+       * configure: Regenerated.
+
+Fri Dec  1 11:16:18 1995  Norbert Kiesel  <address@hidden>
+
+       * configure, config.h.in: re-ran autoconf
+
+       * configure.in (AC_CHECK_HEADERS): add sys/resource.h to list of
+         tested headers
+
+       * Makefile.in (DISTFILES): add config.sub and config.guess
+
+Thu Nov 23 09:01:53 1995  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove item about doc describing undoing a change; it
+       already does.
+
+Sun Nov 19 18:12:36 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (dist): Pull out the 'v' in the tar command to a
+       variable, so I can disable it in my daily update script.
+
+Tue Nov 14 18:31:36 1995  Greg A. Woods  <address@hidden>
+
+       * cvsinit.sh:
+       - new rcs id
+       - new opening comment
+       - read only one "word" for CVSROOT
+       - add checkoutlist, cvswrappers, taginfo, wrap, & unwrap to
+       examples install loop, special handling for latter....
+       - don't do any special stuff for loginfo -- always comment out
+       everything in the newly installed examples
+       - add a wee message to suggest editing newly installed examples
+       - tweak some more comments, esp. regarding install of contrib
+       scripts....
+       - make $CVSROOT/CVROOT/history group writable if it didn't exist
+       as it's not very useful otherwise
+
+Tue Nov 14 15:22:25 1995  Greg A. Woods  <address@hidden>
+
+       * cvsinit.sh: woops!  wasn't installing contrib/log!
+
+Tue Nov 14 12:09:11 1995  Greg A. Woods  <address@hidden>
+
+       * INSTALL: oops, missed a couple of things about "configure"
+
+       * configure: re-ran autoconf
+
+Tue Nov 14 11:06:25 1995  Greg A. Woods  <address@hidden>
+
+       * config.guess, config.sub: first time in (from autoconf-2.4)
+
+       * configure.in:
+       - updated to work with autoconf-2.4
+       - call AC_CANONICAL_HOST to get host OS type right (needs
+       config.sub and config.guess)
+       - added full support for --with-diffutils and --with-gnugrep
+       - fixed the diff search to work almost like the one for RCS-5.7
+       - fixed some quoting problems
+
+       * README: mention optional 'make check' step
+
+       * INSTALL:
+       - updated notes about working SunOS versions
+       - re-wrote notes about RCS, diffutils, etc.
+       - added notes about configuring with GNU diffutils and GNU grep
+       - added notes about using 'make check'
+       - changed bug reporiting instructions to mention cvsbug
+       - re-wrote notes about setting CVSROOT in shell startups
+
+Fri Nov  3 11:11:16 1995  Jim Kingdon  <address@hidden>
+
+       * README: Fix typo in URL of molli's web site.
+
+Tue Oct 31 19:28:16 1995  Karl Fogel  <address@hidden>
+
+        * testing something, please ignore.
+
+Mon Oct 23 18:37:27 1995  Karl Fogel  <address@hidden>
+
+        * configure: re-ran autoconf.
+
+        * configure.in (AC_OUTPUT): os2/Makefile.
+
+        * Makefile.in (SUBDIRS): added os2 subdir.
+
+Mon Oct 23 12:02:51 1995  Norbert Kiesel  <address@hidden>
+
+       * cvsnt.mak:  added lib/getline.c
+
+Fri Oct 20 17:04:55 1995  Norbert Kiesel  <address@hidden>
+
+       * cvsnt.mak: added src/expand_path.c, error.[ch] now in src
+
+Thu Oct 19 16:26:32 1995  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Remove note about RCS 5.7 and log messages
+       consisting only of whitespace; fixed in CVS on 11 Jul 95.
+
+Tue Oct 17 17:57:23 1995  Warren Jones  <address@hidden>
+
+       * man/cvs.5, examples/modules: Document -e.
+
+Tue Oct 10 16:34:25 1995  Thorsten Lockert  <address@hidden>
+
+       * configure.in: More crud looking for kerberos, this time for 4.4BSD.
+       * configure: Regenerated.
+
+Sun Oct  8 12:22:19 1995  Peter Wemm  <address@hidden>
+
+       * configure.in: check for POSIX and BSD style reliable signals
+       * configure: regenerated by autoconf
+       * config.h.in: regenerated by autoheader
+
+Fri Oct  6 21:50:48 1995  Jim Kingdon  <address@hidden>
+
+       There is little point in trying to share a file as trivial as
+       lib/error.c between programs.  So just admit it is CVS specific:
+       * lib/error.c: Move from here...
+       * src/error.c: ...to here, and remove CVS_SUPPORT ifdefs.
+       * lib/error.h: Move from here...
+       * src/error.h: ...to here.  Remove CVS_SUPPORT
+       ifdefs; remove unused variable error_message_count.
+       * src/Makefile.in (OBJECTS): Add error.o.
+       (SOURCES): Add error.c.
+       (HEADERS): Add error.h.
+       * lib/Makefile.in (OBJECTS): Remove error.o.
+       (SOURCES): Remove error.c.
+       (HEADERS): Remove error.h.
+       * acconfig.h, configure.in: Remove CVS_SUPPORT.
+       * configure, config.h.in: Rebuilt using autoconf and autoheader.
+       * windows-NT/config.h: Remove CVS_SUPPORT.
+
+Thu Oct  5 17:26:38 1995  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Mention Siemens-Nixdorf RM600.
+
+Tue Oct  3 09:32:19 1995  Jim Kingdon  <address@hidden>
+
+       * NEWS: Remove item about -f global option; it is old news already
+       mentioned elsewhere in the file.
+
+Mon Oct  2 18:12:15 1995  Jim Blandy  <address@hidden>
+
+       * FAQ: Updated for CVS 1.5.  And now 1.6 is almost out.  The FAQ
+        always lags the package, sigh...
+
+Mon Oct  2 18:10:35 1995  Larry Jones  <address@hidden>
+
+       * configure, config.h.in: Rebuilt using autoconf and autoheader.
+
+       * configure.in: check for <sys/bsdtypes.h>; used by src/server.c.
+       (ISC keeps all the stuff that BSD has in <sys/types.h> here, so
+       we need it for the FD_SET stuff for select().)
+       Moved check for gethostname() after check for connect() since if
+       connect() is not found, we may add librariesd and gethostname()
+       may well be in one of those libraries.
+       If connect() isn't found, look in -linet (ISC) in addition to
+       -lsocket and -lnsl.  Also, ignore the cache since we need to
+       update LIBS reguardless of whether it was found before or not and
+       the answer may well be different afterwards.
+       Define CLIENT_SUPPORT and SERVER_SUPPORT only if connect() is
+       found.
+
+       * INSTALL: update info for ISC 4.0.1; renumber footnotes.
+
+Mon Oct  2 17:01:07 1995  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Indicate CVS version tested with Solaris 2.4.
+
+Mon Oct  2 10:42:37 1995  Karl Fogel  <address@hidden>
+
+        * (configure): Re-ran autoconf.
+
+Mon Oct  2 10:33:58 1995  Michael Finken  <address@hidden>
+
+        * configure.in: AC_REPLACE `strstr'.
+
+Sun Oct  1 23:22:28 1995  Bryan O'Sullivan  <address@hidden>
+
+       * (INSTALL): noted that CVS works fine on Solaris 2.4 with both
+         gcc and SPARCworks cc.
+
+Sun Oct  1 18:48:19 1995  Karl Fogel  <address@hidden>
+
+        * (configure): re-ran autoconf following Peter Wemm's change
+        below.
+
+Sun Oct  1 22:24:56 1995  Peter Wemm  <address@hidden>
+
+       * configure.in: more extensive searching for -lsocket and -lnsl
+       as done in Taylor-UUCP 1.06
+
+Sun Oct  1 15:32:01 1995  Karl Fogel  <address@hidden>
+
+        * (configure): re-ran autoconf.
+
+Sun Oct  1 11:35:17 1995  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove item about setting comment leader automatically;
+       RCS 5.7 does this.
+
+Wed Sep 27 15:34:04 1995  Peter Wemm  <address@hidden>
+
+       * configure.in: correct detection of GNU diff's -a option for
+       src/options.h
+       * configure: regenerate with autoconf
+
+Fri Sep 22 14:29:31 1995  Jim Kingdon  <address@hidden>
+
+       * TODO: Remove item about reindenting on the way in and out.
+       wrappers provide this functionality.
+
+Wed Sep 20 14:27:28 1995  Jim Blandy  <address@hidden>
+
+        * configure.in: #define the symbols DIFF and GREP to be the paths
+       to the DIFF and GREP programs; their values will be edited into
+       src/options.h (and config.h, coincidentally).
+       * acconfig.h (DIFF, GREP): Add these.
+       * configure, config.h.in: Rebuilt using autoconf and autoheader.
+
+Sun Sep 10 21:38:05 1995  Jim Kingdon  <address@hidden>
+
+       * TODO: CVS can already undo a change, suggest documenting how.
+       Expand slightly on mode stuff.
+       Remove item about not letting people check out into repository (it
+       is done).
+       Redo item about expanding env vars in *info to reflect current
+       thinking.
+       Remove item about making it hard to accidentally move tags; it is
+       done.
+       Add client/server note to suggestion regarding interactive merging.
+
+Fri Sep  1 12:07:02 1995  Jim Kingdon  <address@hidden>
+
+       * BUGS: Remove items about refetching unpatchable files and options.h.
+
+Fri Sep  1 09:20:09 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (DISTFILES): Remove cvsnt.vcp; it's been deleted.
+
+Thu Aug 31 13:47:35 1995  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (stamp-h): Rebuild config.status before trying to
+       use it to build config.h.
+
+       * Makefile.in: Change "cd foo; make" to "cd foo && make";
+       otherwise we get into an infinite loop if an objdir doesn't exist.
+
+Thu Aug 31 11:07:06 1995  Jim Blandy  <address@hidden>
+
+       * configure.in: Arrange not to touch options.h if we haven't
+       modified it.  AC_CONFIG_HEADER checks if the file is unmodified,
+       whereas AC_OUTPUT doesn't, and they're otherwise identical, so...
+       (AC_CONFIG_HEADER): ... mention src/options.h here...
+       (AC_OUTPUT): ... not here.
+       Copy src/options.h to src/options.h-SAVED, don't move it.
+       Otherwise, configure will create it again every time.
+       Remove the code to compare the new src/options.h with
+       src/options.h-SAVED and move it back if it's unchanged; autoconf
+       writes that for us now.
+
+Wed Aug 30 18:45:28 1995  Jim Blandy  <address@hidden>
+
+        * .cvsignore: Ignore WinDebug and WinRel directories, used by
+       Microsoft Visual C++ to store object files and executables.
+
+       * acconfig.h (CVS_SUPPORT, CLIENT_SUPPORT, SERVER_SUPPORT): New
+       symbols, which autoheader will use to build config.h.in from
+       configure.in.
+       * configure.in (SERVER_SUPPORT, CLIENT_SUPPORT): Remove spaces
+       between AC_DEFINEs and opening parens of argument lists.  Oops.
+       * configure: Rebuild using autoconf.
+       * config.h.in: Rebuild using autoheader.
+
+       * Makefile.in (SUBDIRS): Uncomment windows-NT.
+
+       * INSTALL: Added Windows NT to list of supported platforms.
+       Added Windows NT installation instructions.
+
+Tue Aug 29 16:08:01 1995  Jim Blandy  <address@hidden>
+
+       * cvsnt.mak: Completed Windows NT port.
+
+       * configure.in (SERVER_SUPPORT, CLIENT_SUPPORT): Arrange for these
+       to get #defined.  In the config.h file for the Windows NT port, we
+       only #define CLIENT_SUPPORT.
+       * config.h.in (SERVER_SUPPORT, CLIENT_SUPPORT): Add #undefs for
+        these.
+
+       * configure.in (AC_OUTPUT): Build the Makefile for the windows-NT
+       subdirectory too.
+
+       * cvsnt.vcp: Removed.  This doesn't store any information needed
+       to compile CVS; it seems to be mostly programmer preference stuff.
+       There's no need to distribute it.
+
+       * INSTALL: Added info about Harris Nighthawk from Steve Allen ---
+       thanks!
+
+Mon Aug 21 16:08:37 1995  Jim Blandy  <address@hidden>
+
+        Bring the saga to a close:
+       * configure.in: Use AC_PROG_MAKE_SET here, to decide whether we
+       need to set the MAKE variable in Makefile.
+       * Makefile.in: Use @SET_MAKE@ here, to set MAKE when appropriate.
+
+Mon Aug 21 15:26:29 1995  Jim Kingdon  <address@hidden>
+
+       * Makefile.in: Add comment regarding AC_SET_MAKE.
+
+Sat Aug 19 21:57:51 1995  Jim Blandy  <address@hidden>
+
+       * configure.in: Define CVS_SUPPORT, to tell certain library
+       functions that they're part of CVS.
+       * config.h.in: Add #undef for CVS_SUPPORT, for configure to chew
+       on.
+
+Fri Aug 18 22:35:34 1995  Jim Kingdon  <address@hidden>
+
+       * Makefile.in: Don't set MAKE; apparently all makes set it and GNU
+       make, at least, will set it to what make was invoked as (perhaps gmake
+       or some such), not just "make" (which might not support VPATH, for
+       example).
+
+Sun Aug 13 23:35:47 1995  Jim Kingdon  <address@hidden>
+
+       * INSTALL: Convert Data General entry to same format as other entries.
+
+Sun Aug 13 13:11:36 1995  Jim Blandy  <address@hidden>
+
+       * cvs-format.el: Add note about set-c-style.
+
+Thu Aug  3 16:13:29 1995  Jim Blandy  <address@hidden>
+
+       * INSTALL: Fixed mail address for updates.
+
+        * INSTALL: Noted that 1.5 runs on SunOS 4.1.1 -- 4.1.3.
+
+Sun Jul 30 20:12:26 1995  James Kingdon  <address@hidden>
+
+       * cvsinit.sh: Unify code for modules and loginfo with code for
+       other files which have checked-out and ,v files in CVSROOT.
+       Don't add "#" to start of lines in rcstemplate.
+
+Sat Jul 29 16:48:05 1995  James Kingdon  <address@hidden>
+
+       * cvsinit.sh: If arguments are given, give version number and
+       usage message.  Make printed messages much more concise.
+
+       * cvsinit.sh: Rename log.pl to log.  Don't install log twice.
+
+       * Makefile.in (install-local), contrib/Makefile.in (install):
+       Remove "reminder" to run cvsinit; running cvsinit is not required.
+
+Fri Jul 28 16:46:10 1995  James Kingdon  <address@hidden>
+
+       * Makefile.in (SUBDIRS): Comment out windows-NT.
+
+Fri Jul 28 02:27:54 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (DISTFILES): Add cvsnt.mak and cvsnt.vcp.
+       (SUBDIRS): Add windows-NT.
+
+       * config.h.in: Regenerated from configure.in by autoheader.
+
+Wed Jul 19 18:00:00 1995  Jim Blandy  <address@hidden>
+
+       * configure.in (AC_CHECK_HEADERS): Check for <io.h> and <direct.h>.
+
+Tue Jul 18 21:18:00 1995  Jim Blandy  <address@hidden>
+
+       * configure.in (AC_CHECK_HEADERS): Check for sys/param.h; Windows NT
+       doesn't have it.
+
+       * configure.in (AC_CHECK_HEADERS): Check for sys/time.h.  If you're
+       using AC_HEADER_TIME, it's best to check for this too.
+
+       * cvsnt.mak: New file --- makefile equivalent for Microsoft Visual C++.
+       Choose this as your project when working with CVS under MSVC++.
+       * cvsnt.vcp: New file --- configuration info for Microsoft Visual C++.
+       * windows-NT: New subdirectory, containing files to be used to
+       build under Microsoft Windows NT.
+
+Wed Jul 12 23:26:24 1995  James Kingdon         <address@hidden>
+
+       * Makefile.in: Remove duplicate install-info rule.
+
+Wed Jul 12 16:00:27 1995 Karl Fogel <address@hidden>
+
+       * Makefile.in (install-local): added rule for install-info, made
+       `install' depend on it.
+
+       * README: correct mailing list addresses.
+       * INSTALL: same.
+
+Wed Jul 12 09:15:02 1995  Jim Meyering (address@hidden)
+
+       * configure.in (gdiff_path): Remove gdiff from the list of programs.
+       SGI's Irix includes a program named gdiff that is an X-based GUI to
+       diff.
+
+       * configure.in: Add check for working fnmatch functions so that
+       systems providing it don't incur the space overhead of linking
+       with the version in lib.  Cross compiling builds always use the
+       version in lib.
+
+Tue Jul 11 15:47:20 1995  Greg A. Woods         <address@hidden>
+
+       * configure.in: add some FIXME comments
+       - add a hack to restore src/options.h if AC_OUTPUT() didn't modify
+       it. Note that this does *not* work for config.status, thus one
+       FIXME comment.
+       - add test for #! (to warn about possible failure of perl scripts
+       - add test for diff and grep paths (for src/options.h.in)
+       - fix up handling of src/options.h.in
+       - add checks for PERL_PATH and CSH_PATH (from previous local changes)
+
+Tue Jul 11 14:31:18 1995  Michael Shields  <address@hidden>
+
+       * Makefile.in (LDFLAGS): Pick up from configure.
+
+Sun Jul         9 19:03:00 1995  Greg A. Woods  <address@hidden>
+
+       * configure: re-ran autoconf-2.4
+
+       * cvsinit.sh: make use of xVERSIONx from the Makefile
+       - get rid of stuff duplicated in examples/* and use that instead
+
+       * Makefile.in: $(VERSION) for cvsinit.sh wasn't set, so get it
+       from src/version.c instead.
+
+       * cvsinit.sh: install two more example CVSROOT control/config
+       files: rcstemplate checkoutlist
+       - install useful scripts from $CVSLIB/contrib too...
+       (from previous local changes)
+
+       * Makefile.in: add another reminder to run 'cvsinit' to update
+       repository(ies) (from previous local changes)
+
+Thu Jul         6 17:53:55 1995  Paul Eggert  <address@hidden>
+
+       * Makefile.in (mostlyclean-local): Remove $(PROGS).
+
+Sat Jul         1 13:11:41 1995  James Kingdon  <address@hidden>
+
+       * Version 1.5.1.
+
+Thu Jun 29 01:02:09 1995  James Kingdon         <address@hidden>
+
+       * configure.in, configure: cross_compiling gets set to "no", not
+       empty--change test accordingly.
+
+       * Version 1.4.93.
+
+Wed Jun 28 22:33:54 1995  James Kingdon         <address@hidden>
+
+       * lib/Makefile.in, man/Makefile.in, doc/Makefile.in: Comment out
+       rules for configure and config.status, just like in Makefile.in or
+       src/Makefile.in.
+
+Tue Jun 27 19:53:05 1995  James Kingdon         <address@hidden>
+
+       * configure.in (AC_REPLACE_FUNCS), configure: Remove fnmatch.
+       * lib/Makefile.in (OBJECTS): Add fnmatch.
+       Avoids buggy Solaris 2.4 libc fnmatch.
+
+       * FAQ: Updated with new version from ftp.odi.com.
+
+Mon Jun 26 15:17:46 1995  James Kingdon         <address@hidden>
+
+       * Version 1.4.92.
+
+Thu Jun 22 12:45:24 1995  James Kingdon         <address@hidden>
+
+       * Version 1.4.91.
+
+Wed Jun 21 16:33:04 1995  James Kingdon         <address@hidden>
+
+       * PROJECTS: New file.
+       * Makefile.in (DISTFILES): Add it.
+
+Wed Jun 21 16:12:14 1995  James Kingdon         <address@hidden>
+
+       * Makefile.in (FLAGS_TO_PASS): Don't pass INSTALL to sub-makes.
+       The reason for passing it is gone now that we are using autoconf
+       2.x which will set INSTALL in the sub-makefiles correctly.
+
+Tue Jun 20 18:14:54 1995  James Kingdon         <address@hidden>
+
+       * configure.in, configure: Make sure src directory exists before
+       trying to copy options.h to it.
+
+Mon Jun 19 13:47:20 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in: Add a "remotecheck" target here, for consistency;
+       people shouldn't have to switch to src before running the tests.
+
+Mon Jun 19 10:08:03 1995  Jim Kingdon  (address@hidden)
+
+       * INSTALL: Update list of machines tested.  Remove note about
+       systems missing opendir--this is an autoconf issue, not something
+       installers should have to worry about.  Refer to NEWS instead of
+       ChangeLog.  No longer "strongly recommend" putting diff -a in
+       options.h.
+
+Fri Jun 16 22:30:03 1995  Jim Kingdon  (address@hidden)
+
+       * Version 1.4.90.
+
+       * configure, configure.in (AC_OUTPUT): Add config/pcl-cvs/Makefile.
+
+       * Makefile.in (dist): Rename dist from ccvs-<version> to cvs-<version>.
+
+       * Makefile.in (dist, dist-dir), src/Makefile.in, doc/Makefile.in,
+       examples/Makefile.in, contrib/Makefile.in,
+       contrib/pcl-cvs/Makefile, man/Makefile.in, lib/Makefile.in
+       (dist-dir): Use srcdir where appropriate.
+
+Thu Jun 15 14:33:37 1995  Jim Kingdon  (address@hidden)
+
+       * CYCLIC-CVS-FAQ: Removed.
+       * Rename ChangeLog.fsf to NEWS.  Add information about changes
+       since 1.4A2.
+       * Makefile.in (DISTFILES): Adjust accordingly.
+       * README: Revise to reflect current status of releases.
+
+Thu Jun 15 12:22:42 1995  Jim Kingdon  (address@hidden)
+
+       * TODO: Remove various items already fixed.  Revise others.
+
+Thu Jun 15 12:24:45 1995  J.T. Conklin <address@hidden>
+
+       * configure.in: Use AC_C_INLINE to handle inline.
+       Reorganized to put compiler and OS checks first so that any
+       special defines they might provide are used in subsequent tests.
+
+       * configure, config.h.in: regenerated with autoconf and
+       autoheader version 2.3.
+
+Thu Jun         8 16:33:51 1995  Jim Kingdon  (address@hidden)
+
+       * INSTALL (Installation): Disrecommend RCS 5.6.[5-7].
+
+Tue May 30 00:07:15 1995  Jim Meyering (address@hidden)
+
+       * Makefile.in (distclean-local): Don't delete config.status here.
+       (distclean): Delete config.status here instead, but only after
+       recursive make invocations.  Otherwise, the new dependencies
+       in */Makefile.in on ../config.status led to failure in each sub-make
+       because there is no rule there to make ../config.status.
+       Reported by Jeff Johnson <address@hidden>.
+       (realclean): Likewise.
+
+Mon May 29 22:24:28 1995  J.T. Conklin <address@hidden>
+
+       * configure.in: Use AC_HEADER_DIRENT instead of AC_DIR_HEADER.
+       Use AC_HEADER_STAT to determine if S_FOO() macros work.
+       Use AC_HEADER_TIME to determine if both <sys/time.h> and <time.h>
+       can be included as recommend by autoconf manual.
+       Remove AC_STRUCT_TM test, as above test is better.
+
+       * configure, config.h.in: regenerated with autoconf and
+       autoheader version 2.3.
+
+Fri Apr 28 14:36:49 1995  Ken Raeburn  (address@hidden)
+
+       * Makefile.in: Set "all" as default target instead of ".PHONY".
+       Some versions of make will otherwise try building all of the phony
+       targets, in order.
+
+Mon May         1 14:02:42 1995  Jim Blandy  <address@hidden>
+
+       * configure.in: Set up src/options.h for the user.  Its defaults are
+       usually right.
+       * README, INSTALL: Adjust installation instructions appropriately.
+
+Fri Apr 28 22:31:26 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (DISTFILES): Brought up-to-date.
+       (dist): Rewritten to use dist-dir targets, passing DISTDIR variable.
+       (GZIP, GZIP_EXT): New variables.
+       (dist-dir): New target.
+
+       We don't want to include a file the user has to edit in the
+       distribution.
+       * src/options.h: No longer distributed.
+       * src/options.h.in: Distribute this instead.
+       * INSTALL, README: Installation instructions updated.
+
+Sat Apr         8 19:02:21 1995  Roland McGrath  <address@hidden>
+
+       * configure.in: Check for fchdir.
+       (connect check): Use AC_CHECK_LIB instead of (obsolete)
+       AC_HAVE_LIBRARY.
+
+Sat Apr         8 14:52:46 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (CFLAGS): Let configure set the default for CFLAGS.
+       Under GCC, we want -g -O.
+
+Wed Feb         8 06:49:49 1995  Roland McGrath  <address@hidden>
+
+       * Makefile.in (stamp-h): Pass CONFIG_FILES=$@ to config.status so
+       the target is created.
+       * configure.in: Applied `autoupdate' from Autoconf 2.1 to
+       modernize macro usage.
+       (AC_RSH): Call removed.  It was obsolete and not doing anything useful.
+       (AC_OUTPUT): Write stamp-h as the Makefile rules expect we will.
+       (AC_TYPE_PID_T): Add this check.
+
+Tue Nov         8 06:26:54 1994  Jim Kingdon  (address@hidden)
+
+       * Add stamp-h.in.  Remove it from .cvsignore.
+
+Fri Oct 28 11:50:51 1994  Jim Kingdon  (address@hidden)
+
+       * Makefile.in: Comment out autoconf and autoheader rules.
+
+Tue Oct 25 17:44:13 1994  Ken Raeburn  <address@hidden>
+
+       * Makefile.in (all, install, uninstall): Fail if make in
+       subdirectory fails.
+
+Tue Oct 18 13:26:15 1994  Jim Kingdon  (address@hidden)
+
+       * Makefile.in (FLAGS_TO_PASS): Pass INSTALL*.  Add comment about
+       why we need to.
+
+Tue Sep 27 08:27:06 1994  Jim Kingdon  (address@hidden)
+
+       * Makefile.in (SUBDIRS): Reinstate "contrib".
+       * configure.in (AC_OUTPUT): Add contrib/Makefile.
+       * configure: Regenerated.
+
+Tue Sep 27 01:03:59 1994  John Gilmore (address@hidden)
+
+       * Makefile.in (SUBDIRS):  Comment out "contrib".  Since we don't
+       bother to configure it, we shouldn't make it either.
+
+Wed Aug 10 14:52:57 1994  Ken Raeburn  (address@hidden)
+
+       * Makefile.in (FLAGS_TO_PASS): Don't include LIBS or CFLAGS twice.
+
+       * configure.in: Include waitpid and memmove in AC_REPLACE_FUNCS
+       list.  Don't check for memmove separately.
+       * configure: Regenerated.
+       * config.h.in: Regenerated for Mark's change.
+
+Wed Aug 10 14:32:24 1994  Mark Eichin  (address@hidden)
+
+       * configure.in (KRB4): recognize --with-krb4=path. Also test for
+       krb_get_err_text so src/main.c and src/client.c can deal
+       appropriately.
+
+Tue Aug         9 15:49:07 1994  Ken Raeburn  (address@hidden)
+
+       * configure.in: Check sizes of `long' and `int', needed for md5
+       code.
+       * acconfig.h: New file.  Mention HAVE_KERBEROS, to keep autoheader
+       happy.
+       * configure, config.h.in: Regenerated.
+
+Tue Jul 19 11:23:21 1994  Ian Lance Taylor  (address@hidden)
+
+       * configure.in: Check not only that krb.h exists, but that it will
+       actually compile correctly.
+       * configure: Regenerated.
+
+Mon Jul 11 07:04:36 1994  Jim Kingdon  (address@hidden)
+
+       * configure.in: Add comment re autoheader.
+
+Tue Jun 28 22:09:23 1994  Ian Lance Taylor  (address@hidden)
+
+       * configure.in: Only look for -lsocket and -lnsl if we don't
+       already have connect.
+       * configure: Regenerated.
+
+Mon Jun 27 17:21:48 1994  Ian Lance Taylor  (address@hidden)
+
+       * configure.in: Correct "krb_libdir" to "${krb_libdir}".
+       * configure: Regenerated.
+
+Fri Jun         3 10:15:24 1994  Ian Lance Taylor  (address@hidden)
+
+       * configure.in: Check for -lsocket and -lnsl.
+       * configure: Regenerated.
+
+Fri May 27 18:12:43 1994  Ian Lance Taylor  (address@hidden)
+
+       * configure.in: Add valloc to AC_REPLACE_FUNCS.  Add getpagesize
+       to AC_HAVE_FUNCS.  Check for krb.h and -lkrb.  If not found, look
+       in /usr/kerberos if native.  If found somewhere, define
+       HAVE_KERBEROS and also look for -ldes.  Substitute includeopt.
+       * configure: Regenerated.
+
+Fri Mar 11 13:11:51 1994  Ian Lance Taylor  (address@hidden)
+
+       * configure.in: Check for <sys/select.h>; used by src/server.c.
+       * configure: Regenerated.
+
+Sun Jan         9 12:04:15 1994  Ken Raeburn  (address@hidden)
+
+       * configure.in: Check for timezone function, for NetBSD support.
+       * configure: Regenerated.
+
+Wed Dec 15 18:05:21 1993  david d `zoo' zuhn  (address@hidden)
+
+       * Makefile.in: add MAKEINFO to MDEFINES, pass down MDEFINES on all
+         recursive make invocations that require it; define
+         INSTALL_PROGRAM and use it; reorganize MDEFINES; set infodir and
+         add to MDEFINES; use YACC instead of BISON
+
+
+Mon Dec         6 17:02:18 1993  K. Richard Pixley  (address@hidden)
+
+       * src/diff.c (diff_fileproc): add support for "cvs diff -N" which
+         allows for adding or removing files via patches.
Index: ccvs/GPG-TODO
diff -u /dev/null ccvs/GPG-TODO:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/GPG-TODO       Wed Dec 21 13:25:08 2005
@@ -0,0 +1,27 @@
+Segment 1: Sign Commits and Store Signatures (6 days)
+*   4.3.1 Scan for Keywords in Commit Data & Error/Warn
+          & Supply Force Option: 1 day
+*   4.3.1 Convert EOLs, Sign, Accept Command Line Template
+          Option, Send Signature in New Server Request: 2 days
+*   4.3.2 Receive New Sig Request and Save in RCS File: 1 day
+*   4.1 Parse New RCS Phrase, Parse & Store Signatures: 2 days
+
+Segment 2: Use CVS/Base Files (8 days)
+*   4.2.2 New Naming Convention: 1 day
+>   4.2 Always Save Base Revisions in Sandbox: 4 days
+    4.2.3 Send Signatures & Store in Base: 1 day
+-   4.2.4 Delay End of Line Conversion: 2 days
+
+Segment 3: CVS Log, Status, Verify, & Sign (6 days)
+    4.5 cvs log Prints Sig Summary Data: 1 day
+    4.6 Download Base Revision, Download Sig, Verify: 1 day
+    4.6.3 cvs verify -p Cats Sig to stdout, cvs status
+          Automatically Verifies: 1 day
+    4.7 cvs sign Command: 1 day
+    4.7 cvs sign -d to Delete Signatures from Revisions: 1 day
+    4.3.2 Server Verifies Signatures when Configured So: 1 day
+
+Segment 4: Checkout/Update/Diff (8 days)
+    4.4.1 Verify each Revision after Download: 1 day
+    4.4.2 Client-side Merges: 5 days
+    4.2.5.2 Client-side Diffs: 2 days
Index: ccvs/Makefile.in
diff -u /dev/null ccvs/Makefile.in:1.181.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/Makefile.in    Wed Dec 21 13:25:08 2005
@@ -0,0 +1,774 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Master Makefile for the GNU Concurrent Versions System.
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#               1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+#               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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+       $(srcdir)/cvs.spec.in $(top_srcdir)/configure \
+       $(top_srcdir)/emx/Makefile.in $(top_srcdir)/os2/Makefile.in \
+       $(top_srcdir)/zlib/Makefile.in ABOUT-NLS AUTHORS COPYING \
+       COPYING.LIB ChangeLog INSTALL NEWS TODO build-aux/compile \
+       build-aux/config.guess build-aux/config.rpath \
+       build-aux/config.sub build-aux/depcomp build-aux/install-sh \
+       build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex \
+       build-aux/ylwrap
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno configure.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = cvs.spec emx/Makefile os2/Makefile zlib/Makefile
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-exec-recursive install-info-recursive \
+       install-recursive installcheck-recursive installdirs-recursive \
+       pdf-recursive ps-recursive uninstall-info-recursive \
+       uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+
+# Unix source subdirs, where we'll want to run lint and etags:
+# This is a legacy variable from b4 Automake
+USOURCE_SUBDIRS = lib $(ZLIB_SUBDIRS) diff src
+# All other subdirs:
+SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tools \
+       windows-NT os2 emx vms maint-aux
+
+ACLOCAL_AMFLAGS = -I m4
+EXTRA_DIST = \
+       .cvsignore \
+       BUGS \
+       ChangeLog.zoo \
+       DEVEL-CVS \
+       FAQ \
+       HACKING \
+       MINOR-BUGS \
+       PROJECTS \
+       README.VMS \
+       TESTS \
+       build.com \
+       cvs-format.el \
+       cvsnt.dep \
+       cvsnt.dsp \
+       cvsnt.dsw \
+       cvsnt.mak \
+       cvs.spec \
+       mktemp.sh \
+       build-aux/bison-missing \
+       m4/ChangeLog \
+       m4/README
+
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+       @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+             cd $(srcdir) && $(AUTOMAKE) --gnu  \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           echo ' $(SHELL) ./config.status'; \
+           $(SHELL) ./config.status;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+       @if test ! -f $@; then \
+         rm -f stamp-h1; \
+         $(MAKE) stamp-h1; \
+       else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+       @rm -f stamp-h1
+       cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+       cd $(top_srcdir) && $(AUTOHEADER)
+       rm -f stamp-h1
+       touch $@
+
+distclean-hdr:
+       -rm -f config.h stamp-h1
+cvs.spec: $(top_builddir)/config.status $(srcdir)/cvs.spec.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+emx/Makefile: $(top_builddir)/config.status $(top_srcdir)/emx/Makefile.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+os2/Makefile: $(top_builddir)/config.status $(top_srcdir)/os2/Makefile.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+zlib/Makefile: $(top_builddir)/config.status $(top_srcdir)/zlib/Makefile.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(am__remove_distdir)
+       mkdir $(distdir)
+       $(mkdir_p) $(distdir)/. $(distdir)/build-aux $(distdir)/contrib 
$(distdir)/doc $(distdir)/emx $(distdir)/m4 $(distdir)/os2 $(distdir)/src 
$(distdir)/zlib
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} 
\; \
+       || chmod -R a+r $(distdir)
+dist-gzip: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
+       $(am__remove_distdir)
+dist-bzip2: distdir
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+dist-tarZ: distdir
+       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+       $(am__remove_distdir)
+
+dist-shar: distdir
+       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       $(am__remove_distdir)
+
+dist-zip: distdir
+       -rm -f $(distdir).zip
+       zip -rq $(distdir).zip $(distdir)
+       $(am__remove_distdir)
+
+dist dist-all: distdir
+       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+       $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+       case '$(DIST_ARCHIVES)' in \
+       *.tar.gz*) \
+         GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+       *.tar.bz2*) \
+         bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+       *.tar.Z*) \
+         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+       *.shar.gz*) \
+         GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+       *.zip*) \
+         unzip $(distdir).zip ;;\
+       esac
+       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       mkdir $(distdir)/_build
+       mkdir $(distdir)/_inst
+       chmod a-w $(distdir)
+       dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
+         && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+         && cd $(distdir)/_build \
+         && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+           $(DISTCHECK_CONFIGURE_FLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) \
+         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) check \
+         && $(MAKE) $(AM_MAKEFLAGS) install \
+         && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+         && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" 
\
+               distuninstallcheck \
+         && chmod -R a-w "$$dc_install_base" \
+         && ({ \
+              (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+              && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+                   distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+             } || { rm -rf "$$dc_destdir"; exit 1; }) \
+         && rm -rf "$$dc_destdir" \
+         && $(MAKE) $(AM_MAKEFLAGS) dist \
+         && rm -rf $(DIST_ARCHIVES) \
+         && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+       $(am__remove_distdir)
+       @(echo "$(distdir) archives ready for distribution: "; \
+         list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+         sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+distuninstallcheck:
+       @cd $(distuninstallcheck_dir) \
+       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+          || { echo "ERROR: files left after uninstall:" ; \
+               if test -n "$(DESTDIR)"; then \
+                 echo "  (check DESTDIR support)"; \
+               fi ; \
+               $(distuninstallcheck_listfiles) ; \
+               exit 1; } >&2
+distcleancheck: distclean
+       @if test '$(srcdir)' = . ; then \
+         echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+         exit 1 ; \
+       fi
+       @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+         || { echo "ERROR: files left in build directory after distclean:" ; \
+              $(distcleancheck_listfiles) ; \
+              exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf $(top_srcdir)/autom4te.cache
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
+       check-am clean clean-generic clean-recursive ctags \
+       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
+       dist-tarZ dist-zip distcheck distclean distclean-generic \
+       distclean-hdr distclean-recursive distclean-tags \
+       distcleancheck distdir distuninstallcheck dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-exec install-exec-am install-info \
+       install-info-am install-man install-strip installcheck \
+       installcheck-am installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic maintainer-clean-recursive \
+       mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-info-am
+
+
+.PHONY: localcheck remotecheck proxycheck
+localcheck remotecheck proxycheck: all
+       cd src && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+.PHONY: doc
+doc:
+       cd doc && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/aclocal.m4
diff -u /dev/null ccvs/aclocal.m4:1.147.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/aclocal.m4     Wed Dec 21 13:25:08 2005
@@ -0,0 +1,1041 @@
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+        [AM_AUTOMAKE_VERSION([1.9.6])])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.58])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" 
there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+                            [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode  enable make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+# Check to see how 'make' treats includes.                 -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = 
"done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
+#
+# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
+# created by `make install' are always world readable, even if the
+# installer happens to have an overly restrictive umask (e.g. 077).
+# This was a mistake.  There are at least two reasons why we must not
+# use `-m 0755':
+#   - it causes special bits like SGID to be ignored,
+#   - it may be too restrictive (some setups expect 775 directories).
+#
+# Do not use -m 0755 and let people choose whatever they expect by
+# setting umask.
+#
+# We cannot accept any implementation of `mkdir' that recognizes `-p'.
+# Some implementations (such as Solaris 8's) are not thread-safe: if a
+# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
+# concurrently, both version can detect that a/ is missing, but only
+# one can create it and the other will error out.  Consequently we
+# restrict ourselves to GNU make (using the --version option ensures
+# this.)
+AC_DEFUN([AM_PROG_MKDIR_P],
+[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+AC_SUBST([mkdir_p])])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/acx_extract_cpp_defn.m4])
+m4_include([m4/acx_with_external_zlib.m4])
+m4_include([m4/acx_with_gssapi.m4])
+m4_include([m4/alloca.m4])
+m4_include([m4/allocsa.m4])
+m4_include([m4/asx_version_compare.m4])
+m4_include([m4/atexit.m4])
+m4_include([m4/base64.m4])
+m4_include([m4/bison.m4])
+m4_include([m4/canon-host.m4])
+m4_include([m4/canonicalize.m4])
+m4_include([m4/chdir-long.m4])
+m4_include([m4/clock_time.m4])
+m4_include([m4/closeout.m4])
+m4_include([m4/codeset.m4])
+m4_include([m4/cvs_func_printf_ptr.m4])
+m4_include([m4/d-ino.m4])
+m4_include([m4/d-type.m4])
+m4_include([m4/dirname.m4])
+m4_include([m4/dos.m4])
+m4_include([m4/dup2.m4])
+m4_include([m4/eealloc.m4])
+m4_include([m4/eoverflow.m4])
+m4_include([m4/error.m4])
+m4_include([m4/exitfail.m4])
+m4_include([m4/extensions.m4])
+m4_include([m4/fcntl-safer.m4])
+m4_include([m4/filenamecat.m4])
+m4_include([m4/fnmatch.m4])
+m4_include([m4/fpending.m4])
+m4_include([m4/ftruncate.m4])
+m4_include([m4/getaddrinfo.m4])
+m4_include([m4/getcwd-path-max.m4])
+m4_include([m4/getcwd.m4])
+m4_include([m4/getdate.m4])
+m4_include([m4/getdelim.m4])
+m4_include([m4/gethostname.m4])
+m4_include([m4/getline.m4])
+m4_include([m4/getlogin_r.m4])
+m4_include([m4/getndelim2.m4])
+m4_include([m4/getnline.m4])
+m4_include([m4/getopt.m4])
+m4_include([m4/getpagesize.m4])
+m4_include([m4/getpass.m4])
+m4_include([m4/gettext.m4])
+m4_include([m4/gettime.m4])
+m4_include([m4/gettimeofday.m4])
+m4_include([m4/glob.m4])
+m4_include([m4/gnulib-comp.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/intmax_t.m4])
+m4_include([m4/inttypes.m4])
+m4_include([m4/inttypes_h.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/longdouble.m4])
+m4_include([m4/longlong.m4])
+m4_include([m4/lstat.m4])
+m4_include([m4/mbchar.m4])
+m4_include([m4/mbiter.m4])
+m4_include([m4/mbrtowc.m4])
+m4_include([m4/mbstate_t.m4])
+m4_include([m4/md5.m4])
+m4_include([m4/memchr.m4])
+m4_include([m4/memmove.m4])
+m4_include([m4/mempcpy.m4])
+m4_include([m4/memrchr.m4])
+m4_include([m4/minmax.m4])
+m4_include([m4/mkdir-slash.m4])
+m4_include([m4/mkstemp.m4])
+m4_include([m4/mktime.m4])
+m4_include([m4/mmap-anon.m4])
+m4_include([m4/nanosleep.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/onceonly_2_57.m4])
+m4_include([m4/openat.m4])
+m4_include([m4/pagealign_alloc.m4])
+m4_include([m4/pathmax.m4])
+m4_include([m4/po.m4])
+m4_include([m4/progtest.m4])
+m4_include([m4/quotearg.m4])
+m4_include([m4/readlink.m4])
+m4_include([m4/regex.m4])
+m4_include([m4/rename.m4])
+m4_include([m4/restrict.m4])
+m4_include([m4/rpmatch.m4])
+m4_include([m4/save-cwd.m4])
+m4_include([m4/setenv.m4])
+m4_include([m4/signed.m4])
+m4_include([m4/size_max.m4])
+m4_include([m4/sockpfaf.m4])
+m4_include([m4/ssize_t.m4])
+m4_include([m4/stat-macros.m4])
+m4_include([m4/stdbool.m4])
+m4_include([m4/stdint.m4])
+m4_include([m4/stdint_h.m4])
+m4_include([m4/strcase.m4])
+m4_include([m4/strdup.m4])
+m4_include([m4/strerror.m4])
+m4_include([m4/strftime.m4])
+m4_include([m4/strstr.m4])
+m4_include([m4/strtol.m4])
+m4_include([m4/strtoul.m4])
+m4_include([m4/sunos57-select.m4])
+m4_include([m4/time_r.m4])
+m4_include([m4/timespec.m4])
+m4_include([m4/tm_gmtoff.m4])
+m4_include([m4/tzset.m4])
+m4_include([m4/uintmax_t.m4])
+m4_include([m4/ulonglong.m4])
+m4_include([m4/unistd-safer.m4])
+m4_include([m4/unlocked-io.m4])
+m4_include([m4/vasnprintf.m4])
+m4_include([m4/vasprintf.m4])
+m4_include([m4/wchar_t.m4])
+m4_include([m4/wint_t.m4])
+m4_include([m4/xalloc.m4])
+m4_include([m4/xgetcwd.m4])
+m4_include([m4/xreadlink.m4])
+m4_include([m4/xsize.m4])
+m4_include([m4/yesno.m4])
Index: ccvs/config.h.in
diff -u /dev/null ccvs/config.h.in:1.191.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/config.h.in    Wed Dec 21 13:25:08 2005
@@ -0,0 +1,1317 @@
+/* config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define this to a NULL terminated list of allowed path prefixes (for
+   directories) and paths to files the CVS server will allow configuration to
+   be read from when specified from the command line. */
+#undef ALLOW_CONFIG_OVERRIDE
+
+/* Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access method in
+   the CVS client (default) */
+#undef AUTH_CLIENT_SUPPORT
+
+/* Define if you want to use the password authenticated server. */
+#undef AUTH_SERVER_SUPPORT
+
+/* Define if you want CVS to be able to be a remote repository client. */
+#undef CLIENT_SUPPORT
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* define if cross compiling */
+#undef CROSS_COMPILING
+
+/* The CVS admin command is restricted to the members of the group
+   CVS_ADMIN_GROUP. If this group does not exist, all users are allowed to run
+   CVS admin. To disable the CVS admin command for all users, create an empty
+   CVS_ADMIN_GROUP by running configure with the --with-cvs-admin-group=
+   option. To disable access control for CVS admin, run configure with the
+   --without-cvs-admin-group option in order to comment out the define below.
+   */
+#undef CVS_ADMIN_GROUP
+
+/* When committing a permanent change, CVS and RCS make a log entry of who
+   committed the change. If you are committing the change logged in as "root"
+   (not under "su" or other root-priv giving program), CVS/RCS cannot
+   determine who is actually making the change. As such, by default, CVS
+   prohibits changes committed by users logged in as "root". You can disable
+   checking by passing the "--enable-rootcommit" option to configure or by
+   commenting out the lines below. */
+#undef CVS_BADROOT
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to a command line template that will write an OpenPGP signature for
+   the file `%s' to its standard out. `%t' is substituted at run time with an
+   option which flags files as text files, when necessary, and the empty
+   string, otherwise. `%a' is substituted with a list of arguments provided by
+   the user. */
+#undef DEFAULT_SIGN_TEMPLATE
+
+/* Define to the option string that the OpenPGP program used in the
+   DEFAULT_SIGN_TEMPLATE would like to see for text files (substituted at run
+   time in place of `%t' in the DEFAULT_SIGN_TEMPLATE). */
+#undef DEFAULT_SIGN_TEXTMODE
+
+/* Define if there is a member named d_ino in the struct describing directory
+   headers. */
+#undef D_INO_IN_DIRENT
+
+/* The default editor to use, if one does not specify the "-e" option to cvs,
+   or does not have an EDITOR environment variable. If this is not set to an
+   absolute path to an executable, use the shell to find where the editor
+   actually is. This allows sites with /usr/bin/vi or /usr/ucb/vi to work
+   equally well (assuming that their PATH is reasonable). */
+#undef EDITOR_DFLT
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to enable encryption support. */
+#undef ENCRYPTION
+
+/* Define as good substitute value for EOVERFLOW. */
+#undef EOVERFLOW
+
+/* Define if this executable will be running on case insensitive file systems.
+   In the client case, this means that it will request that the server pretend
+   to be case insensitive if it isn't already. */
+#undef FILENAMES_CASE_INSENSITIVE
+
+/* Define on systems for which file names may have a so-called `drive letter'
+   prefix, define this to compute the length of that prefix, including the
+   colon. */
+#undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+
+/* Define if the backslash character may also serve as a file name component
+   separator. */
+#undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+
+#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+#endif
+
+/* When committing or importing files, you must enter a log message. Normally,
+   you can do this either via the -m flag on the command line, the -F flag on
+   the command line, or an editor will be started for you. If you like to use
+   logging templates (the rcsinfo file within the $CVSROOT/CVSROOT directory),
+   you might want to force people to use the editor even if they specify a
+   message with -m or -F. Enabling FORCE_USE_EDITOR will cause the -m or -F
+   message to be appended to the temp file when the editor is started. */
+#undef FORCE_USE_EDITOR
+
+/* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+   in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only
+   relevant when using GSSAPI. */
+#undef GSS_C_NT_HOSTBASED_SERVICE
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have `alloca' after including <alloca.h>, a header that
+   may be supplied by this distribution. */
+#undef HAVE_ALLOCA
+
+/* Define HAVE_ALLOCA_H for backward compatibility with older code that
+   includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the `atexit' function. */
+#undef HAVE_ATEXIT
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#undef HAVE_BP_SYM_H
+
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `chsize' function. */
+#undef HAVE_CHSIZE
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define if you have compound literals. */
+#undef HAVE_COMPOUND_LITERALS
+
+/* Define if you have the connect function. */
+#undef HAVE_CONNECT
+
+/* Define if you have the crypt function. */
+#undef HAVE_CRYPT
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FERROR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `flockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FLOCKFILE
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FREAD_UNLOCKED
+
+/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FREEADDRINFO
+
+/* Define to 1 if you have the declaration of `funlockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FUNLOCKFILE
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GAI_STRERROR
+
+/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETADDRINFO
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GETCWD
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDELIM
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GETENV
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLINE
+
+/* Define to 1 if you have the declaration of `getlogin', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN
+
+/* Define to 1 if you have the declaration of `getlogin_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN_R
+
+/* Define to 1 if you have the declaration of `getpass', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETPASS
+
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
+   don't. */
+#undef HAVE_DECL_NANOSLEEP
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_PUTCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#undef HAVE_DECL_STRDUP
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+   don't. */
+#undef HAVE_DECL___FPENDING
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dup2' function. */
+#undef HAVE_DUP2
+
+/* Define if you have the declaration of environ. */
+#undef HAVE_ENVIRON_DECL
+
+/* Define if you have the declaration of errno. */
+#undef HAVE_ERRNO_DECL
+
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
+/* Define to 1 if you have the `fchmod' function. */
+#undef HAVE_FCHMOD
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `fsync' function. */
+#undef HAVE_FSYNC
+
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `funlockfile' function. */
+#undef HAVE_FUNLOCKFILE
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#undef HAVE_GAI_STRERROR
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getdelim' function. */
+#undef HAVE_GETDELIM
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgroups' function. */
+#undef HAVE_GETGROUPS
+
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define to 1 if you have the `getlogin_r' function. */
+#undef HAVE_GETLOGIN_R
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getpwnam_r' function. */
+#undef HAVE_GETPWNAM_R
+
+/* Define if you have the getspnam function. */
+#undef HAVE_GETSPNAM
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <glob.h> header file. */
+#undef HAVE_GLOB_H
+
+/* Define if you have GSSAPI with Kerberos version 5 available. */
+#undef HAVE_GSSAPI
+
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
+
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_H
+
+/* Define to 1 if you have the <gssapi.h> header file. */
+#undef HAVE_GSSAPI_H
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the `initgroups' function. */
+#undef HAVE_INITGROUPS
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
+/* Define to 1 if <sys/socket.h> defines AF_INET. */
+#undef HAVE_IPV4
+
+/* Define to 1 if <sys/socket.h> defines AF_INET6. */
+#undef HAVE_IPV6
+
+/* Define to 1 if you have the `isascii' function. */
+#undef HAVE_ISASCII
+
+/* Define to 1 if you have the `isblank' function. */
+#undef HAVE_ISBLANK
+
+/* Define to 1 if you have the `iswprint' function. */
+#undef HAVE_ISWPRINT
+
+/* Define if you have MIT Kerberos version 4 available. */
+#undef HAVE_KERBEROS
+
+/* Define to 1 if you have the <krb5.h> header file. */
+#undef HAVE_KRB5_H
+
+/* Define to 1 if you have the `krb_get_err_text' function. */
+#undef HAVE_KRB_GET_ERR_TEXT
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the `krb' library (-lkrb). */
+#undef HAVE_LIBKRB
+
+/* Define to 1 if you have the `krb4' library (-lkrb4). */
+#undef HAVE_LIBKRB4
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if you have the `login' function. */
+#undef HAVE_LOGIN
+
+/* Define to 1 if you have the `logout' function. */
+#undef HAVE_LOGOUT
+
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if you support file names longer than 14 characters. */
+#undef HAVE_LONG_FILE_NAMES
+
+/* Define if you have the 'long long' type. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+   config.h and <sys/mman.h>. */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to 1 if you have the `mblen' function. */
+#undef HAVE_MBLEN
+
+/* Define to 1 if you have the `mbrlen' function. */
+#undef HAVE_MBRLEN
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#undef HAVE_MBRTOWC
+
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
+/* Define to 1 if you have the `mbsrtowcs' function. */
+#undef HAVE_MBSRTOWCS
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#undef HAVE_MBSTATE_T
+
+/* Define if you have memchr (always for CVS). */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_LIMITS_H
+
+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_SYS_PARAM_H
+
+/* Define to 1 if you have the `mknod' function. */
+#undef HAVE_MKNOD
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `nanotime' function. */
+#undef HAVE_NANOTIME
+
+/* Define to 1 if you have the <ndbm.h> header file. */
+#undef HAVE_NDBM_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
+/* Define if an OpenPGP capable program is available (and, assumedly, usable
+   command line templates are in the DEFAULT_SIGN_TEMPLATE and
+   DEFAULT_VERIFY_TEMPLATE macros). */
+#undef HAVE_OPENPGP
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
+/* Define to enable system authentication with PAM instead of using the simple
+   getpwnam interface. This allows authentication (in theory) with any PAM
+   module, e.g. on systems with shadow passwords or via LDAP */
+#undef HAVE_PAM
+
+/* Define to 1 if pam/pam_appl.h is available */
+#undef HAVE_PAM_PAM_APPL_H
+
+/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX is not
+   defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD is defined.
+   */
+#undef HAVE_PARTLY_WORKING_GETCWD
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
+
+/* Define to 1 if the `printf' function supports the %p format for printing
+   pointers. */
+#undef HAVE_PRINTF_PTR
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#undef HAVE_PTRDIFF_T
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#undef HAVE_REALLOC
+
+/* Define to 1 if you have the `regcomp' function. */
+#undef HAVE_REGCOMP
+
+/* Define to 1 if you have the `regerror' function. */
+#undef HAVE_REGERROR
+
+/* Define to 1 if you have the `regexec' function. */
+#undef HAVE_REGEXEC
+
+/* Define to 1 if you have the `regfree' function. */
+#undef HAVE_REGFREE
+
+/* Define to 1 if you have the `resolvepath' function. */
+#undef HAVE_RESOLVEPATH
+
+/* Define to 1 if you have the `rpmatch' function. */
+#undef HAVE_RPMATCH
+
+/* Define to 1 if you have run the test for working tzset. */
+#undef HAVE_RUN_TZSET_TEST
+
+/* Define to 1 if you have the <search.h> header file. */
+#undef HAVE_SEARCH_H
+
+/* Define to 1 if security/pam_appl.h is available */
+#undef HAVE_SECURITY_PAM_APPL_H
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define if the diff library should use setmode for binary files. */
+#undef HAVE_SETMODE
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `sigblock' function. */
+#undef HAVE_SIGBLOCK
+
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define to 1 if you have the `sigsetmask' function. */
+#undef HAVE_SIGSETMASK
+
+/* Define to 1 if you have the `sigvec' function. */
+#undef HAVE_SIGVEC
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have strchr (always for CVS). */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the `strtoul' function. */
+#undef HAVE_STRTOUL
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#undef HAVE_STRUCT_ADDRINFO
+
+/* Define if there is a member named d_type in the struct describing directory
+   headers. */
+#undef HAVE_STRUCT_DIRENT_D_TYPE
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_RDEV
+
+/* Define if struct timespec is declared in <time.h>. */
+#undef HAVE_STRUCT_TIMESPEC
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/bsdtypes.h> header file. */
+#undef HAVE_SYS_BSDTYPES_H
+
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#undef HAVE_TCGETATTR
+
+/* Define to 1 if you have the `tcsetattr' function. */
+#undef HAVE_TCSETATTR
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `timezone' function. */
+#undef HAVE_TIMEZONE
+
+/* Define to 1 if localtime_r, etc. have the type signatures that POSIX
+   requires. */
+#undef HAVE_TIME_R_POSIX
+
+/* Define if struct tm has the tm_gmtoff member. */
+#undef HAVE_TM_GMTOFF
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#undef HAVE_TZNAME
+
+/* Define to 1 if you have the `tzset' function. */
+#undef HAVE_TZSET
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
+#undef HAVE_UTIME_NULL
+
+/* Define to 1 if you have the `vasnprintf' function. */
+#undef HAVE_VASNPRINTF
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#undef HAVE_VPRINTF
+
+/* Define to 1 if you have the `wait3' function. */
+#undef HAVE_WAIT3
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#undef HAVE_WCRTOMB
+
+/* Define to 1 if you have the `wcscoll' function. */
+#undef HAVE_WCSCOLL
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#undef HAVE_WCTYPE_H
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
+/* Define to 1 if you have the `wmemchr' function. */
+#undef HAVE_WMEMCHR
+
+/* Define to 1 if you have the `wmemcpy' function. */
+#undef HAVE_WMEMCPY
+
+/* Define to 1 if you have the `wmempcpy' function. */
+#undef HAVE_WMEMPCPY
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `__fpending' function. */
+#undef HAVE___FPENDING
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+/* Define to include locking code which prevents versions of CVS earlier than
+   1.12.4 directly accessing the same repositiory as this executable from
+   ignoring this executable's promotable read locks. If only CVS versions
+   1.12.4 and later will be accessing your repository directly (as a server or
+   locally), you can safely disable this option in return for fewer disk
+   accesses and a small speed increase. Disabling this option when versions of
+   CVS earlier than 1,12,4 _will_ be accessing your repository, however, is
+   *VERY* *VERY* *VERY* dangerous and could result in data loss. As such, by
+   default, CVS is compiled with this code enabled. If you are sure you would
+   like this code disabled, you can disable it by passing the
+   "--disable-lock-compatibility" option to configure or by commenting out the
+   lines below. */
+#undef LOCK_COMPATIBILITY
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#undef MALLOC_0_IS_NONNULL
+
+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
+#undef MAP_ANONYMOUS
+
+/* By default, CVS stores its modules and other such items in flat text files
+   (MY_NDBM enables this). Turning off MY_NDBM causes CVS to look for a
+   system-supplied ndbm database library and use it instead. That may speed
+   things up, but the default setting generally works fine too. */
+#undef MY_NDBM
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to set a service name for PAM. This must be defined. Define to
+   `program_name', without the quotes, to use whatever name CVS was invoked
+   as. Otherwise, define to a double-quoted literal string, such as `"cvs"'.
+   */
+#undef PAM_SERVICE_NAME
+
+/* the number of pending output bytes on stream `fp' */
+#undef PENDING_OUTPUT_N_BYTES
+
+/* Define if you want CVS to be able to serve as a transparent proxy for write
+   operations. Disabling this may produce a slight performance gain on some
+   systems, at the expense of write proxy support. */
+#undef PROXY_SUPPORT
+
+/* Path to the pr utility */
+#undef PR_PROGRAM
+
+/* Define to force lib/regex.c to use malloc instead of alloca. */
+#undef REGEX_MALLOC
+
+/* Define if rename does not work for source file names with a trailing slash,
+   like the one from SunOS 4.1.1_U1. */
+#undef RENAME_TRAILING_SLASH_BUG
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* The default remote shell to use, if one does not specify the CVS_RSH
+   environment variable. */
+#undef RSH_DFLT
+
+/* If you are working with a large remote repository and a 'cvs checkout' is
+   swamping your network and memory, define these to enable flow control. You
+   will end up with even less probability of a consistent checkout (see
+   Concurrency in cvs.texinfo), but CVS doesn't try to guarantee that anyway.
+   The master server process will monitor how far it is getting behind, if it
+   reaches the high water mark, it will signal the child process to stop
+   generating data when convenient (ie: no locks are held, currently at the
+   beginning of a new directory). Once the buffer has drained sufficiently to
+   reach the low water mark, it will be signalled to start again. */
+#undef SERVER_FLOWCONTROL
+
+/* The high water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_HI_WATER
+
+/* The low water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_LO_WATER
+
+/* Define if you want CVS to be able to serve repositories to remote clients.
+   */
+#undef SERVER_SUPPORT
+
+/* The size of a `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of a `double', as computed by sizeof. */
+#undef SIZEOF_DOUBLE
+
+/* The size of a `float', as computed by sizeof. */
+#undef SIZEOF_FLOAT
+
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
+/* The size of a `intmax_t', as computed by sizeof. */
+#undef SIZEOF_INTMAX_T
+
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* The size of a `long double', as computed by sizeof. */
+#undef SIZEOF_LONG_DOUBLE
+
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of a `ptrdiff_t', as computed by sizeof. */
+#undef SIZEOF_PTRDIFF_T
+
+/* The size of a `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of a `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* The size of a `wint_t', as computed by sizeof. */
+#undef SIZEOF_WINT_T
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#undef SIZE_MAX
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Enable support for the pre 1.12.1 *info scripting hook format strings.
+   Disable this option for a smaller executable once your scripting hooks have
+   been updated to use the new *info format strings by passing
+   "--disable-old-info-format-support" option to configure or by commenting
+   out the line below. */
+#undef SUPPORT_OLD_INFO_FMT_STRINGS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Directory used for storing temporary files, if not overridden by
+   environment variables or the -T global option. There should be little need
+   to change this (-T is a better mechanism if you need to use a different
+   directory for temporary files). */
+#undef TMPDIR_DFLT
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define if tzset clobbers localtime's static buffer. */
+#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
+
+/* The default umask to use when creating or otherwise setting file or
+   directory permissions in the repository. Must be a value in the range of 0
+   through 0777. For example, a value of 002 allows group rwx access and world
+   rx access; a value of 007 allows group rwx access but no world access. This
+   value is overridden by the value of the CVSUMASK environment variable,
+   which is interpreted as an octal number. */
+#undef UMASK_DFLT
+
+/* Define if double is the first floating point type detected with its size.
+   */
+#undef UNIQUE_FLOAT_TYPE_DOUBLE
+
+/* Define if float is the first floating point type detected with its size. */
+#undef UNIQUE_FLOAT_TYPE_FLOAT
+
+/* Define if long double is the first floating point type detected with its
+   size. */
+#undef UNIQUE_FLOAT_TYPE_LONG_DOUBLE
+
+/* Define if char is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_CHAR
+
+/* Define if int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INT
+
+/* Define if intmax_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INTMAX_T
+
+/* Define if long int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG
+
+/* Define if long long is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG_LONG
+
+/* Define if ptrdiff_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_PTRDIFF_T
+
+/* Define if short is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SHORT
+
+/* Define if size_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SIZE_T
+
+/* Define if wint_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_WINT_T
+
+/* Define if setmode is required when writing binary data to stdout. */
+#undef USE_SETMODE_STDOUT
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+   Unlocked I/O can improve performance in unithreaded apps, but it is not
+   safe for multithreaded apps. */
+#undef USE_UNLOCKED_IO
+
+/* Define if utime requires write access to the file (true on Windows, but not
+   Unix). */
+#undef UTIME_EXPECTS_WRITABLE
+
+/* Define if unsetenv() returns void, not int. */
+#undef VOID_UNSETENV
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
+/* Define to force lib/regex.c to define re_comp et al. */
+#undef _REGEX_RE_COMP
+
+/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+
+/* Define to rpl_ if the getcwd replacement function should be used. */
+#undef __GETCWD_PREFIX
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+   used. */
+#undef __GETOPT_PREFIX
+
+/* Define to rpl_ if the openat replacement function should be used. */
+#undef __OPENAT_PREFIX
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to a replacement function name for fnmatch(). */
+#undef fnmatch
+
+/* Define to a replacement function name for getline(). */
+#undef getline
+
+/* Define to a replacement function name for getpass(). */
+#undef getpass
+
+/* Define to rpl_gettimeofday if the replacement function should be used. */
+#undef gettimeofday
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to long or long long if <inttypes.h> and <stdint.h> don't define. */
+#undef intmax_t
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to a type if <wchar.h> does not define. */
+#undef mbstate_t
+
+/* Define to rpl_mkdir if the replacement function should be used. */
+#undef mkdir
+
+/* Define to rpl_mkstemp if the replacement function should be used. */
+#undef mkstemp
+
+/* Define to rpl_mktime if the replacement function should be used. */
+#undef mktime
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define to the name of the strftime replacement function. */
+#undef my_strftime
+
+/* Define to rpl_nanosleep if the replacement function should be used. */
+#undef nanosleep
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
+
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#undef realloc
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to rpl_rename if the replacement function should be used. */
+#undef rename
+
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+   supported. Do not define if restrict is supported directly. */
+#undef restrict
+
+/* Define to rpl_select if the replacement function should be used. */
+#undef select
+
+/* Define to empty if the C compiler doesn't support this keyword. */
+#undef signed
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define as a signed type of the same size as size_t. */
+#undef ssize_t
+
+/* Define to rpl_strcasecmp always. */
+#undef strcasecmp
+
+/* Define to rpl_tzset if the wrapper function should be used. */
+#undef tzset
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
Index: ccvs/configure
diff -u /dev/null ccvs/configure:1.430.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/configure      Wed Dec 21 13:25:08 2005
@@ -0,0 +1,44678 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for Concurrent Versions System (CVS) 
1.12.13.1.
+#
+# Report bugs to <address@hidden>.
+#
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+#               1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+#               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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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.
+#
+# 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.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# 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=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; 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 conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  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"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  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+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX 
shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+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="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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Concurrent Versions System (CVS)'
+PACKAGE_TARNAME='cvs'
+PACKAGE_VERSION='1.12.13.1'
+PACKAGE_STRING='Concurrent Versions System (CVS) 1.12.13.1'
+PACKAGE_BUGREPORT='address@hidden'
+
+ac_unique_file="src/cvs.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+gl_header_list=
+gl_func_list=
+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 
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL 
AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP 
INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar 
am__untar ac_prefix_program MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC 
CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote 
AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE 
am__fastdepCC_FALSE CPP EGREP RANLIB ac_ct_RANLIB LN_S PERL CSH MKTEMP SENDMAIL 
PR GPG ROFF PS2PDF TEXI2DVI MAKE_TARGETS_IN_VPATH_TRUE 
MAKE_TARGETS_IN_VPATH_FALSE LIBOBJS GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE 
ALLOCA ALLOCA_H STDBOOL_H HAVE__BOOL FNMATCH_H YACC YFLAGS LIB_CLOCK_GETTIME 
GETOPT_H GLOB_H LIB_NANOSLEEP HAVE_LONG_64BIT HAVE_LONG_LONG_64BIT STDINT_H 
EOVERFLOW MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE build 
build_cpu build_vendor build_os host host_cpu host_vendor host_os 
INTL_MACOSX_LIBS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB 
cvs_client_objects KRB4 ZLIB_SUBDIRS ZLIB_CPPFLAGS ZLIB_LIBS with_default_rsh 
RSH_DFLT EDITOR LTLIBOBJS'
+ac_subst_files='MKTEMP_SH_FUNCTION'
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for 
--$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+             localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for 
--$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use 
--host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # 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 ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in 
$ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" 
>&2
+   { (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
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_YACC_set=${YACC+set}
+ac_env_YACC_value=$YACC
+ac_cv_env_YACC_set=${YACC+set}
+ac_cv_env_YACC_value=$YACC
+ac_env_YFLAGS_set=${YFLAGS+set}
+ac_env_YFLAGS_value=$YFLAGS
+ac_cv_env_YFLAGS_set=${YFLAGS+set}
+ac_cv_env_YFLAGS_value=$YFLAGS
+ac_env_EDITOR_set=${EDITOR+set}
+ac_env_EDITOR_value=$EDITOR
+ac_cv_env_EDITOR_set=${EDITOR+set}
+ac_cv_env_EDITOR_value=$EDITOR
+
+#
+# Report the --help message.
+#
+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 Concurrent Versions System (CVS) 1.12.13.1 to adapt to 
many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                         [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                         [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of Concurrent Versions System 
(CVS) 1.12.13.1:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode  enable make rules and dependencies not useful
+                         (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --disable-largefile     omit support for large files
+  --disable-nls           do not use Native Language Support
+  --disable-rpath         do not hardcode runtime library paths
+  --enable-cvs-ndbm       Use the NDBM library distributed with CVS rather
+                          than attempting to use a system NDBM library.
+                          Disabling this may not work. (default)
+  --enable-client         Include code for running as a remote client
+                          (default)
+  --enable-password-authenticated-client
+                          Enable pserver as a remote access method in the CVS
+                          client (default)
+  --enable-server         Include code for running as a server (default)
+  --enable-server-flow-control
+                          If you are working with a large remote repository
+                          and a 'cvs checkout' is swamping your network and
+                          memory, define these to enable flow control. You may
+                          optionally pass a low water mark in bytes and a high
+                          water mark in bytes, separated by commas. (default
+                          is enabled 1M,2M)
+  --enable-proxy          Include code for running as a transparent proxy
+                          server. Disabling this may produce a slight
+                          performance gain on some systems, at the expense of
+                          write proxy support. (default)
+  --enable-pam            Use to enable system authentication with PAM instead
+                          of using the simple getpwnam interface. This allows
+                          authentication (in theory) with any PAM module, e.g.
+                          on systems with shadow passwords or via LDAP
+  --enable-case-sensitivity
+                          Force CVS to expect a case sensitive file system.
+                          Enabling this on a case insensitive system should
+                          have little effect on the server or client
+                          operation, though client users may ocassionally be
+                          suprised that the CVS server appears to be case
+                          sensitive. Disabling this for a case sensitive
+                          server disables server support for case insensitive
+                          clients, which can confuse all users of case
+                          insensitive clients contacting the server. Disabling
+                          this for a case sensitive client will cause the
+                          client to ask servers to behave case insensitively,
+                          which could cause confusion for users, but also
+                          probably no real harm. (default autoselects based on
+                          the case sensitivity of the file system containing
+                          the current working directory)
+  --enable-encryption     Enable encryption support (disabled by default)
+  --enable-force-editor   When committing or importing files, you must enter a
+                          log message. Normally, you can do this either via
+                          the -m flag on the command line, the -F flag on the
+                          command line, or an editor will be started for you.
+                          If you like to use logging templates (the rcsinfo
+                          file within the $CVSROOT/CVSROOT directory), you
+                          might want to force people to use the editor even if
+                          they specify a message with -m or -F.
+                          --enable-force-editor will cause the -m or -F
+                          message to be appended to the temp file when the
+                          editor is started. (disabled by default)
+  --enable-lock-compatibility
+                          Include locking code which prevents versions of CVS
+                          earlier than 1.12.4 directly accessing the same
+                          repositiory as this executable from ignoring this
+                          executable's promotable read locks. If only CVS
+                          versions 1.12.4 and later will be accessing your
+                          repository directly (as a server or locally), you
+                          can safely disable this option in return for fewer
+                          disk accesses and a small speed increase. Disabling
+                          this option when versions of CVS earlier than 1,12,4
+                          _will_ be accessing your repository, however, is
+                          *VERY* *VERY* *VERY* dangerous and could result in
+                          data loss. (enabled by default)
+  --enable-rootcommit     Allow the root user to commit files (disabled by
+                          default)
+  --enable-old-info-format-support
+                          Enable support for the pre 1.12.1 *info scripting
+                          hook format strings. Disable this option for a
+                          smaller executable once your scripting hooks have
+                          been updated to use the new *info format strings
+                          (default).
+  --enable-config-override
+                          Set to a comma-seperated list of paths to
+                          directories (designated by trailing `/') and files,
+                          specifies the path prefixes (for directories) and
+                          paths to files the CVS server commands will allow
+                          configuration to be read from. Specify
+                          `--enable-config-override=no' to disable config file
+                          overrides completely and
+                          `--enable-config-override=/' or simply
+                          `--enable-config-override' to allow all paths.
+                          (Defaults to `SYSCONFDIR/cvs.conf,SYSCONFDIR/cvs/')
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --without-included-regex
+                          don't compile regex; this is the default on systems
+                          with recent-enough versions of the GNU C Library
+                          (use with caution on other systems)
+  --with-gnu-ld           assume the C compiler uses GNU ld default=no
+  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
+  --without-libiconv-prefix     don't search for libiconv in includedir and 
libdir
+  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
+  --without-libintl-prefix     don't search for libintl in includedir and 
libdir
+  --with-krb4             Kerberos 4 directory (default /usr/kerberos)
+  --with-gssapi           GSSAPI directory (default autoselects)
+  --with-external-zlib    Use the specified ZLIB library (defaults to the
+                          version distributed with the CVS source)
+  --with-rsh              The default remote shell CVS will use for :ext:
+                          transport (default ssh)
+  --with-editor           The default text editor CVS should use for log
+                          messages (default autoselects)
+  --with-hardcoded-pam-service-name
+                          Use this to hard code a service name for PAM CVS
+                          authentication. The special name, `program_name',
+                          will cause CVS to use whatever name it was invoked
+                          as as the service name. (defaults to `cvs')
+  --with-tmpdir           The temporary directory CVS should use as a default
+                          (default autoselects)
+  --with-umask            Set the umask CVS will use by default in the
+                          repository (default 002)
+  --with-cvs-admin-group=GROUP
+                          The CVS admin command is restricted to the members
+                          of this group. If this group does not exist, all
+                          users are allowed to run CVS admin. To disable the
+                          CVS admin command for all users, create an empty
+                          group by specifying the --with-cvs-admin-group=
+                          option. To disable access control for CVS admin, run
+                          configure with the --without-cvs-admin-group option.
+                          (default 'cvsadmin')
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  YACC        The `Yet Another C Compiler' implementation to use. Defaults to
+              `bison -y'. Values other than `bison -y' will most likely break
+              on most systems.
+  YFLAGS      YFLAGS contains the list arguments that will be passed by
+              default to Bison. This script will default YFLAGS to the empty
+              string to avoid a default value of `-d' given by some make
+              applications.
+  EDITOR      The text editor CVS will use by default for log messages.
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <address@hidden>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# 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.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+          test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+Concurrent Versions System (CVS) configure 1.12.13.1
+generated by GNU Autoconf 2.59
+
+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.
+
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+              1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+              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
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program 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.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+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 Concurrent Versions System (CVS) $as_me 1.12.13.1, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_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=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  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
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    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"
+      ;;
+    *)
+      sed -n \
+       "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
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      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 &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site 
$ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# 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
+  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"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in 
the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" 
>&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous 
run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      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: error: \`$ac_var' has changed since the previous run:" >&2;}
+       { 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:   current value: $ac_new_val" >&2;}
+       ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the 
build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm 
$cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start 
over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+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
+
+
+gl_header_list="$gl_header_list netinet/in.h"
+gl_func_list="$gl_func_list fdopendir"
+gl_func_list="$gl_func_list fchdir"
+gl_func_list="$gl_func_list mempcpy"
+gl_header_list="$gl_header_list sys/time.h"
+gl_func_list="$gl_func_list isascii"
+gl_header_list="$gl_header_list unistd.h"
+gl_header_list="$gl_header_list sys/param.h"
+gl_header_list="$gl_header_list stdio_ext.h"
+gl_header_list="$gl_header_list termios.h"
+gl_func_list="$gl_func_list __fsetlocking"
+gl_func_list="$gl_func_list tcgetattr"
+gl_func_list="$gl_func_list tcsetattr"
+gl_func_list="$gl_func_list gettimeofday"
+gl_func_list="$gl_func_list nanotime"
+gl_header_list="$gl_header_list sys/cdefs.h"
+gl_func_list="$gl_func_list getlogin_r"
+gl_func_list="$gl_func_list getpwnam_r"
+gl_header_list="$gl_header_list wchar.h"
+gl_header_list="$gl_header_list wctype.h"
+gl_func_list="$gl_func_list alarm"
+gl_func_list="$gl_func_list siginterrupt"
+gl_func_list="$gl_func_list posix_memalign"
+gl_func_list="$gl_func_list iswprint"
+gl_func_list="$gl_func_list mbsinit"
+gl_header_list="$gl_header_list locale.h"
+gl_func_list="$gl_func_list isblank"
+gl_func_list="$gl_func_list mbrtowc"
+gl_func_list="$gl_func_list wcrtomb"
+gl_func_list="$gl_func_list wcscoll"
+gl_func_list="$gl_func_list mblen"
+gl_func_list="$gl_func_list mbrlen"
+gl_func_list="$gl_func_list tzset"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in build-aux $srcdir/build-aux; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in 
build-aux $srcdir/build-aux" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in build-aux 
$srcdir/build-aux" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+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.
+
+am__api_version="1.9"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# 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
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+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.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # 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
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there 
is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than 
distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
+  # We used to keeping the `.' as first argument, in order to
+  # allow $(mkdir_p) to be used without argument.  As in
+  #   $(mkdir_p) $(somedir)
+  # where $(somedir) is conditionally defined.  However this is wrong
+  # for two reasons:
+  #  1. if the package is installed by a user who cannot write `.'
+  #     make install will fail,
+  #  2. the above comment should most certainly read
+  #     $(mkdir_p) $(DESTDIR)$(somedir)
+  #     so it does not work when $(somedir) is undefined and
+  #     $(DESTDIR) is not.
+  #  To support the latter case, we have to write
+  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
+  #  so the `.' trick is pointless.
+  mkdir_p='mkdir -p --'
+else
+  # On NextStep and OpenStep, the `mkdir' command does not
+  # recognize any option.  It will interpret all options as
+  # directories to create, and then abort because `.' already
+  # exists.
+  for d in ./-p ./--version;
+  do
+    test -d $d && rmdir $d
+  done
+  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
+  if test -f "$ac_aux_dir/mkinstalldirs"; then
+    mkdir_p='$(mkinstalldirs)'
+  else
+    mkdir_p='$(install_sh) -d'
+  fi
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+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)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run 
\"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make 
distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='cvs'
+ VERSION='1.12.13.1'
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program 
name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+if test "x$prefix" = xNONE; then
+  echo $ECHO_N "checking for prefix by $ECHO_C" >&6
+  # Extract the first word of "cvs", so it can be a program name with args.
+set dummy cvs; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ac_prefix_program+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_prefix_program in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override 
the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+ac_prefix_program=$ac_cv_path_ac_prefix_program
+
+if test -n "$ac_prefix_program"; then
+  echo "$as_me:$LINENO: result: $ac_prefix_program" >&5
+echo "${ECHO_T}$ac_prefix_program" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  if test -n "$ac_prefix_program"; then
+    prefix=`(dirname "$ac_prefix_program") 2>/dev/null ||
+$as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$ac_prefix_program" : 'X\(//\)[^/]' \| \
+        X"$ac_prefix_program" : 'X\(//\)$' \| \
+        X"$ac_prefix_program" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_prefix_program" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+    prefix=`(dirname "$prefix") 2>/dev/null ||
+$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$prefix" : 'X\(//\)[^/]' \| \
+        X"$prefix" : 'X\(//\)$' \| \
+        X"$prefix" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$prefix" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  fi
+fi
+
+          ac_config_headers="$ac_config_headers config.h"
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions 
of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of 
Makefiles... $ECHO_C" >&6
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was 
given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi;
+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+       @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = 
"done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking 
was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # 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
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a 
program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+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.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+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 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
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# 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=
+# 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 | *.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
+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
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval 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
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+       cross_compiling=yes
+    else
+       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+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'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+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.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+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); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# 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 conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | 
*.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+         export ac_cv_exeext
+         break;;
+    * ) break;;
+  esac
+done
+else
+  { { 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
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+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); }; 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 | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+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
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+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.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#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_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+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.  */
+
+int
+main ()
+{
+
+  ;
+  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_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+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
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  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
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_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
+  for ac_declaration in \
+   '' \
+   '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 ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  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
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+
+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
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+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
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+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
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+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
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+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
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { 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
+
+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
+
+
+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 AIX" >&5
+echo $ECHO_N "checking for AIX... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef _AIX
+  yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+
+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
+/* 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
+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_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+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
+/* 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
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+/* 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
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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 TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f 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='./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
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.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
+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
+  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
+
+#include <$ac_header>
+_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
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+else
+  # Is the header compilable?
+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
+/* 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>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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+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
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_minix_config_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+
+fi
+if test $ac_cv_header_minix_config_h = yes; then
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+if test "$MINIX" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_1_SOURCE 2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _MINIX 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+  cat >>confdefs.h <<\_ACEOF
+#define __EXTENSIONS__ 1
+_ACEOF
+
+  cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+
+
+
+
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # 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
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a 
program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+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.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+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.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#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_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+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.  */
+
+int
+main ()
+{
+
+  ;
+  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_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+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
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  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
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_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
+  for ac_declaration in \
+   '' \
+   '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 ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  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
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  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
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext 
$LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+       continue
+      else
+       break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+if test "x$CC" != xcc; then
+  echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o 
together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... 
$ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" 
>&6
+fi
+set dummy $CC; ac_cc=`echo $2 |
+                     sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f 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
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (eval 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_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        test -f 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
+       # cc works too.
+       :
+      else
+       # cc exists but doesn't like -o.
+       eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+# Find the posix library needed on INTERACTIVE UNIX (ISC)
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 strerror ();
+int
+main ()
+{
+strerror ();
+  ;
+  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_search_strerror="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+  for ac_lib in cposix; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 strerror ();
+int
+main ()
+{
+strerror ();
+  ;
+  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_search_strerror="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+  test "$ac_cv_search_strerror" = "none required" || 
LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a 
program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+  enableval="$enable_largefile"
+
+fi;
+if test "$enable_largefile" != no; then
+
+  echo "$as_me:$LINENO: checking for special C compiler options needed for 
large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large 
files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       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
+/* 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,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  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
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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>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_sys_largefile_CC=' -n32'; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+        break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
+
+  echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large 
files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... 
$ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_file_offset_bits=no
+  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,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  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
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  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_sys_file_offset_bits=64; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
+
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+
+fi
+rm -f conftest*
+  echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large 
files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... 
$ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_large_files=no
+  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,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  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
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  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_sys_large_files=1; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
+
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+
+fi
+rm -f conftest*
+fi
+
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PERL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
+  ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+
+if test -n "$PERL"; then
+  echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "csh", so it can be a program name with args.
+set dummy csh; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_CSH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $CSH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CSH="$CSH" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CSH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_CSH" && ac_cv_path_CSH="no"
+  ;;
+esac
+fi
+CSH=$ac_cv_path_CSH
+
+if test -n "$CSH"; then
+  echo "$as_me:$LINENO: result: $CSH" >&5
+echo "${ECHO_T}$CSH" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# for contrib/rcs2log.sh & src/cvsbug.in.
+# Extract the first word of "mktemp", so it can be a program name with args.
+set dummy mktemp; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MKTEMP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MKTEMP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_MKTEMP" && ac_cv_path_MKTEMP="mktemp"
+  ;;
+esac
+fi
+MKTEMP=$ac_cv_path_MKTEMP
+
+if test -n "$MKTEMP"; then
+  echo "$as_me:$LINENO: result: $MKTEMP" >&5
+echo "${ECHO_T}$MKTEMP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test x"$MKTEMP" = xmktemp; then
+       MKTEMP_SH_FUNCTION=$srcdir/mktemp.sh
+else
+       MKTEMP_SH_FUNCTION=/dev/null
+fi
+
+# for src/cvsbug.in
+# Extract the first word of "sendmail", so it can be a program name with args.
+set dummy sendmail; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_SENDMAIL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $SENDMAIL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/sbin:/usr/lib"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_SENDMAIL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="no"
+  ;;
+esac
+fi
+SENDMAIL=$ac_cv_path_SENDMAIL
+
+if test -n "$SENDMAIL"; then
+  echo "$as_me:$LINENO: result: $SENDMAIL" >&5
+echo "${ECHO_T}$SENDMAIL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# For diff/util.c
+# Extract the first word of "pr", so it can be a program name with args.
+set dummy pr; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PR="$PR" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PR="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PR" && ac_cv_path_PR="no"
+  ;;
+esac
+fi
+PR=$ac_cv_path_PR
+
+if test -n "$PR"; then
+  echo "$as_me:$LINENO: result: $PR" >&5
+echo "${ECHO_T}$PR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test x"$PR" != xno; then
+
+cat >>confdefs.h <<_ACEOF
+#define PR_PROGRAM "$PR"
+_ACEOF
+
+fi
+# For src/gpg.c
+# Extract the first word of "gpg", so it can be a program name with args.
+set dummy gpg; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GPG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GPG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GPG="$GPG" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GPG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_GPG" && ac_cv_path_GPG="gpg"
+  ;;
+esac
+fi
+GPG=$ac_cv_path_GPG
+
+if test -n "$GPG"; then
+  echo "$as_me:$LINENO: result: $GPG" >&5
+echo "${ECHO_T}$GPG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test x"$GPG" != xgpg; then
+  # The GPG on at least one of my FreeBSD 4.11 test systems fails to run
+  # because libintl is missing.
+  if $GPG --version >/dev/null 2>&1; then :; else
+    # GPG is broken.  Pretend it isn't there.
+    { echo "$as_me:$LINENO: WARNING: GPG is installed as \`$GPG', but is 
broken.  Ignoring it." >&5
+echo "$as_me: WARNING: GPG is installed as \`$GPG', but is broken.  Ignoring 
it." >&2;}
+    GPG=gpg
+  fi
+fi
+if test x"$GPG" != xgpg; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENPGP 1
+_ACEOF
+
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_SIGN_TEMPLATE "$GPG --detach-sign --output - %t %a -- %s"
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define DEFAULT_SIGN_TEXTMODE "--textmode"
+_ACEOF
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin"
+for ac_prog in groff roff
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ROFF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ROFF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ROFF="$ROFF" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $glocs
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ROFF="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+ROFF=$ac_cv_path_ROFF
+
+if test -n "$ROFF"; then
+  echo "$as_me:$LINENO: result: $ROFF" >&5
+echo "${ECHO_T}$ROFF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ROFF" && break
+done
+test -n "$ROFF" || ROFF="$missing_dir/missing roff"
+
+# Extract the first word of "ps2pdf", so it can be a program name with args.
+set dummy ps2pdf; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PS2PDF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PS2PDF in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_PS2PDF" && ac_cv_path_PS2PDF="$missing_dir/missing 
ps2pdf"
+  ;;
+esac
+fi
+PS2PDF=$ac_cv_path_PS2PDF
+
+if test -n "$PS2PDF"; then
+  echo "$as_me:$LINENO: result: $PS2PDF" >&5
+echo "${ECHO_T}$PS2PDF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "texi2dvi", so it can be a program name with args.
+set dummy texi2dvi; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TEXI2DVI+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TEXI2DVI in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TEXI2DVI="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_TEXI2DVI" && ac_cv_path_TEXI2DVI="$missing_dir/missing 
texi2dvi"
+  ;;
+esac
+fi
+TEXI2DVI=$ac_cv_path_TEXI2DVI
+
+if test -n "$TEXI2DVI"; then
+  echo "$as_me:$LINENO: result: $TEXI2DVI" >&5
+echo "${ECHO_T}$TEXI2DVI" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5
+echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6
+if test "${ac_cv_sys_interpreter+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  echo '#! /bin/cat
+exit 69
+' >conftest
+chmod u+x conftest
+(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
+if test $? -ne 69; then
+   ac_cv_sys_interpreter=yes
+else
+   ac_cv_sys_interpreter=no
+fi
+rm -f conftest
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5
+echo "${ECHO_T}$ac_cv_sys_interpreter" >&6
+interpval=$ac_cv_sys_interpreter
+
+if test X"$ac_cv_sys_interpreter" != X"yes" ; then
+  # silly trick to avoid problems in AC macros...
+  ac_msg='perl scripts using #! may not be invoked properly'
+  { echo "$as_me:$LINENO: WARNING: $ac_msg" >&5
+echo "$as_me: WARNING: $ac_msg" >&2;}
+fi
+
+# BSD's logo is a devil for a reason, hey?
+echo "$as_me:$LINENO: checking for BSD VPATH bug in make" >&5
+echo $ECHO_N "checking for BSD VPATH bug in make... $ECHO_C" >&6
+if test "${ccvs_cv_bsd_make_vpath_bug+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test ! -d ac_test_dir ; then
+       { ac_try='mkdir ac_test_dir'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+fi
+cat >conftestmake <<EOF
+VPATH = ac_test_dir
+ac_test_target: ac_test_dep
+       echo BSD VPATH bug present >&2
+ac_test_dep: ac_test_dep_dep
+EOF
+touch ac_test_dir/ac_test_dep_dep
+touch ac_test_dir/ac_test_dep
+touch ac_test_target
+# Don't know why, but the following test doesn't work under FreeBSD 4.2
+# without this sleep command
+sleep 1
+if { ac_try='make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ 
present\$ >/dev/null'
+  { (eval 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
+       ccvs_cv_bsd_make_vpath_bug=yes
+else
+       ccvs_cv_bsd_make_vpath_bug=no
+fi
+{ ac_try='rm -rf ac_test_dir ac_test_target conftestmake'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_bsd_make_vpath_bug" >&5
+echo "${ECHO_T}$ccvs_cv_bsd_make_vpath_bug" >&6
+# We also don't need to worry about the bug when $srcdir = $builddir
+
+
+if \
+               test $ccvs_cv_bsd_make_vpath_bug = no \
+               || test $srcdir = .; then
+  MAKE_TARGETS_IN_VPATH_TRUE=
+  MAKE_TARGETS_IN_VPATH_FALSE='#'
+else
+  MAKE_TARGETS_IN_VPATH_TRUE='#'
+  MAKE_TARGETS_IN_VPATH_FALSE=
+fi
+
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+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 <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+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
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+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
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  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_search_opendir="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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
+/* 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
+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 opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  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_search_opendir="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+  test "$ac_cv_search_opendir" = "none required" || 
LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+else
+  echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
+if test "${ac_cv_search_opendir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_opendir=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  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_search_opendir="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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
+/* 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
+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 opendir ();
+int
+main ()
+{
+opendir ();
+  ;
+  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_search_opendir="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6
+if test "$ac_cv_search_opendir" != no; then
+  test "$ac_cv_search_opendir" = "none required" || 
LIBS="$ac_cv_search_opendir $LIBS"
+
+fi
+
+fi
+
+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
+/* 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
+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_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+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
+/* 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
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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
+/* 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
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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 TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+       || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f 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='./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
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" 
>&6
+if test "${ac_cv_header_sys_wait_h+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 <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+  int s;
+  wait (&s);
+  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+  ;
+  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_header_sys_wait_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in \
+       direct.h \
+       fcntl.h \
+       io.h \
+       memory.h \
+       ndbm.h \
+       stdint.h \
+       syslog.h \
+       sys/bsdtypes.h \
+       sys/file.h \
+       sys/param.h \
+       sys/resource.h \
+       sys/select.h \
+       utime.h\
+
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
+echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
+if test "${ac_cv_header_stat_broken+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 <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(S_ISBLK) && defined(S_IFDIR)
+# if S_ISBLK (S_IFDIR)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISBLK) && defined(S_IFCHR)
+# if S_ISBLK (S_IFCHR)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISLNK) && defined(S_IFREG)
+# if S_ISLNK (S_IFREG)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISSOCK) && defined(S_IFREG)
+# if S_ISSOCK (S_IFREG)
+You lose.
+# endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "You lose" >/dev/null 2>&1; then
+  ac_cv_header_stat_broken=yes
+else
+  ac_cv_header_stat_broken=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
+echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
+if test $ac_cv_header_stat_broken = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STAT_MACROS_BROKEN 1
+_ACEOF
+
+fi
+
+
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#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_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+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
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
+if test "${ac_cv_type_uid_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 <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+echo "${ECHO_T}$ac_cv_type_uid_t" >&6
+if test $ac_cv_type_uid_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define uid_t int
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gid_t int
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for mode_t" >&5
+echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
+if test "${ac_cv_type_mode_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.  */
+$ac_includes_default
+int
+main ()
+{
+if ((mode_t *) 0)
+  return 0;
+if (sizeof (mode_t))
+  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_type_mode_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_mode_t=no
+fi
+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
+if test $ac_cv_type_mode_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_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.  */
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+  return 0;
+if (sizeof (pid_t))
+  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_type_pid_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_pid_t=no
+fi
+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
+if test $ac_cv_type_pid_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+if test "${ac_cv_type_signal+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 <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int
+main ()
+{
+int i;
+  ;
+  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_type_signal=void
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_signal=int
+fi
+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
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
+echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_blksize+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 ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blksize)
+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_blksize=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.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blksize)
+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_blksize=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_blksize=no
+fi
+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_blksize" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
+if test $ac_cv_member_struct_stat_st_blksize = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+_ACEOF
+
+
+fi
+
+echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
+echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_rdev+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 ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_rdev)
+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_rdev=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.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_rdev)
+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_rdev=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_rdev=no
+fi
+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_rdev" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
+if test $ac_cv_member_struct_stat_st_rdev = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large 
files" >&5
+echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... 
$ECHO_C" >&6
+if test "${ac_cv_sys_largefile_source+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_largefile_source=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>
+int
+main ()
+{
+return !fseeko;
+  ;
+  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
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#define _LARGEFILE_SOURCE 1
+#include <stdio.h>
+int
+main ()
+{
+return !fseeko;
+  ;
+  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_sys_largefile_source=1; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  break
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
+if test "$ac_cv_sys_largefile_source" != no; then
+
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+
+fi
+rm -f conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+echo "$as_me:$LINENO: checking for fseeko" >&5
+echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
+if test "${ac_cv_func_fseeko+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 <stdio.h>
+int
+main ()
+{
+return fseeko && fseeko (stdin, 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>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_fseeko=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_fseeko=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
+echo "${ECHO_T}$ac_cv_func_fseeko" >&6
+if test $ac_cv_func_fseeko = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSEEKO 1
+_ACEOF
+
+fi
+
+if test $ac_cv_func_fseeko = no; then
+    case $LIBOBJS in
+    "fseeko.$ac_objext"   | \
+  *" fseeko.$ac_objext"   | \
+    "fseeko.$ac_objext "* | \
+  *" fseeko.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fseeko.$ac_objext" ;;
+esac
+
+    case $LIBOBJS in
+    "ftello.$ac_objext"   | \
+  *" ftello.$ac_objext"   | \
+    "ftello.$ac_objext "* | \
+  *" ftello.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS ftello.$ac_objext" ;;
+esac
+
+fi
+
+# Replace functions with versions in lib/ when they can't be found.
+
+for ac_func in \
+       waitpid \
+
+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
+
+else
+  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
+
+
+
+#
+# Special hack for a SunOS 5.7 (aka Solaris 7) select() problem.
+#
+
+
+for ac_header in fcntl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ echo "$as_me:$LINENO: checking whether select hangs on /dev/null fd when 
timeout is NULL" >&5
+echo $ECHO_N "checking whether select hangs on /dev/null fd when timeout is 
NULL... $ECHO_C" >&6
+if test "${ccvs_cv_func_select_hang+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+        ccvs_cv_func_select_hang=yes
+else
+  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>
+#include <sys/select.h>
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+#include <errno.h>
+int
+main ()
+{
+
+  int numfds;
+  fd_set readfds;
+  struct timeval timeout;
+  int fd = open ("/dev/null", O_RDONLY);
+
+  FD_ZERO (&readfds);
+  FD_SET (fd, &readfds);
+  timeout.tv_sec = 0;
+  timeout.tv_usec = 1;
+
+  while ((numfds = select (fd + 1, &readfds, NULL, NULL, &timeout)) < 0
+        && errno == EINTR);
+  return (numfds <= 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  ccvs_cv_func_select_hang=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ccvs_cv_func_select_hang=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_func_select_hang" >&5
+echo "${ECHO_T}$ccvs_cv_func_select_hang" >&6
+  if test $ccvs_cv_func_select_hang = yes; then
+
+
+
+for ac_header in fcntl.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
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+    case $LIBOBJS in
+    "sunos57-select.$ac_objext"   | \
+  *" sunos57-select.$ac_objext"   | \
+    "sunos57-select.$ac_objext "* | \
+  *" sunos57-select.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS sunos57-select.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define select rpl_select
+_ACEOF
+
+  fi
+
+
+#
+# Begin GNULIB stuff.
+#
+
+# Look for functions from GNULIB and replace with versions in lib/ when
+# necessary.
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo "$as_me:$LINENO: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
+if test "${ac_cv_working_alloca_h+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 <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+  ;
+  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_working_alloca_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_working_alloca_h=no
+fi
+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
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6
+if test "${ac_cv_func_alloca_works+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.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  if HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (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
+  ac_cv_func_alloca_works=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_alloca_works=no
+fi
+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
+
+if test $ac_cv_func_alloca_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
+if test "${ac_cv_os_cray+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.  */
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&6
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
+if test "${ac_cv_c_stack_direction+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+  exit (find_stack_direction () < 0);
+}
+_ACEOF
+rm -f 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='./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_c_stack_direction=1
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+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
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if STDC_HEADERS || HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+exit (malloc (0) ? 0 : 1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_malloc_0_nonnull=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_malloc_0_nonnull=no
+fi
+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_malloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
+if test $ac_cv_func_malloc_0_nonnull = yes; then
+  gl_cv_func_malloc_0_nonnull=1
+else
+  gl_cv_func_malloc_0_nonnull=0
+fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
+_ACEOF
+
+
+
+  echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${ac_cv_type_long_long+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.  */
+long long ll = 1LL; int i = 63;
+int
+main ()
+{
+long long llmax = (long long) -1;
+     return ll << i | ll >> i | llmax / ll | llmax % ll;
+  ;
+  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_type_long_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+echo "${ECHO_T}$ac_cv_type_long_long" >&6
+  if test $ac_cv_type_long_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6
+if test "${gt_cv_c_long_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$GCC" = yes; then
+       gt_cv_c_long_double=yes
+     else
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+         /* The Stardent Vistra knows sizeof(long double), but does not 
support it.  */
+         long double foo = 0.0;
+         /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
+         int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+
+int
+main ()
+{
+
+  ;
+  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
+  gt_cv_c_long_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_c_long_double=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+     fi
+fi
+echo "$as_me:$LINENO: result: $gt_cv_c_long_double" >&5
+echo "${ECHO_T}$gt_cv_c_long_double" >&6
+  if test $gt_cv_c_long_double = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_DOUBLE 1
+_ACEOF
+
+  fi
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifndef __cplusplus
+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>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_c_inline=$ac_kw; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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) ;;
+  *)
+    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 for C/C++ restrict keyword" >&5
+echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
+if test "${gl_cv_c_restrict+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gl_cv_c_restrict=no
+   # Try the official restrict keyword, then gcc's __restrict, and
+   # the less common variants.
+   for ac_kw in restrict __restrict __restrict__ _Restrict; do
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+float * $ac_kw x;
+_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
+  gl_cv_c_restrict=$ac_kw; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
+
+fi
+echo "$as_me:$LINENO: result: $gl_cv_c_restrict" >&5
+echo "${ECHO_T}$gl_cv_c_restrict" >&6
+ case $gl_cv_c_restrict in
+   restrict) ;;
+   no)
+cat >>confdefs.h <<\_ACEOF
+#define restrict
+_ACEOF
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $gl_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+  echo "$as_me:$LINENO: checking for IPv4 sockets" >&5
+echo $ECHO_N "checking for IPv4 sockets... $ECHO_C" >&6
+  if test "${gl_cv_socket_ipv4+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 <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main ()
+{
+int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+  ;
+  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
+  gl_cv_socket_ipv4=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_socket_ipv4=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  echo "$as_me:$LINENO: result: $gl_cv_socket_ipv4" >&5
+echo "${ECHO_T}$gl_cv_socket_ipv4" >&6
+  if test $gl_cv_socket_ipv4 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IPV4 1
+_ACEOF
+
+  fi
+
+  echo "$as_me:$LINENO: checking for IPv6 sockets" >&5
+echo $ECHO_N "checking for IPv6 sockets... $ECHO_C" >&6
+  if test "${gl_cv_socket_ipv6+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 <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main ()
+{
+int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+  ;
+  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
+  gl_cv_socket_ipv6=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_socket_ipv6=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  echo "$as_me:$LINENO: result: $gl_cv_socket_ipv6" >&5
+echo "${ECHO_T}$gl_cv_socket_ipv6" >&6
+  if test $gl_cv_socket_ipv6 = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IPV6 1
+_ACEOF
+
+  fi
+
+
+
+
+
+
+for ac_header in $gl_header_list
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5
+echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6
+if test "${ac_cv_search_getaddrinfo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_getaddrinfo=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+  ;
+  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_search_getaddrinfo="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_getaddrinfo" = no; then
+  for ac_lib in nsl socket; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+  ;
+  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_search_getaddrinfo="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6
+if test "$ac_cv_search_getaddrinfo" != no; then
+  test "$ac_cv_search_getaddrinfo" = "none required" || 
LIBS="$ac_cv_search_getaddrinfo $LIBS"
+
+fi
+
+  echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
+echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_search_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gethostbyname=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  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_search_gethostbyname="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gethostbyname" = no; then
+  for ac_lib in inet nsl; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  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_search_gethostbyname="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
+if test "$ac_cv_search_gethostbyname" != no; then
+  test "$ac_cv_search_gethostbyname" = "none required" || 
LIBS="$ac_cv_search_gethostbyname $LIBS"
+
+fi
+
+  echo "$as_me:$LINENO: checking for library containing getservbyname" >&5
+echo $ECHO_N "checking for library containing getservbyname... $ECHO_C" >&6
+if test "${ac_cv_search_getservbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_getservbyname=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getservbyname ();
+int
+main ()
+{
+getservbyname ();
+  ;
+  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_search_getservbyname="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_getservbyname" = no; then
+  for ac_lib in inet nsl socket xnet; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getservbyname ();
+int
+main ()
+{
+getservbyname ();
+  ;
+  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_search_getservbyname="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5
+echo "${ECHO_T}$ac_cv_search_getservbyname" >&6
+if test "$ac_cv_search_getservbyname" != no; then
+  test "$ac_cv_search_getservbyname" = "none required" || 
LIBS="$ac_cv_search_getservbyname $LIBS"
+
+fi
+
+
+
+for ac_func in getaddrinfo gai_strerror
+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
+
+else
+  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
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether getaddrinfo is declared" >&5
+echo $ECHO_N "checking whether getaddrinfo is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getaddrinfo+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.  */
+
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+#ifndef getaddrinfo
+  char *p = (char *) getaddrinfo;
+#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_getaddrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getaddrinfo" >&6
+if test $ac_cv_have_decl_getaddrinfo = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETADDRINFO 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETADDRINFO 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether freeaddrinfo is declared" >&5
+echo $ECHO_N "checking whether freeaddrinfo is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_freeaddrinfo+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.  */
+
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+#ifndef freeaddrinfo
+  char *p = (char *) freeaddrinfo;
+#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_freeaddrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_freeaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_freeaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_have_decl_freeaddrinfo" >&6
+if test $ac_cv_have_decl_freeaddrinfo = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREEADDRINFO 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREEADDRINFO 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether gai_strerror is declared" >&5
+echo $ECHO_N "checking whether gai_strerror is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_gai_strerror+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.  */
+
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+#ifndef gai_strerror
+  char *p = (char *) gai_strerror;
+#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_gai_strerror=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_have_decl_gai_strerror" >&6
+if test $ac_cv_have_decl_gai_strerror = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GAI_STRERROR 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GAI_STRERROR 0
+_ACEOF
+
+
+fi
+
+
+  echo "$as_me:$LINENO: checking for struct addrinfo" >&5
+echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
+if test "${ac_cv_type_struct_addrinfo+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 <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+if ((struct addrinfo *) 0)
+  return 0;
+if (sizeof (struct addrinfo))
+  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_type_struct_addrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_struct_addrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
+echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
+if test $ac_cv_type_struct_addrinfo = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ADDRINFO 1
+_ACEOF
+
+
+fi
+
+
+
+echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
+if test "${ac_cv_header_stdbool_h+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 <stdbool.h>
+         #ifndef bool
+          "error: bool is not defined"
+         #endif
+         #ifndef false
+          "error: false is not defined"
+         #endif
+         #if false
+          "error: false is not 0"
+         #endif
+         #ifndef true
+          "error: true is not defined"
+         #endif
+         #if true != 1
+          "error: true is not 1"
+         #endif
+         #ifndef __bool_true_false_are_defined
+          "error: __bool_true_false_are_defined is not defined"
+         #endif
+
+         struct s { _Bool s: 1; _Bool t; } s;
+
+         char a[true == 1 ? 1 : -1];
+         char b[false == 0 ? 1 : -1];
+         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+         char d[(bool) -0.5 == true ? 1 : -1];
+         bool e = &s;
+         char f[(_Bool) -0.0 == false ? 1 : -1];
+         char g[true];
+         char h[sizeof (_Bool)];
+         char i[sizeof s.t];
+         enum { j = false, k = true, l = false * true, m = true * 256 };
+         _Bool n[m];
+         char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+         char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+
+int
+main ()
+{
+
+         /* Refer to every declared value, to avoid compiler optimizations.  */
+         return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+                 + !m + !n + !o + !p);
+
+  ;
+  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_header_stdbool_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdbool_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
+   echo "$as_me:$LINENO: checking for _Bool" >&5
+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
+if test "${ac_cv_type__Bool+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 ()
+{
+if ((_Bool *) 0)
+  return 0;
+if (sizeof (_Bool))
+  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_type__Bool=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type__Bool=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+echo "${ECHO_T}$ac_cv_type__Bool" >&6
+if test $ac_cv_type__Bool = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+   if test $ac_cv_header_stdbool_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STDBOOL_H 1
+_ACEOF
+
+   fi
+
+
+
+
+
+for ac_func in $gl_func_list
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  case $LIBOBJS in
+    "save-cwd.$ac_objext"   | \
+  *" save-cwd.$ac_objext"   | \
+    "save-cwd.$ac_objext "* | \
+  *" save-cwd.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS save-cwd.$ac_objext" ;;
+esac
+
+
+  :
+
+
+
+
+
+
+
+      echo "$as_me:$LINENO: checking whether memrchr is declared" >&5
+echo $ECHO_N "checking whether memrchr is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_memrchr+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 memrchr
+  char *p = (char *) memrchr;
+#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_memrchr=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_memrchr=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_memrchr" >&5
+echo "${ECHO_T}$ac_cv_have_decl_memrchr" >&6
+if test $ac_cv_have_decl_memrchr = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MEMRCHR 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MEMRCHR 0
+_ACEOF
+
+
+fi
+
+
+
+
+    echo "$as_me:$LINENO: checking whether system is Windows or MSDOS" >&5
+echo $ECHO_N "checking whether system is Windows or MSDOS... $ECHO_C" >&6
+if test "${ac_cv_win_or_dos+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.  */
+
+int
+main ()
+{
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined 
__CYGWIN__
+neither MSDOS nor Windows
+#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_win_or_dos=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_win_or_dos=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_win_or_dos" >&5
+echo "${ECHO_T}$ac_cv_win_or_dos" >&6
+
+    if test x"$ac_cv_win_or_dos" = xyes; then
+      ac_fs_accepts_drive_letter_prefix=1
+      ac_fs_backslash_is_file_name_separator=1
+    else
+      ac_fs_accepts_drive_letter_prefix=0
+      ac_fs_backslash_is_file_name_separator=0
+    fi
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 
$ac_fs_accepts_drive_letter_prefix
+_ACEOF
+
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 
$ac_fs_backslash_is_file_name_separator
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
+echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strerror_r+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 strerror_r
+  char *p = (char *) strerror_r;
+#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_strerror_r=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strerror_r=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
+if test $ac_cv_have_decl_strerror_r = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 0
+_ACEOF
+
+
+fi
+
+
+
+for ac_func in strerror_r
+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 whether strerror_r returns char *" >&5
+echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    ac_cv_func_strerror_r_char_p=no
+    if test $ac_cv_have_decl_strerror_r = yes; then
+      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 ()
+{
+
+         char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         char *p = strerror_r (0, buf, sizeof buf);
+
+  ;
+  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_func_strerror_r_char_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    else
+      # strerror_r is not declared.  Choose between
+      # systems that have relatively inaccessible declarations for the
+      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+      # former has a strerror_r that returns char*, while the latter
+      # has a strerror_r that returns `int'.
+      # This test should segfault on the DEC system.
+      if test "$cross_compiling" = yes; then
+  :
+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
+       extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         exit (!isalpha (x));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_strerror_r_char_p=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+    fi
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
+echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRERROR_R_CHAR_P 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+if test "${ac_cv_type_mbstate_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.  */
+$ac_includes_default
+#          include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+  ;
+  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_type_mbstate_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_mbstate_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
+echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
+   if test $ac_cv_type_mbstate_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define mbstate_t int
+_ACEOF
+
+   fi
+
+
+
+   echo "$as_me:$LINENO: checking whether getcwd (NULL, 0) allocates memory 
for result" >&5
+echo $ECHO_N "checking whether getcwd (NULL, 0) allocates memory for result... 
$ECHO_C" >&6
+if test "${gl_cv_func_getcwd_null+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  gl_cv_func_getcwd_null=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#       include <stdlib.h>
+#       include <unistd.h>
+#       ifndef getcwd
+        char *getcwd ();
+#       endif
+        int
+        main ()
+        {
+          if (chdir ("/") != 0)
+            exit (1);
+          else
+            {
+              char *f = getcwd (NULL, 0);
+              exit (! (f && f[0] == '/' && !f[1]));
+            }
+        }
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_getcwd_null=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_getcwd_null=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_null" >&5
+echo "${ECHO_T}$gl_cv_func_getcwd_null" >&6
+
+
+      echo "$as_me:$LINENO: checking whether getcwd is declared" >&5
+echo $ECHO_N "checking whether getcwd is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getcwd+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 getcwd
+  char *p = (char *) getcwd;
+#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_getcwd=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getcwd=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getcwd" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getcwd" >&6
+if test $ac_cv_have_decl_getcwd = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCWD 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCWD 0
+_ACEOF
+
+
+fi
+
+
+
+   echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5
+echo $ECHO_N "checking for d_ino member in directory struct... $ECHO_C" >&6
+if test "${jm_cv_struct_dirent_d_ino+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 <sys/types.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#else /* not HAVE_DIRENT_H */
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif /* HAVE_SYS_NDIR_H */
+# ifdef HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif /* HAVE_SYS_DIR_H */
+# ifdef HAVE_NDIR_H
+#  include <ndir.h>
+# endif /* HAVE_NDIR_H */
+#endif /* HAVE_DIRENT_H */
+
+int
+main ()
+{
+struct dirent dp; dp.d_ino = 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>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
+  jm_cv_struct_dirent_d_ino=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+jm_cv_struct_dirent_d_ino=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+fi
+echo "$as_me:$LINENO: result: $jm_cv_struct_dirent_d_ino" >&5
+echo "${ECHO_T}$jm_cv_struct_dirent_d_ino" >&6
+   if test $jm_cv_struct_dirent_d_ino = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define D_INO_IN_DIRENT 1
+_ACEOF
+
+   fi
+
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be 
included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... 
$ECHO_C" >&6
+if test "${ac_cv_header_time+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 <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+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_header_time=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_time=no
+fi
+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
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for struct timespec" >&5
+echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6
+if test "${fu_cv_sys_struct_timespec+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.  */
+
+#      if TIME_WITH_SYS_TIME
+#       include <sys/time.h>
+#       include <time.h>
+#      else
+#       if HAVE_SYS_TIME_H
+#        include <sys/time.h>
+#       else
+#        include <time.h>
+#       endif
+#      endif
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  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
+  fu_cv_sys_struct_timespec=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fu_cv_sys_struct_timespec=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $fu_cv_sys_struct_timespec" >&5
+echo "${ECHO_T}$fu_cv_sys_struct_timespec" >&6
+
+  if test $fu_cv_sys_struct_timespec = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_TIMESPEC 1
+_ACEOF
+
+  fi
+
+
+
+
+  echo "$as_me:$LINENO: checking whether nanosleep is declared" >&5
+echo $ECHO_N "checking whether nanosleep is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_nanosleep+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 <time.h>
+
+int
+main ()
+{
+#ifndef nanosleep
+  char *p = (char *) nanosleep;
+#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_nanosleep=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_nanosleep=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_nanosleep" >&5
+echo "${ECHO_T}$ac_cv_have_decl_nanosleep" >&6
+if test $ac_cv_have_decl_nanosleep = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_NANOSLEEP 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_NANOSLEEP 0
+_ACEOF
+
+
+fi
+
+
+
+  # expand $ac_aux_dir to an absolute path
+  am_aux_dir=`cd $ac_aux_dir && pwd`
+
+  # getdate.y works with bison only.
+  : ${YACC="\${SHELL} $am_aux_dir/bison-missing --run bison -y"}
+
+
+  echo "$as_me:$LINENO: checking for compound literals" >&5
+echo $ECHO_N "checking for compound literals... $ECHO_C" >&6
+if test "${gl_cv_compound_literals+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.  */
+struct s { int i, j; }; struct s s = (struct s) { 1, 2 };
+int
+main ()
+{
+struct s t = (struct s) { 3, 4 };
+  ;
+  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
+  gl_cv_compound_literals=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_compound_literals=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_compound_literals" >&5
+echo "${ECHO_T}$gl_cv_compound_literals" >&6
+  if test $gl_cv_compound_literals = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_COMPOUND_LITERALS 1
+_ACEOF
+
+  fi
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" 
>&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... 
$ECHO_C" >&6
+if test "${ac_cv_struct_tm+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 <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm *tp; tp->tm_sec;
+  ;
+  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_struct_tm=time.h
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_struct_tm=sys/time.h
+fi
+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
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+  # dnl Persuade glibc <time.h> to declare these functions.
+
+
+  # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
+  # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+
+  # Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
+  # programs in the package would end up linked with that potentially-shared
+  # library, inducing unnecessary run-time overhead.
+  gl_saved_libs=$LIBS
+    echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5
+echo $ECHO_N "checking for library containing clock_gettime... $ECHO_C" >&6
+if test "${ac_cv_search_clock_gettime+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_clock_gettime=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 clock_gettime ();
+int
+main ()
+{
+clock_gettime ();
+  ;
+  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_search_clock_gettime="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_clock_gettime" = no; then
+  for ac_lib in rt posix4; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 clock_gettime ();
+int
+main ()
+{
+clock_gettime ();
+  ;
+  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_search_clock_gettime="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5
+echo "${ECHO_T}$ac_cv_search_clock_gettime" >&6
+if test "$ac_cv_search_clock_gettime" != no; then
+  test "$ac_cv_search_clock_gettime" = "none required" || 
LIBS="$ac_cv_search_clock_gettime $LIBS"
+  test "$ac_cv_search_clock_gettime" = "none required" ||
+                    LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
+fi
+
+
+
+
+for ac_func in clock_gettime clock_settime
+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
+
+  LIBS=$gl_saved_libs
+
+
+ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
+echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_gmtoff+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 <time.h>
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_gmtoff)
+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_gmtoff=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 <time.h>
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_gmtoff)
+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_gmtoff=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_gmtoff=no
+fi
+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_gmtoff" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6
+if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_GMTOFF 1
+_ACEOF
+
+fi
+
+
+
+      echo "$as_me:$LINENO: checking whether getdelim is declared" >&5
+echo $ECHO_N "checking whether getdelim is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getdelim+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 getdelim
+  char *p = (char *) getdelim;
+#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_getdelim=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getdelim=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getdelim" >&6
+if test $ac_cv_have_decl_getdelim = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+      echo "$as_me:$LINENO: checking whether getlogin is declared" >&5
+echo $ECHO_N "checking whether getlogin is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getlogin+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 getlogin
+  char *p = (char *) getlogin;
+#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_getlogin=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getlogin=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getlogin" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getlogin" >&6
+if test $ac_cv_have_decl_getlogin = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether getlogin_r is declared" >&5
+echo $ECHO_N "checking whether getlogin_r is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getlogin_r+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 getlogin_r
+  char *p = (char *) getlogin_r;
+#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_getlogin_r=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getlogin_r=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getlogin_r" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getlogin_r" >&6
+if test $ac_cv_have_decl_getlogin_r = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN_R 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN_R 0
+_ACEOF
+
+
+fi
+
+
+
+
+  echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
+if test "${gt_cv_ssize_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 <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+  ;
+  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
+  gt_cv_ssize_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_ssize_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5
+echo "${ECHO_T}$gt_cv_ssize_t" >&6
+  if test $gt_cv_ssize_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ssize_t int
+_ACEOF
+
+  fi
+
+
+  if test -z "$GETOPT_H"; then
+
+for ac_header in getopt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  GETOPT_H=getopt.h
+fi
+
+done
+
+  fi
+
+  if test -z "$GETOPT_H"; then
+
+for ac_func in getopt_long_only
+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
+
+else
+  GETOPT_H=getopt.h
+fi
+done
+
+  fi
+
+      if test -z "$GETOPT_H"; then
+    echo "$as_me:$LINENO: checking whether optreset is declared" >&5
+echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_optreset+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 <getopt.h>
+
+int
+main ()
+{
+#ifndef optreset
+  char *p = (char *) optreset;
+#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_optreset=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_optreset=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
+echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6
+if test $ac_cv_have_decl_optreset = yes; then
+  GETOPT_H=getopt.h
+fi
+
+  fi
+
+      if test -z "$GETOPT_H"; then
+    echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
+echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6
+if test "${gl_cv_func_gnu_getopt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+                        echo "$as_me:$LINENO: checking whether getopt_clip is 
declared" >&5
+echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getopt_clip+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 <getopt.h>
+
+int
+main ()
+{
+#ifndef getopt_clip
+  char *p = (char *) getopt_clip;
+#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_getopt_clip=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getopt_clip=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6
+if test $ac_cv_have_decl_getopt_clip = yes; then
+  gl_cv_func_gnu_getopt=no
+else
+  gl_cv_func_gnu_getopt=yes
+fi
+
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <getopt.h>
+int
+main ()
+{
+
+            char *myargv[3];
+            myargv[0] = "conftest";
+            myargv[1] = "-+";
+            myargv[2] = 0;
+            return getopt (2, myargv, "+a") != '?';
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_gnu_getopt=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_gnu_getopt=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
+echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6
+    if test "$gl_cv_func_gnu_getopt" = "no"; then
+      GETOPT_H=getopt.h
+    fi
+  fi
+
+
+
+
+
+
+
+
+      echo "$as_me:$LINENO: checking whether getpass is declared" >&5
+echo $ECHO_N "checking whether getpass is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getpass+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 getpass
+  char *p = (char *) getpass;
+#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_getpass=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getpass=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getpass" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getpass" >&6
+if test $ac_cv_have_decl_getpass = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETPASS 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETPASS 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+      echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
+echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fflush_unlocked+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 fflush_unlocked
+  char *p = (char *) fflush_unlocked;
+#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_fflush_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fflush_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6
+if test $ac_cv_have_decl_fflush_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFLUSH_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFLUSH_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether flockfile is declared" >&5
+echo $ECHO_N "checking whether flockfile is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_flockfile+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 flockfile
+  char *p = (char *) flockfile;
+#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_flockfile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_flockfile=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_flockfile" >&5
+echo "${ECHO_T}$ac_cv_have_decl_flockfile" >&6
+if test $ac_cv_have_decl_flockfile = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FLOCKFILE 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FLOCKFILE 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
+echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fputs_unlocked+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 fputs_unlocked
+  char *p = (char *) fputs_unlocked;
+#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_fputs_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fputs_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6
+if test $ac_cv_have_decl_fputs_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether funlockfile is declared" >&5
+echo $ECHO_N "checking whether funlockfile is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_funlockfile+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 funlockfile
+  char *p = (char *) funlockfile;
+#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_funlockfile=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_funlockfile=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_funlockfile" >&5
+echo "${ECHO_T}$ac_cv_have_decl_funlockfile" >&6
+if test $ac_cv_have_decl_funlockfile = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FUNLOCKFILE 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FUNLOCKFILE 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
+echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_putc_unlocked+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 putc_unlocked
+  char *p = (char *) putc_unlocked;
+#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_putc_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_putc_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6
+if test $ac_cv_have_decl_putc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+   echo "$as_me:$LINENO: checking for d_type member in directory struct" >&5
+echo $ECHO_N "checking for d_type member in directory struct... $ECHO_C" >&6
+if test "${jm_cv_struct_dirent_d_type+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 <sys/types.h>
+#ifdef HAVE_DIRENT_H
+# include <dirent.h>
+#else /* not HAVE_DIRENT_H */
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif /* HAVE_SYS_NDIR_H */
+# ifdef HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif /* HAVE_SYS_DIR_H */
+# ifdef HAVE_NDIR_H
+#  include <ndir.h>
+# endif /* HAVE_NDIR_H */
+#endif /* HAVE_DIRENT_H */
+
+int
+main ()
+{
+struct dirent dp; dp.d_type = 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>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
+  jm_cv_struct_dirent_d_type=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+jm_cv_struct_dirent_d_type=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+
+fi
+echo "$as_me:$LINENO: result: $jm_cv_struct_dirent_d_type" >&5
+echo "${ECHO_T}$jm_cv_struct_dirent_d_type" >&6
+   if test $jm_cv_struct_dirent_d_type = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT_D_TYPE 1
+_ACEOF
+
+   fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified 
with a trailing slash" >&5
+echo $ECHO_N "checking whether lstat dereferences a symlink specified with a 
trailing slash... $ECHO_C" >&6
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f conftest.sym conftest.file
+echo >conftest.file
+if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_lstat_dereferences_slashed_symlink=no
+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 ()
+{
+struct stat sbuf;
+     /* Linux will dereference the symlink and fail.
+       That is better in the sense that it means we will not
+       have to compile and use the lstat wrapper.  */
+     exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_lstat_dereferences_slashed_symlink=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+else
+  # If the `ln -s' command failed, then we probably don't even
+  # have an lstat function.
+  ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f conftest.sym conftest.file
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" 
>&5
+echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6
+
+test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+
+if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+  case $LIBOBJS in
+    "lstat.$ac_objext"   | \
+  *" lstat.$ac_objext"   | \
+    "lstat.$ac_objext "* | \
+  *" lstat.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;;
+esac
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    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 "${gl_cv_func_mbrtowc+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 wc;
+              char const s[] = "";
+              size_t n = 1;
+              mbstate_t state;
+              return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+  ;
+  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
+  gl_cv_func_mbrtowc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_func_mbrtowc=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6
+  if test $gl_cv_func_mbrtowc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRTOWC 1
+_ACEOF
+
+  fi
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+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 <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#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
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+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 <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#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_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  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
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f 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='./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_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+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
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+     ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether <limits.h> defines MIN and MAX" >&5
+echo $ECHO_N "checking whether <limits.h> defines MIN and MAX... $ECHO_C" >&6
+if test "${gl_cv_minmax_in_limits_h+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 <limits.h>
+int x = MIN (42, 17);
+int
+main ()
+{
+
+  ;
+  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
+  gl_cv_minmax_in_limits_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_minmax_in_limits_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_minmax_in_limits_h" >&5
+echo "${ECHO_T}$gl_cv_minmax_in_limits_h" >&6
+  if test $gl_cv_minmax_in_limits_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MINMAX_IN_LIMITS_H 1
+_ACEOF
+
+  fi
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether <sys/param.h> defines MIN and MAX" >&5
+echo $ECHO_N "checking whether <sys/param.h> defines MIN and MAX... $ECHO_C" 
>&6
+if test "${gl_cv_minmax_in_sys_param_h+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 <sys/param.h>
+int x = MIN (42, 17);
+int
+main ()
+{
+
+  ;
+  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
+  gl_cv_minmax_in_sys_param_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_minmax_in_sys_param_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_minmax_in_sys_param_h" >&5
+echo "${ECHO_T}$gl_cv_minmax_in_sys_param_h" >&6
+  if test $gl_cv_minmax_in_sys_param_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MINMAX_IN_SYS_PARAM_H 1
+_ACEOF
+
+  fi
+
+
+
+
+
+      echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+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 getenv
+  char *p = (char *) getenv;
+#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_getenv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+
+
+
+
+  echo "$as_me:$LINENO: checking for inttypes.h" >&5
+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
+if test "${gl_cv_header_inttypes_h+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 <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+  ;
+  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
+  gl_cv_header_inttypes_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_header_inttypes_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5
+echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6
+  if test $gl_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for stdint.h" >&5
+echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6
+if test "${gl_cv_header_stdint_h+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 <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+  ;
+  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
+  gl_cv_header_stdint_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_header_stdint_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
+echo "${ECHO_T}$gl_cv_header_stdint_h" >&6
+  if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for unsigned long long" >&5
+echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6
+if test "${ac_cv_type_unsigned_long_long+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.  */
+unsigned long long ull = 1ULL; int i = 63;
+int
+main ()
+{
+unsigned long long ullmax = (unsigned long long) -1;
+     return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+  ;
+  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_type_unsigned_long_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_unsigned_long_long=no
+fi
+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
+  if test $ac_cv_type_unsigned_long_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG 1
+_ACEOF
+
+  fi
+
+
+
+
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; 
then
+
+    test $ac_cv_type_unsigned_long_long = yes \
+      && ac_type='unsigned long long' \
+      || ac_type='unsigned long'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UINTMAX_T 1
+_ACEOF
+
+  fi
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+echo "$as_me:$LINENO: checking for working mktime" >&5
+echo $ECHO_N "checking for working mktime... $ECHO_C" >&6
+if test "${ac_cv_func_working_mktime+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_working_mktime=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* 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>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#if !HAVE_ALARM
+# define alarm(X) /* empty */
+#endif
+
+/* Work around redefinition to rpl_putenv by other config tests.  */
+#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 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]))
+
+/* Fail if mktime fails to convert a date in the spring-forward gap.
+   Based on a problem report from Andreas Jaeger.  */
+static void
+spring_forward_gap ()
+{
+  /* glibc (up to about 1998-10-07) failed this test. */
+  struct tm tm;
+
+  /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+     instead of "TZ=America/Vancouver" in order to detect the bug even
+     on systems that don't support the Olson extension, or don't have the
+     full zoneinfo tables installed.  */
+  putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+  tm.tm_year = 98;
+  tm.tm_mon = 3;
+  tm.tm_mday = 5;
+  tm.tm_hour = 2;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  if (mktime (&tm) == (time_t)-1)
+    exit (1);
+}
+
+static void
+mktime_test1 (now)
+     time_t now;
+{
+  struct tm *lt;
+  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
+irix_6_4_bug ()
+{
+  /* Based on code from Ariel Faigon.  */
+  struct tm tm;
+  tm.tm_year = 96;
+  tm.tm_mon = 3;
+  tm.tm_mday = 0;
+  tm.tm_hour = 0;
+  tm.tm_min = 0;
+  tm.tm_sec = 0;
+  tm.tm_isdst = -1;
+  mktime (&tm);
+  if (tm.tm_mon != 2 || tm.tm_mday != 31)
+    exit (1);
+}
+
+static void
+bigtime_test (j)
+     int j;
+{
+  struct tm tm;
+  time_t now;
+  tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+  now = mktime (&tm);
+  if (now != (time_t) -1)
+    {
+      struct tm *lt = localtime (&now);
+      if (! (lt
+            && lt->tm_year == tm.tm_year
+            && lt->tm_mon == tm.tm_mon
+            && lt->tm_mday == tm.tm_mday
+            && lt->tm_hour == tm.tm_hour
+            && lt->tm_min == tm.tm_min
+            && lt->tm_sec == tm.tm_sec
+            && lt->tm_yday == tm.tm_yday
+            && lt->tm_wday == tm.tm_wday
+            && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+                 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+       exit (1);
+    }
+}
+
+int
+main ()
+{
+  time_t t, delta;
+  int i, j;
+
+  /* This test makes some buggy mktime implementations loop.
+     Give up after 60 seconds; a mktime slower than that
+     isn't worth using anyway.  */
+  alarm (60);
+
+  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++)
+    {
+      if (tz_strings[i])
+       putenv (tz_strings[i]);
+
+      for (t = 0; t <= time_t_max - delta; t += delta)
+       mktime_test (t);
+      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 - 1);
+    }
+  irix_6_4_bug ();
+  spring_forward_gap ();
+  exit (0);
+}
+_ACEOF
+rm -f 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='./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_working_mktime=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_working_mktime=no
+fi
+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
+  case $LIBOBJS in
+    "mktime.$ac_objext"   | \
+  *" mktime.$ac_objext"   | \
+    "mktime.$ac_objext "* | \
+  *" mktime.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;;
+esac
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  # Check for mmap()
+
+
+for ac_header in stdlib.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
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in getpagesize
+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 working mmap" >&5
+echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+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
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the file system buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propagated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !STDC_HEADERS && !HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#if !HAVE_GETPAGESIZE
+/* Assume that all systems that can run configure have sys/param.h.  */
+# if !HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  if HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192  /* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+  char *data, *data2, *data3;
+  int i, pagesize;
+  int fd;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    exit (1);
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 0600);
+  if (fd < 0)
+    exit (1);
+  if (write (fd, data, pagesize) != pagesize)
+    exit (1);
+  close (fd);
+
+  /* Next, try to mmap the file at a fixed address which already has
+     something else allocated at it.  If we can, also make sure that
+     we see the same garbage.  */
+  fd = open ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    exit (1);
+  data2 = (char *) malloc (2 * pagesize);
+  if (!data2)
+    exit (1);
+  data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+                    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+    exit (1);
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data2 + i))
+      exit (1);
+
+  /* Finally, make sure that changes to the mapped area do not
+     percolate back to the file as seen by read().  (This is a bug on
+     some variants of i386 svr4.0.)  */
+  for (i = 0; i < pagesize; ++i)
+    *(data2 + i) = *(data2 + i) + 1;
+  data3 = (char *) malloc (pagesize);
+  if (!data3)
+    exit (1);
+  if (read (fd, data3, pagesize) != pagesize)
+    exit (1);
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data3 + i))
+      exit (1);
+  close (fd);
+  exit (0);
+}
+_ACEOF
+rm -f 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='./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_mmap_fixed_mapped=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
+fi
+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
+echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+fi
+rm -f conftest.mmap
+
+
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $ac_cv_func_mmap_fixed_mapped = yes; then
+    echo "$as_me:$LINENO: checking for MAP_ANONYMOUS" >&5
+echo $ECHO_N "checking for MAP_ANONYMOUS... $ECHO_C" >&6
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    if test $gl_have_mmap_anonymous != yes; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cant identify this map." >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define MAP_ANONYMOUS MAP_ANON
+_ACEOF
+
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+    fi
+    echo "$as_me:$LINENO: result: $gl_have_mmap_anonymous" >&5
+echo "${ECHO_T}$gl_have_mmap_anonymous" >&6
+    if test $gl_have_mmap_anonymous = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MAP_ANONYMOUS 1
+_ACEOF
+
+    fi
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  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 "${am_cv_langinfo_codeset+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 <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+  ;
+  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
+  am_cv_langinfo_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_langinfo_codeset=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
+  if test $am_cv_langinfo_codeset = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for inttypes.h" >&5
+echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6
+if test "${gt_cv_header_inttypes_h+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 <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+
+  ;
+  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
+  gt_cv_header_inttypes_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_header_inttypes_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5
+echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6
+  if test $gt_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+  fi
+
+
+      echo "$as_me:$LINENO: checking whether strdup is declared" >&5
+echo $ECHO_N "checking whether strdup is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strdup+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 strdup
+  char *p = (char *) strdup;
+#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_strdup=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strdup=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strdup" >&6
+if test $ac_cv_have_decl_strdup = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP 0
+_ACEOF
+
+
+fi
+
+
+
+
+for ac_func in strftime
+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
+
+else
+  # strftime is in -lintl on SCO UNIX.
+echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
+echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
+if test "${ac_cv_lib_intl_strftime+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 strftime ();
+int
+main ()
+{
+strftime ();
+  ;
+  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_lib_intl_strftime=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_intl_strftime=no
+fi
+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_intl_strftime" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
+if test $ac_cv_lib_intl_strftime = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ case $LIBOBJS in
+    "strftime.$ac_objext"   | \
+  *" strftime.$ac_objext"   | \
+    "strftime.$ac_objext "* | \
+  *" strftime.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strftime.$ac_objext" ;;
+esac
+
+
+ # strftime.c uses the underyling system strftime if it exists.
+
+
+ # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define my_strftime nstrftime
+_ACEOF
+
+
+
+      echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
+echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_clearerr_unlocked+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 clearerr_unlocked
+  char *p = (char *) clearerr_unlocked;
+#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_clearerr_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_clearerr_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6
+if test $ac_cv_have_decl_clearerr_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CLEARERR_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CLEARERR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
+echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_feof_unlocked+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 feof_unlocked
+  char *p = (char *) feof_unlocked;
+#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_feof_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_feof_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6
+if test $ac_cv_have_decl_feof_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
+echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ferror_unlocked+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 ferror_unlocked
+  char *p = (char *) ferror_unlocked;
+#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_ferror_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_ferror_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6
+if test $ac_cv_have_decl_ferror_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FERROR_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FERROR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
+echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fgets_unlocked+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 fgets_unlocked
+  char *p = (char *) fgets_unlocked;
+#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_fgets_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fgets_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6
+if test $ac_cv_have_decl_fgets_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
+echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fputc_unlocked+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 fputc_unlocked
+  char *p = (char *) fputc_unlocked;
+#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_fputc_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fputc_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6
+if test $ac_cv_have_decl_fputc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
+echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fread_unlocked+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 fread_unlocked
+  char *p = (char *) fread_unlocked;
+#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_fread_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fread_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6
+if test $ac_cv_have_decl_fread_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREAD_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREAD_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
+echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fwrite_unlocked+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 fwrite_unlocked
+  char *p = (char *) fwrite_unlocked;
+#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_fwrite_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_fwrite_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6
+if test $ac_cv_have_decl_fwrite_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getc_unlocked+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 getc_unlocked
+  char *p = (char *) getc_unlocked;
+#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_getc_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getc_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6
+if test $ac_cv_have_decl_getc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
+echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getchar_unlocked+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 getchar_unlocked
+  char *p = (char *) getchar_unlocked;
+#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_getchar_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getchar_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6
+if test $ac_cv_have_decl_getchar_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCHAR_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCHAR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+      echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
+echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_putchar_unlocked+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 putchar_unlocked
+  char *p = (char *) putchar_unlocked;
+#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_putchar_unlocked=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_putchar_unlocked=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6
+if test $ac_cv_have_decl_putchar_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTCHAR_UNLOCKED 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTCHAR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for EOVERFLOW" >&5
+echo $ECHO_N "checking for EOVERFLOW... $ECHO_C" >&6
+if test "${ac_cv_decl_EOVERFLOW+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 <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then
+  have_eoverflow=1
+fi
+rm -f conftest*
+
+    if test -n "$have_eoverflow"; then
+            ac_cv_decl_EOVERFLOW=yes
+    else
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then
+  have_eoverflow=1
+fi
+rm -f conftest*
+
+      if test -n "$have_eoverflow"; then
+                        if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_decl_EOVERFLOW=$ac_lo;;
+'')  ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { 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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+
+long longval () { return EOVERFLOW; }
+unsigned long ulongval () { return EOVERFLOW; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if ((EOVERFLOW) < 0)
+    {
+      long i = longval ();
+      if (i != (EOVERFLOW))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != (EOVERFLOW))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_decl_EOVERFLOW=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+      else
+                                ac_cv_decl_EOVERFLOW=E2BIG
+      fi
+    fi
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_decl_EOVERFLOW" >&5
+echo "${ECHO_T}$ac_cv_decl_EOVERFLOW" >&6
+  if test "$ac_cv_decl_EOVERFLOW" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define EOVERFLOW $ac_cv_decl_EOVERFLOW
+_ACEOF
+
+    EOVERFLOW="$ac_cv_decl_EOVERFLOW"
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for signed" >&5
+echo $ECHO_N "checking for signed... $ECHO_C" >&6
+if test "${bh_cv_c_signed+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.  */
+
+int
+main ()
+{
+signed char x;
+  ;
+  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
+  bh_cv_c_signed=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+bh_cv_c_signed=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $bh_cv_c_signed" >&5
+echo "${ECHO_T}$bh_cv_c_signed" >&6
+  if test $bh_cv_c_signed = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define signed
+_ACEOF
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for wchar_t" >&5
+echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
+if test "${gt_cv_c_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 <stddef.h>
+       wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  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
+  gt_cv_c_wchar_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_c_wchar_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_c_wchar_t" >&5
+echo "${ECHO_T}$gt_cv_c_wchar_t" >&6
+  if test $gt_cv_c_wchar_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCHAR_T 1
+_ACEOF
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for wint_t" >&5
+echo $ECHO_N "checking for wint_t... $ECHO_C" >&6
+if test "${gt_cv_c_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 <wchar.h>
+       wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  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
+  gt_cv_c_wint_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_c_wint_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
+echo "${ECHO_T}$gt_cv_c_wint_t" >&6
+  if test $gt_cv_c_wint_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WINT_T 1
+_ACEOF
+
+  fi
+
+echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_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.  */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+  return 0;
+if (sizeof (size_t))
+  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_type_size_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_size_t=no
+fi
+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
+if test $ac_cv_type_size_t = yes; then
+  :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned
+_ACEOF
+
+fi
+
+
+
+
+  echo "$as_me:$LINENO: checking for intmax_t" >&5
+echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
+if test "${gt_cv_c_intmax_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 <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1;
+  ;
+  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
+  gt_cv_c_intmax_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_c_intmax_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5
+echo "${ECHO_T}$gt_cv_c_intmax_t" >&6
+  if test $gt_cv_c_intmax_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTMAX_T 1
+_ACEOF
+
+  else
+
+    test $ac_cv_type_long_long = yes \
+      && ac_type='long long' \
+      || ac_type='long'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
+
+  fi
+
+
+
+
+if false; then
+  GL_COND_LIBTOOL_TRUE=
+  GL_COND_LIBTOOL_FALSE='#'
+else
+  GL_COND_LIBTOOL_TRUE='#'
+  GL_COND_LIBTOOL_FALSE=
+fi
+
+
+
+
+
+
+  if test $ac_cv_func_alloca_works = no; then
+    :
+  fi
+
+  # Define an additional variable used in the Makefile substitution.
+  if test $ac_cv_working_alloca_h = yes; then
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+       Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Need own alloca" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+       ALLOCA_H=alloca.h
+else
+  ALLOCA_H=
+fi
+rm -f conftest*
+
+  else
+    ALLOCA_H=alloca.h
+  fi
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+for ac_func in atexit
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_atexit = no; then
+
+  :
+
+  fi
+
+
+
+
+
+
+
+
+
+  case $LIBOBJS in
+    "canon-host.$ac_objext"   | \
+  *" canon-host.$ac_objext"   | \
+    "canon-host.$ac_objext "* | \
+  *" canon-host.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS canon-host.$ac_objext" ;;
+esac
+
+
+
+
+
+
+
+    case $LIBOBJS in
+    "canonicalize.$ac_objext"   | \
+  *" canonicalize.$ac_objext"   | \
+    "canonicalize.$ac_objext "* | \
+  *" canonicalize.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS canonicalize.$ac_objext" ;;
+esac
+
+
+
+for ac_header in sys/param.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_func in resolvepath canonicalize_file_name
+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 whether this system has an arbitrary file 
name length limit" >&5
+echo $ECHO_N "checking whether this system has an arbitrary file name length 
limit... $ECHO_C" >&6
+if test "${gl_have_arbitrary_file_name_length_limit+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 <unistd.h>
+#include <limits.h>
+#if defined PATH_MAX || defined MAXPATHLEN
+have_arbitrary_file_name_length_limit
+#endif
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then
+  gl_have_arbitrary_file_name_length_limit=yes
+else
+  gl_have_arbitrary_file_name_length_limit=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $gl_have_arbitrary_file_name_length_limit" >&5
+echo "${ECHO_T}$gl_have_arbitrary_file_name_length_limit" >&6
+
+  if test $gl_have_arbitrary_file_name_length_limit = yes; then
+    case $LIBOBJS in
+    "chdir-long.$ac_objext"   | \
+  *" chdir-long.$ac_objext"   | \
+    "chdir-long.$ac_objext "* | \
+  *" chdir-long.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS chdir-long.$ac_objext" ;;
+esac
+
+
+
+
+
+  # Define two additional variables used in the Makefile substitution.
+
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+
+
+
+
+
+
+
+
+for ac_func in mempcpy
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_mempcpy = no; then
+
+  :
+
+  fi
+
+
+
+  case $LIBOBJS in
+    "openat-die.$ac_objext"   | \
+  *" openat-die.$ac_objext"   | \
+    "openat-die.$ac_objext "* | \
+  *" openat-die.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS openat-die.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+
+
+
+for ac_func in openat
+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
+
+else
+  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
+
+
+  case $ac_cv_func_openat in
+  yes) ;;
+  *)
+
+cat >>confdefs.h <<\_ACEOF
+#define __OPENAT_PREFIX rpl_
+_ACEOF
+
+
+
+;;
+  esac
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+for ac_func in memrchr
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_memrchr = no; then
+    :
+  fi
+
+
+  fi
+
+
+
+  case $LIBOBJS in
+    "closeout.$ac_objext"   | \
+  *" closeout.$ac_objext"   | \
+    "closeout.$ac_objext "* | \
+  *" closeout.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS closeout.$ac_objext" ;;
+esac
+
+
+    :
+
+
+
+  case $LIBOBJS in
+    "dirname.$ac_objext"   | \
+  *" dirname.$ac_objext"   | \
+    "dirname.$ac_objext "* | \
+  *" dirname.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS dirname.$ac_objext" ;;
+esac
+
+
+
+
+
+
+
+for ac_func in dup2
+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
+
+else
+  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
+
+
+
+
+
+
+  :
+
+
+
+
+  case $LIBOBJS in
+    "exitfail.$ac_objext"   | \
+  *" exitfail.$ac_objext"   | \
+    "exitfail.$ac_objext "* | \
+  *" exitfail.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS exitfail.$ac_objext" ;;
+esac
+
+
+    :
+
+
+
+  case $LIBOBJS in
+    "open-safer.$ac_objext"   | \
+  *" open-safer.$ac_objext"   | \
+    "open-safer.$ac_objext "* | \
+  *" open-safer.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS open-safer.$ac_objext" ;;
+esac
+
+  case $LIBOBJS in
+    "creat-safer.$ac_objext"   | \
+  *" creat-safer.$ac_objext"   | \
+    "creat-safer.$ac_objext "* | \
+  *" creat-safer.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS creat-safer.$ac_objext" ;;
+esac
+
+
+
+
+  case $LIBOBJS in
+    "filenamecat.$ac_objext"   | \
+  *" filenamecat.$ac_objext"   | \
+    "filenamecat.$ac_objext "* | \
+  *" filenamecat.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS filenamecat.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+
+
+
+  # No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
+
+  FNMATCH_H=
+  echo "$as_me:$LINENO: checking for working POSIX fnmatch" >&5
+echo $ECHO_N "checking for working POSIX fnmatch... $ECHO_C" >&6
+if test "${ac_cv_func_fnmatch_posix+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+              if test "$cross_compiling" = yes; then
+  ac_cv_func_fnmatch_posix=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#         include <stdlib.h>
+#         include <fnmatch.h>
+#         define y(a, b, c) (fnmatch (a, b, c) == 0)
+#         define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
+          static int
+          fnm (char const *pattern, char const *string, int flags)
+          {
+            return fnmatch (pattern, string, flags);
+          }
+
+int
+main ()
+{
+exit
+          (!((fnm ? fnm : fnmatch) ("a*", "", 0) == FNM_NOMATCH
+             && y ("a*", "abc", 0)
+             && n ("d*/*1", "d/s/1", FNM_PATHNAME)
+             && y ("a\\\\bc", "abc", 0)
+             && n ("a\\\\bc", "abc", FNM_NOESCAPE)
+             && y ("*x", ".x", 0)
+             && n ("*x", ".x", FNM_PERIOD)
+             && 1));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_fnmatch_posix=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fnmatch_posix=no
+fi
+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_fnmatch_posix" >&5
+echo "${ECHO_T}$ac_cv_func_fnmatch_posix" >&6
+if test $ac_cv_func_fnmatch_posix = yes; then
+  rm -f lib/fnmatch.h
+else
+  echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getenv+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 getenv
+  char *p = (char *) getenv;
+#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_getenv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getenv=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+for ac_func in btowc mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy
+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
+
+
+
+for ac_header in wchar.h wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+case $LIBOBJS in
+    "fnmatch.$ac_objext"   | \
+  *" fnmatch.$ac_objext"   | \
+    "fnmatch.$ac_objext "* | \
+  *" fnmatch.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fnmatch.$ac_objext" ;;
+esac
+
+FNMATCH_H=fnmatch.h
+
+fi
+
+
+  if test $ac_cv_func_fnmatch_posix != yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define fnmatch posix_fnmatch
+_ACEOF
+
+  fi
+
+
+
+
+
+
+for ac_header in stdio_ext.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in __fpending
+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
+
+else
+  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
+
+
+  fp_headers='
+#     if HAVE_STDIO_EXT_H
+#      include <stdio_ext.h>
+#     endif
+'
+  echo "$as_me:$LINENO: checking whether __fpending is declared" >&5
+echo $ECHO_N "checking whether __fpending is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl___fpending+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.  */
+$fp_headers
+
+int
+main ()
+{
+#ifndef __fpending
+  char *p = (char *) __fpending;
+#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___fpending=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl___fpending=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl___fpending" >&5
+echo "${ECHO_T}$ac_cv_have_decl___fpending" >&6
+if test $ac_cv_have_decl___fpending = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___FPENDING 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___FPENDING 0
+_ACEOF
+
+
+fi
+
+
+  if test $ac_cv_func___fpending = no; then
+    echo "$as_me:$LINENO: checking how to determine the number of pending 
output bytes on a stream" >&5
+echo $ECHO_N "checking how to determine the number of pending output bytes on 
a stream... $ECHO_C" >&6
+if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+       for ac_expr in                                          \
+                                                               \
+           '# glibc2'                                          \
+           'fp->_IO_write_ptr - fp->_IO_write_base'            \
+                                                               \
+           '# traditional Unix'                                \
+           'fp->_ptr - fp->_base'                              \
+                                                               \
+           '# BSD'                                             \
+           'fp->_p - fp->_bf._base'                            \
+                                                               \
+           '# SCO, Unixware'                                   \
+           '(fp->__ptr ? fp->__ptr - fp->__base : 0)'          \
+                                                               \
+           '# old glibc?'                                      \
+           'fp->__bufp - fp->__buffer'                         \
+                                                               \
+           '# old glibc iostream?'                             \
+           'fp->_pptr - fp->_pbase'                            \
+                                                               \
+           '# VMS'                                             \
+           '(*fp)->_ptr - (*fp)->_base'                        \
+                                                               \
+           '# e.g., DGUX R4.11; the info is not available'     \
+           1                                                   \
+           ; do
+
+         # Skip each embedded comment.
+         case "$ac_expr" in '#'*) continue;; esac
+
+         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>
+
+int
+main ()
+{
+FILE *fp = stdin; (void) ($ac_expr);
+  ;
+  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
+  fp_done=yes
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+         test "$fp_done" = yes && break
+       done
+
+       ac_cv_sys_pending_output_n_bytes=$ac_expr
+
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_pending_output_n_bytes" >&5
+echo "${ECHO_T}$ac_cv_sys_pending_output_n_bytes" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
+_ACEOF
+
+  fi
+
+
+
+for ac_func in ftruncate
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_ftruncate = no; then
+
+
+for ac_func in chsize
+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
+
+
+  fi
+
+
+  echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5
+echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6
+if test "${ac_cv_search_getaddrinfo+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_getaddrinfo=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+  ;
+  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_search_getaddrinfo="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_getaddrinfo" = no; then
+  for ac_lib in nsl socket; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getaddrinfo ();
+int
+main ()
+{
+getaddrinfo ();
+  ;
+  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_search_getaddrinfo="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6
+if test "$ac_cv_search_getaddrinfo" != no; then
+  test "$ac_cv_search_getaddrinfo" = "none required" || 
LIBS="$ac_cv_search_getaddrinfo $LIBS"
+
+fi
+
+  echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
+echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_search_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gethostbyname=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  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_search_gethostbyname="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gethostbyname" = no; then
+  for ac_lib in inet nsl; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  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_search_gethostbyname="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
+if test "$ac_cv_search_gethostbyname" != no; then
+  test "$ac_cv_search_gethostbyname" = "none required" || 
LIBS="$ac_cv_search_gethostbyname $LIBS"
+
+fi
+
+  echo "$as_me:$LINENO: checking for library containing getservbyname" >&5
+echo $ECHO_N "checking for library containing getservbyname... $ECHO_C" >&6
+if test "${ac_cv_search_getservbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_getservbyname=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getservbyname ();
+int
+main ()
+{
+getservbyname ();
+  ;
+  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_search_getservbyname="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_getservbyname" = no; then
+  for ac_lib in inet nsl socket xnet; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getservbyname ();
+int
+main ()
+{
+getservbyname ();
+  ;
+  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_search_getservbyname="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_getservbyname" >&5
+echo "${ECHO_T}$ac_cv_search_getservbyname" >&6
+if test "$ac_cv_search_getservbyname" != no; then
+  test "$ac_cv_search_getservbyname" = "none required" || 
LIBS="$ac_cv_search_getservbyname $LIBS"
+
+fi
+
+
+
+for ac_func in getaddrinfo gai_strerror
+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
+
+else
+  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
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether getaddrinfo is declared" >&5
+echo $ECHO_N "checking whether getaddrinfo is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getaddrinfo+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.  */
+
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+#ifndef getaddrinfo
+  char *p = (char *) getaddrinfo;
+#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_getaddrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getaddrinfo" >&6
+if test $ac_cv_have_decl_getaddrinfo = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETADDRINFO 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETADDRINFO 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether freeaddrinfo is declared" >&5
+echo $ECHO_N "checking whether freeaddrinfo is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_freeaddrinfo+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.  */
+
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+#ifndef freeaddrinfo
+  char *p = (char *) freeaddrinfo;
+#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_freeaddrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_freeaddrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_freeaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_have_decl_freeaddrinfo" >&6
+if test $ac_cv_have_decl_freeaddrinfo = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREEADDRINFO 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREEADDRINFO 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether gai_strerror is declared" >&5
+echo $ECHO_N "checking whether gai_strerror is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_gai_strerror+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.  */
+
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+#ifndef gai_strerror
+  char *p = (char *) gai_strerror;
+#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_gai_strerror=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_gai_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_gai_strerror" >&5
+echo "${ECHO_T}$ac_cv_have_decl_gai_strerror" >&6
+if test $ac_cv_have_decl_gai_strerror = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GAI_STRERROR 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GAI_STRERROR 0
+_ACEOF
+
+
+fi
+
+
+  echo "$as_me:$LINENO: checking for struct addrinfo" >&5
+echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6
+if test "${ac_cv_type_struct_addrinfo+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 <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+
+int
+main ()
+{
+if ((struct addrinfo *) 0)
+  return 0;
+if (sizeof (struct addrinfo))
+  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_type_struct_addrinfo=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_struct_addrinfo=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_addrinfo" >&5
+echo "${ECHO_T}$ac_cv_type_struct_addrinfo" >&6
+if test $ac_cv_type_struct_addrinfo = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_ADDRINFO 1
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+  case $gl_cv_func_getcwd_null in
+  yes)
+
+  :
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether getcwd handles long file names 
properly" >&5
+echo $ECHO_N "checking whether getcwd handles long file names properly... 
$ECHO_C" >&6
+if test "${gl_cv_func_getcwd_path_max+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # Arrange for deletion of the temporary directory this test creates.
+     ac_clean_files="$ac_clean_files confdir3"
+     if test "$cross_compiling" = yes; then
+  gl_cv_func_getcwd_path_max=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <limits.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+#ifndef AT_FDCWD
+# define AT_FDCWD 0
+#endif
+#ifdef ENAMETOOLONG
+# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
+#else
+# define is_ENAMETOOLONG(x) 0
+#endif
+
+/* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
+#undef mkdir
+
+#ifndef S_IRWXU
+# define S_IRWXU 0700
+#endif
+
+/* The length of this name must be 8.  */
+#define DIR_NAME "confdir3"
+#define DIR_NAME_LEN 8
+#define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
+
+/* The length of "../".  */
+#define DOTDOTSLASH_LEN 3
+
+/* Leftover bytes in the buffer, to work around library or OS bugs.  */
+#define BUF_SLOP 20
+
+int
+main (void)
+{
+#ifndef PATH_MAX
+  /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
+     at least not on a local file system.  And if we were to start worrying
+     about remote file systems, we'd have to enable the wrapper function
+     all of the time, just to be safe.  That's not worth the cost.  */
+  exit (0);
+#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
+        - DIR_NAME_SIZE - BUF_SLOP) \
+       <= PATH_MAX)
+  /* FIXME: Assuming there's a system for which this is true,
+     this should be done in a compile test.  */
+  exit (0);
+#else
+  char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
+          + DIR_NAME_SIZE + BUF_SLOP];
+  char *cwd = getcwd (buf, PATH_MAX);
+  size_t initial_cwd_len;
+  size_t cwd_len;
+  int fail = 0;
+  size_t n_chdirs = 0;
+
+  if (cwd == NULL)
+    exit (1);
+
+  cwd_len = initial_cwd_len = strlen (cwd);
+
+  while (1)
+    {
+      size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
+      char *c = NULL;
+
+      cwd_len += DIR_NAME_SIZE;
+      /* If mkdir or chdir fails, it could be that this system cannot create
+        any file with an absolute name longer than PATH_MAX, such as cygwin.
+        If so, leave fail as 0, because the current working directory can't
+        be too long for getcwd if it can't even be created.  For other
+        errors, be pessimistic and consider that as a failure, too.  */
+      if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
+       {
+         if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+           fail = 2;
+         break;
+       }
+
+      if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
+       {
+         c = getcwd (buf, PATH_MAX);
+         if (!c && errno == ENOENT)
+           {
+             fail = 1;
+             break;
+           }
+         if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno)))
+           {
+             fail = 2;
+             break;
+           }
+       }
+
+      if (dotdot_max <= cwd_len - initial_cwd_len)
+       {
+         if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
+           break;
+         c = getcwd (buf, cwd_len + 1);
+         if (!c)
+           {
+             if (! (errno == ERANGE || errno == ENOENT
+                    || is_ENAMETOOLONG (errno)))
+               {
+                 fail = 2;
+                 break;
+               }
+             if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
+               {
+                 fail = 1;
+                 break;
+               }
+           }
+       }
+
+      if (c && strlen (c) != cwd_len)
+       {
+         fail = 2;
+         break;
+       }
+      ++n_chdirs;
+    }
+
+  /* Leaving behind such a deep directory is not polite.
+     So clean up here, right away, even though the driving
+     shell script would also clean up.  */
+  {
+    size_t i;
+
+    /* Unlink first, in case the chdir failed.  */
+    unlink (DIR_NAME);
+    for (i = 0; i <= n_chdirs; i++)
+      {
+       if (chdir ("..") < 0)
+         break;
+       rmdir (DIR_NAME);
+      }
+  }
+
+  exit (fail);
+#endif
+}
+
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_getcwd_path_max=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+case $? in
+     1) gl_cv_func_getcwd_path_max='no, but it is partly working';;
+     *) gl_cv_func_getcwd_path_max=no;;
+     esac
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_path_max" >&5
+echo "${ECHO_T}$gl_cv_func_getcwd_path_max" >&6
+  case $gl_cv_func_getcwd_path_max in
+  no,*)
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PARTLY_WORKING_GETCWD 1
+_ACEOF
+;;
+  esac
+;;
+  esac
+
+  case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max in
+  yes,yes) ;;
+  *)
+    case $LIBOBJS in
+    "getcwd.$ac_objext"   | \
+  *" getcwd.$ac_objext"   | \
+    "getcwd.$ac_objext "* | \
+  *" getcwd.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define __GETCWD_PREFIX rpl_
+_ACEOF
+
+
+
+
+
+  :
+;;
+  esac
+
+
+
+  case $LIBOBJS in
+    "getdate.$ac_objext"   | \
+  *" getdate.$ac_objext"   | \
+    "getdate.$ac_objext "* | \
+  *" getdate.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getdate.$ac_objext" ;;
+esac
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+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
+/* 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 (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
+
+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.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
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+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 <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+  ;
+  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_var_tzname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+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
+  if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TZNAME 1
+_ACEOF
+
+  fi
+fi
+
+
+
+
+
+
+
+
+
+
+for ac_func in getdelim
+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
+
+else
+  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
+
+
+
+  :
+
+
+
+
+
+
+  if test $ac_cv_func_getdelim = no; then
+
+
+
+for ac_func in flockfile funlockfile
+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
+
+
+  fi
+
+
+
+for ac_func in gethostname
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_gethostname = no; then
+
+
+for ac_func in uname
+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
+
+
+  fi
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether getline is declared" >&5
+echo $ECHO_N "checking whether getline is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getline+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 getline
+  char *p = (char *) getline;
+#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_getline=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getline=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getline" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getline" >&6
+if test $ac_cv_have_decl_getline = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE 0
+_ACEOF
+
+
+fi
+
+
+
+  gl_getline_needs_run_time_check=no
+  echo "$as_me:$LINENO: checking for getline" >&5
+echo $ECHO_N "checking for getline... $ECHO_C" >&6
+if test "${ac_cv_func_getline+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 getline to an innocuous variant, in case <limits.h> declares getline.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define getline innocuous_getline
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getline (); 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 getline
+
+/* 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 getline ();
+/* 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_getline) || defined (__stub___getline)
+choke me
+#else
+char (*f) () = getline;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != getline;
+  ;
+  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_getline=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_getline=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getline" >&5
+echo "${ECHO_T}$ac_cv_func_getline" >&6
+if test $ac_cv_func_getline = yes; then
+               gl_getline_needs_run_time_check=yes
+else
+  am_cv_func_working_getline=no
+fi
+
+  if test $gl_getline_needs_run_time_check = yes; then
+    echo "$as_me:$LINENO: checking for working getline function" >&5
+echo $ECHO_N "checking for working getline function... $ECHO_C" >&6
+if test "${am_cv_func_working_getline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  echo fooN |tr -d '\012'|tr N '\012' > conftest.data
+    if test "$cross_compiling" = yes; then
+  am_cv_func_working_getline=no
+else
+  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>
+#    include <stdlib.h>
+#    include <string.h>
+    int main ()
+    { /* Based on a test program from Karl Heuer.  */
+      char *line = NULL;
+      size_t siz = 0;
+      int len;
+      FILE *in = fopen ("./conftest.data", "r");
+      if (!in)
+       return 1;
+      len = getline (&line, &siz, in);
+      exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+    }
+
+_ACEOF
+rm -f 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='./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
+  am_cv_func_working_getline=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+am_cv_func_working_getline=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_working_getline" >&5
+echo "${ECHO_T}$am_cv_func_working_getline" >&6
+  fi
+
+  if test $am_cv_func_working_getline = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define getline gnu_getline
+_ACEOF
+
+    case $LIBOBJS in
+    "getline.$ac_objext"   | \
+  *" getline.$ac_objext"   | \
+    "getline.$ac_objext "* | \
+  *" getline.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getline.$ac_objext" ;;
+esac
+
+
+
+
+
+
+
+
+
+for ac_func in getdelim
+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
+
+else
+  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
+
+
+
+  :
+
+
+
+
+
+
+  if test $ac_cv_func_getdelim = no; then
+
+
+
+for ac_func in flockfile funlockfile
+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
+
+
+  fi
+
+
+  fi
+
+
+
+for ac_func in getlogin_r
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_getlogin_r = no; then
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+  case $LIBOBJS in
+    "getlogin_r.$ac_objext"   | \
+  *" getlogin_r.$ac_objext"   | \
+    "getlogin_r.$ac_objext "* | \
+  *" getlogin_r.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getlogin_r.$ac_objext" ;;
+esac
+
+
+  fi
+
+
+  # Avoid multiple inclusions of getndelim2.o into LIBOBJS.
+  # This hack won't be needed after gnulib requires Autoconf 2.58 or later.
+  case " $LIBOBJS " in
+  *" getndelim2.$ac_objext "* ) ;;
+  *) case $LIBOBJS in
+    "getndelim2.$ac_objext"   | \
+  *" getndelim2.$ac_objext"   | \
+    "getndelim2.$ac_objext "* | \
+  *" getndelim2.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getndelim2.$ac_objext" ;;
+esac
+;;
+  esac
+
+
+
+
+
+
+
+    :
+
+
+
+  if test -n "$GETOPT_H"; then
+
+  case $LIBOBJS in
+    "getopt.$ac_objext"   | \
+  *" getopt.$ac_objext"   | \
+    "getopt.$ac_objext "* | \
+  *" getopt.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getopt.$ac_objext" ;;
+esac
+
+  case $LIBOBJS in
+    "getopt1.$ac_objext"   | \
+  *" getopt1.$ac_objext"   | \
+    "getopt1.$ac_objext "* | \
+  *" getopt1.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getopt1.$ac_objext" ;;
+esac
+
+
+  GETOPT_H=getopt.h
+
+cat >>confdefs.h <<\_ACEOF
+#define __GETOPT_PREFIX rpl_
+_ACEOF
+
+
+
+  :
+
+fi
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+for ac_header in OS.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in getpagesize
+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
+
+
+
+
+
+
+  :
+
+
+
+
+
+    case $LIBOBJS in
+    "getpass.$ac_objext"   | \
+  *" getpass.$ac_objext"   | \
+    "getpass.$ac_objext "* | \
+  *" getpass.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getpass.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define getpass gnu_getpass
+_ACEOF
+
+
+
+
+  case $LIBOBJS in
+    "gettime.$ac_objext"   | \
+  *" gettime.$ac_objext"   | \
+    "gettime.$ac_objext "* | \
+  *" gettime.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS gettime.$ac_objext" ;;
+esac
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime 
buffer" >&5
+echo $ECHO_N "checking whether gettimeofday clobbers localtime buffer... 
$ECHO_C" >&6
+if test "${jm_cv_func_gettimeofday_clobber+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+        jm_cv_func_gettimeofday_clobber=yes
+else
+  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>
+#include <string.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+  time_t t = 0;
+  struct tm *lt;
+  struct tm saved_lt;
+  struct timeval tv;
+  lt = localtime (&t);
+  saved_lt = *lt;
+  gettimeofday (&tv, NULL);
+  if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0)
+    exit (1);
+
+  exit (0);
+}
+
+_ACEOF
+rm -f 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='./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
+  jm_cv_func_gettimeofday_clobber=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+jm_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:$LINENO: result: $jm_cv_func_gettimeofday_clobber" >&5
+echo "${ECHO_T}$jm_cv_func_gettimeofday_clobber" >&6
+  if test $jm_cv_func_gettimeofday_clobber = yes; then
+
+  case $LIBOBJS in
+    "gettimeofday.$ac_objext"   | \
+  *" gettimeofday.$ac_objext"   | \
+    "gettimeofday.$ac_objext "* | \
+  *" gettimeofday.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gmtime rpl_gmtime
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define localtime rpl_localtime
+_ACEOF
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gettimeofday rpl_gettimeofday
+_ACEOF
+
+
+
+
+  fi
+
+   GLOB_H=
+
+for ac_header in glob.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  GLOB_H=glob.h
+fi
+
+done
+
+
+  if test -z "$GLOB_H"; then
+    echo "$as_me:$LINENO: checking for GNU glob interface version 1" >&5
+echo $ECHO_N "checking for GNU glob interface version 1... $ECHO_C" >&6
+if test "${gl_cv_gnu_glob_interface_version_1+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+       cat >conftest.$ac_ext <<_ACEOF
+#include <gnu-versions.h>
+char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
+_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
+  gl_cv_gnu_glob_interface_version_1=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_gnu_glob_interface_version_1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_gnu_glob_interface_version_1" >&5
+echo "${ECHO_T}$gl_cv_gnu_glob_interface_version_1" >&6
+
+    if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
+      GLOB_H=glob.h
+    fi
+  fi
+
+  if test -z "$GLOB_H"; then
+    echo "$as_me:$LINENO: checking whether glob lists broken symlinks" >&5
+echo $ECHO_N "checking whether glob lists broken symlinks... $ECHO_C" >&6
+if test "${gl_cv_glob_lists_symlinks+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+       if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
+        gl_cv_glob_lists_symlinks=maybe
+      else
+        # If we can't make a symlink, then we cannot test this issue.  Be
+        # pessimistic about this.
+        gl_cv_glob_lists_symlinks=no
+      fi
+
+      if test $gl_cv_glob_lists_symlinks = maybe; then
+        if test "$cross_compiling" = yes; then
+  gl_cv_glob_lists_symlinks=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+#include <glob.h>
+int
+main ()
+{
+glob_t found;
+if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  gl_cv_glob_lists_symlinks=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_glob_lists_symlinks=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+      fi
+fi
+echo "$as_me:$LINENO: result: $gl_cv_glob_lists_symlinks" >&5
+echo "${ECHO_T}$gl_cv_glob_lists_symlinks" >&6
+
+    if test $gl_cv_glob_lists_symlinks = no; then
+      GLOB_H=glob.h
+    fi
+  fi
+
+  rm -f conf$$-globtest
+
+  if test -n "$GLOB_H"; then
+
+
+  :
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  :
+
+  GLOB_H=glob.h
+
+  case $LIBOBJS in
+    "glob.$ac_objext"   | \
+  *" glob.$ac_objext"   | \
+    "glob.$ac_objext "* | \
+  *" glob.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS glob.$ac_objext" ;;
+esac
+
+
+
+  fi
+
+
+
+
+
+    :
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if STDC_HEADERS || HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+exit (malloc (0) ? 0 : 1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_malloc_0_nonnull=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_malloc_0_nonnull=no
+fi
+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_malloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6
+if test $ac_cv_func_malloc_0_nonnull = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 1
+_ACEOF
+
+else
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 0
+_ACEOF
+
+   case $LIBOBJS in
+    "malloc.$ac_objext"   | \
+  *" malloc.$ac_objext"   | \
+    "malloc.$ac_objext "* | \
+  *" malloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define malloc rpl_malloc
+_ACEOF
+
+fi
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+    if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes; 
then
+    case $LIBOBJS in
+    "mbchar.$ac_objext"   | \
+  *" mbchar.$ac_objext"   | \
+    "mbchar.$ac_objext "* | \
+  *" mbchar.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS mbchar.$ac_objext" ;;
+esac
+
+  fi
+
+
+
+
+  :
+
+
+
+  case $LIBOBJS in
+    "md5.$ac_objext"   | \
+  *" md5.$ac_objext"   | \
+    "md5.$ac_objext "* | \
+  *" md5.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS md5.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+for ac_func in memchr
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_memchr = no; then
+
+
+for ac_header in bp-sym.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+  fi
+
+
+
+for ac_func in memmove
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_memmove = no; then
+
+  :
+
+  fi
+
+
+
+
+
+
+
+for ac_func in mempcpy
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_mempcpy = no; then
+
+  :
+
+  fi
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+for ac_func in memrchr
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_memrchr = no; then
+    :
+  fi
+
+
+
+
+    echo "$as_me:$LINENO: checking whether mkdir fails due to a trailing 
slash" >&5
+echo $ECHO_N "checking whether mkdir fails due to a trailing slash... $ECHO_C" 
>&6
+if test "${gl_cv_func_mkdir_trailing_slash_bug+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+      # Arrange for deletion of the temporary directory this test might create.
+      ac_clean_files="$ac_clean_files confdir-slash"
+      if test "$cross_compiling" = yes; then
+  gl_cv_func_mkdir_trailing_slash_bug=yes
+
+else
+  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 <sys/stat.h>
+#       include <stdlib.h>
+       int main ()
+       {
+         rmdir ("confdir-slash");
+         exit (mkdir ("confdir-slash/", 0700));
+       }
+
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_mkdir_trailing_slash_bug=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mkdir_trailing_slash_bug=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+
+
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_mkdir_trailing_slash_bug" >&5
+echo "${ECHO_T}$gl_cv_func_mkdir_trailing_slash_bug" >&6
+
+  if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then
+    case $LIBOBJS in
+    "mkdir.$ac_objext"   | \
+  *" mkdir.$ac_objext"   | \
+    "mkdir.$ac_objext "* | \
+  *" mkdir.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS mkdir.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define mkdir rpl_mkdir
+_ACEOF
+
+    :
+  fi
+
+
+for ac_func in mkstemp
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_mkstemp = no; then
+    gl_cv_func_mkstemp_limitations=yes
+  else
+    echo "$as_me:$LINENO: checking for mkstemp limitations" >&5
+echo $ECHO_N "checking for mkstemp limitations... $ECHO_C" >&6
+if test "${gl_cv_func_mkstemp_limitations+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+        mkdir conftest.mkstemp
+       if test "$cross_compiling" = yes; then
+  gl_cv_func_mkstemp_limitations=yes
+
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#           include <stdlib.h>
+#           include <unistd.h>
+           int main ()
+           {
+             int i;
+             for (i = 0; i < 70; i++)
+               {
+                 char template[] = "conftest.mkstemp/coXXXXXX";
+                 int fd = mkstemp (template);
+                 if (fd == -1)
+                   exit (1);
+                 close (fd);
+               }
+             exit (0);
+           }
+
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_mkstemp_limitations=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mkstemp_limitations=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+        rm -rf conftest.mkstemp
+
+
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_mkstemp_limitations" >&5
+echo "${ECHO_T}$gl_cv_func_mkstemp_limitations" >&6
+  fi
+
+  if test $gl_cv_func_mkstemp_limitations = yes; then
+    case $LIBOBJS in
+    "mkstemp.$ac_objext"   | \
+  *" mkstemp.$ac_objext"   | \
+    "mkstemp.$ac_objext "* | \
+  *" mkstemp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS mkstemp.$ac_objext" ;;
+esac
+
+    case $LIBOBJS in
+    "tempname.$ac_objext"   | \
+  *" tempname.$ac_objext"   | \
+    "tempname.$ac_objext "* | \
+  *" tempname.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS tempname.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define mkstemp rpl_mkstemp
+_ACEOF
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+for ac_func in __secure_getenv gettimeofday
+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
+
+
+  :
+
+
+
+
+
+
+
+  fi
+
+
+
+  if test $ac_cv_func_working_mktime = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define mktime rpl_mktime
+_ACEOF
+
+    :
+  fi
+
+
+
+
+ nanosleep_save_libs=$LIBS
+
+ # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
+ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
+echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6
+if test "${ac_cv_search_nanosleep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_nanosleep=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 nanosleep ();
+int
+main ()
+{
+nanosleep ();
+  ;
+  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_search_nanosleep="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_nanosleep" = no; then
+  for ac_lib in rt posix4; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 nanosleep ();
+int
+main ()
+{
+nanosleep ();
+  ;
+  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_search_nanosleep="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
+echo "${ECHO_T}$ac_cv_search_nanosleep" >&6
+if test "$ac_cv_search_nanosleep" != no; then
+  test "$ac_cv_search_nanosleep" = "none required" || 
LIBS="$ac_cv_search_nanosleep $LIBS"
+  test "$ac_cv_search_nanosleep" = "none required" ||
+                LIB_NANOSLEEP=$ac_cv_search_nanosleep
+fi
+
+
+
+ echo "$as_me:$LINENO: checking whether nanosleep works" >&5
+echo $ECHO_N "checking whether nanosleep works... $ECHO_C" >&6
+if test "${jm_cv_func_nanosleep_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+  :
+
+
+
+
+
+   if test "$cross_compiling" = yes; then
+        jm_cv_func_nanosleep_works=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#   if TIME_WITH_SYS_TIME
+#    include <sys/time.h>
+#    include <time.h>
+#   else
+#    if HAVE_SYS_TIME_H
+#     include <sys/time.h>
+#    else
+#     include <time.h>
+#    endif
+#   endif
+
+    int
+    main ()
+    {
+      struct timespec ts_sleep, ts_remaining;
+      ts_sleep.tv_sec = 0;
+      ts_sleep.tv_nsec = 1;
+      exit (nanosleep (&ts_sleep, &ts_remaining) == 0 ? 0 : 1);
+    }
+
+_ACEOF
+rm -f 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='./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
+  jm_cv_func_nanosleep_works=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+jm_cv_func_nanosleep_works=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:$LINENO: result: $jm_cv_func_nanosleep_works" >&5
+echo "${ECHO_T}$jm_cv_func_nanosleep_works" >&6
+  if test $jm_cv_func_nanosleep_works = no; then
+    case $LIBOBJS in
+    "nanosleep.$ac_objext"   | \
+  *" nanosleep.$ac_objext"   | \
+    "nanosleep.$ac_objext "* | \
+  *" nanosleep.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS nanosleep.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define nanosleep rpl_nanosleep
+_ACEOF
+
+
+
+  :
+
+
+
+
+
+
+  fi
+
+ LIBS=$nanosleep_save_libs
+
+
+
+  case $LIBOBJS in
+    "openat-die.$ac_objext"   | \
+  *" openat-die.$ac_objext"   | \
+    "openat-die.$ac_objext "* | \
+  *" openat-die.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS openat-die.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+
+
+
+for ac_func in openat
+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
+
+else
+  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
+
+
+  case $ac_cv_func_openat in
+  yes) ;;
+  *)
+
+cat >>confdefs.h <<\_ACEOF
+#define __OPENAT_PREFIX rpl_
+_ACEOF
+
+
+
+;;
+  esac
+
+
+
+
+
+  case $LIBOBJS in
+    "pagealign_alloc.$ac_objext"   | \
+  *" pagealign_alloc.$ac_objext"   | \
+    "pagealign_alloc.$ac_objext "* | \
+  *" pagealign_alloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS pagealign_alloc.$ac_objext" ;;
+esac
+
+
+
+
+
+  :
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  case $LIBOBJS in
+    "quotearg.$ac_objext"   | \
+  *" quotearg.$ac_objext"   | \
+    "quotearg.$ac_objext "* | \
+  *" quotearg.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS quotearg.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+if test "${ac_cv_type_mbstate_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.  */
+$ac_includes_default
+#          include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+  ;
+  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_type_mbstate_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_mbstate_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
+echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
+   if test $ac_cv_type_mbstate_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define mbstate_t int
+_ACEOF
+
+   fi
+
+    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 "${gl_cv_func_mbrtowc+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 wc;
+              char const s[] = "";
+              size_t n = 1;
+              mbstate_t state;
+              return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+  ;
+  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
+  gl_cv_func_mbrtowc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_func_mbrtowc=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc" >&6
+  if test $gl_cv_func_mbrtowc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRTOWC 1
+_ACEOF
+
+  fi
+
+
+
+
+for ac_func in readlink
+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
+
+  if test $ac_cv_func_readlink = no; then
+    case $LIBOBJS in
+    "readlink.$ac_objext"   | \
+  *" readlink.$ac_objext"   | \
+    "readlink.$ac_objext "* | \
+  *" readlink.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS readlink.$ac_objext" ;;
+esac
+
+
+  :
+
+  fi
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5
+echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6
+if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_realloc_0_nonnull=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if STDC_HEADERS || HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *realloc ();
+#endif
+
+int
+main ()
+{
+exit (realloc (0, 0) ? 0 : 1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_realloc_0_nonnull=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_realloc_0_nonnull=no
+fi
+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_realloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6
+if test $ac_cv_func_realloc_0_nonnull = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC 1
+_ACEOF
+
+else
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC 0
+_ACEOF
+
+   case $LIBOBJS in
+    "realloc.$ac_objext"   | \
+  *" realloc.$ac_objext"   | \
+    "realloc.$ac_objext "* | \
+  *" realloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define realloc rpl_realloc
+_ACEOF
+
+fi
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether off_t can be used in a switch 
statement" >&5
+echo $ECHO_N "checking whether off_t can be used in a switch statement... 
$ECHO_C" >&6
+if test "${gl_cv_type_off_t_switch+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 ()
+{
+off_t o = -1;
+          switch (o)
+            {
+            case -2:
+              return 1;
+            case -1:
+              return 2;
+            default:
+              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
+  gl_cv_type_off_t_switch=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_type_off_t_switch=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_type_off_t_switch" >&5
+echo "${ECHO_T}$gl_cv_type_off_t_switch" >&6
+  if test $gl_cv_type_off_t_switch = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _REGEX_LARGE_OFFSETS 1
+_ACEOF
+
+  fi
+
+
+
+
+# Check whether --with-included-regex or --without-included-regex was given.
+if test "${with_included_regex+set}" = set; then
+  withval="$with_included_regex"
+
+fi;
+
+  case $with_included_regex in
+  yes|no) ac_use_included_regex=$with_included_regex
+       ;;
+  '')
+    # If the system regex support is good enough that it passes the the
+    # following run test, then default to *not* using the included regex.c.
+    # If cross compiling, assume the test would fail and use the included
+    # regex.c.  The first failing regular expression is from `Spencer ere
+    # test #75' in grep-2.3.
+    echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5
+echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6
+if test "${gl_cv_func_re_compile_pattern_broken+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+         gl_cv_func_re_compile_pattern_broken=yes
+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
+          #include <regex.h>
+int
+main ()
+{
+static struct re_pattern_buffer regex;
+           const char *s;
+           struct re_registers regs;
+           /* Use the POSIX-compliant spelling with leading REG_,
+              rather than the traditional GNU spelling with leading RE_,
+              so that we reject older libc implementations.  */
+           re_set_syntax (REG_SYNTAX_POSIX_EGREP);
+           memset (&regex, 0, sizeof (regex));
+           s = re_compile_pattern ("a[:]:]b\n", 9, &regex);
+           /* This should fail with _Invalid character class name_ error.  */
+           if (!s)
+             exit (1);
+
+           /* This should succeed, but does not for e.g. glibc-2.1.3.  */
+           memset (&regex, 0, sizeof (regex));
+           s = re_compile_pattern ("{1", 2, &regex);
+
+           if (s)
+             exit (1);
+
+           /* The following example is derived from a problem report
+              against gawk from Jorge Stolfi <address@hidden>.  */
+           memset (&regex, 0, sizeof (regex));
+           s = re_compile_pattern ("[an\371]*n", 7, &regex);
+           if (s)
+             exit (1);
+
+           /* This should match, but does not for e.g. glibc-2.2.1.  */
+           if (re_match (&regex, "an", 2, 0, &regs) != 2)
+             exit (1);
+
+           memset (&regex, 0, sizeof (regex));
+           s = re_compile_pattern ("x", 1, &regex);
+           if (s)
+             exit (1);
+
+           /* The version of regex.c in e.g. GNU libc-2.2.93 did not
+              work with a negative RANGE argument.  */
+           if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+             exit (1);
+
+           /* The version of regex.c in older versions of gnulib
+              ignored REG_IGNORE_CASE (which was then called RE_ICASE).
+              Detect that problem too.  */
+           memset (&regex, 0, sizeof (regex));
+           re_set_syntax (REG_SYNTAX_EMACS | REG_IGNORE_CASE);
+           s = re_compile_pattern ("x", 1, &regex);
+           if (s)
+             exit (1);
+
+           if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+             exit (1);
+
+           /* REG_STARTEND was added to glibc on 2004-01-15.
+              Reject older versions.  */
+           if (! REG_STARTEND)
+             exit (1);
+
+           /* Reject hosts whose regoff_t values are too narrow.
+              These include glibc 2.3.5 on hosts with 64-bit off_t
+              and 32-bit int, and Solaris 10 on hosts with 32-bit int
+              and _FILE_OFFSET_BITS=64.  */
+           if (sizeof (regoff_t) < sizeof (off_t))
+             exit (1);
+
+           exit (0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_re_compile_pattern_broken=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_re_compile_pattern_broken=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_broken" >&5
+echo "${ECHO_T}$gl_cv_func_re_compile_pattern_broken" >&6
+    ac_use_included_regex=$gl_cv_func_re_compile_pattern_broken
+    ;;
+  *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: 
$with_included_regex" >&5
+echo "$as_me: error: Invalid value for --with-included-regex: 
$with_included_regex" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  esac
+
+  if test $ac_use_included_regex = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define re_syntax_options rpl_re_syntax_options
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_set_syntax rpl_re_set_syntax
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_compile_pattern rpl_re_compile_pattern
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_compile_fastmap rpl_re_compile_fastmap
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_search rpl_re_search
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_search_2 rpl_re_search_2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_match rpl_re_match
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_match_2 rpl_re_match_2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_set_registers rpl_re_set_registers
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_comp rpl_re_comp
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_exec rpl_re_exec
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regcomp rpl_regcomp
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regexec rpl_regexec
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regerror rpl_regerror
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regfree rpl_regfree
+_ACEOF
+
+    case $LIBOBJS in
+    "regex.$ac_objext"   | \
+  *" regex.$ac_objext"   | \
+    "regex.$ac_objext "* | \
+  *" regex.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS regex.$ac_objext" ;;
+esac
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  fi
+
+
+ echo "$as_me:$LINENO: checking whether rename is broken" >&5
+echo $ECHO_N "checking whether rename is broken... $ECHO_C" >&6
+if test "${vb_cv_func_rename_trailing_slash_bug+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    rm -rf conftest.d1 conftest.d2
+    mkdir conftest.d1 ||
+      { { echo "$as_me:$LINENO: error: cannot create temporary directory" >&5
+echo "$as_me: error: cannot create temporary directory" >&2;}
+   { (exit 1); exit 1; }; }
+    if test "$cross_compiling" = yes; then
+        vb_cv_func_rename_trailing_slash_bug=yes
+else
+  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>
+        int
+        main ()
+        {
+          exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0);
+        }
+
+_ACEOF
+rm -f 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='./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
+  vb_cv_func_rename_trailing_slash_bug=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+vb_cv_func_rename_trailing_slash_bug=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+
+      rm -rf conftest.d1 conftest.d2
+
+fi
+echo "$as_me:$LINENO: result: $vb_cv_func_rename_trailing_slash_bug" >&5
+echo "${ECHO_T}$vb_cv_func_rename_trailing_slash_bug" >&6
+  if test $vb_cv_func_rename_trailing_slash_bug = yes; then
+    case $LIBOBJS in
+    "rename.$ac_objext"   | \
+  *" rename.$ac_objext"   | \
+    "rename.$ac_objext "* | \
+  *" rename.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS rename.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define rename rpl_rename
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define RENAME_TRAILING_SLASH_BUG 1
+_ACEOF
+
+    :
+  fi
+
+  echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
+echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6
+if test "${gl_cv_c_restrict+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gl_cv_c_restrict=no
+   # Try the official restrict keyword, then gcc's __restrict, and
+   # the less common variants.
+   for ac_kw in restrict __restrict __restrict__ _Restrict; do
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+float * $ac_kw x;
+_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
+  gl_cv_c_restrict=$ac_kw; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+   done
+
+fi
+echo "$as_me:$LINENO: result: $gl_cv_c_restrict" >&5
+echo "${ECHO_T}$gl_cv_c_restrict" >&6
+ case $gl_cv_c_restrict in
+   restrict) ;;
+   no)
+cat >>confdefs.h <<\_ACEOF
+#define restrict
+_ACEOF
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $gl_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+
+for ac_func in rpmatch
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_rpmatch = no; then
+    :
+  fi
+
+
+
+  case $LIBOBJS in
+    "save-cwd.$ac_objext"   | \
+  *" save-cwd.$ac_objext"   | \
+    "save-cwd.$ac_objext "* | \
+  *" save-cwd.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS save-cwd.$ac_objext" ;;
+esac
+
+
+  :
+
+
+
+
+
+
+
+
+
+for ac_func in setenv unsetenv
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_setenv = no; then
+
+
+
+  :
+
+
+
+
+
+
+for ac_header in search.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in tsearch
+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 if errno is properly declared" >&5
+echo $ECHO_N "checking if errno is properly declared... $ECHO_C" >&6
+  if test "${gt_cv_var_errno_declaration+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 <errno.h>
+      extern struct { int foo; } errno;
+int
+main ()
+{
+errno.foo = 1;
+  ;
+  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
+  gt_cv_var_errno_declaration=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_var_errno_declaration=yes
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  echo "$as_me:$LINENO: result: $gt_cv_var_errno_declaration" >&5
+echo "${ECHO_T}$gt_cv_var_errno_declaration" >&6
+  if test $gt_cv_var_errno_declaration = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ERRNO_DECL 1
+_ACEOF
+
+  fi
+
+
+
+  echo "$as_me:$LINENO: checking if environ is properly declared" >&5
+echo $ECHO_N "checking if environ is properly declared... $ECHO_C" >&6
+  if test "${gt_cv_var_environ_declaration+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 <unistd.h>
+      extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+  ;
+  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
+  gt_cv_var_environ_declaration=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_var_environ_declaration=yes
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  echo "$as_me:$LINENO: result: $gt_cv_var_environ_declaration" >&5
+echo "${ECHO_T}$gt_cv_var_environ_declaration" >&6
+  if test $gt_cv_var_environ_declaration = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENVIRON_DECL 1
+_ACEOF
+
+  fi
+
+
+  fi
+  if test $ac_cv_func_unsetenv = no; then
+
+
+  :
+
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking if errno is properly declared" >&5
+echo $ECHO_N "checking if errno is properly declared... $ECHO_C" >&6
+  if test "${gt_cv_var_errno_declaration+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 <errno.h>
+      extern struct { int foo; } errno;
+int
+main ()
+{
+errno.foo = 1;
+  ;
+  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
+  gt_cv_var_errno_declaration=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_var_errno_declaration=yes
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  echo "$as_me:$LINENO: result: $gt_cv_var_errno_declaration" >&5
+echo "${ECHO_T}$gt_cv_var_errno_declaration" >&6
+  if test $gt_cv_var_errno_declaration = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ERRNO_DECL 1
+_ACEOF
+
+  fi
+
+
+
+  echo "$as_me:$LINENO: checking if environ is properly declared" >&5
+echo $ECHO_N "checking if environ is properly declared... $ECHO_C" >&6
+  if test "${gt_cv_var_environ_declaration+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 <unistd.h>
+      extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+  ;
+  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
+  gt_cv_var_environ_declaration=no
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_var_environ_declaration=yes
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+  echo "$as_me:$LINENO: result: $gt_cv_var_environ_declaration" >&5
+echo "${ECHO_T}$gt_cv_var_environ_declaration" >&6
+  if test $gt_cv_var_environ_declaration = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENVIRON_DECL 1
+_ACEOF
+
+  fi
+
+
+  else
+    echo "$as_me:$LINENO: checking for unsetenv() return type" >&5
+echo $ECHO_N "checking for unsetenv() return type... $ECHO_C" >&6
+if test "${gt_cv_func_unsetenv_ret+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 <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+
+int
+main ()
+{
+
+  ;
+  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
+  gt_cv_func_unsetenv_ret='int'
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_unsetenv_ret='void'
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_unsetenv_ret" >&5
+echo "${ECHO_T}$gt_cv_func_unsetenv_ret" >&6
+    if test $gt_cv_func_unsetenv_ret = 'void'; then
+
+cat >>confdefs.h <<\_ACEOF
+#define VOID_UNSETENV 1
+_ACEOF
+
+    fi
+  fi
+
+
+
+for ac_header in stdint.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    echo "$as_me:$LINENO: checking for SIZE_MAX" >&5
+echo $ECHO_N "checking for SIZE_MAX... $ECHO_C" >&6
+  result=
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Found it" >/dev/null 2>&1; then
+  result=yes
+fi
+rm -f conftest*
+
+  if test -z "$result"; then
+                    if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 / 10) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 / 10) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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 <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 / 10) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 / 10) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 / 10) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) res_hi=$ac_lo;;
+'') result=? ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { 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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+long longval () { return (size_t)~(size_t)0 / 10; }
+unsigned long ulongval () { return (size_t)~(size_t)0 / 10; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((size_t)~(size_t)0 / 10) < 0)
+    {
+      long i = longval ();
+      if (i != ((size_t)~(size_t)0 / 10))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((size_t)~(size_t)0 / 10))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  res_hi=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+result=?
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+    if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 % 10) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 % 10) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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 <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 % 10) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 % 10) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !(((size_t)~(size_t)0 % 10) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) res_lo=$ac_lo;;
+'') result=? ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { 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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+long longval () { return (size_t)~(size_t)0 % 10; }
+unsigned long ulongval () { return (size_t)~(size_t)0 % 10; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((size_t)~(size_t)0 % 10) < 0)
+    {
+      long i = longval ();
+      if (i != ((size_t)~(size_t)0 % 10))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((size_t)~(size_t)0 % 10))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  res_lo=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+result=?
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+    if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 
0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= 
$ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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 <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 
0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 
$ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= 
$ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) fits_in_uint=$ac_lo;;
+'') result=? ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { 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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+long longval () { return sizeof (size_t) <= sizeof (unsigned int); }
+unsigned long ulongval () { return sizeof (size_t) <= sizeof (unsigned int); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if ((sizeof (size_t) <= sizeof (unsigned int)) < 0)
+    {
+      long i = longval ();
+      if (i != (sizeof (size_t) <= sizeof (unsigned int)))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != (sizeof (size_t) <= sizeof (unsigned int)))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  fits_in_uint=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+result=?
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+    if test "$fits_in_uint" = 1; then
+                  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+        extern size_t foo;
+        extern unsigned long foo;
+
+int
+main ()
+{
+
+  ;
+  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
+  fits_in_uint=0
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test -z "$result"; then
+      if test "$fits_in_uint" = 1; then
+        result="$res_hi$res_lo"U
+      else
+        result="$res_hi$res_lo"UL
+      fi
+    else
+            result='((size_t)~(size_t)0)'
+    fi
+  fi
+  echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6
+  if test "$result" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define SIZE_MAX $result
+_ACEOF
+
+  fi
+
+  gl_SOCKLEN_T
+
+  echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
+if test "${gt_cv_ssize_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 <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+  ;
+  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
+  gt_cv_ssize_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_ssize_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5
+echo "${ECHO_T}$gt_cv_ssize_t" >&6
+  if test $gt_cv_ssize_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ssize_t int
+_ACEOF
+
+  fi
+
+
+
+
+
+
+
+
+
+  # Define two additional variables used in the Makefile substitution.
+
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+
+
+
+
+for ac_header in sys/inttypes.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for stdint.h" >&5
+echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6
+if test "${gl_cv_header_stdint_h+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 <stdint.h>
+int
+main ()
+{
+
+  ;
+  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
+  gl_cv_header_stdint_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_header_stdint_h=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5
+echo "${ECHO_T}$gl_cv_header_stdint_h" >&6
+if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+  STDINT_H=''
+else
+  STDINT_H='stdint.h'
+
+    echo "$as_me:$LINENO: checking whether 'long' is 64 bit wide" >&5
+echo $ECHO_N "checking whether 'long' is 64 bit wide... $ECHO_C" >&6
+if test "${gl_cv_long_bitsize_64+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 POW63  ((((((long) 1 << 15) << 15) << 15) << 15) << 3)
+#define POW64  ((((((long) 1 << 15) << 15) << 15) << 15) << 4)
+typedef int array [2 * (POW63 != 0 && POW64 == 0) - 1];
+
+int
+main ()
+{
+
+  ;
+  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
+  gl_cv_long_bitsize_64=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_long_bitsize_64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_long_bitsize_64" >&5
+echo "${ECHO_T}$gl_cv_long_bitsize_64" >&6
+  if test $gl_cv_long_bitsize_64 = yes; then
+    HAVE_LONG_64BIT=1
+  else
+    HAVE_LONG_64BIT=0
+  fi
+
+
+    echo "$as_me:$LINENO: checking whether 'long long' is 64 bit wide" >&5
+echo $ECHO_N "checking whether 'long long' is 64 bit wide... $ECHO_C" >&6
+if test "${gl_cv_longlong_bitsize_64+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 POW63  ((((((long long) 1 << 15) << 15) << 15) << 15) << 3)
+#define POW64  ((((((long long) 1 << 15) << 15) << 15) << 15) << 4)
+typedef int array [2 * (POW63 != 0 && POW64 == 0) - 1];
+
+int
+main ()
+{
+
+  ;
+  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
+  gl_cv_longlong_bitsize_64=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_longlong_bitsize_64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_longlong_bitsize_64" >&5
+echo "${ECHO_T}$gl_cv_longlong_bitsize_64" >&6
+  if test $gl_cv_longlong_bitsize_64 = yes; then
+    HAVE_LONG_LONG_64BIT=1
+  else
+    HAVE_LONG_LONG_64BIT=0
+  fi
+
+
+fi
+
+
+
+
+      case $LIBOBJS in
+    "strcasecmp.$ac_objext"   | \
+  *" strcasecmp.$ac_objext"   | \
+    "strcasecmp.$ac_objext "* | \
+  *" strcasecmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define strcasecmp rpl_strcasecmp
+_ACEOF
+
+
+
+  :
+
+
+
+
+for ac_func in strncasecmp
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_strncasecmp = no; then
+
+  :
+
+  fi
+
+
+
+
+
+
+for ac_func in strdup
+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
+
+else
+  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
+
+
+
+  :
+
+
+
+
+
+  :
+
+
+
+for ac_func in strerror
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_strerror = no; then
+
+  :
+
+  fi
+
+
+
+      case $LIBOBJS in
+    "strstr.$ac_objext"   | \
+  *" strstr.$ac_objext"   | \
+    "strstr.$ac_objext "* | \
+  *" strstr.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strstr.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+
+for ac_func in strtol
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_strtol = no; then
+
+
+
+  :
+
+
+
+
+
+
+  fi
+
+
+
+for ac_func in strtoul
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_strtoul = no; then
+
+
+
+
+  :
+
+
+
+
+
+
+
+  fi
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether localtime_r is compatible with its 
POSIX signature" >&5
+echo $ECHO_N "checking whether localtime_r is compatible with its POSIX 
signature... $ECHO_C" >&6
+if test "${gl_cv_time_r_posix+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 <time.h>
+int
+main ()
+{
+/* We don't need to append 'restrict's to the argument types,
+          even though the POSIX signature has the 'restrict's,
+          since C99 says they can't affect type compatibility.  */
+       struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+  ;
+  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
+  gl_cv_time_r_posix=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_time_r_posix=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5
+echo "${ECHO_T}$gl_cv_time_r_posix" >&6
+  if test $gl_cv_time_r_posix = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIME_R_POSIX 1
+_ACEOF
+
+  else
+    case $LIBOBJS in
+    "time_r.$ac_objext"   | \
+  *" time_r.$ac_objext"   | \
+    "time_r.$ac_objext "* | \
+  *" time_r.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS time_r.$ac_objext" ;;
+esac
+
+
+  :
+
+  fi
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for struct timespec" >&5
+echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6
+if test "${fu_cv_sys_struct_timespec+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.  */
+
+#      if TIME_WITH_SYS_TIME
+#       include <sys/time.h>
+#       include <time.h>
+#      else
+#       if HAVE_SYS_TIME_H
+#        include <sys/time.h>
+#       else
+#        include <time.h>
+#       endif
+#      endif
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  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
+  fu_cv_sys_struct_timespec=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fu_cv_sys_struct_timespec=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $fu_cv_sys_struct_timespec" >&5
+echo "${ECHO_T}$fu_cv_sys_struct_timespec" >&6
+
+  if test $fu_cv_sys_struct_timespec = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_TIMESPEC 1
+_ACEOF
+
+  fi
+
+
+
+
+  echo "$as_me:$LINENO: checking whether nanosleep is declared" >&5
+echo $ECHO_N "checking whether nanosleep is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_nanosleep+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 <time.h>
+
+int
+main ()
+{
+#ifndef nanosleep
+  char *p = (char *) nanosleep;
+#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_nanosleep=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_nanosleep=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_nanosleep" >&5
+echo "${ECHO_T}$ac_cv_have_decl_nanosleep" >&6
+if test $ac_cv_have_decl_nanosleep = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_NANOSLEEP 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_NANOSLEEP 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+  echo "$as_me:$LINENO: checking whether tzset clobbers localtime buffer" >&5
+echo $ECHO_N "checking whether tzset clobbers localtime buffer... $ECHO_C" >&6
+if test "${gl_cv_func_tzset_clobber+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  if test "$cross_compiling" = yes; then
+  gl_cv_func_tzset_clobber=yes
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+#include <stdlib.h>
+
+int
+main ()
+{
+  time_t t1 = 853958121;
+  struct tm *p, s;
+  putenv ("TZ=GMT0");
+  p = localtime (&t1);
+  s = *p;
+  putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
+  tzset ();
+  exit (p->tm_year != s.tm_year
+        || p->tm_mon != s.tm_mon
+        || p->tm_mday != s.tm_mday
+        || p->tm_hour != s.tm_hour
+        || p->tm_min != s.tm_min
+        || p->tm_sec != s.tm_sec);
+}
+
+_ACEOF
+rm -f 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='./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
+  gl_cv_func_tzset_clobber=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_tzset_clobber=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $gl_cv_func_tzset_clobber" >&5
+echo "${ECHO_T}$gl_cv_func_tzset_clobber" >&6
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RUN_TZSET_TEST 1
+_ACEOF
+
+
+  if test $gl_cv_func_tzset_clobber = yes; then
+
+  case $LIBOBJS in
+    "gettimeofday.$ac_objext"   | \
+  *" gettimeofday.$ac_objext"   | \
+    "gettimeofday.$ac_objext "* | \
+  *" gettimeofday.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext" ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gmtime rpl_gmtime
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define localtime rpl_localtime
+_ACEOF
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define tzset rpl_tzset
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define TZSET_CLOBBERS_LOCALTIME_BUFFER 1
+_ACEOF
+
+  fi
+
+
+
+  case $LIBOBJS in
+    "dup-safer.$ac_objext"   | \
+  *" dup-safer.$ac_objext"   | \
+    "dup-safer.$ac_objext "* | \
+  *" dup-safer.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS dup-safer.$ac_objext" ;;
+esac
+
+  case $LIBOBJS in
+    "fd-safer.$ac_objext"   | \
+  *" fd-safer.$ac_objext"   | \
+    "fd-safer.$ac_objext "* | \
+  *" fd-safer.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fd-safer.$ac_objext" ;;
+esac
+
+  case $LIBOBJS in
+    "pipe-safer.$ac_objext"   | \
+  *" pipe-safer.$ac_objext"   | \
+    "pipe-safer.$ac_objext "* | \
+  *" pipe-safer.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS pipe-safer.$ac_objext" ;;
+esac
+
+
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_UNLOCKED_IO 1
+_ACEOF
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in vasnprintf
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_vasnprintf = no; then
+    case $LIBOBJS in
+    "printf-args.$ac_objext"   | \
+  *" printf-args.$ac_objext"   | \
+    "printf-args.$ac_objext "* | \
+  *" printf-args.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS printf-args.$ac_objext" ;;
+esac
+
+    case $LIBOBJS in
+    "printf-parse.$ac_objext"   | \
+  *" printf-parse.$ac_objext"   | \
+    "printf-parse.$ac_objext "* | \
+  *" printf-parse.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS printf-parse.$ac_objext" ;;
+esac
+
+    case $LIBOBJS in
+    "asnprintf.$ac_objext"   | \
+  *" asnprintf.$ac_objext"   | \
+    "asnprintf.$ac_objext "* | \
+  *" asnprintf.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS asnprintf.$ac_objext" ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
+if test "${ac_cv_type_ptrdiff_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.  */
+$ac_includes_default
+int
+main ()
+{
+if ((ptrdiff_t *) 0)
+  return 0;
+if (sizeof (ptrdiff_t))
+  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_type_ptrdiff_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_ptrdiff_t=no
+fi
+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
+if test $ac_cv_type_ptrdiff_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTRDIFF_T 1
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in snprintf wcslen
+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
+
+
+
+
+  fi
+
+
+
+for ac_func in vasprintf
+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
+
+else
+  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
+
+
+  if test $ac_cv_func_vasprintf = no; then
+    case $LIBOBJS in
+    "asprintf.$ac_objext"   | \
+  *" asprintf.$ac_objext"   | \
+    "asprintf.$ac_objext "* | \
+  *" asprintf.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
+esac
+
+
+
+
+
+  fi
+
+
+
+  case $LIBOBJS in
+    "xmalloc.$ac_objext"   | \
+  *" xmalloc.$ac_objext"   | \
+    "xmalloc.$ac_objext "* | \
+  *" xmalloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS xmalloc.$ac_objext" ;;
+esac
+
+
+
+  :
+
+
+
+  :
+
+
+
+
+  case $LIBOBJS in
+    "xgetcwd.$ac_objext"   | \
+  *" xgetcwd.$ac_objext"   | \
+    "xgetcwd.$ac_objext "* | \
+  *" xgetcwd.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS xgetcwd.$ac_objext" ;;
+esac
+
+
+
+
+
+
+  case $LIBOBJS in
+    "xreadlink.$ac_objext"   | \
+  *" xreadlink.$ac_objext"   | \
+    "xreadlink.$ac_objext "* | \
+  *" xreadlink.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS xreadlink.$ac_objext" ;;
+esac
+
+
+
+
+
+
+
+
+for ac_header in stdint.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+  case $LIBOBJS in
+    "yesno.$ac_objext"   | \
+  *" yesno.$ac_objext"   | \
+    "yesno.$ac_objext "* | \
+  *" yesno.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS yesno.$ac_objext" ;;
+esac
+
+
+    :
+
+
+
+
+        MKINSTALLDIRS=
+  if test -n "$ac_aux_dir"; then
+    case "$ac_aux_dir" in
+      /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+      *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+    esac
+  fi
+  if test -z "$MKINSTALLDIRS"; then
+    MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+  fi
+
+
+
+  echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+    # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval="$enable_nls"
+  USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi;
+  echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
+
+
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; 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 conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$MSGFMT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage 
>/dev/null; then exit 1; else exit 0; fi); then
+            ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+    ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+  echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+
+if test -n "$GMSGFMT"; then
+  echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; 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 conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$XGETTEXT" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a 
path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --omit-header --copyright-holder= 
--msgid-bugs-address= /dev/null >&5 2>&1 &&
+     (if $ac_dir/$ac_word --omit-header --copyright-holder= 
--msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then 
exit 1; else exit 0; fi); then
+            ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+    ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    rm -f messages.po
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; 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 conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  ac_executable_p="test -x"
+else
+  ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case "$MSGMERGE" in
+  [\\/]* | ?:[\\/]*)
+    ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a 
path.
+    ;;
+  *)
+    ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH; do
+      IFS="$ac_save_IFS"
+      test -z "$ac_dir" && ac_dir=.
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+          echo "$as_me: trying $ac_dir/$ac_word..." >&5
+          if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+            ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+            break 2
+          fi
+        fi
+      done
+    done
+    IFS="$ac_save_IFS"
+  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+    ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+  echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+      if test "$GMSGFMT" != ":"; then
+            if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+       (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage 
>/dev/null; then exit 1; else exit 0; fi); then
+      : ;
+    else
+      GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+      echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; 
ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+      GMSGFMT=":"
+    fi
+  fi
+
+      if test "$XGETTEXT" != ":"; then
+            if $XGETTEXT --omit-header --copyright-holder= 
--msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+       (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= 
/dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; 
fi); then
+      : ;
+    else
+      echo "$as_me:$LINENO: result: found xgettext program is not GNU 
xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+      XGETTEXT=":"
+    fi
+        rm -f messages.po
+  fi
+
+            ac_config_commands="$ac_config_commands default-1"
+
+
+
+      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"
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify 
one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" 
>&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi;
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; 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 conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+       test "$with_gnu_ld" != no && break ;;
+      *)
+       test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in 
\$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+                                                echo "$as_me:$LINENO: checking 
for shared library run path origin" >&5
+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
+if test "${acl_cv_rpath+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" 
\
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+echo "${ECHO_T}$acl_cv_rpath" >&6
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath or --disable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+  enableval="$enable_rpath"
+  :
+else
+  enable_rpath=yes
+fi;
+
+
+                  acl_libdirstem=lib
+  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 
's,^libraries: ,,p' | sed -e 's,^=,,'`
+  if test -n "$searchpath"; then
+    acl_save_IFS="${IFS=       }"; IFS=":"
+    for searchdir in $searchpath; do
+      if test -d "$searchdir"; then
+        case "$searchdir" in
+          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+          *) searchdir=`cd "$searchdir" && pwd`
+             case "$searchdir" in
+               */lib64 ) acl_libdirstem=lib64 ;;
+             esac ;;
+        esac
+      fi
+    done
+    IFS="$acl_save_IFS"
+  fi
+
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+  withval="$with_libiconv_prefix"
+
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+
+fi;
+      LIBICONV=
+  LTLIBICONV=
+  INCICONV=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='iconv '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 
'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ 
}$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f 
"$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; 
then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir 
-l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test 
"$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+              else
+                                                                               
 haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$hardcode_direct" = yes; then
+                                                      
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test 
"$hardcode_minus_L" = no; then
+                                                            
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                               
 haveit=
+                    for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                                                                               
         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                    else
+                                                                               
                                                                                
                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+              else
+                                                
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 
"s,/$acl_libdirstem/"'*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                               
                                 if test "X$additional_includedir" != 
"X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCICONV="${INCICONV}${INCICONV:+ 
}-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                               
                                                                                
 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = 
"X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBICONV; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round 
"`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                               
 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 
's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBICONV="${LIBICONV}${LIBICONV:+ 
}$dep"
+                    LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+            LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+    done
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+  ;
+  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
+  gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1
+_ACEOF
+
+  fi
+    echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gt_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS 
-I/System/Library/Frameworks/CoreFoundation.framework/Headers"
+     gt_save_LIBS="$LIBS"
+     LIBS="$LIBS -framework CoreFoundation"
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+  ;
+  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
+  gt_cv_func_CFLocaleCopyCurrent=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+     CPPFLAGS="$gt_save_CPPFLAGS"
+     LIBS="$gt_save_LIBS"
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6
+  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFLOCALECOPYCURRENT 1
+_ACEOF
+
+  fi
+  INTL_MACOSX_LIBS=
+  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test 
$gt_cv_func_CFLocaleCopyCurrent = yes; then
+    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+  fi
+
+
+
+
+  echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+    # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval="$enable_nls"
+  USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi;
+  echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
+
+
+
+
+  LIBINTL=
+  LTLIBINTL=
+  POSUB=
+
+    if test "$USE_NLS" = "yes"; then
+    gt_use_preinstalled_gnugettext=no
+
+
+
+
+
+
+        echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6
+if test "${gt_cv_func_gnugettext1_libc+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 <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
+  ;
+  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
+  gt_cv_func_gnugettext1_libc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gnugettext1_libc=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5
+echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6
+
+        if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
+
+
+
+
+
+          am_save_CPPFLAGS="$CPPFLAGS"
+
+  for element in $INCICONV; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+
+  echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+if test "${am_cv_func_iconv+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);
+  ;
+  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
+  am_cv_func_iconv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);
+  ;
+  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
+  am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+      LIBS="$am_save_LIBS"
+    fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6
+  if test "$am_cv_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+  fi
+  if test "$am_cv_lib_iconv" = yes; then
+    echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
+    echo "$as_me:$LINENO: result: $LIBICONV" >&5
+echo "${ECHO_T}$LIBICONV" >&6
+  else
+            CPPFLAGS="$am_save_CPPFLAGS"
+    LIBICONV=
+    LTLIBICONV=
+  fi
+
+
+
+
+
+
+
+    use_additional=yes
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix or --without-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then
+  withval="$with_libintl_prefix"
+
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/$acl_libdirstem"
+      fi
+    fi
+
+fi;
+      LIBINTL=
+  LTLIBINTL=
+  INCINTL=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='intl '
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+                        uppername=`echo "$name" | sed -e 
'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+          else
+                                    :
+          fi
+        else
+                              found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f 
"$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; 
then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+                        LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir 
-l$name"
+            if test "X$found_so" != "X"; then
+                                                        if test 
"$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+              else
+                                                                               
 haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                                if test "$hardcode_direct" = yes; then
+                                                      
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test 
"$hardcode_minus_L" = no; then
+                                                            
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                                                            haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                                                                               
 haveit=
+                    for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                                                                               
         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+                    else
+                                                                               
                                                                                
                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                                LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+              else
+                                                LIBINTL="${LIBINTL}${LIBINTL:+ 
}-L$found_dir -l$name"
+              fi
+            fi
+                        additional_includedir=
+            case "$found_dir" in
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 
"s,/$acl_libdirstem/"'*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+                                                                               
                                 if test "X$additional_includedir" != 
"X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INCINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                                            INCINTL="${INCINTL}${INCINTL:+ 
}-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+                        if test -n "$found_la"; then
+                                                        save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+                            for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                                                                               
                                                                                
 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+                      haveit=
+                      if test "X$additional_libdir" = 
"X/usr/local/$acl_libdirstem"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIBINTL; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                                                        
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                                                                  haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                                                                  haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                                        names_next_round="$names_next_round 
"`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                                                                               
 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 
's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                                        LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+                    LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+                                                            
LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+            LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+                        alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+            acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+    else
+            for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+            for found_dir in $ltrpathdirs; do
+      LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+    done
+  fi
+
+          echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6
+if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  gt_save_CPPFLAGS="$CPPFLAGS"
+            CPPFLAGS="$CPPFLAGS $INCINTL"
+            gt_save_LIBS="$LIBS"
+            LIBS="$LIBS $LIBINTL"
+                        cat >conftest.$ac_ext <<_ACEOF
+/* 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
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+  ;
+  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
+  gt_cv_func_gnugettext1_libintl=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gt_cv_func_gnugettext1_libintl=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+                        if test "$gt_cv_func_gnugettext1_libintl" != yes && 
test -n "$LIBICONV"; then
+              LIBS="$LIBS $LIBICONV"
+              cat >conftest.$ac_ext <<_ACEOF
+/* 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
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+  ;
+  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
+  LIBINTL="$LIBINTL $LIBICONV"
+                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+                gt_cv_func_gnugettext1_libintl=yes
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+            fi
+            CPPFLAGS="$gt_save_CPPFLAGS"
+            LIBS="$gt_save_LIBS"
+fi
+echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5
+echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6
+        fi
+
+                                        if test "$gt_cv_func_gnugettext1_libc" 
= "yes" \
+           || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
+                && test "$PACKAGE" != gettext-runtime \
+                && test "$PACKAGE" != gettext-tools; }; then
+          gt_use_preinstalled_gnugettext=yes
+        else
+                    LIBINTL=
+          LTLIBINTL=
+          INCINTL=
+        fi
+
+
+
+    if test -n "$INTL_MACOSX_LIBS"; then
+      if test "$gt_use_preinstalled_gnugettext" = "yes" \
+         || test "$nls_cv_use_gnu_gettext" = "yes"; then
+                LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+      fi
+    fi
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes" \
+       || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+    else
+      USE_NLS=no
+    fi
+  fi
+
+  echo "$as_me:$LINENO: checking whether to use NLS" >&5
+echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6
+  echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
+  if test "$USE_NLS" = "yes"; then
+    echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+        gt_source="external libintl"
+      else
+        gt_source="libc"
+      fi
+    else
+      gt_source="included intl directory"
+    fi
+    echo "$as_me:$LINENO: result: $gt_source" >&5
+echo "${ECHO_T}$gt_source" >&6
+  fi
+
+  if test "$USE_NLS" = "yes"; then
+
+    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+      if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
+        echo "$as_me:$LINENO: checking how to link with libintl" >&5
+echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6
+        echo "$as_me:$LINENO: result: $LIBINTL" >&5
+echo "${ECHO_T}$LIBINTL" >&6
+
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+      fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+    fi
+
+        POSUB=po
+  fi
+
+
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+ # The error module still poses merge problems.
+echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
+echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strerror_r+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 strerror_r
+  char *p = (char *) strerror_r;
+#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_strerror_r=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_strerror_r=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
+if test $ac_cv_have_decl_strerror_r = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 0
+_ACEOF
+
+
+fi
+
+
+
+for ac_func in strerror_r
+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 whether strerror_r returns char *" >&5
+echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    ac_cv_func_strerror_r_char_p=no
+    if test $ac_cv_have_decl_strerror_r = yes; then
+      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 ()
+{
+
+         char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         char *p = strerror_r (0, buf, sizeof buf);
+
+  ;
+  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_func_strerror_r_char_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    else
+      # strerror_r is not declared.  Choose between
+      # systems that have relatively inaccessible declarations for the
+      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+      # former has a strerror_r that returns char*, while the latter
+      # has a strerror_r that returns `int'.
+      # This test should segfault on the DEC system.
+      if test "$cross_compiling" = yes; then
+  :
+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
+       extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         exit (!isalpha (x));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_strerror_r_char_p=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+    fi
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
+echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRERROR_R_CHAR_P 1
+_ACEOF
+
+fi
+
+
+
+
+
+  if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; 
then
+
+    test $ac_cv_type_long_long = yes \
+      && ac_type='long long' \
+      || ac_type='long'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
+
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INTMAX_T 1
+_ACEOF
+
+  fi
+
+
+
+
+
+
+
+ GLOB_H=
+
+for ac_header in glob.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  GLOB_H=glob.h
+fi
+
+done
+
+
+  if test -z "$GLOB_H"; then
+    echo "$as_me:$LINENO: checking for GNU glob interface version 1" >&5
+echo $ECHO_N "checking for GNU glob interface version 1... $ECHO_C" >&6
+if test "${gl_cv_gnu_glob_interface_version_1+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+       cat >conftest.$ac_ext <<_ACEOF
+#include <gnu-versions.h>
+char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];
+_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
+  gl_cv_gnu_glob_interface_version_1=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+gl_cv_gnu_glob_interface_version_1=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $gl_cv_gnu_glob_interface_version_1" >&5
+echo "${ECHO_T}$gl_cv_gnu_glob_interface_version_1" >&6
+
+    if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then
+      GLOB_H=glob.h
+    fi
+  fi
+
+  if test -z "$GLOB_H"; then
+    echo "$as_me:$LINENO: checking whether glob lists broken symlinks" >&5
+echo $ECHO_N "checking whether glob lists broken symlinks... $ECHO_C" >&6
+if test "${gl_cv_glob_lists_symlinks+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+       if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then
+        gl_cv_glob_lists_symlinks=maybe
+      else
+        # If we can't make a symlink, then we cannot test this issue.  Be
+        # pessimistic about this.
+        gl_cv_glob_lists_symlinks=no
+      fi
+
+      if test $gl_cv_glob_lists_symlinks = maybe; then
+        if test "$cross_compiling" = yes; then
+  gl_cv_glob_lists_symlinks=no
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+#include <glob.h>
+int
+main ()
+{
+glob_t found;
+if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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
+  gl_cv_glob_lists_symlinks=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_glob_lists_symlinks=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+      fi
+fi
+echo "$as_me:$LINENO: result: $gl_cv_glob_lists_symlinks" >&5
+echo "${ECHO_T}$gl_cv_glob_lists_symlinks" >&6
+
+    if test $gl_cv_glob_lists_symlinks = no; then
+      GLOB_H=glob.h
+    fi
+  fi
+
+  rm -f conf$$-globtest
+
+  if test -n "$GLOB_H"; then
+
+
+  :
+
+
+
+
+
+
+
+
+  :
+
+
+
+
+
+
+
+  :
+
+  GLOB_H=glob.h
+
+  case $LIBOBJS in
+    "glob.$ac_objext"   | \
+  *" glob.$ac_objext"   | \
+    "glob.$ac_objext "* | \
+  *" glob.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS glob.$ac_objext" ;;
+esac
+
+
+
+  fi
+
+
+#
+# End GNULIB stuff.
+#
+
+
+
+# Check for function existance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in \
+       fchdir \
+       fchmod \
+       fsync \
+       ftime \
+       geteuid \
+       getgroups \
+       getpagesize \
+       gettimeofday \
+       initgroups \
+       login \
+       logout \
+       mknod \
+       regcomp \
+       regerror \
+       regexec \
+       regfree \
+       sigaction \
+       sigblock \
+       sigprocmask \
+       sigsetmask \
+       sigvec \
+       timezone \
+       tzset \
+       vprintf \
+       wait3 \
+
+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
+
+
+if test $cross_compiling = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CROSS_COMPILING 1
+_ACEOF
+
+else
+       echo "$as_me:$LINENO: checking for char" >&5
+echo $ECHO_N "checking for char... $ECHO_C" >&6
+if test "${ac_cv_type_char+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 ()
+{
+if ((char *) 0)
+  return 0;
+if (sizeof (char))
+  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_type_char=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_char=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of char" >&5
+echo $ECHO_N "checking size of char... $ECHO_C" >&6
+if test "${ac_cv_sizeof_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_char" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+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
+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
+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
+/* 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>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (char))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (char))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (char))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_char=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_char=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized char" >&5
+echo $ECHO_N "checking for uniquely sized char... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_char+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_char)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_char=no
+               else
+                       ccvs_cv_unique_int_type_char=yes\($ac_cv_sizeof_char\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_char" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_char" >&6
+       if test $ccvs_cv_unique_int_type_char != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_CHAR 1
+_ACEOF
+
+       fi
+       echo "$as_me:$LINENO: checking for short" >&5
+echo $ECHO_N "checking for short... $ECHO_C" >&6
+if test "${ac_cv_type_short+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 ()
+{
+if ((short *) 0)
+  return 0;
+if (sizeof (short))
+  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_type_short=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_short=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6
+if test "${ac_cv_sizeof_short+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_short" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+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
+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
+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
+/* 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>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (short))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (short))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (short))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_short=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_short=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized short" >&5
+echo $ECHO_N "checking for uniquely sized short... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_short+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_short)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_short=no
+               else
+                       ccvs_cv_unique_int_type_short=yes\($ac_cv_sizeof_short\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_short" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_short" >&6
+       if test $ccvs_cv_unique_int_type_short != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_SHORT 1
+_ACEOF
+
+       fi
+       echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6
+if test "${ac_cv_type_int+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 ()
+{
+if ((int *) 0)
+  return 0;
+if (sizeof (int))
+  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_type_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_int=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_int" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+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
+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
+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
+/* 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>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (int))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (int))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (int))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_int=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized int" >&5
+echo $ECHO_N "checking for uniquely sized int... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_int)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_int=no
+               else
+                       ccvs_cv_unique_int_type_int=yes\($ac_cv_sizeof_int\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_int" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_int" >&6
+       if test $ccvs_cv_unique_int_type_int != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_INT 1
+_ACEOF
+
+       fi
+       echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+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 ()
+{
+if ((long *) 0)
+  return 0;
+if (sizeof (long))
+  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_type_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_long" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+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
+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
+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
+/* 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>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (long))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (long))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (long))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_long=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized long" >&5
+echo $ECHO_N "checking for uniquely sized long... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_long)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_long=no
+               else
+                       ccvs_cv_unique_int_type_long=yes\($ac_cv_sizeof_long\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_long" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_long" >&6
+       if test $ccvs_cv_unique_int_type_long != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_LONG 1
+_ACEOF
+
+       fi
+       if test $ac_cv_type_long_long != no; then
+               echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6
+if test "${ac_cv_type_long_long+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 ()
+{
+if ((long long *) 0)
+  return 0;
+if (sizeof (long long))
+  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_type_long_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_long=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of long long" >&5
+echo $ECHO_N "checking size of long long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_long_long" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+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
+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
+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
+/* 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>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (long long))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (long long))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (long long))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_long_long=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_long_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
+               echo "$as_me:$LINENO: checking for uniquely sized long long" >&5
+echo $ECHO_N "checking for uniquely sized long long... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_long_long+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                               |grep "($ac_cv_sizeof_long_long)" >/dev/null ; 
then
+                               ccvs_cv_unique_int_type_long_long=no
+                       else
+                               
ccvs_cv_unique_int_type_long_long=yes\($ac_cv_sizeof_long_long\)
+                       fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_long_long" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_long_long" >&6
+               if test $ccvs_cv_unique_int_type_long_long != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_LONG_LONG 1
+_ACEOF
+
+               fi
+       fi
+       echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6
+if test "${ac_cv_type_size_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.  */
+$ac_includes_default
+int
+main ()
+{
+if ((size_t *) 0)
+  return 0;
+if (sizeof (size_t))
+  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_type_size_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_size_t=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of size_t" >&5
+echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_size_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_size_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (size_t), 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
+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
+/* 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 (size_t)); }
+unsigned long ulongval () { return (long) (sizeof (size_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (size_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (size_t))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (size_t))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_size_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (size_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_size_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized size_t" >&5
+echo $ECHO_N "checking for uniquely sized size_t... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_size_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_size_t)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_size_t=no
+               else
+                       
ccvs_cv_unique_int_type_size_t=yes\($ac_cv_sizeof_size_t\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_size_t" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_size_t" >&6
+       if test $ccvs_cv_unique_int_type_size_t != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_SIZE_T 1
+_ACEOF
+
+       fi
+       echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
+if test "${ac_cv_type_ptrdiff_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.  */
+$ac_includes_default
+int
+main ()
+{
+if ((ptrdiff_t *) 0)
+  return 0;
+if (sizeof (ptrdiff_t))
+  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_type_ptrdiff_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_ptrdiff_t=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of ptrdiff_t" >&5
+echo $ECHO_N "checking size of ptrdiff_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_ptrdiff_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_ptrdiff_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (ptrdiff_t))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (ptrdiff_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ptrdiff_t))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (ptrdiff_t))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (ptrdiff_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_ptrdiff_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (ptrdiff_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (ptrdiff_t), 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
+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
+/* 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 (ptrdiff_t)); }
+unsigned long ulongval () { return (long) (sizeof (ptrdiff_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (ptrdiff_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (ptrdiff_t))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (ptrdiff_t))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_ptrdiff_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (ptrdiff_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (ptrdiff_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_ptrdiff_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_ptrdiff_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_ptrdiff_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_PTRDIFF_T $ac_cv_sizeof_ptrdiff_t
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized ptrdiff_t" >&5
+echo $ECHO_N "checking for uniquely sized ptrdiff_t... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_ptrdiff_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_ptrdiff_t)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_ptrdiff_t=no
+               else
+                       
ccvs_cv_unique_int_type_ptrdiff_t=yes\($ac_cv_sizeof_ptrdiff_t\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_ptrdiff_t" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_ptrdiff_t" >&6
+       if test $ccvs_cv_unique_int_type_ptrdiff_t != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_PTRDIFF_T 1
+_ACEOF
+
+       fi
+       if test $gt_cv_c_wint_t != no; then
+               echo "$as_me:$LINENO: checking for wint_t" >&5
+echo $ECHO_N "checking for wint_t... $ECHO_C" >&6
+if test "${ac_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 <stdio.h>
+#include <wchar.h>
+
+
+int
+main ()
+{
+if ((wint_t *) 0)
+  return 0;
+if (sizeof (wint_t))
+  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_type_wint_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_wint_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_wint_t" >&5
+echo "${ECHO_T}$ac_cv_type_wint_t" >&6
+
+echo "$as_me:$LINENO: checking size of wint_t" >&5
+echo $ECHO_N "checking size of wint_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_wint_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_wint_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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>
+#include <wchar.h>
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (wint_t))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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>
+#include <wchar.h>
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (wint_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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 <stdio.h>
+#include <wchar.h>
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (wint_t))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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>
+#include <wchar.h>
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (wint_t))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <wchar.h>
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (wint_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_wint_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wint_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (wint_t), 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
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#include <wchar.h>
+
+
+long longval () { return (long) (sizeof (wint_t)); }
+unsigned long ulongval () { return (long) (sizeof (wint_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (wint_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (wint_t))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (wint_t))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_wint_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wint_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (wint_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_wint_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_wint_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_wint_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_WINT_T $ac_cv_sizeof_wint_t
+_ACEOF
+
+
+               echo "$as_me:$LINENO: checking for uniquely sized wint_t" >&5
+echo $ECHO_N "checking for uniquely sized wint_t... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_wint_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                               |grep "($ac_cv_sizeof_wint_t)" >/dev/null ; then
+                               ccvs_cv_unique_int_type_wint_t=no
+                       else
+                               
ccvs_cv_unique_int_type_wint_t=yes\($ac_cv_sizeof_wint_t\)
+                       fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_wint_t" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_wint_t" >&6
+               if test $ccvs_cv_unique_int_type_wint_t != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_WINT_T 1
+_ACEOF
+
+               fi
+       fi
+       if test $gt_cv_c_intmax_t != no; then
+               echo "$as_me:$LINENO: checking for intmax_t" >&5
+echo $ECHO_N "checking for intmax_t... $ECHO_C" >&6
+if test "${ac_cv_type_intmax_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 <stdio.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+int
+main ()
+{
+if ((intmax_t *) 0)
+  return 0;
+if (sizeof (intmax_t))
+  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_type_intmax_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_intmax_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_intmax_t" >&5
+echo "${ECHO_T}$ac_cv_type_intmax_t" >&6
+
+echo "$as_me:$LINENO: checking size of intmax_t" >&5
+echo $ECHO_N "checking size of intmax_t... $ECHO_C" >&6
+if test "${ac_cv_sizeof_intmax_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_intmax_t" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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 <stdio.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (intmax_t))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_intmax_t=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (intmax_t), 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
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+
+
+long longval () { return (long) (sizeof (intmax_t)); }
+unsigned long ulongval () { return (long) (sizeof (intmax_t)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (intmax_t))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (intmax_t))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (intmax_t))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_intmax_t=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (intmax_t), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (intmax_t), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_intmax_t=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_intmax_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_intmax_t" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t
+_ACEOF
+
+
+               echo "$as_me:$LINENO: checking for uniquely sized intmax_t" >&5
+echo $ECHO_N "checking for uniquely sized intmax_t... $ECHO_C" >&6
+if test "${ccvs_cv_unique_int_type_intmax_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_int_type_ \
+                               |grep "($ac_cv_sizeof_intmax_t)" >/dev/null ; 
then
+                               ccvs_cv_unique_int_type_intmax_t=no
+                       else
+                               
ccvs_cv_unique_int_type_intmax_t=yes\($ac_cv_sizeof_intmax_t\)
+                       fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_int_type_intmax_t" >&5
+echo "${ECHO_T}$ccvs_cv_unique_int_type_intmax_t" >&6
+               if test $ccvs_cv_unique_int_type_intmax_t != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_INT_TYPE_INTMAX_T 1
+_ACEOF
+
+               fi
+       fi
+
+                               echo "$as_me:$LINENO: checking for float" >&5
+echo $ECHO_N "checking for float... $ECHO_C" >&6
+if test "${ac_cv_type_float+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 ()
+{
+if ((float *) 0)
+  return 0;
+if (sizeof (float))
+  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_type_float=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_float=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
+echo "${ECHO_T}$ac_cv_type_float" >&6
+
+echo "$as_me:$LINENO: checking size of float" >&5
+echo $ECHO_N "checking size of float... $ECHO_C" >&6
+if test "${ac_cv_sizeof_float+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_float" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_float=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (float), 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
+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
+/* 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 (float)); }
+unsigned long ulongval () { return (long) (sizeof (float)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (float))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (float))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (float))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_float=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (float), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_float=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
+echo "${ECHO_T}$ac_cv_sizeof_float" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_FLOAT $ac_cv_sizeof_float
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized float" >&5
+echo $ECHO_N "checking for uniquely sized float... $ECHO_C" >&6
+if test "${ccvs_cv_unique_float_type_float+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_float_type_ \
+                       |grep "($ac_cv_sizeof_float)" >/dev/null ; then
+                       ccvs_cv_unique_float_type_float=no
+               else
+                       
ccvs_cv_unique_float_type_float=yes\($ac_cv_sizeof_float\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_float_type_float" >&5
+echo "${ECHO_T}$ccvs_cv_unique_float_type_float" >&6
+       if test $ccvs_cv_unique_float_type_float != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_FLOAT_TYPE_FLOAT 1
+_ACEOF
+
+       fi
+       echo "$as_me:$LINENO: checking for double" >&5
+echo $ECHO_N "checking for double... $ECHO_C" >&6
+if test "${ac_cv_type_double+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 ()
+{
+if ((double *) 0)
+  return 0;
+if (sizeof (double))
+  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_type_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_double=no
+fi
+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
+
+echo "$as_me:$LINENO: checking size of double" >&5
+echo $ECHO_N "checking size of double... $ECHO_C" >&6
+if test "${ac_cv_sizeof_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_double" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+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
+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
+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
+/* 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>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (double))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (double))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (double))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_double=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { 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 gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_double=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
+echo "${ECHO_T}$ac_cv_sizeof_double" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DOUBLE $ac_cv_sizeof_double
+_ACEOF
+
+
+       echo "$as_me:$LINENO: checking for uniquely sized double" >&5
+echo $ECHO_N "checking for uniquely sized double... $ECHO_C" >&6
+if test "${ccvs_cv_unique_float_type_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_float_type_ \
+                       |grep "($ac_cv_sizeof_double)" >/dev/null ; then
+                       ccvs_cv_unique_float_type_double=no
+               else
+                       
ccvs_cv_unique_float_type_double=yes\($ac_cv_sizeof_double\)
+               fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_float_type_double" >&5
+echo "${ECHO_T}$ccvs_cv_unique_float_type_double" >&6
+       if test $ccvs_cv_unique_float_type_double != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_FLOAT_TYPE_DOUBLE 1
+_ACEOF
+
+       fi
+       if test $gt_cv_c_long_double != no; then
+               echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6
+if test "${ac_cv_type_long_double+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 ()
+{
+if ((long double *) 0)
+  return 0;
+if (sizeof (long double))
+  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_type_long_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long_double=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
+echo "${ECHO_T}$ac_cv_type_long_double" >&6
+
+echo "$as_me:$LINENO: checking size of long double" >&5
+echo $ECHO_N "checking size of long double... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_long_double" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+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 int test_array [1 - 2 * !(((long) (sizeof (long double))) >= 0)];
+test_array [0] = 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_lo=0 ac_mid=0
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+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.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) < 0)];
+test_array [0] = 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_hi=-1 ac_mid=-1
+  while :; do
+    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 int test_array [1 - 2 * !(((long) (sizeof (long double))) >= $ac_mid)];
+test_array [0] = 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_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&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`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long double))) <= $ac_mid)];
+test_array [0] = 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_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_double=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long 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
+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
+/* 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 double)); }
+unsigned long ulongval () { return (long) (sizeof (long double)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (long double))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (long double))))
+       exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (long double))))
+       exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_sizeof_long_double=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long double), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long double), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_long_double=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
+_ACEOF
+
+
+               echo "$as_me:$LINENO: checking for uniquely sized long double" 
>&5
+echo $ECHO_N "checking for uniquely sized long double... $ECHO_C" >&6
+if test "${ccvs_cv_unique_float_type_long_double+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if set |grep ^ccvs_cv_unique_float_type_ \
+                               |grep "($ac_cv_sizeof_long_double)" >/dev/null 
; then
+                               ccvs_cv_unique_float_type_long_double=no
+                       else
+                               
ccvs_cv_unique_float_type_long_double=yes\($ac_cv_sizeof_long_double\)
+                       fi
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_unique_float_type_long_double" >&5
+echo "${ECHO_T}$ccvs_cv_unique_float_type_long_double" >&6
+               if test $ccvs_cv_unique_float_type_long_double != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNIQUE_FLOAT_TYPE_LONG_DOUBLE 1
+_ACEOF
+
+               fi
+       fi
+fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRCHR 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MEMCHR 1
+_ACEOF
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define REGEX_MALLOC 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _REGEX_RE_COMP 1
+_ACEOF
+
+
+
+for ac_header in unistd.h vfork.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_func in fork vfork
+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
+
+if test "x$ac_cv_func_fork" = xyes; then
+  echo "$as_me:$LINENO: checking for working fork" >&5
+echo $ECHO_N "checking for working fork... $ECHO_C" >&6
+if test "${ac_cv_func_fork_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_fork_works=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* By Ruediger Kuhlmann. */
+      #include <sys/types.h>
+      #if HAVE_UNISTD_H
+      # include <unistd.h>
+      #endif
+      /* Some systems only have a dummy stub for fork() */
+      int main ()
+      {
+       if (fork() < 0)
+         exit (1);
+       exit (0);
+      }
+_ACEOF
+rm -f 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='./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_fork_works=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_fork_works=no
+fi
+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_fork_works" >&5
+echo "${ECHO_T}$ac_cv_func_fork_works" >&6
+
+else
+  ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+  case $host in
+    *-*-amigaos* | *-*-msdosdjgpp*)
+      # Override, as these systems have only a dummy fork() stub
+      ac_cv_func_fork_works=no
+      ;;
+    *)
+      ac_cv_func_fork_works=yes
+      ;;
+  esac
+  { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed 
because of cross compilation" >&5
+echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross 
compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+  echo "$as_me:$LINENO: checking for working vfork" >&5
+echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
+if test "${ac_cv_func_vfork_works+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_vfork_works=cross
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Thanks to Paul Eggert for this test.  */
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#if HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.  The compiler
+   is told about this with #include <vfork.h>, but some compilers
+   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
+   static variable whose address is put into a register that is
+   clobbered by the vfork.  */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
+    }
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
+}
+
+int
+main ()
+{
+  pid_t parent = getpid ();
+  pid_t child;
+
+  sparc_address_test (0);
+
+  child = vfork ();
+
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.  This
+       test uses lots of local variables, at least as many local
+       variables as main has allocated so far including compiler
+       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
+       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
+       reuse the register of parent for one of the local variables,
+       since it will think that parent can't possibly be used any more
+       in this routine.  Assigning to the local variable will thus
+       munge parent in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+       || p != p5 || p != p6 || p != p7)
+      _exit(1);
+
+    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+       from child file descriptors.  If the child closes a descriptor
+       before it execs or exits, this munges the parent's descriptor
+       as well.  Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
+
+    while (wait(&status) != child)
+      ;
+    exit(
+        /* Was there some problem with vforking?  */
+        child < 0
+
+        /* Did the child fail?  (This shouldn't happen.)  */
+        || status
+
+        /* Did the vfork/compiler bug occur?  */
+        || parent != getpid()
+
+        /* Did the file descriptor bug occur?  */
+        || fstat(fileno(stdout), &st) != 0
+        );
+  }
+}
+_ACEOF
+rm -f 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='./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_vfork_works=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_vfork_works=no
+fi
+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_vfork_works" >&5
+echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+  ac_cv_func_vfork_works=$ac_cv_func_vfork
+  { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed 
because of cross compilation" >&5
+echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross 
compilation" >&2;}
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_VFORK 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define vfork fork
+_ACEOF
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WORKING_FORK 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking whether closedir returns void" >&5
+echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
+if test "${ac_cv_func_closedir_void+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_closedir_void=yes
+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
+#include <$ac_header_dirent>
+#ifndef __cplusplus
+int closedir ();
+#endif
+
+int
+main ()
+{
+exit (closedir (opendir (".")) != 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_closedir_void=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_closedir_void=yes
+fi
+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_closedir_void" >&5
+echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
+if test $ac_cv_func_closedir_void = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CLOSEDIR_VOID 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking for library containing getspnam" >&5
+echo $ECHO_N "checking for library containing getspnam... $ECHO_C" >&6
+if test "${ac_cv_search_getspnam+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_getspnam=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getspnam ();
+int
+main ()
+{
+getspnam ();
+  ;
+  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_search_getspnam="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_getspnam" = no; then
+  for ac_lib in sec gen; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 getspnam ();
+int
+main ()
+{
+getspnam ();
+  ;
+  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_search_getspnam="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_getspnam" >&5
+echo "${ECHO_T}$ac_cv_search_getspnam" >&6
+if test "$ac_cv_search_getspnam" != no; then
+  test "$ac_cv_search_getspnam" = "none required" || 
LIBS="$ac_cv_search_getspnam $LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETSPNAM 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether utime accepts a null argument" >&5
+echo $ECHO_N "checking whether utime accepts a null argument... $ECHO_C" >&6
+if test "${ac_cv_func_utime_null+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -f conftest.data; >conftest.data
+# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
+if test "$cross_compiling" = yes; then
+  ac_cv_func_utime_null=no
+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 ()
+{
+struct stat s, t;
+  exit (!(stat ("conftest.data", &s) == 0
+         && utime ("conftest.data", (long *)0) == 0
+         && stat ("conftest.data", &t) == 0
+         && t.st_mtime >= s.st_mtime
+         && t.st_mtime - s.st_mtime < 120));
+  ;
+  return 0;
+}
+_ACEOF
+rm -f 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='./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_utime_null=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_utime_null=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+rm -f core *.core
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_utime_null" >&5
+echo "${ECHO_T}$ac_cv_func_utime_null" >&6
+if test $ac_cv_func_utime_null = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UTIME_NULL 1
+_ACEOF
+
+fi
+rm -f conftest.data
+
+echo "$as_me:$LINENO: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+#      .               the current directory, where building will happen
+#      $prefix/lib     where we will be installing things
+#      $exec_prefix/lib        likewise
+# eval it to expand exec_prefix.
+#      $TMPDIR         if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+#      /tmp            where it might want to write temporary files
+#      /var/tmp                likewise
+#      /usr/tmp                likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+  ac_tmpdirs=$TMPDIR
+else
+  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+  test -d $ac_dir || continue
+  test -w $ac_dir || continue # It is less confusing to not echo anything here.
+  ac_xdir=$ac_dir/cf$$
+  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+  ac_tf1=$ac_xdir/conftest9012345
+  ac_tf2=$ac_xdir/conftest9012346
+  (echo 1 >$ac_tf1) 2>/dev/null
+  (echo 2 >$ac_tf2) 2>/dev/null
+  ac_val=`cat $ac_tf1 2>/dev/null`
+  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+    ac_cv_sys_long_file_names=no
+    rm -rf $ac_xdir 2>/dev/null
+    break
+  fi
+  rm -rf $ac_xdir 2>/dev/null
+done
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+if test $ac_cv_sys_long_file_names = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_FILE_NAMES 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether printf supports %p" >&5
+echo $ECHO_N "checking whether printf supports %p... $ECHO_C" >&6
+if test "${cvs_cv_func_printf_ptr+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
+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
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+/* If printf supports %p, exit 0. */
+int
+main ()
+{
+  void *p1, *p2;
+  char buf[256];
+  p1 = &p1; p2 = &p2;
+  sprintf(buf, "%p", p1);
+  exit(sscanf(buf, "%p", &p2) != 1 || p2 != p1);
+}
+_ACEOF
+rm -f 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='./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
+  cvs_cv_func_printf_ptr=yes
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cvs_cv_func_printf_ptr=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext 
conftest.$ac_ext
+fi
+rm -f core core.* *.core
+fi
+echo "$as_me:$LINENO: result: $cvs_cv_func_printf_ptr" >&5
+echo "${ECHO_T}$cvs_cv_func_printf_ptr" >&6
+if test $cvs_cv_func_printf_ptr = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PRINTF_PTR 1
+_ACEOF
+
+fi
+
+
+# Try to find connect and gethostbyname.
+
+echo "$as_me:$LINENO: checking for main in -lnsl" >&5
+echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+main ();
+  ;
+  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_lib_nsl_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_main=no
+fi
+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_main" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
+if test $ac_cv_lib_nsl_main = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+  LIBS="-lnsl $LIBS"
+
+fi
+
+echo "$as_me:$LINENO: checking for library containing connect" >&5
+echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6
+if test "${ac_cv_search_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_connect=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 connect ();
+int
+main ()
+{
+connect ();
+  ;
+  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_search_connect="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_connect" = no; then
+  for ac_lib in xnet socket inet; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 connect ();
+int
+main ()
+{
+connect ();
+  ;
+  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_search_connect="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_connect" >&5
+echo "${ECHO_T}$ac_cv_search_connect" >&6
+if test "$ac_cv_search_connect" != no; then
+  test "$ac_cv_search_connect" = "none required" || 
LIBS="$ac_cv_search_connect $LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CONNECT 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
+echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_search_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gethostbyname=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  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_search_gethostbyname="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gethostbyname" = no; then
+  for ac_lib in netinet; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  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_search_gethostbyname="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6
+if test "$ac_cv_search_gethostbyname" != no; then
+  test "$ac_cv_search_gethostbyname" = "none required" || 
LIBS="$ac_cv_search_gethostbyname $LIBS"
+
+fi
+
+
+
+
+
+
+KRB4=/usr/kerberos
+
+
+# Check whether --with-krb4 or --without-krb4 was given.
+if test "${with_krb4+set}" = set; then
+  withval="$with_krb4"
+  KRB4=$with_krb4
+fi; echo "$as_me:$LINENO: checking for KRB4 in $KRB4" >&5
+echo $ECHO_N "checking for KRB4 in $KRB4... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+
+
+krb_h=
+echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
+   hold_cflags=$CFLAGS
+   CFLAGS="$CFLAGS -I$KRB4/include"
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <krb.h>
+int
+main ()
+{
+int i;
+  ;
+  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
+  krb_h=yes krb_incdir=$KRB4/include
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CFLAGS=$hold_cflags
+           cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <krb.h>
+int
+main ()
+{
+int i;
+  ;
+  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
+  krb_h=yes krb_incdir=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+   CFLAGS=$hold_cflags
+else
+   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <krb.h>
+int
+main ()
+{
+int i;
+  ;
+  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
+  krb_h=yes krb_incdir=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+if test -z "$krb_h"; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <krb.h>
+int
+main ()
+{
+int i;
+  ;
+  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
+  krb_h=yes krb_incdir=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; 
then
+       hold_cflags=$CFLAGS
+       CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <krb.h>
+int
+main ()
+{
+int i;
+  ;
+  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
+  krb_h=yes krb_incdir=$KRB4/include/kerberosIV
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+       CFLAGS=$hold_cflags
+     fi
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $krb_h" >&5
+echo "${ECHO_T}$krb_h" >&6
+
+if test -n "$krb_h"; then
+  krb_lib=
+  if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
+       hold_ldflags=$LDFLAGS
+       LDFLAGS="-L${KRB4}/lib $LDFLAGS"
+       echo "$as_me:$LINENO: checking for printf in -lkrb" >&5
+echo $ECHO_N "checking for printf in -lkrb... $ECHO_C" >&6
+if test "${ac_cv_lib_krb_printf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 printf ();
+int
+main ()
+{
+printf ();
+  ;
+  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_lib_krb_printf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb_printf=no
+fi
+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_krb_printf" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_printf" >&6
+if test $ac_cv_lib_krb_printf = yes; then
+  krb_lib=yes krb_libdir=${KRB4}/lib
+else
+  LDFLAGS=$hold_ldflags
+            # Using open here instead of printf so we don't
+            # get confused by the cached value for printf from above.
+            echo "$as_me:$LINENO: checking for open in -lkrb" >&5
+echo $ECHO_N "checking for open in -lkrb... $ECHO_C" >&6
+if test "${ac_cv_lib_krb_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 open ();
+int
+main ()
+{
+open ();
+  ;
+  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_lib_krb_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb_open=no
+fi
+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_krb_open" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_open" >&6
+if test $ac_cv_lib_krb_open = yes; then
+  krb_lib=yes krb_libdir=
+fi
+
+fi
+
+       LDFLAGS=$hold_ldflags
+  else
+       echo "$as_me:$LINENO: checking for printf in -lkrb" >&5
+echo $ECHO_N "checking for printf in -lkrb... $ECHO_C" >&6
+if test "${ac_cv_lib_krb_printf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 printf ();
+int
+main ()
+{
+printf ();
+  ;
+  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_lib_krb_printf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb_printf=no
+fi
+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_krb_printf" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_printf" >&6
+if test $ac_cv_lib_krb_printf = yes; then
+  krb_lib=yes krb_libdir=
+fi
+
+       echo "$as_me:$LINENO: checking for krb_recvauth" >&5
+echo $ECHO_N "checking for krb_recvauth... $ECHO_C" >&6
+if test "${ac_cv_func_krb_recvauth+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 krb_recvauth to an innocuous variant, in case <limits.h> declares 
krb_recvauth.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define krb_recvauth innocuous_krb_recvauth
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char krb_recvauth (); 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 krb_recvauth
+
+/* 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 krb_recvauth ();
+/* 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_krb_recvauth) || defined (__stub___krb_recvauth)
+choke me
+#else
+char (*f) () = krb_recvauth;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != krb_recvauth;
+  ;
+  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_krb_recvauth=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_krb_recvauth=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_krb_recvauth" >&5
+echo "${ECHO_T}$ac_cv_func_krb_recvauth" >&6
+if test $ac_cv_func_krb_recvauth = yes; then
+  krb_lib=yes krb_libdir=
+fi
+
+  fi
+  if test -n "$krb_lib"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERBEROS 1
+_ACEOF
+
+    cvs_client_objects="$cvs_client_objects kerberos4-client.o"
+    test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
+    # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
+    # -ldes in the command line.  Don't do it permanently so that we honor
+    # the user's setting for LDFLAGS
+    hold_ldflags=$LDFLAGS
+    test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
+    echo "$as_me:$LINENO: checking for printf in -ldes" >&5
+echo $ECHO_N "checking for printf in -ldes... $ECHO_C" >&6
+if test "${ac_cv_lib_des_printf+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 printf ();
+int
+main ()
+{
+printf ();
+  ;
+  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_lib_des_printf=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_des_printf=no
+fi
+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_des_printf" >&5
+echo "${ECHO_T}$ac_cv_lib_des_printf" >&6
+if test $ac_cv_lib_des_printf = yes; then
+  LIBS="${LIBS} -ldes"
+fi
+
+
+echo "$as_me:$LINENO: checking for krb_recvauth in -lkrb" >&5
+echo $ECHO_N "checking for krb_recvauth in -lkrb... $ECHO_C" >&6
+if test "${ac_cv_lib_krb_krb_recvauth+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 krb_recvauth ();
+int
+main ()
+{
+krb_recvauth ();
+  ;
+  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_lib_krb_krb_recvauth=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb_krb_recvauth=no
+fi
+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_krb_krb_recvauth" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_krb_recvauth" >&6
+if test $ac_cv_lib_krb_krb_recvauth = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBKRB 1
+_ACEOF
+
+  LIBS="-lkrb $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for krb_recvauth in -lkrb4" >&5
+echo $ECHO_N "checking for krb_recvauth in -lkrb4... $ECHO_C" >&6
+if test "${ac_cv_lib_krb4_krb_recvauth+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb4  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 krb_recvauth ();
+int
+main ()
+{
+krb_recvauth ();
+  ;
+  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_lib_krb4_krb_recvauth=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_krb4_krb_recvauth=no
+fi
+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_krb4_krb_recvauth" >&5
+echo "${ECHO_T}$ac_cv_lib_krb4_krb_recvauth" >&6
+if test $ac_cv_lib_krb4_krb_recvauth = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBKRB4 1
+_ACEOF
+
+  LIBS="-lkrb4 $LIBS"
+
+fi
+
+    LDFLAGS=$hold_ldflags
+    if test -n "$krb_incdir"; then
+      CPPFLAGS="$CPPFLAGS -I$krb_incdir"
+    fi
+  fi
+fi
+
+for ac_func in krb_get_err_text
+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
+
+
+
+
+#
+# Use --with-gssapi[=DIR] to enable GSSAPI support.
+#
+# defaults to enabled with DIR in default list below
+#
+# Search for /SUNHEA/ and read the comments about this default below.
+#
+
+# Check whether --with-gssapi or --without-gssapi was given.
+if test "${with_gssapi+set}" = set; then
+  withval="$with_gssapi"
+
+else
+  with_gssapi=yes
+fi;
+#
+# Try to locate a GSSAPI installation if no location was specified, assuming
+# GSSAPI was enabled (the default).
+#
+if test -n "$acx_gssapi_cv_gssapi"; then
+  # Granted, this is a slightly ugly way to print this info, but the
+  # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
+  # AC_CACHE_CHECK worse
+  echo "$as_me:$LINENO: checking for GSSAPI" >&5
+echo $ECHO_N "checking for GSSAPI... $ECHO_C" >&6
+else :; fi
+if test "${acx_gssapi_cv_gssapi+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test x$with_gssapi = xyes; then
+  # --with but no location specified
+  # assume a gssapi.h or gssapi/gssapi.h locates our install.
+  #
+  # This isn't always strictly true.  For instance Solaris 7's SUNHEA (header)
+  # package installs gssapi.h whether or not the necessary libraries are
+  # installed.  I'm still not sure whether to consider this a bug.  The long
+  # way around is to not consider GSSPAI installed unless gss_import_name is
+  # found, but that brings up a lot of other hassles, like continuing to let
+  # gcc & ld generate the error messages when the user uses --with-gssapi=dir
+  # as a debugging aid.  The short way around is to disable GSSAPI by default,
+  # but I think Sun users have been faced with this for awhile and I haven't
+  # heard many complaints.
+  acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+  for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
+    if test x$acx_gssapi_cv_gssapi = xno; then
+      break
+    fi
+    if test x$acx_gssapi_cv_gssapi = xyes; then
+      echo "$as_me:$LINENO: checking for GSSAPI" >&5
+echo $ECHO_N "checking for GSSAPI... $ECHO_C" >&6
+      echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+    else
+      CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
+      echo "$as_me:$LINENO: checking for GSSAPI in $acx_gssapi_cv_gssapi" >&5
+echo $ECHO_N "checking for GSSAPI in $acx_gssapi_cv_gssapi... $ECHO_C" >&6
+      echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+    fi
+    unset ac_cv_header_gssapi_h
+    unset ac_cv_header_gssapi_gssapi_h
+    unset ac_cv_header_krb5_h
+
+
+
+for ac_header in gssapi.h gssapi/gssapi.h krb5.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    if (test "$ac_cv_header_gssapi_h" = yes ||
+         test "$ac_cv_header_gssapi_gssapi_h" = yes) &&
+       test "$ac_cv_header_krb5_h" = yes; then
+      break
+    fi
+  done
+  CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+else
+  acx_gssapi_cv_gssapi=$with_gssapi
+fi
+echo "$as_me:$LINENO: checking for GSSAPI" >&5
+echo $ECHO_N "checking for GSSAPI... $ECHO_C" >&6
+
+fi
+echo "$as_me:$LINENO: result: $acx_gssapi_cv_gssapi" >&5
+echo "${ECHO_T}$acx_gssapi_cv_gssapi" >&6
+
+#
+# Set up GSSAPI includes for later use.  We don't bother to check for
+# $acx_gssapi_cv_gssapi=no here since that will be caught later.
+#
+if test x$acx_gssapi_cv_gssapi = xyes; then
+  # no special includes necessary
+  GSSAPI_INCLUDES=""
+else
+  # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
+  GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
+fi
+
+#
+# Get the rest of the information CVS needs to compile with GSSAPI support
+#
+if test x$acx_gssapi_cv_gssapi != xno; then
+  # define HAVE_GSSAPI and set up the includes
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GSSAPI
+_ACEOF
+
+  CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
+
+  cvs_client_objects="$cvs_client_objects gssapi-client.o"
+
+  # locate any other headers
+
+
+
+
+for ac_header in gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+  # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
+  echo "$as_me:$LINENO: checking for GSS_C_NT_HOSTBASED_SERVICE" >&5
+echo $ECHO_N "checking for GSS_C_NT_HOSTBASED_SERVICE... $ECHO_C" >&6
+if test "${acx_gssapi_cv_gss_c_nt_hostbased_service+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+    acx_gssapi_cv_gss_c_nt_hostbased_service=no
+    if test "$ac_cv_header_gssapi_h" = "yes"; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+  acx_gssapi_cv_gss_c_nt_hostbased_service=yes
+else
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gss_nt_service_name" >/dev/null 2>&1; then
+  acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+    fi
+    if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+       test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+  acx_gssapi_cv_gss_c_nt_hostbased_service=yes
+else
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi/gssapi.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gss_nt_service_name" >/dev/null 2>&1; then
+  acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+    else :; fi
+    if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+       test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi/gssapi_generic.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+  acx_gssapi_cv_gss_c_nt_hostbased_service=yes
+else
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <gssapi/gssapi_generic.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "gss_nt_service_name" >/dev/null 2>&1; then
+  acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+    else :; fi
+
+fi
+echo "$as_me:$LINENO: result: $acx_gssapi_cv_gss_c_nt_hostbased_service" >&5
+echo "${ECHO_T}$acx_gssapi_cv_gss_c_nt_hostbased_service" >&6
+  if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
+     test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
+    # don't define for yes since that means it already means something and
+    # don't define for no since we'd rather the compiler catch the error
+    # It's debatable whether we'd prefer that the compiler catch the error
+    #  - it seems our estranged developer is more likely to be familiar with
+    #   the intricacies of the compiler than with those of autoconf, but by
+    #   the same token, maybe we'd rather alert them to the fact that most
+    #   of the support they need to fix the problem is installed if they can
+    #   simply locate the appropriate symbol.
+
+cat >>confdefs.h <<_ACEOF
+#define GSS_C_NT_HOSTBASED_SERVICE $acx_gssapi_cv_gss_c_nt_hostbased_service
+_ACEOF
+
+  else :; fi
+
+  # Expect the libs to be installed parallel to the headers
+  #
+  # We could try once with and once without, but I'm not sure it's worth the
+  # trouble.
+  if test x$acx_gssapi_cv_gssapi != xyes; then
+    if test -z "$LIBS"; then
+      LIBS="-L$acx_gssapi_cv_gssapi/lib"
+    else
+      LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
+    fi
+  else :; fi
+
+      #
+  # Some of the order below is particular due to library dependencies
+  #
+
+  #
+  # des                        Heimdal K 0.3d, but Heimdal seems to be set up 
such
+  #                    that it could have been installed from elsewhere.
+  #
+  echo "$as_me:$LINENO: checking for library containing des_set_odd_parity" >&5
+echo $ECHO_N "checking for library containing des_set_odd_parity... $ECHO_C" 
>&6
+if test "${ac_cv_search_des_set_odd_parity+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_des_set_odd_parity=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 des_set_odd_parity ();
+int
+main ()
+{
+des_set_odd_parity ();
+  ;
+  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_search_des_set_odd_parity="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_des_set_odd_parity" = no; then
+  for ac_lib in des; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 des_set_odd_parity ();
+int
+main ()
+{
+des_set_odd_parity ();
+  ;
+  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_search_des_set_odd_parity="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_des_set_odd_parity" >&5
+echo "${ECHO_T}$ac_cv_search_des_set_odd_parity" >&6
+if test "$ac_cv_search_des_set_odd_parity" != no; then
+  test "$ac_cv_search_des_set_odd_parity" = "none required" || 
LIBS="$ac_cv_search_des_set_odd_parity $LIBS"
+
+fi
+
+
+  #
+  # com_err            Heimdal K 0.3d
+  #
+  # com_err            MIT K5 v1.2.2-beta1
+  #
+  echo "$as_me:$LINENO: checking for library containing com_err" >&5
+echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
+if test "${ac_cv_search_com_err+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_com_err=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 com_err ();
+int
+main ()
+{
+com_err ();
+  ;
+  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_search_com_err="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_com_err" = no; then
+  for ac_lib in com_err; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 com_err ();
+int
+main ()
+{
+com_err ();
+  ;
+  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_search_com_err="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
+echo "${ECHO_T}$ac_cv_search_com_err" >&6
+if test "$ac_cv_search_com_err" != no; then
+  test "$ac_cv_search_com_err" = "none required" || 
LIBS="$ac_cv_search_com_err $LIBS"
+
+fi
+
+
+  #
+  # asn1               Heimdal K 0.3d          -lcom_err
+  #
+  echo "$as_me:$LINENO: checking for library containing 
initialize_asn1_error_table_r" >&5
+echo $ECHO_N "checking for library containing initialize_asn1_error_table_r... 
$ECHO_C" >&6
+if test "${ac_cv_search_initialize_asn1_error_table_r+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_initialize_asn1_error_table_r=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 initialize_asn1_error_table_r ();
+int
+main ()
+{
+initialize_asn1_error_table_r ();
+  ;
+  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_search_initialize_asn1_error_table_r="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_initialize_asn1_error_table_r" = no; then
+  for ac_lib in asn1; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 initialize_asn1_error_table_r ();
+int
+main ()
+{
+initialize_asn1_error_table_r ();
+  ;
+  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_search_initialize_asn1_error_table_r="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_initialize_asn1_error_table_r" >&5
+echo "${ECHO_T}$ac_cv_search_initialize_asn1_error_table_r" >&6
+if test "$ac_cv_search_initialize_asn1_error_table_r" != no; then
+  test "$ac_cv_search_initialize_asn1_error_table_r" = "none required" || 
LIBS="$ac_cv_search_initialize_asn1_error_table_r $LIBS"
+
+fi
+
+
+  #
+  # resolv             required, but not installed by Heimdal K 0.3d
+  #
+  # resolv             MIT K5 1.2.2-beta1
+  #                    Linux 2.2.17
+  #
+  echo "$as_me:$LINENO: checking for library containing __dn_expand" >&5
+echo $ECHO_N "checking for library containing __dn_expand... $ECHO_C" >&6
+if test "${ac_cv_search___dn_expand+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search___dn_expand=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 __dn_expand ();
+int
+main ()
+{
+__dn_expand ();
+  ;
+  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_search___dn_expand="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search___dn_expand" = no; then
+  for ac_lib in resolv; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 __dn_expand ();
+int
+main ()
+{
+__dn_expand ();
+  ;
+  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_search___dn_expand="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search___dn_expand" >&5
+echo "${ECHO_T}$ac_cv_search___dn_expand" >&6
+if test "$ac_cv_search___dn_expand" != no; then
+  test "$ac_cv_search___dn_expand" = "none required" || 
LIBS="$ac_cv_search___dn_expand $LIBS"
+
+fi
+
+
+  #
+  # crypto             Need by gssapi under FreeBSD 5.4
+  #
+  echo "$as_me:$LINENO: checking for library containing RC4" >&5
+echo $ECHO_N "checking for library containing RC4... $ECHO_C" >&6
+if test "${ac_cv_search_RC4+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_RC4=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 RC4 ();
+int
+main ()
+{
+RC4 ();
+  ;
+  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_search_RC4="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_RC4" = no; then
+  for ac_lib in crypto; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 RC4 ();
+int
+main ()
+{
+RC4 ();
+  ;
+  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_search_RC4="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_RC4" >&5
+echo "${ECHO_T}$ac_cv_search_RC4" >&6
+if test "$ac_cv_search_RC4" != no; then
+  test "$ac_cv_search_RC4" = "none required" || LIBS="$ac_cv_search_RC4 $LIBS"
+
+fi
+
+
+  #
+  # crypt              Needed by roken under FreeBSD 4.6.
+  #
+  echo "$as_me:$LINENO: checking for library containing crypt" >&5
+echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
+if test "${ac_cv_search_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_crypt=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 crypt ();
+int
+main ()
+{
+crypt ();
+  ;
+  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_search_crypt="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_crypt" = no; then
+  for ac_lib in crypt; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 crypt ();
+int
+main ()
+{
+crypt ();
+  ;
+  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_search_crypt="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
+echo "${ECHO_T}$ac_cv_search_crypt" >&6
+if test "$ac_cv_search_crypt" != no; then
+  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt 
$LIBS"
+
+fi
+
+
+  #
+  # roken              Heimdal K 0.3d          -lresolv
+  # roken               FreeBSD 4.6             -lcrypt
+  #
+  echo "$as_me:$LINENO: checking for library containing roken_gethostbyaddr" 
>&5
+echo $ECHO_N "checking for library containing roken_gethostbyaddr... $ECHO_C" 
>&6
+if test "${ac_cv_search_roken_gethostbyaddr+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_roken_gethostbyaddr=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 roken_gethostbyaddr ();
+int
+main ()
+{
+roken_gethostbyaddr ();
+  ;
+  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_search_roken_gethostbyaddr="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_roken_gethostbyaddr" = no; then
+  for ac_lib in roken; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 roken_gethostbyaddr ();
+int
+main ()
+{
+roken_gethostbyaddr ();
+  ;
+  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_search_roken_gethostbyaddr="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_roken_gethostbyaddr" >&5
+echo "${ECHO_T}$ac_cv_search_roken_gethostbyaddr" >&6
+if test "$ac_cv_search_roken_gethostbyaddr" != no; then
+  test "$ac_cv_search_roken_gethostbyaddr" = "none required" || 
LIBS="$ac_cv_search_roken_gethostbyaddr $LIBS"
+
+fi
+
+
+  #
+  # k5crypto           MIT K5 v1.2.2-beta1
+  #
+  echo "$as_me:$LINENO: checking for library containing valid_enctype" >&5
+echo $ECHO_N "checking for library containing valid_enctype... $ECHO_C" >&6
+if test "${ac_cv_search_valid_enctype+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_valid_enctype=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 valid_enctype ();
+int
+main ()
+{
+valid_enctype ();
+  ;
+  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_search_valid_enctype="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_valid_enctype" = no; then
+  for ac_lib in k5crypto; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 valid_enctype ();
+int
+main ()
+{
+valid_enctype ();
+  ;
+  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_search_valid_enctype="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_valid_enctype" >&5
+echo "${ECHO_T}$ac_cv_search_valid_enctype" >&6
+if test "$ac_cv_search_valid_enctype" != no; then
+  test "$ac_cv_search_valid_enctype" = "none required" || 
LIBS="$ac_cv_search_valid_enctype $LIBS"
+
+fi
+
+
+  #
+  # gen                        ? ? ?                   Needed on Irix 5.3 with 
some
+  #                    Irix 5.3                version of Kerberos.  I'm not
+  #                                            sure which since Irix didn't
+  #                                            get any testing this time
+  #                                            around.  Original comment:
+  #
+  # This is necessary on Irix 5.3, in order to link against libkrb5 --
+  # there, an_to_ln.o refers to things defined only in -lgen.
+  #
+  echo "$as_me:$LINENO: checking for library containing compile" >&5
+echo $ECHO_N "checking for library containing compile... $ECHO_C" >&6
+if test "${ac_cv_search_compile+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_compile=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 compile ();
+int
+main ()
+{
+compile ();
+  ;
+  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_search_compile="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_compile" = no; then
+  for ac_lib in gen; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 compile ();
+int
+main ()
+{
+compile ();
+  ;
+  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_search_compile="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_compile" >&5
+echo "${ECHO_T}$ac_cv_search_compile" >&6
+if test "$ac_cv_search_compile" != no; then
+  test "$ac_cv_search_compile" = "none required" || 
LIBS="$ac_cv_search_compile $LIBS"
+
+fi
+
+
+  #
+  # krb5               ? ? ?                   -lgen -l???
+  #                    Irix 5.3
+  #
+  # krb5               MIT K5 v1.1.1
+  #
+  # krb5               MIT K5 v1.2.2-beta1     -lcrypto -lcom_err
+  #                    Linux 2.2.17
+  #
+  # krb5               MIT K5 v1.2.2-beta1     -lcrypto -lcom_err -lresolv
+  #
+  # krb5               Heimdal K 0.3d          -lasn1 -lroken -ldes
+  #
+  echo "$as_me:$LINENO: checking for library containing krb5_free_context" >&5
+echo $ECHO_N "checking for library containing krb5_free_context... $ECHO_C" >&6
+if test "${ac_cv_search_krb5_free_context+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_krb5_free_context=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 krb5_free_context ();
+int
+main ()
+{
+krb5_free_context ();
+  ;
+  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_search_krb5_free_context="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_krb5_free_context" = no; then
+  for ac_lib in krb5; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 krb5_free_context ();
+int
+main ()
+{
+krb5_free_context ();
+  ;
+  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_search_krb5_free_context="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_krb5_free_context" >&5
+echo "${ECHO_T}$ac_cv_search_krb5_free_context" >&6
+if test "$ac_cv_search_krb5_free_context" != no; then
+  test "$ac_cv_search_krb5_free_context" = "none required" || 
LIBS="$ac_cv_search_krb5_free_context $LIBS"
+
+fi
+
+
+  #
+  # gssapi_krb5                Only lib needed with MIT K5 v1.2.1, so find it 
first in
+  #                    order to prefer MIT Kerberos.  If both MIT & Heimdal
+  #                    Kerberos are installed and in the path, this will leave
+  #                    some of the libraries above in LIBS unnecessarily, but
+  #                    noone would ever do that, right?
+  #
+  # gssapi_krb5                MIT K5 v1.2.2-beta1     -lkrb5
+  #
+  # gssapi             Heimdal K 0.3d          -lkrb5
+  #
+  echo "$as_me:$LINENO: checking for library containing gss_import_name" >&5
+echo $ECHO_N "checking for library containing gss_import_name... $ECHO_C" >&6
+if test "${ac_cv_search_gss_import_name+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_gss_import_name=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gss_import_name ();
+int
+main ()
+{
+gss_import_name ();
+  ;
+  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_search_gss_import_name="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_gss_import_name" = no; then
+  for ac_lib in gssapi_krb5 gssapi; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 gss_import_name ();
+int
+main ()
+{
+gss_import_name ();
+  ;
+  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_search_gss_import_name="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_gss_import_name" >&5
+echo "${ECHO_T}$ac_cv_search_gss_import_name" >&6
+if test "$ac_cv_search_gss_import_name" != no; then
+  test "$ac_cv_search_gss_import_name" = "none required" || 
LIBS="$ac_cv_search_gss_import_name $LIBS"
+
+fi
+
+fi
+
+
+
+#
+# Use --with-zlib to build with a zlib other than the version distributed
+# with CVS.
+#
+# defaults to the included snapshot of zlib
+#
+
+# Check whether --with-external-zlib or --without-external-zlib was given.
+if test "${with_external_zlib+set}" = set; then
+  withval="$with_external_zlib"
+  with_external_zlib=$withval
+else
+  with_external_zlib=no
+fi;
+
+#
+# Try to locate a ZLIB installation if no location was specified, assuming
+# external ZLIB was enabled.
+#
+if test -n "$acx_zlib_cv_external_zlib"; then
+  # Granted, this is a slightly ugly way to print this info, but the
+  # AC_CHECK_HEADER used in the search for a ZLIB installation makes using
+  # AC_CACHE_CHECK worse
+  echo "$as_me:$LINENO: checking for external ZLIB" >&5
+echo $ECHO_N "checking for external ZLIB... $ECHO_C" >&6
+else :; fi
+if test "${acx_zlib_cv_external_zlib+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+  #
+  # --with but no location specified
+  # assume zlib.h locates our install.
+  #
+  acx_zlib_save_CPPFLAGS=$CPPFLAGS
+  for acx_zlib_cv_external_zlib in yes /usr/local no; do
+    if test x$acx_zlib_cv_external_zlib = xno; then
+      break
+    fi
+    if test x$acx_zlib_cv_external_zlib = xyes; then
+      echo "$as_me:$LINENO: checking for external ZLIB" >&5
+echo $ECHO_N "checking for external ZLIB... $ECHO_C" >&6
+      echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+    else
+      CPPFLAGS="$acx_zlib_save_CPPFLAGS -I$acx_zlib_cv_external_zlib/include"
+      echo "$as_me:$LINENO: checking for external ZLIB in 
$acx_zlib_cv_external_zlib" >&5
+echo $ECHO_N "checking for external ZLIB in $acx_zlib_cv_external_zlib... 
$ECHO_C" >&6
+      echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6
+    fi
+    unset ac_cv_header_zlib_h
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+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
+#include <$ac_header>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* 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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$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 
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: 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:$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 address@hidden ##
+## --------------------------------- ##
+_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"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+    if test "$ac_cv_header_zlib_h" = yes; then
+      break
+    fi
+  done
+  CPPFLAGS=$acx_zlib_save_CPPFLAGS
+echo "$as_me:$LINENO: checking for external ZLIB" >&5
+echo $ECHO_N "checking for external ZLIB... $ECHO_C" >&6
+
+fi
+echo "$as_me:$LINENO: result: $acx_zlib_cv_external_zlib" >&5
+echo "${ECHO_T}$acx_zlib_cv_external_zlib" >&6
+
+
+#
+# Output a pretty message naming our selected ZLIB "external" or "package"
+# so that any warnings printed by the version check make more sense.
+#
+echo "$as_me:$LINENO: checking selected ZLIB" >&5
+echo $ECHO_N "checking selected ZLIB... $ECHO_C" >&6
+if test "x$with_external_zlib" = xno; then
+  echo "$as_me:$LINENO: result: package" >&5
+echo "${ECHO_T}package" >&6
+else
+  echo "$as_me:$LINENO: result: external" >&5
+echo "${ECHO_T}external" >&6
+fi
+
+
+#
+# Verify that the ZLIB we aren't using isn't newer than the one we are.
+#
+if test "x$acx_zlib_cv_external_zlib" != xno; then
+  LOCAL_ZLIB_VERSION=`sed -n '/^#define ZLIB_VERSION ".*"$/{
+                              s/^#define ZLIB_VERSION "\(.*\)"$/\1/;
+                              p;}' <$srcdir/zlib/zlib.h 2>&5`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zlib.h>
+
+_ACEOF
+ac_extract_cpp_result=`(eval "$ac_cpp -dM conftest.$ac_ext") 2>&5 |
+  sed -n "/^#define ZLIB_VERSION /{
+            s/^#define ZLIB_VERSION //;
+           s/^ *//;
+           s/ *\$//;
+            p;}" 2>&5`
+if test -n "$ac_extract_cpp_result"; then
+  ZLIB_VERSION=$ac_extract_cpp_result
+fi
+rm -f conftest*
+
+  ZLIB_VERSION=`echo "$ZLIB_VERSION" |sed 's/"//g'`
+  if test "x$LOCAL_ZLIB_VERSION" = "x$ZLIB_VERSION"; then
+  # the strings are equal.  run ACTION-IF-EQUAL and bail
+  :
+else
+  # first unletter the versions
+  # this only works for a single trailing letter
+    asx_version_1=`echo "$LOCAL_ZLIB_VERSION" |
+                 sed 's/\(abcedfghi\)/.\1/;
+                      s/\(jklmnopqrs\)/.1\1/;
+                      s/\(tuvwxyz\)/.2\1/;
+                      
y/abcdefghijklmnopqrstuvwxyz/12345678901234567890123456/;'`
+  asx_version_2=`echo "$ZLIB_VERSION" |
+                 sed 's/\(abcedfghi\)/.\1/;
+                      s/\(jklmnopqrs\)/.1\1/;
+                      s/\(tuvwxyz\)/.2\1/;
+                      
y/abcdefghijklmnopqrstuvwxyz/12345678901234567890123456/;'`
+  asx_count=1
+  asx_save_IFS=$IFS
+  IFS=.
+  asx_retval=-1
+  for vsub1 in $asx_version_1; do
+    vsub2=`echo "$asx_version_2" |awk -F. "{print \\\$$asx_count}"`
+    if test -z "$vsub2" || test $vsub1 -gt $vsub2; then
+      asx_retval=1
+      break
+    elif test $vsub1 -lt $vsub2; then
+      break
+    fi
+    asx_count=`expr $asx_count + 1`
+  done
+  IFS=$asx_save_IFS
+  if test $asx_retval -eq -1; then
+    if test "x$with_external_zlib" = xno; then
+       { echo "$as_me:$LINENO: WARNING: Found external ZLIB with a more recent 
version than the
+           package version ($ZLIB_VERSION > $LOCAL_ZLIB_VERSION).  configure 
with the
+           --with-external-zlib option to select the more recent version." >&5
+echo "$as_me: WARNING: Found external ZLIB with a more recent version than the
+           package version ($ZLIB_VERSION > $LOCAL_ZLIB_VERSION).  configure 
with the
+           --with-external-zlib option to select the more recent version." 
>&2;}
+     fi
+  else
+if test "x$with_external_zlib" != xno; then
+       { echo "$as_me:$LINENO: WARNING: Package ZLIB is more recent than 
requested external version
+           ($LOCAL_ZLIB_VERSION > $ZLIB_VERSION).  configure with the 
--without-external-zlib
+           option to select the more recent version." >&5
+echo "$as_me: WARNING: Package ZLIB is more recent than requested external 
version
+           ($LOCAL_ZLIB_VERSION > $ZLIB_VERSION).  configure with the 
--without-external-zlib
+           option to select the more recent version." >&2;}
+     fi
+  fi
+
+fi
+
+fi
+
+
+# Now set with_external_zlib to our discovered value or the user specified
+# value, as appropriate.
+if test x$with_external_zlib = xyes; then
+  with_external_zlib=$acx_zlib_cv_external_zlib
+fi
+# $with_external_zlib could still be "no"
+
+
+#
+# Set up ZLIB includes for later use.
+#
+if test x$with_external_zlib != xyes \
+   && test x$with_external_zlib != no; then
+  if test -z "$CPPFLAGS"; then
+    CPPFLAGS="-I$with_external_zlib/include"
+  else
+    CPPFLAGS="$CPPFLAGS -I$with_external_zlib/include"
+  fi
+  if test -z "$LDFLAGS"; then
+    LDFLAGS="-L$with_external_zlib/lib"
+  else
+    LDFLAGS="$LDFLAGS -L$with_external_zlib/lib"
+  fi
+fi
+
+ZLIB_CPPFLAGS=
+ZLIB_LIBS=
+ZLIB_SUBDIRS=
+if test x$with_external_zlib = xno; then
+  # We need ZLIB_CPPFLAGS so that later executions of cpp from configure
+  # don't try to interpret $(top_srcdir)
+  ZLIB_CPPFLAGS='-I$(top_srcdir)/zlib'
+  ZLIB_LIBS='$(top_builddir)/zlib/libz.a'
+  # ZLIB_SUBDIRS is only used in the top level Makefiles.
+  ZLIB_SUBDIRS=zlib
+else
+  # We know what to do now, so set up the CPPFLAGS, LDFLAGS, and LIBS for later
+  # use.
+  if test -z "$LIBS"; then
+    LIBS=-lz
+  else
+    LIBS="$LIBS -lz"
+  fi
+
+  #
+  # Verify external installed zlib works
+  #
+  # Ideally, we would also check that the version is newer
+  #
+  echo "$as_me:$LINENO: checking that ZLIB library works" >&5
+echo $ECHO_N "checking that ZLIB library works... $ECHO_C" >&6
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zlib.h>
+int
+main ()
+{
+int i = Z_OK; const char *version = zlibVersion();
+  ;
+  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
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+               { { echo "$as_me:$LINENO: error: ZLIB failed to link" >&5
+echo "$as_me: error: ZLIB failed to link" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+# What remote shell transport should our client cvs default to using?
+
+# Check whether --with-rsh or --without-rsh was given.
+if test "${with_rsh+set}" = set; then
+  withval="$with_rsh"
+
+else
+  with_rsh="ssh rsh"
+fi;
+
+if test no = "$with_rsh"; then
+  { echo "$as_me:$LINENO: WARNING: Failed to find usable remote shell. Using 
'rsh'." >&5
+echo "$as_me: WARNING: Failed to find usable remote shell. Using 'rsh'." >&2;}
+  with_rsh=rsh
+elif test yes = "$with_rsh"; then
+  # Make --with-rsh mean the same thing as --with-rsh=rsh
+  with_rsh=rsh
+fi
+
+if echo $with_rsh |grep ^/ >/dev/null; then
+  # If $with_rsh is an absolute path, issue a warning if the executable
+  # doesn't exist or isn't usable, but then trust the user and use it
+  # regardless
+  with_default_rsh=$with_rsh
+  echo "$as_me:$LINENO: checking for a remote shell" >&5
+echo $ECHO_N "checking for a remote shell... $ECHO_C" >&6
+  if ! test -f $with_rsh \
+      || ! test -x $with_rsh; then
+    # warn the user that they may encounter problems
+    { echo "$as_me:$LINENO: WARNING: $with_rsh is not a path to an executable 
file" >&5
+echo "$as_me: WARNING: $with_rsh is not a path to an executable file" >&2;}
+  fi
+else
+  # Search for a remote shell
+  for ac_prog in $with_rsh
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_with_default_rsh+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$with_default_rsh"; then
+  ac_cv_prog_with_default_rsh="$with_default_rsh" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_with_default_rsh="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+with_default_rsh=$ac_cv_prog_with_default_rsh
+if test -n "$with_default_rsh"; then
+  echo "$as_me:$LINENO: result: $with_default_rsh" >&5
+echo "${ECHO_T}$with_default_rsh" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$with_default_rsh" && break
+done
+test -n "$with_default_rsh" || with_default_rsh=""rsh""
+
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define RSH_DFLT "$with_default_rsh"
+_ACEOF
+
+RSH_DFLT=$with_default_rsh
+
+
+
+
+
+# Let the confiscator request a specific editor
+
+# Check whether --with-editor or --without-editor was given.
+if test "${with_editor+set}" = set; then
+  withval="$with_editor"
+
+else
+  with_editor=yes
+fi;
+
+# If --with-editor was supplied with an argument, let it override $EDITOR from
+# the user's environment.  We need to unset EDITOR here because AC_CHECK_PROGS
+# will let the value of EDITOR ride when it is set rather than searching.  We
+# ignore the --without-editor case since it will be caught below.
+if test -n "$EDITOR" && test yes != $with_editor; then
+  $as_unset EDITOR || test "${EDITOR+set}" != set || { EDITOR=; export EDITOR; 
}
+fi
+
+# Set the default when --with-editor wasn't supplied or when it was supplied
+# without an argument.
+if test yes = $with_editor; then
+  with_editor="vim vi emacs nano pico edit"
+fi
+
+if echo $with_editor |grep ^/ >/dev/null; then
+  # If $with_editor is an absolute path, issue a warning if the executable
+  # doesn't exist or isn't usable, but then trust the user and use it
+  # regardless
+  EDITOR=$with_editor
+  echo "$as_me:$LINENO: checking for an editor" >&5
+echo $ECHO_N "checking for an editor... $ECHO_C" >&6
+  echo "$as_me:$LINENO: result: $EDITOR" >&5
+echo "${ECHO_T}$EDITOR" >&6
+  if ! test -f $with_editor \
+      || ! test -x $with_editor; then
+    # warn the user that they may encounter problems
+    { echo "$as_me:$LINENO: WARNING: \`$with_editor' is not a path to an 
executable file" >&5
+echo "$as_me: WARNING: \`$with_editor' is not a path to an executable file" 
>&2;}
+  fi
+elif test no != "${with_editor}"; then
+  # Search for an editor
+  for ac_prog in $with_editor
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_EDITOR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$EDITOR"; then
+  ac_cv_prog_EDITOR="$EDITOR" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_EDITOR="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+EDITOR=$ac_cv_prog_EDITOR
+if test -n "$EDITOR"; then
+  echo "$as_me:$LINENO: result: $EDITOR" >&5
+echo "${ECHO_T}$EDITOR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$EDITOR" && break
+done
+test -n "$EDITOR" || EDITOR="no"
+
+    if test no = "${EDITOR}"; then
+      { { echo "$as_me:$LINENO: error:
+    Failed to find a text file editor.  CVS cannot be compiled
+    without a default log message editor.  Searched for
+    \`$with_editor'.  Try \`configure --with-editor'." >&5
+echo "$as_me: error:
+    Failed to find a text file editor.  CVS cannot be compiled
+    without a default log message editor.  Searched for
+    \`$with_editor'.  Try \`configure --with-editor'." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+else
+  { { echo "$as_me:$LINENO: error:
+    CVS cannot be compiled without a default log message editor.
+    Try \`configure --with-editor'." >&5
+echo "$as_me: error:
+    CVS cannot be compiled without a default log message editor.
+    Try \`configure --with-editor'." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define EDITOR_DFLT "$EDITOR"
+_ACEOF
+
+
+
+
+
+
+# Check whether --with-hardcoded-pam-service-name or 
--without-hardcoded-pam-service-name was given.
+if test "${with_hardcoded_pam_service_name+set}" = set; then
+  withval="$with_hardcoded_pam_service_name"
+
+else
+  with_hardcoded_pam_service_name=cvs
+fi;
+
+if test "x$with_hardcoded_pam_service_name" = xno ||
+   test "x$with_hardcoded_pam_service_name" = xprogram_name; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PAM_SERVICE_NAME program_name
+_ACEOF
+
+else
+  if test x"$with_hardcoded_pam_service_name" = xyes; then
+    with_hardcoded_pam_service_name=cvs
+  fi
+  cat >>confdefs.h <<_ACEOF
+#define PAM_SERVICE_NAME "$with_hardcoded_pam_service_name"
+_ACEOF
+
+fi
+
+
+
+
+# Check whether --with-tmpdir or --without-tmpdir was given.
+if test "${with_tmpdir+set}" = set; then
+  withval="$with_tmpdir"
+
+fi;
+
+echo "$as_me:$LINENO: checking for temporary directory" >&5
+echo $ECHO_N "checking for temporary directory... $ECHO_C" >&6
+if test -z "$with_tmpdir" || test yes = "$with_tmpdir"; then
+  for with_tmpdir in /tmp /var/tmp no; do
+    if test -d "$with_tmpdir" && test -x "$with_tmpdir" \
+        && test -w "$with_tmpdir" && test -r "$with_tmpdir"; then
+      break
+    fi
+  done
+  if test no = "$with_tmpdir"; then
+    { echo "$as_me:$LINENO: WARNING: Failed to find usable temporary 
directory.  Using '/tmp'." >&5
+echo "$as_me: WARNING: Failed to find usable temporary directory.  Using 
'/tmp'." >&2;}
+    with_tmpdir=/tmp
+  fi
+  echo "$as_me:$LINENO: result: $with_tmpdir" >&5
+echo "${ECHO_T}$with_tmpdir" >&6
+elif ! echo "$with_tmpdir" |grep '^[\\/]'; then
+  echo "$as_me:$LINENO: result: $with_tmpdir" >&5
+echo "${ECHO_T}$with_tmpdir" >&6
+  { { echo "$as_me:$LINENO: error: --with-tmpdir requires an absolute path." 
>&5
+echo "$as_me: error: --with-tmpdir requires an absolute path." >&2;}
+   { (exit 1); exit 1; }; }
+elif ! test -d "$with_tmpdir" || ! test -x "$with_tmpdir" \
+        || ! test -w "$with_tmpdir" || ! test -r "$with_tmpdir"; then
+  echo "$as_me:$LINENO: result: $with_tmpdir" >&5
+echo "${ECHO_T}$with_tmpdir" >&6
+  { echo "$as_me:$LINENO: WARNING: User supplied temporary directory 
('$with_tmpdir') does not
+     exist or lacks sufficient permissions for read/write." >&5
+echo "$as_me: WARNING: User supplied temporary directory ('$with_tmpdir') does 
not
+     exist or lacks sufficient permissions for read/write." >&2;}
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define TMPDIR_DFLT "$with_tmpdir"
+_ACEOF
+
+
+
+
+
+
+# Check whether --with-umask or --without-umask was given.
+if test "${with_umask+set}" = set; then
+  withval="$with_umask"
+
+fi;
+
+if test -z "$with_umask" || test yes = "$with_umask"; then
+  with_umask=002
+elif test no = "$with_umask"; then
+  with_umask=000
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define UMASK_DFLT $with_umask
+_ACEOF
+
+
+
+
+# Check whether --with-cvs-admin-group or --without-cvs-admin-group was given.
+if test "${with_cvs_admin_group+set}" = set; then
+  withval="$with_cvs_admin_group"
+
+else
+  with_cvs_admin_group=cvsadmin
+fi;
+
+if test yes = "$with_cvs_admin_group"; then
+  with_cvs_admin_group=cvsadmin
+fi
+if test no != "$with_cvs_admin_group"; then
+
+cat >>confdefs.h <<_ACEOF
+#define CVS_ADMIN_GROUP "$with_cvs_admin_group"
+_ACEOF
+
+fi
+
+
+# Check whether --enable-cvs-ndbm or --disable-cvs-ndbm was given.
+if test "${enable_cvs_ndbm+set}" = set; then
+  enableval="$enable_cvs_ndbm"
+
+else
+  enable_cvs_ndbm=yes
+fi;
+if test no != "$enable_cvs_ndbm"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define MY_NDBM 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+# Check for options requesting client and server feature. If none are
+# given and we have connect(), we want the full client & server arrangement.
+# Check whether --enable-client or --disable-client was given.
+if test "${enable_client+set}" = set; then
+  enableval="$enable_client"
+
+else
+  enable_client=$ac_cv_search_connect
+fi;
+if test no != "$enable_client"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CLIENT_SUPPORT 1
+_ACEOF
+
+fi
+
+
+
+# Check whether --enable-password-authenticated-client or 
--disable-password-authenticated-client was given.
+if test "${enable_password_authenticated_client+set}" = set; then
+  enableval="$enable_password_authenticated_client"
+
+else
+  enable_password_authenticated_client=$enable_client
+fi;
+
+if test xno != "x$enable_password_authenticated_client"; then
+  if test xno != "x$enable_client"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define AUTH_CLIENT_SUPPORT 1
+_ACEOF
+
+  else
+    { echo "$as_me:$LINENO: WARNING: --enable-password-authenticated-client is 
meaningless with
+       the CVS client disabled (--disable-client)" >&5
+echo "$as_me: WARNING: --enable-password-authenticated-client is meaningless 
with
+       the CVS client disabled (--disable-client)" >&2;}
+  fi
+fi
+
+
+
+
+# Check whether --enable-server or --disable-server was given.
+if test "${enable_server+set}" = set; then
+  enableval="$enable_server"
+
+else
+  enable_server=$ac_cv_search_connect
+fi;
+
+if test no != "$enable_server"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SERVER_SUPPORT 1
+_ACEOF
+
+
+            echo "$as_me:$LINENO: checking for library containing crypt" >&5
+echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
+if test "${ac_cv_search_crypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_crypt=no
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 crypt ();
+int
+main ()
+{
+crypt ();
+  ;
+  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_search_crypt="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_crypt" = no; then
+  for ac_lib in crypt; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 crypt ();
+int
+main ()
+{
+crypt ();
+  ;
+  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_search_crypt="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
+echo "${ECHO_T}$ac_cv_search_crypt" >&6
+if test "$ac_cv_search_crypt" != no; then
+  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt 
$LIBS"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRYPT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define AUTH_SERVER_SUPPORT 1
+_ACEOF
+
+fi
+
+          # Check whether --enable-server-flow-control or 
--disable-server-flow-control was given.
+if test "${enable_server_flow_control+set}" = set; then
+  enableval="$enable_server_flow_control"
+  if test yes = $enable_server_flow_control; then
+       enable_server_flow_control=1M,2M
+     fi
+else
+  enable_server_flow_control=1M,2M
+fi;
+  if test no != $enable_server_flow_control; then
+    ccvs_lwm=`expr "$enable_server_flow_control" : '\(.*\),'`
+    ccvs_hwm=`expr "$enable_server_flow_control" : '.*,\(.*\)'`
+    ccvs_lwm_E=`expr "$ccvs_lwm" : '[0-9][0-9]*\(.*\)'`
+    ccvs_lwm=`expr "$ccvs_lwm" : '\([0-9][0-9]*\)'`
+    test "" != "$ccvs_lwm" || ccvs_lwm_E="?"
+    case $ccvs_lwm_E in
+        G) ccvs_lwm="$ccvs_lwm * 1024 * 1024 * 1024";;
+        M) ccvs_lwm="$ccvs_lwm * 1024 * 1024";;
+        k) ccvs_lwm="$ccvs_lwm * 1024";;
+        b | '') ;;
+        *) { { echo "$as_me:$LINENO: error: Can't parse argument to 
--enable-server-flow-control
+                        ('$enable_server_flow_control') as <lwm>,<hwm>" >&5
+echo "$as_me: error: Can't parse argument to --enable-server-flow-control
+                        ('$enable_server_flow_control') as <lwm>,<hwm>" >&2;}
+   { (exit 1); exit 1; }; }
+      esac
+    ccvs_hwm_E=`expr "$ccvs_hwm" : '[0-9][0-9]*\(.*\)'`
+    ccvs_hwm=`expr "$ccvs_hwm" : '\([0-9][0-9]*\).*'`
+    test "" != "$ccvs_hwm" || ccvs_hwm_E="?"
+    case $ccvs_hwm_E in
+        G) ccvs_hwm="$ccvs_hwm * 1024 * 1024 * 1024";;
+        M) ccvs_hwm="$ccvs_hwm * 1024 * 1024";;
+        k) ccvs_hwm="$ccvs_hwm * 1024";;
+        b | '') ccvs_hwm="$ccvs_hwm";;
+        *) { { echo "$as_me:$LINENO: error: Can't parse argument to 
--enable-server-flow-control
+                        ('$enable_server_flow_control') as <lwm>,<hwm>" >&5
+echo "$as_me: error: Can't parse argument to --enable-server-flow-control
+                        ('$enable_server_flow_control') as <lwm>,<hwm>" >&2;}
+   { (exit 1); exit 1; }; }
+      esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define SERVER_FLOWCONTROL 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SERVER_LO_WATER ($ccvs_lwm)
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SERVER_HI_WATER ($ccvs_hwm)
+_ACEOF
+
+  fi # enable_server_flow_control
+fi # enable_server
+
+
+
+
+# Check whether --enable-proxy or --disable-proxy was given.
+if test "${enable_proxy+set}" = set; then
+  enableval="$enable_proxy"
+
+else
+  if test xno != "x$enable_client" && test xno != "x$enable_server"; then
+     enable_proxy=yes
+   else
+     enable_proxy=no
+   fi
+fi;
+
+if test no != "$enable_proxy"; then
+  if test xno = "x$enable_client" || test xno = "x$enable_server"; then
+    { echo "$as_me:$LINENO: WARNING: --enable-proxy is meaningless when either 
the CVS client or the
+       CVS server is disabled (--disable-client and --disable-server)." >&5
+echo "$as_me: WARNING: --enable-proxy is meaningless when either the CVS 
client or the
+       CVS server is disabled (--disable-client and --disable-server)." >&2;}
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define PROXY_SUPPORT 1
+_ACEOF
+
+  fi
+fi
+
+
+
+# Check whether --enable-pam or --disable-pam was given.
+if test "${enable_pam+set}" = set; then
+  enableval="$enable_pam"
+
+else
+  enable_pam=no
+
+fi;
+
+if test yes = $enable_pam; then
+  ac_pam_header_available=
+
+  if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
+echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
+if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
+echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
+echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6
+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
+#include <security/pam_appl.h>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
+echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <security/pam_appl.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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the 
compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected 
by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the 
compiler's result" >&5
+echo "$as_me: WARNING: security/pam_appl.h: proceeding with the compiler's 
result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot 
be compiled" >&5
+echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" 
>&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h:     check for 
missing prerequisite headers?" >&5
+echo "$as_me: WARNING: security/pam_appl.h:     check for missing prerequisite 
headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: see the Autoconf 
documentation" >&5
+echo "$as_me: WARNING: security/pam_appl.h: see the Autoconf documentation" 
>&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h:     section 
\"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: security/pam_appl.h:     section \"Present But Cannot 
Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the 
preprocessor's result" >&5
+echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's 
result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: in the future, the 
compiler will take precedence" >&5
+echo "$as_me: WARNING: security/pam_appl.h: in the future, the compiler will 
take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to address@hidden ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
+echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
+if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_security_pam_appl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
+echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
+
+fi
+if test $ac_cv_header_security_pam_appl_h = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SECURITY_PAM_APPL_H 1
+_ACEOF
+
+    ac_pam_header_available=1
+fi
+
+
+
+  if test -z "$ac_pam_header_available"; then
+  if test "${ac_cv_header_pam_pam_appl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for pam/pam_appl.h" >&5
+echo $ECHO_N "checking for pam/pam_appl.h... $ECHO_C" >&6
+if test "${ac_cv_header_pam_pam_appl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_pam_pam_appl_h" >&5
+echo "${ECHO_T}$ac_cv_header_pam_pam_appl_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking pam/pam_appl.h usability" >&5
+echo $ECHO_N "checking pam/pam_appl.h usability... $ECHO_C" >&6
+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
+#include <pam/pam_appl.h>
+_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_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+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
+
+# Is the header present?
+echo "$as_me:$LINENO: checking pam/pam_appl.h presence" >&5
+echo $ECHO_N "checking pam/pam_appl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pam/pam_appl.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=$?
+  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
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+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:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h: accepted by the compiler, 
rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: pam/pam_appl.h: accepted by the compiler, rejected by 
the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h: proceeding with the 
compiler's result" >&5
+echo "$as_me: WARNING: pam/pam_appl.h: proceeding with the compiler's result" 
>&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h: present but cannot be 
compiled" >&5
+echo "$as_me: WARNING: pam/pam_appl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h:     check for missing 
prerequisite headers?" >&5
+echo "$as_me: WARNING: pam/pam_appl.h:     check for missing prerequisite 
headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h: see the Autoconf 
documentation" >&5
+echo "$as_me: WARNING: pam/pam_appl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h:     section \"Present But 
Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: pam/pam_appl.h:     section \"Present But Cannot Be 
Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h: proceeding with the 
preprocessor's result" >&5
+echo "$as_me: WARNING: pam/pam_appl.h: proceeding with the preprocessor's 
result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: pam/pam_appl.h: in the future, the 
compiler will take precedence" >&5
+echo "$as_me: WARNING: pam/pam_appl.h: in the future, the compiler will take 
precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to address@hidden ##
+## --------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for pam/pam_appl.h" >&5
+echo $ECHO_N "checking for pam/pam_appl.h... $ECHO_C" >&6
+if test "${ac_cv_header_pam_pam_appl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_pam_pam_appl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_pam_pam_appl_h" >&5
+echo "${ECHO_T}$ac_cv_header_pam_pam_appl_h" >&6
+
+fi
+if test $ac_cv_header_pam_pam_appl_h = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PAM_PAM_APPL_H 1
+_ACEOF
+
+    ac_pam_header_available=1
+fi
+
+
+  fi
+
+  if test -z "$ac_pam_header_available"; then
+    { { echo "$as_me:$LINENO: error: Could not find PAM headers" >&5
+echo "$as_me: error: Could not find PAM headers" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PAM 1
+_ACEOF
+
+    echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
+echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
+if test "${ac_cv_lib_pam_pam_start+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpam  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* 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
+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 pam_start ();
+int
+main ()
+{
+pam_start ();
+  ;
+  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_lib_pam_pam_start=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pam_pam_start=no
+fi
+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_pam_pam_start" >&5
+echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
+if test $ac_cv_lib_pam_pam_start = yes; then
+  LIBS="${LIBS} -lpam"
+else
+  { { echo "$as_me:$LINENO: error: Could not find PAM libraries but the 
headers exist.
+      Give the --disable-pam option to compile without PAM support (or fix
+      your broken configuration)" >&5
+echo "$as_me: error: Could not find PAM libraries but the headers exist.
+      Give the --disable-pam option to compile without PAM support (or fix
+      your broken configuration)" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+
+  fi
+fi
+
+
+
+
+# Check whether --enable-case-sensitivity or --disable-case-sensitivity was 
given.
+if test "${enable_case_sensitivity+set}" = set; then
+  enableval="$enable_case_sensitivity"
+  case "$enable_case_sensitivity" in
+       yes | no | auto) ;;
+       *)
+          { { echo "$as_me:$LINENO: error: Unrecognized argument to 
--enable-case-sensitivity: \`$enable_case_sensitivity'.  Acceptable values are 
\`yes', \`no', and \`auto'." >&5
+echo "$as_me: error: Unrecognized argument to --enable-case-sensitivity: 
\`$enable_case_sensitivity'.  Acceptable values are \`yes', \`no', and 
\`auto'." >&2;}
+   { (exit 1); exit 1; }; }
+          ;;
+     esac
+else
+  enable_case_sensitivity=auto
+fi;
+
+acx_forced=' (forced)'
+echo "$as_me:$LINENO: checking for a case sensitive file system" >&5
+echo $ECHO_N "checking for a case sensitive file system... $ECHO_C" >&6
+if test $enable_case_sensitivity = auto; then
+        if test "${acx_cv_case_sensitive+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+   rm -f ac_TEST_filenames_CASE_sensitive
+    echo foo >ac_test_filenames_case_sensitive
+    if test -f ac_TEST_filenames_CASE_sensitive; then
+      acx_cv_case_sensitive=no
+    else
+      acx_cv_case_sensitive=yes
+    fi
+    rm ac_test_filenames_case_sensitive
+
+fi
+
+  enable_case_sensitivity=$acx_cv_case_sensitive
+  acx_forced=
+fi
+echo "$as_me:$LINENO: result: $enable_case_sensitivity$acx_forced" >&5
+echo "${ECHO_T}$enable_case_sensitivity$acx_forced" >&6
+if test $enable_case_sensitivity = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FILENAMES_CASE_INSENSITIVE 1
+_ACEOF
+
+      case $LIBOBJS in
+    "fncase.$ac_objext"   | \
+  *" fncase.$ac_objext"   | \
+    "fncase.$ac_objext "* | \
+  *" fncase.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS fncase.$ac_objext" ;;
+esac
+
+fi
+
+
+
+
+# Check whether --enable-encryption or --disable-encryption was given.
+if test "${enable_encryption+set}" = set; then
+  enableval="$enable_encryption"
+
+else
+  enable_encryption=no
+fi;
+if test "x$enable_encryption" = xyes; then
+  if test xno = "x$with_client" && test xno = "x$with_server"; then
+    { echo "$as_me:$LINENO: WARNING: --enable-encryption is meaningless when 
neither the CVS client
+       nor the CVS server is enabled (--disable-client and --disable-server)." 
>&5
+echo "$as_me: WARNING: --enable-encryption is meaningless when neither the CVS 
client
+       nor the CVS server is enabled (--disable-client and --disable-server)." 
>&2;}
+  else
+
+cat >>confdefs.h <<\_ACEOF
+#define ENCRYPTION 1
+_ACEOF
+
+  fi
+fi
+
+
+
+
+# Check whether --enable-force-editor or --disable-force-editor was given.
+if test "${enable_force_editor+set}" = set; then
+  enableval="$enable_force_editor"
+
+else
+  enable_force_editor=no
+fi;
+
+if test yes = "$enable_force_editor"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define FORCE_USE_EDITOR 1
+_ACEOF
+
+fi
+
+
+
+
+# Check for options requesting client and server feature. If none are
+# given and we have connect(), we want the full client & server arrangement.
+# Check whether --enable-lock-compatibility or --disable-lock-compatibility 
was given.
+if test "${enable_lock_compatibility+set}" = set; then
+  enableval="$enable_lock_compatibility"
+
+else
+  enable_lock_compatibility=yes
+fi;
+
+if test x$enable_lock_compatibility = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define LOCK_COMPATIBILITY 1
+_ACEOF
+
+fi
+
+
+
+
+# Check whether --enable-rootcommit or --disable-rootcommit was given.
+if test "${enable_rootcommit+set}" = set; then
+  enableval="$enable_rootcommit"
+
+else
+  enable_rootcommit=no
+fi;
+if test "$enable_rootcommit" = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define CVS_BADROOT 1
+_ACEOF
+
+fi
+
+
+# Check whether --enable-old-info-support or --disable-old-info-support was 
given.
+if test "${enable_old_info_support+set}" = set; then
+  enableval="$enable_old_info_support"
+
+else
+  enable_old_info_format_support=yes
+fi;
+if test "$enable_old_info_format_support" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SUPPORT_OLD_INFO_FMT_STRINGS 1
+_ACEOF
+
+fi
+
+
+
+
+# Check whether --enable-config-override or --disable-config-override was 
given.
+if test "${enable_config_override+set}" = set; then
+  enableval="$enable_config_override"
+
+else
+  # $sysconfdir may still contain variable references.  By default, this will
+   # be to $prefix, and $prefix won't be set to its default value until later.
+   # Compromise without setting $prefix for the rest of the file.
+   cvs_save_prefix=$prefix
+   if test "X$prefix" = XNONE; then
+     prefix=$ac_prefix_default
+   fi
+   eval enable_config_override=`echo $sysconfdir/cvs.conf,$sysconfdir/cvs/`
+   prefix=$cvs_save_prefix
+fi;
+
+if test x"$enable_config_override" = xyes; then
+  enable_config_override=/
+fi
+
+if test x"$enable_config_override" = xno; then :; else
+  save_IFS=$IFS
+  IFS=,
+  arrayinit=""
+  for path in $enable_config_override; do
+    IFS=$save_IFS
+    case "$path" in
+      [\\/$]* | ?:[\\/]* )
+       arrayinit="$arrayinit\"$path\", "
+       ;;
+      *)  { { echo "$as_me:$LINENO: error: expected comma separated list of 
absolute directory
+           names for --enable-config-override, or \`no', not:
+           \`$enable_config_override'
+           (\`$path' invalid.)" >&5
+echo "$as_me: error: expected comma separated list of absolute directory
+           names for --enable-config-override, or \`no', not:
+           \`$enable_config_override'
+           (\`$path' invalid.)" >&2;}
+   { (exit 1); exit 1; }; };;
+    esac
+  done
+  arrayinit="${arrayinit}NULL"
+
+
+cat >>confdefs.h <<_ACEOF
+#define ALLOW_CONFIG_OVERRIDE $arrayinit
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for cygwin32" >&5
+echo $ECHO_N "checking for cygwin32... $ECHO_C" >&6
+if test "${ccvs_cv_sys_cygwin32+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.  */
+
+int
+main ()
+{
+return __CYGWIN32__;
+  ;
+  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
+  ccvs_cv_sys_cygwin32=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ccvs_cv_sys_cygwin32=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ccvs_cv_sys_cygwin32" >&5
+echo "${ECHO_T}$ccvs_cv_sys_cygwin32" >&6
+if test $ccvs_cv_sys_cygwin32 = yes; then
+  LIBS="$LIBS -ladvapi32"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define UTIME_EXPECTS_WRITABLE 1
+_ACEOF
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_SETMODE_STDOUT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETMODE 1
+_ACEOF
+
+fi
+
+          ac_config_files="$ac_config_files contrib/clmerge:contrib/clmerge.pl"
+
+          ac_config_files="$ac_config_files 
contrib/cln_hist:contrib/cln_hist.pl"
+
+          ac_config_files="$ac_config_files 
contrib/commit_prep:contrib/commit_prep.pl"
+
+          ac_config_files="$ac_config_files 
contrib/cvs_acls:contrib/cvs_acls.pl"
+
+          ac_config_files="$ac_config_files 
contrib/log_accum:contrib/log_accum.pl"
+
+          ac_config_files="$ac_config_files contrib/log:contrib/log.pl"
+
+          ac_config_files="$ac_config_files contrib/mfpipe:contrib/mfpipe.pl"
+
+          ac_config_files="$ac_config_files 
contrib/pvcs2rcs:contrib/pvcs2rcs.pl"
+
+          ac_config_files="$ac_config_files contrib/rcs2log:contrib/rcs2log.sh"
+
+          ac_config_files="$ac_config_files contrib/rcslock:contrib/rcslock.pl"
+
+          ac_config_files="$ac_config_files contrib/sccs2rcs"
+
+          ac_config_files="$ac_config_files 
contrib/validate_repo:contrib/validate_repo.pl"
+
+          ac_config_files="$ac_config_files doc/mkman:doc/mkman.pl"
+
+          ac_config_files="$ac_config_files src/cvsbug"
+
+
+                                                                               
                                                                                
                                         ac_config_files="$ac_config_files 
Makefile contrib/Makefile contrib/pam/Makefile cvs.spec diff/Makefile 
doc/Makefile doc/i18n/Makefile doc/i18n/pt_BR/Makefile emx/Makefile 
lib/Makefile maint-aux/Makefile man/Makefile os2/Makefile src/Makefile 
src/sanity.config.sh tools/Makefile vms/Makefile windows-NT/Makefile 
windows-NT/SCC/Makefile zlib/Makefile"
+
+
+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
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# 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 overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `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"
+      ;;
+    *)
+      # `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"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+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
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# 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[        ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:address@hidden@:*/:/;
+s/^\([^=]*=[    ]*\):*/\1/;
+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
+
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; 
then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never 
defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never 
defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never 
defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${MAKE_TARGETS_IN_VPATH_TRUE}" && test -z 
"${MAKE_TARGETS_IN_VPATH_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAKE_TARGETS_IN_VPATH\" was 
never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAKE_TARGETS_IN_VPATH\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; 
then
+  { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never 
defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# 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.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+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
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# 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=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$0" : 'X\(//\)$' \| \
+        X"$0" : 'X\(/\)$' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+         /^X\/\(\/\/\)$/{ s//\1/; q; }
+         /^X\/\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; 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 conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  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"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an 
absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+        case $as_dir in
+        /*)
+          if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  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+"$@"}
+          fi;;
+        esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a 
POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" 
>&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='     ' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+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="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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS="  $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Concurrent Versions System (CVS) $as_me 1.12.13.1, 
which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+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
+  --header=FILE[:TEMPLATE]
+                  instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <address@hidden>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Concurrent Versions System (CVS) config.status 1.12.13.1
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+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
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    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 $ac_option in
+  # Handling of the options.
+_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)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $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
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  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
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+    # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+    # from automake.
+    eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+    # Capture the value of LINGUAS because we need it to compute CATALOGS.
+    LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "contrib/clmerge" ) CONFIG_FILES="$CONFIG_FILES 
contrib/clmerge:contrib/clmerge.pl" ;;
+  "contrib/cln_hist" ) CONFIG_FILES="$CONFIG_FILES 
contrib/cln_hist:contrib/cln_hist.pl" ;;
+  "contrib/commit_prep" ) CONFIG_FILES="$CONFIG_FILES 
contrib/commit_prep:contrib/commit_prep.pl" ;;
+  "contrib/cvs_acls" ) CONFIG_FILES="$CONFIG_FILES 
contrib/cvs_acls:contrib/cvs_acls.pl" ;;
+  "contrib/log_accum" ) CONFIG_FILES="$CONFIG_FILES 
contrib/log_accum:contrib/log_accum.pl" ;;
+  "contrib/log" ) CONFIG_FILES="$CONFIG_FILES contrib/log:contrib/log.pl" ;;
+  "contrib/mfpipe" ) CONFIG_FILES="$CONFIG_FILES 
contrib/mfpipe:contrib/mfpipe.pl" ;;
+  "contrib/pvcs2rcs" ) CONFIG_FILES="$CONFIG_FILES 
contrib/pvcs2rcs:contrib/pvcs2rcs.pl" ;;
+  "contrib/rcs2log" ) CONFIG_FILES="$CONFIG_FILES 
contrib/rcs2log:contrib/rcs2log.sh" ;;
+  "contrib/rcslock" ) CONFIG_FILES="$CONFIG_FILES 
contrib/rcslock:contrib/rcslock.pl" ;;
+  "contrib/sccs2rcs" ) CONFIG_FILES="$CONFIG_FILES contrib/sccs2rcs" ;;
+  "contrib/validate_repo" ) CONFIG_FILES="$CONFIG_FILES 
contrib/validate_repo:contrib/validate_repo.pl" ;;
+  "doc/mkman" ) CONFIG_FILES="$CONFIG_FILES doc/mkman:doc/mkman.pl" ;;
+  "src/cvsbug" ) CONFIG_FILES="$CONFIG_FILES src/cvsbug" ;;
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
+  "contrib/pam/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/pam/Makefile" ;;
+  "cvs.spec" ) CONFIG_FILES="$CONFIG_FILES cvs.spec" ;;
+  "diff/Makefile" ) CONFIG_FILES="$CONFIG_FILES diff/Makefile" ;;
+  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+  "doc/i18n/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/i18n/Makefile" ;;
+  "doc/i18n/pt_BR/Makefile" ) CONFIG_FILES="$CONFIG_FILES 
doc/i18n/pt_BR/Makefile" ;;
+  "emx/Makefile" ) CONFIG_FILES="$CONFIG_FILES emx/Makefile" ;;
+  "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+  "maint-aux/Makefile" ) CONFIG_FILES="$CONFIG_FILES maint-aux/Makefile" ;;
+  "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+  "os2/Makefile" ) CONFIG_FILES="$CONFIG_FILES os2/Makefile" ;;
+  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+  "src/sanity.config.sh" ) CONFIG_FILES="$CONFIG_FILES src/sanity.config.sh" ;;
+  "tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
+  "vms/Makefile" ) CONFIG_FILES="$CONFIG_FILES vms/Makefile" ;;
+  "windows-NT/Makefile" ) CONFIG_FILES="$CONFIG_FILES windows-NT/Makefile" ;;
+  "windows-NT/SCC/Makefile" ) CONFIG_FILES="$CONFIG_FILES 
windows-NT/SCC/Makefile" ;;
+  "zlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES zlib/Makefile" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  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 ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@CYGPATH_W@,$CYGPATH_W,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@mkdir_p@,$mkdir_p,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
+s,@ac_prefix_program@,$ac_prefix_program,;t t
+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LN_S@,$LN_S,;t t
+s,@PERL@,$PERL,;t t
+s,@CSH@,$CSH,;t t
+s,@MKTEMP@,$MKTEMP,;t t
+s,@SENDMAIL@,$SENDMAIL,;t t
+s,@PR@,$PR,;t t
+s,@GPG@,$GPG,;t t
+s,@ROFF@,$ROFF,;t t
+s,@PS2PDF@,$PS2PDF,;t t
+s,@TEXI2DVI@,$TEXI2DVI,;t t
+s,@MAKE_TARGETS_IN_VPATH_TRUE@,$MAKE_TARGETS_IN_VPATH_TRUE,;t t
+s,@MAKE_TARGETS_IN_VPATH_FALSE@,$MAKE_TARGETS_IN_VPATH_FALSE,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@GL_COND_LIBTOOL_TRUE@,$GL_COND_LIBTOOL_TRUE,;t t
+s,@GL_COND_LIBTOOL_FALSE@,$GL_COND_LIBTOOL_FALSE,;t t
+s,@ALLOCA@,$ALLOCA,;t t
+s,@ALLOCA_H@,$ALLOCA_H,;t t
+s,@STDBOOL_H@,$STDBOOL_H,;t t
+s,@HAVE__BOOL@,$HAVE__BOOL,;t t
+s,@FNMATCH_H@,$FNMATCH_H,;t t
+s,@YACC@,$YACC,;t t
+s,@YFLAGS@,$YFLAGS,;t t
+s,@LIB_CLOCK_GETTIME@,$LIB_CLOCK_GETTIME,;t t
+s,@GETOPT_H@,$GETOPT_H,;t t
+s,@GLOB_H@,$GLOB_H,;t t
+s,@LIB_NANOSLEEP@,$LIB_NANOSLEEP,;t t
+s,@HAVE_LONG_64BIT@,$HAVE_LONG_64BIT,;t t
+s,@HAVE_LONG_LONG_64BIT@,$HAVE_LONG_LONG_64BIT,;t t
+s,@STDINT_H@,$STDINT_H,;t t
+s,@EOVERFLOW@,$EOVERFLOW,;t t
+s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
+s,@USE_NLS@,$USE_NLS,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@XGETTEXT@,$XGETTEXT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@INTL_MACOSX_LIBS@,$INTL_MACOSX_LIBS,;t t
+s,@LIBICONV@,$LIBICONV,;t t
+s,@LTLIBICONV@,$LTLIBICONV,;t t
+s,@INTLLIBS@,$INTLLIBS,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LTLIBINTL@,$LTLIBINTL,;t t
+s,@POSUB@,$POSUB,;t t
+s,@cvs_client_objects@,$cvs_client_objects,;t t
+s,@KRB4@,$KRB4,;t t
+s,@ZLIB_SUBDIRS@,$ZLIB_SUBDIRS,;t t
+s,@ZLIB_CPPFLAGS@,$ZLIB_CPPFLAGS,;t t
+s,@ZLIB_LIBS@,$ZLIB_LIBS,;t t
+s,@with_default_rsh@,$with_default_rsh,;t t
+s,@RSH_DFLT@,$RSH_DFLT,;t t
+s,@EDITOR@,$EDITOR,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+/@MKTEMP_SH_FUNCTION@/r $MKTEMP_SH_FUNCTION
+s,@MKTEMP_SH_FUNCTION@,,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (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"
+      else
+       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
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+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,:.*,,'` ;;
+  *:* ) ac_file_in=`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 ||
+echo X"$ac_file" |
+    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
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# 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
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                    sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      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
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        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
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+  # Run the commands associated with the file.
+  case $ac_file in
+    contrib/clmerge ) chmod +x contrib/clmerge ;;
+    contrib/cln_hist ) chmod +x contrib/cln_hist ;;
+    contrib/commit_prep ) chmod +x contrib/commit_prep ;;
+    contrib/cvs_acls ) chmod +x contrib/cvs_acls ;;
+    contrib/log_accum ) chmod +x contrib/log_accum ;;
+    contrib/log ) chmod +x contrib/log ;;
+    contrib/mfpipe ) chmod +x contrib/mfpipe ;;
+    contrib/pvcs2rcs ) chmod +x contrib/pvcs2rcs ;;
+    contrib/rcs2log ) chmod +x contrib/rcs2log ;;
+    contrib/rcslock ) chmod +x contrib/rcslock ;;
+    contrib/sccs2rcs ) chmod +x contrib/sccs2rcs ;;
+    contrib/validate_repo ) chmod +x contrib/validate_repo ;;
+    doc/mkman ) chmod +x doc/mkman ;;
+    src/cvsbug ) chmod +x src/cvsbug ;;
+  esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# 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_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+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,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      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
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        # 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
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+        fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+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
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# 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]*,/* & */,
+_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 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
+while grep . conftest.defines >/dev/null
+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
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs 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 #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+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
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; 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 ||
+echo X"$ac_file" |
+    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; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(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 ||
+echo X$ac_file |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  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 ||
+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
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# 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
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$mf" : 'X\(//\)[^/]' \| \
+        X"$mf" : 'X\(//\)$' \| \
+        X"$mf" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+         /^X\(\/\/\)$/{ s//\1/; q; }
+         /^X\(\/\).*/{ s//\1/; q; }
+         s/.*/./; q'`
+  else
+    continue
+  fi
+  # Extract the definition of DEPDIR, am__include, and am__quote
+  # from the Makefile without running `make'.
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
+  test -z "am__include" && continue
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n 's/^U = //p' < "$mf"`
+  # Find all dependency output files, they are included files with
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
+  # simplest approach to changing $(DEPDIR) to its actual value in the
+  # expansion.
+  for file in `sed -n "
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$file" : 'X\(//\)[^/]' \| \
+        X"$file" : 'X\(//\)$' \| \
+        X"$file" : 'X\(/\)' \| \
+        .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    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 $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    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 
$dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+    default-1 )
+    for ac_file in $CONFIG_FILES; do
+      # Support "outfile[:infile[:infile...]]"
+      case "$ac_file" in
+        *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+      esac
+      # PO directories have a Makefile.in generated from Makefile.in.in.
+      case "$ac_file" in */Makefile.in)
+        # Adjust a relative srcdir.
+        ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+        ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+        ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+        # In autoconf-2.13 it is called $ac_given_srcdir.
+        # In autoconf-2.50 it is called $srcdir.
+        test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+        case "$ac_given_srcdir" in
+          .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+          /*) top_srcdir="$ac_given_srcdir" ;;
+          *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+        esac
+        # Treat a directory as a PO directory if and only if it has a
+        # POTFILES.in file. This allows packages to have multiple PO
+        # directories under different names or in different locations.
+        if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+          rm -f "$ac_dir/POTFILES"
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo 
"creating $ac_dir/POTFILES"
+          cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  
]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > 
"$ac_dir/POTFILES"
+          POMAKEFILEDEPS="POTFILES.in"
+          # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+          # on $ac_dir but don't depend on user-specified configuration
+          # parameters.
+          if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+            # The LINGUAS file contains the set of available languages.
+            if test -n "$OBSOLETE_ALL_LINGUAS"; then
+              test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in 
configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is 
obsolete"
+            fi
+            ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" 
"$ac_given_srcdir/$ac_dir/LINGUAS"`
+            # Hide the ALL_LINGUAS assigment from automake.
+            eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+            POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+          else
+            # The set of available languages was given in configure.in.
+            eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+          fi
+          # Compute POFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+          # Compute UPDATEPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+          # Compute DUMMYPOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+          # Compute GMOFILES
+          # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+          case "$ac_given_srcdir" in
+            .) srcdirpre= ;;
+            *) srcdirpre='$(srcdir)/' ;;
+          esac
+          POFILES=
+          UPDATEPOFILES=
+          DUMMYPOFILES=
+          GMOFILES=
+          for lang in $ALL_LINGUAS; do
+            POFILES="$POFILES $srcdirpre$lang.po"
+            UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+            DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+            GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+          done
+          # CATALOGS depends on both $ac_dir and the user's LINGUAS
+          # environment variable.
+          INST_LINGUAS=
+          if test -n "$ALL_LINGUAS"; then
+            for presentlang in $ALL_LINGUAS; do
+              useit=no
+              if test "%UNSET%" != "$LINGUAS"; then
+                desiredlanguages="$LINGUAS"
+              else
+                desiredlanguages="$ALL_LINGUAS"
+              fi
+              for desiredlang in $desiredlanguages; do
+                # Use the presentlang catalog if desiredlang is
+                #   a. equal to presentlang, or
+                #   b. a variant of presentlang (because in this case,
+                #      presentlang can be used as a fallback for messages
+                #      which are not translated in the desiredlang catalog).
+                case "$desiredlang" in
+                  "$presentlang"*) useit=yes;;
+                esac
+              done
+              if test $useit = yes; then
+                INST_LINGUAS="$INST_LINGUAS $presentlang"
+              fi
+            done
+          fi
+          CATALOGS=
+          if test -n "$INST_LINGUAS"; then
+            for lang in $INST_LINGUAS; do
+              CATALOGS="$CATALOGS $lang.gmo"
+            done
+          fi
+          test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo 
"creating $ac_dir/Makefile"
+          sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r 
$ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e 
"s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e 
"s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e 
"s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > 
"$ac_dir/Makefile"
+          for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+            if test -f "$f"; then
+              case "$f" in
+                *.orig | *.bak | *~) ;;
+                *) cat "$f" >> "$ac_dir/Makefile" ;;
+              esac
+            fi
+          done
+        fi
+        ;;
+      esac
+    done ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# 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_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.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+
+
+# Report the state of this version of CVS if this is from dev.
+    cat <<EOF
+
+You are about to use an unreleased version of CVS.  Be sure to
+read the relevant mailing lists, most importantly <address@hidden>.
+
+Below you will find information on the status of this version of CVS.
+
+
+EOF
+    sed -n '/^\* Status/,$p' $srcdir/BUGS
+
Index: ccvs/configure.in
diff -u /dev/null ccvs/configure.in:1.362.6.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/configure.in   Wed Dec 21 13:25:08 2005
@@ -0,0 +1,1633 @@
+dnl configure.in for cvs
+
+AC_COPYRIGHT(
+[Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+              1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+              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
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program 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.])
+
+AC_INIT([Concurrent Versions System (CVS)],[1.12.13.1],
+       address@hidden,[cvs])
+AC_CONFIG_SRCDIR(src/cvs.h)
+AC_CONFIG_AUX_DIR(build-aux)
+AM_INIT_AUTOMAKE([gnu 1.9.2 dist-bzip2 no-define])
+AC_PREREQ(2.59)
+
+AC_PREFIX_PROGRAM(cvs)
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+dnl This needs to be called to enable certain system extensions before calling
+dnl a C compiler.
+gl_EARLY
+
+AC_PROG_CC
+AM_PROG_CC_C_O
+
+# Find the posix library needed on INTERACTIVE UNIX (ISC)
+dnl
+dnl From the Autoconf 2.53 manual (AC_ISC_POSIX):
+dnl
+dnl  For INTERACTIVE UNIX (ISC), add `-lcposix' to output variable
+dnl  `LIBS' if necessary for POSIX facilities.  Call this after
+dnl  `AC_PROG_CC' and before any other macros that use POSIX
+dnl  interfaces.  INTERACTIVE UNIX is no longer sold, and Sun says that
+dnl  they will drop support for it on 2006-07-23, so this macro is
+dnl  becoming obsolescent.
+dnl
+AC_SEARCH_LIBS([strerror], [cposix])
+
+dnl
+dnl Autoconf stopped setting $ISC sometime before 2.53
+dnl
+dnl If this is still important, someone should come up with a generic test
+dnl for whether _SYSV3 needs to be defined.  Removed code below:
+dnl
+dnl if test "$ISC" = yes; then
+dnl CFLAGS="$CFLAGS -D_SYSV3"
+dnl # And I don't like this...  In theory it should be found later if server is
+dnl # enabled, but maybe something on INTERACTIVE UNIX (ISC) we didn't ask to
+dnl # link with crypt tries?  Anyhow, the autoconf manual says we can delete
+dnl # this ISC stuff on or after 2006-07-23 when Sun discontinues support and
+dnl # ISC becomes obsolescent, but I suppose that is probably a matter of
+dnl # opinion.
+dnl #
+dnl # N.B.  The reason for doing this is that some moron decided to put a stub
+dnl # for crypt in libc that always returns NULL.  Without this here, the later
+dnl # check will find the stub instead of the real thing, resulting in a server
+dnl # that can't process crypted passwords correctly.
+dnl
+dnl # again, if we have to try and reenable this for ISC, someone should come
+dnl # up with a generic test that figures out whether crypt is good or not -
+dnl # Is it always returning NULL?
+dnl LIBS="-lcrypt $LIBS"
+dnl fi
+dnl
+dnl FIXME - This has been broken for at least a few months anyhow, so I'm
+dnl removing the crypt lib define above, but the correct fix would be to
+dnl provide a CRYPT_WORKS macro or the like that gets called sometime after
+dnl the AC_SEARCH_LIBS call that normally finds crypt, and if crypt doesn't
+dnl work, the macro should be retried with LIBS="-lcrypt $LIBS" forced.
+dnl
+
+AC_PROG_RANLIB
+AC_PROG_LN_S
+AC_SYS_LARGEFILE
+AC_EXEEXT
+
+AC_PATH_PROG(PERL, perl, no)
+AC_PATH_PROG(CSH, csh, no)
+# for contrib/rcs2log.sh & src/cvsbug.in.
+AC_PATH_PROG(MKTEMP, mktemp, mktemp)
+if test x"$MKTEMP" = xmktemp; then
+       MKTEMP_SH_FUNCTION=$srcdir/mktemp.sh
+else
+       MKTEMP_SH_FUNCTION=/dev/null
+fi
+AC_SUBST_FILE(MKTEMP_SH_FUNCTION)
+# for src/cvsbug.in
+AC_PATH_PROG(SENDMAIL, sendmail, no, [$PATH:/usr/sbin:/usr/lib])
+# For diff/util.c
+AC_PATH_PROG(PR, pr, no)
+if test x"$PR" != xno; then
+       AC_DEFINE_UNQUOTED([PR_PROGRAM], ["$PR"], [Path to the pr utility])
+fi
+# For src/gpg.c
+AC_PATH_PROG(GPG, gpg, gpg)
+if test x"$GPG" != xgpg; then
+  # The GPG on at least one of my FreeBSD 4.11 test systems fails to run
+  # because libintl is missing.
+  if $GPG --version >/dev/null 2>&1; then :; else
+    # GPG is broken.  Pretend it isn't there.
+    AC_MSG_WARN([GPG is installed as \`$GPG', but is broken.  Ignoring it.])
+    GPG=gpg
+  fi
+fi
+if test x"$GPG" != xgpg; then
+  AC_DEFINE([HAVE_OPENPGP], [1],
+           [Define if an OpenPGP capable program is available (and, assumedly,
+            usable command line templates are in the DEFAULT_SIGN_TEMPLATE and
+            DEFAULT_VERIFY_TEMPLATE macros).])
+fi
+dnl These are defined by configure so that if the above is ever expanded to
+dnl look for OpenPGP capable programs other than `gpg', the default templates
+dnl can also be detected and substituted here.
+AC_DEFINE_UNQUOTED([DEFAULT_SIGN_TEMPLATE],
+                  ["$GPG --detach-sign --output - %t %a -- %s"],
+                  [Define to a command line template that will write an
+                   OpenPGP signature for the file `%s' to its standard out.
+                   `%t' is substituted at run time with an option which flags
+                   files as text files, when necessary, and the empty string,
+                   otherwise.  `%a' is substituted with a list of arguments
+                   provided by the user.])
+AC_DEFINE([DEFAULT_SIGN_TEXTMODE], ["--textmode"],
+         [Define to the option string that the OpenPGP program used in the
+          DEFAULT_SIGN_TEMPLATE would like to see for text files (substituted
+          at run time in place of `%t' in the DEFAULT_SIGN_TEMPLATE).])
+
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+dnl FIXME I pulled this default list from sanity.sh.  Perhaps these lists
+dnl can be stored in one location?
+dnl
+dnl Yeah, put the value in a variable add it to the substitution list
+dnl then have configure create sanity.sh from sanity.sh.in...
+glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin"
+AC_PATH_PROGS(ROFF, groff roff, $missing_dir/missing roff, $glocs)
+AC_PATH_PROG(PS2PDF, ps2pdf, $missing_dir/missing ps2pdf)
+AC_PATH_PROG(TEXI2DVI, texi2dvi, $missing_dir/missing texi2dvi)
+
+AC_SYS_INTERPRETER
+if test X"$ac_cv_sys_interpreter" != X"yes" ; then
+  # silly trick to avoid problems in AC macros...
+  ac_msg='perl scripts using #! may not be invoked properly'
+  AC_MSG_WARN($ac_msg)
+fi
+
+# BSD's logo is a devil for a reason, hey?
+AC_CACHE_CHECK(for BSD VPATH bug in make, ccvs_cv_bsd_make_vpath_bug,
+[if test ! -d ac_test_dir ; then
+       AC_TRY_COMMAND([mkdir ac_test_dir])
+fi
+cat >conftestmake <<EOF
+VPATH = ac_test_dir
+ac_test_target: ac_test_dep
+       echo BSD VPATH bug present >&2
+ac_test_dep: ac_test_dep_dep
+EOF
+touch ac_test_dir/ac_test_dep_dep
+touch ac_test_dir/ac_test_dep
+touch ac_test_target
+# Don't know why, but the following test doesn't work under FreeBSD 4.2
+# without this sleep command
+sleep 1
+if AC_TRY_COMMAND([make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ 
bug\ present\$ >/dev/null]) ; then
+       ccvs_cv_bsd_make_vpath_bug=yes
+else
+       ccvs_cv_bsd_make_vpath_bug=no
+fi
+AC_TRY_COMMAND([rm -rf ac_test_dir ac_test_target conftestmake])])
+# We also don't need to worry about the bug when $srcdir = $builddir
+AM_CONDITIONAL(MAKE_TARGETS_IN_VPATH, \
+               test $ccvs_cv_bsd_make_vpath_bug = no \
+               || test $srcdir = .)
+
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS(\
+       direct.h \
+       fcntl.h \
+       io.h \
+       memory.h \
+       ndbm.h \
+       stdint.h \
+       syslog.h \
+       sys/bsdtypes.h \
+       sys/file.h \
+       sys/param.h \
+       sys/resource.h \
+       sys/select.h \
+       utime.h\
+)
+AC_HEADER_STAT
+
+AC_C_CONST
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_PID_T
+AC_TYPE_SIGNAL
+
+AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+
+AC_FUNC_FSEEKO
+if test $ac_cv_func_fseeko = no; then
+    AC_LIBOBJ(fseeko)
+    AC_LIBOBJ(ftello)
+fi
+
+# Replace functions with versions in lib/ when they can't be found.
+AC_REPLACE_FUNCS(\
+       waitpid \
+)
+
+#
+# Special hack for a SunOS 5.7 (aka Solaris 7) select() problem.
+#
+ccvs_FUNC_SELECT
+
+#
+# Begin GNULIB stuff.
+#
+
+# Look for functions from GNULIB and replace with versions in lib/ when
+# necessary.
+dnl This calls most of the GNULIB macros we need via the
+dnl autogenerated m4/gnulib.m4.
+gl_INIT
+dnl For one reason or another, the autogenerated m4/gnulib.m4 wants
+dnl AM_GNU_GETTEXT([external]) called directly from here.
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION dnl work around for autoconf-2.57 bug.
+# The error module still poses merge problems.
+AC_FUNC_STRERROR_R
+dnl The following macros can be called by other GNULIB macros but are also
+dnl used by the UNIQUE_*_TYPE stuff below.  I don't want to rely on the GNULIB
+dnl macros which call these to continue to do so, so use AC_REQUIRE, which can
+dnl only be called from within another macro, to only call them only once.
+AC_DEFUN([CCVS_CALL_GNULIB_MACROS_ONCE],
+[AC_REQUIRE([gt_TYPE_LONGDOUBLE])
+AC_REQUIRE([gt_TYPE_WCHAR_T])
+AC_REQUIRE([gt_TYPE_WINT_T])
+AC_REQUIRE([gl_AC_TYPE_INTMAX_T])
+AC_REQUIRE([gl_FUNC_MMAP_ANON])
+AC_REQUIRE([gl_AC_TYPE_LONG_LONG])])
+CCVS_CALL_GNULIB_MACROS_ONCE()
+dnl Until I persuade the GNULIB folks to integrate this module.
+gl_GLOB
+
+#
+# End GNULIB stuff.
+#
+
+
+
+# Check for function existance.
+AC_CHECK_FUNCS(\
+       fchdir \
+       fchmod \
+       fsync \
+       ftime \
+       geteuid \
+       getgroups \
+       getpagesize \
+       gettimeofday \
+       initgroups \
+       login \
+       logout \
+       mknod \
+       regcomp \
+       regerror \
+       regexec \
+       regfree \
+       sigaction \
+       sigblock \
+       sigprocmask \
+       sigsetmask \
+       sigvec \
+       timezone \
+       tzset \
+       vprintf \
+       wait3 \
+)
+
+dnl
+dnl Find the sizes of various types and set a variable for some if they
+dnl are "unique", meaning it does not share a size with a lower precedence
+dnl type.
+dnl
+dnl also, I snagged this cross_compiling line from openldap's autoconf,
+dnl because I can't figure out how to stop autoconf from giving cross compiler
+dnl related warnings each time the AC_CHECK_SIZEOF function is run
+dnl
+if test $cross_compiling = yes ; then
+       AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
+else
+       AC_CHECK_SIZEOF(char)
+       AC_CACHE_CHECK(for uniquely sized char,
+               ccvs_cv_unique_int_type_char,
+               [if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_char)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_char=no
+               else
+                       ccvs_cv_unique_int_type_char=yes\($ac_cv_sizeof_char\)
+               fi])
+       if test $ccvs_cv_unique_int_type_char != no ; then
+               AC_DEFINE( UNIQUE_INT_TYPE_CHAR, 1,
+                           [Define if char is the first integer type
+                           detected with its size.])
+       fi
+       AC_CHECK_SIZEOF(short)
+       AC_CACHE_CHECK(for uniquely sized short,
+               ccvs_cv_unique_int_type_short,
+               [if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_short)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_short=no
+               else
+                       ccvs_cv_unique_int_type_short=yes\($ac_cv_sizeof_short\)
+               fi])
+       if test $ccvs_cv_unique_int_type_short != no ; then
+               AC_DEFINE( UNIQUE_INT_TYPE_SHORT, 1,
+                           [Define if short is the first integer type
+                           detected with its size.])
+       fi
+       AC_CHECK_SIZEOF(int)
+       AC_CACHE_CHECK(for uniquely sized int,
+               ccvs_cv_unique_int_type_int,
+               [if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_int)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_int=no
+               else
+                       ccvs_cv_unique_int_type_int=yes\($ac_cv_sizeof_int\)
+               fi])
+       if test $ccvs_cv_unique_int_type_int != no ; then
+               AC_DEFINE( UNIQUE_INT_TYPE_INT, 1,
+                           [Define if int is the first integer type
+                           detected with its size.])
+       fi
+       AC_CHECK_SIZEOF(long)
+       AC_CACHE_CHECK(for uniquely sized long,
+               ccvs_cv_unique_int_type_long,
+               [if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_long)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_long=no
+               else
+                       ccvs_cv_unique_int_type_long=yes\($ac_cv_sizeof_long\)
+               fi])
+       if test $ccvs_cv_unique_int_type_long != no ; then
+               AC_DEFINE(UNIQUE_INT_TYPE_LONG, 1,
+                          [Define if long int is the first integer type
+                          detected with its size.])
+       fi
+       if test $ac_cv_type_long_long != no; then
+               AC_CHECK_SIZEOF(long long)
+               AC_CACHE_CHECK(for uniquely sized long long,
+                       ccvs_cv_unique_int_type_long_long,
+                       [if set |grep ^ccvs_cv_unique_int_type_ \
+                               |grep "($ac_cv_sizeof_long_long)" >/dev/null ; 
then
+                               ccvs_cv_unique_int_type_long_long=no
+                       else
+                               
ccvs_cv_unique_int_type_long_long=yes\($ac_cv_sizeof_long_long\)
+                       fi])
+               if test $ccvs_cv_unique_int_type_long_long != no ; then
+                       AC_DEFINE(UNIQUE_INT_TYPE_LONG_LONG, 1,
+                                 [Define if long long is the first integer type
+                                  detected with its size.])
+               fi
+       fi
+       AC_CHECK_SIZEOF(size_t)
+       AC_CACHE_CHECK(for uniquely sized size_t,
+               ccvs_cv_unique_int_type_size_t,
+               [if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_size_t)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_size_t=no
+               else
+                       
ccvs_cv_unique_int_type_size_t=yes\($ac_cv_sizeof_size_t\)
+               fi])
+       if test $ccvs_cv_unique_int_type_size_t != no ; then
+               AC_DEFINE(UNIQUE_INT_TYPE_SIZE_T, 1,
+                          [Define if size_t is the first integer type
+                          detected with its size.])
+       fi
+       AC_CHECK_SIZEOF(ptrdiff_t)
+       AC_CACHE_CHECK(for uniquely sized ptrdiff_t,
+               ccvs_cv_unique_int_type_ptrdiff_t,
+               [if set |grep ^ccvs_cv_unique_int_type_ \
+                       |grep "($ac_cv_sizeof_ptrdiff_t)" >/dev/null ; then
+                       ccvs_cv_unique_int_type_ptrdiff_t=no
+               else
+                       
ccvs_cv_unique_int_type_ptrdiff_t=yes\($ac_cv_sizeof_ptrdiff_t\)
+               fi])
+       if test $ccvs_cv_unique_int_type_ptrdiff_t != no ; then
+               AC_DEFINE(UNIQUE_INT_TYPE_PTRDIFF_T, 1,
+                          [Define if ptrdiff_t is the first integer type
+                          detected with its size.])
+       fi
+       if test $gt_cv_c_wint_t != no; then
+               AC_CHECK_SIZEOF(wint_t, [], [[#include <stdio.h>
+#include <wchar.h>
+]])
+               AC_CACHE_CHECK(for uniquely sized wint_t,
+                       ccvs_cv_unique_int_type_wint_t,
+                       [if set |grep ^ccvs_cv_unique_int_type_ \
+                               |grep "($ac_cv_sizeof_wint_t)" >/dev/null ; then
+                               ccvs_cv_unique_int_type_wint_t=no
+                       else
+                               
ccvs_cv_unique_int_type_wint_t=yes\($ac_cv_sizeof_wint_t\)
+                       fi])
+               if test $ccvs_cv_unique_int_type_wint_t != no ; then
+                       AC_DEFINE( UNIQUE_INT_TYPE_WINT_T, 1,
+                                  [Define if wint_t is the first integer type
+                                   detected with its size.])
+               fi
+       fi
+       if test $gt_cv_c_intmax_t != no; then
+               AC_CHECK_SIZEOF(intmax_t, [], [[#include <stdio.h>
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#else
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#endif
+]])
+               AC_CACHE_CHECK(for uniquely sized intmax_t,
+                       ccvs_cv_unique_int_type_intmax_t,
+                       [if set |grep ^ccvs_cv_unique_int_type_ \
+                               |grep "($ac_cv_sizeof_intmax_t)" >/dev/null ; 
then
+                               ccvs_cv_unique_int_type_intmax_t=no
+                       else
+                               
ccvs_cv_unique_int_type_intmax_t=yes\($ac_cv_sizeof_intmax_t\)
+                       fi])
+               if test $ccvs_cv_unique_int_type_intmax_t != no ; then
+                       AC_DEFINE( UNIQUE_INT_TYPE_INTMAX_T, 1,
+                                  [Define if intmax_t is the first integer type
+                                   detected with its size.])
+               fi
+       fi
+
+       dnl
+       dnl and the same for floats...
+       dnl
+       AC_CHECK_SIZEOF(float)
+       AC_CACHE_CHECK(for uniquely sized float,
+               ccvs_cv_unique_float_type_float,
+               [if set |grep ^ccvs_cv_unique_float_type_ \
+                       |grep "($ac_cv_sizeof_float)" >/dev/null ; then
+                       ccvs_cv_unique_float_type_float=no
+               else
+                       
ccvs_cv_unique_float_type_float=yes\($ac_cv_sizeof_float\)
+               fi])
+       if test $ccvs_cv_unique_float_type_float != no ; then
+               AC_DEFINE( UNIQUE_FLOAT_TYPE_FLOAT, 1,
+                           [Define if float is the first floating point type
+                           detected with its size.])
+       fi
+       AC_CHECK_SIZEOF(double)
+       AC_CACHE_CHECK(for uniquely sized double,
+               ccvs_cv_unique_float_type_double,
+               [if set |grep ^ccvs_cv_unique_float_type_ \
+                       |grep "($ac_cv_sizeof_double)" >/dev/null ; then
+                       ccvs_cv_unique_float_type_double=no
+               else
+                       
ccvs_cv_unique_float_type_double=yes\($ac_cv_sizeof_double\)
+               fi])
+       if test $ccvs_cv_unique_float_type_double != no ; then
+               AC_DEFINE( UNIQUE_FLOAT_TYPE_DOUBLE, 1,
+                           [Define if double is the first floating point type
+                           detected with its size.])
+       fi
+       if test $gt_cv_c_long_double != no; then
+               AC_CHECK_SIZEOF(long double)
+               AC_CACHE_CHECK(for uniquely sized long double,
+                       ccvs_cv_unique_float_type_long_double,
+                       [if set |grep ^ccvs_cv_unique_float_type_ \
+                               |grep "($ac_cv_sizeof_long_double)" >/dev/null 
; then
+                               ccvs_cv_unique_float_type_long_double=no
+                       else
+                               
ccvs_cv_unique_float_type_long_double=yes\($ac_cv_sizeof_long_double\)
+                       fi])
+               if test $ccvs_cv_unique_float_type_long_double != no ; then
+                       AC_DEFINE(UNIQUE_FLOAT_TYPE_LONG_DOUBLE, 1,
+                                 [Define if long double is the first floating 
point
+                                  type detected with its size.])
+               fi
+       fi
+fi
+
+dnl
+dnl The CVS coding standard (as specified in HACKING) is that if it exists
+dnl in SunOS4 and ANSI, we use it.  CVS itself, of course, therefore doesn't
+dnl need HAVE_* defines for such functions, but diff wants them.
+dnl
+AC_DEFINE(HAVE_STRCHR, 1,
+[Define if you have strchr (always for CVS).])
+AC_DEFINE(HAVE_MEMCHR, 1,
+[Define if you have memchr (always for CVS).])
+
+dnl
+dnl Force lib/regex.c to use malloc instead of messing around with alloca
+dnl and define the old re_comp routines that we use.
+dnl
+AC_DEFINE(REGEX_MALLOC, 1,
+[Define to force lib/regex.c to use malloc instead of alloca.])
+AC_DEFINE(_REGEX_RE_COMP, 1,
+[Define to force lib/regex.c to define re_comp et al.])
+dnl
+dnl AC_FUNC_FORK([]) is rather baroque.  It seems to be rather more picky
+dnl than, say, the Single Unix Specification (version 2), which simplifies
+dnl a lot of cases by saying that the child process can't set any variables
+dnl (thus avoiding problems with register allocation) or call any functions
+dnl (thus avoiding problems with whether file descriptors are shared).
+dnl It would be nice if we could just write to the Single Unix Specification.
+dnl I think the only way to do redirection this way is by doing it in the
+dnl parent, and then undoing it afterwards (analogous to windows-NT/run.c).
+dnl That would appear to have a race condition if the user hits ^C (or
+dnl some other signal) at the wrong time, as main_cleanup will try to use
+dnl stdout/stderr.  So maybe we are stuck with AC_FUNC_FORK([]).
+dnl
+AC_FUNC_FORK([])
+AC_FUNC_CLOSEDIR_VOID
+
+dnl
+dnl Check for shadow password support.
+dnl
+dnl We used to try to determine whether shadow passwords were actually in
+dnl use or not, but the code has been changed to work right reguardless,
+dnl so we can go back to a simple check.
+AC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM, 1,
+[Define if you have the getspnam function.]))
+
+AC_FUNC_UTIME_NULL
+AC_SYS_LONG_FILE_NAMES
+
+dnl for debugging code
+CVS_FUNC_PRINTF_PTR
+
+# Try to find connect and gethostbyname.
+AC_CHECK_LIB(nsl, main)
+AC_SEARCH_LIBS(connect, xnet socket inet,
+  AC_DEFINE(HAVE_CONNECT, 1,
+[Define if you have the connect function.]))
+dnl no need to search nsl for gethostbyname here since we should have
+dnl just added libnsl above if we found it.
+AC_SEARCH_LIBS(gethostbyname, netinet)
+
+AC_SUBST(cvs_client_objects)
+
+
+dnl
+dnl begin --with-*
+dnl
+
+dnl
+dnl set $(KRB4) from --with-krb4=value -- WITH_KRB4
+dnl
+dnl If you change this, keep in mind that some systems have a bogus
+dnl libkrb in the system libraries, so --with-krb4=value needs to
+dnl override the system -lkrb.
+dnl
+KRB4=/usr/kerberos
+define(WITH_KRB4,[
+AC_ARG_WITH(
+  [krb4],
+  AC_HELP_STRING(
+    [--with-krb4],
+    [Kerberos 4 directory (default /usr/kerberos)]),
+  [KRB4=$with_krb4],
+)dnl
+AC_MSG_CHECKING([for KRB4 in $KRB4])
+AC_MSG_RESULT([])
+AC_SUBST(KRB4)])dnl
+WITH_KRB4
+
+krb_h=
+AC_MSG_CHECKING([for krb.h])
+if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
+   hold_cflags=$CFLAGS
+   CFLAGS="$CFLAGS -I$KRB4/include"
+   AC_TRY_LINK([#include <krb.h>],[int i;],
+          [krb_h=yes krb_incdir=$KRB4/include],
+          [CFLAGS=$hold_cflags
+           AC_TRY_LINK([#include <krb.h>],[int i;],
+             [krb_h=yes krb_incdir=])])
+   CFLAGS=$hold_cflags
+else
+   AC_TRY_LINK([#include <krb.h>],[int i;],
+             [krb_h=yes krb_incdir=])
+fi
+if test -z "$krb_h"; then
+  AC_TRY_LINK([#include <krb.h>],[int i;],
+    [krb_h=yes krb_incdir=],
+    [if test "$cross_compiling" != yes && test -r 
$KRB4/include/kerberosIV/krb.h; then
+       hold_cflags=$CFLAGS
+       CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
+       AC_TRY_LINK([#include <krb.h>],[int i;],
+        [krb_h=yes krb_incdir=$KRB4/include/kerberosIV])
+       CFLAGS=$hold_cflags
+     fi])
+fi
+AC_MSG_RESULT($krb_h)
+
+if test -n "$krb_h"; then
+  krb_lib=
+  if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
+       hold_ldflags=$LDFLAGS
+       LDFLAGS="-L${KRB4}/lib $LDFLAGS"
+       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=${KRB4}/lib],
+           [LDFLAGS=$hold_ldflags
+            # Using open here instead of printf so we don't
+            # get confused by the cached value for printf from above.
+            AC_CHECK_LIB(krb,open,[krb_lib=yes krb_libdir=])])
+       LDFLAGS=$hold_ldflags
+  else
+       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=])
+       AC_CHECK_FUNC(krb_recvauth,[krb_lib=yes krb_libdir=])
+  fi
+  if test -n "$krb_lib"; then
+    AC_DEFINE([HAVE_KERBEROS], 1,
+             [Define if you have MIT Kerberos version 4 available.])
+    cvs_client_objects="$cvs_client_objects kerberos4-client.o"
+    test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
+    # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
+    # -ldes in the command line.  Don't do it permanently so that we honor
+    # the user's setting for LDFLAGS
+    hold_ldflags=$LDFLAGS
+    test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
+    AC_CHECK_LIB(des,printf,[LIBS="${LIBS} -ldes"])
+    AC_CHECK_LIB(krb,krb_recvauth)
+    AC_CHECK_LIB(krb4,krb_recvauth)
+    LDFLAGS=$hold_ldflags
+    if test -n "$krb_incdir"; then
+      CPPFLAGS="$CPPFLAGS -I$krb_incdir"
+    fi
+  fi
+fi
+AC_CHECK_FUNCS(krb_get_err_text)
+
+
+dnl
+dnl WITH_GSSAPI is external
+dnl
+dnl TODO - I tried to put these in alphabetical order, but ACX_WITH_GSSAPI
+dnl fails unless called after the KRB4 stuff.  I don't know why.
+dnl
+ACX_WITH_GSSAPI
+
+dnl
+dnl WITH_EXTERNAL_ZLIB is external
+dnl
+ACX_WITH_EXTERNAL_ZLIB
+
+dnl
+dnl begin --with-rsh
+dnl
+dnl Many sites no longer desire the use of "rsh" as the default
+dnl remote shell program. They typically favor "ssh" as the default
+
+# What remote shell transport should our client cvs default to using?
+AC_ARG_WITH(
+  [rsh],
+  AC_HELP_STRING(
+    [--with-rsh],
+    [The default remote shell CVS will use for :ext: transport
+     (default ssh)]), ,
+  [with_rsh="ssh rsh"])
+
+if test no = "$with_rsh"; then
+  AC_MSG_WARN([Failed to find usable remote shell. Using 'rsh'.])
+  with_rsh=rsh
+elif test yes = "$with_rsh"; then
+  # Make --with-rsh mean the same thing as --with-rsh=rsh
+  with_rsh=rsh
+fi
+
+if echo $with_rsh |grep ^/ >/dev/null; then
+  # If $with_rsh is an absolute path, issue a warning if the executable
+  # doesn't exist or isn't usable, but then trust the user and use it
+  # regardless
+  with_default_rsh=$with_rsh
+  AC_MSG_CHECKING([for a remote shell])
+  if ! test -f $with_rsh \
+      || ! test -x $with_rsh; then
+    # warn the user that they may encounter problems
+    AC_MSG_WARN([$with_rsh is not a path to an executable file])
+  fi
+else
+  # Search for a remote shell
+  AC_CHECK_PROGS([with_default_rsh], [$with_rsh], "rsh")
+fi
+
+AC_DEFINE_UNQUOTED(
+  [RSH_DFLT], ["$with_default_rsh"],
+  [The default remote shell to use, if one does not specify the
+   CVS_RSH environment variable.])
+RSH_DFLT=$with_default_rsh
+AC_SUBST(RSH_DFLT)
+dnl done with finding a default CVS_RSH value
+dnl
+dnl end --with-rsh
+dnl
+
+dnl
+dnl begin --with-editor
+dnl
+dnl Set the default editor to use for log messages
+dnl
+
+AC_ARG_VAR(
+  [EDITOR],
+  [The text editor CVS will use by default for log messages.])
+
+# Let the confiscator request a specific editor
+AC_ARG_WITH(
+  [editor],
+  AC_HELP_STRING(
+    [--with-editor],
+    [The default text editor CVS should use for log messages
+     (default autoselects)]), ,
+  [with_editor=yes])
+
+# If --with-editor was supplied with an argument, let it override $EDITOR from
+# the user's environment.  We need to unset EDITOR here because AC_CHECK_PROGS
+# will let the value of EDITOR ride when it is set rather than searching.  We
+# ignore the --without-editor case since it will be caught below.
+if test -n "$EDITOR" && test yes != $with_editor; then
+  AS_UNSET([EDITOR])
+fi
+
+# Set the default when --with-editor wasn't supplied or when it was supplied
+# without an argument.
+if test yes = $with_editor; then
+  with_editor="vim vi emacs nano pico edit"
+fi
+
+if echo $with_editor |grep ^/ >/dev/null; then
+  # If $with_editor is an absolute path, issue a warning if the executable
+  # doesn't exist or isn't usable, but then trust the user and use it
+  # regardless
+  EDITOR=$with_editor
+  AC_MSG_CHECKING([for an editor])
+  AC_MSG_RESULT([$EDITOR])
+  if ! test -f $with_editor \
+      || ! test -x $with_editor; then
+    # warn the user that they may encounter problems
+    AC_MSG_WARN([\`$with_editor' is not a path to an executable file])
+  fi
+elif test no != "${with_editor}"; then
+  # Search for an editor
+  AC_CHECK_PROGS([EDITOR], [$with_editor], [no])
+    if test no = "${EDITOR}"; then
+      AC_MSG_ERROR([
+    Failed to find a text file editor.  CVS cannot be compiled
+    without a default log message editor.  Searched for
+    \`$with_editor'.  Try \`configure --with-editor'.])
+    fi
+else
+  AC_MSG_ERROR([
+    CVS cannot be compiled without a default log message editor.
+    Try \`configure --with-editor'.])
+fi
+
+dnl FIXME - Using --without-editor will probably break a compile at
+dnl the moment, but maybe it is reasonable for someone to want to
+dnl compile a CVS executable that refuses to run if no $EDITOR,
+dnl $CVS_EDITOR, or -e option is specified?  Making a preliminary
+dnl design decision in this direction, subject to discussion.
+dnl
+dnl Still don't know if the above would be useful, but we shouldn't
+dnl be able to get here any longer without $EDITOR defined due to the
+dnl error checking above.
+AC_DEFINE_UNQUOTED(
+  [EDITOR_DFLT], ["$EDITOR"],
+  [The default editor to use, if one does not specify the "-e" option
+   to cvs, or does not have an EDITOR environment variable.  If this
+   is not set to an absolute path to an executable, use the shell to
+   find where the editor actually is.  This allows sites with
+   /usr/bin/vi or /usr/ucb/vi to work equally well (assuming that their
+   PATH is reasonable).])
+
+dnl
+dnl done finding an editor
+dnl
+dnl end --with-editor
+dnl
+
+
+
+dnl
+dnl --with-hardcoded-pam-service-name
+dnl
+AC_ARG_WITH(
+  [hardcoded-pam-service-name],
+  AC_HELP_STRING(
+    [--with-hardcoded-pam-service-name],
+    [Use this to hard code a service name for PAM CVS authentication.  The
+     special name, `program_name', will cause CVS to use whatever name it
+     was invoked as as the service name.  (defaults to `cvs')]),,
+    [with_hardcoded_pam_service_name=cvs])
+
+if test "x$with_hardcoded_pam_service_name" = xno ||
+   test "x$with_hardcoded_pam_service_name" = xprogram_name; then
+  AC_DEFINE([PAM_SERVICE_NAME], [program_name],
+    [Define to set a service name for PAM.  This must be defined.  Define to
+     `program_name', without the quotes, to use whatever name CVS was invoked
+      as.  Otherwise, define to a double-quoted literal string, such as
+      `"cvs"'.])
+else
+  if test x"$with_hardcoded_pam_service_name" = xyes; then
+    with_hardcoded_pam_service_name=cvs
+  fi
+  AC_DEFINE_UNQUOTED([PAM_SERVICE_NAME], ["$with_hardcoded_pam_service_name"])
+fi
+
+
+
+dnl
+dnl Find a temporary directory
+dnl
+AC_ARG_WITH(
+  [tmpdir],
+  AC_HELP_STRING(
+    [--with-tmpdir],
+    [The temporary directory CVS should use as a default
+     (default autoselects)]))
+
+AC_MSG_CHECKING([for temporary directory])
+if test -z "$with_tmpdir" || test yes = "$with_tmpdir"; then
+  for with_tmpdir in /tmp /var/tmp no; do
+    if test -d "$with_tmpdir" && test -x "$with_tmpdir" \
+        && test -w "$with_tmpdir" && test -r "$with_tmpdir"; then
+      break
+    fi
+  done
+  if test no = "$with_tmpdir"; then
+    AC_MSG_WARN([Failed to find usable temporary directory.  Using '/tmp'.])
+    with_tmpdir=/tmp
+  fi
+  AC_MSG_RESULT([$with_tmpdir])
+elif ! echo "$with_tmpdir" |grep '^[[\\/]]'; then
+  AC_MSG_RESULT([$with_tmpdir])
+  AC_MSG_ERROR([--with-tmpdir requires an absolute path.])
+elif ! test -d "$with_tmpdir" || ! test -x "$with_tmpdir" \
+        || ! test -w "$with_tmpdir" || ! test -r "$with_tmpdir"; then
+  AC_MSG_RESULT([$with_tmpdir])
+  AC_MSG_WARN(
+    [User supplied temporary directory ('$with_tmpdir') does not
+     exist or lacks sufficient permissions for read/write.])
+fi
+
+AC_DEFINE_UNQUOTED(
+  [TMPDIR_DFLT], ["$with_tmpdir"],
+  [Directory used for storing temporary files, if not overridden by
+   environment variables or the -T global option.  There should be little
+   need to change this (-T is a better mechanism if you need to use a
+   different directory for temporary files).])
+
+dnl
+dnl done finding tmpdir
+dnl
+
+
+dnl
+dnl Get default umask
+dnl
+
+AC_ARG_WITH(
+  [umask],
+  AC_HELP_STRING(
+    [--with-umask],
+    [Set the umask CVS will use by default in the repository (default 002)]))
+
+if test -z "$with_umask" || test yes = "$with_umask"; then
+  with_umask=002
+elif test no = "$with_umask"; then
+  with_umask=000
+fi
+
+AC_DEFINE_UNQUOTED(
+  [UMASK_DFLT], [$with_umask],
+  [The default umask to use when creating or otherwise setting file or
+   directory permissions in the repository.  Must be a value in the
+   range of 0 through 0777.  For example, a value of 002 allows group
+   rwx access and world rx access; a value of 007 allows group rwx
+   access but no world access.  This value is overridden by the value
+   of the CVSUMASK environment variable, which is interpreted as an
+   octal number.])
+
+dnl
+dnl Done setting default umask
+dnl
+
+dnl
+dnl Set CVS Administrator Group
+dnl
+AC_ARG_WITH(
+  [cvs-admin-group],
+  AC_HELP_STRING(
+    [--with-cvs-admin-group=GROUP],
+    [The CVS admin command is restricted to the members of this group.
+     If this group does not exist, all users are allowed to run CVS admin.
+     To disable the CVS admin command for all users, create an empty group
+     by specifying the --with-cvs-admin-group= option.  To disable access
+     control for CVS admin, run configure with the --without-cvs-admin-group
+     option. (default 'cvsadmin')]), ,
+  [with_cvs_admin_group=cvsadmin])
+
+if test yes = "$with_cvs_admin_group"; then
+  with_cvs_admin_group=cvsadmin
+fi
+if test no != "$with_cvs_admin_group"; then
+  dnl FIXME We should warn if the group doesn't exist
+  AC_DEFINE_UNQUOTED(
+    [CVS_ADMIN_GROUP], ["$with_cvs_admin_group"],
+    [The CVS admin command is restricted to the members of the group
+     CVS_ADMIN_GROUP.  If this group does not exist, all users are
+     allowed to run CVS admin.  To disable the CVS admin command for
+     all users, create an empty CVS_ADMIN_GROUP by running configure
+     with the --with-cvs-admin-group= option.  To disable access control
+     for CVS admin, run configure with the --without-cvs-admin-group
+     option in order to comment out the define below.])
+fi
+
+dnl
+dnl Done setting CVS Administrator Group
+dnl
+
+dnl
+dnl Set the NDBM library to use.
+dnl
+dnl XXX - FIXME - FIXME - FIXME - XXX
+dnl
+dnl This is very bad.  It should really autodetect an appropriate NDBM library
+dnl and, if it doesn't find one, decide to use MY_NDBM.  I'm am defining
+dnl this here since this is no worse than it worked when it was in options.h
+dnl and I am cleaning out options.h so that the Windows version of CVS will
+dnl compile properly for the next release.
+dnl
+dnl That's why this option is in the --with-* section rather than the
+dnl --enable-* section.
+dnl
+dnl XXX - FIXME - FIXME - FIXME - XXX
+dnl
+AC_ARG_ENABLE(
+  [cvs-ndbm],
+  AC_HELP_STRING(
+    [--enable-cvs-ndbm],
+    [Use the NDBM library distributed with CVS rather than attempting to use
+     a system NDBM library.  Disabling this may not work.  (default)]), ,
+  [enable_cvs_ndbm=yes])
+if test no != "$enable_cvs_ndbm"; then
+  AC_DEFINE(
+    [MY_NDBM], [1],
+    [By default, CVS stores its modules and other such items in flat
+     text files (MY_NDBM enables this).  Turning off MY_NDBM causes CVS
+     to look for a system-supplied ndbm database library and use it
+     instead.  That may speed things up, but the default setting
+     generally works fine too.])
+fi
+
+dnl
+dnl Done selecting NDBM library.
+dnl
+
+
+
+dnl
+dnl end --with-*
+dnl
+
+
+dnl
+dnl begin --enables
+dnl
+
+
+dnl
+dnl begin --enable-client
+dnl
+
+# Check for options requesting client and server feature. If none are
+# given and we have connect(), we want the full client & server arrangement.
+AC_ARG_ENABLE(
+  [client],
+  AC_HELP_STRING(
+    [--enable-client],
+    [Include code for running as a remote client (default)]), ,
+  [enable_client=$ac_cv_search_connect])
+if test no != "$enable_client"; then
+  AC_DEFINE(
+    [CLIENT_SUPPORT], [1],
+    [Define if you want CVS to be able to be a remote repository client.])
+fi
+
+dnl
+dnl end --enable-client
+dnl
+
+
+dnl
+dnl begin --enable-password-authenticated-client
+dnl
+AC_ARG_ENABLE(
+  [password-authenticated-client],
+  AC_HELP_STRING(
+    [--enable-password-authenticated-client],
+    [Enable pserver as a remote access method in the CVS client
+     (default)]), ,
+  [enable_password_authenticated_client=$enable_client])
+
+if test xno != "x$enable_password_authenticated_client"; then
+  if test xno != "x$enable_client"; then
+    AC_DEFINE(
+      [AUTH_CLIENT_SUPPORT], [1],
+      [Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access
+       method in the CVS client (default)])
+  else
+    AC_MSG_WARN(
+      [--enable-password-authenticated-client is meaningless with
+       the CVS client disabled (--disable-client)])
+  fi
+fi
+
+dnl
+dnl begin --enable-password-authenticated-client
+dnl
+
+
+dnl
+dnl begin --enable-server
+dnl
+
+dnl
+dnl Give the confiscator control over whether the server code is compiled
+dnl
+AC_ARG_ENABLE(
+  [server],
+  AC_HELP_STRING(
+    [--enable-server],
+    [Include code for running as a server (default)]), ,
+  [enable_server=$ac_cv_search_connect])
+
+if test no != "$enable_server"; then
+  AC_DEFINE(
+    [SERVER_SUPPORT], [1],
+    [Define if you want CVS to be able to serve repositories to remote
+     clients.])
+
+  dnl
+  dnl The auth server needs to be able to check passwords against passwd
+  dnl file entries, so we only #define AUTH_SERVER_SUPPORT if we can
+  dnl find the crypt function. 
+  dnl
+  AC_SEARCH_LIBS(
+    [crypt], [crypt],
+    [AC_DEFINE(
+       [HAVE_CRYPT], [1],
+       [Define if you have the crypt function.])
+     AC_DEFINE(
+       [AUTH_SERVER_SUPPORT], [1],
+       [Define if you want to use the password authenticated server.])dnl
+  ])dnl AC_SEARCH_LIBS
+
+  dnl
+  dnl Allow the configurer to enable server flowcontrol.  Read the help
+  dnl strings below for a full explanation.
+  dnl
+  AC_ARG_ENABLE(
+    [server-flow-control],
+    AC_HELP_STRING(
+      [--enable-server-flow-control],
+      [If you are working with a large remote repository and a 'cvs
+       checkout' is swamping your network and memory, define these to
+       enable flow control.  You may optionally pass a low water mark
+       in bytes and a high water mark in bytes, separated by commas.
+       (default is enabled 1M,2M)]),
+    [if test yes = $enable_server_flow_control; then
+       enable_server_flow_control=1M,2M
+     fi],
+    [enable_server_flow_control=1M,2M])
+  if test no != $enable_server_flow_control; then
+    ccvs_lwm=`expr "$enable_server_flow_control" : '\(.*\),'`
+    ccvs_hwm=`expr "$enable_server_flow_control" : '.*,\(.*\)'`
+    ccvs_lwm_E=`expr "$ccvs_lwm" : '[[0-9]][[0-9]]*\(.*\)'`
+    ccvs_lwm=`expr "$ccvs_lwm" : '\([[0-9]][[0-9]]*\)'`
+    test "" != "$ccvs_lwm" || ccvs_lwm_E="?"
+    case $ccvs_lwm_E in
+        G) ccvs_lwm="$ccvs_lwm * 1024 * 1024 * 1024";;
+        M) ccvs_lwm="$ccvs_lwm * 1024 * 1024";;
+        k) ccvs_lwm="$ccvs_lwm * 1024";;
+        b | '') ;;
+        *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control
+                        ('$enable_server_flow_control') as <lwm>,<hwm>])
+      esac
+    ccvs_hwm_E=`expr "$ccvs_hwm" : '[[0-9]][[0-9]]*\(.*\)'`
+    ccvs_hwm=`expr "$ccvs_hwm" : '\([[0-9]][[0-9]]*\).*'`
+    test "" != "$ccvs_hwm" || ccvs_hwm_E="?"
+    case $ccvs_hwm_E in
+        G) ccvs_hwm="$ccvs_hwm * 1024 * 1024 * 1024";;
+        M) ccvs_hwm="$ccvs_hwm * 1024 * 1024";;
+        k) ccvs_hwm="$ccvs_hwm * 1024";;
+        b | '') ccvs_hwm="$ccvs_hwm";;
+        *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control
+                        ('$enable_server_flow_control') as <lwm>,<hwm>])
+      esac
+
+    AC_DEFINE(
+      [SERVER_FLOWCONTROL], [1],
+      [If you are working with a large remote repository and a 'cvs
+       checkout' is swamping your network and memory, define these to
+       enable flow control.  You will end up with even less probability of
+       a consistent checkout (see Concurrency in cvs.texinfo), but CVS
+       doesn't try to guarantee that anyway.  The master server process
+       will monitor how far it is getting behind, if it reaches the high
+       water mark, it will signal the child process to stop generating
+       data when convenient (ie: no locks are held, currently at the
+       beginning of a new directory).  Once the buffer has drained
+       sufficiently to reach the low water mark, it will be signalled to
+       start again.])
+    AC_DEFINE_UNQUOTED(
+      [SERVER_LO_WATER], [($ccvs_lwm)],
+      [The low water mark in bytes for server flow control.  Required if
+       SERVER_FLOWCONTROL is defined, and useless otherwise.])
+    AC_DEFINE_UNQUOTED(
+      [SERVER_HI_WATER], [($ccvs_hwm)],
+      [The high water mark in bytes for server flow control.  Required if
+       SERVER_FLOWCONTROL is defined, and useless otherwise.])
+  fi # enable_server_flow_control
+fi # enable_server
+
+dnl
+dnl end --enable-server
+dnl
+
+
+dnl
+dnl begin --enable-proxy
+dnl
+
+dnl
+dnl Give the confiscator control over whether the proxy server code is compiled
+dnl
+AC_ARG_ENABLE(
+  [proxy],
+  AC_HELP_STRING(
+    [--enable-proxy],
+    [Include code for running as a transparent proxy server.  Disabling this
+     may produce a slight performance gain on some systems, at the expense of
+     write proxy support. (default)]), ,
+  [if test xno != "x$enable_client" && test xno != "x$enable_server"; then
+     enable_proxy=yes
+   else
+     enable_proxy=no
+   fi])
+
+if test no != "$enable_proxy"; then
+  if test xno = "x$enable_client" || test xno = "x$enable_server"; then
+    AC_MSG_WARN(
+      [--enable-proxy is meaningless when either the CVS client or the
+       CVS server is disabled (--disable-client and --disable-server).])
+  else
+    AC_DEFINE(
+      [PROXY_SUPPORT], [1],
+      [Define if you want CVS to be able to serve as a transparent proxy for
+       write operations.  Disabling this may produce a slight performance gain
+       on some systems, at the expense of write proxy support.])
+  fi
+fi
+dnl
+dnl end --enable-proxy
+dnl
+
+
+dnl
+dnl begin --enable-pam
+dnl
+
+dnl
+dnl Check if PAM authentication is enabled
+dnl
+AC_ARG_ENABLE(
+  [pam],
+  AC_HELP_STRING(
+    [--enable-pam],
+    [Use to enable system authentication with PAM instead of using the 
+    simple getpwnam interface.  This allows authentication (in theory) 
+    with any PAM module, e.g. on systems with shadow passwords or via LDAP]), ,
+  [enable_pam=no]
+  )
+
+if test yes = $enable_pam; then
+  ac_pam_header_available=
+
+  AC_CHECK_HEADER([security/pam_appl.h], [
+    AC_DEFINE([HAVE_SECURITY_PAM_APPL_H], 1, [Define to 1 if 
security/pam_appl.h is available])
+    ac_pam_header_available=1])
+
+  if test -z "$ac_pam_header_available"; then
+  AC_CHECK_HEADER([pam/pam_appl.h], [
+    AC_DEFINE([HAVE_PAM_PAM_APPL_H], 1, [Define to 1 if pam/pam_appl.h is 
available])
+    ac_pam_header_available=1])
+  fi
+
+  if test -z "$ac_pam_header_available"; then
+    AC_MSG_ERROR([Could not find PAM headers])
+  else
+    AC_DEFINE(HAVE_PAM, 1, 
+    [Define to enable system authentication with PAM instead of using the 
+    simple getpwnam interface.  This allows authentication (in theory) 
+    with any PAM module, e.g. on systems with shadow passwords or via LDAP])
+    AC_CHECK_LIB(pam, pam_start, [LIBS="${LIBS} -lpam"],
+      AC_MSG_ERROR([Could not find PAM libraries but the headers exist.
+      Give the --disable-pam option to compile without PAM support (or fix
+      your broken configuration)])
+    )
+  fi
+fi
+
+dnl
+dnl end --enable-pam
+dnl
+
+
+dnl
+dnl begin --enable-case-sensitivity
+dnl
+
+AC_ARG_ENABLE(
+  [case-sensitivity],
+  AC_HELP_STRING(
+    [--enable-case-sensitivity],
+    [Force CVS to expect a case sensitive file system.  Enabling this on a case
+     insensitive system should have little effect on the server or client
+     operation, though client users may ocassionally be suprised that the CVS
+     server appears to be case sensitive.  Disabling this for a case sensitive
+     server disables server support for case insensitive clients, which can
+     confuse all users of case insensitive clients contacting the server.
+     Disabling this for a case sensitive client will cause the client to ask
+     servers to behave case insensitively, which could cause confusion for
+     users, but also probably no real harm.  (default autoselects based on the
+     case sensitivity of the file system containing the current working
+     directory)]),
+    [case "$enable_case_sensitivity" in
+       yes | no | auto) ;;
+       *)
+          AC_MSG_ERROR([Unrecognized argument to --enable-case-sensitivity: 
\`$enable_case_sensitivity'.  Acceptable values are \`yes', \`no', and 
\`auto'.])
+          ;;
+     esac],
+  [enable_case_sensitivity=auto])
+
+acx_forced=' (forced)'
+AC_MSG_CHECKING([for a case sensitive file system])
+if test $enable_case_sensitivity = auto; then
+  dnl
+  dnl Check for a case insensitive filesystem, like Mac OS X and Windows have.
+  dnl
+  AC_CACHE_VAL([acx_cv_case_sensitive],
+  [ rm -f ac_TEST_filenames_CASE_sensitive
+    echo foo >ac_test_filenames_case_sensitive
+    if test -f ac_TEST_filenames_CASE_sensitive; then
+      acx_cv_case_sensitive=no
+    else
+      acx_cv_case_sensitive=yes
+    fi
+    rm ac_test_filenames_case_sensitive
+  ])
+  enable_case_sensitivity=$acx_cv_case_sensitive
+  acx_forced=
+fi
+AC_MSG_RESULT([$enable_case_sensitivity$acx_forced])
+if test $enable_case_sensitivity = no; then
+  AC_DEFINE([FILENAMES_CASE_INSENSITIVE], [1],
+            [Define if this executable will be running on case insensitive
+             file systems.  In the client case, this means that it will request
+             that the server pretend to be case insensitive if it isn't
+             already.])
+  dnl Compile fncase.c (containing fncase() & fncmp()) to handle file name
+  dnl comparisons on case insensitive filesystems.
+  AC_LIBOBJ(fncase)
+fi
+
+dnl
+dnl end --enable-case-sensitivity
+dnl
+
+
+dnl
+dnl begin --enable-encryption
+dnl
+
+dnl
+dnl Use --enable-encryption to turn on encryption support, but ignore this
+dnl option unless either client or server is enabled.
+dnl
+AC_ARG_ENABLE(
+  [encryption],
+  AC_HELP_STRING(
+    [--enable-encryption],
+    [Enable encryption support (disabled by default)]), ,
+  [enable_encryption=no])
+if test "x$enable_encryption" = xyes; then
+  if test xno = "x$with_client" && test xno = "x$with_server"; then
+    AC_MSG_WARN(
+      [--enable-encryption is meaningless when neither the CVS client
+       nor the CVS server is enabled (--disable-client and --disable-server).])
+  else
+    AC_DEFINE(
+      [ENCRYPTION], [1],
+      [Define to enable encryption support.])
+  fi
+fi
+
+dnl
+dnl end --enable-encryption
+dnl
+
+
+dnl
+dnl begin --enable-force-editor
+dnl
+
+AC_ARG_ENABLE(
+  [force-editor],
+  AC_HELP_STRING(
+    [--enable-force-editor],
+    [When committing or importing files, you must enter a log message.
+     Normally, you can do this either via the -m flag on the command
+     line, the -F flag on the command line, or an editor will be started
+     for you.  If you like to use logging templates (the rcsinfo file
+     within the $CVSROOT/CVSROOT directory), you might want to force
+     people to use the editor even if they specify a message with -m or
+     -F.  --enable-force-editor will cause the -m or -F message to be
+     appended to the temp file when the editor is started. (disabled
+     by default)]), ,
+  [enable_force_editor=no])
+
+if test yes = "$enable_force_editor"; then
+  AC_DEFINE(
+    [FORCE_USE_EDITOR], [1],
+    [When committing or importing files, you must enter a log message.
+    Normally, you can do this either via the -m flag on the command
+    line, the -F flag on the command line, or an editor will be started
+    for you.  If you like to use logging templates (the rcsinfo file
+    within the $CVSROOT/CVSROOT directory), you might want to force
+    people to use the editor even if they specify a message with -m or
+    -F.  Enabling FORCE_USE_EDITOR will cause the -m or -F message to be
+    appended to the temp file when the editor is started.])
+fi
+
+dnl
+dnl end --enable-force-editor
+dnl
+
+
+dnl
+dnl begin --enable-lock-compatibility
+dnl
+
+# Check for options requesting client and server feature. If none are
+# given and we have connect(), we want the full client & server arrangement.
+AC_ARG_ENABLE(
+  [lock-compatibility],
+  AC_HELP_STRING(
+    [--enable-lock-compatibility],
+    [Include locking code which prevents versions of CVS earlier than 1.12.4
+     directly accessing the same repositiory as this executable from ignoring
+     this executable's promotable read locks.  If only CVS versions 1.12.4 and
+     later will be accessing your repository directly (as a server or locally),
+     you can safely disable this option in return for fewer disk accesses and a
+     small speed increase.  Disabling this option when versions of CVS earlier
+     than 1,12,4 _will_ be accessing your repository, however, is *VERY* *VERY*
+     *VERY* dangerous and could result in data loss.  (enabled by default)]),,
+  [enable_lock_compatibility=yes])
+
+if test x$enable_lock_compatibility = xyes; then
+  AC_DEFINE([LOCK_COMPATIBILITY], [1],
+    [Define to include locking code which prevents versions of CVS earlier than
+     1.12.4 directly accessing the same repositiory as this executable from
+     ignoring this executable's promotable read locks.  If only CVS versions
+     1.12.4 and later will be accessing your repository directly (as a server
+     or locally), you can safely disable this option in return for fewer disk
+     accesses and a small speed increase.  Disabling this option when versions
+     of CVS earlier than 1,12,4 _will_ be accessing your repository, however,
+     is *VERY* *VERY* *VERY* dangerous and could result in data loss.
+
+     As such, by default, CVS is compiled with this code enabled.  If you are
+     sure you would like this code disabled, you can disable it by passing the
+     "--disable-lock-compatibility" option to configure or by commenting out
+     the lines below.])
+fi
+
+dnl
+dnl end --enable-lock-compatibility
+dnl
+
+
+dnl
+dnl begin --enable-rootcommit
+dnl
+
+dnl
+dnl I don't like this here, but I don't really like options.h, either.
+dnl Besides, this is causing some problems currently when compiling under
+dnl Windows and moving it here should avoid the issue (the wrong options.h
+dnl is being used).
+dnl
+dnl I don't like making this a runtime option either.  I think I just don't
+dnl like making it easy to get to, but putting it here goes along with the
+dnl Autoconf ideal.
+dnl
+AC_ARG_ENABLE(
+  [rootcommit],
+  AC_HELP_STRING(
+    [--enable-rootcommit],
+    [Allow the root user to commit files (disabled by default)]), ,
+  [enable_rootcommit=no])
+if test "$enable_rootcommit" = no; then
+  AC_DEFINE(
+    [CVS_BADROOT], [1],
+    [When committing a permanent change, CVS and RCS make a log entry of
+     who committed the change.  If you are committing the change logged
+     in as "root" (not under "su" or other root-priv giving program),
+     CVS/RCS cannot determine who is actually making the change.
+
+     As such, by default, CVS prohibits changes committed by users
+     logged in as "root".  You can disable checking by passing the
+     "--enable-rootcommit" option to configure or by commenting out the
+     lines below.])
+fi
+
+dnl
+dnl end --enable-rootcommit
+dnl
+
+dnl
+dnl begin --enable-old-info-support
+dnl
+AC_ARG_ENABLE(
+  [old-info-support],
+  AC_HELP_STRING(
+    [--enable-old-info-format-support],
+    [Enable support for the pre 1.12.1 *info scripting hook format strings.
+     Disable this option for a smaller executable once your scripting
+     hooks have been updated to use the new *info format strings (default).]), 
,
+  [enable_old_info_format_support=yes])
+if test "$enable_old_info_format_support" = yes; then
+  AC_DEFINE(
+    [SUPPORT_OLD_INFO_FMT_STRINGS], [1],
+    [Enable support for the pre 1.12.1 *info scripting hook format strings.
+     Disable this option for a smaller executable once your scripting
+     hooks have been updated to use the new *info format strings by passing
+     "--disable-old-info-format-support" option to configure or by commenting
+     out the line below.])
+fi
+
+dnl
+dnl end --enable-old-info-support
+dnl
+
+
+dnl
+dnl begin --enable-config-override
+dnl
+
+AC_ARG_ENABLE(
+  [config-override],
+  AC_HELP_STRING(
+    [--enable-config-override],
+    [Set to a comma-seperated list of paths to directories (designated by
+     trailing `/') and files, specifies the path prefixes (for directories) and
+     paths to files the CVS server commands will allow configuration to be read
+     from.  Specify `--enable-config-override=no' to disable config file
+     overrides completely and `--enable-config-override=/' or simply
+     `--enable-config-override' to allow all paths.  (Defaults to
+     `SYSCONFDIR/cvs.conf,SYSCONFDIR/cvs/')]),,
+  [# $sysconfdir may still contain variable references.  By default, this will
+   # be to $prefix, and $prefix won't be set to its default value until later.
+   # Compromise without setting $prefix for the rest of the file.
+   cvs_save_prefix=$prefix
+   if test "X$prefix" = XNONE; then
+     prefix=$ac_prefix_default
+   fi
+   eval enable_config_override=`echo $sysconfdir/cvs.conf,$sysconfdir/cvs/`
+   prefix=$cvs_save_prefix])
+
+if test x"$enable_config_override" = xyes; then
+  enable_config_override=/
+fi
+
+if test x"$enable_config_override" = xno; then :; else
+  save_IFS=$IFS
+  IFS=,
+  arrayinit=""
+  for path in $enable_config_override; do
+    IFS=$save_IFS
+    case "$path" in
+      [[\\/$]]* | ?:[[\\/]]* )
+       arrayinit="$arrayinit\"$path\", "
+       ;;
+      *)  AC_MSG_ERROR(
+          [expected comma separated list of absolute directory
+           names for --enable-config-override, or \`no', not:
+           \`$enable_config_override'
+           (\`$path' invalid.)]);;
+    esac
+  done
+  arrayinit="${arrayinit}NULL"
+
+  AC_DEFINE_UNQUOTED(ALLOW_CONFIG_OVERRIDE, [$arrayinit],
+    [Define this to a NULL terminated list of allowed path prefixes (for
+     directories) and paths to files the CVS server will allow configuration to
+     be read from when specified from the command line.])
+fi
+
+dnl
+dnl end --enable-config-override
+dnl
+
+
+
+dnl
+dnl end --enables
+dnl
+
+
+
+dnl For the moment we will assume that all systems which have
+dnl the unixyness to run configure are unixy enough to do the
+dnl PreservePermissions stuff.  I have this sinking feeling that
+dnl things won't be that simple, before long.
+dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT, 1,
+dnl [Define if this system supports chown(), link(), and friends.])
+
+dnl On cygwin32, we configure like a Unix system, but we need some support
+dnl libraries.  We do this at the end so that the new libraries are added at
+dnl the end of LIBS.
+dnl
+dnl FIXME: We should be trying to meet the autoconf ideal of checking for
+dnl the properties of the system rather than the name of the os here.  In other
+dnl words, we should check the case sensitivty of the system and then for
+dnl the support functions we are using and which library we find them in.
+AC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32,
+[AC_TRY_COMPILE([], [return __CYGWIN32__;],
+ccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)])
+if test $ccvs_cv_sys_cygwin32 = yes; then
+  LIBS="$LIBS -ladvapi32"
+
+  dnl On Windows you can only change file times if you can write to
+  dnl the file.  cygwin32 should really handle this for us, but as of
+  dnl January 1998 it doesn't.
+  AC_DEFINE(UTIME_EXPECTS_WRITABLE, 1,
+[Define if utime requires write access to the file (true on Windows,
+but not Unix).])
+
+  dnl On Windows we must use setmode to change between binary and text
+  dnl mode.  This probably doesn't really require two macro definitions
+  AC_DEFINE(USE_SETMODE_STDOUT, 1,
+[Define if setmode is required when writing binary data to stdout.])
+  AC_DEFINE(HAVE_SETMODE, 1,
+[Define if the diff library should use setmode for binary files.])
+fi
+
+dnl associate the setting of the execute bit with the individual scripts
+AC_CONFIG_FILES(contrib/clmerge:contrib/clmerge.pl, [chmod +x contrib/clmerge])
+AC_CONFIG_FILES(contrib/cln_hist:contrib/cln_hist.pl,
+               [chmod +x contrib/cln_hist])
+AC_CONFIG_FILES(contrib/commit_prep:contrib/commit_prep.pl,
+               [chmod +x contrib/commit_prep])
+AC_CONFIG_FILES(contrib/cvs_acls:contrib/cvs_acls.pl,
+               [chmod +x contrib/cvs_acls])
+AC_CONFIG_FILES(contrib/log_accum:contrib/log_accum.pl,
+               [chmod +x contrib/log_accum])
+AC_CONFIG_FILES(contrib/log:contrib/log.pl, [chmod +x contrib/log])
+AC_CONFIG_FILES(contrib/mfpipe:contrib/mfpipe.pl, [chmod +x contrib/mfpipe])
+AC_CONFIG_FILES(contrib/pvcs2rcs:contrib/pvcs2rcs.pl,
+               [chmod +x contrib/pvcs2rcs])
+AC_CONFIG_FILES(contrib/rcs2log:contrib/rcs2log.sh, [chmod +x contrib/rcs2log])
+AC_CONFIG_FILES(contrib/rcslock:contrib/rcslock.pl, [chmod +x contrib/rcslock])
+AC_CONFIG_FILES(contrib/sccs2rcs, [chmod +x contrib/sccs2rcs])
+AC_CONFIG_FILES(contrib/validate_repo:contrib/validate_repo.pl,
+               [chmod +x contrib/validate_repo])
+AC_CONFIG_FILES(doc/mkman:doc/mkman.pl, [chmod +x doc/mkman])
+AC_CONFIG_FILES(src/cvsbug, [chmod +x src/cvsbug])
+
+dnl the bulk files
+AC_CONFIG_FILES([Makefile \
+         contrib/Makefile \
+         contrib/pam/Makefile \
+         cvs.spec \
+         diff/Makefile \
+         doc/Makefile \
+         doc/i18n/Makefile \
+         doc/i18n/pt_BR/Makefile \
+         emx/Makefile \
+         lib/Makefile \
+         maint-aux/Makefile \
+         man/Makefile \
+         os2/Makefile \
+         src/Makefile \
+         src/sanity.config.sh \
+         tools/Makefile \
+         vms/Makefile \
+         windows-NT/Makefile \
+         windows-NT/SCC/Makefile \
+         zlib/Makefile])
+
+dnl and we're done
+AC_OUTPUT
+
+
+
+# Report the state of this version of CVS if this is from dev.
+m4_bmatch(m4_defn([AC_PACKAGE_VERSION]),  [[0-9]*\.[0-9]*\.[0-9]*\.[0-9]],
+[    cat <<EOF
+
+You are about to use an unreleased version of CVS.  Be sure to
+read the relevant mailing lists, most importantly <address@hidden>.
+
+Below you will find information on the status of this version of CVS.
+
+
+EOF
+    sed -n '/^\* Status/,$p' $srcdir/BUGS
+])
Index: ccvs/contrib/Makefile.in
diff -u /dev/null ccvs/contrib/Makefile.in:1.120.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/contrib/Makefile.in    Wed Dec 21 13:25:08 2005
@@ -0,0 +1,753 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU CVS contributed sources.
+# Do not use this makefile directly, but only from `../Makefile'.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = contrib
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/clmerge.pl $(srcdir)/cln_hist.pl \
+       $(srcdir)/commit_prep.pl $(srcdir)/cvs_acls.pl \
+       $(srcdir)/log.pl $(srcdir)/log_accum.pl $(srcdir)/mfpipe.pl \
+       $(srcdir)/pvcs2rcs.pl $(srcdir)/rcs2log.sh \
+       $(srcdir)/rcslock.pl $(srcdir)/sccs2rcs.in \
+       $(srcdir)/validate_repo.pl ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = clmerge cln_hist commit_prep cvs_acls log_accum \
+       log mfpipe pvcs2rcs rcs2log rcslock sccs2rcs validate_repo
+am__installdirs = "$(DESTDIR)$(contribdir)" "$(DESTDIR)$(contribdir)"
+contribSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(contrib_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-exec-recursive install-info-recursive \
+       install-recursive installcheck-recursive installdirs-recursive \
+       pdf-recursive ps-recursive uninstall-info-recursive \
+       uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+contribDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(contrib_DATA)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+SUBDIRS = pam
+contribdir = $(pkgdatadir)/contrib
+contrib_SCRIPTS = \
+       clmerge \
+       cln_hist \
+       commit_prep \
+       cvs2vendor \
+       cvs_acls \
+       debug_check_log \
+       log \
+       log_accum \
+       mfpipe \
+       newcvsroot \
+       pvcs2rcs \
+       rcs-to-cvs \
+       rcs2log \
+       rcslock \
+       sandbox_status \
+       sccs2rcs \
+       validate_repo
+
+contrib_DATA = \
+       README \
+       intro.doc \
+       rcs-5.7-commitid.patch
+
+contrib_MANS = \
+       rcs2log.1 \
+       sandbox_status.man
+
+bin_LINKS = \
+       rcs2log
+
+EXTRA_DIST = \
+       .cvsignore \
+       $(contrib_DATA) \
+       $(contrib_MANS) \
+       cvs2vendor.sh \
+       sandbox_status.sh \
+       cvshelp.man \
+       cvs_acls.html \
+       debug_check_log.sh \
+       descend.sh \
+       descend.man \
+       dirfns.shar \
+       newcvsroot.sh \
+       rcs-5.7-commitid.patch \
+       rcs-to-cvs.sh \
+       rcs2log.sh \
+       rcs2sccs.sh
+
+CLEANFILES = $(bin_LINKS) $(contrib_SCRIPTS)
+SUFFIXES = .sh
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .sh
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  contrib/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  contrib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+clmerge: $(top_builddir)/config.status $(srcdir)/clmerge.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+cln_hist: $(top_builddir)/config.status $(srcdir)/cln_hist.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+commit_prep: $(top_builddir)/config.status $(srcdir)/commit_prep.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+cvs_acls: $(top_builddir)/config.status $(srcdir)/cvs_acls.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+log_accum: $(top_builddir)/config.status $(srcdir)/log_accum.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+log: $(top_builddir)/config.status $(srcdir)/log.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+mfpipe: $(top_builddir)/config.status $(srcdir)/mfpipe.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+pvcs2rcs: $(top_builddir)/config.status $(srcdir)/pvcs2rcs.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+rcs2log: $(top_builddir)/config.status $(srcdir)/rcs2log.sh
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+rcslock: $(top_builddir)/config.status $(srcdir)/rcslock.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+sccs2rcs: $(top_builddir)/config.status $(srcdir)/sccs2rcs.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+validate_repo: $(top_builddir)/config.status $(srcdir)/validate_repo.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-contribSCRIPTS: $(contrib_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(contribdir)" || $(mkdir_p) "$(DESTDIR)$(contribdir)"
+       @list='$(contrib_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(contribSCRIPT_INSTALL) '$$d$$p' 
'$(DESTDIR)$(contribdir)/$$f'"; \
+           $(contribSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(contribdir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-contribSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(contrib_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(contribdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(contribdir)/$$f"; \
+       done
+uninstall-info-am:
+install-contribDATA: $(contrib_DATA)
+       @$(NORMAL_INSTALL)
+       test -z "$(contribdir)" || $(mkdir_p) "$(DESTDIR)$(contribdir)"
+       @list='$(contrib_DATA)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(am__strip_dir) \
+         echo " $(contribDATA_INSTALL) '$$d$$p' 
'$(DESTDIR)$(contribdir)/$$f'"; \
+         $(contribDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(contribdir)/$$f"; \
+       done
+
+uninstall-contribDATA:
+       @$(NORMAL_UNINSTALL)
+       @list='$(contrib_DATA)'; for p in $$list; do \
+         f=$(am__strip_dir) \
+         echo " rm -f '$(DESTDIR)$(contribdir)/$$f'"; \
+         rm -f "$(DESTDIR)$(contribdir)/$$f"; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(contribdir)" "$(DESTDIR)$(contribdir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-contribDATA install-contribSCRIPTS \
+       install-data-local
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-contribDATA uninstall-contribSCRIPTS \
+       uninstall-info-am uninstall-local
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+       clean clean-generic clean-recursive ctags ctags-recursive \
+       distclean distclean-generic distclean-recursive distclean-tags \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-contribDATA install-contribSCRIPTS \
+       install-data install-data-am install-data-local install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       maintainer-clean-recursive mostlyclean mostlyclean-generic \
+       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-contribDATA \
+       uninstall-contribSCRIPTS uninstall-info-am uninstall-local
+
+
+# we'd rather have a link here rather than two copies of a script
+install-data-local:
+       : FIXME - this path should be determined dynamically from bindir
+       : and contribdir
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(bindir)
+       @list='$(bin_LINKS)'; for p in $$list; do \
+           echo "test ! -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; 
\
+           echo "  && cd $(DESTDIR)$(bindir) && $(LN_S) 
../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` ."; \
+           (test ! -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'` \
+               && cd $(DESTDIR)$(bindir) && $(LN_S) 
../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` .) \
+             || (echo "Link creation failed" && if test -f $$p; then \
+                  echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo 
$$p|sed '$(transform)'`"; \
+                  $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 
'$(transform)'`; \
+                else if test -f $(srcdir)/$$p; then \
+                  echo " $(INSTALL_SCRIPT) $(srcdir)/$$p 
$(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+                  $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo 
$$p|sed '$(transform)'`; \
+                else :; fi; fi); \
+       done
+
+uninstall-local:
+       @$(NORMAL_UNINSTALL)
+       list='$(bin_LINKS)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+       done
+
+.sh:
+       rm -f $@
+       cp $< $@
+       chmod +x $@
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/contrib/pam/Makefile.in
diff -u /dev/null ccvs/contrib/pam/Makefile.in:1.41.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/contrib/pam/Makefile.in        Wed Dec 21 13:25:08 2005
@@ -0,0 +1,425 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU CVS contributed sample Pluggable Authentication Manager
+# (PAM) configurations.
+#
+# Do not use this makefile directly, but only from `../Makefile'.
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#               1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+#               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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = contrib/pam
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+
+# This program 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.
+EXTRA_DIST = \
+       .cvsignore \
+       cvs.linux \
+       cvs.solaris
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  contrib/pam/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  contrib/pam/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/diff/Makefile.in
diff -u /dev/null ccvs/diff/Makefile.in:1.89.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/diff/Makefile.in       Wed Dec 21 13:25:08 2005
@@ -0,0 +1,528 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = diff
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libdiff_a_AR = $(AR) $(ARFLAGS)
+libdiff_a_LIBADD =
+am_libdiff_a_OBJECTS = diff.$(OBJEXT) diff3.$(OBJEXT) \
+       analyze.$(OBJEXT) cmpbuf.$(OBJEXT) io.$(OBJEXT) \
+       context.$(OBJEXT) ed.$(OBJEXT) normal.$(OBJEXT) \
+       ifdef.$(OBJEXT) util.$(OBJEXT) dir.$(OBJEXT) version.$(OBJEXT) \
+       side.$(OBJEXT)
+libdiff_a_OBJECTS = $(am_libdiff_a_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libdiff_a_SOURCES)
+DIST_SOURCES = $(libdiff_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+INCLUDES = -I$(top_srcdir)/lib -I$(top_builddir)/lib
+noinst_LIBRARIES = libdiff.a
+libdiff_a_SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c \
+        context.c ed.c normal.c ifdef.c util.c dir.c version.c diff.h \
+        side.c system.h diffrun.h
+
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog \
+       build_diff.com \
+       diagmeet.note \
+       libdiff.dep \
+       libdiff.dsp \
+       libdiff.mak
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  diff/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  diff/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libdiff.a: $(libdiff_a_OBJECTS) $(libdiff_a_DEPENDENCIES) 
+       -rm -f libdiff.a
+       $(libdiff_a_AR) libdiff.a $(libdiff_a_OBJECTS) $(libdiff_a_LIBADD)
+       $(RANLIB) libdiff.a
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
+
+.c.o:
address@hidden@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ 
$<; \
address@hidden@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f 
"$(DEPDIR)/$*.Tpo"; exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(COMPILE) -c $<
+
+.c.obj:
address@hidden@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ 
`$(CYGPATH_W) '$<'`; \
address@hidden@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f 
"$(DEPDIR)/$*.Tpo"; exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-noinstLIBRARIES ctags distclean distclean-compile \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-exec install-exec-am install-info \
+       install-info-am install-man install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/doc/ChangeLog
diff -u /dev/null ccvs/doc/ChangeLog:1.944.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/ChangeLog  Wed Dec 21 13:25:08 2005
@@ -0,0 +1,5368 @@
+2005-12-12  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Responses): Add new Base-* & Temp-checkout responses.
+
+2005-10-16  Derek Price  <address@hidden>
+
+       * RCSFILES: Note new openpgp-signatures newphrase.
+
+2005-10-15  Derek Price  <address@hidden>
+
+       * cvs.texinfo (commit options): Move OpenPGP stuff...
+       (Global options): ...here.  Add index entries.
+       (The connection method): Add index entries.
+
+2005-10-11  Derek Price  <address@hidden>
+
+       * cvs.texinfo (The connection method, commit options): Describe new
+       OpenPGP signature related options.
+       * cvsclient.texi (Requests): Describe Signature request.
+
+2005-12-09  Derek Price  <address@hidden>
+
+       [patch #4634]
+       * cvsclient.texi (Root request): Clarify.
+
+2005-11-30  Mark D. Baushke  <address@hidden>
+
+       [bug #14900] Add 'cvs server' handling for --allow-root
+       * cvs.texinfo (Error messages): Add a note about the Bad root
+       error that may arise if --allow-root is used and does not include
+       the directory the cvs client wants to use.
+
+2005-11-15  Derek Price  <address@hidden>
+
+       * cvs.texinfo (release output, update output): Remove references to P.
+
+2005-11-12  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (admin options): Document new --execute and
+       --no-execute options.
+       (Based on CVS patch #4446 from Alex Manoussakis.)
+
+2005-11-10  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Common options): -n no longer applies to commit.
+       (commit): Remove reference to the defunct -n option.
+       * cvs.1, stamp-vti, version.texi: Regenerated
+
+2005-10-12  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Remove text that created unintentional cross-references
+       in generated info files.
+
+2005-10-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (loginfo): Correct typo.  (From Wiki.)
+
+2005-10-04  Derek Price  <address@hidden>
+
+       * cvs.texinfo: s/visa versa/vice versa/.  (From Wiki.)
+
+2005-09-26  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs-paper.ps, cvs-paper.pdf): Remove implicit sources.
+       Add comments about why implicit rules won't work for these targets.
+       Make sure the distributed cvs-paper.pdf is created in $(srcdir).  Make
+       cvs-paper.pdf directly from cvs-paper.ms to avoid building it just
+       because cvs-paper.ps is missing.
+
+       * Makefile.am (EXTRA_DIST): Restore PDFs.
+       * cvs-paper.ps: Removed.
+
+2005-09-25  Derek Price  <address@hidden>
+
+       * Makefile.am (doc): Finish removing PSs.
+
+       * Makefile.am (EXTRA_DIST): Remove PDFs too until errors go away.
+
+       * Makefile.am (EXTRA_DIST): Dist PDFs rather than PSs.
+
+2005-09-22  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (rdiff options): Document -k.
+       * cvs.1, stamp-vti, version.texi: Regenerated.
+
+2005-09-20  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Move summary and detail contents to the front
+       where they belong.
+
+2005-09-14  Derek Price  <address@hidden>
+
+       * Makefile.am: s#cvs.1#$(srcdir)/cvs.1#.
+
+2005-09-12  Derek Price  <address@hidden>
+
+       * Makefile.am (stamp-gdt): Use texinfo, as opposed to C, comments in
+       the automatically generated getdate-cvs.texi file.
+
+2005-09-11  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Common options): Note that -r branch for a revision
+       means the head of the branch.
+
+2005-09-10  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add suggested messages.
+
+2005-09-09  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Error messages): Move out of sync message to correct
+       location and reword.
+       Clean up bad cross reference syntax.
+
+       * cvs.texinfo (Error messages): Add signal 11 message.
+
+2005-09-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (config): Alphabetize list of keys.
+
+       * cvs.texinfo (Global options): Clarify -T description with temporary
+       file path precedence.
+       (config): Shorten TmpDir stuff and reference Global options node.
+       (Environment variables): Ditto for $TMPDIR.  Remove $TMP and $TEMP.  As
+       near as I can tell they are no longer used.
+
+2005-09-05  Derek Price  <address@hidden>
+
+       * cvs.texinfo (config): Mention TmpDir first appeared in 1.12.13.
+
+       * cvs.texinfo (config): Describe new TmpDir option.
+
+2005-09-04  Derek Price  <address@hidden>
+
+       * cvs.texinfo (config): Describe new [cvsroot] syntax.
+
+2005-09-01  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Update links and email addresses.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * cvs.texinfo (CVS commands): Link to new node.
+       (server & pserver): New node.
+       (config): Note configurability of config file path.
+
+2005-08-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (verifymsg): Describe new %{sV} format strings.
+
+2005-08-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (From scratch): Add checkout to import example, from
+       wiki.
+
+2005-08-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Removing directories): Correct grammar, from wiki.
+
+2005-08-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (From scratch): Clarify note on `cvs add', inspired from
+       wiki.
+
+2005-08-22  Derek Price  <address@hidden>
+
+       Address bug #13882, submitted by Fred Maranhao.
+       * cvs.texinfo (log options, admin options, Invoking CVS): Add cross
+       references for clarity about possible states.
+
+2005-08-22  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Updating a file): Add note about update -d, inspired by
+       wiki.
+
+2005-08-12  Derek Price  <address@hidden>
+
+       * cvs.texinfo (What is CVS?): Rephrase for clarity, imported from
+       Wiki.
+
+2005-08-02  Derek Price  <address@hidden>
+
+       * cvs.texinfo (What is CVS?, BUGS): Correct grammar.
+
+2005-07-20  Derek Price  <address@hidden>
+
+       * cvs.man.footer, cvs.texinfo, cvsclient.texi:
+       s/cvshome.org/nongnu.org.etc.../.
+
+2005-06-22  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Builds): Update Gunnar Tornblom's email at his request.
+
+2005-06-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (loginfo, taginfo): Note new `T' format character in 
+       {sTVv} list.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Global options): Note -z *requests* a compression level.
+       (config): Describe MinCompressionLevel and MaxCompressionLevel.
+       * cvsclient.texi (Responses): Add `Force-gzip' request.
+       (Requests): Clarify `Gzip-stream' description.
+
+2005-06-01  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Connecting via rsh):  Cross-reference method options and
+       don't capitalize `remsh' and `ssh' executable names.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * getdate.texi: Update from GNULIB.
+
+2005-05-11  Derek Price  <address@hidden>
+
+       * cvs.texinfo (history, history file, config): Add info on the new
+       HistoryLogPath and HistorySearchPath config options.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Goals): Remove typo.  Resolves cvshome issue #236.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Creating a repository):  Provide xref to the remote
+       repositries section.  Resolves issue #203 on cvshome.org.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Moving directories):  Clarify instructions on renaming a
+       directory.  Partially resolves issue #246 on cvshome.org.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (update output): Use "working directory" in place of
+       "source" for clarity.  Closes issue #245 on cvshome.org.
+
+2005-04-22  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Variables): Document SESSIONID and COMMITID
+       internal variables.
+
+2005-04-18  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Restore getdate-cvs.texi.
+       (DISTCLEAN): Remove same.
+       (getdate-cvs.texi): Move to...
+       ($(srcdir)/getdate-cvs.texi): ...here to avoid rebuild infos at
+       install.
+       (stamp-gdt): Generate $(srcdir)/getdate-cvs.texi.
+
+2005-04-15  Derek Price  <address@hidden>
+
+       * mkman.pl: Minor changes to accomodate Perl 5.8.4.  Improve
+       commenting.
+       ($nk, $ret, $debug): New globals.
+       (debug_print): New function.
+
+2005-04-14  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Administrative files): Rename "script hooks" node as
+       "Trigger Scripts".
+       (script hooks): Rename as...
+       (Trigger Scripts): ...this and add some clarifying text.
+       (Trigger Script Security): New node.
+       (-many *info nodes-): Rewrite to reference to Trigger Script node.
+       Add and/or rewrite index entries and cross-references.
+
+2005-04-07  Derek Price  <address@hidden>
+
+       * Makefile.am: Make $(srcdir)/cvs.info, not cvs.info, dependent on
+       getdate-cvs.texi.
+
+2005-04-07  Derek Price  <address@hidden>
+
+       * Makefile.am (stampt-gdt): Remove dependency on configure.
+
+2005-04-07  Derek Price  <address@hidden>
+
+       * Makefile.am (DISTCLEANFILES): Move getdate-cvs.tmp to...
+       (MOSTLYCLEANFILES): ...here.
+
+2005-04-06  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs.1): Create intermediate file so that the original
+       isn't emptied on error.
+
+2005-03-29  Mark D. Baushke  <address@hidden>
+
+       * mdate-sh, texinfo.tex: Update from GNULIB.
+
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2005-03-01  Derek Price  <address@hidden>
+
+       Update installed GNULIB modules.
+       * getdate.texi: Update from GNULIB.
+
+2005-02-25  Derek Price  <address@hidden>
+           for Frank Hemer  <address@hidden>
+
+       * cvs.texinfo, RCSFILES: Describe commitid.
+
+2005-02-23  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Update many nodes to specify -r rev[:date] rather than
+       -r rev.
+
+2005-01-31  Derek Price  <address@hidden>
+
+       * Makefile.am, cvs.man.header, cvs.texinfo: Update copyright notices.
+
+2005-01-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (log options): Note quirky interaction of log options.
+       (Suggestion from Dan Peterson <address@hidden>.)
+
+2004-12-14  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add HACKING.DOCS & writeproxy.rtf.
+       (SUBDIRS): Add i18n.
+
+2004-12-09  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Error messages): Note that old, val-tags, "no such tag"
+       problem has been fixed and expound.
+
+2004-12-09  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Remote repositories): Move method option data to...
+       (The connection method): ...this new node and rework.
+
+2004-12-09  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (BUGS, What is CVS?): Remove Dr. Pascal Molli's CVS
+       URL from the documentation.
+       * cvs.man.footer: Ditto.
+       * cvs.1, stamp-vti, version.texi: Regenerated.
+
+2004-12-03  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Remote repositories): Add options CVS_RSH and
+       CVS_SERVER to the docs.
+       (Connecting via rsh): Ditto.
+       (getdate.texi): Replaced reference to getdate-cvs.texi file that
+       does not exist.
+       * stamp-1, stamp-vti, version-client.texi, version.texi:
+       Regenerated.
+       
+2004-11-30  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Responses): Document the `Referrer' response.
+
+2004-11-29  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Add LocalKeyword and KeywordExpand.
+
+2004-11-29  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Keyword list): LocalKeyword may only use the Id,
+       Header, and CVSHeader keywords at present, so document it.
+
+2004-11-29  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: s/KeywordExpansion/KeywordExpand/.
+
+2004-11-24  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies): Mention version limitations on primary
+       and secondary write proxies.
+       (Error messages): List secondary out of sync message.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * getdate.texi: Update from GNULIB.
+
+2004-11-15  Derek Price  <address@hidden>
+
+       * Makefile.am (stamp-gdt): Replace dependency on Makefile with
+       dependency on configure.
+
+2004-11-15  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): s/getdate.text/getdate.texi/.
+
+2004-11-15  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore intermediate cvs.vrs.
+
+2004-11-11  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs.dvi): Make dependent on getdate-cvs.texi.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * .cvsignore: Add stamp-gdt & getdate-cvs.texi.
+       * Makefile.am (EXTRA_DIST): Distribute getdate.texi.
+       (getdate-cvs.texi, stamp-gdt): New targets.
+       (cvs.html, cvs.info, cvs.pdf, cvs.ps, cvs.txt): Depend on
+       getdate-cvs.texi.
+       * cvs.texinfo: Include getdate-cvs.texi.
+       (Common options): Reference new section rather than describing valid
+       dates.
+       * getdate.texi: New file from GNULIB.
+       * mkman.pl:  Ignore include lines.
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies): Mention PrimaryServer name resolution.
+
+2004-10-29  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Common options): The -r TAG option works with
+       the cvs annotate command.
+       (Original patch from Ville Skytta <address@hidden>.)
+
+2004-10-20  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerate for new configure.in.
+
+2004-10-04  Derek Price  <address@hidden>
+
+       * cvs.texinfo (assorted edit and commit related sections): Add
+       information about new '-c' and '-f' options for reservations
+       patch.  The code (not documentation) for this feature was
+       originally from Noel Yap <address@hidden>, originally ported
+       forward and enhanced by Matthew Ogilvie <address@hidden>.)
+
+       * cvsclient.texi (Requests): Add "Hostname", "LocalDir", and "edit".
+       (Responses): Add "Edit-file".
+
+2004-10-04  Derek Price  <address@hidden>
+
+       * cvs.texinfo (syntax): Note referrer format string.
+       * cvsclient.texi (Requests): Describe Referrer request.
+       (Responses): Note that a client should sent Referrer to the new server
+       after a Redirect.
+
+2004-10-01  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies, Global options): Detail operation of
+       global --allow-root option, Remove references to global --primary-root.
+
+2004-09-25  Derek Price  <address@hidden>
+
+       * mkman.in: Move to...
+       * mkman.pl: ...here.
+       * Makefile.am (cvs.1): mkman is in build dir, not src dir.
+
+2004-09-24  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs.1): Add paths in hopes of getting more consistent
+       behavior.
+
+2004-09-14  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Keyword list, config): Note new config options and how
+       they effect the Log keyword.
+
+2004-08-17  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Requests): s/Command-prenotify/Command-prep/.
+
+2004-08-16  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Requests): Document the new `Command-prenotify'
+       request.
+       (Responses): Document the new `Redirect' response.
+
+2004-07-14  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies): Document recent changes in
+       implementation.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * cvs.texinfo (script hooks/*): Tidy.  Document new hooks as
+       implemented.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (config): Note that PrimaryServer hostname must match
+       that returned by uname on the primary server.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * writeproxy.rtf: Update with latest modifications.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies): Reference new script hooks.
+       (Administrative files): Move relevant parts of FIXME and references to
+       *info files...
+       (commit files): ...and most of the menu items from this node...
+       (script hooks): ...to this new node.
+       (postadmin, posttag, postwatch, preproxy, postproxy): New nodes.
+       (syntax, taginfo): Point at "script hooks" rather than
+       "Administrative files" node.
+
+2004-06-07  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies): New node.
+       (config): Note new PrimaryServer option.
+
+2004-06-04  Derek Price  <address@hidden>
+
+       * writeproxy.rtf: Documentation for new writeproxy design.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * cvs.texinfo (script hooks/*): Tidy.  Document new hooks as
+       implemented.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Write proxies): Reference new script hooks.
+       (Administrative files): Move relevant parts of FIXME and references to
+       *info files...
+       (commit files): ...and most of the menu items from this node...
+       (script hooks): ...to this new node.
+       (postadmin, posttag, postwatch): New nodes.
+       (syntax, taginfo): Point at "script hooks" rather than
+       "Administrative files" node.
+
+2004-07-17  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (config): Document ImportNewFilesToVendorBranchOnly
+       option.
+       (import options): Mention that ImportNewFilesToVendorBranchOnly
+       can force 'cvs import -X' behaviour for all imports.
+       (New feature from Chris Demetriou <address@hidden>.)
+
+2004-07-17  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Update imports, import): Add notes on requirement that
+       release tags be unique.
+       (Original patch from Ilya N. Golubev <address@hidden>.)
+
+2004-07-17  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Added documentation for
+       the now required session configuration for PAM.
+       (Patch from Brian Murphy <address@hidden>.)
+
+2004-06-29  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Requests): Note new `Relative-directory request' as
+       well as new semantics for `Directory'.
+       (Response pathnames): Detail previously undocumented client
+       functionality with regards to pathnames specified in responses.
+
+2004-06-26  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Vendor branch): Document that sometimes
+       the default branch won't be set to the vendor branch.
+       (import options): Add -X.
+       * cvsclient.texi (MT importmergecmd tag): Document that this
+       can also be used with the 'cvs import -X' command, and
+       that it can occur when there are no conflicts.
+       (New feature from Chris Demetriou <address@hidden>.)
+
+2004-06-21  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Search for system user
+       rather than system password.  Closes issue #185.
+       (Reported by Fred Maranhao <address@hidden>.)
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (commit files): Remove reference to the obsolete -i
+       module option.
+
+2004-05-28  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Global options): Remove reference to global -l option.
+       (Report from Kevin Bulgrien <address@hidden>.)
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * cvs.texinfo (log): Updated since we display in local time now.
+       Also added some examples.
+       (Patch from Bart Robinson <address@hidden>.)
+
+       * cvs.1: Regenerated.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs.1): Generate in $(srcdir).
+       (MAINTAINERCLEANFILES): Remove cvs.1.
+
+2004-05-14  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo: Fix makeinfo error.
+
+       * cvs.texinfo (Adding files): Cleanup example.
+       (Using keywords): Cleanup text.
+
+2004-05-13  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Adding files): Minor cleanup.
+       (Using keywords): Minor cleanup.
+       (annotate): Move into the manual section, split into three nodes.
+       (annotate options): New node.
+       (annotate example): New node.
+       (based on patch from Steve McIntyre <address@hidden>.)
+       * cvs.1, stamp-1, stamp-vti, version-client.texi, version.texi:
+       Regenerated.
+       
+2004-05-12  Derek Price  <address@hidden>
+
+       * mkman.in: Clarify status messages.
+
+2004-05-12  Derek Price  <address@hidden>
+
+       * cvs.texinfo (ls & rls): Document default behaviors.
+       (Patch from Alexander Taler <address@hidden>.)
+
+       * cvs.texinfo (ls & rls options): Document -d.
+       (Common options): Note ls & rls accept -R and note that they are the
+       sole exceptions it as a default.
+
+2004-05-10  Derek Price  <address@hidden>
+
+       * mkman.in: Organize & tidy comments.  Check for unprocessed texinfo
+       commands.  Output better error messages on finding unprocessed texinfo
+       commands.
+       (do_keyword, keyword_mode): Accept $file argument for error messages.
+
+2004-05-06  Derek Price  <address@hidden>
+
+       * mkman.in: Require Perl 5.005.  Add comments.  Remove duplicate s///.
+       Handle @:.
+
+2004-05-06  Derek Price  <address@hidden>
+
+       * cvs.man.header: Minor text correction.
+       * mkman.in: Ignore @need keyword.  Restore previous font for nested
+       keywords.
+       (do_keyword): Ditto on fonts.  Move some functionality to...
+       (keyword_mode): ...this new function.
+
+2004-05-06  Derek Price  <address@hidden>
+
+       * mkman.in: Handle keywords that cross multiple lines.
+       (do_keyword): New function.
+
+2004-05-04  Derek Price  <address@hidden>
+
+       * cvs.man.header, cvs.man.footer: Reference `info CVS' rather than
+       `info cvs' to send users to the top node.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * Makefile.am: mkman is built in the build dir, not $(srcdir).
+       (Report from Mark D. Baushke <address@hidden>.)
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * HACKING.DOCS: Fix spelling error.  Add reference for @strong.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+       * HACKING.DOCS: Note dependency on `makeinfo' 3.11 & greater.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * mkman.in: Handle single quotes better.  Parse out some redundancy
+       from node and section names.
+       * cvs.man.footer: Replace some quotes with the usual bold font.
+       Reformat links in the SEE ALSO section.
+       * cvs.1: Regenerated.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * mkman.in: Handle examples better.  Protect a few more characters.
+       * cvs.1, stamp-vti, version.texi: Regenerated.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * cvs.man.header: Add copyright notice.
+       * cvs.1: Regenerated.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * mkman.in: Add copyright and license notice.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * mkman.in: Handle @@.
+       * cvs.1: Regenerated.
+
+2004-04-30  Derek Price  <address@hidden>
+
+       First pass at closing issue #3 on cvshome.org.
+       * .cvsignore: Ignore mkman.
+       * cvs.1, mkman.in, cvs.man.header, cvs.man.footer: New files.
+       * cvs.texinfo: Add cut tags for mkman.
+       * Makefile.in (man_MANS): Add cvs.1.
+       (EXTRA_DIST): Add cvs.man.header & cvs.man.footer.
+       (cvs.1, mkman): New targets.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * stamp-1, version-client.texi: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * cvs.texinfo (ls & rls options): Document new -P option.
+       * stamp-vti, version.texi: Regenerated.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * cvsclient.texi (global-list-quiet): New request.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * cvs.texinfo (ls, ls options, ls examples): Document
+       new ls command.
+       (Original patch from Mark D. Baushke <address@hidden>.)
+       * cvsclient.texi (list, ls, rlist): New requests.
+       * stamp-1, version-client.texi: Regenerated.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Update years in Copyright.
+       * stamp-vti, version.texi: Regenerated.
+
+2004-04-21  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Use splitrcskeyword macro consistently in a failed
+       attempt to avoid a warning during PDF generation.
+       * stamp-vti, version.texi: Regenerated.
+
+2004-04-19  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2004-04-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Various spelling, typo, and capitalization fixes.
+       (Patch from Ville Skyttä <address@hidden>.)
+
+2004-04-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Remote repositories): Describe how to use a web proxy to
+       contact a CVS server.
+       (GSSAPI authenticated): Use slightly clearer language.
+       (Kerberos authenticated): Remove incomplete note on server setup.
+       (Environment variables): Add CVS_PROXY_PORT.
+
+2004-04-06  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Assigning revisions): Note that client/server mode
+       only considers files sent to the server to determine the major
+       revision for new files.
+       (Reported by Krzysztof GORBIEL <address@hidden>.)
+       * stamp-vti, version.texi: Regenerated.
+
+2004-03-15  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2004-03-15  Derek Price <address@hidden>
+
+       * cvs.texinfo: s/UseNewInfoFormatStrings/UseNewInfoFmtStrings/g.
+       (Reported by Matthew B. Doar <address@hidden>.)
+       * stamp-vti, version.texi: Regenerated.
+
+2004-03-11  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (loginfo, Error messages): Note that not reading all of
+       the log info can result in a broken pipe signal.
+       (Reported by Steven Nicoloso <address@hidden>.)
+       * stamp-vti, version.texi: Regenerated.
+
+2004-02-20  Derek Price <address@hidden>
+
+       * stamp-1, version-client.texi: Regenerated.
+
+2004-02-19  Derek Price <address@hidden>
+
+       * stamp-1, version-client.texi: Regenerated.
+
+2004-02-18  Derek Price <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated.
+
+2004-02-17  Derek Price <address@hidden>
+
+       * cvs.texinfo (syntax, updating commit files, commitinfo,
+       verifymsg, loginfo, taginfo, user-defined logging):
+       Document new format strings.
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * cvs.texinfo (File Permissions): Clarify index entry.
+       * stamp-vti, version.texi: Regenerated.
+
+2004-01-22  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2004-01-08  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (user-defined logging): Move taginfo stuff from here...
+       (Administrative files): ...to its own node under here.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for dev 1.12.5.1.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for release 1.12.5.
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for release 1.12.4.1.
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Locks): Provide technical details for promotable
+       readlocks.
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-12-05  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for dev version 1.12.3.1.
+
+2003-12-04  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for release 1.12.3.
+
+2003-11-26  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerate for new configure.in.
+
+2003-11-18  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-11-13  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Reverting local changes): Use the same vendor tag
+       in the admin command as was used in the previous import commands.
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-11-07  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (CVS commands): Fix typo.
+       (FreeBSD PR docs/58669 reported by Ceri Davies <address@hidden>.)
+
+2003-10-30  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-10-30  Derek Price  <address@hidden>
+
+       * cvs.texinfo (File permissions, Error messages): Add index entries for
+       CVSROOT/val-tags file.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for 1.12.2.1.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * stamp-1, stamp-vti, version-client.texi, version.texi: Regenerated
+       for 1.12.2.
+
+2003-10-21  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Note gnu.cvs.* usenet mirrors of the email lists.
+       (Suggestion from Paul Edwards, from somewhere in Australia.)
+
+       * cvs.texinfo: Put email addresses in @email{} tags and URLs in @url{}
+       tags rather than relying on markup like @code{}.
+       * stamp-vti, version.texi: Regenerated.
+
+2003-10-14  Derek Price  <address@hidden>
+
+       Port to pedantic POSIX 1003.1-2001 hosts, such as Debian GNU/Linux
+       testing with _POSIX2_VERSION=200112 in the environment.
+
+       * cvs.texinfo: Suggest 'sed 1q', not 'head -1'.
+       (Patch from Paul Eggert <address@hidden>.)
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * cvsclient.texi (Requests): Add recommendation to client developers to
+       avoid the `Case' request.
+       * stamp-1, version-client.texi: Regenerated.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-09-12  Derek Price  <address@hidden>
+
+       * cvs.texinfo (checkoutlist): Document the error messages which may be
+       specified in this file.
+       * stamp-vti, version.texi: Regenerated.
+
+2003-08-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Administrative files, Commit files): Remove references
+       to deleted nodes.
+       (editinfo, editinfo example): Remove these obsolete nodes.
+       * stamp-vti, version.texi: Regenerated.
+
+2003-08-27  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (history options): Note the 'P' record type which
+       has been around for a long time but never actually appeared in
+       the history file due to bugs in the code.
+       (Invoking CVS): Ditto.
+       (config): Ditto.
+       * stamp-vti, version.texi: Regenerated.
+
+2003-08-12  Derek Price  <address@hidden>
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-08-07  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore {cvs,cvsclient}.txt.
+
+2003-08-07  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Use the @dircategory and @direntry commands from texinfo
+       rather than rolling our own.
+
+       * stamp-vti, version.texi: Regenerated.
+
+2003-08-07  Derek Price  <address@hidden>
+
+       * Makefile.am (POSTSCRIPTS): Rename to...
+       (PSS): ...to sync with and override Automakes default targets.
+       (PDFS): Reorder to match PSS.
+       (SUFFIXES): Remove .pdf and .aux.
+       (cvs.aux, cvs.pdf, cvsclient.aux, cvsclient.pdf): Remove these targets.
+       .aux weren't being generated anyhow and .pdf no longer need to be
+       supplied explicitly.
+       (cvs-paper.pdf: cvs-paper.ps): Provide ps2pdf rule explicitly.
+       (.{texinfo,texi,txy}.pdf): Remove these suffix rules - they are now
+       provided by Automake.
+
+2003-08-06  Derek Price  <address@hidden>
+
+       * Makefile.am (CLEANFILES): Move...
+       (MOSTLYCLEANFILES): ...here and drop PDFs since this is where Automake
+       cleans PDFs & PSs by default.
+       (MAINTAINERCLEANFILES): Clean all PostScripts even though they will
+       have been removed in mostlyclean.  That is a bug in Automake.
+       (doc): Depend on info & ps.
+       (pdf, ps): Removed in favor of Automake's default targets for these
+       types.
+       (cvsclient.* targets): Depened on version-client.texi.
+       (cvs-paper.pdf): Remove in favor of Automake's default target.
+       (.{texinfo,texi,txi}.{pdf,txt}): Update these targets based on
+       Automake's similar treatment of dvi, ps, and info targets.
+       * .cvsignore: Add cvs.tmp, a `make pdf' generated file.
+
+       * Makefile.in: Regenerated.
+
+2003-07-21  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Expand comment on RCS terminology.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-07-20  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Setting up the server for password authentication): 
+       Added documentation for PAM support.
+       (Original patch from Brian Murphy <address@hidden>.)
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Substitution modes):  Improve the phrasing of the
+       description of the new treatment of -kb.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Put a few errant references to bug-cvs inside @code{}
+       for consistancy.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Update WARNINGs and Notes for a more consistent
+       appearance.  Remove some obsolete comments.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Merging and keywords): Note that keyword expansion modes
+       requested on the command line no longer override binary mode.  Removed
+       an obsoleted @ignore section.
+       (Common options): Ditto minus the @ignore section.  Some reworking for
+       clarity.
+       (Original patch from Dieter Maurer <address@hidden>.)
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-07-12  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Binary howto): Add note about how to determine whether
+       a file is marked as binary or not.
+       (Suggested by Erik Sigra <address@hidden>.)
+       * stamp-vti: Regenerated.
+       * version.texi: Regenerated.
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-06-20  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-06-16  Derek Price  <address@hidden>
+
+       * cvs.texinfo (splitrcskeyword): New macro, now that @ifhtml will work
+       properly with texi2html (as of version 1.68), to cause output HTML to
+       contain <i></i> where we used to have @asis{} and prevent RCS keyword
+       substitution in generated HTML.
+       (Original patch from Patrice Dumas <address@hidden>.)
+
+2003-06-16  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-06-12  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Invoking CVS): Remove `-P' from the list of `cvs export'
+       options.
+       (Patch from Alexander Taler <address@hidden>.)
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Top): Remove out-of-date (by at least 5 years) comment.
+       (Patch from Alexander Taler <address@hidden>.)
+
+2003-06-11  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Fix broken reference.
+       (Avoiding substitution): Ditto.
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated for new configure.in.
+       * stamp-vti: Ditto.
+       * version.texi: Ditto.
+
+2003-06-10  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Keyword substitution): New menu entry for
+       "Configuring keyword expansion."
+       (Keyword list): New "CVSHeader" keyword. New Local keyword
+       controlled by new LocalKeyword option in CVSROOT/config.
+       (Avoiding substitution): Mention the new KeywordExpansion option
+       in CVSROOT/config.
+       (Configuring keyword expansion): Document the new KeywordExpansion
+       option in CVSROOT/config.
+       (Invoking CVS): New example of CVSHeader keyword expansion.
+
+2003-05-27  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Consolidate copyright notices into a single macro that
+       is called elsewhere to avoid needing three of them.  Update copyright
+       notice.
+       (BUGS): Suggest Ximbiot rather than the defunct Signum Support as CVS
+       consultants.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-05-26  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for 1.12.1.1.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2003-05-25  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for 1.12.1.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerate with Automake version 1.7.5.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-05-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Specifying what to tag by date or revision): Add a
+       missing a tag argument to the example.
+       (How your build system interacts with CVS): Correct typo.
+       (*): Let the spell checker have its way.
+       (Thanks to Anthon Pang <address@hidden> for the patch and
+       Max Bowsher <address@hidden> for validating it. This closes issue #84 on
+       <http://ccvs.cvshome.org>.)
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-04-28  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Working directory storage, Module options, Module
+       program options): Remove references to Checkin.prog and Update.prog.
+       (commit options): Remove reference to -n option.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-04-10  Larry Jones  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-03-31  Derek Price  <address@hidden>
+
+       * cvs.texinfo (import output): Remove unecesary verbage.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-26  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-25  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Server temporary directory): Reorder list of places
+       to match code.
+       (Connection): Add additional example error message and note about
+       firewall software.
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-25  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-24  Derek Price  <address@hidden>
+
+       * Makefile.am: Update copyright notice.
+
+       * Makefile.in: Regenerated.
+
+2003-03-21  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Environment variables): Move @end table tag to after
+       the @item $CVSPID.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-19  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Connecting via rsh): Document that --with-rsh may
+       be used to specify the default "rsh" program to use.
+
+       * Makefile.in: Regenerated.
+       
+       * cvs.texinfo (Environment variables): Document new CVS_PID
+       variable.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-19  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-03-19  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-16  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Global options): Document new `-R' global option
+       for read-only file-system repository mode.
+       (Environment variables): Document new CVSREADONLYFS environment
+       variable.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-07  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (rcsinfo): Document that CVS/Template will now be
+       updated during normal cvs update operations.
+
+2003-03-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (What is CVS?): Correct date of first post of CVS by
+       Dick Grune from December to July based on the archive posted on
+       Google:
+       
<http://groups.google.com/groups?q=Grune+cvs+group:mod.sources.*&hl=en&lr=&ie=UTF-8&selm=122%40mirror.UUCP&rnum=2>.
+       (Thanks to David A Wheeler <address@hidden>.)
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-03-03  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (CVS_LOCAL_BRANCH_NUM): Document new environment
+       variable.
+
+2003-02-27  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Environment variables): Make the information on
+       CVS_CLIENT_PORT slightly clearer.
+       (Kerberos authenticated): XREF the Environment variables node.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+       * stamp-1: Ditto.
+       * version-client.texi: Ditto.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * cvs.texinfo (admin): Mention UserAdminOptions.
+       (config): Ditto.
+       (Original patch from Dan Peterson <address@hidden>.)
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-02-24  Derek Price  <address@hidden>
+
+       * cvs.texinfo (*): Modify some tag index entries for uniformity.
+
+2003-02-14  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Watch Information, Editing files, Getting Notified,
+       Setting a watch): Edit usage specs for correctness and uniformity.
+       (Sticky tags): Use ref rather than xref to avoid a warning from
+       makeinfo.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-02-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Sticky tags, update): Make merging behavior of
+       `cvs update' a bit clearer.  Add cross references.
+       (Thanks to Jenn Vesperman <address@hidden> for the
+       report.)
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-02-07  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2003-02-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Common options): Add tag to the list of commands that
+       accept -D.
+
+2003-02-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Working directory storage, Module options,
+       Module program options): Correct description of where Checkin.prog
+       and Update.prog are run.  Provide more index entries and cross
+       references.  Remove some FIXME comments.  Add a FIXCVS THEN FIXME.
+       (Thanks to Art Manion at the CERT Coordination Center <address@hidden>.)
+
+2003-02-04  Derek Price  <address@hidden>
+
+       * cvs.texinfo (File status): Mention the "Unresolved Conflict" status
+       which was apparently and erroneously removed from the doc at some
+       point in the past.
+
+2003-02-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Merging a branch): Mention the GCA as opposed to the
+       "branch point" as the implicit revision when merging a branch.
+
+2003-02-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Remote repositories): :METHOD: is optional.
+
+2003-02-03  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Committing your changes): Move index entries closer to
+       their corresponding references.
+       (Environment variables): Include $VISUAL in order of
+       preference.  Add index entries.  Reference Global options node.
+       (Variables): Change order of list to match the Env. Variables node
+       mentioned above.
+
+       * stamp-1: Regenerated.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2003-01-31  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2003-01-23  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2003-01-22  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (config): Correct LogHistory default (U was omitted).
+
+2003-01-16  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for version (1.11.5).
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2003-01-16  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for dev version (1.11.4.1).
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2002-12-28  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for version 1.11.4.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2002-12-27  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for dev version 1.11.3.1.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2002-12-27  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2002-11-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo (commitinfo): Explain the environment of commands
+       run by commitinfo a little more fully.
+       (Original patch from Fred L. Drake, Jr.  <address@hidden>.)
+
+       * cvs.texinfo: Change the wording of some of the commit index entries
+       for consistency and clarity.
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated using Automake 1.6.3.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2002-09-20  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-08-16  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Error messages): Update CVS_BADROOT notes to specify
+       new configure option instead.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-08-12  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-08-06  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-08-05  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Correct typo.
+       (Thanks to Chandra Mouleeswaran <address@hidden>.)
+
+2002-04-30  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with automake 1.6.
+
+2002-04-18  Derek Price  <address@hidden>
+
+       * Makefile.am: Add FIXME comment about an automake bug.
+       * Makefile.in: Regenerated.
+
+2002-04-18  Derek Price  <address@hidden>
+
+       * stamp-1: Regenerated for 1.11.2.1 version update.
+       * stamp-vti: Ditto.
+       * version-client.texi: Ditto.
+       * version.texi: Ditto.
+
+2002-04-17  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-04-17  Derek Price  <address@hidden>
+
+       * cvs.texinfo: Add index entries for inetd and xinetd.
+
+2002-03-26  Derek Price  <address@hidden>
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2002-03-17  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (log options): Add new -S option.
+
+2002-03-12  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (diff options): Add missing menu for new subsections.
+       (Patch from Pavel Roskin <address@hidden>.)
+
+2002-03-09  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Update imports): Suggest merging with two rel tags
+       instead of the branch tag and a date and explain why.
+
+2002-02-26  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (diff options): Document all the diff options.
+
+2002-01-10  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (log options): Update -r :: to match code changes.
+       (Variables): Document LOGNAME and USER environment variables.
+
+2001-12-03  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Invoking CVS): Add -F option for annotate and
+       rannotate.
+
+2001-11-28  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (File permissions): Add note about SGID being required
+       on some systems.  Add note about LockDir.
+
+2001-10-18  Derek Price  <address@hidden>
+
+       * Makefile.am: Add --batch to texi2dvi invocations.
+       (Thanks to Akim Demaille <address@hidden> for the suggestion.)
+
+       * Makefile.in: Regenerated.
+
+2001-10-04  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Connecting via rsh): Add : between host name and
+       root directory in example since some versions of CVS require it.
+       (Reported by Trevor Jim <address@hidden>.)
+
+2001-09-14  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (commit files): Make following sections (commitinfo,
+       verifymsg, editinfo, and loginfo) subsections of this one.
+
+2001-09-06  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Watch information):  Cleanup some watch/edit
+       explanations and discourage the belief that files should be
+       releasable.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+       (Patch from Eric Siegerman <address@hidden>.)
+
+2001-09-05  Derek Price  <address@hidden>
+
+       * cvsclient.texi: Use version-client.texi instead of version.texi so
+       cvsclient.* can have a different build date than cvs.texinfo.
+
+       * Makefile.in: Regenerated.
+       * stamp-1: New file.
+       * version-client.texi: Ditto.
+       (Reported by Alexey Mahotkin <address@hidden>.)
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with automake 1.5.
+       * version.texi: Ditto.
+
+2001-08-24  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add new message about root not
+       being allowed to do commit.
+
+2001-08-24  Derek Price  <address@hidden>
+
+       * cvs.texinfo (config): Add a new RereadLogAfterVerify
+       CVSROOT/config option to control how verifymsg scripts deal with
+       read-write log messages.
+       (Patch from Mark D. Baushke  <address@hidden>.)
+
+       * cvs.texinfo (verifymsg): The verification script may now modify
+       the log message.
+       (Patch from Mark D. Baushke  <address@hidden>.)
+
+       * cvs.texinfo (config, verifymsg): Correct default, changes for clarity,
+       and add a warning about `stat' and large repositories.
+
+       * version.texi: Regenerated.
+       * stamp-vti: Ditto.
+
+2001-08-20  Derek Price  <address@hidden>
+
+       * Makefile.am: Reformat comment for 80 chars.
+
+       * Makefile.in: Regenerated.
+
+2001-08-10  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Default options and the ~/.cvsrc file): Added a few more
+       "standard" options to the example.
+
+       * stamp-vti: Regenerated.
+       * version.texi: Ditto.
+
+2001-08-06  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2001-07-17  Derek Price  <address@hidden>
+
+       * version.texi: Regenerated.
+       * stamp-vti: Ditto.
+
+2001-07-06  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Variables): Add index entry for CVS_USER.
+       (Reported by Jens Schweikhardt <address@hidden>.)
+       (Working directory storage): Fix Emptydir index entry: Emptydir
+       is a directory, not a file.
+
+2001-07-05  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): Add Emptydir to index.
+
+2001-07-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new Automake release candidate 1.4h.
+
+2001-06-28  Derek Price  <address@hidden>
+
+       * Makefile.am: Reference to CVSvn.texi removed.
+       * cvs.texinfo: @include version.texi and change CVSVN to VERSION.
+       * cvsclient.texi: Ditto.
+
+       * version.texi: New file.
+       * stamp-vti: Ditto.
+       * mdate-sh: New File.  Work-around bug in Automake 1.4f by copying
+       top-level mdate-sh here.
+
+       * CVSvn.texi.in: Removed.
+       * CVSvn.texi: Ditto.
+
+       * Makefile.in: Regenerated.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2001-06-27  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (loginfo): Note that format string expansion is
+       quoted and contains escapes.
+
+2001-06-22  Derek Price  <address@hidden>
+
+        * cvs.texinfo (checkout options): Fix transliteration typo in co
+        example.
+       (Patch from Adrian Aichner <address@hidden>.)
+
+2001-06-12  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Global options): Note that -T only affects the local
+       process in client/server mode.
+       (Environment variables): Note that CVS_SERVER can include arguments
+       as well as a program name, and note that it applies to :fork: as well
+       as to :ext: and :server:, although the default value is different.
+
+2001-06-08  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (config): Mention using LockDir on in-memory
+       filesystem to speed up locking.
+
+2001-06-07  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Remove *.aux.
+       (MOSTLYCLEAN_FILES): Remove this macro since the Automake bug it was
+       working around has been fixed.
+
+2001-06-07  Derek Price  <address@hidden>
+
+       * HACKING.DOCS: Add link to the main texinfo documentation.
+
+2001-06-07  Derek Price  <address@hidden>
+
+       * README.DOCS: Rename to
+       * HACKING.DOCS: this.
+
+2001-06-07  Derek Price  <address@hidden>
+
+       * README.DOCS: New file attempting to document some of our texinfo
+       conventions.
+
+2001-06-06  Derek Price  <address@hidden>
+
+       (Reformatting, rewording, & additions to a patch from
+       Stephen Cameron <address@hidden>.)
+
+       * cvs.texinfo (Invoking cvs, Modifying tags)
+         document new -B option of rtag and tag commands.
+
+2001-06-04  Derek Price  <address@hidden>
+
+       * Makefile.am: Remove commented out DISTFILES &
+       AUTOMAKE_OPTIONS=no-texinfo.tex.
+       (Reported by Alexey Mahotkin <address@hidden>.)
+       * Makefile.in: Regenerated.
+
+2001-06-04  Larry Jones  <address@hidden>
+
+       * Makefile.am: Fix rules for cvs-paper (.pdf rule actually generated
+       .ps and vice versa).
+       (Reported by Alexey Mahotkin <address@hidden>.)
+       * Makefile.in: Regenerated.
+
+2001-05-29  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Repository): Fix explanation of CVSROOT parsing
+       algorithm.
+
+2001-05-29  Derek Price  <address@hidden>
+       patch from Pavel Roskin  <address@hidden>
+
+       * Makefile.am (CVSvn.texi): Double hash comment in rule since single
+       hash comments are not portable.
+
+       * Makefile.in: Regenerated.
+
+2001-05-21  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Error messages): Fix ordering; add "cannot commit
+       files as root".
+
+       * cvs.texinfo (Invoking CVS): Add entries for kserver, pserver,
+       rannotate, rlog, and server.
+
+       * cvs.texinfo: Lots of minor editorial corrections.  Mostly adding
+       @noindent after examples where the following text is intended to
+       be a continuation of the preceding text, not a new paragraph.
+
+       * cvs.texinfo (Connection): Replace information about unsetting
+       $HOME for people with old releases.
+
+
+       * cvs.texinfo (Connecting via rsh): Use @samp{} instead of @file{}
+       where it seemed appropriate.
+       (Patch from Alexey Mahotkin <address@hidden>).
+
+2001-05-18  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Add xinetd info.
+       (Connection): Add "broken pipe" to possible error messages.
+
+2001-05-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo (update output): Change wording to something that sounds
+       a bit more like english.
+
+2001-05-02  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Top): Change @ifinfo to @ifnottex to placate HTML
+       generators.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * CVSvn.texi: Regenerated.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * CVSvn.texi: Regenerated.
+
+2001-04-25  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+       * CVSvn.texi: Regenerated.
+
+2001-03-30  Larry Jones  <address@hidden>
+
+       * cvsclient.texi (Dates, Requests): Add rannotate and rlog.
+
+2001-03-26  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (admin options): Fix typo: should be @pxref, not @xref.
+
+2001-03-26  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (admin options): Update description of -u option to
+       refer back to notify.
+
+2001-03-23  Derek Price  <address@hidden>
+
+       * Makefile.am (ps):  Make 'ps' an alias for 'doc'.
+       (doc, pdf, ps, txt): declare as '.PHONY'.
+
+       * Makefile.in:  Regenerated.
+
+2001-03-23  Derek Price  <address@hidden>
+
+       * Makefile.am (MOSTLYCLEANFILES):  Add cvs.cps & cvs.fns as a temporary
+       workaround for an Automake deficiency.
+
+       * Makefile.in:  Regenerated.
+
+2001-03-14  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated
+
+2001-02-20  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (BUGS): There's only one company listed now, not two.
+
+2001-02-13  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Password authentication server, First import): Use
+       @ref instead of @xref when not at the beginning of a sentence.
+
+2001-02-01  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Connection): Add still more notes about common
+       pserver error messages.
+
+2001-01-18  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Quick reference to CVS commands): add index entry for
+       version subcommand
+
+2001-01-18  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (log options): Document new :: syntax for -r.
+
+2001-01-10  Derek Price  <address@hidden>
+
+       * Makefile.am (CVSvn.texi): specify $(srcdir) explicitly in target rule
+       so CVSvn.texi gets built properly for all makes.
+       (cvs_TEXINFOS): specify $(srcdir) explicitly for CVSvn.texi
+       (cvsclient_TEXINFOS): ditto
+       * Makefile.in: regenerated
+
+2000-12-26  Derek Price  <address@hidden>
+
+       * Makefile.in: update timestamp
+       * CVSvn.texi: ditto
+
+2000-12-26  Derek Price  <address@hidden>
+
+       * Makefile.am: new target for creation of CVSvn.texi
+       (EXTRA_DIST): add CVSvn.texi.in & CVSvn.texi
+       * Makefile.in: Regenerated
+       * CVSvn.texi: new file
+       * .cvsignore: remove CVSvn.texi since it is now included in dist
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated
+
+2000-12-21  Derek Price  <address@hidden>
+
+       * cvs-paper.ps: Backout accidental regeneration.
+
+2000-12-21  Derek Price  <address@hidden>
+
+       * .cvsignore: Added *.pdf versions of the *.ps docs
+       * CVSvn.texi.in: Use configure to generate CVSvn.texi
+       * Makefile.am: New file needed by Automake
+       * Makefile.in: Regenerated
+       * cvs-paper.ps: Regenerated
+       * texinfo.tex: New file added to placate Automake.  Apparently, its
+       inclusion is mandated by the GNU coding standards.
+
+2000-12-14  Derek Price  <address@hidden>
+           Linus Tolke  <address@hidden>
+
+       * cvs.texinfo (Merging a branch): changed some references to "BRANCH"
+       to "BRANCHNAME" for consistancy.  Add a warning about merging using a
+       single tagname reference with an xref to "Merging adds and removals"
+       for the long explanation
+       (Merging adds and removals): Add the long explanation of why merging
+       from a single tagname can be tricky
+       (update): Add a warning about merging using a single tagname reference
+       with an xref to "Merging adds and removals" for the long explanation
+       
+2000-11-13  Derek Price  <address@hidden>
+
+       * cvs.texinfo: use '@sc{cvs}' instead of 'CVS' in various locations
+
+2000-11-08  Derek Price  <address@hidden>
+
+       * cvs.texinfo (settitle): stick a 'v' in front of the version number
+       to make it harder to confuse with chapter, section, and page numbers.
+
+2000-11-08  Derek Price  <address@hidden>
+
+       * cvs.texinfo (settitle): add the version number to the title string
+       so that it is easier to find on HTML pages and the like.
+
+2000-10-20  Jim Kingdon  <http://sourceforge.net/users/kingdon/>
+
+       * cvs.texinfo (Variables): Document CVS_USER.
+
+2000-10-17  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Remote repositories): added a comment about specifying
+       a password in the repository name when performaing a checkout.
+
+2000-10-17  Derek Price  <address@hidden>
+
+       * cvs.texinfo (Remote repositories, password authenticated, GSSAPI
+       authenticated, Kerberos authenticated, Environment variables):
+       Documented CVSROOT spec change & CVS_CLIENT_PORT.
+
+2000-10-10  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Connection): Add additional notes about common
+       pserver error messages.  Remove information about unsetting $HOME
+       since CVS no longer pays any attention to it in server mode.
+
+2000-09-07  Larry Jones  <address@hidden>
+
+       * Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
+       from autoconf.
+
+2000-08-21  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Removing directories, export): Note that export always
+       prunes directories and remove references to the non-existent -P flag.
+
+2000-07-28  Larry Jones  <address@hidden>
+
+       * cvsclient.texi (Requests): Ensure that all rootless requests say
+       that they're rootless.
+
+2000-07-12  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Module program options): Remove note that commit and
+       update programs only working locally; they've worked client/server
+       for quite some time.
+
+2000-07-10  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Invoking CVS): Document new version command.
+       * cvsclient.texi (Requests): Document new version request.
+
+2000-07-06  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (admin options): Remove note about -t not working
+       in client/server.
+
+2000-04-03  Pavel Roskin  <address@hidden>
+
+       * cvs.texinfo (Telling CVS to notify you): Remove backslashes
+       before quotes.
+
+2000-05-24  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (From files): Clean up @var{wdir}/@var{rdir} vs.
+       @var{dir} usage.
+
+2000-05-19  Larry Jones  <address@hidden>
+
+       * cvsclient.texi (Requests): Note that Global_option is now
+       valid without Root.
+
+2000-04-17  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Variables): Clarify what USER means in pserver.
+
+2000-03-08  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Connection): Add note about inetd rate limit.
+       (ErrorMessages): Add root home directory permission messages.
+
+2000-02-12  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Clean up text/formatting of previous change.
+
+2000-02-21  K.J. Paradise <address@hidden>
+
+       * cvs.texinfo : Adding John Cavanaugh's patch to allow 
+       the history file to log actions based on the CVSROOT/config
+       file.  (To limit which cvs actions actually make it into the 
+       history file)
+
+2000-02-17  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Remove references to PreservePermissions.
+
+       * cvs.texinfo (history options): Note default report type.
+
+2000-01-18  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Global options): Document compression levels.
+
+2000-01-18  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Minor editorial changes from Ken Foskey
+       <address@hidden>.
+
+2000-01-11  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Add index entries for "Compression" and "Gzip".
+       Correct typography in many index entries (English phrases should
+       have initial caps, subcommands/files/etc. should be as-is).
+
+2000-01-10  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (loginfo): correctly describe CVSROOT/loginfo's
+       %-expansion behavior.  Thanks to Karl Heinz Marbaise
+       <address@hidden> for noticing the error.
+
+2000-01-07  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Use -f in example
+       inetd.conf line.
+       (Connection): Add advice about using shell script or env to avoid
+       problems with inetd setting HOME in the server's environment.
+       (various): Use @file for inetd.conf.
+
+2000-01-02  John P Cavanaugh <address@hidden>
+
+       * cvs.texinfo: document new -C option to update, now that it works
+       both remotely and locally.
+       (Re-applied by Karl Fogel <address@hidden>.)
+
+1999-12-11  Karl Fogel  <address@hidden>
+
+       * Revert previous change -- it doesn't work remotely yet.
+
+1999-12-10  John P Cavanaugh <address@hidden>
+
+       * cvs.texinfo: document new -C option to update.
+       (Applied by Karl Fogel <address@hidden>.)
+
+1999-11-20  Larry Jones  <address@hidden>
+
+       * cvs.texinfo(history options): Document -f, -n, and -z.
+
+1999-11-09  Jim Kingdon  <http://developer.redhat.com/>
+
+       * cvsclient.texi (Requests): Document the arguments to "log", now
+       that I've changed log.c to be more specific in terms of what it
+       will send.
+
+1999-11-05  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Revert Karl's change once again since the code is now
+       fixed.  Add "Variables" and "User variables" to index.
+
+1999-11-04  Karl Fogel  <address@hidden>
+
+       * log.c (log_usage): Revert Jim Kingdon's reversion of my change
+       of 1999-11-03.  Allowing a space between option and argument
+       results in lossage; here is a reproduction recipe: run this from
+       the top of a remote copy of the cvs source tree
+
+          cvs log -d '>1999-03-01' > log-out.with-space
+
+       and then run this (note there's no space after -d now):
+       
+          cvs log -d'>1999-03-01' > log-out.no-space
+
+       The resulting files differ; furthermore, a glance at the output of
+       cvs shows that the first command failed to recurse into
+       subdirectories.  Until this misbehavior can be fixed in the source
+       code, the documentation should reflect the true state of affairs:
+       if one simply omits the space, everything works fine.
+
+1999-11-04  Jim Kingdon  <http://developer.redhat.com/>
+
+       * cvs.texinfo (log options): Revert Karl's change regarding -d and
+       -s.  A space is allowed (see sanity.sh for example).
+
+       * cvs.texinfo (Password authentication server): The name of the
+       file is "passwd" not "password".
+
+       * cvsclient.texi (Top): Add @dircategory and @direntry.
+
+1999-11-04  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (Password authentication server, Password
+       authentication client): Rewritten to accommodate the [new]
+       possibility of empty passwords.
+
+1999-11-03  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (Invoking CVS): correct documentation for -d and -s
+       options (as did elsewhere, earlier today).
+
+1999-11-03  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (Setting a watch): describe `watch off' behavior
+       more accurately.
+
+1999-11-03  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (log options): correct documentation for -d and -s
+       options.  There can be no space between these options and their
+       arguments.
+
+       Also, make sure all @sc{cvs} codes refer to "cvs" in lower case;
+       this avoids makeinfo warnings.  And use @code for the CVSEDITOR
+       environment variable, not @sc.
+
+1999-09-24  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Misc. formatting cleanups.
+
+1999-07-16  Tom Tromey  <address@hidden>
+
+       * cvs.texinfo (admin): Mention admin -k exception.  Add cvsadmin
+       to index.
+
+1999-07-14  Larry Jones  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Note inetd limits
+       and suggest using shell script to avoid.
+
+1999-06-01  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Requests): For the import command, the
+       repository given to the Directory requests is ignored.
+
+1999-05-27  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Requests): Clarify that Modified, Is-modified,
+       Notify and Unchanged must specify a file within the current
+       directory.
+
+1999-05-24  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (checkoutlist): New node, contains more complete
+       documentation of this feature.
+       (CVSROOT storage): Refer to the new node when mentioning
+       checkoutlist.
+       (Administrative files): Update the menu entry for Wrappers.
+
+1999-05-17  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Requests): For Notify request, strike duplicate
+       "Response expected: no" and fix "a edit" -> "an edit".
+
+1999-05-14  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Working directory storage): Try to be more clear
+       about the conflict field.
+
+1999-05-11  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (config): Use comma after @xref (thanks to Pavel
+       Roskin for the report/fix).
+
+1999-05-10  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Requests): Document restrictions on characters
+       in Notify requests.
+
+1999-05-04  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Password authentication security): Remove sentence
+       about how no one has audited pserver for holes; a lot of holes
+       have been closed, looking for, &c, since that was written.
+       In the summary, reword to reflect the fact that sniffing a
+       readonly password does not imply general system access (as far as
+       I know, of course).
+
+       * cvs.texinfo (Connection): Also suggest inetd -d.
+
+1999-04-28  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Requests): Say what goes in the "watches" field
+       of the "Notify" request.
+
+       * cvs.texinfo (Common options): -r is for branches too.
+
+       * cvs.texinfo (Error messages): Add "no such tag" message.
+       (Common options): -f does not override val-tags check.
+
+1999-04-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Locks): #cvs.rfl locks must start with "#cvs.rfl."
+       not just "#cvs.rfl".  As far as I know CVS has always implemented
+       the former behavior, and this just fixes the documentation.
+
+1999-04-23  Yoshiki Hayashi of u-tokyo.ac.jp
+
+       * cvs.texinfo (verifymsg): Correct wrong file name (bugid.edit ->
+       bugid.verify).
+
+1999-04-22  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Responses): The text in the "M" response is not
+       designed for machine parsing.  Likewise for "error" in regular
+       protocol.  Likewise for "E" and "error" in authentication protocol.
+
+1999-04-19  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Error messages): Add "Cannot check out files into
+       the repository itself".
+
+1999-04-16  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Other problems): Add the Windows problem with home
+       directory ending in a slash.
+
+1999-04-14  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (CVS in repository): Include the format of the
+       fileattr file here, rather than referring to the CVS source code.
+
+1999-04-09  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Working directory storage): Whether the timestamp
+       in CVS/Entries is local or universal actually depends on the system.
+
+1999-04-05  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * cvs.texinfo (export options): Remove notation that the -r
+       tag is sticky.  'cvs export' doesn't store that data.
+
+1999-04-08  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Error messages): Add "EOF in RCS file" and
+       "unexpected EOF" (in RCS file) messages.
+
+1999-03-25  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (admin options): Say there can be no space between
+       -e and its argument (since the previous sentence said the argument
+       can be omitted, this is the only possibility).
+
+1999-02-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Merging and keywords): When including conflict
+       markers, put @asis{} at the start of the line, in case this file
+       itself is in CVS.  Thanks to Derek Price for pointing this out.
+
+1999-02-25  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo: Refer to "keywords" not "RCS keywords".  We had
+       only used the latter term in a few places, and it seems like a
+       somewhat odd term in that this style of keyword is by no means
+       specific to RCS.
+       (Merging a branch): Remove spurious ")".  Use ref, not xref, after
+       "see".
+       (Merging a branch, Substitution modes): Make sure that @ref is
+       followed by comma, since info wants that.
+       (Merging and keywords): Use samp not code for "-kk".  Something of
+       a judgement call, but the rest of the manual uses samp and that
+       seems better to me.
+       (Merging and keywords): Rewrite, to (a) better motivate the
+       discussion based on what the user wants to do, (b) fix up lots of
+       convoluted sentences, (c) move the discussion of the binary files
+       to the end, that is get across the basic idea first and then
+       embellish it.  Remove a few unnecessary index entries.  Expand
+       example.  Just tell people to avoid -kk with binary files (comment
+       out the discussion of using -A after the commit).
+
+1999-01-29  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * cvs.texinfo:  Added new node/section on merging and keywords.  It
+       contains advice on how to avoid RCS keyword conflicts when merging
+       and avoid corrupting your binary files while doing it.
+
+1999-02-24  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Request intro): Add paragraph about transmitting
+       more than one command.
+
+1999-01-29  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo: Use EXAMPLE.COM EXAMPLE.ORG and EXAMPLE.NET instead
+       of domains which might conflict with actual (current or future)
+       domains.  The EXAMPLE domains are registered for this purpose.
+
+1999-01-22  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Sticky tags): Refer to -j as the better way to undo
+       a change.
+       (Merging two revisions): Also talk about undoing removals and
+       adds.  Move the index entries to here.
+
+1999-01-21  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Error messages): Add "waiting for USER's lock".
+
+1999-01-16  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Wrappers): Comment out all the -t/-f documentation,
+       since that feature is currently disabled.
+
+1999-01-14  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.texinfo (Connecting via rsh): Add some more index entries so
+       that people who want to use SSH and such are slightly less lost.
+
+1999-01-12  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs-paper.ms: Remove comments which contained the FSF's old
+       address; it has changed.
+
+1998-12-29  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvsclient.texi (Dates): Numeric timezones are preferred.
+       Also mention the Checkin-time request.
+
+1998-12-23  Jim Kingdon  <http://www.cyclic.com>
+
+       * RCSFILES: Add clarification about certain character set issues
+       from Paul Eggert, the RCS maintainer.  The last paragraph and the
+       change from Shift-JIS to JIS as an example of a character set
+       which contains 0x40 bytes which are not '@' characters are mine;
+       the rest is directly from Paul Eggert.
+
+1998-12-22  Martin Buchholz  <address@hidden>
+
+       * cvs.texinfo: Fixed various trivial typos.
+
+1998-12-17  Jim Kingdon
+
+       * cvsclient.texi (Responses): Explicitly say that Mod-time need
+       not be sent for all files.
+
+1998-12-16  Jim Kingdon
+
+       Thanks to Ram Rajadhyaksha of the MacCVS Pro team for raising the
+       following issues.
+       * cvs.texinfo (Working directory storage): The deal about storing
+       files as text files applies to all the CVS/* files, not just
+       CVS/Entries.  State the rationale too.
+       Document CVSROOT/Emptydir in CVS/Repository.
+       There is no set order in CVS/Entries.
+       Explicitly say that writing Entries.Log is optional.
+
+1998-12-03  Jim Kingdon
+
+       * cvs.texinfo (Error messages): Add "unrecognized auth response".
+       (Password authentication server): Remove comment about
+       "unrecognized auth response" and link to the troubleshooting
+       section.
+
+1998-12-02  Jim Kingdon
+
+       * cvs.texinfo (Multiple repositories): Add an example.
+
+1998-11-18  Jim Kingdon
+
+       * cvs.texinfo (Invoking CVS): Change "-r tag" to "-r rev".  We
+       already use "tag" as the name of the tag we are adding.
+
+1998-11-13  Jim Kingdon
+
+       * cvs.texinfo (CVS commands): Add comment about whether part of
+       the manual should be organized by command.
+
+1998-11-06  Jim Kingdon
+
+       Clean up various confusions between modules and directories:
+       * cvs.texinfo: In "are you sure you want to release" message,
+       change module to directory.  CVS was changed some time ago.
+       (Tags): "working copy of the module" -> "working directory".
+       (Merging two revisions): Remove unnecessary text "that make up a
+       module".
+       (Recursive behavior): Change "module" to "directory".
+       (Removing files): Likewise.
+       (Tracking sources): Remove "a module" from titles.
+       (Moving directories): Change "module" to "parent-dir".
+       (Inside): Remove "of the module".
+       (Inside): Change "module" to "dir".
+       (Rename by copying): Change "module" to "dir".
+       (Rename by copying): Remove "of the module".
+       (Moving directories): "copy of the module" -> "checked out copy of
+       the directory"; remove second "of the module".  Change "check out
+       the module" to " check out again".
+       (Moving directories): Remove "of the module".
+       (Keyword substitution): "your working copy of a module" -> "a
+       working directory".
+       (CVS commands): Change "module" to "directory".
+       (release examples): "module" -> "tc directory".
+       (commitinfo): "relative path to the module" -> "directory in the
+       repository".
+       (verifymsg): Change "module" to "directory".
+       (Updating a file): "working copy of a module" -> "working directory".
+
+1998-10-25  Jim Kingdon
+
+       * cvs.texinfo (Branches and revisions): Fix error in branch
+       numbering which was introduced with change of 4 May 1997.
+
+1998-10-20  Jim Kingdon
+
+       * cvs.texinfo (Tags): Point to Invoking CVS node so people aren't
+       left wondering what the syntax is.  When introducing -r option,
+       warn people about sticky tags right off.
+       (Tagging the working directory, Tagging by date/tag, Modifying
+       tags, Tagging add/remove): New sections.
+       (Invoking CVS): Adjust tag and rtag to point to the new sections,
+       and to add tag -c which had been omitted.  Delete tag -n; there is
+       no such option.
+       (rtag, tag): Removed; no longer needed.
+       (commit examples): Update xref.
+
+1998-10-15  Jim Kingdon
+
+       * cvsclient.texi (Requests): It is OK to send Set before Root.
+
+1998-10-13  Jim Kingdon
+
+       * cvsclient.texi (Protocol Notes): Remove item about "cvs update"
+       sending modified files to the server; there are some better ideas
+       at http://www.cyclic.com/cvs/dev-update.txt
+       Add mention of www.cyclic.com.
+
+1998-09-30  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Committing your changes, Environment variables):
+       Document VISUAL.
+
+1998-09-27  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Say explicitly
+       that you edit passwd directly, many users get confused by this.
+
+1998-09-24  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Connecting via fork): :fork: may be of interest to
+       users, for example those who prefer CVS to prompt for one log
+       message per checkin, rather than one per directory.
+       (Connecting via fork): Document CVS_SERVER.
+
+1998-09-24  Noel Cragg  <address@hidden>
+
+       * cvs.texinfo (Connecting via fork): new node about the fork
+       access method.
+
+1998-09-22  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Environment variables): Document
+       CVS_IGNORE_REMOTE_ROOT in the CVS 1.10 context.
+       (Moving a repository): Update comments concerning surgery on
+       CVS/Root and CVS/Repository files.
+
+1998-09-21  Noel Cragg  <address@hidden>
+
+       * cvs.texinfo (Environment variables): remove information about
+       CVS_IGNORE_REMOTE_ROOT, since it's no longer used.
+
+1998-09-21  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (config): Mention that CVS 1.10 doesn't have
+       LockDir.
+
+1998-09-18  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Describe $Name and checking out with
+       a revision.
+
+1998-09-16  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: RFC2346 is out; update comment.
+
+1998-09-13  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keyword list, Substitution modes): In describing
+       $Locker and -kkvl, refer to cvs admin -l.
+
+       * cvsclient.texi (Requests): Re-word description of Sticky to
+       allow room for "Ntagname" (or other, future, values).
+
+       * cvs.texinfo (tag): Remove confusing wording about supplying
+       revision numbers "implicitly".
+
+1998-09-10  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (rdiff options): Thanks to the diff library, -u is
+       supported regardless of your diff program.
+
+1998-09-07  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (config): Add LockDir.
+
+1998-09-01  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): "Directory" and "Argument" are
+       requests, not commands.  Likewise for "other-request".  A command,
+       roughly, is a request that uses "Argument"s, but we might want to
+       phase out the use of that term more so than codify it, I'm not sure.
+
+1998-09-01  Noel Cragg  <address@hidden>
+
+       * cvsclient.texi (Requests): added a detailed explanation of the
+       Directory request and how it is handled, both for pre-1.10 and
+       post-1.10 servers.
+
+1998-09-01  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Multiple repositories): Also describe the CVS 1.10
+       behavior.  Looking at a mismatched version of the manual seems to
+       be a reasonably common occurrence.
+
+       * cvs.texinfo (Environment variables): Revert change regarding
+       CVS_SERVER_SLEEP*; having that kind of debugging code in the main
+       CVS is getting out of hand.
+
+1998-09-01  Noel Cragg  <address@hidden>
+
+       * cvs.texinfo (Multiple repositories): brief mention that cvs now
+       handles a working directory composed of multiple repositories.
+       (Environment variables): add note about CVS_SERVER_SLEEP2.
+
+1998-08-21  Ian Lance Taylor  <address@hidden>
+
+       * cvsclient.texi (Text tags): Document importmergecmd tag.
+
+1998-08-20  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Replace out of date URL concerning
+       ISO8601 dates with a more general statement and a few comments.
+
+1998-08-18  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Add "Checkin-time" request.
+
+Sun Jul 26 02:42:20 1998  Noel Cragg  <address@hidden>
+
+       * cvs.texinfo (config): TopLevelAdmin variable.
+
+       * cvsclient.texi (Requests): fix typo.
+
+1998-07-14  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): "remove" is like "add" in the sense
+       that it is the "ci" request which does most of the work.
+
+1998-06-23  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Excluding directories): Fix order of
+       "!first-dir/sdir" and "first-dir" to match what CVS actually
+       accepts.  Reported by Tim McIntosh of sterling.com.
+
+1998-06-09  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Using keywords): Rewrite to be less specific to
+       source code in C.  The old text was worse than that; it was
+       specific to certain versions of GCC (not even current GCC's, I
+       don't think) (reported most recently by Mitchell Perilstein;
+       if memory serves by others before that).
+
+1998-06-08  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Concurrency): Also mention #cvs.lock.  Don't
+       mention #cvs.tfl; it is quite old (before CVS 1.5).
+       (Locks, Backing up, Concurrency): Add more index entries.
+
+1998-06-03  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (Tracking sources): Clarify that the vendor branch
+       is only made the head revision when you import a new file, not any
+       time you import a file.
+
+1998-05-23  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (What is CVS?): info-cvs-request is now at gnu.org
+       and is no longer handled by a human (hallelujah).
+
+1998-05-12  Jim Meyering  <address@hidden>
+
+       * cvs.texinfo: Add an info dir entry.
+       Remove trailing white space.
+
+1998-05-05  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Be more explicit that -m 'COPY' has no
+       effect on binary files.
+
+1998-05-02  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: Add more discussion of the order of the revisions.
+
+1998-04-27  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (loginfo example): Also give example of sending
+       mail.  Use internal variable $USER rather than expecting CVS to
+       set the environment variable $USER.  Change unnecessary 'sed'
+       invocation to 'cat' (it suffered from the same problem in terms of
+       internal variables versus environment variables).
+
+       * cvs.texinfo (Error messages): Add "conflict: removed FILE was
+       modified by second party".
+
+1998-04-20  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Update comment about meaning of
+       HEAD in cvs diff.
+
+1998-04-12  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Dates): Also mention log -d.
+
+       * cvs.texinfo (Invoking CVS): No space is allowed between -r or -w
+       and its argument, for the log command.
+
+1998-04-11  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Dates): New section, explaining the deal with
+       date formats.
+
+1998-04-09  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Global options, Invoking CVS): Fix typo
+       ("files files" -> "files").
+       (Invoking CVS): Make -q and -Q more concise.
+       (Invoking CVS): Use @var for metavariables in "diff -r".
+
+1998-03-17  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (~/.cvsrc): In example, put "checkout" rather than
+       "co" into .cvsrc; we just finished explaining that only the former
+       works!  Thanks to Lenny Foner for reporting this.
+
+       * cvs.texinfo (Copying): Remove this node.  This basically
+       restores the status quo prior to 18 Oct 1996 (before then the node
+       existed but was empty).
+       (before Top): Adjust copyright notice accordingly.
+
+1998-03-12  Tim Pierce  <address@hidden>
+
+       * RCSFILES: Updated description of `hardlinks' newphrases.
+
+1998-03-07  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Tags, Sticky tags, Creating a branch, Accessing
+       branches): Rename release-0-1 tag to rel-0-1 and likewise for
+       release-0-1-patches and release-0-4.  This fixes an overfull hbox.
+       (diff options): Reformat table to fix underfull hboxes and such.
+
+1998-03-07  Tim Pierce  <address@hidden>
+
+       * cvs.texinfo (Editing files, Special Files): Document hardlinks.
+       Various cleanups to PreservePermissions text.
+       * RCSFILES: Document PreservePermissions newphrases.
+
+1998-03-04  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Special Files): Add notes about client/server CVS
+       and hard links across directories.
+
+1998-03-01  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keeping a checked out copy): The magic loginfo
+       incantation isn't too likely to work except on unix.
+
+1998-02-23  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (user-defined logging): Double "@" literal.
+
+1998-02-18  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (user-defined logging): Add taginfo example.
+
+1998-02-04  Tim Pierce  <address@hidden>
+
+       * cvs.texinfo (config): PreservePermissions variable.
+       (Special Files): New.
+       (Editing files): Add note about PreservePermissions.
+
+Tue Feb 10 18:07:35 1998  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Connection): New node.
+
+       * cvsclient.texi (Protocol): Fix typo (lots -> lost).
+
+Sun Feb  8 21:39:22 1998  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Invoking CVS): For admin -b, point to the section
+       where we talk about reverting to vendor branch.
+
+       * cvs.texinfo (Invoking CVS, rdiff options): Document rdiff -V
+       option as obsolete, since it was made a fatal error some time ago.
+
+       * cvs.texinfo (Invoking CVS): Add global options, keywords, and
+       keyword substitution modes.  Wording fix in reference to --help
+       and Index.
+
+Wed Jan 28 23:09:39 1998  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Excluding directories): Add index entry for "!".
+
+28 Jan 1998  Karl Fogel and Jim Kingdon
+
+       * cvsclient.texi (Requests, Responses): document
+       "wrapper-sendme-rcsOptions" and "Wrapper-rcsOption".
+
+Tue Jan 27 18:37:37 1998  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (Excluding directories): New node, documenting how
+       to exclude directories using ! in an alias module.
+
+Sun Jan 18 18:23:02 1998  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Add Kopt request.
+
+Thu Jan  1 17:36:42 1998  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (BUGS, Credits): Change @unnumbered to @appendix now
+       that these are moved from the start to the end.
+
+Sat Dec 27 10:06:56 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add "Too many arguments!".
+
+Fri Dec 26 18:30:26 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (What is CVS?): Just point to the two canonical web
+       sites (Pascal Molli and Cyclic) concerning CVS downloads.  The GNU
+       URL was out of date and GNU only has source distributions anyway.
+
+       * cvs.texinfo: Change bug-cvs address to gnu.org per email from
+       Martin Hamilton.
+
+Tue Dec 23 18:04:09 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Sticky tags): Further cleanups.  Fix thinko
+       (s/subsequent cvs update/& commands/).  Remove "vi driver.c" and
+       commit from example (totally vestigial).  Reword start of
+       paragraph on non-branch sticky tags, so that it better alludes
+       to branch sticky tags.  When introducing sticky tags, make it
+       clear that even people who aren't trying to use sticky tags
+       may need to know how to avoid them.  Restore comment about
+       CVS/Tag files.
+       (Accessing branches): Don't xref to merging here; that is a much
+       more advanced topic and the "but see" wording didn't tell us what
+       to see the xref about.
+
+Tue Dec 23 14:39:08 1997  Karl Fogel  <address@hidden>
+                         and Jim Kingdon
+
+       * cvs.texinfo (Creating a branch): Rewritten.  Introduce with
+       `tag', then discuss `rtag' and `-r'.
+
+Tue Dec 23 10:03:37 1997  Karl Fogel  <address@hidden>
+                         and Jim Kingdon
+
+       * cvs.texinfo: Changes to dehairify the "Sticky tags" situation:
+       (Revisions): "Sticky tags" moved here, description in menu changed
+       to be a little more informative.
+       (Sticky tags): Moved from "Branching and merging" to "Revisions".
+       (Accessing branches): New node in "Branching and merging",
+       explains how to use checkout vs update to retrieve a branch.
+       Text and example inherited from "Sticky tags", but text mostly
+       rewritten.
+       (Sticky tags): Moved under "Revisions", rewritten somewhat (more
+       rewrites to follow).
+       Don't use "-v" in "cvs status" example.
+
+Mon Dec 22 11:46:05 1997  Karl Fogel  <address@hidden>
+                         and Jim Kingdon
+
+       Cleanups related to recent separation of revisions from
+       branching/merging:
+       * cvs.texinfo (Revisions): Take paragraph introducing branches,
+       rewrite it and move it to "Branching and merging".
+       (Branching and merging): Also rewrite merging intro.
+       (Revision numbers): Don't go into detail about branch revision
+       numbers here, just mention that they happen and refer to new
+       node "Branches and revisions".
+       (Branches and revisions): New node under "Branching and merging",
+       inherits text from "Revision numbers".
+       (Creating a branch): Refer to "Branches and revisions" now, not
+       "Revision numbers".
+       (Binary why): Rewrite sentence which refers to merging, so that
+       it isn't specific to branch merging.
+       (Branches motivation): Fix typo (select -> elect).  Add comment
+       about what this node is accomplishing, in general.
+
+Sun Dec 21 20:57:24 1997  Karl Fogel  <address@hidden>
+                         and Jim Kingdon
+
+       This is just moving text; related cleanups to follow.
+       * cvs.texinfo: Changes to put branching and merging together, and
+       keep it all separate from revisions:
+       (Revisions): Renamed from "Revisions and branches".
+       (Branching and merging): Renamed from "Merging".
+       (Branches motivation, Creating a branch, Sticky tags, Magic branch
+       numbers): these subnodes moved to "Branching and merging" from
+       "Revisions".
+       everywhere: Adjusted cross-references to cope with above.
+
+Sun Dec 21 20:36:39 1997  Karl Fogel  <address@hidden>
+                         and Jim Kingdon
+
+       Note that this is just moving text, not changing it:
+       * cvs.texinfo: divide top-level menu into sections.
+       (Multiple developers, Builds, Tracking sources, Keyword
+       substitution): moved to be in "CVS and the Real World" section.
+       (Compatibility): moved to be in "References" section.
+
+Mon Dec 22 08:54:31 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Example): In comment, in citing the BNF style
+       used in many RFCs, cite RFC2234 not RFC822 (now that the former is
+       out).
+
+Sun Dec 21 17:42:22 1997  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (Overview): New node.
+       (What is CVS?, A sample session): Put under Overview.
+       (What is CVS not?): New node under Overview.
+         [text previously was part of "What is CVS?" -kingdon]
+       (Preface): Removed this node and its contents.
+       (Checklist): Removed this node and its contents.
+       (Credits): Now toward end of top-level menu (was under Preface).
+       (BUGS): Now toward end of top-level menu (was under Preface).
+
+Sun Dec 14 10:14:25 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Add MT response.
+       (Text tags): New node.
+
+       * cvs.texinfo (loginfo): Add comment about which commands run
+       loginfo.
+
+Sat Dec 13 08:41:13 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): State that
+       GSSAPI is preferred to kserver.  Try to be clearer about what
+       the term "pserver" means.  Introduce GSSAPI and cite the relevant
+       RFCs.  Discuss the limitations of the existing features in
+       preventing hijacking.
+
+       * cvs.texinfo (GSSAPI authenticated, Kerberos authenticated):
+       Briefly introduce what GSSAPI and Kerberos are.  Be slightly more
+       emphatic about protecting against downgrade attacks.
+
+Fri Dec 12 17:36:46 1997  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (GSSAPI authenticated): New node.
+       (Global options): Document -a.  Mention GSSAPI in -x
+       documentation.
+       * cvsclient.texi (Connection and Authentication): Document GSSAPI
+       authentication.
+       (Requests): Add Gssapi-encrypt and Gssapi-authenticate.
+
+Fri Dec 12 09:27:38 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (cvsignore): Add note about comments and the
+       space-separated nature of the syntax.
+
+Sun Dec  7 09:33:11 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (checkout): Clarify issues regarding updating
+       existing working directories.
+
+Sun Nov 30 20:38:17 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Add comment: we don't document %s.
+
+Mon Nov 24 23:00:09 1997  Karl Fogel  <address@hidden>
+       and Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi: Move Protocol Notes node to the end.
+
+       * cvsclient.texi (Request intro): new node/section.
+       (Protocol): added some introductory material.
+       Rearranged menu into General Conventions, Protocol specification,
+       and Example etc sections.
+       (File Modes): replaces Modes, for consistency.
+
+Sat Nov 22 12:29:58 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Entries Lines): Clarify options in entries line.
+
+Tue Nov 18 09:23:15 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Be more explicit about "export" and
+       entries lines.
+
+       * Makefile.in (DISTFILES): Remove DIFFUTILS-2.7-BUG.
+
+Mon Nov 17 18:20:47 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (tag options): Expand comment with reference to FAQ.
+
+Fri Nov 14 11:02:37 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Update discussion of "dying gasps".
+
+       * cvs.texinfo (tag options): Add FIXME comment about renaming tags.
+
+Thu Nov 13 10:20:39 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Remove also has a -f option with a
+       different meaning than most.
+
+Wed Nov 12 21:57:40 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File permissions, Connecting via rsh, Environment
+       variables): When putting an environment variable in the index, say
+       it is an environment variable.  Don't index the same name twice.
+
+       * cvs.texinfo: Many edits to reflect the fact that CVS no longer
+       invokes external RCS programs.
+
+Tue Nov 11 15:15:49 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Locks, CVS in repository): New nodes, document the
+       locking scheme and briefly outline CVS and CVS/fileattr.
+
+Sun Nov  9 17:39:41 1997  Jim Kingdon  <address@hidden>
+
+       * DIFFUTILS-2.7-BUG: Removed; the bug is fixed and the testcases
+       are incorporated into sanity.sh.
+
+Sat Nov  8 09:49:38 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Binary why): Try to be a little clearer about how
+       merges fit into CVS.  Say it may be error prone to have developers
+       doing merges manually.
+
+Tue Nov  4 13:02:22 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (admin options): Add discussion of what happens if
+       there are tags.
+
+Fri Oct 31 00:04:09 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (admin options): Rewrite discussion of -o to
+       hopefully be clearer and to also document the new :: syntax.
+       (admin examples): Removed; incorporated into admin options.
+       (Invoking CVS): Wording fix for admin -o.
+
+       * cvs.texinfo (Binary why): New node, talks about diff and merge.
+       (Binary howto): Renamed from Binary files.
+       (Binary files): Now just contains an introduction.
+
+       * cvs.texinfo (Error messages): Add "could not merge" message.  In
+       discussion of "Binary files . . . differ" message, mention that
+       this is only an issue with old verisons of CVS.
+
+Thu Oct 30 15:55:21 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add "authorization failed" message.
+
+Wed Oct 29 11:52:05 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Remove fake RCSid; we decided to remove rcsid's a
+       while ago.  Cleanups suggested by Stephen Gildea (CVSROOT/passwd
+       has 2 or 3 fields; /user -> /usr; noone -> no one; in used -> in
+       use).  Add comment about making compilers happy about rcsids.
+
+Sat Oct 25 00:58:24 1997  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: rcsfile.5 is correct about {num} after next being
+       optional.
+
+Wed Oct 22 10:08:27 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add message about unrecognized
+       response from cvs server.
+
+1997-10-11  Noel Cragg  <address@hidden>
+
+       * cvs.texinfo (checkout options): describe how the `-d' and `-N'
+       flags really work.  Give examples.
+       (export options): refer the reader to the descriptions for `-d'
+       and `-N' in checkout options, since the behavior is the same.
+
+Thu Oct  9 12:01:35 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (log options): Add comment about "cvs log -r".
+
+Wed Oct  8 10:24:19 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (rtag options): Add comment about how this is
+       confusing.
+
+Tue Sep 30 12:31:25 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): Add comment about
+       Entries.Static.
+
+Thu Sep 25 23:52:57 1997  Noel Cragg  <address@hidden>
+
+       * cvsclient.texi (Responses): description of Module-expansion was
+       missing a carriage return after the @item clause.
+
+Wed Sep 24 12:04:42 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Remote repositories): Add comment about pserver
+       vs. having users create their own repositories.
+
+Sat Sep 20 00:59:53 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Change title from "RCS Keywords" to
+       "Keyword list" as it is CVS that expands them.
+       (Avoiding substitution): Change "rcs" to "cvs", in the context of
+       the program which expands keywords.
+
+Fri Sep 19 22:57:24 1997  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: Grammar fix in first paragraph.  Re-word section on
+       dead newphrase.  Add item about what it means if "expand" is omitted.
+
+       * cvs.texinfo (Magic branch numbers): Change example branch number
+       from 1.2.3 to 1.2.4; CVS assigns even branch numbers and I don't
+       think vendor branches are very relevant to this example.
+
+Wed Sep 17 17:21:33 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (admin options): Add comment about "cvs admin -b"
+       (with no argument to the -b).
+
+       * RCSFILES: "next" is optional, not required.
+
+Tue Sep 16 15:13:22 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Binary files): Add comment about another possible
+       way to auto-detect binary files.
+
+Sun Sep 14 12:38:56 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Conflicts example): Adjust text and comments
+       regarding conflict markers to reflect change in CVS.
+
+Wed Sep 10 12:44:04 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Server requirements): Add comment about server
+       disk usage in /tmp.
+
+       * cvs.texinfo (Common options): More comments about date formats:
+       "now", "yesterday", and the "3 weeks ago" family.
+
+Tue Sep  9 13:09:58 1997  Jim Kingdon  <address@hidden>
+
+       * DIFFUTILS-2.7-BUG: Eggert patch is preferred to Rittle one.
+
+Sun Sep  7 18:38:23 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (history options): Revise -e to say that it includes
+       future record types (and remove out of date list of what record
+       types it implies).
+
+       * cvs.texinfo (Environment variables): Expand/correct discussion
+       of HOME, HOMEDRIVE, and HOMEPATH.
+       (Error messages): Add "could not find out home directory".
+
+       * cvs.texinfo (update options): Reword -r doc to hopefully be
+       clearer that it takes either numeric or symbolic revision.
+
+       * cvs.texinfo (syntax): Add comment about how regexp syntax may
+       be, er, creatively altered, by configure.in.
+
+Sat Sep  6 11:29:15 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): Document Baserev and
+       Baserev.tmp.
+       (Working directory storage): Adjust comment regarding CVS/* being
+       text files.
+
+Fri Sep  5 14:42:39 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (BUGS): Remove mention of unsupported resources page
+       on http://www.cyclic.com, as it might go away in a future
+       reorganization.
+
+       * DIFFUTILS-2.7-BUG: Further info from Eggert.
+
+1997-09-05  Paul Eggert  <address@hidden>
+
+       * DIFFUTILS-2.7-BUG: Explain how this bug will probably be
+       fixed in the next diffutils release.
+
+Thu Sep  4 17:09:57 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Binary files): Reword the section on what you need
+       to do with cvs admin -kb to hopefully be a bit clearer.  Still not
+       ideal (see comment).
+
+       * cvs.texinfo (modules): Break node into separate nodes for alias
+       modules, regular modules, ampersand modules, and options.  Expand
+       text with more examples and explanations.  Add index entries.
+
+Wed Sep  3 14:49:43 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Multiple developers): Add idea about cvs editors
+       and reserved checkouts.
+
+Sun Aug 31 19:36:21 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Rewrite paragraph on cvs add on a
+       filename containing '/'.
+
+Thu Aug 28 14:13:50 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (diff options): Add comment about "cvs diff"
+       vs. "cvs diff -r HEAD".
+
+       * cvs.texinfo (Global options): Add comment about -w not
+       overriding cvs watch on.
+
+Wed Aug 27 08:09:31 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Grammar fix ("under
+       as the username" -> "as the username").
+
+       * cvs.texinfo: Fix doubled 'the the' typos.  Reported by
+       address@hidden
+
+Tue Aug 26 12:25:42 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Checklist): Reword xref to point to Binary files
+       rather than Keyword expansion.  Credit goes to address@hidden
+       (Jeff Breidenbach) for reporting the problem.
+
+Mon Aug 18 17:23:18 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (modules): Suggest taginfo instead of -t.  Add
+       comment with some of the reasons.  Add comment about -u and -i
+       problems.
+
+Sat Aug 16 10:19:06 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add note about how "could not
+       check out foo.c" seems to also have been observed on Irix.
+
+Fri Aug 15 17:28:01 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add "could not check out foo.c".
+
+Thu Aug 14 23:57:53 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Document new -m 'COPY' behavior.
+
+Tue Aug 12 20:56:40 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Sticky tags): Add comment about how we should be
+       documenting sticky tags.
+
+Fri Aug  8 10:01:03 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File status): Add comment about "working revision"
+       in cvs status for a locally removed file.
+
+Thu Aug  7 22:53:45 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (From other version control systems): Mention
+       pvcs_to_rcs alongside sccs2rcs.
+
+Tue Aug  5 17:22:50 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Compatibility): Add comment about how CVS probably
+       could be detecting the case of dead files killed by CVS 1.3.
+
+       * cvs.texinfo (From other version control systems): Add paragraph
+       about converting from systems which don't export RCS files.
+
+Sun Aug  3 21:03:14 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Cite RFC1321 for MD5.
+
+       * cvs.texinfo (A sample session): Nuke index entry for "A sample
+       session".  The fact that this isn't "sample session" is totally
+       bogus, but in general the table of contents is probably better for
+       this entry.
+
+       * cvs.texinfo (Error messages): Add comment about wording of error
+       concerning unknown -x option.
+
+       * cvs.texinfo (Wrappers): Add comment about absolute filter pathname.
+
+Thu Jul 31 14:40:15 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Use @ref not @xref when reference is not at the
+       start of a sentence.  Avoids capitalizing "See" when we shouldn't.
+       Fixes to other similar xref problems.
+
+Wed Jul 30 19:30:31 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): Don't use @samp
+       on BEGIN AUTH REQUEST and friends.  Avoids overfull hbox.
+
+Fri Jul 25 10:40:22 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Remove obsolete sentence regarding
+       using Directory instead of Repository enabling alternate response
+       syntax.
+
+       * cvsclient.texi (Response intro): Add discussing of file updating
+       responses and file update modifying responses.
+       (Responses): Refer to this description rather than trying to
+       describe it in each place.  The descriptions in each place were
+       somewhat incomplete and didn't get updated when new file updating
+       responses were added.
+
+       * cvsclient.texi: Split node Responses into Response intro,
+       Response pathnames, and Responses.
+
+Thu Jul 24 23:13:24 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (config): Document SystemAuth.
+       (Password authentication server): Mention SystemAuth.
+
+Mon Jul 21 08:57:04 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (DISTFILES): Add DIFFUTILS-2.7-BUG.
+
+Sun Jul 20 17:55:52 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (admin options): For options with optional
+       arguments, specify that there can be no space between the option
+       and its argument.  For -N, add xref to Magic branch numbers.  For
+       -t, talk about reading from stdin.  Comment changes.
+
+Sat Jul 19 22:28:47 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Preface): Make section titles more verbose.
+       Likewise for the menu.
+
+Fri Jul 18 08:41:11 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): No need for an external patch if
+       server and client are current.  Add comment with more thoughts
+       about messages specific to old versions of CVS.
+
+       * cvs.texinfo (Error messages): Add "cannot start server via rcmd".
+
+       * cvs.texinfo (Error messages): Add "cannot open CVS/Root" for cvs
+       init.
+
+       * cvs.texinfo (Error messages): Add "missing author".
+
+Tue Jul 15 16:47:08 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Fix documentation of $Log to reflect
+       the fact that we no longer use the comment leader.
+       (admin options): Fix documentation of $Log.
+       (admin examples): Remove example concerning comment leader, since
+       the example no longer does what it claims to.
+       (admin, admin options): Fix various parts of the documentation to
+       not refer to this being implemented via RCS.  Say nastier things
+       about -I and -x.  Add comments about options to "rcs" which we
+       don't document.
+
+Mon Jul 14 00:04:32 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): The "cannot change permissions on
+       temporary directory" error has been happening in various test cases.
+
+Sat Jul 12 11:12:18 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Repository files): Further comments about leading
+       "-" in filenames.
+
+Fri Jul 11 21:30:11 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Repository files): Add comment about legal
+       filenames.
+
+Wed Jul  9 18:05:26 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Add Mbinary response.
+
+Mon Jul  7 12:04:01 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Goals): Add previously unwritten goal about only
+       one way to do each operation.
+
+       * cvs.texinfo (File permissions): Rewrite paragraph on setuid to
+       be more verbose and less unix-specific.
+
+Sat Jul  5 03:16:38 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): When we said to
+       "ignore" an unrecogized code we mean to treat it as nonspecific,
+       not to ignore the response.
+
+       * cvsclient.texi (Example): Refer to RFC2119 when referring to
+       terminology of MUST, SHALL, &c.
+
+       * cvs.texinfo (Windows permissions): New node.
+
+Fri Jul  4 15:27:43 1997  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (Common options): Fix typo (avaliable for
+       available).
+
+Tue Jul  1 09:19:02 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Server requirements): Discuss memory used by diff.
+
+       * cvs.texinfo (Substitution modes): Add comment about -A resetting
+       both sticky tags/dates and sticky options.
+
+       * cvs.texinfo (File permissions): Add paragraph concerning
+       ownership of the RCS files.
+
+       * cvs.texinfo (Working directory storage): Relative repositories
+       in CVS/Repository are legal.
+
+Mon Jun 30 10:48:21 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Top): Add menu item for Password scrambling.
+
+       * cvs.texinfo (Committing your changes): Add comment concerning
+       documentation of message prompting.
+
+Fri Jun 27 11:20:34 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Password scrambling): New node.
+       (Connection and Authentication): Adjust accordingly.
+       (Protocol Notes): Add long discussion of character sets and
+       password scrambling.
+
+       * cvs.texinfo (Repository files): Also mention doc/RCSFILES in
+       documenting RCS file format.
+       (CVSROOT, storage of files): New node.
+
+Thu Jun 26 09:18:15 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File permissions): xref to the pserver thing about
+       permissions in CVSROOT.
+       (Kerberos authenticated): Explicitly mention kerberos rsh.
+       Add various index entries for "security, <foo>".
+
+Wed Jun 25 13:39:16 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Rewrite comments concerning HEAD
+       and testcases and solution.  Changing HEAD might be too big a
+       change; might be better to phase it out.
+       (Common options, Tags): Add index entries for HEAD and BASE.
+
+Tue Jun 24 09:37:26 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add assertion failed.
+
+       * cvsclient.texi (Connection and Authentication): Add "E" and
+       "error" as responses in authentication protocol.  The server
+       already was in the (formerly bad) habit of sending them, and we
+       might as well implement this in the client and document it.
+
+       * cvs.texinfo (Password authentication security): Note about
+       permissions on $CVSROOT also applies to its parent and so on up to
+       /.
+
+Mon Jun 23 18:28:18 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Creating a repository): xref to Server requirements
+       for more details on memory, CPU.
+       (Server requirements): Add xref to Creating a repository regarding
+       disk space.
+
+       * cvs.texinfo (Read-only access, Password authentication
+       security): The known holes which let a read-only user execute
+       arbitrary programs on the server are gone.
+
+       * cvsclient.texi (Protocol Notes): Remove multisite item; it is
+       replaced by item 186 in TODO.  Add a general reference to TODO.
+       Rewrite accordingly the sentence about multisite in the item
+       concerning sending modified files in "cvs update".
+
+Fri Jun 20 17:00:20 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add "binary files differ" when
+       trying to check in a binary file.
+
+Fri Jun 20 14:01:23 1997  David J MacKenzie  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Fix various formatting, spelling, stylistic, and
+       factual errors.
+
+Thu Jun 19 07:11:33 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (config): New node.
+       (Password authentication server): Talk about RCSBIN in config as
+       an alternative to -b global option.
+       * cvsclient.texi (Requests): Specify when Root can/must be used.
+
+       * cvs.texinfo (Error messages): Add
+       "*PANIC* administration files missing".
+
+       * cvs.texinfo (Password authentication server): Mention
+       permissions on $CVSROOT and $CVSROOT/CVSROOT as part of the
+       installation process.
+       (Password authentication security): Clarify that permissions issue
+       applies to $CVSROOT as well as $CVSROOT/CVSROOT.
+
+Wed Jun 18 00:03:25 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication security): Add paragraph
+       on write permissions of $CVSROOT/CVSROOT.
+
+       * cvs.texinfo (Adding and removing): New node.  Move Adding files,
+       Removing files, Removing directories, Moving files, and Moving
+       directories under it.
+
+       * cvs.texinfo (Removing directories): Add sentence about how
+       one doesn't remove the directory itself.
+
+       * cvs.texinfo (Password authentication server): Document
+       --allow-root.
+
+Tue Jun 17 09:58:03 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add "unknown option" from RCS.
+
+Fri Jun 13 12:11:09 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Global options): Add note about how -n might affect
+       CVS's output.
+
+Thu Jun 12 09:33:40 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Other problems): New node.  Add discussion of
+       problem with old rcsmerge.
+
+       * cvs.texinfo (Environment variables): Add CVSUMASK.
+
+Mon Jun  2 18:39:57 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Moving a repository): New node.
+
+Tue May 27 18:27:57 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): Add comment about
+       timestamps.
+       * cvsclient.texi (Responses): Add Mod-time.
+
+Mon May 26 10:04:32 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Add comment concerning -t/-f and
+       client/server.
+
+Sun May 25 00:08:39 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Multiple vendor branches): New node.
+       (First import, import options, Invoking CVS): xref to it.
+
+Sat May 24 23:47:47 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File permissions): Add comment about group
+       ownership in repository and setgid bit on directories.
+
+Fri May 23 17:14:05 1997  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: Fix typo in dead newphrase description ("an" -> "a").
+
+Fri May 23 16:33:38 1997  Ian Lance Taylor  <address@hidden>
+
+       * RCSFILES: Mention dead as a newphrase.
+
+Fri May 23 09:45:39 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Builds): In comment, update URL of mk.
+
+Thu May 22 09:25:56 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add comment about yet another way
+       to produce a "cannot open CVS/Entries for reading" error.
+
+Tue May 20 17:54:55 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add item about EINVAL in rename.
+
+Mon May 19 00:21:49 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keywords in imports): New node.
+       (Tracking sources): Add comment about what a "vendor" is.
+
+       * cvs.texinfo (Keyword substitution): Where it refers to RCS
+       having a certain behavior, rewrite to not pass the buck like
+       that.  Saying "RCS file" is still OK; that is a legit CVS
+       concept.  A few other minor edits.
+
+Sun May 18 10:24:57 1997  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: Add list of known newphrase extensions.
+
+       * cvs.texinfo (From other version control systems): Fix typo
+       ("systesm" -> "systems").
+
+       * cvs.texinfo (Exit status): New node.
+       (diff): Replace text on exit status with an xref to that node.
+       The previous text documented a behavior which CVS no longer
+       implements.
+       (user-defined logging, commitinfo, verifymsg, Error messages):
+       Add index entries for "exit status, of <something which CVS invokes>".
+
+       * cvs.texinfo (Administrative files): Add comment concerning
+       writing triggers and particularly performance issues.
+
+       * cvs.texinfo (rtag options, tag options): Don't discuss what old
+       versions did with respect to the behavior now controlled by -F; we
+       don't try to document old versions here.  Add comments concerning
+       how -F should be documented.  Add index entries for "renaming
+       tags" and such pointing to "tag -F".
+
+Wed May 14 12:16:19 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Binary files): Add text and comment about
+       automatically detecting binary files.
+
+Mon May 12 11:55:07 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): Add item about
+       future expansion.
+
+Thu May  8 11:08:34 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Update imports): Add comment about wdiff
+       vs. fsf/wdiff in example.
+
+Wed May  7 13:52:47 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (checkout): Add comment about need for example
+       regarding what the "module" argument means.
+
+Tue May  6 18:02:27 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (History browsing): Add comment about looking at old
+       revisions.
+
+Tue May 06 15:05:00 1997  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: More additions/corrections for -R due to recent
+       changes.
+
+Mon Dec 16 15:18:00 1996  Larry Jones  <address@hidden>
+
+       * cvs.texinfo: Added/corrected documentation for -R.  (Minor edits
+       by Jim Kingdon to reflect recent changes in cvs.texinfo)
+
+Sun May  4 14:38:35 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Compatibility): Add comment about "D" lines in
+       Entries.
+
+       * cvs.texinfo (CVS commands, diff): Change "run diffs" to "show
+       differences"; the former is jargon.
+       (CVS commands): Don't refer to "rlog" in describing what log does.
+
+       * Makefile.in (cvsclient.dvi cvsclient.aux): Run texi2dvi rather
+       than (poorly) emulating it ourself.
+
+       Fix overfull and underfull hboxes:
+       * cvs.texinfo (What is CVS?): Add words "the newsgroup" before
+       "comp.sources.unix".
+       (Credits): Put list of people in @display.
+       (Repository files): Put /usr/local/cvsroot in @example.
+       (Connecting via rsh): Change "anklet" to "toe" in example.
+       (Kerberos authenticated, Password authentication client, Password
+       authentication server): Change "brickyard" to "yard" in example.
+       (Read-only access): Use @example and refer to files with a shorter
+       pathname.
+       (Server temporary directory): Use @example for pathname.
+       (Watches Compatibility): Add phony line break.
+       (Revision numbers): Remove revision 1.2.2.2 and tighten up the
+       spacing for "the main trunk".
+       (Tags, Creating a branch): Change /usr/local/cvsroot to /u/cvsroot.
+       (Merging more than once): Tighten up spacing for "the main trunk".
+       (Recursive behavior): Put long command in @example.
+       (First import): Remove word "called".
+       (Common options): Put long URL in @example.
+       (loginfo example): Use fewer hyphens in example.
+       (Variables): Put long command name in @example.
+       (Copying): Add line break.
+       (Administrative files): Remove "the" from title.
+       (Copying): Change "@unnumberedsec" to two "@heading"s.
+       * cvsclient.texi (Requests): Change /home/kingdon/zwork/cvsroot to
+       /u/cvsroot.
+       (Example): Add word "file".
+       (Example): Change line breaks in example log message.
+       (Example): Change /home/kingdon/testing/cvsroot to /u/cvsroot.
+
+       * cvs.texinfo (Credits): Don't refer to appendix A and B, they
+       have been renumbered.  Reword so that it works whether the text in
+       question has since been rewritten or not.
+
+       * cvs.texinfo (BUGS): Rewrite to reflect the many different ways
+       that one might want to handle bugs.  Move information on Signum
+       and Cyclic from Preface to here.  Remove information on known
+       deficiencies in the manual (some of them I'm not sure were really
+       things in need of improvement; others were too general to be
+       useful).  For the most part FIXME comments are probably better for
+       this.  Remove "Linkoping, October 1993, Per Cederqvist"--many
+       parts of the manual are now from other people, dates, and places.
+       (What is CVS): For the most part, just refer to BUGS concerning
+       bug-cvs.  Also tell people how to subscribe to bug-cvs.
+       (Credits): Say that list is not comprehensive and refer to
+       ChangeLog.
+
+Sat May  3 10:51:58 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (rcsinfo): Add comment about checkoutlist and
+       related topics.
+
+       * cvs.texinfo (Server temporary directory): New node.
+
+       * cvs.texinfo (Backing up): New node.
+
+       * cvs.texinfo (Repository): Be more explicit about the repository
+       and the working directory not being subdirectories of each other.
+
+Mon Apr 28 11:12:56 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Removing files): Use "*.c" not "?.c" in example;
+       the former should be good for both unix and DOS-like operating
+       systems.  Document -f option.  Refer to Invoking CVS for a full
+       list of options.  Add a few comments.
+
+       * cvs.texinfo (Invoking CVS): For checkout and update, call them
+       "sticky options" not "sticky kopts".
+
+       * cvs.texinfo (Editing files): Add additional comments on get
+       vs. checkout.
+
+Sun Apr 27 16:17:06 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (commit): Only document the current flags (where -f
+       is force and -F file gets the message from a log file).  We had
+       partly made this change on 9 Feb 1997, but some places got missed.
+
+       * RCSFILES: Add discussion of the common concern regarding
+       applying deltas to get to a branch head.
+
+       * DIFFUTILS-2.7-BUG: New file.
+
+       * cvs.texinfo (File status): Refer to "Invoking CVS", not
+       "status", for status options.  Add paragraph about how "cvs -n -q
+       update" is another way to display file status.
+       (update examples): Removed; it had contained the "cvs -n -q
+       update" material.
+       (Invoking CVS): xref to "File status" and "Tags", not "status" and
+       "status options".
+       (status, status options): Removed.
+       (update options, checkout options): xref to "Invoking CVS"
+       not "status".
+
+       * cvsclient.texi (Requests): Clarify how long-lived Sticky and
+       Static-directory are.
+
+       * cvs.texinfo: Add @finalout.
+
+       * cvs.texinfo (Error messages): Add "cannot change permissions on
+       temporary directory" message.
+
+Wed Apr 23 12:53:45 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Document "add" in much more detail.
+
+Wed Apr 23 00:38:17 1997  Ian Lance Taylor  <address@hidden>
+
+       * cvsclient.texi (Requests): Correct small typo (`a' for `as').
+
+Tue Apr 22 14:23:32 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Protocol Notes): Expand ideas on multisite
+       features somewhat.  Add items about the network turnarounds for
+       pserver authentication and for protocol negotiation.
+
+Mon Apr 21 08:54:48 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): Describe what to do
+       with Entries.Log in more detail.
+
+       * cvsclient.texi (Responses): Say "CVS 1.9 and earlier" rather
+       than "pre version 1.10".  The latter increases confusion by
+       referring to a version which doesn't exist yet.
+
+Mon Apr 21 01:02:53 1997  Ian Lance Taylor  <address@hidden>
+
+       * cvsclient.texi (Responses): Document Rcs-diff.  Indicate that
+       Patched is now deprecated in favor of Rcs-diff.
+
+Sun Apr 20 23:42:03 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): Add note about format
+       of timestamp and the "Result of merge" concept.
+
+Sat Apr 19 13:42:33 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): It is OK for Copy-file to implement
+       a rename instead of a copy.
+
+Fri Apr 18 12:05:48 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Assigning revisions): Say that -r implies -f.
+
+Thu Apr 17 16:34:14 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (From other version control systems): Add comment
+       about CMZ and PATCHY.
+
+Wed Apr 16 12:35:25 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Add paragraph describing how
+       Copy-file relates to Merged.
+       (Responses): Add paragraph about how it is the server which
+       worries about not clobbering the user's file.
+
+Tue Apr 15 00:57:31 1997  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: Add notes on keyword expansion.
+
+       * cvs.texinfo (Rename by copying): Comment out seemingly erroneous
+       text regarding the revision number that the new file starts with.
+
+Mon Apr 14 12:37:35 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Clients should try to send
+       notifications right away.
+
+       * cvsclient.texi (Requests): For Notify request, clarify a few
+       future expansion situations.  Specify the format of the time.
+
+       * cvsclient.texi (Requests): Clarify that arguments to co, rdiff,
+       and rtag are module names (and how that differs from file/directory
+       names).
+
+       * cvsclient.texi (Responses): Say that servers need to create
+       directories one at a time.
+
+Sat Apr 12 09:32:58 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Committing your changes): Say that editor default
+       is notepad (not vi) for Windows NT/95.  Be more clear about what
+       "cvs commit" does.  Add paragraph about timestamps.
+       (Environment variables, Global options, editinfo):
+       Add xrefs to that node.
+
+Thu Apr 10 15:48:39 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add "could not patch; will refetch".
+
+Wed Apr  9 15:21:11 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Working directory storage): New node.
+
+       * cvs.texinfo (Error messages): Add comment about "cvs co ." on
+       NT.
+
+Tue Apr  8 14:44:26 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Add diff3 usage message.
+
+Sun Apr  6 19:03:01 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Removing files): Add comment about undoing a "cvs
+       remove".
+
+       * cvsclient.texi (Requests): Explicitly mention the idea of
+       deferring "Notify" requests.
+
+Tue Apr  1 07:51:38 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Add paragraph about directory
+       creation and empty directories.
+
+       * cvs.texinfo (Binary files): Add comment about binary files and
+       merges.
+
+       * cvsclient.texi (Requests): Add discussion of when to send
+       Is-modified.
+
+       * cvsclient.texi (Requests): Sending Is-modified is enough to
+       prevent the file from being considered "lost".
+
+Sun Mar 30 00:31:47 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Add Is-modified request.  Clarify
+       order of Entry relative to Unchanged or Is-modified (might as well
+       specify the same thing vis-a-vis Modified while we are at it).
+
+Sat Mar 29 12:32:40 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi: Change "newline" to "linefeed".  Most of the
+       document already reads "linefeed" and that is what is intended.
+       (File transmissions): New node, moved here from Requests.
+       (Goals, Filenames, File transmissions, new node Strings): Add
+       discussion of character sets and what we expect from the transport
+       protocol we run on.
+
+       * cvsclient.texi (Requests): Add paragraph about each Directory
+       request specifying a new local-directory and repository.
+
+       * cvsclient.texi (Requests): Add paragraph about renaming
+       local-directory in Directory request.  Use "local-directory"
+       consistently instead of "working directory", for clarity.
+
+Fri Mar 28 13:59:59 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Make it clear that there is no
+       guarantee that one will get Clear-sticky instead of another
+       response.  Also clarify that clients will tend to store the
+       repository in a long-term way.
+
+       * cvsclient.texi (Requests): Further clarify Directory example.
+
+       * cvsclient.texi (Requests): Add example and further explanation
+       of what expand-modules is for.
+
+       * cvsclient.texi (Requests): Add example, hopefully making it
+       clearer what REPOSITORY and LOCAL-DIRECTORY mean to Directory.
+
+       * cvs.texinfo (Attic): New node.
+       (rtag options): Adjust discussion of -a accordingly.
+       (Repository files): Adjust accordingly.
+
+Thu Mar 27 09:57:05 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): Give exact wording of broken pipe
+       error message.
+
+       * cvs.texinfo (history database): Add comment about various
+       problems with the history file.
+
+       * cvs.texinfo (Common options): The ISO8601 web page we had
+       mentioned in a comment is no more.  Replace it with a new one.
+
+       * cvs.texinfo (Common options): "cvs history" also outputs dates.
+
+Wed Mar 26 10:54:21 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): "cvs editors" also outputs dates.
+
+       * cvs.texinfo (Outside): Fix paragraph which said that revision
+       numbers start at 1.0.  First of all, it is 1.1.  Second of all, it
+       is sometimes 2.1, 3.1, etc.  Third of all, the xref should be to
+       Assigning revisions not commit options.
+
+       * cvs.texinfo (Outside): Comment out sentence which incorrectly
+       stated that "cvs add" can operate on "foo/bar.c".
+
+Tue Mar 25 22:21:29 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Error messages): New node.
+       (Magic branch numbers): Move from Troubleshooting to Revisions and
+       branches.  The former placement never made any sense to me.
+       (Revision numbers): Remove "Main trunk (intro)" index entry now
+       that this node is right next to the other "main trunk" index
+       entry.
+       (BUGS): Very briefly mention reporting bugs in CVS.
+
+       * cvs.texinfo (Compatibility): Add comment about "Nfoo" in CVS/Tag.
+
+Mon Mar 24 13:50:24 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Creating a branch): Add comment about -r in branch
+       example.
+
+       * cvsclient.texi (Responses): Discuss meaning of tagspec and
+       future expansion in Set-sticky.  The behavior described is the one
+       which CVS has always implemented.
+
+Fri Mar 21 14:19:05 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Revise meaning of "Case" per change
+       to CVS.
+
+Tue Mar 18 15:50:47 1997  Jim Kingdon  <address@hidden>
+
+       The following reorganization hopefully presents numeric revisions
+       in a slightly more coherent fashion.  The only new material is the
+       paragraph about assigning revisions for added files.
+       * cvs.texinfo (A sample session): Bring in a sentence from Basic
+       concepts node, defining a repository.
+       (Revisions and branches): Renamed from Branches (it has always
+       covered non-branch tags too).  Bring in nodes "Revision numbers" and
+       "Versions revisions releases" from Basic concepts, the former in
+       particular was way too detailed for an intro section.
+       (A sample session): Add comment about how we need an introduction
+       and what might go into one.  Also bring in the paragraph from
+       Basic concepts introducing modules, but comment it out.
+       (Viewing differences): Add comment about
+       (Basic concepts): Removed; its content has been farmed out as
+       described above, and as the comment said, it was fundamentally
+       flawed.
+       (Assigning revisions): New node.  Incorporates the "New major
+       release number" subsubsec which was in "commit examples".  Add
+       paragraph concerning how CVS assigns revisions on added files.
+       (commit options): Refer to that node under -r.
+       (Invoking CVS): Add comment about text for -r.
+
+Tue Mar 18 13:04:30 1997  Jim Meyering  <address@hidden>
+
+       * Makefile.in: (install-info): Depend on installdirs.
+
+Sun Mar 16 12:37:12 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File permissions): CVSUMASK now works for RCS
+       files; but it is (still) awkward for client/server CVS.
+
+Sat Mar 15 17:41:12 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Magic branch numbers): Add comment about where this
+       should go.
+
+Thu Mar 13 09:11:36 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Credits): Fix grammatical mistake ("manual about"
+       -> "manual is about").  Reported by Philippe De Muyter.
+
+Sun Mar  9 09:06:40 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File permissions): Add comment about val-tags and
+       CVSUMASK.
+
+Sun Mar  2 12:33:26 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (From scratch): Add comment about creating
+       directories with add rather than import.
+
+       * cvs.texinfo (Creating a repository): Add comment about how this
+       somewhat duplicates Server requirements.
+
+       * cvs.texinfo (Connecting via rsh): Add comment about rsh
+       vs. remsh.  Also wording fix ("incorrect" -> "inapplicable").
+
+       * cvs.texinfo (Outside): Add comment about renames and annotate.
+
+       * cvs.texinfo (Server requirements): New node.
+
+Thu Feb 27 15:20:49 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Multiple developers): Reword section on "cvs admin
+       -l".  As nearly as I can tell based on when it came up on info-cvs
+       and other contexts, people who are into reserved checkouts
+       generally find that cvs admin -l is OK.  Add a bunch more notes
+       (inside @ignore) about reserved checkout implementation ideas.
+
+Sun Feb 23 16:12:03 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Add various additional comments
+       about date formats.
+
+       * RCSFILES: Remove diff for Id and explain it in words instead.
+       The previous values for Id had been clobbered by keyword expansion
+       on the RCSFILES file itself.
+
+Sat Feb 22 14:16:28 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (DISTFILES): Fix typo (missing backslash).
+
+Fri Feb 21 23:08:38 1997  Jim Kingdon  <address@hidden>
+
+       * RCSFILES: New file.
+       * Makefile.in (DISTFILES): Add RCSFILES.
+
+20 Feb 1997  Lenny Foner  <address@hidden>
+
+       * cvs.texinfo (Checklist): Fix typo ("keword" -> "keyword").
+
+Thu Feb 20 21:57:05 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keeping a checked out copy): Add "web" to index.
+
+Wed Feb 12 18:44:16 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication client, Invoking CVS):
+       Document "cvs logout" command.
+
+Tue Feb 11 20:42:45 1997  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (commit options): Document that the -f option to
+       commit disables recursion.
+
+Sun Feb  9 13:58:59 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (diff options): Document all the options we pass
+       through to diff.  Remove paragraph about -D sometimes meaning
+       --ifdef since that is no longer true.
+
+       * cvs.texinfo (Multiple developers): Add lengthy comment about
+       reserved checkout design issues.
+
+       * cvs.texinfo (Wrappers): Add paragraph about timestamps.
+
+       * cvs.texinfo (commit options): Don't try to document what CVS 1.3
+       does with -f and how recent versions differ: 1.3 is pretty old
+       anyway, we generally only try to document the current version, and
+       the way it was described here was pretty confusing.
+       (Environment variables): Likewise for CVSEDITOR.
+
+       * cvs.texinfo (import output): Add index entries for symbolic
+       links.  Add brief mention of whether behavior should be
+       different.  Add comments on other symbolic link issues.
+
+Wed Feb  5 13:02:37 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Concurrency): Add comment about commit/commit
+       atomicity.
+
+Mon Feb  3 10:55:41 1997  joel boutros <address@hidden>
+
+       * cvs.texinfo (Connecting via rsh): Fix typo (programs -> problems).
+
+Fri Jan 31 12:18:47 1997  Ian Lance Taylor  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): Correct typo
+       (``sent'' for ``send''), and rewrite sentence for clarity.
+
+Fri Jan 24 10:31:57 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (File status): Change "Unresolved Conflict" to "File
+       had conflicts on merge" per change to CVS.
+
+Sun Jan 19 16:21:17 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (admin): Add comments about "group" and "compiled in
+       value".  At least one info-cvs poster was confused by this.
+
+Thu Jan 16 17:54:51 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): It is just -t/-f which doesn't work
+       client/server.  -k *does* (well, except for the problem with
+       import noted in BUGS).  -m I don't know and I doubt anyone cares.
+
+Mon Jan 13 15:41:02 1997  Karl Fogel  <address@hidden>
+
+       * cvs.texinfo (Read-only access): rephrase to imply that there may
+        be other administrative files, besides history and locks, which
+        read-only users can also affect (in the future, for example, the
+        `passwd' file).
+
+Wed Jan  8 14:50:47 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in: Remove CVSid; we decided to get rid
+       of these some time ago.
+
+Wed Jan  8 09:08:36 1997  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): Document
+       restriction that cvs root sent in the cvs protocol and in the
+       pserver authentication protocol must be identical.
+
+Thu Jan  2 13:30:56 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in, cvs.texinfo: Remove "675" paragraph;
+       see ../ChangeLog for rationale.
+
+Thu Jan  2 09:34:51 1997  Karl Fogel  <address@hidden>
+
+        * cvs.texinfo (Read-only access): new node.
+        (Repository): new menu item for above new node.
+        (Password authentication server): document the user-aliasing
+        feature.  Why was this undocumented before?
+
+Wed Jan  1 18:12:11 1997  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Conflicts example): Use @asis in example to prevent
+       starting a line with a conflict marker.  This means that when
+       maintaining the file with CVS itself, CVS will not think there is
+       a conflict merely because of the conflict marker in the example.
+       IMHO, this is totally bogus and CVS needs a better way of figuring
+       out whether a conflict is resolved (see comments elsewhere in this
+       node), but until then....  Credit to Fred Fish for reporting the
+       problem.
+
+       * cvs.texinfo (cvsignore): Add paragraph about how .cvsignore
+       files in the sources being imported by "cvs import" override
+       "-I !".  Credit goes to Fred Fish for pointing out this problem.
+
+Thu Dec 19 12:36:46 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Credits): Update Roland Pesch email address per his
+       request.
+
+Tue Dec 17 12:57:56 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (verifymsg): In example, remove text "and reedit if
+       necessary"; it was copied from editinfo and doesn't apply here.
+       Fix syntax of if statement; remove unnecessary attempt at loop;
+       don't use -n with echo.  Add @appendixsec at start of node.
+       Add note about how verifymsg cannot change log message.
+       (editinfo): In paragraph saying editinfo is obsolete, fix various
+       typos and formatting glitches.  Mention -e as well as EDITOR.
+       (editinfo): In saying that editinfo doesn't get consulted with -m,
+       -F or client/server, recommend verifymsg.  Remove comment which
+       says, in effect, "we need a feature like verifymsg".
+       (editinfo example): Change "verifymsg" back to "editinfo" here;
+       the example is of editinfo not verifymsg.
+
+Tue Dec 17 12:45:32 1996  Abe Feldman  <address@hidden>
+
+       * cvs.texinfo (verifymsg): New node.
+       various places: Say that editinfo is obsolete, or refer to
+       verifymsg instead of editinfo
+
+Wed Dec 11 08:55:26 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Compatibility): Add comment about 1.3 and file death.
+
+       * cvs.texinfo (update output, release output): Document "P" as
+       well as "U".
+
+Tue Dec 10 16:23:40 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Builds): Change "make" to "implement" and "build";
+       in this context "make" is ambiguous.
+       (Builds): Add new URL of mk web page.
+
+Mon Dec  9 11:03:37 1996  Jim Blandy  <address@hidden>
+
+       * cvs.texinfo (Password authentication client, Environment
+       variables): Remove mention of CVS_PASSWORD.
+
+Sun Dec  8 22:38:34 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Repository files): Mention differences between RCS
+       files in RCS and in CVS.
+       (Tags): Tag names must start with a letter.
+
+Fri Dec  6 09:08:18 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (syntax): Expand discussion of regular expression
+       syntax.
+
+Fri Nov 29 09:06:41 1996  address@hidden (Fred Fish)
+                         and Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo, cvsclient.texi: Make sure @ref and friends are
+       followed by "," or "." as described in the texinfo manual.  This
+       is a dubious practice as texi2html and texinfo.tex don't require
+       it, and makeinfo could insert them as needed, but since makeinfo
+       doesn't do that yet, cope.
+
+       * cvs.texinfo (From files): Suggest "diff -r" rather than "ls -R"
+       as the way to see that the sources seem to have been imported
+       correctly.
+       (Common options): -k is also available with import.
+       (admin options): Fix typo ("interrested" -> "interested").
+
+Mon Nov 25 10:03:56 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Add comments about two digit
+       years, year 2000, and ambiguous/nonexistent dates.
+
+Sun Nov 24 17:27:24 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (First import): Don't say what the wdiff program we
+       are using as an example does--that is confusing.  Also don't show
+       untarring it--people might be familiar with cpio, ZIP, VMS BACKUP,
+       etc., instead of tar.
+
+       * cvs.texinfo (Adding files): Update comment about "cvs add -m".
+
+       * cvs.texinfo (Common options): Remove -H; -H is not a command
+       option.
+       (Global options): Also list --help and --version.  Don't say that
+       -H gives a list of commands; it doesn't any more (directly).
+
+       * cvs.texinfo: Add comment pointing to paper size web page.
+
+       * cvs.texinfo (Common options): Rewrite section on date formats.
+       Executive summary is that RFC822 and ISO8601 are now preferred.
+
+Wed Nov 20 08:39:45 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Getting Notified): Add paragraph clarifying that
+       watches happen per user, not per working directory.
+
+Tue Nov 19 09:39:08 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Tags): Suggest that future special tag names might
+       start with ".".  Fix typo.
+
+       * cvs.texinfo (Removing directories): -P is also available with
+       export.
+       (Moving directories): Rewrite first paragraph; now says that you
+       must use -P for the directory to disappear from working
+       directories.  Thanks to Martin Lorentzon
+       <address@hidden> for reporting this bug.
+       (various): Where we mention -P, point to Removing directories
+       node.
+
+Sat Nov 16 18:03:22 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Example): Rewrite to actually be based on a real
+       live example (and therefore reflect the way the protocol currently
+       works).  Add comment about formatting of the document itself.
+
+Thu Nov 14 10:22:58 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Introduction): Use @ref, not @xref, after "see".
+       (Goals): Rewrite items about locking, about uploading in big
+       chunks, and about atomicity to be focused more on the protocol
+       than the current implementation.
+       (Notes): Remove this node.  The attempt to describe the basic
+       model has pretty much been replaced by the Introduction.
+       The material about how to start the client is incomplete and
+       better left to cvs.texinfo.  And the item about the lack of
+       SERVER_FLOWCONTROL is obsolete now that SERVER_FLOWCONTROL is the
+       default.
+       (Protocol Notes): Add comment about multisite features.
+       (Requirements): Use @code for requests and responses.
+
+       * cvs.texinfo (Remote repositories): Add a few sentences defining
+       "client" and "server"; before we had been using the terms without
+       defining them.
+
+       * cvs.texinfo (What is CVS?): Add paragraph about reporting bugs.
+       Reword and expand comp.software.config-mgmt description (and add
+       comments about other newsgroup facts).  Point people at GNU list
+       of FTP sites rather than directly at prep.ai.mit.edu.
+
+Wed Nov  6 09:45:08 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Tracking sources): Add comment regarding added and
+       removed files.
+
+Tue Nov  5 14:00:31 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Rename node "Invoking CVS" to "CVS commands".
+       Rewrite the intro and comments to reflect addition of the new
+       Invoking CVS.
+       (Invoking CVS): New node, a quick summary of each command.
+       (annotate): Don't list the options; refer to Invoking CVS and
+       Common options instead.
+
+Sun Nov  3 21:22:42 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Compatibility): New node, moved from ../README.
+
+       * cvs.texinfo (Common options): Add comment about how tar manual
+       contains documentation for getdate date formats.
+
+Fri Nov  1 14:00:31 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (commit examples): Rewrite "New major release
+       number" section to tighten up the wording, better motivate the
+       discussion, and replace the term "rcs revision number" with
+       "numeric revision".
+
+Fri Oct 25 07:49:21 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (loginfo): Don't say "a la printf"; the syntax is
+       only vaguely similar to printf.
+
+       * cvs.texinfo (loginfo): To get just the repository name, suggest
+       %{} instead of % "standing alone"; the latter is now an error.
+
+Tue Oct 22 13:08:54 1996  Noel Cragg  <address@hidden>
+
+       * cvs.texinfo (loginfo): add information on the new loginfo format
+       string specification.
+
+Mon Oct 21 17:33:44 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Builds): New node.
+       (What is CVS?): Refer to it.
+
+Sat Oct 19 14:32:21 1996  Jim Meyering <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Choosing a model): Wording/grammar fix.
+
+Sat Oct 19 14:32:21 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Obsolete): New node.
+       (Requests): Remove Repository and Lost and adjust Directory,
+       UseUnchanged, and other places accordingly.
+       (Required): Directory and Unchanged are now required.
+
+       * cvs.texinfo (Removing files): Don't talk about modules; they are
+       not relevant in this context.
+       (Removing directories): New node.
+       (Common options): Refer to it instead of duplicating information.
+
+Fri Oct 18 11:05:06 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (First import, import): Add paragraph about the fact
+       that import doesn't modify the directory which it imports from.
+
+       * cvs.texinfo (Creating a repository): Add paragraph about
+       resource requirements.
+
+       * cvs.texinfo (Copying): Replace empty node with a copy of the GPL.
+
+Thu Oct 17 12:10:55 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Adding files): Revise comment to more accurately
+       reflect the functioning/nonfunctioning status of cvs add -m.
+
+       * cvs.texinfo (Reverting local changes): New node, somewhat based
+       on the version of this node from 30 Sep 96 change.
+       (admin options): Refer to it.
+
+       * cvs.texinfo: Reinstate 30 Sep 96 change from A4 to US letter.
+
+       * cvs.texinfo (Concurrency): When telling people how to clean up
+       locks, tell them to make sure the locks are owned by the person
+       who has the stale locks.
+       (update output, release output): Remove text about how CVS doesn't
+       print "? foo" for directories; CVS has since been changed (see
+       conflicts-130 in sanity.sh).
+
+Wed Oct 16 15:01:42 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (history options): Mention new option -x E.
+
+Mon Oct 14 15:21:25 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Tags): Add paragraph on choosing a convention for
+       naming tags.
+
+Thu Oct 10 16:05:26 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (modules): Describe what & does.
+
+Mon Oct  7 17:20:11 1996  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (Removing files): Correct apparent cut and paste
+       error: refer to the removed file, not the added file.
+
+Tue Oct  1 14:15:33 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Revert all recent changes (the last unscathed one
+       is the CVSUMASK one from Sunday).  For the most part said changes
+       are for new features which are not appropriate at this stage of
+       the release process.  None of the changes being reverted need to
+       go into 1.9, that is for sure.
+
+Mon Sep 30 18:17:34 1996  Greg A. Woods  <address@hidden>
+
+       * cvs.texinfo (Credits): add comment asking if we should update.
+       Add more detail about printing Letter on A4.
+       Add some comments about internal comments.
+       (From files): describe "cvs import -b 1" for importing existing
+       projects onto the main branch.
+       (First import): add a couple of helpful hints about naming vendor
+       and release tags, etc., and regularize the examples with this.
+       (Tracking sources): noted some reasons why you might use vendor
+       branches with "cvs import".
+       (Update imports): mention using "update" in place of "checkout" if
+       you have an existing working directory.
+       (Binary files in imports): add sub-menu separator comment.
+       (Tracking sources): new menu entry "Reverting to vendor release".
+       (Reverting to vendor release): new node to describe reverting
+       local changes and optionally using patch(1) to move local changes
+       forward.
+       (Global options): describe -D and -g, as well as DIFFBIN and
+       GREPBIN.
+       (export examples): add one.
+       (import options): describe the effect of '-b 1'.
+
+Mon Sep 30 08:09:53 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Adjust comments concerning A4 vs. US letter,
+       referring to ../README.
+
+       * cvs.texinfo (Common options): Add comment about dates which CVS
+       uses in output.
+
+Sun Sep 29 11:14:16 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Don't mention Name twice.
+
+       * cvs.texinfo (File permissions): Expand CVSUMASK stuff a bit.
+       (Setting a watch, Environment variables, Global options): Update
+       index entries for "read-only files, and ...".
+
+       * cvsclient.texi (Requests): State that Gzip-stream is preferred
+       to gzip-file-contents.  Cite RFC1952/1951 rather than just "gzip".
+       Say that RFC1950/1951 compression is also known as "zlib".
+
+Sat Sep 28 09:31:45 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Repository): Move all information about the
+       internal structure of the repository to User modules node.  Rename
+       it to "Repository storage" ("User modules" wasn't particularly
+       clear).  Mention CVSUMASK.  Much clarification and
+       reorganization.
+       (Basic concepts): Remove material which duplicates what is now in
+       Repository.  Rewrite paragraph introducing modules.
+
+       * cvs.texinfo (Starting a new project): In discussing difficulty
+       in renaming files, don't refer to "cvs 1.x"--there is no
+       non-vaporous "cvs 2.x".  Reword to reflect that part of the reason
+       to avoid renames (where possible) is not because of CVS at all, and
+       to try to give a general impression of how bad CVS issues involved in
+       renaming are.
+
+Fri Sep 27 04:23:44 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Adding files): Talk about directories, not modules,
+       since that is what is meant.  Suggest using -kb option to add
+       rather than running cvs admin after the fact and xref to Binary
+       files not admin examples.  Incorporate information which had been
+       in "add" node (there was a lot of duplication).  Don't document
+       use of "add" on a directory to take the place of "cvs update -d";
+       the latter is simpler and more logical.
+       (add, add options, add examples): Removed.
+       (release output, release options): Update xrefs accordingly.
+       (Adding files, Removing files): Mention the fact that adds and
+       removes are branch-specific.
+       (Merging adds and removals): New node.
+
+       * cvs.texinfo (Concurrency): When mentioning RCS locks, use the
+       term reserved checkouts and xref to the place where we discuss
+       them in more depth.
+
+Thu Sep 26 08:26:01 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (log): Add comments about timezones.
+       (log, Common options): Add index entries for timezone and zone, time.
+
+Wed Sep 25 11:05:30 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (log options): Add xref to where we describe the
+       date formats that -d accepts.
+       (Common options): Don't refer to date formats accepted by co(1);
+       CVS's rules have never been the same.  Add long whiny comment
+       about what a mess date formats are.
+
+Tue Sep 24 11:49:02 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (From other version control systems): The RCS file
+       must not be locked when you copy it to the CVS repository.
+
+       * cvs.texinfo (Editing files): Also discuss how to revert in the
+       non-watch case.  Add some index entries.
+
+       * cvs.texinfo (update output): Add comment about how we *should*
+       be handling .# files.  Mention fact that it is different under
+       VMS.  Add .# to index.
+
+Fri Sep 20 13:08:33 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Multiple developers): Revise text on reserved
+       versus unreserved checkouts extensively.  Move index entries for
+       "reserved checkouts" and "RCS-style locking" to here.  Add
+       cross-reference to cvs admin -l.  Add new section "Choosing a
+       model".
+       (Editing files): Add note about use of the word "checkout".
+
+Tue Sep 17 00:54:57 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Defining the module): Don't suggest "cvs co
+       modules"; that depends on a "modules" module being defined which
+       is not the default which is created by "cvs init".  Instead
+       suggest "cvs co CVSROOT/modules" which should always work.
+
+Tue Sep 17 00:43:49 1996  VaX#n8  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Rename by copying): Suggest "cvs tag -d" on the file
+       "new", not on everything.  Also don't suggest deleting branch tags.
+
+Tue Sep 17 00:34:39 1996  David A. Swierczek  <address@hidden>
+
+       * Makefile.in (install-info): Note whether files are in srcdir and
+       deal with it rather than cd'ing into srcdir.
+
+Mon Sep 16 23:33:36 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Add comment about using wrappers to
+       compress files in the repository.
+
+       * cvs.texinfo (modules): Add comments about how we should be
+       documenting how -i and friends operate in client/server CVS.
+
+       * cvs.texinfo (File permissions): Describe the need for write
+       permissions for locks and val-tags.
+
+       * cvs.texinfo (commitinfo): Add comment about using commitinfo to
+       enforce who has access.
+
+Wed Jul 24 17:01:41 1996  Larry Jones  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (checkout): Refer to "update output" node.
+       (import): Add new import output node.
+       (release): Correct release output menu entry (used to be
+       release options instead).
+       (update output): Say this is output from checkout as well as
+       update.
+
+Mon Sep 16 16:18:38 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Common options): Clarify that CVS uses MM/DD/YY dates.
+
+       * cvs.texinfo (Common options): Add comment about what HEAD means.
+
+Mon Sep 16 10:52:04 1996  Norbert Kiesel  <address@hidden>
+
+       * cvs.texinfo (Global options): Document global '-T' option.
+
+Sat Sep 14 10:46:58 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keeping a checked out copy): New node.
+
+Fri Sep 13 23:55:42 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Magic branch numbers): Delete song and dance about
+       how cvs log can't cope with magic branches because rlog doesn't
+       know about them; cvs log no longer calls rlog.  Delete item about
+       how you can't specify a symbolic branch to cvs log; that is fixed.
+
+Wed Sep 11 22:48:21 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Add comments
+       regarding port numbers and troubleshooting.
+
+Tue Sep 10 10:36:00 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (What is CVS?): Reword text regarding info-cvs,
+       to avoid overfull hbox.
+
+       * cvs.texinfo (Binary files): Add comment about further issues
+       with recovering from failure to use -kb.
+
+       * cvs.texinfo (Conflicts example): Describe the "feature" by which
+       CVS won't check in files with conflicts.
+       (File status): Expand and revise to document all the possible
+       statuses from cvs status.  Also document "Working revision" and
+       "Repository revision".  Refer to other sections for other aspects
+       of cvs status.
+       (status options): Refer to other sections as appropriate.
+       (update output): Refer user to Conflicts example node.  Add
+       comment regarding purging of .# files.
+
+Fri Sep  6 11:47:14 1996  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (Kerberos authenticated): Mention need for
+       --enable-encryption option in order to use encryption.
+       (Global options): Likewise, in description of -x option.
+
+Thu Sep  5 14:31:42 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Connecting via rsh): Discuss :ext:, :server:, and
+       CVS_RSH.
+       (Remote repositories): Mention what default is if no access method
+       is specified.
+       (Environment variables): Don't discuss CVS_RSH at length here;
+       rely on reference to "Connecting via rsh" node.
+
+Mon Aug 26 15:39:18 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Protocol Notes): When talking about having the
+       client know the original contents of files, suggest cvs edit as a
+       solution.
+
+Thu Aug 22 10:44:40 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Keyword list): Document Name keyword.
+
+       * cvs.texinfo (Tags): Revise comment regarding legal tag names.
+
+Mon Aug 12 14:58:54 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication security): Add comment
+       about how some of this is not pserver-specific.
+
+Tue Aug  6 16:48:53 1996  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (log, log options): Update for changes to cvs log
+       now that it no longer invokes rlog.
+
+Thu Jul 25 10:10:16 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Fix typo (Kerberos-request ->
+       Kerberos-encrypt).
+
+Wed Jul 24 18:53:13 1996  Ian Lance Taylor  <address@hidden>
+
+       * cvs.texinfo (Kerberos authenticated): Change the note that the
+       Kerberos connection is not encrypted.
+       (Global options): Add documentation for -x.
+       * cvsclient.texi (Protocol Notes): Remove enhancement note about
+       Kerberos encryption.
+       (Requests): Add documentation for Kerberos-encrypt request.
+
+Thu Jul 18 18:27:40 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Creating a repository): Mention need to be able to
+       create lock files in the repository.
+
+       * cvsclient.texi (Responses): In F response, make at least a
+       minimal attempt to define "flush".
+
+       * cvs.texinfo (Wrappers): Document -k.
+       (From files, Binary files in imports): Say that imports can deal
+       with binary files and refer to Wrappers node for details.
+       (Binary files): Likewise for imports and adds.
+
+Sat Jul 13 18:29:10 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Binary files): Add paragraph concerning the fact
+       that the keyword expansion mode is not versioned, and why this is
+       a problem.
+
+Fri Jul 12 18:55:06 1996  Ian Lance Taylor  <address@hidden>
+
+       * cvsclient.texi (Requests): Document Gzip-stream.
+
+Thu Jul 11 21:51:45 1996  Ian Lance Taylor  <address@hidden>
+
+       * cvsclient.texi (Responses): Document new "F" response.
+
+Wed Jul 10 18:46:39 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (log): Don't document "rlog"; it is deprecated.
+
+Sat Jul  6 22:07:45 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Environment variables): Document more temp
+       directory nonsense, this time with "patch".
+
+Fri Jul  5 23:27:40 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Add comment regarding "/." ending.
+
+Fri Sep 13 10:52:09 1996  Greg A. Woods  <address@hidden>
+
+       * cvs.texinfo: don't force afourpaper -- Letter prints much better
+       on A4 than the other way around, believe you me!
+       (rdiff options): describe -k and new -K.
+       (RCS keywords): add description of $Name.
+       (Using keywords): add description of #ident and example of using
+       $Name.
+       - also fixed cross references to Substitution modes in various
+       places.
+       (import options): mention that -b 1 imports to the trunk.
+
+Tue Jul  2 22:40:39 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Sticky tags): Update to reflect change in
+       "resurrected" message.
+
+Fri Jun 28 10:48:33 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Connecting via rsh): Add comment about what we
+       might be saying about troubleshooting.
+
+Sun Jun 23 10:07:45 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication security): Add comment
+       regarding anoncvs as practised by OpenBSD.
+
+Wed Jun 19 15:41:11 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Administrative files): Add xref to Intro
+       administrative files.
+       (Intro administrative files): Add comment suggesting future
+       reorganizations of this material.
+       (syntax): Add comment regarding this node.
+       (Getting Notified): Actually document the notify file.  It hadn't
+       really been documented to speak of.
+       (editinfo,loginfo,rcsfino,cvsignore): Make the index entries
+       follow the standard "foo (admin file)" format.
+
+Fri Jun 14 18:14:32 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (editinfo): Discuss the way editinfo falls down in
+       the face of -m or -F options to commit, or remote CVS.
+
+Thu Jun 13 15:08:27 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Watches): Add comment discussing the
+       fact that using cvs edit instead of chmod is not enforced.
+
+       * cvs.texinfo (Setting up): Add index entry for "init (subcommand)".
+       (Creating a repository): Move contents of node Setting up here...
+       (Setting up): ...and remove this node.
+       (Creating a repository): Don't refer to the INSTALL file (it just
+       refers back to us!).
+
+       * cvsclient.texi (Responses): Document the fact that the server
+       should send data only when the client is expecting responses.
+
+Wed Jun 12 16:04:48 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Entries Lines): Add comment regarding specifying
+       the meaning of "any other" data, in the conflict field.
+       (Example): Make it clear that using a separate connection for each
+       command is not required by the protocol.  Add some comments
+       regarding ways in which the example is out of date or wrong.
+
+Fri Jun  7 18:02:36 1996  Ian Lance Taylor  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (annotate): Document new -r, -D, and -f options.
+
+Fri Jun  7 16:59:47 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Invoking CVS): Add comment describing why only some
+       commands are listed here.
+       (Structure, Environment variables): Don't describe CVS as a
+       front-end to RCS.
+
+Tue Jun  4 21:19:42 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Document Created and Update-existing.
+
+Mon Jun  3 17:01:02 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Clarify "diff -c" versus "diff -u"
+       format in Patched response.  Don't specify how the client must
+       implement its patch-applying functionality.
+
+Sun May 26 17:12:24 1996  Norbert Kiesel  <address@hidden>
+
+       * cvs.texinfo (tag options) Document option "-c".
+
+Thu May 23 21:11:56 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Credits): Rewrite section on FAQ to reflect the
+       fact that FAQ is no longer maintained.
+       (What is CVS?): Mention comp.software.config-mgmt as well as
+       info-cvs.  Mention the fact that info-cvs-request can be slow in
+       responding.
+       (What is CVS?): Rather than say that cvs is not a configuration
+       mangement system, say specifically what it lacks (change control,
+       etc.).  I added process control (which was sorely lacking from the
+       list of configuration management functionality), and deleted some
+       functions such as tape construction which are not provided by the
+       well-known configuration management systems.
+
+       * cvs.texinfo (checkout options): Add comment regarding
+       subdirectories (lack of clarity pointed out by address@hidden).
+       Add comment about that infernal "short as possible" wording.
+
+       * cvs.texinfo (Global options): Fix error ("diff" -> "log")
+       (reported by address@hidden).
+       Remove footnote "Yes, this really should be fixed, and it's being
+       worked on"--it isn't clear what "this" is, and I doubt anyone is
+       working on it.
+
+Tue May 21 17:22:18 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Clarify Directory with "." as local
+       directory, and that filename for Questionable cannot contain "/".
+
+Mon May 20 13:15:25 1996  Greg A. Woods  <address@hidden>
+
+       * cvs.texinfo (rdiff): description from main.c:cmd_usage
+       (rtag): description from main.c:cmd_usage
+       (status): description from main.c:cmd_usage
+       (tag): description from main.c:cmd_usage
+       [all for the sake of consistency]
+
+Fri May 17 11:42:46 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Add index entries for :local:, etc.
+       (Password authentication server): Revert erroneous change
+       regarding the format of CVSROOT/passwd file.
+
+Thu May 16 17:06:46 1996  Noel Cragg  <address@hidden>
+
+       * cvsclient.texi (Notes): Removed paragraphs about various server
+       invocations which are now described in full in node "Connection
+       and Authentication."
+       (Requests): Include a note that "gzip-file-contents" doesn't
+       follow the upper/lowercase convention and that unknown reqests
+       always elicit a response, regardless of capitalization.
+
+       * cvs.texinfo (Kerberos authenticated): Removed bogus version
+       number.
+       (Repository): explain the ":local:" access method.
+
+Wed May 15 23:43:04 1996  Noel Cragg  <address@hidden>
+
+       * cvsclient.texi (Goals): mention access methods.
+       (Requests): add note about convention: requests starting with a
+       captial letter don't have any expected response.  Made sure each
+       request has a "Response expected" note.
+
+       * cvs.texinfo (Remote repositories): add info about access
+       methods; fix pserver info.
+
+Tue May 14 08:56:41 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Environment variables): Try to document somewhat
+       more accurately where we put temporary files.
+
+       * cvs.texinfo (From files): Say directory tree instead of module
+       where that is what we mean.  Use @var{wdir} and @var{rdir} in the
+       example instead of using @var{dir} for two different things.
+       (From files): Say directory tree instead of module
+       where that is what we mean.
+       (Binary files): When using cvs admin -kb, one needs an extra
+       commit step on non-unix systems.
+       (Binary files in imports): New node.
+       (Wrappers): Add comment regarding indent example.
+       (Top): Don't refer to modules when that is not what we mean.
+
+Fri May 10 09:39:49 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Sticky tags): Explain what sticky dates and
+       non-branch sticky tags are good for.
+
+       * cvs.texinfo (Repository): Document that -d overrides CVS/Root.
+
+Wed May  1 15:38:26 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Tags): Document un-revision of all-uppercase tag
+       names.
+
+Wed Apr 24 08:41:51 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication security): Rewrite sentence
+       on complex and unknown security bugs to clarify that it is
+       referring to people who have been give access to cvs, not to holes
+       in the authentication method (which is relatively simple).
+
+Tue Apr 23 09:31:29 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Talk about what -m does (and does not
+       do).  Other minor edits.
+
+Wed Apr 17 15:27:03 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (rcsinfo): Rewrite paragraph concerning remote CVS.
+       * cvsclient.texi (Responses): Document Template response.
+
+Sun Apr 14 16:01:39 1996  Karl Fogel  <address@hidden>
+
+        * .cvsignore: added CVSvn.texi.
+
+Wed Apr 10 16:56:21 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (~/.cvsrc): Mention setting global options with "cvs".
+
+       * cvs.texinfo (release): Change "modules" to "directories".
+       Release does not take module names as arguments.
+
+       * cvs.texinfo (Creating a branch): Add comments about how we
+       should better document tagging the branchpoint.
+
+Tue Apr  9 19:59:45 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Top): Use @value{CVSVN}, not a vague refenece to 1.4.
+
+       * cvs.texinfo (From other version control systems): New node.
+
+Mon Apr  8 15:59:37 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): Revise kerberos
+       and pserver sections to reflect the fact that port 2401 is now
+       officially registered.
+
+Thu Mar 28 09:51:13 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (History browsing): Reinstate this node.  Try to get
+       it into some minimally useful state (it still needs a lot of
+       work).
+       (annotate): New node, subnode of History browing.
+
+       * cvsclient.texi (Requests): Add annotate request.
+
+Tue Mar 26 08:46:39 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: In various examples, change tag names to avoid tag
+       names reserved to CVS.
+
+       * cvs.texinfo (Tags): Document what is a valid tag name.
+
+       * cvs.texinfo (Substitution modes): Try to describe how the
+       various keyword expansion settings interract.
+       (Binary files): Suggest cvs update -A, not removing file and then
+       updating it, to get effect of new keyword expansion options.
+
+       * cvs.texinfo (admin options): Mention CVS's use of `dead' state.
+
+Thu Mar 21 08:25:17 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Environment variables): Expand introduction to RCS
+       environment variables.  Expand and correct CVS_SERVER_SLEEP.
+
+       * cvs.texinfo (Environment variables): Remove POSIXLY_CORRECT; cvs
+       requires options to precede arguments regardless of it.
+
+Thu Mar 21 08:18:42 1996  Norbert Kiesel <address@hidden>
+
+       * cvs.texinfo: Remove paragrahps about a forthcoming CVS
+          newsgroup and about sending patches to think.com.
+          (Environment): Document some more (all?) used environment
+          variables.
+
+Wed Mar 20 09:44:21 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Introduction): New node.
+       * Makefile.in: Add cruft to reflect fact that cvsclient.texi now
+       uses CVSvn.texi.
+
+Mon Mar 18 14:43:53 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Add Case request.
+
+Wed Mar 13 16:01:47 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Connection and Authentication): New node.
+
+       * cvsclient.texi (Requests): Expand discussion of Root a bit.
+
+       * cvs.texinfo (Setting up): Don't refer to INSTALL file; revise to
+       reflect some information which had been in the INSTALL file.
+
+       * cvs.texinfo (history file): Update to reflect cvsinit -> cvs
+       init.  Adjust discussion of whether history file format is
+       documented.
+       (Setting up): Update to reflect cvsinit -> cvs init.
+
+       * cvsclient.texi (Requests): Document init request.
+
+Thu Feb 29 10:08:31 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (loginfo example): Adjust example to reflect the way
+       that CVS actually works.  Add comments questioning whether that is
+       the best behavior.
+
+       * cvs.texinfo (cvsignore): Document additions to default ignore list.
+
+Mon Feb 26 13:48:01 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Filenames): New node, documents / vs \, etc.
+
+Wed Feb 24 1996  Marcus Daniels  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Mention
+       support for imaginary usernames.
+
+Thu Feb 15 16:34:56 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Variables): Add new internal variable $USER.
+
+Wed Feb 14 22:52:58 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (export, admin): Document -k option to cvs export.
+
+       * cvs.texinfo (admin options): Mention using -l, -u, -L, and -U in
+       conjunction with rcslock.pl.
+
+Mon Feb 12 16:38:41 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Remove references to mkmodules.
+
+Sun Feb 11 12:31:36 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi: Add Set request.
+
+       * cvs.texinfo (Variables): Rewrite to reflect user variables
+       replacing environment variables; motivate the discussion better.
+       (Global options): Add -s option.
+
+Sat Feb 10 11:18:37 1996  Jim Blandy  <address@hidden>
+
+       * cvs.texinfo (Variables): Fix @table commands.
+
+Fri Feb  9 17:31:18 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Variables): New node.
+
+       * Makefile.in (CVSvn.texi): New rule.
+       (OBJDIR_DISTFILES): Add CVSvn.texi.
+       (cvs.dvi,cvs.info): Add cruft to deal with it being in build dir
+       or srcdir.
+       * cvs.texinfo: Include CVSvn.texi and use the version number from
+       it instead of a hardcoded version number and date.
+
+Thu Feb  1 13:28:03 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Sticky tags): Expand so it really documents the
+       features it is talking about rather than referring to "Appendix
+       A".  Add example of how to restore the old version of a dead
+       file.  In various other parts of the manual refer to this node, in
+       some cases deleting duplicative text.  In the case of cvs admin
+       -b, mention vendor branch usage.
+       (Removing files): Discuss removing files (in user-visible terms,
+       not in terms of the Attic and such).
+       (remove): Remove node; merge contents into Removing files.
+
+Tue Jan 30 17:52:06 1996  Jim Blandy  <address@hidden>
+
+       * cvs.texinfo: Tweak @top node, to make file compatible with both
+       makeinfo and texinfo-format-buffer.  Perhaps we should fix the
+       formatters to agree on what constitutes valid texinfo.
+
+Mon Jan 29 16:38:33 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requirements): New node, to talk about required
+       versus optional parts of the protocol.
+
+Sun Jan 28 09:00:34 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Modes): Add discussion what what the mode really
+       means (across diverse operating systems).
+
+Tue Jan 23 12:54:57 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Per mail from Per Cederqvist, change author to "Per
+       Cederqvist et al".  Also remove sentence about Signum shipping
+       hardcopy manuals and add information on Cyclic.  Change version
+       number to 1.6.87.
+
+Fri Jan 12 15:29:39 1996  Vince Demarco  <address@hidden>
+
+       * cvs.texinfo: Fix the documentation for the com/uncom change
+       to wrap/unwrap. make everything consistant
+
+Wed Jan 10 16:11:54 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Concurrency): Add index entries; minor clarification.
+
+Tue Jan  9 16:03:39 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Getting Notified): Document users file.
+
+       * cvs.texinfo (cvsignore): Add *.obj to list of ignored files.
+
+Wed Jan  3 17:01:58 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (import): Adjust list of ignored files to match
+       recent change to CVS (CVS* -> CVS CVS.adm).  Consolidate
+       discussion of ignored files in one place (with xrefs from others).
+
+       * cvsclient.texi: Remove How To node.  It was out of date
+       (again!), and I am getting sick of trying to update it (internals
+       documentation should be in the comments, where it at least has a
+       fighting chance of staying up to date).
+       (Protocol): Say what \n and \t mean in this document.
+
+Tue Jan  2 23:39:32 1996  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Wrappers): Change comb/uncom to wrap/unwrap.
+
+Mon Jan  2 23:00:00 1996  Vince Demarco  <address@hidden>
+
+       * cvs.texinfo: update the Wrappers documentation so it isn't
+       so NEXTSTEP centric. The wrappers code has alot of other
+       general uses. The new version of the documentation tryes
+       to show that to the reader.
+
+Mon Jan  1 13:09:39 1996  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Clarify that Module-expansion is not
+       suitable for passing to co.
+
+Sun Dec 31 10:53:47 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Password authentication server): Suggest specifying
+       -b in inetd.conf.
+
+       * cvs.texinfo (Password authentication): Variety of cleanups and
+       minor fixes, including shorter node names.
+
+Sun Dec 24 02:37:51 1995  Karl Fogel  <address@hidden>
+
+        * cvs.texinfo (Using the client with password authentication):
+        tixed fypos.
+
+Sun Dec 24 00:00:16 1995  Karl Fogel  <address@hidden>
+
+        * cvs.texinfo (Remote repositories): use @code{rsh} most places,
+        because it is the name of a program, and because I am a pedant.
+        Refer to new node "Password authenticated".
+        (Password authenticated): new node.
+        (Setting up the server for password authentication): new node.
+        (Using the client with password authentication): new node.
+        (Security considerations with password authentication): new node.
+
+        These are all really long node names, but it seems necessary that
+        they be descriptive in case they're referenced elsewhere.  If you
+        can think of a way out of this, please change them.
+
+Thu Dec 21 12:09:34 1995  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Requests): Add Questionable.  Revise
+       documentation of export and update to explain role of -I option.
+
+Tue Dec 19 16:44:18 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Update binary files info for -kb.
+
+Mon Dec 11 12:20:55 1995  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Responses): Add Notified and Mode.
+       (Requests): Add Notify, noop, watch-on, watch-off, watch-add,
+       watch-remove, watchers, and editors.
+       * cvs.texinfo (Watches): New node, to describe new developer
+       communication features.
+
+Thu Nov 23 08:59:09 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (admin options): In saying that cvs admin -o is not
+       such a good way to undo a change, refer to the section which
+       describes the preferred way.
+
+Thu Nov 13 16:39:03 1995  Fred Fish  <address@hidden>
+
+       * Makefile.in: Remove extraneous tab from empty line.
+
+Mon Nov 13 15:00:26 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Concurrency): New node, to describe user-visible
+       behaviors associated with cvs locks.
+
+       * cvs.texinfo (Remote repositories): Add more details of how to
+       set things up (with rsh and kerberos).
+
+Thu Nov  9 11:41:37 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Remove -Q and -q options from command synopses.
+
+Wed Nov  8 09:38:00 1995  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (Notes): Revise paragraph on server memory use
+       problem.
+
+Tue Nov  7 16:26:39 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Document merging more than once from a branch;
+       miscellaneous cleanups.
+
+Mon Oct 30 13:12:53 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (modules): Document -e.
+
+Thu Oct 26 11:15:40 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Tags): Update "version" vs. "revision" for CVS 1.5.
+       (Index,BUGS): Change bug reporting address from Per Cederqvist to
+       address@hidden
+
+Wed Oct 25 15:37:05 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: Miscellaneous minor changes (clean up CVS/Root
+       stuff, don't say release requires a module entry, etc.).
+
+Tue Oct 24 11:01:22 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo: More precisely describe scope of document.
+       * cvsclient.texi: Describe scope of document
+
+Thu Oct 12 11:25:40 1995  Karl Fogel  <address@hidden>
+
+        * cvs.texinfo: cover page now refers to CVS 1.6, and "last
+        updated" date has been upped to today.
+
+Wed Oct 11 22:30:10 1995  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (info): Look for *.info* either in build dir or in
+        srcdir.
+
+Mon Oct  2 17:10:49 1995  Norbert Kiesel  <address@hidden>
+
+       * cvs.texinfo (admin): Describe usage of CVS_ADMIN_GROUP to
+       restrict usage of admin.
+
+Fri Oct  6 21:17:50 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (~/.cvsrc): Document change to command name matching.
+
+Thu Oct  5 18:03:41 1995  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (install-info): Add comment about srcdir.
+
+Wed Sep 13 12:45:53 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Moving files): Rewrite "Outside" node to clarify
+       that history is still there and describe how to get it.  Assorted
+       cleanups.
+
+Tue Sep 12 19:02:47 1995  Jim Kingdon  <address@hidden>
+
+       * cvs.texinfo (Removing files): Remove section on limitations
+       which are gone now that we have death support.
+
+Wed Aug 30 12:32:29 1995  Karl Fogel  <address@hidden>
+
+        * cvs.texinfo (Remote Repositories): new node, referred to from
+        `Basics' and `Repository'.
+        (Repository): documented new `-d' vs. `$CVSROOT' vs. `CVS/Root'
+        behavior.
+        (commitinfo): document client/server-case behavior.
+        (editinfo):   document client/server-case behavior.
+        (loginfo):    document client/server-case behavior.
+        (rcsinfo):    document client/server-case behavior.
+
+Mon Aug 21 00:23:45 1995  Jim Kingdon  <address@hidden>
+
+       * cvsclient.texi (How To): The way to force rsh is to set
+       CVS_CLIENT_PORT to -1, not to some bogus value.
+
+Tue Aug 15 17:12:08 1995  Karl Fogel  <address@hidden>
+
+        * cvs.texinfo
+        (Basic concepts): talk about remote repositories.
+        (Repository): same.
+
+Mon Jul 24 19:09:12 1995  James Kingdon  <address@hidden>
+
+       * cvs.texinfo: Remove references to -q and -Q command options.
+
+Fri Jul 21 10:33:07 1995  Vince DeMarco <address@hidden>
+
+       * cvs.texinfo: Changes for CVSEDITOR and wrappers.
+
+Thu Jul 13 23:04:12 CDT 1995  Jim Meyering  (address@hidden)
+
+       * Makefile.in (cvs-paper.ps): *Never* redirect output directly to
+       the target (usu $@) of a rule.  Instead, redirect to a temporary
+       file, and then move that temporary to the target.  I chose to
+       name temporary files address@hidden  Remember to be careful that the 
length
+       of the temporary file name not exceed the 14-character limit.
+
+Sun Jul  9 19:03:00 1995  Greg A. Woods  <address@hidden>
+
+       * doc/cvs.texinfo:
+       - document '-q' for 'cvs status'
+       - correction to regexp use in *info files
+       - correction to use of 'cvsinit' script
+       (from previous local changes)
+
+Tue Jun 20 18:57:55 1995  James Kingdon  <address@hidden>
+
+       * Makefile.in (dist-dir): Depend on $(OBJDIR_DISTFILES).
+
+Fri Jun 16 21:56:16 1995  Karl Fogel <address@hidden>
+                         and Jim Meyering <address@hidden>
+
+       * update.c (update_file_proc): If noexec, just write 'C', don't merge.
+
+Fri Jun 16 07:56:04 1995  Jim Kingdon  (address@hidden)
+
+       * cvs-paper.ps: Added.
+
+Sat May 27 08:46:00 1995  Jim Meyering  (address@hidden)
+
+       * Makefile.in (Makefile): Regenerate only Makefile in current
+       directory when Makefile.in is out of date.  Depend on ../config.status.
+
+Sat May 27 08:08:18 1995  Jim Meyering  (address@hidden)
+
+       * doc/Makefile.in (realclean): Remove more postscript and info files.
+
+Fri Apr 28 22:44:06 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (DISTFILES): Updated.
+       (doc): Depend on cvsclient.ps too.
+       (cvs.aux, cvsclient.aux): Add target.
+       (cvsclient.dvi): Don't nuke the aux file.  They're small and
+       helpful.
+       (cvsclient.ps): New target.
+       (dist-dir): Renamed from dist; changed to work with DISTDIR
+       variable from parent.
+
+Sun Apr 23 22:13:18 1995  Noel Cragg  <address@hidden>
+
+       * Makefile: Added more files to the `clean' target.
+       * .cvsignore: Added the same files.
+
+Mon Nov 28 10:22:46 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Notes): Remove item about commit options; now
+       fixed.  Rewrite paragraph about server memory usage.
+
+       * cvsclient.texi (Responses): Add Set-checkin-prog and
+       Set-update-prog.
+       (Requests): Add Checkin-prog and Update-prog.
+       * cvsclient.texi (TODO): Remove last item (it is fixed) and node.
+
+Fri Nov 18 16:51:36 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Requests): Add Max-dotdot.
+
+Thu Nov  3 07:04:24 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Add Directory request.
+       (TODO): Remove item about renaming directories.
+       (Protocol): Change @subheading to @node/@section.
+
+Fri Oct 28 07:51:13 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Add expand-module request and
+       Module-expansion response.
+       (Protocol Notes, TODO): Remove items about cvs co funkiness.
+
+Wed Oct 12 19:49:36 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Add Copy-file response.
+
+       * cvsclient.texi (How To): Correct item about where declaration
+       of cvs commands go.
+
+       * cvsclient.texi (Protocol): Add new commands.  Merge description
+       of how commands work which was duplicated among the various
+       commands.  Formatting cleanups.
+       (TODO): Remove item about bad error message on checking in a
+       nonexistent file; this works now (presumably fixed by the
+       Unchanged stuff).
+       (Notes): Remove thing about trying unsupported commands via NFS,
+       rdist, etc.  Also remove item about some commands not being
+       supported.  There are no unsupported commands anymore.
+
+Tue Sep 13 13:28:52 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Document New-entry response.
+
+Mon Sep 12 06:35:15 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Clarify that checksum is of patched
+       file, not patch itself.  Fix typo (valid-requests -> Valid-requests).
+
+       * cvsclient.texi (Protocol): Document Sticky request and
+       Set-sticky and Clear-sticky responses.
+       (Notes): Remove sticky tags from todo list.
+
+Thu Sep  8 14:23:58 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Document Static-directory requests
+       and Set-static-directory and Clear-static-directory responses.
+       (Notes): Remove Entries.Static support from todo list.
+
+       * cvsclient.texi (Protocol): Document Unchanged and UseUnchanged
+       requests.  Update documentation of Entry and Lost accordingly.
+
+Mon Aug 22 14:08:21 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Goals): Remove mention of rsh.
+       (Protocol Notes, TODO): Remove compression item.
+       (Protocol): Document "status" request.
+       (TODO): Remove suggestion to add "cvs status".
+
+Tue Jul 19 10:02:53 1994  Ian Lance Taylor  (address@hidden)
+
+       * Makefile.in (install-info): Do not depend upon installdirs.
+
+Fri Jul 15 12:56:53 1994  Ian Lance Taylor  (address@hidden)
+
+       * Makefile.in (all): Do not depend upon info.
+       (install): Do not depend upon install-info.
+
+Thu Jul  7 20:43:12 1994  Ian Lance Taylor  (address@hidden)
+
+       * cvsclient.texi (Protocol): Add Checksum response.
+
+Thu Jun 30 15:16:50 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Add Global_option request.
+
+Wed Jun 29 14:09:42 1994  Ian Lance Taylor  (address@hidden)
+
+       * cvsclient.texi: Describe sending patches, including the dummy
+       update-patches request and the Patched response.  Mention Kerberos
+       authentication using ``cvs kserver''.  Some other minor changes.
+
+Tue Jun 28 15:21:06 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol Notes): Remove note about sending diffs
+       in Updated; Ian did it.  Remove note about adding encryption to rsh.
+
+Sat May  7 10:44:30 1994  Jim Kingdon  (address@hidden)
+
+       * cvsclient.texi (Protocol): Document Modified without Entry.  Add
+       `add' and `remove' and `Remove-entry'.  Formatting cleanups.
+
+Tue Apr 19 01:29:04 1994  John Gilmore  (address@hidden)
+
+       * cvsclient.texi:  New node How To; cleanups throughout.
+       * Makefile.in:  Add dependencies on cvsclient.texi.
+
Index: ccvs/doc/Makefile.in
diff -u /dev/null ccvs/doc/Makefile.in:1.136.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/Makefile.in        Wed Dec 21 13:25:08 2005
@@ -0,0 +1,990 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU CVS documentation (excluding man pages - see ../man).
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/mkman.pl $(srcdir)/stamp-1 $(srcdir)/stamp-vti \
+       $(srcdir)/version-client.texi $(srcdir)/version.texi ChangeLog \
+       mdate-sh
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = mkman
+SOURCES =
+DIST_SOURCES =
+INFO_DEPS = $(srcdir)/cvs.info $(srcdir)/cvsclient.info
+TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
+DVIS = cvs.dvi cvsclient.dvi
+HTMLS = cvs.html cvsclient.html
+TEXINFOS = cvs.texinfo cvsclient.texi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-exec-recursive install-info-recursive \
+       install-recursive installcheck-recursive installdirs-recursive \
+       pdf-recursive ps-recursive uninstall-info-recursive \
+       uninstall-recursive
+am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+SUBDIRS = i18n
+info_TEXINFOS = cvs.texinfo cvsclient.texi
+man_MANS = $(srcdir)/cvs.1
+PSS = \
+       cvs.ps \
+       cvs-paper.ps \
+       cvsclient.ps
+
+PDFS = \
+       cvs.pdf \
+       $(srcdir)/cvs-paper.pdf \
+       cvsclient.pdf
+
+TXTS = \
+       cvs.txt \
+       cvsclient.txt
+
+EXTRA_DIST = .cvsignore ChangeLog.fsf HACKING.DOCS RCSFILES \
+       $(srcdir)/cvs.1 cvs-paper.ms cvs.man.header cvs.man.footer \
+       getdate.texi mdate-sh writeproxy.rtf $(PDFS) getdate-cvs.texi
+MOSTLYCLEANFILES = cvs-paper.pdf-t cvs-paper.ps-t getdate-cvs.tmp
+CLEANFILES = \
+       $(PSS) \
+       $(TXTS)
+
+DISTCLEANFILES = stamp-gdt
+MAINTAINERCLEANFILES = $(PDFS) $(srcdir)/cvs.1
+
+# texinfo based targets automake neglects to include
+SUFFIXES = .txt
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .txt .dvi .html .info .pdf .ps .texi .texinfo .txi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+mkman: $(top_builddir)/config.status $(srcdir)/mkman.pl
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+.texinfo.info:
+       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       am__cwd=`pwd` && cd $(srcdir) && \
+       rm -rf $$backupdir && mkdir $$backupdir && \
+       if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+         for f in $@ address@hidden address@hidden $(@:.info=).i[0-9] 
$(@:.info=).i[0-9][0-9]; do \
+           if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+         done; \
+       else :; fi && \
+       cd "$$am__cwd"; \
+       if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $@ $<; \
+       then \
+         rc=0; \
+         cd $(srcdir); \
+       else \
+         rc=$$?; \
+         cd $(srcdir) && \
+         $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+       fi; \
+       rm -rf $$backupdir; exit $$rc
+
+.texinfo.dvi:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
+       $(TEXI2DVI) $<
+
+.texinfo.pdf:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
+       $(TEXI2PDF) $<
+
+.texinfo.html:
+       rm -rf $(@:.html=.htp)
+       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir) \
+        -o $(@:.html=.htp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+       else \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+         exit 1; \
+       fi
+$(srcdir)/cvs.info: cvs.texinfo $(srcdir)/version.texi
+cvs.dvi: cvs.texinfo $(srcdir)/version.texi
+cvs.pdf: cvs.texinfo $(srcdir)/version.texi
+cvs.html: cvs.texinfo $(srcdir)/version.texi
+$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti
+$(srcdir)/stamp-vti: cvs.texinfo $(top_srcdir)/configure
+       @(dir=.; test -f ./cvs.texinfo || dir=$(srcdir); \
+       set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/cvs.texinfo`; \
+       echo "@set UPDATED $$1 $$2 $$3"; \
+       echo "@set UPDATED-MONTH $$2 $$3"; \
+       echo "@set EDITION $(VERSION)"; \
+       echo "@set VERSION $(VERSION)") > vti.tmp
+       @cmp -s vti.tmp $(srcdir)/version.texi \
+         || (echo "Updating $(srcdir)/version.texi"; \
+             cp vti.tmp $(srcdir)/version.texi)
+       address@hidden -f vti.tmp
+       @cp $(srcdir)/version.texi $@
+
+mostlyclean-vti:
+       -rm -f vti.tmp
+
+maintainer-clean-vti:
address@hidden@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
+
+.texi.info:
+       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       am__cwd=`pwd` && cd $(srcdir) && \
+       rm -rf $$backupdir && mkdir $$backupdir && \
+       if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+         for f in $@ address@hidden address@hidden $(@:.info=).i[0-9] 
$(@:.info=).i[0-9][0-9]; do \
+           if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+         done; \
+       else :; fi && \
+       cd "$$am__cwd"; \
+       if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        -o $@ $<; \
+       then \
+         rc=0; \
+         cd $(srcdir); \
+       else \
+         rc=$$?; \
+         cd $(srcdir) && \
+         $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+       fi; \
+       rm -rf $$backupdir; exit $$rc
+
+.texi.dvi:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
+       $(TEXI2DVI) $<
+
+.texi.pdf:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir)' \
+       $(TEXI2PDF) $<
+
+.texi.html:
+       rm -rf $(@:.html=.htp)
+       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I 
$(srcdir) \
+        -o $(@:.html=.htp) $<; \
+       then \
+         rm -rf $@; \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+       else \
+         if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+           rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+         exit 1; \
+       fi
+$(srcdir)/cvsclient.info: cvsclient.texi $(srcdir)/version-client.texi
+cvsclient.dvi: cvsclient.texi $(srcdir)/version-client.texi
+cvsclient.pdf: cvsclient.texi $(srcdir)/version-client.texi
+cvsclient.html: cvsclient.texi $(srcdir)/version-client.texi
+$(srcdir)/version-client.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-1
+$(srcdir)/stamp-1: cvsclient.texi $(top_srcdir)/configure
+       @(dir=.; test -f ./cvsclient.texi || dir=$(srcdir); \
+       set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/cvsclient.texi`; \
+       echo "@set UPDATED $$1 $$2 $$3"; \
+       echo "@set UPDATED-MONTH $$2 $$3"; \
+       echo "@set EDITION $(VERSION)"; \
+       echo "@set VERSION $(VERSION)") > 1.tmp
+       @cmp -s 1.tmp $(srcdir)/version-client.texi \
+         || (echo "Updating $(srcdir)/version-client.texi"; \
+             cp 1.tmp $(srcdir)/version-client.texi)
+       address@hidden -f 1.tmp
+       @cp $(srcdir)/version-client.texi $@
+
+mostlyclean-1:
+       -rm -f 1.tmp
+
+maintainer-clean-1:
address@hidden@ -rm -f $(srcdir)/stamp-1 $(srcdir)/version-client.texi
+.dvi.ps:
+       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(DVIPS) -o $@ $<
+
+uninstall-info-am:
+       @$(PRE_UNINSTALL)
+       @if (install-info --version && \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
+         list='$(INFO_DEPS)'; \
+         for file in $$list; do \
+           relfile=`echo "$$file" | sed 's|^.*/||'`; \
+           echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove 
'$(DESTDIR)$(infodir)/$$relfile'"; \
+           install-info --info-dir="$(DESTDIR)$(infodir)" --remove 
"$(DESTDIR)$(infodir)/$$relfile"; \
+         done; \
+       else :; fi
+       @$(NORMAL_UNINSTALL)
+       @list='$(INFO_DEPS)'; \
+       for file in $$list; do \
+         relfile=`echo "$$file" | sed 's|^.*/||'`; \
+         relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+         (if cd "$(DESTDIR)$(infodir)"; then \
+            echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile 
$$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+            rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] 
$$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+          else :; fi); \
+       done
+
+dist-info: $(INFO_DEPS)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       list='$(INFO_DEPS)'; \
+       for base in $$list; do \
+         case $$base in \
+           $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+         esac; \
+         if test -f $$base; then d=.; else d=$(srcdir); fi; \
+         for file in $$d/$$base*; do \
+           relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+           test -f $(distdir)/$$relfile || \
+             cp -p $$file $(distdir)/$$relfile; \
+         done; \
+       done
+
+mostlyclean-aminfo:
+       -rm -rf cvs.aux cvs.cp cvs.cps cvs.fn cvs.fns cvs.ky cvs.kys cvs.log 
cvs.pg \
+         cvs.pgs cvs.tmp cvs.toc cvs.tp cvs.tps cvs.vr cvs.vrs \
+         cvs.dvi cvs.pdf cvs.ps cvs.html cvsclient.aux cvsclient.cp \
+         cvsclient.cps cvsclient.fn cvsclient.fns cvsclient.ky \
+         cvsclient.kys cvsclient.log cvsclient.pg cvsclient.pgs \
+         cvsclient.tmp cvsclient.toc cvsclient.tp cvsclient.tps \
+         cvsclient.vr cvsclient.vrs cvsclient.dvi cvsclient.pdf \
+         cvsclient.ps cvsclient.html
+
+maintainer-clean-aminfo:
+       @list='$(INFO_DEPS)'; for i in $$list; do \
+         i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+         echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] 
$$i_i[0-9][0-9]"; \
+         rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
+       done
+install-man1: $(man1_MANS) $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+       for i in $$l2; do \
+         case "$$i" in \
+           *.1*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+         else file=$$i; fi; \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         case "$$ext" in \
+           1*) ;; \
+           *) ext='1' ;; \
+         esac; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed -e 's/^.*\///'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
+       done
+uninstall-man1:
+       @$(NORMAL_UNINSTALL)
+       @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+       for i in $$l2; do \
+         case "$$i" in \
+           *.1*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         case "$$ext" in \
+           1*) ;; \
+           *) ext='1' ;; \
+         esac; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed -e 's/^.*\///'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
+         rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
+       done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(mkdir_p) $(distdir)/$(srcdir)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         dist-info
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(INFO_DEPS) $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+       for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi-am: $(DVIS)
+
+html: html-recursive
+
+html-am: $(HTMLS)
+
+info: info-recursive
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-info-am install-man
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-info-am: $(INFO_DEPS)
+       @$(NORMAL_INSTALL)
+       test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       list='$(INFO_DEPS)'; \
+       for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+         esac; \
+         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+         file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+         for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+                       $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+           if test -f $$ifile; then \
+             relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
+             echo " $(INSTALL_DATA) '$$ifile' 
'$(DESTDIR)$(infodir)/$$relfile'"; \
+             $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+           else : ; fi; \
+         done; \
+       done
+       @$(POST_INSTALL)
+       @if (install-info --version && \
+            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
+         list='$(INFO_DEPS)'; \
+         for file in $$list; do \
+           relfile=`echo "$$file" | sed 's|^.*/||'`; \
+           echo " install-info --info-dir='$(DESTDIR)$(infodir)' 
'$(DESTDIR)$(infodir)/$$relfile'";\
+           install-info --info-dir="$(DESTDIR)$(infodir)" 
"$(DESTDIR)$(infodir)/$$relfile" || :;\
+         done; \
+       else : ; fi
+install-man: install-man1
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-1 \
+       maintainer-clean-aminfo maintainer-clean-generic \
+       maintainer-clean-vti
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \
+       mostlyclean-vti
+
+pdf: pdf-recursive
+
+pdf-am: $(PDFS)
+
+ps: ps-recursive
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-info-am uninstall-man
+
+uninstall-info: uninstall-info-recursive
+
+uninstall-man: uninstall-man1
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+       clean clean-generic clean-recursive ctags ctags-recursive \
+       dist-info distclean distclean-generic distclean-recursive \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-man1 install-strip installcheck installcheck-am \
+       installdirs installdirs-am maintainer-clean maintainer-clean-1 \
+       maintainer-clean-aminfo maintainer-clean-generic \
+       maintainer-clean-recursive maintainer-clean-vti mostlyclean \
+       mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \
+       mostlyclean-recursive mostlyclean-vti pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am uninstall-info-am \
+       uninstall-man uninstall-man1
+
+
+doc: info pdf
+.PHONY: doc
+
+txt: $(TXTS)
+.PHONY: txt
+
+dvi: cvs.dvi cvsclient.dvi
+.PHONY: dvi
+
+# FIXME-AUTOMAKE:
+# For some reason if I remove version.texi, it doesn't get built automatically.
+# This needs to be fixed in automake.
+cvs.txt: cvs.texinfo $(srcdir)/version.texi
+cvsclient.txt: cvsclient.texi $(srcdir)/version-client.texi
+
+# The cvs-paper.pdf target needs to be very specific so that the other PDFs get
+# generated correctly.  If a more generic .ps.pdf implicit target is defined,
+# and cvs.ps is made before cvs.pdf, then cvs.pdf can be generated from the
+# .ps.pdf target and the PS source, which contains less information (hyperlinks
+# and such) than the usual texinfo source.
+#
+# It is possible that an implicit .ms.ps target could be safely defined.  I
+# don't recall looking into it.
+cvs-paper.ps: cvs-paper.ms
+       $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t
+       cp cvs-paper.ps-t $@
+       address@hidden -f cvs-paper.ps-t
+
+# This rule introduces some redundancy, but `make distcheck' requires that
+# Nothing in $(srcdir) be rebuilt, and this will always be rebuilt when it
+# is dependant on cvs-paper.ps and cvs-paper.ps isn't distributed.
+$(srcdir)/cvs-paper.pdf: cvs-paper.ms
+       $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms >cvs-paper.ps-t
+       ps2pdf cvs-paper.ps-t cvs-paper.pdf-t
+       cp cvs-paper.pdf-t $@
+       address@hidden -f cvs-paper.pdf-t cvs-paper.ps-t
+
+# Targets to build a man page from cvs.texinfo.
+$(srcdir)/cvs.1: @MAINTAINER_MODE_TRUE@ mkman cvs.man.header cvs.texinfo 
cvs.man.footer
+       $(PERL) ./mkman $(srcdir)/cvs.man.header $(srcdir)/cvs.texinfo \
+               $(srcdir)/cvs.man.footer >cvs.tmp
+       cp cvs.tmp $(srcdir)/cvs.1
+       address@hidden -f cvs.tmp
+
+cvs.dvi cvs.html $(srcdir)/cvs.info cvs.pdf cvs.ps cvs.txt: 
$(srcdir)/getdate-cvs.texi
+$(srcdir)/getdate-cvs.texi: stamp-gdt
+stamp-gdt: getdate.texi
+       @echo "@c This file is generated via a rule in Makefile.am from the" \
+         >getdate-cvs.tmp
+       @echo "@c getdate.texi file." >>getdate-cvs.tmp
+       @echo "@c" >>getdate-cvs.tmp
+       @echo "@c *** DO NOT EDIT THIS FILE DIRECTLY ***" >>getdate-cvs.tmp
+       @echo "@c" >>getdate-cvs.tmp
+       @echo "@c Edit getdate.texi instead." >>getdate-cvs.tmp
+       @echo >>getdate-cvs.tmp
+       sed -e "s/address@hidden /@appendixsec /" \
+           -e "s/address@hidden /@appendixsubsec /" \
+         <$(srcdir)/getdate.texi >>getdate-cvs.tmp
+       @cmp -s getdate-cvs.tmp $(srcdir)/getdate-cvs.texi \
+         || (echo "Updating getdate-cvs.texi"; \
+             cp getdate-cvs.tmp $(srcdir)/getdate-cvs.texi)
+       address@hidden -f getdate-cvs.tmp
+       @cp $(srcdir)/getdate-cvs.texi $@
+.texinfo.txt:
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+.txi.txt:
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+.texi.txt:
+       $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+        --no-headers -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/doc/RCSFILES
diff -u /dev/null ccvs/doc/RCSFILES:1.16.8.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/RCSFILES   Wed Dec 21 13:25:08 2005
@@ -0,0 +1,282 @@
+It would be nice if the RCS file format (which is implemented by a
+great many tools, both free and non-free, both by calling GNU RCS and
+by reimplementing access to RCS files) were documented in some
+standard separate from any one tool.  But as far as I know no such
+standard exists.  Hence this file.
+
+The place to start is the rcsfile.5 manpage in the GNU RCS 5.7
+distribution.  Then look at the diff at the end of this file (which
+contains a few fixes and clarifications to that manpage).
+
+If you are interested in MKS RCS, src/ci.c in GNU RCS 5.7 has a
+comment about their date format.  However, as far as we know there
+isn't really any document describing MKS's changes to the RCS file
+format.
+
+The rcsfile.5 manpage does not document what goes in the "text" field
+for each revision.  The answer is that the head revision contains the
+contents of that revision and every other revision contain a bunch of
+edits to produce that revision ("a" and "d" lines).  The GNU diff
+manual (the version I looked at was for GNU diff 2.4) documents this
+format somewhat (as the "RCS output format"), but the presentation is
+a bit confusing as it is all tangled up with the documentation of
+several other output formats.  If you just want some source code to
+look at, the part of CVS which applies these is RCS_deltas in
+src/rcs.c.
+
+The rcsfile.5 documentation only _very_ briefly touches on the order
+of the revisions.  The order _is_ important and CVS relies on it.
+Here is an example of what I was able to find, based on the join3
+sanity.sh testcase (and the behavior I am documenting here seems to be
+the same for RCS 5.7 and CVS 1.9.27):
+
+    1.1 ----------------->  1.2
+     \---> 1.1.2.1           \---> 1.2.2.1
+
+Here is how this shows up in the RCS file (omitting irrelevant parts):
+
+  admin:  head 1.2;
+  deltas:
+    1.2 branches 1.2.2.1; next 1.1;
+    1.1 branches 1.1.2.1; next;
+    1.1.2.1 branches; next;
+    1.2.2.1 branches; next;
+  deltatexts:
+    1.2
+    1.2.2.1
+    1.1
+    1.1.2.1
+
+Yes, the order seems to differ between the deltas and the deltatexts.
+I have no idea how much of this should actually be considered part of
+the RCS file format, and how much programs reading it should expect to
+encounter any order.
+
+The rcsfile.5 grammar shows the {num} after "next" as optional; if it
+is omitted then there is no next delta node (for example 1.1 or the
+head of a branch will typically have no next).
+
+There is one case where CVS uses CVS-specific, non-compatible changes
+to the RCS file format, and this is magic branches.  See cvs.texinfo
+for more information on them.  CVS also sets the RCS state to "dead"
+to indicate that a file does not exist in a given revision (this is
+stored just as any other RCS state is).
+
+The RCS file format allows quite a variety of extensions to be added
+in a compatible manner by use of the "newphrase" feature documented in
+rcsfile.5.  We won't try to document extensions not used by CVS in any
+detail, but we will briefly list them.  Each occurrence of a newphrase
+begins with an identifier, which is what we list here.  Future
+designers of extensions are strongly encouraged to pick
+non-conflicting identifiers.  Note that newphrase occurs several
+places in the RCS grammar, and a given extension may not be legal in
+all locations.  However, it seems better to reserve a particular
+identifier for all locations, to avoid confusion and complicated
+rules.
+
+   Identifier   Used by
+   ----------   -------
+   namespace    RCS library done at Silicon Graphics Inc. (SGI) in 1996
+                (a modified RCS 5.7--not sure it has any other name).
+   dead         A set of RCS patches developed by Rich Pixley at
+                Cygnus about 1992.  These were for CVS, and predated
+                the current CVS death support, which uses a state "dead"
+                rather than a "dead" newphrase.
+
+CVS does use newphrases to implement the `PreservePermissions'
+extension introduced in CVS 1.9.26.  The following new keywords are
+defined when PreservePermissions=yes:
+
+   owner
+   group
+   permissions
+   special
+   symlink
+   hardlinks
+
+The contents of the `owner' and `group' field should be a numeric uid
+and a numeric gid, respectively, representing the user and group who
+own the file.  The `permissions' field contains an octal integer,
+representing the permissions that should be applied to the file.  The
+`special' field contains two words; the first must be either `block'
+or `character', and the second is the file's device number.  The
+`symlink' field should be present only in files which are symbolic
+links to other files, and absent on all regular files.  The
+`hardlinks' field contains a list of filenames to which the current
+file is linked, in alphabetical order.  Because files often contain
+characters special to RCS, like `.' and sometimes even contain spaces
+or eight-bit characters, the filenames in the hardlinks field will
+usually be enclosed in RCS strings.  For example:
+
+       hardlinks       README @install.txt@ @Installation Notes@;
+
+The hardlinks field should always include the name of the current
+file.  That is, in the repository file README,v, any hardlinks fields
+in the delta nodes should include `README'; CVS will not operate
+properly if this is not done.
+
+Newphrases are also used to implement the 'commitid' & OpenPGP signature
+features. The following new keywords are defined for these purposes:
+
+   commitid
+   signatures
+
+The rules regarding keyword expansion are not documented along with
+the rest of the RCS file format; they are documented in the co(1)
+manpage in the RCS 5.7 distribution.  See also the "Keyword
+substitution" chapter of cvs.texinfo.  The co(1) manpage refers to
+special behavior if the log prefix for the $Log keyword is /* or (*.
+RCS 5.7 produces a warning whenever it behaves that way, and current
+versions of CVS do not handle this case in a special way (CVS 1.9 and
+earlier invoke RCS to perform keyword expansion).
+
+Note that if the "expand" keyword is omitted from the RCS file, the
+default is "kv".
+
+Note that the "comment {string};" syntax from rcsfile.5 specifies a
+comment leader, which affects expansion of the $Log keyword for old
+versions of RCS.  The comment leader is not used by RCS 5.7 or current
+versions of CVS.
+
+Both RCS 5.7 and current versions of CVS handle the $Log keyword in a
+different way if the log message starts with "checked in with -k by ".
+I don't think this behavior is documented anywhere.
+
+Here is a clarification regarding characters versus bytes in certain
+character sets like JIS and Big5:
+
+    The RCS file format, as described in the rcsfile(5) man page, is
+    actually byte-oriented, not character-oriented, despite hints to
+    the contrary in the man page.  This distinction is important for
+    multibyte characters.  For example, if a multibyte character
+    contains a `@' byte, the `@' must be doubled within strings in RCS
+    files, since RCS uses `@' bytes as escapes.
+
+    This point is not an issue for encodings like ISO 8859, which do
+    not have multibyte characters.  Nor is it an issue for encodings
+    like UTF-8 and EUC-JIS, which never uses ASCII bytes within a
+    multibyte character.  It is an issue only for multibyte encodings
+    like JIS and BIG5, which _do_ usurp ASCII bytes.
+
+    If `@' doubling occurs within a multibyte char, the resulting RCS
+    file is not a properly encoded text file.  Instead, it is a byte
+    stream that does not use a consistent character encoding that can
+    be understood by the usual text tools, since doubling `@' messes
+    up the encoding.  This point affects only programs that examine
+    the RCS files -- it doesn't affect the external RCS interface, as
+    the RCS commands always give you the properly encoded text files
+    and logs (assuming that you always check in properly encoded
+    text).
+
+    CVS 1.10 (and earlier) probably has some bugs in this area on
+    systems where a C "char" is signed and where the data contains
+    bytes with the eighth bit set.
+
+One common concern about the RCS file format is the fact that to get
+the head of a branch, one must apply deltas from the head of the trunk
+to the branchpoint, and then from the branchpoint to the head of the
+branch.  While more detailed analyses might be worth doing, we will
+note:
+
+    * The performance bottleneck for CVS generally is figuring out which
+    files to operate on and that sort of thing, not applying deltas.
+
+    * Here is one quick test (probably not a very good test; a better test
+    would use a normally sized file (say 50-200K) instead of a small one):
+
+       I just did a quick test with a small file (on a Sun Ultra 1/170E
+       running Solaris 5.5.1), with 1000 revisions on the main branch and
+       1000 revisions on branch that forked at the root (i.e., RCS revisions
+       1.1, 1.2, ..., 1.1000, and branch revisions 1.1.1.1, 1.1.1.2, ...,
+       1.1.1.1000).  It took about 0.15 seconds real time to check in the
+       first revision, and about 0.6 seconds to check in and 0.3 seconds to
+       retrieve revision 1.1.1.1000 (the worst case).
+
+    * Any attempt to "fix" this problem should be careful not to interfere
+    with other features, such as lightweight creation of branches
+    (particularly using CVS magic branches).
+
+Diff follows:
+
+(Note that in the following diff the old value for the Id keyword was:
+    Id: rcsfile.5in,v 5.6 1995/06/05 08:28:35 eggert Exp 
+and the new one was:
+    Id: rcsfile.5in,v 5.7 1996/12/09 17:31:44 eggert Exp 
+but since this file itself might be subject to keyword expansion I
+haven't included a diff for that fact).
+
+===================================================================
+RCS file: RCS/rcsfile.5in,v
+retrieving revision 5.6
+retrieving revision 5.7
+diff -u -r5.6 -r5.7
+--- rcsfile.5in        1995/06/05 08:28:35     5.6
++++ rcsfile.5in        1996/12/09 17:31:44     5.7
+@@ -85,7 +85,8 @@
+ .LP
+ \f2sym\fP     ::=     {\f2digit\fP}* \f2idchar\fP {\f2idchar\fP | 
\f2digit\fP}*
+ .LP
+-\f2idchar\fP  ::=     any visible graphic character except \f2special\fP
++\f2idchar\fP  ::=     any visible graphic character,
++              except \f2digit\fP or \f2special\fP
+ .LP
+ \f2special\fP ::=     \f3$\fP | \f3,\fP | \f3.\fP | \f3:\fP | \f3;\fP | 
address@hidden
+ .LP
+@@ -119,12 +120,23 @@
+ the minute (00\-59),
+ and
+ .I ss
+-the second (00\-60).
++the second (00\-59).
++If
+ .I Y
+-contains just the last two digits of the year
+-for years from 1900 through 1999,
+-and all the digits of years thereafter.
+-Dates use the Gregorian calendar; times use UTC.
++contains exactly two digits,
++they are the last two digits of a year from 1900 through 1999;
++otherwise,
++.I Y
++contains all the digits of the year.
++Dates use the Gregorian calendar.
++Times use UTC, except that for portability's sake leap seconds are not 
allowed;
++implementations that support leap seconds should output
++.B 59
++for
++.I ss
++during an inserted leap second, and should accept
++.B 59
++for a deleted leap second.
+ .PP
+ The
+ .I newphrase
+@@ -144,16 +156,23 @@
+ field in order of decreasing numbers.
+ The
+ .B head
+-field in the
+-.I admin
+-node points to the head of that sequence (i.e., contains
++field points to the head of that sequence (i.e., contains
+ the highest pair).
+ The
+ .B branch
+-node in the admin node indicates the default
++field indicates the default
+ branch (or revision) for most \*r operations.
+ If empty, the default
+ branch is the highest branch on the trunk.
++The
++.B symbols
++field associates symbolic names with revisions.
++For example, if the file contains
++.B "symbols rr:1.1;"
++then
++.B rr
++is a name for revision
++.BR 1.1 .
+ .PP
+ All
+ .I delta
+
Index: ccvs/doc/cvs.1
diff -u /dev/null ccvs/doc/cvs.1:1.38.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/cvs.1      Wed Dec 21 13:25:08 2005
@@ -0,0 +1,4023 @@
+.\" This is the man page for CVS.  It is auto-generated from the
+.\" cvs.man.header, cvs.texinfo, & cvs.man.footer files.  Please make changes
+.\" there.  A full copyright & license notice may also be found in cvs.texinfo.
+.\"
+.\" Man page autogeneration, including this header file, is
+.\" Copyright 2004-2005 The Free Software Foundation, Inc.,
+.\"                     Derek R. Price, & Ximbiot <http://ximbiot.com>.
+.\"
+.\" This documentation 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.
+.\"
+.\" This documentation 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 this documentation; if not, write to the Free Software
+.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.de Id
+.ds Rv \\$3
+.ds Dt \\$4
+..
+.TH CVS 1 "\*(Dt"
+.\" Full space in nroff; half space in troff
+.de SP
+.if n .sp
+.if t .sp .5
+..
+.\" quoted command
+.de `
+.RB ` "\|\\$1\|" '\\$2
+..
+.SH "NAME"
+cvs \- Concurrent Versions System
+.SH "SYNOPSIS"
+.TP
+\fBcvs\fP [ \fIcvs_options\fP ]
+.I cvs_command
+[
+.I command_options
+] [
+.I command_args
+]
+.SH "NOTE"
+.IX "revision control system" "\fLcvs\fR"
+.IX  cvs  ""  "\fLcvs\fP \- concurrent versions system"
+.IX  "concurrent versions system \- \fLcvs\fP"
+.IX  "release control system"  "cvs command"  ""  "\fLcvs\fP \- concurrent 
versions system"
+.IX  "source control system"  "cvs command"  ""  "\fLcvs\fP \- concurrent 
versions system"
+.IX  revisions  "cvs command"  ""  "\fLcvs\fP \- source control"
+This manpage is a summary of some of the features of
+\fBcvs\fP.  It is auto-generated from an appendix of the CVS manual.
+For more in-depth documentation, please consult the
+Cederqvist manual (via the
+.B info CVS
+command or otherwise,
+as described in the SEE ALSO section of this manpage).  Cross-references
+in this man page refer to nodes in the same.
+.SH "CVS commands"
+.SS "Guide to CVS commands"
+.SP
+This appendix describes the overall structure of
+\fBcvs\fR commands, and describes some commands in
+detail (others are described elsewhere; for a quick
+reference to \fBcvs\fR commands, see node `Invoking CVS\(aq in the CVS manual).
+.SP
+.SH "Structure"
+.SS "Overall structure of CVS commands"
+.IX "Structure"
+.IX "CVS command structure"
+.IX "Command structure"
+.IX "Format of CVS commands"
+.SP
+The overall format of all \fBcvs\fR commands is:
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
+
+.PD
+.IP "" 0
+.SP
+.IP "" 0
+\fBcvs\fR
+.IP "" 2
+The name of the \fBcvs\fR program.
+.SP
+.IP "" 0
+\fBcvs_options\fR
+.IP "" 2
+Some options that affect all sub-commands of \fBcvs\fR.  These are
+described below.
+.SP
+.IP "" 0
+\fBcvs_command\fR
+.IP "" 2
+One of several different sub-commands.  Some of the commands have
+aliases that can be used instead; those aliases are noted in the
+reference manual for that command.  There are only two situations
+where you may omit \fBcvs_command\fR: \fBcvs -H\fR elicits a
+list of available commands, and \fBcvs -v\fR displays version
+information on \fBcvs\fR itself.
+.SP
+.IP "" 0
+\fBcommand_options\fR
+.IP "" 2
+Options that are specific for the command.
+.SP
+.IP "" 0
+\fBcommand_args\fR
+.IP "" 2
+Arguments to the commands.
+.SP
+There is unfortunately some confusion between
+\fBcvs_options\fR and \fBcommand_options\fR.
+When given as a \fBcvs_option\fR, some options only
+affect some of the commands.  When given as a
+\fBcommand_option\fR it may have a different meaning, and
+be accepted by more commands.  In other words, do not
+take the above categorization too seriously.  Look at
+the documentation instead.
+.SP
+.SH "Exit status"
+.SS "CVS\(aqs exit status"
+.IX "Exit status, of CVS"
+.SP
+\fBcvs\fR can indicate to the calling environment whether it
+succeeded or failed by setting its \fIexit status\fR.
+The exact way of testing the exit status will vary from
+one operating system to another.  For example in a unix
+shell script the \fB$?\fR variable will be 0 if the
+last command returned a successful exit status, or
+greater than 0 if the exit status indicated failure.
+.SP
+If \fBcvs\fR is successful, it returns a successful status;
+if there is an error, it prints an error message and
+returns a failure status.  The one exception to this is
+the \fBcvs diff\fR command.  It will return a
+successful status if it found no differences, or a
+failure status if there were differences or if there
+was an error.  Because this behavior provides no good
+way to detect errors, in the future it is possible that
+\fBcvs diff\fR will be changed to behave like the
+other \fBcvs\fR commands.
+.SP
+.SH "~/.cvsrc"
+.SS "Default options and the ~/.cvsrc file"
+.IX "\&.cvsrc file"
+.IX "Option defaults"
+.SP
+There are some \fBcommand_options\fR that are used so
+often that you might have set up an alias or some other
+means to make sure you always specify that option.  One
+example (the one that drove the implementation of the
+\fB.cvsrc\fR support, actually) is that many people find the
+default output of the \fBdiff\fR command to be very
+hard to read, and that either context diffs or unidiffs
+are much easier to understand.
+.SP
+The \fB~/.cvsrc\fR file is a way that you can add
+default options to \fBcvs_commands\fR within cvs,
+instead of relying on aliases or other shell scripts.
+.SP
+The format of the \fB~/.cvsrc\fR file is simple.  The
+file is searched for a line that begins with the same
+name as the \fBcvs_command\fR being executed.  If a
+match is found, then the remainder of the line is split
+up (at whitespace characters) into separate options and
+added to the command arguments \fIbefore\fR any
+options from the command line.
+.SP
+If a command has two names (e.g., \fBcheckout\fR and
+\fBco\fR), the official name, not necessarily the one
+used on the command line, will be used to match against
+the file.  So if this is the contents of the user\(aqs
+\fB~/.cvsrc\fR file:
+.SP
+.PD 0
+.SP
+.IP "" 2
+log -N
+.IP "" 2
+diff -uN
+.IP "" 2
+rdiff -u
+.IP "" 2
+update -Pd
+.IP "" 2
+checkout -P
+.IP "" 2
+release -d
+
+.PD
+.IP "" 0
+.SP
+the command \fBcvs checkout foo\fR would have the
+\fB-P\fR option added to the arguments, as well as
+\fBcvs co foo\fR.
+.SP
+With the example file above, the output from \fBcvs
+diff foobar\fR will be in unidiff format.  \fBcvs diff
+-c foobar\fR will provide context diffs, as usual.
+Getting "old" format diffs would be slightly more
+complicated, because \fBdiff\fR doesn\(aqt have an option
+to specify use of the "old" format, so you would need
+\fBcvs -f diff foobar\fR.
+.SP
+In place of the command name you can use \fBcvs\fR to
+specify global options (see node `Global options\(aq in the CVS manual).  For
+example the following line in \fB.cvsrc\fR
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs -z6
+
+.PD
+.IP "" 0
+.SP
+causes \fBcvs\fR to use compression level 6.
+.SP
+.SH "Global options"
+.IX "Options, global"
+.IX "Global options"
+.IX "Left-hand options"
+.SP
+The available \fBcvs_options\fR (that are given to the
+left of \fBcvs_command\fR) are:
+.SP
+.IP "" 0
+\fB--allow-root=\fIrootdir\fB\fR
+.IP "" 2
+May be invoked multiple times to specify one legal \fBcvsroot\fR directory with
+each invocation.  Also causes CVS to preparse the configuration file for each
+specified root, which can be useful when configuring write proxies,  See
+see node `Password authentication server\(aq in the CVS manual & see node 
`Write proxies\(aq in the CVS manual.
+.SP
+.IX "Authentication, stream"
+.IX "Stream authentication"
+.IP "" 0
+\fB-a\fR
+.IP "" 2
+Authenticate all communication between the client and
+the server.  Only has an effect on the \fBcvs\fR client.
+As of this writing, this is only implemented when using
+a GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual).
+Authentication prevents certain sorts of attacks
+involving hijacking the active \fBtcp\fR connection.
+Enabling authentication does not enable encryption.
+.SP
+.IX "RCSBIN, overriding"
+.IX "Overriding RCSBIN"
+.IP "" 0
+\fB-b \fIbindir\fB\fR
+.IP "" 2
+In \fBcvs\fR 1.9.18 and older, this specified that
+\fBrcs\fR programs are in the \fIbindir\fR directory.
+Current versions of \fBcvs\fR do not run \fBrcs\fR
+programs; for compatibility this option is accepted,
+but it does nothing.
+.SP
+.IX "TMPDIR, environment variable"
+.IX "temporary file directory, set via command line"
+.IX "temporary file directory, set via environment variable"
+.IX "temporary file directory, set via config"
+.IX "temporary files, location of"
+.IP "" 0
+\fB-T \fItempdir\fB\fR
+.IP "" 2
+Use \fItempdir\fR as the directory where temporary files are
+located.
+.SP
+The \fBcvs\fR client and server store temporary files in a temporary directory.
+The path to this temporary directory is set via, in order of precedence:
+.SP
+.IP "\(bu" 4
+The argument to the global \fB-T\fR option.
+.SP
+.IP "\(bu" 4
+The value set for \fBTmpDir\fR in the config file (server only -
+see node `config\(aq in the CVS manual).
+.SP
+.IP "\(bu" 4
+The contents of the \fB$TMPDIR\fR environment variable (\fB%TMPDIR%\fR on
+Windows - see node `Environment variables\(aq in the CVS manual).
+.SP
+.IP "\(bu" 4
+/tmp
+.SP
+.SP
+Temporary directories should always be specified as an absolute pathname.
+When running a CVS client, \fB-T\fR affects only the local process;
+specifying \fB-T\fR for the client has no effect on the server and
+vice versa.
+.SP
+.IX "CVSROOT, overriding"
+.IX "Overriding CVSROOT"
+.IP "" 0
+\fB-d \fIcvs_root_directory\fB\fR
+.IP "" 2
+Use \fIcvs_root_directory\fR as the root directory
+pathname of the repository.  Overrides the setting of
+the \fB$CVSROOT\fR environment variable.  see node `Repository\(aq in the CVS 
manual.
+.SP
+.IX "EDITOR, overriding"
+.IX "Overriding EDITOR"
+.IP "" 0
+\fB-e \fIeditor\fB\fR
+.IP "" 2
+Use \fIeditor\fR to enter revision log information.  Overrides the
+setting of the \fB$CVSEDITOR\fR and \fB$EDITOR\fR
+environment variables.  For more information, see
+see node `Committing your changes\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+Do not read the \fB~/.cvsrc\fR file.  This
+option is most often used because of the
+non-orthogonality of the \fBcvs\fR option set.  For
+example, the \fBcvs log\fR option \fB-N\fR (turn off
+display of tag names) does not have a corresponding
+option to turn the display on.  So if you have
+\fB-N\fR in the \fB~/.cvsrc\fR entry for \fBlog\fR,
+you may need to use \fB-f\fR to show the tag names.
+.SP
+.IP "" 0
+\fB-H\fR
+.IP "" 2
+.IP "" 0
+\fB--help\fR
+.IP "" 2
+Display usage information about the specified \fBcvs_command\fR
+(but do not actually execute the command).  If you don\(aqt specify
+a command name, \fBcvs -H\fR displays overall help for
+\fBcvs\fR, including a list of other help options.
+.SP
+.IX "Read-only repository mode"
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Turns on read-only repository mode.  This allows one to check out from a
+read-only repository, such as within an anoncvs server, or from a \fBcd-rom\fR
+repository.
+.SP
+Same effect as if the \fBCVSREADONLYFS\fR environment
+variable is set. Using \fB-R\fR can also considerably
+speed up checkouts over NFS.
+.SP
+.IX "Read-only mode"
+.IP "" 0
+\fB-n\fR
+.IP "" 2
+Do not change any files.  Attempt to execute the
+\fBcvs_command\fR, but only to issue reports; do not remove,
+update, or merge any existing files, or create any new files.
+.SP
+Note that \fBcvs\fR will not necessarily produce exactly
+the same output as without \fB-n\fR.  In some cases
+the output will be the same, but in other cases
+\fBcvs\fR will skip some of the processing that would
+have been required to produce the exact same output.
+.SP
+.IP "" 0
+\fB-Q\fR
+.IP "" 2
+Cause the command to be really quiet; the command will only
+generate output for serious problems.
+.SP
+.IP "" 0
+\fB-q\fR
+.IP "" 2
+Cause the command to be somewhat quiet; informational messages,
+such as reports of recursion through subdirectories, are
+suppressed.
+.SP
+.IX "Read-only files, and -r"
+.IP "" 0
+\fB-r\fR
+.IP "" 2
+Make new working files read-only.  Same effect
+as if the \fB$CVSREAD\fR environment variable is set
+(see node `Environment variables\(aq in the CVS manual).  The default is to
+make working files writable, unless watches are on
+(see node `Watches\(aq in the CVS manual).
+.SP
+.IP "" 0
+\fB-s \fIvariable\fB=\fIvalue\fB\fR
+.IP "" 2
+Set a user variable (see node `Variables\(aq in the CVS manual).
+.SP
+.IX "Trace"
+.IP "" 0
+\fB-t\fR
+.IP "" 2
+Trace program execution; display messages showing the steps of
+\fBcvs\fR activity.  Particularly useful with \fB-n\fR to explore the
+potential impact of an unfamiliar command.
+.SP
+.IP "" 0
+\fB-v\fR
+.IP "" 2
+.IP "" 0
+\fB--version\fR
+.IP "" 2
+Display version and copyright information for \fBcvs\fR.
+.SP
+.IX "CVSREAD, overriding"
+.IX "Overriding CVSREAD"
+.IP "" 0
+\fB-w\fR
+.IP "" 2
+Make new working files read-write.  Overrides the
+setting of the \fB$CVSREAD\fR environment variable.
+Files are created read-write by default, unless \fB$CVSREAD\fR is
+set or \fB-r\fR is given.
+.SP
+.IP "" 0
+\fB-x\fR
+.IP "" 2
+.IX "Encryption"
+Encrypt all communication between the client and the
+server.  Only has an effect on the \fBcvs\fR client.  As
+of this writing, this is only implemented when using a
+GSSAPI connection (see node `GSSAPI authenticated\(aq in the CVS manual) or a
+Kerberos connection (see node `Kerberos authenticated\(aq in the CVS manual).
+Enabling encryption implies that message traffic is
+also authenticated.  Encryption support is not
+available by default; it must be enabled using a
+special configure option, \fB--enable-encryption\fR,
+when you build \fBcvs\fR.
+.SP
+.IP "" 0
+\fB-z \fIlevel\fB\fR
+.IP "" 2
+.IX "Compression"
+.IX "Gzip"
+Request compression \fIlevel\fR for network traffic.
+\fBcvs\fR interprets \fIlevel\fR identically to the \fBgzip\fR program.
+Valid levels are 1 (high speed, low compression) to
+9 (low speed, high compression), or 0 to disable
+compression (the default).  Data sent to the server will
+be compressed at the requested level and the client will request
+the server use the same compression level for data returned.  The
+server will use the closest level allowed by the server administrator to
+compress returned data.  This option only has an effect when passed to
+the \fBcvs\fR client.
+.SP
+.IX "OpenPGP Signatures"
+.IX "Commit Signatures"
+.IP "" 0
+\fB-g\fR
+.IP "" 2
+.IP "" 0
+\fB--sign\fR
+.IP "" 2
+.IP "" 0
+\fB--no-sign\fR
+.IP "" 2
+Force OpenPGP signatures on or off.  \fB-g\fR & \fB--sign\fR will cause the
+commit to abort if the server does not support OpenPGP signatures.  Without one
+of these options, CVS will autonegotiate signing, attempting to sign commits
+when the server supports it.  Overrides the \fBsign\fR and \fBno-sign\fR
+method options.
+.SP
+.IP "" 0
+\fB--sign-template \fItemplate\fB\fR
+.IP "" 2
+Use \fItemplate\fR as the command line template to generate OpenPGP signatures.
+Format strings in this template are substituted before the commit is run:
+.SP
+.IP "" 2
+\fB%t\fR
+.IP "" 4
+Substitute in the textmode flag (defaults to \fB--textmode\fR) when a
+signature is being generated for a text file.
+.SP
+.IP "" 2
+\fB%a\fR
+.IP "" 4
+Substitute in any \fIarg\fRs set via the \fB--sign-arg\fR option or the
+CVSROOT sign-arg method option.
+.SP
+.IP "" 2
+\fB%s\fR
+.IP "" 4
+Substitute the name of the file to generate a signature for.
+.SP
+This template should send the generated signature to its standard output.
+Overrides the \fBsign-template\fR method optoin and defaults to something like
+\fB/usr/bin/gpg --detach-sign --output - %t %a %s\fR.
+.SP
+.SH "Common options"
+.SS "Common command options"
+.IX "Common options"
+.IX "Right-hand options"
+.SP
+This section describes the \fBcommand_options\fR that
+are available across several \fBcvs\fR commands.  These
+options are always given to the right of
+\fBcvs_command\fR. Not all
+commands support all of these options; each option is
+only supported for commands where it makes sense.
+However, when a command has one of these options you
+can almost always count on the same behavior of the
+option as in other commands.  (Other command options,
+which are listed with the individual commands, may have
+different behavior from one \fBcvs\fR command to the other).
+.SP
+\fBThe \fBhistory\fB command is an exception; it supports
+many options that conflict even with these standard options.\fR
+.SP
+.IX "Dates"
+.IX "Time"
+.IX "Specifying dates"
+.IP "" 0
+\fB-D \fIdate_spec\fB\fR
+.IP "" 2
+Use the most recent revision no later than \fIdate_spec\fR.
+\fIdate_spec\fR is a single argument, a date description
+specifying a date in the past.
+.SP
+The specification is \fIsticky\fR when you use it to make a
+private copy of a source file; that is, when you get a working
+file using \fB-D\fR, \fBcvs\fR records the date you specified, so that
+further updates in the same directory will use the same date
+(for more information on sticky tags/dates, see node `Sticky tags\(aq in the 
CVS manual).
+.SP
+\fB-D\fR is available with the \fBannotate\fR, \fBcheckout\fR,
+\fBdiff\fR, \fBexport\fR, \fBhistory\fR, \fBls\fR,
+\fBrdiff\fR, \fBrls\fR, \fBrtag\fR, \fBtag\fR, and \fBupdate\fR commands.
+(The \fBhistory\fR command uses this option in a
+slightly different way; see node `history options\(aq in the CVS manual).
+.SP
+For a complete description of the date formats accepted by \fBcvs\fR,
+see node `Date input formats\(aq in the CVS manual.
+.SP
+Remember to quote the argument to the \fB-D\fR
+flag so that your shell doesn\(aqt interpret spaces as
+argument separators.  A command using the \fB-D\fR
+flag can look like this:
+.SP
+.PD 0
+.SP
+.IP "" 4
+$ cvs diff -D "1 hour ago" cvs.texinfo
+
+.PD
+.IP "" 2
+.SP
+.IX "Forcing a tag match"
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+When you specify a particular date or tag to \fBcvs\fR commands, they
+normally ignore files that do not contain the tag (or did not
+exist prior to the date) that you specified.  Use the \fB-f\fR option
+if you want files retrieved even when there is no match for the
+tag or date.  (The most recent revision of the file
+will be used).
+.SP
+Note that even with \fB-f\fR, a tag that you specify
+must exist (that is, in some file, not necessary in
+every file).  This is so that \fBcvs\fR will continue to
+give an error if you mistype a tag name.
+.SP
+\fB-f\fR is available with these commands:
+\fBannotate\fR, \fBcheckout\fR, \fBexport\fR,
+\fBrdiff\fR, \fBrtag\fR, and \fBupdate\fR.
+.SP
+\fBWARNING:  The \fBcommit\fB and \fBremove\fB
+commands also have a
+\fB-f\fB option, but it has a different behavior for
+those commands.  See see node `commit options\(aq in the CVS manual, and
+see node `Removing files\(aq in the CVS manual.\fR
+.SP
+.IP "" 0
+\fB-k \fIkflag\fB\fR
+.IP "" 2
+Override the default processing of RCS keywords other than
+\fB-kb\fR.  see node `Keyword substitution\(aq in the CVS manual, for the 
meaning of
+\fIkflag\fR.  Used with the \fBcheckout\fR and \fBupdate\fR
+commands, your \fIkflag\fR specification is
+\fIsticky\fR; that is, when you use this option
+with a \fBcheckout\fR or \fBupdate\fR command,
+\fBcvs\fR associates your selected \fIkflag\fR with any files
+it operates on, and continues to use that \fIkflag\fR with future
+commands on the same files until you specify otherwise.
+.SP
+The \fB-k\fR option is available with the \fBadd\fR,
+\fBcheckout\fR, \fBdiff\fR, \fBexport\fR, \fBimport\fR,
+\fBrdiff\fR, and \fBupdate\fR commands.
+.SP
+\fBWARNING: Prior to CVS version 1.12.2, the \fB-k\fB flag
+overrode the \fB-kb\fB indication for a binary file.  This could
+sometimes corrupt binary files.  see node `Merging and keywords\(aq in the CVS 
manual, for
+more.\fR
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory, rather than
+recursing through subdirectories.
+.SP
+Available with the following commands: \fBannotate\fR, \fBcheckout\fR,
+\fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR,
+\fBlog\fR, \fBrdiff\fR, \fBremove\fR, \fBrtag\fR,
+\fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR,
+and \fBwatchers\fR.
+.SP
+.IX "Editor, avoiding invocation of"
+.IX "Avoiding editor invocation"
+.IP "" 0
+\fB-m \fImessage\fB\fR
+.IP "" 2
+Use \fImessage\fR as log information, instead of
+invoking an editor.
+.SP
+Available with the following commands: \fBadd\fR,
+\fBcommit\fR and \fBimport\fR.
+.SP
+.IP "" 0
+\fB-n\fR
+.IP "" 2
+Do not run any tag program.  (A program can be
+specified to run in the modules
+database (see node `modules\(aq in the CVS manual); this option bypasses it).
+.SP
+\fBThis is not the same as the \fBcvs -n\fB
+program option, which you can specify to the left of a cvs command!\fR
+.SP
+Available with the \fBcheckout\fR, \fBexport\fR,
+and \fBrtag\fR commands.
+.SP
+.IP "" 0
+\fB-P\fR
+.IP "" 2
+Prune empty directories.  See see node `Removing directories\(aq in the CVS 
manual.
+.SP
+.IP "" 0
+\fB-p\fR
+.IP "" 2
+Pipe the files retrieved from the repository to standard output,
+rather than writing them in the current directory.  Available
+with the \fBcheckout\fR and \fBupdate\fR commands.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Process directories recursively.  This is the default for all \fBcvs\fR
+commands, with the exception of \fBls\fR & \fBrls\fR.
+.SP
+Available with the following commands: \fBannotate\fR, \fBcheckout\fR,
+\fBcommit\fR, \fBdiff\fR, \fBedit\fR, \fBeditors\fR, \fBexport\fR,
+\fBls\fR, \fBrdiff\fR, \fBremove\fR, \fBrls\fR, \fBrtag\fR,
+\fBstatus\fR, \fBtag\fR, \fBunedit\fR, \fBupdate\fR, \fBwatch\fR,
+and \fBwatchers\fR.
+.SP
+.IP "" 0
+\fB-r \fItag\fB\fR
+.IP "" 2
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+.IX "HEAD, special tag"
+.IX "BASE, special tag"
+Use the revision specified by the \fItag\fR argument (and the \fIdate\fR
+argument for the commands which accept it) instead of the
+default \fIhead\fR revision.  As well as arbitrary tags defined
+with the \fBtag\fR or \fBrtag\fR command, two special tags are
+always available: \fBHEAD\fR refers to the most recent version
+available in the repository, and \fBBASE\fR refers to the
+revision you last checked out into the current working directory.
+.SP
+The tag specification is sticky when you use this
+with \fBcheckout\fR or \fBupdate\fR to make your own
+copy of a file: \fBcvs\fR remembers the tag and continues to use it on
+future update commands, until you specify otherwise (for more information
+on sticky tags/dates, see node `Sticky tags\(aq in the CVS manual).
+.SP
+The tag can be either a symbolic or numeric tag, as
+described in see node `Tags\(aq in the CVS manual, or the name of a branch, as
+described in see node `Branching and merging\(aq in the CVS manual.
+When \fItag\fR is the name of a
+branch, some commands accept the optional \fIdate\fR argument to specify
+the revision as of the given date on the branch.
+When a command expects a specific revision,
+the name of a branch is interpreted as the most recent
+revision on that branch.
+.SP
+Specifying the \fB-q\fR global option along with the
+\fB-r\fR command option is often useful, to suppress
+the warning messages when the \fBrcs\fR file
+does not contain the specified tag.
+.SP
+\fBThis is not the same as the overall \fBcvs -r\fB option,
+which you can specify to the left of a \fBcvs\fB command!\fR
+.SP
+\fB-r \fItag\fB\fR is available with the \fBcommit\fR and \fBhistory\fR
+commands.
+.SP
+\fB-r \fItag\fB[:\fIdate\fB]\fR is available with the \fBannotate\fR,
+\fBcheckout\fR, \fBdiff\fR, \fBexport\fR, \fBrdiff\fR, \fBrtag\fR,
+and \fBupdate\fR commands.
+.SP
+.IP "" 0
+\fB-W\fR
+.IP "" 2
+Specify file names that should be filtered.  You can
+use this option repeatedly.  The spec can be a file
+name pattern of the same type that you can specify in
+the \fB.cvswrappers\fR file.
+Available with the following commands: \fBimport\fR,
+and \fBupdate\fR.
+.SP
+.SP
+.SH "admin"
+.SS "Administration"
+.IX "Admin (subcommand)"
+.SP
+.IP "\(bu" 2
+Requires: repository, working directory.
+.IP "\(bu" 2
+Changes: repository.
+.IP "\(bu" 2
+Synonym: rcs
+.SP
+This is the \fBcvs\fR interface to assorted
+administrative facilities.  Some of them have
+questionable usefulness for \fBcvs\fR but exist for
+historical purposes.  Some of the questionable options
+are likely to disappear in the future.  This command
+\fIdoes\fR work recursively, so extreme care should be
+used.
+.SP
+.IX "cvsadmin"
+.IX "UserAdminOptions, in CVSROOT/config"
+On unix, if there is a group named \fBcvsadmin\fR,
+only members of that group can run \fBcvs admin\fR
+commands, except for those specified using the
+\fBUserAdminOptions\fR configuration option in the
+\fBCVSROOT/config\fR file.  Options specified using
+\fBUserAdminOptions\fR can be run by any user.  See
+see node `config\(aq in the CVS manual for more on \fBUserAdminOptions\fR.
+.SP
+The \fBcvsadmin\fR group should exist on the server,
+or any system running the non-client/server \fBcvs\fR.
+To disallow \fBcvs admin\fR for all users, create a
+group with no users in it.  On NT, the \fBcvsadmin\fR
+feature does not exist and all users
+can run \fBcvs admin\fR.
+.SP
+.SH "admin options"
+.SP
+Some of these options have questionable usefulness for
+\fBcvs\fR but exist for historical purposes.  Some even
+make it impossible to use \fBcvs\fR until you undo the
+effect!
+.SP
+.IP "" 0
+\fB-A\fIoldfile\fB\fR
+.IP "" 2
+Might not work together with \fBcvs\fR.  Append the
+access list of \fIoldfile\fR to the access list of the
+\fBrcs\fR file.
+.SP
+.IP "" 0
+\fB-a\fIlogins\fB\fR
+.IP "" 2
+Might not work together with \fBcvs\fR.  Append the
+login names appearing in the comma-separated list
+\fIlogins\fR to the access list of the \fBrcs\fR file.
+.SP
+.IP "" 0
+\fB-b[\fIrev\fB]\fR
+.IP "" 2
+Set the default branch to \fIrev\fR.  In \fBcvs\fR, you
+normally do not manipulate default branches; sticky
+tags (see node `Sticky tags\(aq in the CVS manual) are a better way to decide
+which branch you want to work on.  There is one reason
+to run \fBcvs admin -b\fR: to revert to the vendor\(aqs
+version when using vendor branches (see node `Reverting
+local changes\(aq in the CVS manual).
+There can be no space between \fB-b\fR and its argument.
+.SP
+.IX "Comment leader"
+.IP "" 0
+\fB-c\fIstring\fB\fR
+.IP "" 2
+Sets the comment leader to \fIstring\fR.  The comment
+leader is not used by current versions of \fBcvs\fR or
+\fBrcs\fR 5.7.  Therefore, you can almost surely not
+worry about it.  see node `Keyword substitution\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-e[\fIlogins\fB]\fR
+.IP "" 2
+Might not work together with \fBcvs\fR.  Erase the login
+names appearing in the comma-separated list
+\fIlogins\fR from the access list of the RCS file.  If
+\fIlogins\fR is omitted, erase the entire access list.
+There can be no space between \fB-e\fR and its argument.
+.SP
+.IP "" 0
+\fB-I\fR
+.IP "" 2
+Run interactively, even if the standard input is not a
+terminal.  This option does not work with the
+client/server \fBcvs\fR and is likely to disappear in
+a future release of \fBcvs\fR.
+.SP
+.IP "" 0
+\fB-i\fR
+.IP "" 2
+Useless with \fBcvs\fR.  This creates and initializes a
+new \fBrcs\fR file, without depositing a revision.  With
+\fBcvs\fR, add files with the \fBcvs add\fR command
+(see node `Adding files\(aq in the CVS manual).
+.SP
+.IP "" 0
+\fB-k\fIsubst\fB\fR
+.IP "" 2
+Set the default keyword
+substitution to \fIsubst\fR.  see node `Keyword
+substitution\(aq in the CVS manual.  Giving an explicit \fB-k\fR option to
+\fBcvs update\fR, \fBcvs export\fR, or \fBcvs
+checkout\fR overrides this default.
+.SP
+.IP "" 0
+\fB-l[\fIrev\fB]\fR
+.IP "" 2
+Lock the revision with number \fIrev\fR.  If a branch
+is given, lock the latest revision on that branch.  If
+\fIrev\fR is omitted, lock the latest revision on the
+default branch.  There can be no space between
+\fB-l\fR and its argument.
+.SP
+This can be used in conjunction with the
+\fBrcslock.pl\fR script in the \fBcontrib\fR
+directory of the \fBcvs\fR source distribution to
+provide reserved checkouts (where only one user can be
+editing a given file at a time).  See the comments in
+that file for details (and see the \fBREADME\fR file
+in that directory for disclaimers about the unsupported
+nature of contrib).  According to comments in that
+file, locking must set to strict (which is the default).
+.SP
+.IP "" 0
+\fB-L\fR
+.IP "" 2
+Set locking to strict.  Strict locking means that the
+owner of an RCS file is not exempt from locking for
+checkin.  For use with \fBcvs\fR, strict locking must be
+set; see the discussion under the \fB-l\fR option above.
+.SP
+.IX "Changing a log message"
+.IX "Replacing a log message"
+.IX "Correcting a log message"
+.IX "Fixing a log message"
+.IX "Log message, correcting"
+.IP "" 0
+\fB-m\fIrev\fB:\fImsg\fB\fR
+.IP "" 2
+Replace the log message of revision \fIrev\fR with
+\fImsg\fR.
+.SP
+.IP "" 0
+\fB-N\fIname\fB[:[\fIrev\fB]]\fR
+.IP "" 2
+Act like \fB-n\fR, except override any previous
+assignment of \fIname\fR.  For use with magic branches,
+see see node `Magic branch numbers\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-n\fIname\fB[:[\fIrev\fB]]\fR
+.IP "" 2
+Associate the symbolic name \fIname\fR with the branch
+or revision \fIrev\fR.  It is normally better to use
+\fBcvs tag\fR or \fBcvs rtag\fR instead.  Delete the
+symbolic name if both \fB:\fR and \fIrev\fR are
+omitted; otherwise, print an error message if
+\fIname\fR is already associated with another number.
+If \fIrev\fR is symbolic, it is expanded before
+association.  A \fIrev\fR consisting of a branch number
+followed by a \fB.\fR stands for the current latest
+revision in the branch.  A \fB:\fR with an empty
+\fIrev\fR stands for the current latest revision on the
+default branch, normally the trunk.  For example,
+\fBcvs admin -n\fIname\fB:\fR associates \fIname\fR with the
+current latest revision of all the RCS files;
+this contrasts with \fBcvs admin -n\fIname\fB:$\fR which
+associates \fIname\fR with the revision numbers
+extracted from keyword strings in the corresponding
+working files.
+.SP
+.IX "Deleting revisions"
+.IX "Outdating revisions"
+.IX "Saving space"
+.IP "" 0
+\fB-o\fIrange\fB\fR
+.IP "" 2
+Deletes (\fIoutdates\fR) the revisions given by
+\fIrange\fR.
+.SP
+Note that this command can be quite dangerous unless
+you know \fIexactly\fR what you are doing (for example
+see the warnings below about how the
+\fIrev1\fR:\fIrev2\fR syntax is confusing).
+.SP
+If you are short on disc this option might help you.
+But think twice before using it\(emthere is no way short
+of restoring the latest backup to undo this command!
+If you delete different revisions than you planned,
+either due to carelessness or (heaven forbid) a \fBcvs\fR
+bug, there is no opportunity to correct the error
+before the revisions are deleted.  It probably would be
+a good idea to experiment on a copy of the repository
+first.
+.SP
+Specify \fIrange\fR in one of the following ways:
+.SP
+.IP "" 2
+\fB\fIrev1\fB::\fIrev2\fB\fR
+.IP "" 4
+Collapse all revisions between rev1 and rev2, so that
+\fBcvs\fR only stores the differences associated with going
+from rev1 to rev2, not intermediate steps.  For
+example, after \fB-o 1.3::1.5\fR one can retrieve
+revision 1.3, revision 1.5, or the differences to get
+from 1.3 to 1.5, but not the revision 1.4, or the
+differences between 1.3 and 1.4.  Other examples:
+\fB-o 1.3::1.4\fR and \fB-o 1.3::1.3\fR have no
+effect, because there are no intermediate revisions to
+remove.
+.SP
+.IP "" 2
+\fB::\fIrev\fB\fR
+.IP "" 4
+Collapse revisions between the beginning of the branch
+containing \fIrev\fR and \fIrev\fR itself.  The
+branchpoint and \fIrev\fR are left intact.  For
+example, \fB-o ::1.3.2.6\fR deletes revision 1.3.2.1,
+revision 1.3.2.5, and everything in between, but leaves
+1.3 and 1.3.2.6 intact.
+.SP
+.IP "" 2
+\fB\fIrev\fB::\fR
+.IP "" 4
+Collapse revisions between \fIrev\fR and the end of the
+branch containing \fIrev\fR.  Revision \fIrev\fR is
+left intact but the head revision is deleted.
+.SP
+.IP "" 2
+\fB\fIrev\fB\fR
+.IP "" 4
+Delete the revision \fIrev\fR.  For example, \fB-o
+1.3\fR is equivalent to \fB-o 1.2::1.4\fR.
+.SP
+.IP "" 2
+\fB\fIrev1\fB:\fIrev2\fB\fR
+.IP "" 4
+Delete the revisions from \fIrev1\fR to \fIrev2\fR,
+inclusive, on the same branch.  One will not be able to
+retrieve \fIrev1\fR or \fIrev2\fR or any of the
+revisions in between.  For example, the command
+\fBcvs admin -oR_1_01:R_1_02 \&.\fR is rarely useful.
+It means to delete revisions up to, and including, the
+tag R_1_02.  But beware!  If there are files that have not
+changed between R_1_02 and R_1_03 the file will have
+\fIthe same\fR numerical revision number assigned to
+the tags R_1_02 and R_1_03.  So not only will it be
+impossible to retrieve R_1_02; R_1_03 will also have to
+be restored from the tapes!  In most cases you want to
+specify \fIrev1\fR::\fIrev2\fR instead.
+.SP
+.IP "" 2
+\fB:\fIrev\fB\fR
+.IP "" 4
+Delete revisions from the beginning of the
+branch containing \fIrev\fR up to and including
+\fIrev\fR.
+.SP
+.IP "" 2
+\fB\fIrev\fB:\fR
+.IP "" 4
+Delete revisions from revision \fIrev\fR, including
+\fIrev\fR itself, to the end of the branch containing
+\fIrev\fR.
+.SP
+None of the revisions to be deleted may have
+branches or locks.
+.SP
+If any of the revisions to be deleted have symbolic
+names, and one specifies one of the \fB::\fR syntaxes,
+then \fBcvs\fR will give an error and not delete any
+revisions.  If you really want to delete both the
+symbolic names and the revisions, first delete the
+symbolic names with \fBcvs tag -d\fR, then run
+\fBcvs admin -o\fR.  If one specifies the
+non-\fB::\fR syntaxes, then \fBcvs\fR will delete the
+revisions but leave the symbolic names pointing to
+nonexistent revisions.  This behavior is preserved for
+compatibility with previous versions of \fBcvs\fR, but
+because it isn\(aqt very useful, in the future it may
+change to be like the \fB::\fR case.
+.SP
+Due to the way \fBcvs\fR handles branches \fIrev\fR
+cannot be specified symbolically if it is a branch.
+see node `Magic branch numbers\(aq in the CVS manual, for an explanation.
+.SP
+Make sure that no-one has checked out a copy of the
+revision you outdate.  Strange things will happen if he
+starts to edit it and tries to check it back in.  For
+this reason, this option is not a good way to take back
+a bogus commit; commit a new revision undoing the bogus
+change instead (see node `Merging two revisions\(aq in the CVS manual).
+.SP
+.IP "" 0
+\fB-q\fR
+.IP "" 2
+Run quietly; do not print diagnostics.
+.SP
+.IP "" 0
+\fB-s\fIstate\fB[:\fIrev\fB]\fR
+.IP "" 2
+Useful with \fBcvs\fR.  Set the state attribute of the
+revision \fIrev\fR to \fIstate\fR.  If \fIrev\fR is a
+branch number, assume the latest revision on that
+branch.  If \fIrev\fR is omitted, assume the latest
+revision on the default branch.  Any identifier is
+acceptable for \fIstate\fR.  A useful set of states is
+\fBExp\fR (for experimental), \fBStab\fR (for
+stable), and \fBRel\fR (for released).  By default,
+the state of a new revision is set to \fBExp\fR when
+it is created.  The state is visible in the output from
+\fIcvs log\fR (see node `log\(aq in the CVS manual), and in the
+\fB$\fP\fPLog$\fR and \fB$\fP\fPState$\fR keywords
+(see node `Keyword substitution\(aq in the CVS manual).  Note that \fBcvs\fR
+uses the \fBdead\fR state for its own purposes (see node `Attic\(aq in the CVS 
manual); to
+take a file to or from the \fBdead\fR state use
+commands like \fBcvs remove\fR and \fBcvs add\fR
+(see node `Adding and removing\(aq in the CVS manual), not \fBcvs admin -s\fR.
+.SP
+.IP "" 0
+\fB-t[\fIfile\fB]\fR
+.IP "" 2
+Useful with \fBcvs\fR.  Write descriptive text from the
+contents of the named \fIfile\fR into the RCS file,
+deleting the existing text.  The \fIfile\fR pathname
+may not begin with \fB-\fR.  The descriptive text can be seen in the
+output from \fBcvs log\fR (see node `log\(aq in the CVS manual).
+There can be no space between \fB-t\fR and its argument.
+.SP
+If \fIfile\fR is omitted,
+obtain the text from standard input, terminated by
+end-of-file or by a line containing \fB.\fR by itself.
+Prompt for the text if interaction is possible; see
+\fB-I\fR.
+.SP
+.IP "" 0
+\fB-t-\fIstring\fB\fR
+.IP "" 2
+Similar to \fB-t\fIfile\fB\fR. Write descriptive text
+from the \fIstring\fR into the \fBrcs\fR file, deleting
+the existing text.
+There can be no space between \fB-t\fR and its argument.
+.SP
+.IP "" 0
+\fB-U\fR
+.IP "" 2
+Set locking to non-strict.  Non-strict locking means
+that the owner of a file need not lock a revision for
+checkin.  For use with \fBcvs\fR, strict locking must be
+set; see the discussion under the \fB-l\fR option
+above.
+.SP
+.IP "" 0
+\fB-u[\fIrev\fB]\fR
+.IP "" 2
+See the option \fB-l\fR above, for a discussion of
+using this option with \fBcvs\fR.  Unlock the revision
+with number \fIrev\fR.  If a branch is given, unlock
+the latest revision on that branch.  If \fIrev\fR is
+omitted, remove the latest lock held by the caller.
+Normally, only the locker of a revision may unlock it;
+somebody else unlocking a revision breaks the lock.
+This causes the original locker to be sent a \fBcommit\fR
+notification (see node `Getting Notified\(aq in the CVS manual).
+There can be no space between \fB-u\fR and its argument.
+.SP
+.IP "" 0
+\fB-V\fIn\fB\fR
+.IP "" 2
+In previous versions of \fBcvs\fR, this option meant to
+write an \fBrcs\fR file which would be acceptable to
+\fBrcs\fR version \fIn\fR, but it is now obsolete and
+specifying it will produce an error.
+.SP
+.IP "" 0
+\fB-x\fIsuffixes\fB\fR
+.IP "" 2
+In previous versions of \fBcvs\fR, this was documented
+as a way of specifying the names of the \fBrcs\fR
+files.  However, \fBcvs\fR has always required that the
+\fBrcs\fR files used by \fBcvs\fR end in \fB,v\fR, so
+this option has never done anything useful.
+.SP
+.IP "" 0
+\fB--execute\fR
+.IP "" 2
+On unix systems, when \fBcvs\fR adds a new file to a repository,
+the execute bits of the file are applied to the \fBrcs\fR file
+and are thus preserved. This can be useful for shell scripts
+or other files that you want to be executable when they are
+later checked out (saves you from doing chmod +x to alter the
+file permissions).
+This option can turn on the execute bits for repository files
+that where originally added without them (or were made
+non-executable with the --no-execute option).
+.SP
+.IP "" 0
+\fB--no-execute\fR
+.IP "" 2
+This option turns off the execute bits from repository files,
+(useful for files that where originally added as executables or
+were made executable with the --execute option) when you want to
+avoid those files from being executable on subsequent checkouts.
+.SP
+.SP
+.SH "annotate"
+.SS "What revision modified each line of a file?"
+.IX "annotate (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: annotate [options] files\&...
+.IP "\(bu" 2
+Requires: repository.
+.IP "\(bu" 2
+Changes: nothing.
+.SP
+For each file in \fIfiles\fR, print the head revision
+of the trunk, together with information on the last
+modification for each line.  
+.SP
+.SH "annotate options"
+.SP
+These standard options are supported by \fBannotate\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local directory only, no recursion.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Process directories recursively.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+Use head revision if tag/date not found.
+.SP
+.IP "" 0
+\fB-F\fR
+.IP "" 2
+Annotate binary files.
+.SP
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+Annotate file as of specified revision/tag or, when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  See see node `Common options\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Annotate file as of specified date.
+.SP
+.SH "annotate example"
+.SP
+For example:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs annotate ssfile
+.IP "" 2
+Annotations for ssfile
+.IP "" 2
+***************
+.IP "" 2
+1.1          (mary     27-Mar-96): ssfile line 1
+.IP "" 2
+1.2          (joe      28-Mar-96): ssfile line 2
+
+.PD
+.IP "" 0
+.SP
+The file \fBssfile\fR currently contains two lines.
+The \fBssfile line 1\fR line was checked in by
+\fBmary\fR on March 27.  Then, on March 28, \fBjoe\fR
+added a line \fBssfile line 2\fR, without modifying
+the \fBssfile line 1\fR line.  This report doesn\(aqt
+tell you anything about lines which have been deleted
+or replaced; you need to use \fBcvs diff\fR for that
+(see node `diff\(aq in the CVS manual).
+.SP
+The options to \fBcvs annotate\fR are listed in
+see node `Invoking CVS\(aq in the CVS manual, and can be used to select the 
files
+and revisions to annotate.  The options are described
+in more detail there and in see node `Common options\(aq in the CVS manual.
+.SP
+.SH "checkout"
+.SS "Check out sources for editing"
+.IX "checkout (subcommand)"
+.IX "co (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: checkout [options] modules\&...
+.IP "\(bu" 2
+Requires: repository.
+.IP "\(bu" 2
+Changes: working directory.
+.IP "\(bu" 2
+Synonyms: co, get
+.SP
+Create or update a working directory containing copies of the
+source files specified by \fImodules\fR.  You must execute
+\fBcheckout\fR before using most of the other \fBcvs\fR
+commands, since most of them operate on your working
+directory.
+.SP
+The \fImodules\fR are either
+symbolic names for some
+collection of source directories and files, or paths to
+directories or files in the repository.  The symbolic
+names are defined in the \fBmodules\fR file.
+see node `modules\(aq in the CVS manual.
+.SP
+Depending on the modules you specify, \fBcheckout\fR may
+recursively create directories and populate them with
+the appropriate source files.  You can then edit these
+source files at any time (regardless of whether other
+software developers are editing their own copies of the
+sources); update them to include new changes applied by
+others to the source repository; or commit your work as
+a permanent change to the source repository.
+.SP
+Note that \fBcheckout\fR is used to create
+directories.  The top-level directory created is always
+added to the directory where \fBcheckout\fR is
+invoked, and usually has the same name as the specified
+module.  In the case of a module alias, the created
+sub-directory may have a different name, but you can be
+sure that it will be a sub-directory, and that
+\fBcheckout\fR will show the relative path leading to
+each file as it is extracted into your private work
+area (unless you specify the \fB-Q\fR global option).
+.SP
+The files created by \fBcheckout\fR are created
+read-write, unless the \fB-r\fR option to \fBcvs\fR
+(see node `Global options\(aq in the CVS manual) is specified, the
+\fBCVSREAD\fR environment variable is specified
+(see node `Environment variables\(aq in the CVS manual), or a watch is in
+effect for that file (see node `Watches\(aq in the CVS manual).
+.SP
+Note that running \fBcheckout\fR on a directory that was already
+built by a prior \fBcheckout\fR is also permitted.
+This is similar to specifying the \fB-d\fR option
+to the \fBupdate\fR command in the sense that new
+directories that have been created in the repository
+will appear in your work area.
+However, \fBcheckout\fR takes a module name whereas
+\fBupdate\fR takes a directory name.  Also
+to use \fBcheckout\fR this way it must be run from the
+top level directory (where you originally ran
+\fBcheckout\fR from), so before you run
+\fBcheckout\fR to update an existing directory, don\(aqt
+forget to change your directory to the top level
+directory.
+.SP
+For the output produced by the \fBcheckout\fR command
+see see node `update output\(aq in the CVS manual.
+.SP
+.SH "checkout options"
+.SP
+These standard options are supported by \fBcheckout\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Use the most recent revision no later than \fIdate\fR.
+This option is sticky, and implies \fB-P\fR.  See
+see node `Sticky tags\(aq in the CVS manual, for more information on sticky 
tags/dates.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+Only useful with the \fB-D\fR or \fB-r\fR flags.  If no matching revision is
+found, retrieve the most recent revision (instead of ignoring the file).
+.SP
+.IP "" 0
+\fB-k \fIkflag\fB\fR
+.IP "" 2
+Process keywords according to \fIkflag\fR.  See
+see node `Keyword substitution\(aq in the CVS manual.
+This option is sticky; future updates of
+this file in this working directory will use the same
+\fIkflag\fR.  The \fBstatus\fR command can be viewed
+to see the sticky options.  See see node `Invoking CVS\(aq in the CVS manual, 
for
+more information on the \fBstatus\fR command.
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory.
+.SP
+.IP "" 0
+\fB-n\fR
+.IP "" 2
+Do not run any checkout program (as specified
+with the \fB-o\fR option in the modules file;
+see node `modules\(aq in the CVS manual).
+.SP
+.IP "" 0
+\fB-P\fR
+.IP "" 2
+Prune empty directories.  See see node `Moving directories\(aq in the CVS 
manual.
+.SP
+.IP "" 0
+\fB-p\fR
+.IP "" 2
+Pipe files to the standard output.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Checkout directories recursively.  This option is on by default.
+.SP
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+Checkout the revision specified by \fItag\fR or, when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  This option is sticky, and implies \fB-P\fR.
+See see node `Sticky tags\(aq in the CVS manual, for more information on 
sticky tags/dates.  Also,
+see see node `Common options\(aq in the CVS manual.
+.SP
+In addition to those, you can use these special command
+options with \fBcheckout\fR:
+.SP
+.IP "" 0
+\fB-A\fR
+.IP "" 2
+Reset any sticky tags, dates, or \fB-k\fR options.
+See see node `Sticky tags\(aq in the CVS manual, for more information on 
sticky tags/dates.
+.SP
+.IP "" 0
+\fB-c\fR
+.IP "" 2
+Copy the module file, sorted, to the standard output,
+instead of creating or modifying any files or
+directories in your working directory.
+.SP
+.IP "" 0
+\fB-d \fIdir\fB\fR
+.IP "" 2
+Create a directory called \fIdir\fR for the working
+files, instead of using the module name.  In general,
+using this flag is equivalent to using \fBmkdir
+\fIdir\fB; cd \fIdir\fB\fR followed by the checkout
+command without the \fB-d\fR flag.
+.SP
+There is an important exception, however.  It is very
+convenient when checking out a single item to have the
+output appear in a directory that doesn\(aqt contain empty
+intermediate directories.  In this case \fIonly\fR,
+\fBcvs\fR tries to \`\`shorten\(aq\(aq pathnames to avoid those empty
+directories.
+.SP
+For example, given a module \fBfoo\fR that contains
+the file \fBbar.c\fR, the command \fBcvs co -d dir
+foo\fR will create directory \fBdir\fR and place
+\fBbar.c\fR inside.  Similarly, given a module
+\fBbar\fR which has subdirectory \fBbaz\fR wherein
+there is a file \fBquux.c\fR, the command \fBcvs co
+-d dir bar/baz\fR will create directory \fBdir\fR and
+place \fBquux.c\fR inside.
+.SP
+Using the \fB-N\fR flag will defeat this behavior.
+Given the same module definitions above, \fBcvs co
+-N -d dir foo\fR will create directories \fBdir/foo\fR
+and place \fBbar.c\fR inside, while \fBcvs co -N -d
+dir bar/baz\fR will create directories \fBdir/bar/baz\fR
+and place \fBquux.c\fR inside.
+.SP
+.IP "" 0
+\fB-j \fItag\fB\fR
+.IP "" 2
+With two \fB-j\fR options, merge changes from the
+revision specified with the first \fB-j\fR option to
+the revision specified with the second \fBj\fR option,
+into the working directory.
+.SP
+With one \fB-j\fR option, merge changes from the
+ancestor revision to the revision specified with the
+\fB-j\fR option, into the working directory.  The
+ancestor revision is the common ancestor of the
+revision which the working directory is based on, and
+the revision specified in the \fB-j\fR option.
+.SP
+In addition, each -j option can contain an optional
+date specification which, when used with branches, can
+limit the chosen revision to one within a specific
+date.  An optional date is specified by adding a colon
+(:) to the tag:
+\fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR.
+.SP
+see node `Branching and merging\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-N\fR
+.IP "" 2
+Only useful together with \fB-d \fIdir\fB\fR.  With
+this option, \fBcvs\fR will not \`\`shorten\(aq\(aq module paths
+in your working directory when you check out a single
+module.  See the \fB-d\fR flag for examples and a
+discussion.
+.SP
+.IP "" 0
+\fB-s\fR
+.IP "" 2
+Like \fB-c\fR, but include the status of all modules,
+and sort it by the status string.  see node `modules\(aq in the CVS manual, for
+info about the \fB-s\fR option that is used inside the
+modules file to set the module status.
+.SP
+.SH "checkout examples"
+.SP
+Get a copy of the module \fBtc\fR:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs checkout tc
+
+.PD
+.IP "" 0
+.SP
+Get a copy of the module \fBtc\fR as it looked one day
+ago:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs checkout -D yesterday tc
+
+.PD
+.IP "" 0
+.SP
+.SH "commit"
+.SS "Check files into the repository"
+.IX "commit (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: commit [-fglnR] [-m \(aqlog_message\(aq | -F file] [-r revision]
+                [files\&...]
+.IP "\(bu" 2
+Requires: working directory, repository.
+.IP "\(bu" 2
+Changes: repository.
+.IP "\(bu" 2
+Synonym: ci
+.SP
+Use \fBcommit\fR when you want to incorporate changes
+from your working source files into the source
+repository.
+.SP
+If you don\(aqt specify particular files to commit, all of
+the files in your working current directory are
+examined.  \fBcommit\fR is careful to change in the
+repository only those files that you have really
+changed.  By default (or if you explicitly specify the
+\fB-R\fR option), files in subdirectories are also
+examined and committed if they have changed; you can
+use the \fB-l\fR option to limit \fBcommit\fR to the
+current directory only.
+.SP
+\fBcommit\fR verifies that the selected files are up
+to date with the current revisions in the source
+repository; it will notify you, and exit without
+committing, if any of the specified files must be made
+current first with \fBupdate\fR (see node `update\(aq in the CVS manual).
+\fBcommit\fR does not call the \fBupdate\fR command
+for you, but rather leaves that for you to do when the
+time is right.
+.SP
+When all is well, an editor is invoked to allow you to
+enter a log message that will be written to one or more
+logging programs (see node `modules\(aq in the CVS manual, and see node 
`loginfo\(aq in the CVS manual)
+and placed in the \fBrcs\fR file inside the
+repository.  This log message can be retrieved with the
+\fBlog\fR command; see see node `log\(aq in the CVS manual.  You can specify 
the
+log message on the command line with the \fB-m
+\fImessage\fB\fR option, and thus avoid the editor invocation,
+or use the \fB-F \fIfile\fB\fR option to specify
+that the argument file contains the log message.
+.SP
+At \fBcommit\fR, a unique commitid is placed in the \fBrcs\fR
+file inside the repository. All files committed at once
+get the same commitid. The commitid can be retrieved with
+the \fBlog\fR and \fBstatus\fR command; see see node `log\(aq in the CVS 
manual,
+see node `File status\(aq in the CVS manual.
+.SP
+.SH "commit options"
+.SP
+These standard options are supported by \fBcommit\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Commit directories recursively.  This is on by default.
+.SP
+.IP "" 0
+\fB-r \fIrevision\fB\fR
+.IP "" 2
+Commit to \fIrevision\fR.  \fIrevision\fR must be
+either a branch, or a revision on the main trunk that
+is higher than any existing revision number
+(see node `Assigning revisions\(aq in the CVS manual).  You
+cannot commit to a specific revision on a branch.
+.SP
+\fBcommit\fR also supports these options:
+.SP
+.IP "" 0
+\fB-c\fR
+.IP "" 2
+Refuse to commit files unless the user has registered a valid edit on the
+file via \fBcvs edit\fR.  This is most useful when \fBcommit -c\fR
+and \fBedit -c\fR have been placed in all \fB.cvsrc\fR files.
+A commit can be forced anyways by either regestering an edit retroactively
+via \fBcvs edit\fR (no changes to the file will be lost) or using the
+\fB-f\fR option to commit.  Support for \fBcommit -c\fR requires both
+client and a server versions 1.12.10 or greater.
+.SP
+.IP "" 0
+\fB-F \fIfile\fB\fR
+.IP "" 2
+Read the log message from \fIfile\fR, instead
+of invoking an editor.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+Note that this is not the standard behavior of
+the \fB-f\fR option as defined in see node `Common options\(aq in the CVS 
manual.
+.SP
+Force \fBcvs\fR to commit a new revision even if you haven\(aqt
+made any changes to the file.  As of \fBcvs\fR version 1.12.10,
+it also causes the \fB-c\fR option to be ignored.  If the current revision
+of \fIfile\fR is 1.7, then the following two commands
+are equivalent:
+.SP
+.PD 0
+.SP
+.IP "" 4
+$ cvs commit -f \fIfile\fR
+.IP "" 4
+$ cvs commit -r 1.8 \fIfile\fR
+
+.PD
+.IP "" 2
+.SP
+The \fB-f\fR option disables recursion (i.e., it
+implies \fB-l\fR).  To force \fBcvs\fR to commit a new
+revision for all files in all subdirectories, you must
+use \fB-f -R\fR.
+.SP
+.IP "" 0
+\fB-m \fImessage\fB\fR
+.IP "" 2
+Use \fImessage\fR as the log message, instead of
+invoking an editor.
+.SP
+.SH "commit examples"
+.SP
+.SS "Committing to a branch"
+.SP
+You can commit to a branch revision (one that has an
+even number of dots) with the \fB-r\fR option.  To
+create a branch revision, use the \fB-b\fR option
+of the \fBrtag\fR or \fBtag\fR commands
+(see node `Branching and merging\(aq in the CVS manual).  Then, either 
\fBcheckout\fR or
+\fBupdate\fR can be used to base your sources on the
+newly created branch.  From that point on, all
+\fBcommit\fR changes made within these working sources
+will be automatically added to a branch revision,
+thereby not disturbing main-line development in any
+way.  For example, if you had to create a patch to the
+1.2 version of the product, even though the 2.0 version
+is already under development, you might do:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
+.IP "" 2
+$ cvs checkout -r FCS1_2_Patch product_module
+.IP "" 2
+$ cd product_module
+.IP "" 2
+[[ hack away ]]
+.IP "" 2
+$ cvs commit
+
+.PD
+.IP "" 0
+.SP
+This works automatically since the \fB-r\fR option is
+sticky.
+.SP
+.SS "Creating the branch after editing"
+.SP
+Say you have been working on some extremely
+experimental software, based on whatever revision you
+happened to checkout last week.  If others in your
+group would like to work on this software with you, but
+without disturbing main-line development, you could
+commit your change to a new branch.  Others can then
+checkout your experimental stuff and utilize the full
+benefit of \fBcvs\fR conflict resolution.  The scenario might
+look like:
+.SP
+.PD 0
+.SP
+.IP "" 2
+[[ hacked sources are present ]]
+.IP "" 2
+$ cvs tag -b EXPR1
+.IP "" 2
+$ cvs update -r EXPR1
+.IP "" 2
+$ cvs commit
+
+.PD
+.IP "" 0
+.SP
+The \fBupdate\fR command will make the \fB-r
+EXPR1\fR option sticky on all files.  Note that your
+changes to the files will never be removed by the
+\fBupdate\fR command.  The \fBcommit\fR will
+automatically commit to the correct branch, because the
+\fB-r\fR is sticky.  You could also do like this:
+.SP
+.PD 0
+.SP
+.IP "" 2
+[[ hacked sources are present ]]
+.IP "" 2
+$ cvs tag -b EXPR1
+.IP "" 2
+$ cvs commit -r EXPR1
+
+.PD
+.IP "" 0
+.SP
+but then, only those files that were changed by you
+will have the \fB-r EXPR1\fR sticky flag.  If you hack
+away, and commit without specifying the \fB-r EXPR1\fR
+flag, some files may accidentally end up on the main
+trunk.
+.SP
+To work with you on the experimental change, others
+would simply do
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs checkout -r EXPR1 whatever_module
+
+.PD
+.IP "" 0
+.SP
+.SH "diff"
+.SS "Show differences between revisions"
+.IX "diff (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: diff [-lR] [-k kflag] [format_options] [(-r rev1[:date1] | -D date1) 
[-r rev2[:date2] | -D date2]] [files\&...]
+.IP "\(bu" 2
+Requires: working directory, repository.
+.IP "\(bu" 2
+Changes: nothing.
+.SP
+The \fBdiff\fR command is used to compare different
+revisions of files.  The default action is to compare
+your working files with the revisions they were based
+on, and report any differences that are found.
+.SP
+If any file names are given, only those files are
+compared.  If any directories are given, all files
+under them will be compared.
+.SP
+The exit status for diff is different than for other
+\fBcvs\fR commands; for details see node `Exit status\(aq in the CVS manual.
+.SP
+.SH "diff options"
+.SP
+These standard options are supported by \fBdiff\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Use the most recent revision no later than \fIdate\fR.
+See \fB-r\fR for how this affects the comparison.
+.SP
+.IP "" 0
+\fB-k \fIkflag\fB\fR
+.IP "" 2
+Process keywords according to \fIkflag\fR.  See
+see node `Keyword substitution\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Examine directories recursively.  This option is on by
+default.
+.SP
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+Compare with revision specified by \fItag\fR or, when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  Zero, one or two
+\fB-r\fR options can be present.  With no \fB-r\fR
+option, the working file will be compared with the
+revision it was based on.  With one \fB-r\fR, that
+revision will be compared to your current working file.
+With two \fB-r\fR options those two revisions will be
+compared (and your working file will not affect the
+outcome in any way).
+.SP
+One or both \fB-r\fR options can be replaced by a
+\fB-D \fIdate\fB\fR option, described above.
+.SP
+The following options specify the format of the
+output.  They have the same meaning as in GNU diff.
+Most options have two equivalent names, one of which is a single letter
+preceded by \fB-\fR, and the other of which is a long name preceded by
+\fB--\fR.
+.SP
+.IP "" 0
+\fB-\fIlines\fB\fR
+.IP "" 2
+Show \fIlines\fR (an integer) lines of context.  This option does not
+specify an output format by itself; it has no effect unless it is
+combined with \fB-c\fR or \fB-u\fR.  This option is obsolete.  For proper
+operation, \fBpatch\fR typically needs at least two lines of context.
+.SP
+.IP "" 0
+\fB-a\fR
+.IP "" 2
+Treat all files as text and compare them line-by-line, even if they
+do not seem to be text.
+.SP
+.IP "" 0
+\fB-b\fR
+.IP "" 2
+Ignore trailing white space and consider all other sequences of one or
+more white space characters to be equivalent.
+.SP
+.IP "" 0
+\fB-B\fR
+.IP "" 2
+Ignore changes that just insert or delete blank lines.
+.SP
+.IP "" 0
+\fB--binary\fR
+.IP "" 2
+Read and write data in binary mode.
+.SP
+.IP "" 0
+\fB--brief\fR
+.IP "" 2
+Report only whether the files differ, not the details of the
+differences.
+.SP
+.IP "" 0
+\fB-c\fR
+.IP "" 2
+Use the context output format.
+.SP
+.IP "" 0
+\fB-C \fIlines\fB\fR
+.IP "" 2
+.IP "" 0
+\fB--context\fR[\fB=\fIlines\fB\fR]\fB\fR
+.IP "" 2
+Use the context output format, showing \fIlines\fR (an integer) lines of
+context, or three if \fIlines\fR is not given.
+For proper operation, \fBpatch\fR typically needs at least two lines of
+context.
+.SP
+.IP "" 0
+\fB--changed-group-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a line group containing differing lines from
+both files in if-then-else format.  see node `Line group formats\(aq in the 
CVS manual.
+.SP
+.IP "" 0
+\fB-d\fR
+.IP "" 2
+Change the algorithm to perhaps find a smaller set of changes.  This makes
+\fBdiff\fR slower (sometimes much slower).
+.SP
+.IP "" 0
+\fB-e\fR
+.IP "" 2
+.IP "" 0
+\fB--ed\fR
+.IP "" 2
+Make output that is a valid \fBed\fR script.
+.SP
+.IP "" 0
+\fB--expand-tabs\fR
+.IP "" 2
+Expand tabs to spaces in the output, to preserve the alignment of tabs
+in the input files.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+Make output that looks vaguely like an \fBed\fR script but has changes
+in the order they appear in the file.
+.SP
+.IP "" 0
+\fB-F \fIregexp\fB\fR
+.IP "" 2
+In context and unified format, for each hunk of differences, show some
+of the last preceding line that matches \fIregexp\fR.
+.SP
+.IP "" 0
+\fB--forward-ed\fR
+.IP "" 2
+Make output that looks vaguely like an \fBed\fR script but has changes
+in the order they appear in the file.
+.SP
+.IP "" 0
+\fB-H\fR
+.IP "" 2
+Use heuristics to speed handling of large files that have numerous
+scattered small changes.
+.SP
+.IP "" 0
+\fB--horizon-lines=\fIlines\fB\fR
+.IP "" 2
+Do not discard the last \fIlines\fR lines of the common prefix
+and the first \fIlines\fR lines of the common suffix.
+.SP
+.IP "" 0
+\fB-i\fR
+.IP "" 2
+Ignore changes in case; consider upper- and lower-case letters
+equivalent.
+.SP
+.IP "" 0
+\fB-I \fIregexp\fB\fR
+.IP "" 2
+Ignore changes that just insert or delete lines that match \fIregexp\fR.
+.SP
+.IP "" 0
+\fB--ifdef=\fIname\fB\fR
+.IP "" 2
+Make merged if-then-else output using \fIname\fR.
+.SP
+.IP "" 0
+\fB--ignore-all-space\fR
+.IP "" 2
+Ignore white space when comparing lines.
+.SP
+.IP "" 0
+\fB--ignore-blank-lines\fR
+.IP "" 2
+Ignore changes that just insert or delete blank lines.
+.SP
+.IP "" 0
+\fB--ignore-case\fR
+.IP "" 2
+Ignore changes in case; consider upper- and lower-case to be the same.
+.SP
+.IP "" 0
+\fB--ignore-matching-lines=\fIregexp\fB\fR
+.IP "" 2
+Ignore changes that just insert or delete lines that match \fIregexp\fR.
+.SP
+.IP "" 0
+\fB--ignore-space-change\fR
+.IP "" 2
+Ignore trailing white space and consider all other sequences of one or
+more white space characters to be equivalent.
+.SP
+.IP "" 0
+\fB--initial-tab\fR
+.IP "" 2
+Output a tab rather than a space before the text of a line in normal or
+context format.  This causes the alignment of tabs in the line to look
+normal.
+.SP
+.IP "" 0
+\fB-L \fIlabel\fB\fR
+.IP "" 2
+Use \fIlabel\fR instead of the file name in the context format
+and unified format headers.
+.SP
+.IP "" 0
+\fB--label=\fIlabel\fB\fR
+.IP "" 2
+Use \fIlabel\fR instead of the file name in the context format
+and unified format headers.
+.SP
+.IP "" 0
+\fB--left-column\fR
+.IP "" 2
+Print only the left column of two common lines in side by side format.
+.SP
+.IP "" 0
+\fB--line-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output all input lines in if-then-else format.
+see node `Line formats\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB--minimal\fR
+.IP "" 2
+Change the algorithm to perhaps find a smaller set of changes.  This
+makes \fBdiff\fR slower (sometimes much slower).
+.SP
+.IP "" 0
+\fB-n\fR
+.IP "" 2
+Output RCS-format diffs; like \fB-f\fR except that each command
+specifies the number of lines affected.
+.SP
+.IP "" 0
+\fB-N\fR
+.IP "" 2
+.IP "" 0
+\fB--new-file\fR
+.IP "" 2
+In directory comparison, if a file is found in only one directory,
+treat it as present but empty in the other directory.
+.SP
+.IP "" 0
+\fB--new-group-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a group of lines taken from just the second
+file in if-then-else format.  see node `Line group formats\(aq in the CVS 
manual.
+.SP
+.IP "" 0
+\fB--new-line-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a line taken from just the second file in
+if-then-else format.  see node `Line formats\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB--old-group-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a group of lines taken from just the first
+file in if-then-else format.  see node `Line group formats\(aq in the CVS 
manual.
+.SP
+.IP "" 0
+\fB--old-line-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a line taken from just the first file in
+if-then-else format.  see node `Line formats\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-p\fR
+.IP "" 2
+Show which C function each change is in.
+.SP
+.IP "" 0
+\fB--rcs\fR
+.IP "" 2
+Output RCS-format diffs; like \fB-f\fR except that each command
+specifies the number of lines affected.
+.SP
+.IP "" 0
+\fB--report-identical-files\fR
+.IP "" 2
+.IP "" 0
+\fB-s\fR
+.IP "" 2
+Report when two files are the same.
+.SP
+.IP "" 0
+\fB--show-c-function\fR
+.IP "" 2
+Show which C function each change is in.
+.SP
+.IP "" 0
+\fB--show-function-line=\fIregexp\fB\fR
+.IP "" 2
+In context and unified format, for each hunk of differences, show some
+of the last preceding line that matches \fIregexp\fR.
+.SP
+.IP "" 0
+\fB--side-by-side\fR
+.IP "" 2
+Use the side by side output format.
+.SP
+.IP "" 0
+\fB--speed-large-files\fR
+.IP "" 2
+Use heuristics to speed handling of large files that have numerous
+scattered small changes.
+.SP
+.IP "" 0
+\fB--suppress-common-lines\fR
+.IP "" 2
+Do not print common lines in side by side format.
+.SP
+.IP "" 0
+\fB-t\fR
+.IP "" 2
+Expand tabs to spaces in the output, to preserve the alignment of tabs
+in the input files.
+.SP
+.IP "" 0
+\fB-T\fR
+.IP "" 2
+Output a tab rather than a space before the text of a line in normal or
+context format.  This causes the alignment of tabs in the line to look
+normal.
+.SP
+.IP "" 0
+\fB--text\fR
+.IP "" 2
+Treat all files as text and compare them line-by-line, even if they
+do not appear to be text.
+.SP
+.IP "" 0
+\fB-u\fR
+.IP "" 2
+Use the unified output format.
+.SP
+.IP "" 0
+\fB--unchanged-group-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a group of common lines taken from both files
+in if-then-else format.  see node `Line group formats\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB--unchanged-line-format=\fIformat\fB\fR
+.IP "" 2
+Use \fIformat\fR to output a line common to both files in if-then-else
+format.  see node `Line formats\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-U \fIlines\fB\fR
+.IP "" 2
+.IP "" 0
+\fB--unified\fR[\fB=\fIlines\fB\fR]\fB\fR
+.IP "" 2
+Use the unified output format, showing \fIlines\fR (an integer) lines of
+context, or three if \fIlines\fR is not given.
+For proper operation, \fBpatch\fR typically needs at least two lines of
+context.
+.SP
+.IP "" 0
+\fB-w\fR
+.IP "" 2
+Ignore white space when comparing lines.
+.SP
+.IP "" 0
+\fB-W \fIcolumns\fB\fR
+.IP "" 2
+.IP "" 0
+\fB--width=\fIcolumns\fB\fR
+.IP "" 2
+Use an output width of \fIcolumns\fR in side by side format.
+.SP
+.IP "" 0
+\fB-y\fR
+.IP "" 2
+Use the side by side output format.
+.SP
+.SH "Line group formats"
+.SP
+Line group formats let you specify formats suitable for many
+applications that allow if-then-else input, including programming
+languages and text formatting languages.  A line group format specifies
+the output format for a contiguous group of similar lines.
+.SP
+For example, the following command compares the TeX file \fBmyfile\fR
+with the original version from the repository,
+and outputs a merged file in which old regions are
+surrounded by \fB\\begin{em}\fR-\fB\\end{em}\fR lines, and new
+regions are surrounded by \fB\\begin{bf}\fR-\fB\\end{bf}\fR lines.
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs diff \\
+.IP "" 2
+   --old-group-format=\(aq\\begin{em}
+.IP "" 2
+%<\\end{em}
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --new-group-format=\(aq\\begin{bf}
+.IP "" 2
+%>\\end{bf}
+.IP "" 2
+\(aq \\
+.IP "" 2
+   myfile
+
+.PD
+.IP "" 0
+.SP
+The following command is equivalent to the above example, but it is a
+little more verbose, because it spells out the default line group formats.
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs diff \\
+.IP "" 2
+   --old-group-format=\(aq\\begin{em}
+.IP "" 2
+%<\\end{em}
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --new-group-format=\(aq\\begin{bf}
+.IP "" 2
+%>\\end{bf}
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --unchanged-group-format=\(aq%=\(aq \\
+.IP "" 2
+   --changed-group-format=\(aq\\begin{em}
+.IP "" 2
+%<\\end{em}
+.IP "" 2
+\\begin{bf}
+.IP "" 2
+%>\\end{bf}
+.IP "" 2
+\(aq \\
+.IP "" 2
+   myfile
+
+.PD
+.IP "" 0
+.SP
+Here is a more advanced example, which outputs a diff listing with
+headers containing line numbers in a \`\`plain English\(aq\(aq style.
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs diff \\
+.IP "" 2
+   --unchanged-group-format=\(aq\(aq \\
+.IP "" 2
+   --old-group-format=\(aq-------- %dn line%(n=1?:s) deleted at %df:
+.IP "" 2
+%<\(aq \\
+.IP "" 2
+   --new-group-format=\(aq-------- %dN line%(N=1?:s) added after %de:
+.IP "" 2
+%>\(aq \\
+.IP "" 2
+   --changed-group-format=\(aq-------- %dn line%(n=1?:s) changed at %df:
+.IP "" 2
+%<-------- to:
+.IP "" 2
+%>\(aq \\
+.IP "" 2
+   myfile
+
+.PD
+.IP "" 0
+.SP
+To specify a line group format, use one of the options
+listed below.  You can specify up to four line group formats, one for
+each kind of line group.  You should quote \fIformat\fR, because it
+typically contains shell metacharacters.
+.SP
+.IP "" 0
+\fB--old-group-format=\fIformat\fB\fR
+.IP "" 2
+These line groups are hunks containing only lines from the first file.
+The default old group format is the same as the changed group format if
+it is specified; otherwise it is a format that outputs the line group as-is.
+.SP
+.IP "" 0
+\fB--new-group-format=\fIformat\fB\fR
+.IP "" 2
+These line groups are hunks containing only lines from the second
+file.  The default new group format is same as the changed group
+format if it is specified; otherwise it is a format that outputs the
+line group as-is.
+.SP
+.IP "" 0
+\fB--changed-group-format=\fIformat\fB\fR
+.IP "" 2
+These line groups are hunks containing lines from both files.  The
+default changed group format is the concatenation of the old and new
+group formats.
+.SP
+.IP "" 0
+\fB--unchanged-group-format=\fIformat\fB\fR
+.IP "" 2
+These line groups contain lines common to both files.  The default
+unchanged group format is a format that outputs the line group as-is.
+.SP
+In a line group format, ordinary characters represent themselves;
+conversion specifications start with \fB%\fR and have one of the
+following forms.
+.SP
+.IP "" 0
+\fB%<\fR
+.IP "" 2
+stands for the lines from the first file, including the trailing newline.
+Each line is formatted according to the old line format (see node `Line 
formats\(aq in the CVS manual).
+.SP
+.IP "" 0
+\fB%>\fR
+.IP "" 2
+stands for the lines from the second file, including the trailing newline.
+Each line is formatted according to the new line format.
+.SP
+.IP "" 0
+\fB%=\fR
+.IP "" 2
+stands for the lines common to both files, including the trailing newline.
+Each line is formatted according to the unchanged line format.
+.SP
+.IP "" 0
+\fB%%\fR
+.IP "" 2
+stands for \fB%\fR.
+.SP
+.IP "" 0
+\fB%c\(aq\fIC\fB\(aq\fR
+.IP "" 2
+where \fIC\fR is a single character, stands for \fIC\fR.
+\fIC\fR may not be a backslash or an apostrophe.
+For example, \fB%c\(aq:\(aq\fR stands for a colon, even inside
+the then-part of an if-then-else format, which a colon would
+normally terminate.
+.SP
+.IP "" 0
+\fB%c\(aq\\\fIO\fB\(aq\fR
+.IP "" 2
+where \fIO\fR is a string of 1, 2, or 3 octal digits,
+stands for the character with octal code \fIO\fR.
+For example, \fB%c\(aq\\0\(aq\fR stands for a null character.
+.SP
+.IP "" 0
+\fB\fIF\fB\fIn\fB\fR
+.IP "" 2
+where \fIF\fR is a \fBprintf\fR conversion specification and \fIn\fR is one
+of the following letters, stands for \fIn\fR\(aqs value formatted with \fIF\fR.
+.SP
+.IP "" 2
+\fBe\fR
+.IP "" 4
+The line number of the line just before the group in the old file.
+.SP
+.IP "" 2
+\fBf\fR
+.IP "" 4
+The line number of the first line in the group in the old file;
+equals \fIe\fR + 1.
+.SP
+.IP "" 2
+\fBl\fR
+.IP "" 4
+The line number of the last line in the group in the old file.
+.SP
+.IP "" 2
+\fBm\fR
+.IP "" 4
+The line number of the line just after the group in the old file;
+equals \fIl\fR + 1.
+.SP
+.IP "" 2
+\fBn\fR
+.IP "" 4
+The number of lines in the group in the old file; equals \fIl\fR - \fIf\fR + 1.
+.SP
+.IP "" 2
+\fBE, F, L, M, N\fR
+.IP "" 4
+Likewise, for lines in the new file.
+.SP
+.SP
+The \fBprintf\fR conversion specification can be \fB%d\fR,
+\fB%o\fR, \fB%x\fR, or \fB%X\fR, specifying decimal, octal,
+lower case hexadecimal, or upper case hexadecimal output
+respectively.  After the \fB%\fR the following options can appear in
+sequence: a \fB-\fR specifying left-justification; an integer
+specifying the minimum field width; and a period followed by an
+optional integer specifying the minimum number of digits.
+For example, \fB%5dN\fR prints the number of new lines in the group
+in a field of width 5 characters, using the \fBprintf\fR format \fB"%5d"\fR.
+.SP
+.IP "" 0
+\fB(\fIA\fB=\fIB\fB?\fIT\fB:\fIE\fB)\fR
+.IP "" 2
+If \fIA\fR equals \fIB\fR then \fIT\fR else \fIE\fR.
+\fIA\fR and \fIB\fR are each either a decimal constant
+or a single letter interpreted as above.
+This format spec is equivalent to \fIT\fR if
+\fIA\fR\(aqs value equals \fIB\fR\(aqs; otherwise it is equivalent to \fIE\fR.
+.SP
+For example, \fB%(N=0?no:%dN) line%(N=1?:s)\fR is equivalent to
+\fBno lines\fR if \fIN\fR (the number of lines in the group in the
+new file) is 0, to \fB1 line\fR if \fIN\fR is 1, and to \fB%dN lines\fR
+otherwise.
+.SP
+.SH "Line formats"
+.SP
+Line formats control how each line taken from an input file is
+output as part of a line group in if-then-else format.
+.SP
+For example, the following command outputs text with a one-column
+change indicator to the left of the text.  The first column of output
+is \fB-\fR for deleted lines, \fB|\fR for added lines, and a space
+for unchanged lines.  The formats contain newline characters where
+newlines are desired on output.
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs diff \\
+.IP "" 2
+   --old-line-format=\(aq-%l
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --new-line-format=\(aq|%l
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --unchanged-line-format=\(aq %l
+.IP "" 2
+\(aq \\
+.IP "" 2
+   myfile
+
+.PD
+.IP "" 0
+.SP
+To specify a line format, use one of the following options.  You should
+quote \fIformat\fR, since it often contains shell metacharacters.
+.SP
+.IP "" 0
+\fB--old-line-format=\fIformat\fB\fR
+.IP "" 2
+formats lines just from the first file.
+.SP
+.IP "" 0
+\fB--new-line-format=\fIformat\fB\fR
+.IP "" 2
+formats lines just from the second file.
+.SP
+.IP "" 0
+\fB--unchanged-line-format=\fIformat\fB\fR
+.IP "" 2
+formats lines common to both files.
+.SP
+.IP "" 0
+\fB--line-format=\fIformat\fB\fR
+.IP "" 2
+formats all lines; in effect, it sets all three above options simultaneously.
+.SP
+In a line format, ordinary characters represent themselves;
+conversion specifications start with \fB%\fR and have one of the
+following forms.
+.SP
+.IP "" 0
+\fB%l\fR
+.IP "" 2
+stands for the contents of the line, not counting its trailing
+newline (if any).  This format ignores whether the line is incomplete.
+.SP
+.IP "" 0
+\fB%L\fR
+.IP "" 2
+stands for the contents of the line, including its trailing newline
+(if any).  If a line is incomplete, this format preserves its
+incompleteness.
+.SP
+.IP "" 0
+\fB%%\fR
+.IP "" 2
+stands for \fB%\fR.
+.SP
+.IP "" 0
+\fB%c\(aq\fIC\fB\(aq\fR
+.IP "" 2
+where \fIC\fR is a single character, stands for \fIC\fR.
+\fIC\fR may not be a backslash or an apostrophe.
+For example, \fB%c\(aq:\(aq\fR stands for a colon.
+.SP
+.IP "" 0
+\fB%c\(aq\\\fIO\fB\(aq\fR
+.IP "" 2
+where \fIO\fR is a string of 1, 2, or 3 octal digits,
+stands for the character with octal code \fIO\fR.
+For example, \fB%c\(aq\\0\(aq\fR stands for a null character.
+.SP
+.IP "" 0
+\fB\fIF\fBn\fR
+.IP "" 2
+where \fIF\fR is a \fBprintf\fR conversion specification,
+stands for the line number formatted with \fIF\fR.
+For example, \fB%.5dn\fR prints the line number using the
+\fBprintf\fR format \fB"%.5d"\fR.  see node `Line group formats\(aq in the CVS 
manual, for
+more about printf conversion specifications.
+.SP
+.SP
+The default line format is \fB%l\fR followed by a newline character.
+.SP
+If the input contains tab characters and it is important that they line
+up on output, you should ensure that \fB%l\fR or \fB%L\fR in a line
+format is just after a tab stop (e.g. by preceding \fB%l\fR or
+\fB%L\fR with a tab character), or you should use the \fB-t\fR or
+\fB--expand-tabs\fR option.
+.SP
+Taken together, the line and line group formats let you specify many
+different formats.  For example, the following command uses a format
+similar to \fBdiff\fR\(aqs normal format.  You can tailor this command
+to get fine control over \fBdiff\fR\(aqs output.
+.SP
+.PD 0
+.SP
+.IP "" 2
+cvs diff \\
+.IP "" 2
+   --old-line-format=\(aq< %l
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --new-line-format=\(aq> %l
+.IP "" 2
+\(aq \\
+.IP "" 2
+   --old-group-format=\(aq%df%(f=l?:,%dl)d%dE
+.IP "" 2
+%<\(aq \\
+.IP "" 2
+   --new-group-format=\(aq%dea%dF%(F=L?:,%dL)
+.IP "" 2
+%>\(aq \\
+.IP "" 2
+   --changed-group-format=\(aq%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
+.IP "" 2
+%<\(em
+.IP "" 2
+%>\(aq \\
+.IP "" 2
+   --unchanged-group-format=\(aq\(aq \\
+.IP "" 2
+   myfile
+
+.PD
+.IP "" 0
+.SP
+.SH "diff examples"
+.SP
+The following line produces a Unidiff (\fB-u\fR flag)
+between revision 1.14 and 1.19 of
+\fBbackend.c\fR.  Due to the \fB-kk\fR flag no
+keywords are substituted, so differences that only depend
+on keyword substitution are ignored.
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
+
+.PD
+.IP "" 0
+.SP
+Suppose the experimental branch EXPR1 was based on a
+set of files tagged RELEASE_1_0.  To see what has
+happened on that branch, the following can be used:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs diff -r RELEASE_1_0 -r EXPR1
+
+.PD
+.IP "" 0
+.SP
+A command like this can be used to produce a context
+diff between two releases:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
+
+.PD
+.IP "" 0
+.SP
+If you are maintaining ChangeLogs, a command like the following
+just before you commit your changes may help you write
+the ChangeLog entry.  All local modifications that have
+not yet been committed will be printed.
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs diff -u | less
+
+.PD
+.IP "" 0
+.SP
+.SH "export"
+.SS "Export sources from CVS, similar to checkout"
+.IX "export (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: export [-flNnR] (-r rev[:date] | -D date) [-k subst] [-d dir] 
module\&...
+.IP "\(bu" 2
+Requires: repository.
+.IP "\(bu" 2
+Changes: current directory.
+.SP
+This command is a variant of \fBcheckout\fR; use it
+when you want a copy of the source for module without
+the \fBcvs\fR administrative directories.  For example, you
+might use \fBexport\fR to prepare source for shipment
+off-site.  This command requires that you specify a
+date or tag (with \fB-D\fR or \fB-r\fR), so that you
+can count on reproducing the source you ship to others
+(and thus it always prunes empty directories).
+.SP
+One often would like to use \fB-kv\fR with \fBcvs
+export\fR.  This causes any keywords to be
+expanded such that an import done at some other site
+will not lose the keyword revision information.  But be
+aware that doesn\(aqt handle an export containing binary
+files correctly.  Also be aware that after having used
+\fB-kv\fR, one can no longer use the \fBident\fR
+command (which is part of the \fBrcs\fR suite\(emsee
+ident(1)) which looks for keyword strings.  If
+you want to be able to use \fBident\fR you must not
+use \fB-kv\fR.
+.SP
+.SH "export options"
+.SP
+These standard options are supported by \fBexport\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Use the most recent revision no later than \fIdate\fR.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+If no matching revision is found, retrieve the most
+recent revision (instead of ignoring the file).
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory.
+.SP
+.IP "" 0
+\fB-n\fR
+.IP "" 2
+Do not run any checkout program.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Export directories recursively.  This is on by default.
+.SP
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+Export the revision specified by \fItag\fR or, when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  See see node `Common options\(aq in the CVS manual.
+.SP
+In addition, these options (that are common to
+\fBcheckout\fR and \fBexport\fR) are also supported:
+.SP
+.IP "" 0
+\fB-d \fIdir\fB\fR
+.IP "" 2
+Create a directory called \fIdir\fR for the working
+files, instead of using the module name.
+see node `checkout options\(aq in the CVS manual, for complete details on how
+\fBcvs\fR handles this flag.
+.SP
+.IP "" 0
+\fB-k \fIsubst\fB\fR
+.IP "" 2
+Set keyword expansion mode (see node `Substitution modes\(aq in the CVS 
manual).
+.SP
+.IP "" 0
+\fB-N\fR
+.IP "" 2
+Only useful together with \fB-d \fIdir\fB\fR.
+see node `checkout options\(aq in the CVS manual, for complete details on how
+\fBcvs\fR handles this flag.
+.SP
+.SH "history"
+.SS "Show status of files and users"
+.IX "history (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis:     history [-report] [-flags] [-options args] [files\&...]
+.IP "\(bu" 2
+Requires: the file \fB$CVSROOT/CVSROOT/history\fR
+.IP "\(bu" 2
+Changes: nothing.
+.SP
+\fBcvs\fR can keep a history log that tracks each use of most \fBcvs\fR
+commands.  You can use \fBhistory\fR to display this information in
+various formats.
+.SP
+To enable logging, the \fBLogHistory\fR config option must be set to
+some value other than the empty string and the history file specified by
+the \fBHistoryLogPath\fR option must be writable by all users who may run
+the \fBcvs\fR executable (see node `config\(aq in the CVS manual).
+.SP
+To enable the \fBhistory\fR command, logging must be enabled as above and
+the \fBHistorySearchPath\fR config option (see node `config\(aq in the CVS 
manual) must be set to
+specify some number of the history logs created thereby and these files must
+be readable by each user who might run the \fBhistory\fR command.
+.SP
+Creating a repository via the \fBcvs init\fR command will enable logging of
+all possible events to a single history log file
+(\fB$CVSROOT/CVSROOT/history\fR) with read and write permissions for all
+users (see node `Creating a repository\(aq in the CVS manual).
+.SP
+\fB\fBhistory\fB uses \fB-f\fB, \fB-l\fB,
+\fB-n\fB, and \fB-p\fB in ways that conflict with the
+normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS 
manual).\fR
+.SP
+.SH "history options"
+.SP
+Several options (shown above as \fB-report\fR)  control  what
+kind of report is generated:
+.SP
+.IP "" 0
+\fB-c\fR
+.IP "" 2
+Report on each time commit was used (i.e., each time
+the repository was modified).
+.SP
+.IP "" 0
+\fB-e\fR
+.IP "" 2
+Everything (all record types).  Equivalent to
+specifying \fB-x\fR with all record types.  Of course,
+\fB-e\fR will also include record types which are
+added in a future version of \fBcvs\fR; if you are
+writing a script which can only handle certain record
+types, you\(aqll want to specify \fB-x\fR.
+.SP
+.IP "" 0
+\fB-m \fImodule\fB\fR
+.IP "" 2
+Report on a particular module.  (You can meaningfully
+use \fB-m\fR more than once on the command line.)
+.SP
+.IP "" 0
+\fB-o\fR
+.IP "" 2
+Report on checked-out modules.  This is the default report type.
+.SP
+.IP "" 0
+\fB-T\fR
+.IP "" 2
+Report on all tags.
+.SP
+.IP "" 0
+\fB-x \fItype\fB\fR
+.IP "" 2
+Extract a particular set of record types \fItype\fR from the \fBcvs\fR
+history.  The types are indicated by single letters,
+which you may specify in combination.
+.SP
+Certain commands have a single record type:
+.SP
+.IP "" 2
+\fBF\fR
+.IP "" 4
+release
+.IP "" 2
+\fBO\fR
+.IP "" 4
+checkout
+.IP "" 2
+\fBE\fR
+.IP "" 4
+export
+.IP "" 2
+\fBT\fR
+.IP "" 4
+rtag
+.SP
+One of five record types may result from an update:
+.SP
+.IP "" 2
+\fBC\fR
+.IP "" 4
+A merge was necessary but collisions were
+detected (requiring manual merging).
+.IP "" 2
+\fBG\fR
+.IP "" 4
+A merge was necessary and it succeeded.
+.IP "" 2
+\fBU\fR
+.IP "" 4
+A working file was copied from the repository.
+.IP "" 2
+\fBP\fR
+.IP "" 4
+A working file was patched to match the repository.
+.IP "" 2
+\fBW\fR
+.IP "" 4
+The working copy of a file was deleted during
+update (because it was gone from the repository).
+.SP
+One of three record types results from commit:
+.SP
+.IP "" 2
+\fBA\fR
+.IP "" 4
+A file was added for the first time.
+.IP "" 2
+\fBM\fR
+.IP "" 4
+A file was modified.
+.IP "" 2
+\fBR\fR
+.IP "" 4
+A file was removed.
+.SP
+The options shown as \fB-flags\fR constrain or expand
+the report without requiring option arguments:
+.SP
+.IP "" 0
+\fB-a\fR
+.IP "" 2
+Show data for all users (the default is to show data
+only for the user executing \fBhistory\fR).
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Show last modification only.
+.SP
+.IP "" 0
+\fB-w\fR
+.IP "" 2
+Show only the records for modifications done from the
+same working directory where \fBhistory\fR is
+executing.
+.SP
+The options shown as \fB-options \fIargs\fB\fR constrain the report
+based on an argument:
+.SP
+.IP "" 0
+\fB-b \fIstr\fB\fR
+.IP "" 2
+Show data back to a record containing  the  string
+\fIstr\fR  in  either the module name, the file name, or
+the repository path.
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Show data since \fIdate\fR.  This is slightly different
+from the normal use of \fB-D \fIdate\fB\fR, which
+selects the newest revision older than \fIdate\fR.
+.SP
+.IP "" 0
+\fB-f \fIfile\fB\fR
+.IP "" 2
+Show data for a particular file
+(you can specify several \fB-f\fR options on the same command line).
+This is equivalent to specifying the file on the command line.
+.SP
+.IP "" 0
+\fB-n \fImodule\fB\fR
+.IP "" 2
+Show data for a particular module
+(you can specify several \fB-n\fR options on the same command line).
+.SP
+.IP "" 0
+\fB-p \fIrepository\fB\fR
+.IP "" 2
+Show data for a particular source repository  (you
+can specify several \fB-p\fR options on the same command
+line).
+.SP
+.IP "" 0
+\fB-r \fIrev\fB\fR
+.IP "" 2
+Show records referring to revisions since the revision
+or tag named \fIrev\fR appears in individual \fBrcs\fR
+files.  Each \fBrcs\fR file is searched for the revision or
+tag.
+.SP
+.IP "" 0
+\fB-t \fItag\fB\fR
+.IP "" 2
+Show records since tag \fItag\fR was last added to the
+history file.  This differs from the \fB-r\fR flag
+above in that it reads only the history file, not the
+\fBrcs\fR files, and is much faster.
+.SP
+.IP "" 0
+\fB-u \fIname\fB\fR
+.IP "" 2
+Show records for user \fIname\fR.
+.SP
+.IP "" 0
+\fB-z \fItimezone\fB\fR
+.IP "" 2
+Show times in the selected records using the specified
+time zone instead of UTC.
+.SP
+.SH "import"
+.SS "Import sources into CVS, using vendor branches"
+.IX "import (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: import [-options] repository vendortag releasetag\&...
+.IP "\(bu" 2
+Requires: Repository, source distribution directory.
+.IP "\(bu" 2
+Changes: repository.
+.SP
+Use \fBimport\fR to incorporate an entire source
+distribution from an outside source (e.g., a source
+vendor) into your source repository directory.  You can
+use this command both for initial creation of a
+repository, and for wholesale updates to the module
+from the outside source.  see node `Tracking sources\(aq in the CVS manual, for
+a discussion on this subject.
+.SP
+The \fIrepository\fR argument gives a directory name
+(or a path to a directory) under the \fBcvs\fR root directory
+for repositories; if the directory did not exist,
+import creates it.
+.SP
+When you use import for updates to source that has been
+modified in your source repository (since a prior
+import), it will notify you of any files that conflict
+in the two branches of development; use \fBcheckout
+-j\fR to reconcile the differences, as import instructs
+you to do.
+.SP
+If \fBcvs\fR decides a file should be ignored
+(see node `cvsignore\(aq in the CVS manual), it does not import it and prints
+\fBI \fR followed by the filename (see node `import output\(aq in the CVS 
manual, for a
+complete description of the output).
+.SP
+If the file \fB$CVSROOT/CVSROOT/cvswrappers\fR exists,
+any file whose names match the specifications in that
+file will be treated as packages and the appropriate
+filtering will be performed on the file/directory
+before being imported.  see node `Wrappers\(aq in the CVS manual.
+.SP
+The outside source is saved in a first-level
+branch, by default 1.1.1.  Updates are leaves of this
+branch; for example, files from the first imported
+collection of source will be revision 1.1.1.1, then
+files from the first imported update will be revision
+1.1.1.2, and so on.
+.SP
+At least three arguments are required.
+\fIrepository\fR is needed to identify the collection
+of source.  \fIvendortag\fR is a tag for the entire
+branch (e.g., for 1.1.1).  You must also specify at
+least one \fIreleasetag\fR to uniquely identify the files at
+the leaves created each time you execute \fBimport\fR.  The
+\fIreleasetag\fR should be new, not previously existing in the
+repository file, and uniquely identify the imported release,
+.SP
+Note that \fBimport\fR does \fInot\fR change the
+directory in which you invoke it.  In particular, it
+does not set up that directory as a \fBcvs\fR working
+directory; if you want to work with the sources import
+them first and then check them out into a different
+directory (see node `Getting the source\(aq in the CVS manual).
+.SP
+.SH "import options"
+.SP
+This standard option is supported by \fBimport\fR
+(see node `Common options\(aq in the CVS manual, for a complete description):
+.SP
+.IP "" 0
+\fB-m \fImessage\fB\fR
+.IP "" 2
+Use \fImessage\fR as log information, instead of
+invoking an editor.
+.SP
+There are the following additional special options.
+.SP
+.IP "" 0
+\fB-b \fIbranch\fB\fR
+.IP "" 2
+See see node `Multiple vendor branches\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-k \fIsubst\fB\fR
+.IP "" 2
+Indicate the keyword expansion mode desired.  This
+setting will apply to all files created during the
+import, but not to any files that previously existed in
+the repository.  See see node `Substitution modes\(aq in the CVS manual, for a
+list of valid \fB-k\fR settings.
+.SP
+.IP "" 0
+\fB-I \fIname\fB\fR
+.IP "" 2
+Specify file names that should be ignored during
+import.  You can use this option repeatedly.  To avoid
+ignoring any files at all (even those ignored by
+default), specify \`-I !\(aq.
+.SP
+\fIname\fR can be a file name pattern of the same type
+that you can specify in the \fB.cvsignore\fR file.
+see node `cvsignore\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-W \fIspec\fB\fR
+.IP "" 2
+Specify file names that should be filtered during
+import.  You can use this option repeatedly.
+.SP
+\fIspec\fR can be a file name pattern of the same type
+that you can specify in the \fB.cvswrappers\fR
+file. see node `Wrappers\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-X\fR
+.IP "" 2
+Modify the algorithm used by \fBcvs\fR when importing new files
+so that new files do not immediately appear on the main trunk.
+.SP
+Specifically, this flag causes \fBcvs\fR to mark new files as
+if they were deleted on the main trunk, by taking the following
+steps for each file in addition to those normally taken on import:
+creating a new revision on the main trunk indicating that
+the new file is \fBdead\fR, resetting the new file\(aqs default branch,
+and placing the file in the Attic (see node `Attic\(aq in the CVS manual) 
directory.
+.SP
+Use of this option can be forced on a repository-wide basis
+by setting the \fBImportNewFilesToVendorBranchOnly\fR option in
+CVSROOT/config (see node `config\(aq in the CVS manual).
+.SP
+.SH "import output"
+.SP
+\fBimport\fR keeps you informed of its progress by printing a line
+for each file, preceded by one character indicating the status of the file:
+.SP
+.IP "" 0
+\fBU \fIfile\fB\fR
+.IP "" 2
+The file already exists in the repository and has not been locally
+modified; a new revision has been created (if necessary).
+.SP
+.IP "" 0
+\fBN \fIfile\fB\fR
+.IP "" 2
+The file is a new file which has been added to the repository.
+.SP
+.IP "" 0
+\fBC \fIfile\fB\fR
+.IP "" 2
+The file already exists in the repository but has been locally modified;
+you will have to merge the changes.
+.SP
+.IP "" 0
+\fBI \fIfile\fB\fR
+.IP "" 2
+The file is being ignored (see node `cvsignore\(aq in the CVS manual).
+.SP
+.IX "Symbolic link, importing"
+.IX "Link, symbolic, importing"
+.IP "" 0
+\fBL \fIfile\fB\fR
+.IP "" 2
+The file is a symbolic link; \fBcvs import\fR ignores symbolic links.
+People periodically suggest that this behavior should
+be changed, but if there is a consensus on what it
+should be changed to, it is not apparent.
+(Various options in the \fBmodules\fR file can be used
+to recreate symbolic links on checkout, update, etc.;
+see node `modules\(aq in the CVS manual.)
+.SP
+.SH "import examples"
+.SP
+See see node `Tracking sources\(aq in the CVS manual, and see node `From 
files\(aq in the CVS manual.
+.SP
+.SH "log"
+.SS "Print out log information for files"
+.IX "log (subcommand)"
+.SP
+.IP "\(bu" 2
+Synopsis: log [options] [files\&...]
+.IP "\(bu" 2
+Requires: repository, working directory.
+.IP "\(bu" 2
+Changes: nothing.
+.SP
+Display log information for files.  \fBlog\fR used to
+call the \fBrcs\fR utility \fBrlog\fR.  Although this
+is no longer true in the current sources, this history
+determines the format of the output and the options,
+which are not quite in the style of the other \fBcvs\fR
+commands.
+.SP
+.IX "Timezone, in output"
+.IX "Zone, time, in output"
+The output includes the location of the \fBrcs\fR file,
+the \fIhead\fR revision (the latest revision on the
+trunk), all symbolic names (tags) and some other
+things.  For each revision, the revision number, the
+date, the author, the number of lines added/deleted, the commitid
+and the log message are printed.  All dates are displayed
+in local time at the client. This is typically specified in
+the \fB$TZ\fR environment variable, which can be set to
+govern how \fBlog\fR displays dates.
+.SP
+\fB\fBlog\fB uses \fB-R\fB in a way that conflicts
+with the normal use inside \fBcvs\fB (see node `Common options\(aq in the CVS 
manual).\fR
+.SP
+.SH "log options"
+.SP
+By default, \fBlog\fR prints all information that is
+available.  All other options restrict the output.  Note that the revision
+selection options (\fB-d\fR, \fB-r\fR, \fB-s\fR, and \fB-w\fR) have no
+effect, other than possibly causing a search for files in Attic directories,
+when used in conjunction with the options that restrict the output to only
+\fBlog\fR header fields (\fB-b\fR, \fB-h\fR, \fB-R\fR, and \fB-t\fR)
+unless the \fB-S\fR option is also specified.
+.SP
+.IP "" 0
+\fB-b\fR
+.IP "" 2
+Print information about the revisions on the default
+branch, normally the highest branch on the trunk.
+.SP
+.IP "" 0
+\fB-d \fIdates\fB\fR
+.IP "" 2
+Print information about revisions with a checkin
+date/time in the range given by the
+semicolon-separated list of dates.  The date formats
+accepted are those accepted by the \fB-D\fR option to
+many other \fBcvs\fR commands (see node `Common options\(aq in the CVS manual).
+Dates can be combined into ranges as follows:
+.SP
+.IP "" 2
+\fB\fId1\fB<\fId2\fB\fR
+.IP "" 4
+.IP "" 2
+\fB\fId2\fB>\fId1\fB\fR
+.IP "" 4
+Select the revisions that were deposited between
+\fId1\fR and \fId2\fR.
+.SP
+.IP "" 2
+\fB<\fId\fB\fR
+.IP "" 4
+.IP "" 2
+\fB\fId\fB>\fR
+.IP "" 4
+Select all revisions dated \fId\fR or earlier.
+.SP
+.IP "" 2
+\fB\fId\fB<\fR
+.IP "" 4
+.IP "" 2
+\fB>\fId\fB\fR
+.IP "" 4
+Select all revisions dated \fId\fR or later.
+.SP
+.IP "" 2
+\fB\fId\fB\fR
+.IP "" 4
+Select the single, latest revision dated \fId\fR or
+earlier.
+.SP
+The \fB>\fR or \fB<\fR characters may be followed by
+\fB=\fR to indicate an inclusive range rather than an
+exclusive one.
+.SP
+Note that the separator is a semicolon (;).
+.SP
+.IP "" 0
+\fB-h\fR
+.IP "" 2
+Print only the name of the \fBrcs\fR file, name
+of the file in the working directory, head,
+default branch, access list, locks, symbolic names, and
+suffix.
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory.  (Default
+is to run recursively).
+.SP
+.IP "" 0
+\fB-N\fR
+.IP "" 2
+Do not print the list of tags for this file.  This
+option can be very useful when your site uses a lot of
+tags, so rather than "more"\(aqing over 3 pages of tag
+information, the log information is presented without
+tags at all.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Print only the name of the \fBrcs\fR file.
+.SP
+.IP "" 0
+\fB-r\fIrevisions\fB\fR
+.IP "" 2
+Print information about revisions given in the
+comma-separated list \fIrevisions\fR of revisions and
+ranges.  The following table explains the available
+range formats:
+.SP
+.IP "" 2
+\fB\fIrev1\fB:\fIrev2\fB\fR
+.IP "" 4
+Revisions \fIrev1\fR to \fIrev2\fR (which must be on
+the same branch).
+.SP
+.IP "" 2
+\fB\fIrev1\fB::\fIrev2\fB\fR
+.IP "" 4
+The same, but excluding \fIrev1\fR.
+.SP
+.IP "" 2
+\fB:\fIrev\fB\fR
+.IP "" 4
+.IP "" 2
+\fB::\fIrev\fB\fR
+.IP "" 4
+Revisions from the beginning of the branch up to
+and including \fIrev\fR.
+.SP
+.IP "" 2
+\fB\fIrev\fB:\fR
+.IP "" 4
+Revisions starting with \fIrev\fR to the end of the
+branch containing \fIrev\fR.
+.SP
+.IP "" 2
+\fB\fIrev\fB::\fR
+.IP "" 4
+Revisions starting just after \fIrev\fR to the end of the
+branch containing \fIrev\fR.
+.SP
+.IP "" 2
+\fB\fIbranch\fB\fR
+.IP "" 4
+An argument that is a branch means all revisions on
+that branch.
+.SP
+.IP "" 2
+\fB\fIbranch1\fB:\fIbranch2\fB\fR
+.IP "" 4
+.IP "" 2
+\fB\fIbranch1\fB::\fIbranch2\fB\fR
+.IP "" 4
+A range of branches means all revisions
+on the branches in that range.
+.SP
+.IP "" 2
+\fB\fIbranch\fB.\fR
+.IP "" 4
+The latest revision in \fIbranch\fR.
+.SP
+A bare \fB-r\fR with no revisions means the latest
+revision on the default branch, normally the trunk.
+There can be no space between the \fB-r\fR option and
+its argument.
+.SP
+.IP "" 0
+\fB-S\fR
+.IP "" 2
+Suppress the header if no revisions are selected.
+.SP
+.IP "" 0
+\fB-s \fIstates\fB\fR
+.IP "" 2
+Print information about revisions whose state
+attributes match one of the states given in the
+comma-separated list \fIstates\fR.  Individual states may
+be any text string, though \fBcvs\fR commonly only uses two
+states, \fBExp\fR and \fBdead\fR.  See see node `admin options\(aq in the CVS 
manual
+for more information.
+.SP
+.IP "" 0
+\fB-t\fR
+.IP "" 2
+Print the same as \fB-h\fR, plus the descriptive text.
+.SP
+.IP "" 0
+\fB-w\fIlogins\fB\fR
+.IP "" 2
+Print information about revisions checked in by users
+with login names appearing in the comma-separated list
+\fIlogins\fR.  If \fIlogins\fR is omitted, the user\(aqs
+login is assumed.  There can be no space between the
+\fB-w\fR option and its argument.
+.SP
+\fBlog\fR prints the intersection of the revisions
+selected with the options \fB-d\fR, \fB-s\fR, and
+\fB-w\fR, intersected with the union of the revisions
+selected by \fB-b\fR and \fB-r\fR.
+.SP
+.SH "log examples"
+.SP
+.IX "Timezone, in output"
+.IX "Zone, time, in output"
+Since \fBlog\fR shows dates in local time,
+you might want to see them in Coordinated Universal Time (UTC) or
+some other timezone.
+To do this you can set your \fB$TZ\fR environment
+variable before invoking \fBcvs\fR:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ TZ=UTC cvs log foo.c
+.IP "" 2
+$ TZ=EST cvs log bar.c
+
+.PD
+.IP "" 0
+.SP
+(If you are using a \fBcsh\fR-style shell, like \fBtcsh\fR,
+you would need to prefix the examples above with \fBenv\fR.)
+.SP
+.SH "ls & rls"
+.IX "ls (subcommand)"
+.IX "rls (subcommand)"
+.SP
+.IP "\(bu" 2
+ls [-e | -l] [-RP] [-r tag[:date]] [-D date] [path\&...]
+.IP "\(bu" 2
+Requires: repository for \fBrls\fR, repository & working directory for
+\fBls\fR.
+.IP "\(bu" 2
+Changes: nothing.
+.IP "\(bu" 2
+Synonym: \fBdir\fR & \fBlist\fR are synonyms for \fBls\fR and \fBrdir\fR
+& \fBrlist\fR are synonyms for \fBrls\fR.
+.SP
+The \fBls\fR and \fBrls\fR commands are used to list
+files and directories in the repository.
+.SP
+By default \fBls\fR lists the files and directories
+that belong in your working directory, what would be
+there after an \fBupdate\fR.
+.SP
+By default \fBrls\fR lists the files and directories
+on the tip of the trunk in the topmost directory of the
+repository.
+.SP
+Both commands accept an optional list of file and
+directory names, relative to the working directory for
+\fBls\fR and the topmost directory of the repository
+for \fBrls\fR.  Neither is recursive by default.
+.SP
+.SH "ls & rls options"
+.SP
+These standard options are supported by \fBls\fR & \fBrls\fR:
+.SP
+.IP "" 0
+\fB-d\fR
+.IP "" 2
+Show dead revisions (with tag when specified).
+.SP
+.IP "" 0
+\fB-e\fR
+.IP "" 2
+Display in CVS/Entries format.  This format is meant to remain easily parsable
+by automation.
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Display all details.
+.SP
+.IP "" 0
+\fB-P\fR
+.IP "" 2
+Don\(aqt list contents of empty directories when recursing.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+List recursively.
+.SP
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+Show files specified by \fItag\fR or, when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  See see node `Common options\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Show files from date.
+.SP
+.SH "rls examples"
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs rls
+.IP "" 2
+cvs rls: Listing module: \`.\(aq
+.IP "" 2
+CVSROOT
+.IP "" 2
+first-dir
+
+.PD
+.IP "" 0
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs rls CVSROOT
+.IP "" 2
+cvs rls: Listing module: \`CVSROOT\(aq
+.IP "" 2
+checkoutlist
+.IP "" 2
+commitinfo
+.IP "" 2
+config
+.IP "" 2
+cvswrappers
+.IP "" 2
+loginfo
+.IP "" 2
+modules
+.IP "" 2
+notify
+.IP "" 2
+rcsinfo
+.IP "" 2
+taginfo
+.IP "" 2
+verifymsg
+.SP
+
+.PD
+.IP "" 0
+.SP
+.SH "rdiff"
+.SS "\(aqpatch\(aq format diffs between releases"
+.IX "rdiff (subcommand)"
+.SP
+.IP "\(bu" 2
+rdiff [-flags] [-V vn] (-r tag1[:date1] | -D date1) [-r tag2[:date2] | -D 
date2] modules\&...
+.IP "\(bu" 2
+Requires: repository.
+.IP "\(bu" 2
+Changes: nothing.
+.IP "\(bu" 2
+Synonym: patch
+.SP
+Builds a Larry Wall format patch(1) file between two
+releases, that can be fed directly into the \fBpatch\fR
+program to bring an old release up-to-date with the new
+release.  (This is one of the few \fBcvs\fR commands that
+operates directly from the repository, and doesn\(aqt
+require a prior checkout.) The diff output is sent to
+the standard output device.
+.SP
+You can specify (using the standard \fB-r\fR and
+\fB-D\fR options) any combination of one or two
+revisions or dates.  If only one revision or date is
+specified, the patch file reflects differences between
+that revision or date and the current head revisions in
+the \fBrcs\fR file.
+.SP
+Note that if the software release affected is contained
+in more than one directory, then it may be necessary to
+specify the \fB-p\fR option to the \fBpatch\fR command when
+patching the old sources, so that \fBpatch\fR is able to find
+the files that are located in other directories.
+.SP
+.SH "rdiff options"
+.SP
+These standard options are supported by \fBrdiff\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-D \fIdate\fB\fR
+.IP "" 2
+Use the most recent revision no later than \fIdate\fR.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+If no matching revision is found, retrieve the most
+recent revision (instead of ignoring the file).
+.SP
+.IP "" 0
+\fB-k \fIkflag\fB\fR
+.IP "" 2
+Process keywords according to \fIkflag\fR.  See
+see node `Keyword substitution\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; don\(aqt descend subdirectories.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Examine directories recursively.  This option is on by default.
+.SP
+.IP "" 0
+\fB-r \fItag\fB\fR
+.IP "" 2
+Use the revision specified by \fItag\fR, or when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  See see node `Common options\(aq in the CVS manual.
+.SP
+In addition to the above, these options are available:
+.SP
+.IP "" 0
+\fB-c\fR
+.IP "" 2
+Use the context diff format.  This is the default format.
+.SP
+.IP "" 0
+\fB-s\fR
+.IP "" 2
+Create a summary change report instead of a patch.  The
+summary includes information about files that were
+changed or added between the releases.  It is sent to
+the standard output device.  This is useful for finding
+out, for example, which files have changed between two
+dates or revisions.
+.SP
+.IP "" 0
+\fB-t\fR
+.IP "" 2
+A diff of the top two revisions is sent to the standard
+output device.  This is most useful for seeing what the
+last change to a file was.
+.SP
+.IP "" 0
+\fB-u\fR
+.IP "" 2
+Use the unidiff format for the context diffs.
+Remember that old versions
+of the \fBpatch\fR program can\(aqt handle the unidiff
+format, so if you plan to post this patch to the net
+you should probably not use \fB-u\fR.
+.SP
+.IP "" 0
+\fB-V \fIvn\fB\fR
+.IP "" 2
+Expand keywords according to the rules current in
+\fBrcs\fR version \fIvn\fR (the expansion format changed with
+\fBrcs\fR version 5).  Note that this option is no
+longer accepted.  \fBcvs\fR will always expand keywords the
+way that \fBrcs\fR version 5 does.
+.SP
+.SH "rdiff examples"
+.SP
+Suppose you receive mail from address@hidden asking for an
+update from release 1.2 to 1.4 of the tc compiler.  You
+have no such patches on hand, but with \fBcvs\fR that can
+easily be fixed with a command such as this:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \\
+.IP "" 2
+$$ Mail -s \(aqThe patches you asked for\(aq address@hidden
+
+.PD
+.IP "" 0
+.SP
+Suppose you have made release 1.3, and forked a branch
+called \fBR_1_3fix\fR for bug fixes.  \fBR_1_3_1\fR
+corresponds to release 1.3.1, which was made some time
+ago.  Now, you want to see how much development has been
+done on the branch.  This command can be used:
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
+.IP "" 2
+cvs rdiff: Diffing module-name
+.IP "" 2
+File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
+.IP "" 2
+File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
+.IP "" 2
+File bar.h,v changed from revision 1.29.2.1 to 1.2
+
+.PD
+.IP "" 0
+.SP
+.SH "release"
+.SS "Indicate that a Module is no longer in use"
+.IX "release (subcommand)"
+.SP
+.IP "\(bu" 2
+release [-d] directories\&...
+.IP "\(bu" 2
+Requires: Working directory.
+.IP "\(bu" 2
+Changes: Working directory, history log.
+.SP
+This command is meant to safely cancel the effect of
+\fBcvs checkout\fR.  Since \fBcvs\fR doesn\(aqt lock files, it
+isn\(aqt strictly necessary to use this command.  You can
+always simply delete your working directory, if you
+like; but you risk losing changes you may have
+forgotten, and you leave no trace in the \fBcvs\fR history
+file (see node `history file\(aq in the CVS manual) that you\(aqve abandoned 
your
+checkout.
+.SP
+Use \fBcvs release\fR to avoid these problems.  This
+command checks that no uncommitted changes are
+present; that you are executing it from immediately
+above a \fBcvs\fR working directory; and that the repository
+recorded for your files is the same as the repository
+defined in the module database.
+.SP
+If all these conditions are true, \fBcvs release\fR
+leaves a record of its execution (attesting to your
+intentionally abandoning your checkout) in the \fBcvs\fR
+history log.
+.SP
+.SH "release options"
+.SP
+The \fBrelease\fR command supports one command option:
+.SP
+.IP "" 0
+\fB-d\fR
+.IP "" 2
+Delete your working copy of the file if the release
+succeeds.  If this flag is not given your files will
+remain in your working directory.
+.SP
+\fBWARNING:  The \fBrelease\fB command deletes
+all directories and files recursively.  This
+has the very serious side-effect that any directory
+that you have created inside your checked-out sources,
+and not added to the repository (using the \fBadd\fB
+command; see node `Adding files\(aq in the CVS manual) will be silently 
deleted\(emeven
+if it is non-empty!\fR
+.SP
+.SH "release output"
+.SP
+Before \fBrelease\fR releases your sources it will
+print a one-line message for any file that is not
+up-to-date.
+.SP
+.IP "" 0
+\fBU \fIfile\fB\fR
+.IP "" 2
+There exists a newer revision of this file in the
+repository, and you have not modified your local copy
+of the file.
+.SP
+.IP "" 0
+\fBA \fIfile\fB\fR
+.IP "" 2
+The file has been added to your private copy of the
+sources, but has not yet been committed to the
+repository.  If you delete your copy of the sources
+this file will be lost.
+.SP
+.IP "" 0
+\fBR \fIfile\fB\fR
+.IP "" 2
+The file has been removed from your private copy of the
+sources, but has not yet been removed from the
+repository, since you have not yet committed the
+removal.  see node `commit\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fBM \fIfile\fB\fR
+.IP "" 2
+The file is modified in your working directory.  There
+might also be a newer revision inside the repository.
+.SP
+.IP "" 0
+\fB? \fIfile\fB\fR
+.IP "" 2
+\fIfile\fR is in your working directory, but does not
+correspond to anything in the source repository, and is
+not in the list of files for \fBcvs\fR to ignore (see the
+description of the \fB-I\fR option, and
+see node `cvsignore\(aq in the CVS manual).  If you remove your working
+sources, this file will be lost.
+.SP
+.SH "release examples"
+.SP
+Release the \fBtc\fR directory, and delete your local working copy
+of the files.
+.SP
+.PD 0
+.SP
+.IP "" 2
+$ cd \&..         # \fRYou must stand immediately above the\fR
+.IP "" 2
+                # \fRsources when you issue \fBcvs release\fR.\fR
+.IP "" 2
+$ cvs release -d tc
+.IP "" 2
+You have [0] altered files in this repository.
+.IP "" 2
+Are you sure you want to release (and delete) directory \`tc\(aq: y
+.IP "" 2
+$
+
+.PD
+.IP "" 0
+.SP
+.SH "server & pserver"
+.SS "Act as a server for a client on stdin/stdout"
+.IX "pserver (subcommand)"
+.IX "server (subcommand)"
+.SP
+.IP "\(bu" 2
+pserver [-c path]
+.SP
+server [-c path]
+.IP "\(bu" 2
+Requires: repository, client conversation on stdin/stdout
+.IP "\(bu" 2
+Changes: Repository or, indirectly, client working directory.
+.SP
+The \fBcvs\fR \fBserver\fR and \fBpserver\fR commands are used to provide
+repository access to remote clients and expect a client conversation on
+stdin & stdout.  Typically these commands are launched from \fBinetd\fR or
+via \fBssh\fR (see node `Remote repositories\(aq in the CVS manual).
+.SP
+\fBserver\fR expects that the client has already been authenticated somehow,
+typically via \fBssh\fR, and \fBpserver\fR attempts to authenticate the client
+itself.
+.SP
+Only one option is available with the \fBserver\fR and \fBpserver\fR
+commands:
+.SP
+.IX "configuration file"
+.IP "" 0
+\fB-c path\fR
+.IP "" 2
+Load configuration from \fIpath\fR rather than the default location 
+\fB$CVSROOT/CVSROOT/config\fR (see node `config\(aq in the CVS manual).  
\fIpath\fR must be
+\fB/etc/cvs.conf\fR or prefixed by \fB/etc/cvs/\fR.  This option is
+supported beginning with \fBcvs\fR release 1.12.13.
+.SP
+.SH "update"
+.SS "Bring work tree in sync with repository"
+.IX "update (subcommand)"
+.SP
+.IP "\(bu" 2
+update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D 
date] [-W spec] files\&...
+.IP "\(bu" 2
+Requires: repository, working directory.
+.IP "\(bu" 2
+Changes: working directory.
+.SP
+After you\(aqve run checkout to create your private copy
+of source from the common repository, other developers
+will continue changing the central source.  From time
+to time, when it is convenient in your development
+process, you can use the \fBupdate\fR command from
+within your working directory to reconcile your work
+with any revisions applied to the source repository
+since your last checkout or update.  Without the \fB-C\fR
+option, \fBupdate\fR will also merge any differences
+between the local copy of files and their base revisions
+into any destination revisions specified with \fB-r\fR,
+\fB-D\fR, or \fB-A\fR.
+.SP
+.SH "update options"
+.SP
+These standard options are available with \fBupdate\fR
+(see node `Common options\(aq in the CVS manual, for a complete description of
+them):
+.SP
+.IP "" 0
+\fB-D date\fR
+.IP "" 2
+Use the most recent revision no later than \fIdate\fR.
+This option is sticky, and implies \fB-P\fR.
+See see node `Sticky tags\(aq in the CVS manual, for more information on 
sticky tags/dates.
+.SP
+.IP "" 0
+\fB-f\fR
+.IP "" 2
+Only useful with the \fB-D\fR or \fB-r\fR flags.  If no matching revision
+is found, retrieve the most recent revision (instead of ignoring the file).
+.SP
+.IP "" 0
+\fB-k \fIkflag\fB\fR
+.IP "" 2
+Process keywords according to \fIkflag\fR.  See
+see node `Keyword substitution\(aq in the CVS manual.
+This option is sticky; future updates of
+this file in this working directory will use the same
+\fIkflag\fR.  The \fBstatus\fR command can be viewed
+to see the sticky options.  See see node `Invoking CVS\(aq in the CVS manual, 
for
+more information on the \fBstatus\fR command.
+.SP
+.IP "" 0
+\fB-l\fR
+.IP "" 2
+Local; run only in current working directory.  see node `Recursive 
behavior\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-P\fR
+.IP "" 2
+Prune empty directories.  See see node `Moving directories\(aq in the CVS 
manual.
+.SP
+.IP "" 0
+\fB-p\fR
+.IP "" 2
+Pipe files to the standard output.
+.SP
+.IP "" 0
+\fB-R\fR
+.IP "" 2
+Update directories recursively (default).  see node `Recursive
+behavior\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-r \fItag\fB[:\fIdate\fB]\fR
+.IP "" 2
+Retrieve the revisions specified by \fItag\fR or, when \fIdate\fR is specified
+and \fItag\fR is a branch tag, the version from the branch \fItag\fR as it
+existed on \fIdate\fR.  This option is sticky, and implies \fB-P\fR.
+See see node `Sticky tags\(aq in the CVS manual, for more information on 
sticky tags/dates. Also
+see see node `Common options\(aq in the CVS manual.
+.SP
+These special options are also available with
+\fBupdate\fR.
+.SP
+.IP "" 0
+\fB-A\fR
+.IP "" 2
+Reset any sticky tags, dates, or \fB-k\fR options.
+See see node `Sticky tags\(aq in the CVS manual, for more information on 
sticky tags/dates.
+.SP
+.IP "" 0
+\fB-C\fR
+.IP "" 2
+Overwrite locally modified files with clean copies from
+the repository (the modified file is saved in
+\fB.#\fIfile\fB.\fIrevision\fB\fR, however).
+.SP
+.IP "" 0
+\fB-d\fR
+.IP "" 2
+Create any directories that exist in the repository if
+they\(aqre missing from the working directory.  Normally,
+\fBupdate\fR acts only on directories and files that
+were already enrolled in your working directory.
+.SP
+This is useful for updating directories that were
+created in the repository since the initial checkout;
+but it has an unfortunate side effect.  If you
+deliberately avoided certain directories in the
+repository when you created your working directory
+(either through use of a module name or by listing
+explicitly the files and directories you wanted on the
+command line), then updating with \fB-d\fR will create
+those directories, which may not be what you want.
+.SP
+.IP "" 0
+\fB-I \fIname\fB\fR
+.IP "" 2
+Ignore files whose names match \fIname\fR (in your
+working directory) during the update.  You can specify
+\fB-I\fR more than once on the command line to specify
+several files to ignore.  Use \fB-I !\fR to avoid
+ignoring any files at all.  see node `cvsignore\(aq in the CVS manual, for 
other
+ways to make \fBcvs\fR ignore some files.
+.SP
+.IP "" 0
+\fB-W\fIspec\fB\fR
+.IP "" 2
+Specify file names that should be filtered during
+update.  You can use this option repeatedly.
+.SP
+\fIspec\fR can be a file name pattern of the same type
+that you can specify in the \fB.cvswrappers\fR
+file. see node `Wrappers\(aq in the CVS manual.
+.SP
+.IP "" 0
+\fB-j\fIrevision\fB\fR
+.IP "" 2
+With two \fB-j\fR options, merge changes from the
+revision specified with the first \fB-j\fR option to
+the revision specified with the second \fBj\fR option,
+into the working directory.
+.SP
+With one \fB-j\fR option, merge changes from the
+ancestor revision to the revision specified with the
+\fB-j\fR option, into the working directory.  The
+ancestor revision is the common ancestor of the
+revision which the working directory is based on, and
+the revision specified in the \fB-j\fR option.
+.SP
+Note that using a single \fB-j \fItagname\fB\fR option rather than
+\fB-j \fIbranchname\fB\fR to merge changes from a branch will
+often not remove files which were removed on the branch.
+see node `Merging adds and removals\(aq in the CVS manual, for more.
+.SP
+In addition, each \fB-j\fR option can contain an optional
+date specification which, when used with branches, can
+limit the chosen revision to one within a specific
+date.  An optional date is specified by adding a colon
+(:) to the tag:
+\fB-j\fISymbolic_Tag\fB:\fIDate_Specifier\fB\fR.
+.SP
+see node `Branching and merging\(aq in the CVS manual.
+.SP
+.SP
+.SH "update output"
+.SP
+\fBupdate\fR and \fBcheckout\fR keep you informed of
+their progress by printing a line for each file, preceded
+by one character indicating the status of the file:
+.SP
+.IP "" 0
+\fBU \fIfile\fB\fR
+.IP "" 2
+The file was brought up to date with respect to the
+repository.  This is done for any file that exists in
+the repository but not in your working directory, and for files
+that you haven\(aqt changed but are not the most recent
+versions available in the repository.
+.SP
+.IP "" 0
+\fBA \fIfile\fB\fR
+.IP "" 2
+The file has been added to your private copy of the
+sources, and will be added to the source repository
+when you run \fBcommit\fR on the file.  This is a
+reminder to you that the file needs to be committed.
+.SP
+.IP "" 0
+\fBR \fIfile\fB\fR
+.IP "" 2
+The file has been removed from your private copy of the
+sources, and will be removed from the source repository
+when you run \fBcommit\fR on the file.  This is a
+reminder to you that the file needs to be committed.
+.SP
+.IP "" 0
+\fBM \fIfile\fB\fR
+.IP "" 2
+The file is modified in  your  working  directory.
+.SP
+\fBM\fR can indicate one of two states for a file
+you\(aqre working on: either there were no modifications
+to the same file in the repository, so that your file
+remains as you last saw it; or there were modifications
+in the repository as well as in your copy, but they
+were merged successfully, without conflict, in your
+working directory.
+.SP
+\fBcvs\fR will print some messages if it merges your work,
+and a backup copy of your working file (as it looked
+before you ran \fBupdate\fR) will be made.  The exact
+name of that file is printed while \fBupdate\fR runs.
+.SP
+.IP "" 0
+\fBC \fIfile\fB\fR
+.IP "" 2
+.IX "\&.# files"
+.IX "__ files (VMS)"
+A conflict was detected while trying to merge your
+changes to \fIfile\fR with changes from the source
+repository.  \fIfile\fR (the copy in your working
+directory) is now the result of attempting to merge
+the two revisions; an unmodified copy of your file
+is also in your working directory, with the name
+\fB.#\fIfile\fB.\fIrevision\fB\fR where \fIrevision\fR
+is the revision that your modified file started
+from.  Resolve the conflict as described in
+see node `Conflicts example\(aq in the CVS manual.
+(Note that some systems automatically purge
+files that begin with \fB.#\fR if they have not been
+accessed for a few days.  If you intend to keep a copy
+of your original file, it is a very good idea to rename
+it.)  Under \fBvms\fR, the file name starts with
+\fB__\fR rather than \fB.#\fR.
+.SP
+.IP "" 0
+\fB? \fIfile\fB\fR
+.IP "" 2
+\fIfile\fR is in your working directory, but does not
+correspond to anything in the source repository, and is
+not in the list of files for \fBcvs\fR to ignore (see the
+description of the \fB-I\fR option, and
+see node `cvsignore\(aq in the CVS manual).
+.SH "AUTHORS"
+.TP
+Dick Grune
+Original author of the
+.B cvs
+shell script version posted to
+.B comp.sources.unix
+in the volume6 release of December, 1986.
+Credited with much of the
+.B cvs
+conflict resolution algorithms.
+.TP
+Brian Berliner
+Coder and designer of the
+.B cvs
+program itself in April, 1989, based on the original work done by Dick.
+.TP
+Jeff Polk
+Helped Brian with the design of the
+.B cvs
+module and vendor branch support and author of the
+.BR checkin ( 1 )
+shell script (the ancestor of \fBcvs import\fP).
+.TP
+Larry Jones, Derek R. Price, and Mark D. Baushke
+Have helped maintain
+.B cvs
+for many years.
+.TP
+And many others too numerous to mention here.
+.SH "SEE ALSO"
+The most comprehensive manual for CVS is
+Version Management with CVS by Per Cederqvist et al.  Depending on
+your system, you may be able to get it with the
+.B info CVS
+command or it may be available as cvs.pdf (Portable Document Format),
+cvs.ps (PostScript), cvs.texinfo (Texinfo source), or cvs.html.
+.SP
+For CVS updates, more information on documentation, software related
+to CVS, development of CVS, and more, see:
+.in +1i
+.SP
+.PD 0
+.IP "" 4
+.B http://www.nongnu.org/cvs/
+.in -1i
+.SP
+.BR ci ( 1 ),
+.BR co ( 1 ),
+.BR cvs ( 5 ),
+.BR cvsbug ( 8 ),
+.BR diff ( 1 ),
+.BR grep ( 1 ),
+.BR patch ( 1 ),
+.BR rcs ( 1 ),
+.BR rcsdiff ( 1 ),
+.BR rcsmerge ( 1 ),
+.BR rlog ( 1 ).
Index: ccvs/doc/cvs.texinfo
diff -u /dev/null ccvs/doc/cvs.texinfo:1.673.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/cvs.texinfo        Wed Dec 21 13:25:08 2005
@@ -0,0 +1,16014 @@
+\input texinfo  @c -*-texinfo-*-
address@hidden Documentation for CVS.
address@hidden cvs.info
address@hidden copyleftnotice
address@hidden
+Copyright @copyright{} 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+                       2001, 2002, 2003, 2004, 2005
+                       Free Software Foundation, Inc.
+
address@hidden @columnfractions .12 .88
address@hidden Portions
address@hidden @tab Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004, 
2005
+                                  Derek R. Price,
address@hidden @tab Copyright @copyright{} 2002, 2003, 2004, 2005
+                                  Ximbiot @url{http://ximbiot.com},
address@hidden @tab Copyright @copyright{} 1992, 1993, 1999 Signum Support AB,
address@hidden @tab and Copyright @copyright{} others.
address@hidden multitable
+
address@hidden
+Permission is granted to process this file through Tex and print the
+results, provided the printed document carries copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+
address@hidden ignore
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided also that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation
+approved by the Free Software Foundation.
address@hidden macro
+
address@hidden This file is part of the CVS distribution.
+
address@hidden CVS is free software; you can redistribute it and/or modify
address@hidden it under the terms of the GNU General Public License as 
published by
address@hidden the Free Software Foundation; either version 2, or (at your 
option)
address@hidden any later version.
+
address@hidden CVS is distributed in the hope that it will be useful,
address@hidden but WITHOUT ANY WARRANTY; without even the implied warranty of
address@hidden MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
address@hidden GNU General Public License for more details.
+
address@hidden See ../README for A4 vs. US letter size.
address@hidden When we provided A4 postscript, and people tried to
address@hidden print it on US letter, the usual complaint was that the
address@hidden page numbers would get cut off.
address@hidden If one prints US letter on A4, reportedly there is
address@hidden some extra space at the top and/or bottom, and the side
address@hidden margins are a bit narrow, but no text is lost.
address@hidden
address@hidden See
address@hidden http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html
address@hidden for more on paper sizes.  Insuring that margins are
address@hidden big enough to print on either A4 or US letter does
address@hidden indeed seem to be the usual approach (RFC2346).
+
address@hidden This document seems to get overfull hboxes with some
address@hidden frequency (probably because the tendency is to
address@hidden sanity-check it with "make info" and run TeX less
address@hidden often).  The big ugly boxes just seem to add insult
address@hidden to injury, and I'm not aware of them helping to fix
address@hidden the overfull hboxes at all.
address@hidden
+
address@hidden version.texi
address@hidden CVS---Concurrent Versions System address@hidden
address@hidden odd
+
address@hidden -- TODO list:
address@hidden -- Fix all lines that match "address@hidden -- "
address@hidden -- Also places marked with FIXME should be manual
address@hidden problems (as opposed to FIXCVS for CVS problems).
+
address@hidden @splitrcskeyword{} is used to avoid keyword expansion.  It is 
replaced by
address@hidden @asis when generating info and dvi, and by <i></i> in the 
generated html,
address@hidden such that keywords are not expanded in the generated html. 
address@hidden
address@hidden splitrcskeyword {arg}
address@hidden
address@hidden macro
address@hidden ifnothtml
+
address@hidden
address@hidden splitrcskeyword {arg}
address@hidden
address@hidden macro
address@hidden ifhtml
+
address@hidden GNU Packages
address@hidden
+* CVS: (cvs).                   Concurrent Versions System
address@hidden direntry
address@hidden Individual utilities
address@hidden
+* cvs: (cvs)CVS commands.       Concurrent Versions System
address@hidden direntry
+
address@hidden The titlepage section does not appear in the Info file.
address@hidden
address@hidden 4
address@hidden The title is printed in a large font.
address@hidden @titlefont{Version Management}
address@hidden
address@hidden @titlefont{with}
address@hidden
address@hidden @titlefont{CVS}
address@hidden 2
address@hidden for @sc{cvs} @value{VERSION}
address@hidden -release-
address@hidden 3
address@hidden Per Cederqvist et al
+
address@hidden  The following two commands start the copyright page
address@hidden  for the printed manual.  This will not appear in the Info file.
address@hidden
address@hidden 0pt plus 1filll
address@hidden
address@hidden titlepage
+
address@hidden
+
address@hidden
+
address@hidden ================================================================
address@hidden                   The real text starts here
address@hidden ================================================================
+
address@hidden
address@hidden 
---------------------------------------------------------------------
address@hidden    Top
address@hidden
+
+This info manual describes how to use and administer
address@hidden version @value{VERSION}.
address@hidden ifnottex
+
address@hidden
address@hidden
address@hidden ifinfo
+
address@hidden This menu is pretty long.  Not sure how easily that
address@hidden can be fixed (no brilliant ideas right away)...
address@hidden
+* Overview::                    An introduction to CVS
+* Repository::                  Where all your sources are stored
+* Starting a new project::      Starting a project with CVS
+* Revisions::                   Numeric and symbolic names for revisions
+* Branching and merging::       Diverging/rejoining branches of development
+* Recursive behavior::          CVS descends directories
+* Adding and removing::         Adding/removing/renaming files/directories
+* History browsing::            Viewing the history of files in various ways
+
+CVS and the Real World.
+-----------------------
+* Binary files::                CVS can handle binary files
+* Multiple developers::         How CVS helps a group of developers
+* Revision management::         Policy questions for revision management
+* Keyword substitution::        CVS can include the revision inside the file
+* Tracking sources::            Tracking third-party sources
+* Builds::                      Issues related to CVS and builds
+* Special Files::              Devices, links and other non-regular files
+
+References.
+-----------
+* CVS commands::                CVS commands share some things
+* Invoking CVS::                Quick reference to CVS commands
+* Administrative files::        Reference manual for the Administrative files
+* Environment variables::       All environment variables which affect CVS
+* Compatibility::               Upgrading CVS versions
+* Troubleshooting::             Some tips when nothing works
+* Credits::                     Some of the contributors to this manual
+* BUGS::                        Dealing with bugs in CVS or this manual
+* Index::                       Index
address@hidden menu
+
address@hidden 
---------------------------------------------------------------------
address@hidden Overview
address@hidden Overview
address@hidden Overview
+
+This chapter is for people who have never used
address@hidden, and perhaps have never used version control
+software before.
+
+If you are already familiar with @sc{cvs} and are just
+trying to learn a particular feature or remember a
+certain command, you can probably skip everything here.
+
address@hidden
+* What is CVS?::                What you can do with @sc{cvs}
+* What is CVS not?::            Problems @sc{cvs} doesn't try to solve
+* A sample session::            A tour of basic @sc{cvs} usage
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden What is CVS?
address@hidden What is CVS?
address@hidden What is CVS?
address@hidden Introduction to CVS
address@hidden CVS, introduction to
+
address@hidden is a version control system.  Using it, you can
+record the history of your source files.
+
address@hidden -- ///
address@hidden -- ///Those who cannot remember the past are condemned to repeat 
it.
address@hidden -- ///               -- George Santayana
address@hidden -- //////
+
address@hidden -- Insert history  quote here!
+For example, bugs sometimes creep in when
+software is modified, and you might not detect the bug
+until a long time after you make the modification.
+With @sc{cvs}, you can easily retrieve old versions to see
+exactly which change caused the bug.  This can
+sometimes be a big help.
+
+You could of course save every version of every file
+you have ever created.  This would
+however waste an enormous amount of disk space.  @sc{cvs}
+stores all the versions of a file in a single file in a
+clever way that only stores the differences between
+versions.
+
address@hidden also helps you if you are part of a group of people working
+on the same project.  It is all too easy to overwrite
+each others' changes unless you are extremely careful.
+Some editors, like @sc{gnu} Emacs, try to make sure that
+two people never modify the same file at the
+same time.  Unfortunately, if someone is using another
+editor, that safeguard will not work.  @sc{cvs} solves this problem
+by insulating the different developers from each other.  Every
+developer works in his own directory, and @sc{cvs} merges
+the work when each developer is done.
+
address@hidden History of CVS
address@hidden CVS, history of
address@hidden Credits (CVS program)
address@hidden Contributors (CVS program)
address@hidden started out as a bunch of shell scripts written by
+Dick Grune, posted to the newsgroup
address@hidden in the volume 6
+release of July, 1986.  While no actual code from
+these shell scripts is present in the current version
+of @sc{cvs} much of the @sc{cvs} conflict resolution algorithms
+come from them.
+
+In April, 1989, Brian Berliner designed and coded @sc{cvs}.
+Jeff Polk later helped Brian with the design of the @sc{cvs}
+module and vendor branch support.
+
address@hidden Source, getting CVS source
+You can get @sc{cvs} in a variety of ways, including
+free download from the Internet.  For more information
+on downloading @sc{cvs} and other @sc{cvs} topics, see:
+
address@hidden
address@hidden://cvs.nongnu.org/}
address@hidden example
+
address@hidden Mailing list
address@hidden List, mailing list
address@hidden Newsgroups
+There is a mailing list, known as @email{info-cvs@@nongnu.org},
+devoted to @sc{cvs}.  To subscribe or
+unsubscribe
+write to
address@hidden@@nongnu.org}.
+If you prefer a Usenet group, there is a one-way mirror (posts to the email
+list are usually sent to the news group, but not vice versa) of
address@hidden@@nongnu.org} at @url{news:gnu.cvs.help}.  The right
+Usenet group for posts is @url{news:comp.software.config-mgmt} which is for
address@hidden discussions (along with other configuration
+management systems).  In the future, it might be
+possible to create a
address@hidden, but probably only
+if there is sufficient @sc{cvs} traffic on
address@hidden:comp.software.config-mgmt}.
address@hidden Other random data is that the tale was very
address@hidden skeptical of comp.software.config-mgmt.cvs when the
address@hidden subject came up around 1995 or so (for one
address@hidden thing, because creating it would be a "reorg" which
address@hidden would need to take a more comprehensive look at the
address@hidden whole comp.software.config-mgmt.* hierarchy).
+
+You can also subscribe to the @email{bug-cvs@@nongnu.org} mailing list,
+described in more detail in @ref{BUGS}.  To subscribe
+send mail to @email{bug-cvs-request@@nongnu.org}.  There is a two-way
+Usenet mirror (posts to the Usenet group are usually sent to the email list and
+vice versa) of @email{bug-cvs@@nongnu.org} named @url{news:gnu.cvs.bug}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden What is CVS not?
address@hidden What is CVS not?
address@hidden What is CVS not?
+
address@hidden can do a lot of things for you, but it does
+not try to be everything for everyone.
+
address@hidden @asis
address@hidden @sc{cvs} is not a build system.
+
+Though the structure of your repository and modules
+file interact with your build system
+(e.g. @file{Makefile}s), they are essentially
+independent.
+
address@hidden does not dictate how you build anything.  It
+merely stores files for retrieval in a tree structure
+you devise.
+
address@hidden does not dictate how to use disk space in the
+checked out working directories.  If you write your
address@hidden or scripts in every directory so they
+have to know the relative positions of everything else,
+you wind up requiring the entire repository to be
+checked out.
+
+If you modularize your work, and construct a build
+system that will share files (via links, mounts,
address@hidden in @file{Makefile}s, etc.), you can
+arrange your disk usage however you like.
+
+But you have to remember that @emph{any} such system is
+a lot of work to construct and maintain.  @sc{cvs} does
+not address the issues involved.
+
+Of course, you should place the tools created to
+support such a build system (scripts, @file{Makefile}s,
+etc) under @sc{cvs}.
+
+Figuring out what files need to be rebuilt when
+something changes is, again, something to be handled
+outside the scope of @sc{cvs}.  One traditional
+approach is to use @code{make} for building, and use
+some automated tool for generating the dependencies which
address@hidden uses.
+
+See @ref{Builds}, for more information on doing builds
+in conjunction with @sc{cvs}.
+
address@hidden @sc{cvs} is not a substitute for management.
+
+Your managers and project leaders are expected to talk
+to you frequently enough to make certain you are aware
+of schedules, merge points, branch names and release
+dates.  If they don't, @sc{cvs} can't help.
+
address@hidden is an instrument for making sources dance to
+your tune.  But you are the piper and the composer.  No
+instrument plays itself or writes its own music.
+
address@hidden @sc{cvs} is not a substitute for developer communication.
+
+When faced with conflicts within a single file, most
+developers manage to resolve them without too much
+effort.  But a more general definition of ``conflict''
+includes problems too difficult to solve without
+communication between developers.
+
address@hidden cannot determine when simultaneous changes
+within a single file, or across a whole collection of
+files, will logically conflict with one another.  Its
+concept of a @dfn{conflict} is purely textual, arising
+when two changes to the same base file are near enough
+to spook the merge (i.e. @code{diff3}) command.
+
address@hidden does not claim to help at all in figuring out
+non-textual or distributed conflicts in program logic.
+
+For example: Say you change the arguments to function
address@hidden defined in file @file{A}.  At the same time,
+someone edits file @file{B}, adding new calls to
+function @code{X} using the old arguments.  You are
+outside the realm of @sc{cvs}'s competence.
+
+Acquire the habit of reading specs and talking to your
+peers.
+
+
address@hidden @sc{cvs} does not have change control
+
+Change control refers to a number of things.  First of
+all it can mean @dfn{bug-tracking}, that is being able
+to keep a database of reported bugs and the status of
+each one (is it fixed?  in what release?  has the bug
+submitter agreed that it is fixed?).  For interfacing
address@hidden to an external bug-tracking system, see the
address@hidden and @file{verifymsg} files
+(@pxref{Administrative files}).
+
+Another aspect of change control is keeping track of
+the fact that changes to several files were in fact
+changed together as one logical change.  If you check
+in several files in a single @code{cvs commit}
+operation, @sc{cvs} then forgets that those files were
+checked in together, and the fact that they have the
+same log message is the only thing tying them
+together.  Keeping a @sc{gnu} style @file{ChangeLog}
+can help somewhat.
address@hidden FIXME: should have an xref to a section which talks
address@hidden more about keeping ChangeLog's with CVS, but that
address@hidden section hasn't been written yet.
+
+Another aspect of change control, in some systems, is
+the ability to keep track of the status of each
+change.  Some changes have been written by a developer,
+others have been reviewed by a second developer, and so
+on.  Generally, the way to do this with @sc{cvs} is to
+generate a diff (using @code{cvs diff} or @code{diff})
+and email it to someone who can then apply it using the
address@hidden utility.  This is very flexible, but
+depends on mechanisms outside @sc{cvs} to make sure
+nothing falls through the cracks.
+
address@hidden @sc{cvs} is not an automated testing program
+
+It should be possible to enforce mandatory use of a
+test suite using the @code{commitinfo} file.  I haven't
+heard a lot about projects trying to do that or whether
+there are subtle gotchas, however.
+
address@hidden @sc{cvs} does not have a built-in process model
+
+Some systems provide ways to ensure that changes or
+releases go through various steps, with various
+approvals as needed.  Generally, one can accomplish
+this with @sc{cvs} but it might be a little more work.
+In some cases you'll want to use the @file{commitinfo},
address@hidden, @file{rcsinfo}, or @file{verifymsg}
+files, to require that certain steps be performed
+before cvs will allow a checkin.  Also consider whether
+features such as branches and tags can be used to
+perform tasks such as doing work in a development tree
+and then merging certain changes over to a stable tree
+only once they have been proven.
address@hidden table
+
address@hidden 
---------------------------------------------------------------------
address@hidden A sample session
address@hidden A sample session
address@hidden Example of a work-session
address@hidden Getting started
address@hidden Work-session, example of
address@hidden tc, Trivial Compiler (example)
address@hidden Trivial Compiler (example)
+
address@hidden I think an example is a pretty good way to start.  But
address@hidden somewhere in here, maybe after the sample session,
address@hidden we need something which is kind of
address@hidden a "roadmap" which is more directed at sketching out
address@hidden the functionality of CVS and pointing people to
address@hidden various other parts of the manual.  As it stands now
address@hidden people who read in order get dumped right into all
address@hidden manner of hair regarding remote repositories,
address@hidden creating a repository, etc.
address@hidden
address@hidden The following was in the old Basic concepts node.  I don't
address@hidden know how good a job it does at introducing modules,
address@hidden or whether they need to be introduced so soon, but
address@hidden something of this sort might go into some
address@hidden introductory material somewhere.
address@hidden
address@hidden Modules (intro)
+The repository contains directories and files, in an
+arbitrary tree.  The @dfn{modules} feature can be used
+to group together a set of directories or files into a
+single entity (@pxref{modules}).  A typical usage is to
+define one module per project.
address@hidden ignore
+
+As a way of introducing @sc{cvs}, we'll go through a
+typical work-session using @sc{cvs}.  The first thing
+to understand is that @sc{cvs} stores all files in a
+centralized @dfn{repository} (@pxref{Repository}); this
+section assumes that a repository is set up.
address@hidden I'm not sure that the sentence concerning the
address@hidden repository quite tells the user what they need to
address@hidden know at this point.  Might need to expand on "centralized"
address@hidden slightly (maybe not here, maybe further down in the example?)
+
+Suppose you are working on a simple compiler.  The source
+consists of a handful of C files and a @file{Makefile}.
+The compiler is called @samp{tc} (Trivial Compiler),
+and the repository is set up so that there is a module
+called @samp{tc}.
+
address@hidden
+* Getting the source::          Creating a workspace
+* Committing your changes::     Making your work available to others
+* Cleaning up::                 Cleaning up
+* Viewing differences::         Viewing differences
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Getting the source
address@hidden Getting the source
address@hidden Getting the source
address@hidden Checking out source
address@hidden Fetching source
address@hidden Source, getting from CVS
address@hidden Checkout, example
+
+The first thing you must do is to get your own working copy of the
+source for @samp{tc}.  For this, you use the @code{checkout} command:
+
address@hidden
+$ cvs checkout tc
address@hidden example
+
address@hidden
+This will create a new directory called @file{tc} and populate it with
+the source files.
+
address@hidden
+$ cd tc
+$ ls
+CVS         Makefile    backend.c   driver.c    frontend.c  parser.c
address@hidden example
+
+The @file{CVS} directory is used internally by
address@hidden  Normally, you should not modify or remove
+any of the files in it.
+
+You start your favorite editor, hack away at @file{backend.c}, and a couple
+of hours later you have added an optimization pass to the compiler.
+A note to @sc{rcs} and @sc{sccs} users: There is no need to lock the files that
+you want to edit.  @xref{Multiple developers}, for an explanation.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Committing your changes
address@hidden Committing your changes
address@hidden Committing changes to files
address@hidden Log message entry
+
+When you have checked that the compiler is still compilable you decide
+to make a new version of @file{backend.c}.  This will
+store your new @file{backend.c} in the repository and
+make it available to anyone else who is using that same
+repository.
+
address@hidden
+$ cvs commit backend.c
address@hidden example
+
address@hidden
address@hidden starts an editor, to allow you to enter a log
+message.  You type in ``Added an optimization pass.'',
+save the temporary file, and exit the editor.
+
address@hidden CVSEDITOR, environment variable
address@hidden EDITOR, environment variable
+The environment variable @code{$CVSEDITOR} determines
+which editor is started.  If @code{$CVSEDITOR} is not
+set, then if the environment variable @code{$EDITOR} is
+set, it will be used. If both @code{$CVSEDITOR} and
address@hidden are not set then there is a default
+which will vary with your operating system, for example
address@hidden for unix or @code{notepad} for Windows
+NT/95.
+
address@hidden VISUAL, environment variable
+In addition, @sc{cvs} checks the @code{$VISUAL} environment
+variable.  Opinions vary on whether this behavior is desirable and
+whether future releases of @sc{cvs} should check @code{$VISUAL} or
+ignore it.  You will be OK either way if you make sure that
address@hidden is either unset or set to the same thing as
address@hidden
+
address@hidden This probably should go into some new node
address@hidden containing detailed info on the editor, rather than
address@hidden the intro.  In fact, perhaps some of the stuff with
address@hidden CVSEDITOR and -m and so on should too.
+When @sc{cvs} starts the editor, it includes a list of
+files which are modified.  For the @sc{cvs} client,
+this list is based on comparing the modification time
+of the file against the modification time that the file
+had when it was last gotten or updated.  Therefore, if
+a file's modification time has changed but its contents
+have not, it will show up as modified.  The simplest
+way to handle this is simply not to worry about it---if
+you proceed with the commit @sc{cvs} will detect that
+the contents are not modified and treat it as an
+unmodified file.  The next @code{update} will clue
address@hidden in to the fact that the file is unmodified,
+and it will reset its stored timestamp so that the file
+will not show up in future editor sessions.
address@hidden FIXCVS: Might be nice if "commit" and other commands
address@hidden would reset that timestamp too, but currently commit
address@hidden doesn't.
address@hidden FIXME: Need to talk more about the process of
address@hidden prompting for the log message.  Like show an example
address@hidden of what it pops up in the editor, for example.  Also
address@hidden a discussion of how to get the "a)bort, c)ontinue,
address@hidden e)dit" prompt and what to do with it.  Might also
address@hidden work in the suggestion that if you want a diff, you
address@hidden should make it before running commit (someone
address@hidden suggested that the diff pop up in the editor.  I'm
address@hidden not sure that is better than telling people to run
address@hidden "cvs diff" first if that is what they want, but if
address@hidden we want to tell people that, the manual possibly
address@hidden should say it).
+
+If you want to avoid
+starting an editor you can specify the log message on
+the command line using the @samp{-m} flag instead, like
+this:
+
address@hidden
+$ cvs commit -m "Added an optimization pass" backend.c
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Cleaning up
address@hidden Cleaning up
address@hidden Cleaning up
address@hidden Working copy, removing
address@hidden Removing your working copy
address@hidden Releasing your working copy
+
+Before you turn to other tasks you decide to remove your working copy of
+tc.  One acceptable way to do that is of course
+
address@hidden
+$ cd ..
+$ rm -r tc
address@hidden example
+
address@hidden
+but a better way is to use the @code{release} command (@pxref{release}):
+
address@hidden
+$ cd ..
+$ cvs release -d tc
+M driver.c
+? tc
+You have [1] altered files in this repository.
+Are you sure you want to release (and delete) directory `tc': n
+** `release' aborted by user choice.
address@hidden example
+
+The @code{release} command checks that all your modifications have been
+committed.  If history logging is enabled it also makes a note in the
+history file.  @xref{history file}.
+
+When you use the @samp{-d} flag with @code{release}, it
+also removes your working copy.
+
+In the example above, the @code{release} command wrote a couple of lines
+of output.  @samp{? tc} means that the file @file{tc} is unknown to @sc{cvs}.
+That is nothing to worry about: @file{tc} is the executable compiler,
+and it should not be stored in the repository.  @xref{cvsignore},
+for information about how to make that warning go away.
address@hidden output}, for a complete explanation of
+all possible output from @code{release}.
+
address@hidden driver.c} is more serious.  It means that the
+file @file{driver.c} has been modified since it was
+checked out.
+
+The @code{release} command always finishes by telling
+you how many modified files you have in your working
+copy of the sources, and then asks you for confirmation
+before deleting any files or making any note in the
+history file.
+
+You decide to play it safe and answer @kbd{n @key{RET}}
+when @code{release} asks for confirmation.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Viewing differences
address@hidden Viewing differences
address@hidden Viewing differences
address@hidden Diff
+
+You do not remember modifying @file{driver.c}, so you want to see what
+has happened to that file.
+
address@hidden
+$ cd tc
+$ cvs diff driver.c
address@hidden example
+
+This command runs @code{diff} to compare the version of @file{driver.c}
+that you checked out with your working copy.  When you see the output
+you remember that you added a command line option that enabled the
+optimization pass.  You check it in, and release the module.
address@hidden FIXME: we haven't yet defined the term "check in".
+
address@hidden
+$ cvs commit -m "Added an optimization pass" driver.c
+Checking in driver.c;
+/usr/local/cvsroot/tc/driver.c,v  <--  driver.c
+new revision: 1.2; previous revision: 1.1
+done
+$ cd ..
+$ cvs release -d tc
+? tc
+You have [0] altered files in this repository.
+Are you sure you want to release (and delete) directory `tc': y
address@hidden example
+
address@hidden 
---------------------------------------------------------------------
address@hidden Repository
address@hidden The Repository
address@hidden Repository (intro)
address@hidden Repository, example
address@hidden Layout of repository
address@hidden Typical repository
address@hidden /usr/local/cvsroot, as example repository
address@hidden cvsroot
+
+The @sc{cvs} @dfn{repository} stores a complete copy of
+all the files and directories which are under version
+control.
+
+Normally, you never access any of the files in the
+repository directly.  Instead, you use @sc{cvs}
+commands to get your own copy of the files into a
address@hidden directory}, and then
+work on that copy.  When you've finished a set of
+changes, you check (or @dfn{commit}) them back into the
+repository.  The repository then contains the changes
+which you have made, as well as recording exactly what
+you changed, when you changed it, and other such
+information.  Note that the repository is not a
+subdirectory of the working directory, or vice versa;
+they should be in separate locations.
address@hidden Need some example, e.g. repository
address@hidden /usr/local/cvsroot; working directory
address@hidden /home/joe/sources.  But this node is too long
address@hidden as it is; need a little reorganization...
+
address@hidden :local:, setting up
address@hidden can access a repository by a variety of
+means.  It might be on the local computer, or it might
+be on a computer across the room or across the world.
+To distinguish various ways to access a repository, the
+repository name can start with an @dfn{access method}.
+For example, the access method @code{:local:} means to
+access a repository directory, so the repository
address@hidden:local:/usr/local/cvsroot} means that the
+repository is in @file{/usr/local/cvsroot} on the
+computer running @sc{cvs}.  For information on other
+access methods, see @ref{Remote repositories}.
+
address@hidden Can se say this more concisely?  Like by passing
address@hidden more of the buck to the Remote repositories node?
+If the access method is omitted, then if the repository
+starts with @samp{/}, then @code{:local:} is
+assumed.  If it does not start with @samp{/} then either
address@hidden:ext:} or @code{:server:} is assumed.  For
+example, if you have a local repository in
address@hidden/usr/local/cvsroot}, you can use
address@hidden/usr/local/cvsroot} instead of
address@hidden:local:/usr/local/cvsroot}.  But if (under
+Windows NT, for example) your local repository is
address@hidden:\src\cvsroot}, then you must specify the access
+method, as in @code{:local:c:/src/cvsroot}.
+
address@hidden This might appear to go in Repository storage, but
address@hidden actually it is describing something which is quite
address@hidden user-visible, when you do a "cvs co CVSROOT".  This
address@hidden isn't necessary the perfect place for that, though.
+The repository is split in two parts.  @file{$CVSROOT/CVSROOT} contains
+administrative files for @sc{cvs}.  The other directories contain the actual
+user-defined modules.
+
address@hidden
+* Specifying a repository::     Telling CVS where your repository is
+* Repository storage::          The structure of the repository
+* Working directory storage::   The structure of working directories
+* Intro administrative files::  Defining modules
+* Multiple repositories::       Multiple repositories
+* Creating a repository::       Creating a repository
+* Backing up::                  Backing up a repository
+* Moving a repository::         Moving a repository
+* Remote repositories::         Accessing repositories on remote machines
+* Read-only access::            Granting read-only access to the repository
+* Server temporary directory::  The server creates temporary directories
address@hidden menu
+
address@hidden Specifying a repository
address@hidden Telling CVS where your repository is
+
+There are several ways to tell @sc{cvs}
+where to find the repository.  You can name the
+repository on the command line explicitly, with the
address@hidden (for "directory") option:
+
address@hidden
+cvs -d /usr/local/cvsroot checkout yoyodyne/tc
address@hidden example
+
address@hidden .profile, setting CVSROOT in
address@hidden .cshrc, setting CVSROOT in
address@hidden .tcshrc, setting CVSROOT in
address@hidden .bashrc, setting CVSROOT in
address@hidden CVSROOT, environment variable
+        Or you can set the @code{$CVSROOT} environment
+variable to an absolute path to the root of the
+repository, @file{/usr/local/cvsroot} in this example.
+To set @code{$CVSROOT}, @code{csh} and @code{tcsh}
+users should have this line in their @file{.cshrc} or
address@hidden files:
+
address@hidden
+setenv CVSROOT /usr/local/cvsroot
address@hidden example
+
address@hidden
address@hidden and @code{bash} users should instead have these lines in their
address@hidden or @file{.bashrc}:
+
address@hidden
+CVSROOT=/usr/local/cvsroot
+export CVSROOT
address@hidden example
+
address@hidden Root file, in CVS directory
address@hidden CVS/Root file
+        A repository specified with @code{-d} will
+override the @code{$CVSROOT} environment variable.
+Once you've checked a working copy out from the
+repository, it will remember where its repository is
+(the information is recorded in the
address@hidden/Root} file in the working copy).
+
+The @code{-d} option and the @file{CVS/Root} file both
+override the @code{$CVSROOT} environment variable.  If
address@hidden option differs from @file{CVS/Root}, the
+former is used.  Of course, for proper operation they
+should be two ways of referring to the same repository.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Repository storage
address@hidden How data is stored in the repository
address@hidden Repository, how data is stored
+
+For most purposes it isn't important @emph{how}
address@hidden stores information in the repository.  In
+fact, the format has changed in the past, and is likely
+to change in the future.  Since in almost all cases one
+accesses the repository via @sc{cvs} commands, such
+changes need not be disruptive.
+
+However, in some cases it may be necessary to
+understand how @sc{cvs} stores data in the repository,
+for example you might need to track down @sc{cvs} locks
+(@pxref{Concurrency}) or you might need to deal with
+the file permissions appropriate for the repository.
+
address@hidden
+* Repository files::            What files are stored in the repository
+* File permissions::            File permissions
+* Windows permissions::         Issues specific to Windows
+* Attic::                       Some files are stored in the Attic
+* CVS in repository::           Additional information in CVS directory
+* Locks::                       CVS locks control concurrent accesses
+* CVSROOT storage::             A few things about CVSROOT are different
address@hidden menu
+
address@hidden Repository files
address@hidden Where files are stored within the repository
+
address@hidden @cindex Filenames, legal
address@hidden @cindex Legal filenames
address@hidden Somewhere we need to say something about legitimate
address@hidden characters in filenames in working directory and
address@hidden repository.  Not "/" (not even on non-unix).  And
address@hidden here is a specific set of issues:
address@hidden  Files starting with a - are handled inconsistently. They can not
address@hidden   be added to a repository with an add command, because it they 
are
address@hidden   interpreted as a switch. They can appear in a repository if 
they are
address@hidden   part of a tree that is imported. They can not be removed from 
the tree
address@hidden   once they are there.
address@hidden Note that "--" *is* supported (as a
address@hidden consequence of using GNU getopt).  Should document
address@hidden this somewhere ("Common options"?).  The other usual technique,
address@hidden "./-foo", isn't as effective, at least for "cvs add"
address@hidden which doesn't support pathnames containing "/".
+
+The overall structure of the repository is a directory
+tree corresponding to the directories in the working
+directory.  For example, supposing the repository is in
+
address@hidden
+/usr/local/cvsroot
address@hidden example
+
address@hidden
+here is a possible directory tree (showing only the
+directories):
+
address@hidden
address@hidden/usr}
+ |
+ address@hidden
+ |   |
+ |   address@hidden
+ |   |    |
+ |   |    address@hidden
+          |      (administrative files)
+          |
+          address@hidden
+          |   |
+          |   address@hidden
+          |   |   (source code to @sc{gnu} diff)
+          |   |
+          |   address@hidden
+          |   |   (source code to @sc{rcs})
+          |   |
+          |   address@hidden
+          |       (source code to @sc{cvs})
+          |
+          address@hidden
+              |
+              address@hidden
+              |    |
+              |    address@hidden
+              |    |
+              |    address@hidden
+              |
+              +--(other Yoyodyne software)
address@hidden example
+
+With the directories are @dfn{history files} for each file
+under version control.  The name of the history file is
+the name of the corresponding file with @samp{,v}
+appended to the end.  Here is what the repository for
+the @file{yoyodyne/tc} directory might look like:
address@hidden FIXME: Should also mention CVS (CVSREP)
address@hidden FIXME? Should we introduce Attic with an xref to
address@hidden Attic?  Not sure whether that is a good idea or not.
address@hidden
+  @code{$CVSROOT}
+    |
+    address@hidden
+    |   |
+    |   address@hidden
+    |   |   |
+            address@hidden,v}
+            address@hidden,v}
+            address@hidden,v}
+            address@hidden,v}
+            address@hidden,v}
+            address@hidden
+            |    |
+            |    address@hidden,v}
+            |
+            address@hidden
+                 |
+                 address@hidden,v}
+                 address@hidden,v}
address@hidden example
+
address@hidden History files
address@hidden RCS history files
address@hidden The first sentence, about what history files
address@hidden contain, is kind of redundant with our intro to what the
address@hidden repository does in node Repository....
+The history files contain, among other things, enough
+information to recreate any revision of the file, a log
+of all commit messages and the user-name of the person
+who committed the revision.  The history files are
+known as @dfn{RCS files}, because the first program to
+store files in that format was a version control system
+known as @sc{rcs}.  For a full
+description of the file format, see the @code{man} page
address@hidden(5)}, distributed with @sc{rcs}, or the
+file @file{doc/RCSFILES} in the @sc{cvs} source
+distribution.  This
+file format has become very common---many systems other
+than @sc{cvs} or @sc{rcs} can at least import history
+files in this format.
address@hidden FIXME: Think about including documentation for this
address@hidden rather than citing it?  In the long run, getting
address@hidden this to be a standard (not sure if we can cope with
address@hidden a standards process as formal as IEEE/ANSI/ISO/etc,
address@hidden though...) is the way to go, so maybe citing is
address@hidden better.
+
+The @sc{rcs} files used in @sc{cvs} differ in a few
+ways from the standard format.  The biggest difference
+is magic branches; for more information see @ref{Magic
+branch numbers}.  Also in @sc{cvs} the valid tag names
+are a subset of what @sc{rcs} accepts; for @sc{cvs}'s
+rules see @ref{Tags}.
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden File permissions
address@hidden File permissions
address@hidden -- Move this to @node Creating a repository or similar
address@hidden Security, file permissions in repository
address@hidden File permissions, general
address@hidden Permissions, general
address@hidden FIXME: we need to somehow reflect "permissions in
address@hidden repository" versus "permissions in working
address@hidden directory" in the index entries.
address@hidden Group, UNIX file permissions, in repository
address@hidden Read-only files, in repository
+All @samp{,v} files are created read-only, and you
+should not change the permission of those files.  The
+directories inside the repository should be writable by
+the persons that have permission to modify the files in
+each directory.  This normally means that you must
+create a UNIX group (see group(5)) consisting of the
+persons that are to edit the files in a project, and
+set up the repository so that it is that group that
+owns the directory.
+(On some systems, you also need to set the set-group-ID-on-execution bit
+on the repository directories (see chmod(1)) so that newly-created files
+and directories get the group-ID of the parent directory rather than
+that of the current process.)
+
address@hidden See also comment in commitinfo node regarding cases
address@hidden which are really awkward with unix groups.
+
+This means that you can only control access to files on
+a per-directory basis.
+
+Note that users must also have write access to check
+out files, because @sc{cvs} needs to create lock files
+(@pxref{Concurrency}).  You can use LockDir in CVSROOT/config
+to put the lock files somewhere other than in the repository
+if you want to allow read-only access to some directories
+(@pxref{config}).
+
address@hidden CVS seems to use CVSUMASK in picking permissions for
address@hidden val-tags, but maybe we should say more about this.
address@hidden Like val-tags gets created by someone who doesn't
address@hidden have CVSUMASK set right?
address@hidden CVSROOT/val-tags file, and read-only access to projects
address@hidden val-tags file, and read-only access to projects
+Also note that users must have write access to the
address@hidden/val-tags} file.  @sc{cvs} uses it to keep
+track of what tags are valid tag names (it is sometimes
+updated when tags are used, as well as when they are
+created).
+
+Each @sc{rcs} file will be owned by the user who last
+checked it in.  This has little significance; what
+really matters is who owns the directories.
+
address@hidden CVSUMASK, environment variable
address@hidden Umask, for repository files
address@hidden tries to set up reasonable file permissions
+for new directories that are added inside the tree, but
+you must fix the permissions manually when a new
+directory should have different permissions than its
+parent directory.  If you set the @code{CVSUMASK}
+environment variable that will control the file
+permissions which @sc{cvs} uses in creating directories
+and/or files in the repository.  @code{CVSUMASK} does
+not affect the file permissions in the working
+directory; such files have the permissions which are
+typical for newly created files, except that sometimes
address@hidden creates them read-only (see the sections on
+watches, @ref{Setting a watch}; -r, @ref{Global
+options}; or @code{CVSREAD}, @ref{Environment variables}).
address@hidden FIXME: Need more discussion of which
address@hidden group should own the file in the repository.
address@hidden Include a somewhat detailed example of the usual
address@hidden case where CVSUMASK is 007, the developers are all
address@hidden in a group, and that group owns stuff in the
address@hidden repository.  Need to talk about group ownership of
address@hidden newly-created directories/files (on some unices,
address@hidden such as SunOS4, setting the setgid bit on the
address@hidden directories will make files inherit the directory's
address@hidden group.  On other unices, your mileage may vary.  I
address@hidden can't remember what POSIX says about this, if
address@hidden anything).
+
+Note that using the client/server @sc{cvs}
+(@pxref{Remote repositories}), there is no good way to
+set @code{CVSUMASK}; the setting on the client machine
+has no effect.  If you are connecting with @code{rsh}, you
+can set @code{CVSUMASK} in @file{.bashrc} or @file{.cshrc}, as
+described in the documentation for your operating
+system.  This behavior might change in future versions
+of @sc{cvs}; do not rely on the setting of
address@hidden on the client having no effect.
address@hidden FIXME: need to explain what a umask is or cite
address@hidden someplace which does.
address@hidden
address@hidden There is also a larger (largely separate) issue
address@hidden about the meaning of CVSUMASK in a non-unix context.
address@hidden For example, whether there is
address@hidden an equivalent which fits better into other
address@hidden protection schemes like POSIX.6, VMS, &c.
address@hidden
address@hidden FIXME: Need one place which discusses this
address@hidden read-only files thing.  Why would one use -r or
address@hidden CVSREAD?  Why would one use watches?  How do they
address@hidden interact?
address@hidden
address@hidden FIXME: We need to state
address@hidden whether using CVSUMASK removes the need for manually
address@hidden fixing permissions (in fact, if we are going to mention
address@hidden manually fixing permission, we better document a lot
address@hidden better just what we mean by "fix").
+
+Using pserver, you will generally need stricter
+permissions on the @sc{cvsroot} directory and
+directories above it in the tree; see @ref{Password
+authentication security}.
+
address@hidden Setuid
address@hidden Setgid
address@hidden Security, setuid
address@hidden Installed images (VMS)
+Some operating systems have features which allow a
+particular program to run with the ability to perform
+operations which the caller of the program could not.
+For example, the set user ID (setuid) or set group ID
+(setgid) features of unix or the installed image
+feature of VMS.  @sc{cvs} was not written to use such
+features and therefore attempting to install @sc{cvs} in
+this fashion will provide protection against only
+accidental lapses; anyone who is trying to circumvent
+the measure will be able to do so, and depending on how
+you have set it up may gain access to more than just
address@hidden  You may wish to instead consider pserver.  It
+shares some of the same attributes, in terms of
+possibly providing a false sense of security or opening
+security holes wider than the ones you are trying to
+fix, so read the documentation on pserver security
+carefully if you are considering this option
+(@ref{Password authentication security}).
+
address@hidden Windows permissions
address@hidden File Permission issues specific to Windows
address@hidden Windows, and permissions
address@hidden File permissions, Windows-specific
address@hidden Permissions, Windows-specific
+
+Some file permission issues are specific to Windows
+operating systems (Windows 95, Windows NT, and
+presumably future operating systems in this family.
+Some of the following might apply to OS/2 but I'm not
+sure).
+
+If you are using local @sc{cvs} and the repository is on a
+networked file system which is served by the Samba SMB
+server, some people have reported problems with
+permissions.  Enabling WRITE=YES in the samba
+configuration is said to fix/workaround it.
+Disclaimer: I haven't investigated enough to know the
+implications of enabling that option, nor do I know
+whether there is something which @sc{cvs} could be doing
+differently in order to avoid the problem.  If you find
+something out, please let us know as described in
address@hidden
+
address@hidden Attic
address@hidden The attic
address@hidden Attic
+
+You will notice that sometimes @sc{cvs} stores an
address@hidden file in the @code{Attic}.  For example, if the
address@hidden is @file{/usr/local/cvsroot} and we are
+talking about the file @file{backend.c} in the
+directory @file{yoyodyne/tc}, then the file normally
+would be in
+
address@hidden
+/usr/local/cvsroot/yoyodyne/tc/backend.c,v
address@hidden example
+
address@hidden
+but if it goes in the attic, it would be in
+
address@hidden
+/usr/local/cvsroot/yoyodyne/tc/Attic/backend.c,v
address@hidden example
+
address@hidden
address@hidden Dead state
+instead.  It should not matter from a user point of
+view whether a file is in the attic; @sc{cvs} keeps
+track of this and looks in the attic when it needs to.
+But in case you want to know, the rule is that the RCS
+file is stored in the attic if and only if the head
+revision on the trunk has state @code{dead}.  A
address@hidden state means that file has been removed, or
+never added, for that revision.  For example, if you
+add a file on a branch, it will have a trunk revision
+in @code{dead} state, and a branch revision in a
address@hidden state.
address@hidden Probably should have some more concrete examples
address@hidden here, or somewhere (not sure exactly how we should
address@hidden arrange the discussion of the dead state, versus
address@hidden discussion of the attic).
+
address@hidden CVS in repository
address@hidden The CVS directory in the repository
address@hidden CVS directory, in repository
+
+The @file{CVS} directory in each repository directory
+contains information such as file attributes (in a file
+called @file{CVS/fileattr}.  In the
+future additional files may be added to this directory,
+so implementations should silently ignore additional
+files.
+
+This behavior is implemented only by @sc{cvs} 1.7 and
+later; for details see @ref{Watches Compatibility}.
+
+The format of the @file{fileattr} file is a series of entries
+of the following form (where @address@hidden and @address@hidden
+means the text between the braces can be repeated zero
+or more times):
+
address@hidden @var{filename} <tab> @var{attrname} = @var{attrval}
+  @{; @var{attrname} = @address@hidden <linefeed>
+
address@hidden is @samp{F} for a file, in which case the entry specifies the
+attributes for that file.
+
address@hidden is @samp{D},
+and @var{filename} empty, to specify default attributes
+to be used for newly added files.
+
+Other @var{ent-type} are reserved for future expansion.  @sc{cvs} 1.9 and older
+will delete them any time it writes file attributes.
address@hidden 1.10 and later will preserve them.
+
+Note that the order of the lines is not significant;
+a program writing the fileattr file may
+rearrange them at its convenience.
+
+There is currently no way of quoting tabs or line feeds in the
+filename, @samp{=} in @var{attrname},
address@hidden;} in @var{attrval}, etc.  Note: some implementations also
+don't handle a NUL character in any of the fields, but
+implementations are encouraged to allow it.
+
+By convention, @var{attrname} starting with @samp{_} is for an attribute given
+special meaning by @sc{cvs}; other @var{attrname}s are for user-defined 
attributes
+(or will be, once implementations start supporting user-defined attributes).
+
+Built-in attributes:
+
address@hidden @code
address@hidden _watched
+Present means the file is watched and should be checked out
+read-only.
+
address@hidden _watchers
+Users with watches for this file.  Value is
address@hidden > @var{type} @{ , @var{watcher} > @var{type} @}
+where @var{watcher} is a username, and @var{type}
+is zero or more of edit,unedit,commit separated by
address@hidden (that is, nothing if none; there is no "none" or "all" keyword).
+
address@hidden _editors
+Users editing this file.  Value is
address@hidden > @var{val} @{ , @var{editor} > @var{val} @}
+where @var{editor} is a username, and @var{val} is
address@hidden@address@hidden, where
address@hidden is when the @code{cvs edit} command (or
+equivalent) happened,
+and @var{hostname} and @var{pathname} are for the working directory.
address@hidden table
+
+Example:
+
address@hidden FIXME: sanity.sh should contain a similar test case
address@hidden so we can compare this example from something from
address@hidden Real Life(TM).  See cvsclient.texi (under Notify) for more
address@hidden discussion of the date format of _editors.
address@hidden
+Ffile1 _watched=;_watchers=joe>edit,mary>commit
+Ffile2 _watched=;_editors=sue>8 Jan 1975+workstn1+/home/sue/cvs
+D _watched=
address@hidden example
+
address@hidden
+means that the file @file{file1} should be checked out
+read-only.  Furthermore, joe is watching for edits and
+mary is watching for commits.  The file @file{file2}
+should be checked out read-only; sue started editing it
+on 8 Jan 1975 in the directory @file{/home/sue/cvs} on
+the machine @code{workstn1}.  Future files which are
+added should be checked out read-only.  To represent
+this example here, we have shown a space after
address@hidden, @samp{Ffile1}, and @samp{Ffile2}, but in fact
+there must be a single tab character there and no spaces.
+
address@hidden Locks
address@hidden CVS locks in the repository
+
address@hidden #cvs.rfl, technical details
address@hidden #cvs.pfl, technical details
address@hidden #cvs.wfl, technical details
address@hidden #cvs.lock, technical details
address@hidden Locks, cvs, technical details
+For an introduction to @sc{cvs} locks focusing on
+user-visible behavior, see @ref{Concurrency}.  The
+following section is aimed at people who are writing
+tools which want to access a @sc{cvs} repository without
+interfering with other tools accessing the same
+repository.  If you find yourself confused by concepts
+described here, like @dfn{read lock}, @dfn{write lock},
+and @dfn{deadlock}, you might consult the literature on
+operating systems or databases.
+
address@hidden #cvs.tfl
+Any file in the repository with a name starting
+with @file{#cvs.rfl.} is a read lock.  Any file in
+the repository with a name starting with
address@hidden is a promotable read lock.  Any file in
+the repository with a name starting with
address@hidden is a write lock.  Old versions of @sc{cvs}
+(before @sc{cvs} 1.5) also created files with names starting
+with @file{#cvs.tfl}, but they are not discussed here.
+The directory @file{#cvs.lock} serves as a master
+lock.  That is, one must obtain this lock first before
+creating any of the other locks.
+
+To obtain a read lock, first create the @file{#cvs.lock}
+directory.  This operation must be atomic (which should
+be true for creating a directory under most operating
+systems).  If it fails because the directory already
+existed, wait for a while and try again.  After
+obtaining the @file{#cvs.lock} lock, create a file
+whose name is @file{#cvs.rfl.} followed by information
+of your choice (for example, hostname and process
+identification number).  Then remove the
address@hidden directory to release the master lock.
+Then proceed with reading the repository.  When you are
+done, remove the @file{#cvs.rfl} file to release the
+read lock.
+
+Promotable read locks are a concept you may not find in other literature on
+concurrency.  They are used to allow a two (or more) pass process to only lock
+a file for read on the first (read) pass(es), then upgrade its read locks to
+write locks if necessary for a final pass, still assured that the files have
+not changed since they were first read.  @sc{cvs} uses promotable read locks,
+for example, to prevent commit and tag verification passes from interfering
+with other reading processes.  It can then lock only a single directory at a
+time for write during the write pass.
+
+To obtain a promotable read lock, first create the @file{#cvs.lock} directory,
+as with a non-promotable read lock.  Then check
+that there are no files that start with
address@hidden  If there are, remove the master @file{#cvs.lock} directory,
+wait awhile (CVS waits 30 seconds between lock attempts), and try again.  If
+there are no other promotable locks, go ahead and create a file whose name is
address@hidden followed by information of your choice (for example, CVS uses
+its hostname and the process identification number of the CVS server process
+creating the lock).  If versions of @sc{cvs} older than version 1.12.4 access
+your repository directly (not via a @sc{cvs} server of version 1.12.4 or
+later), then you should also create a read lock since older versions of CVS
+will ignore the promotable lock when attempting to create their own write lock.
+Then remove the master @file{#cvs.lock} directory in order to allow other
+processes to obtain read locks.
+
+To obtain a write lock, first create the
address@hidden directory, as with read locks.  Then
+check that there are no files whose names start with
address@hidden and no files whose names start with @file{#cvs.pfl} that are
+not owned by the process attempting to get the write lock.  If either exist,
+remove @file{#cvs.lock}, wait for a while, and try again.  If
+there are no readers or promotable locks from other processes, then create a
+file whose name is @file{#cvs.wfl} followed by information of your choice
+(again, CVS uses the hostname and server process identification
+number).  Remove your @file{#cvs.pfl} file if present.  Hang on to the
address@hidden lock.  Proceed
+with writing the repository.  When you are done, first
+remove the @file{#cvs.wfl} file and then the
address@hidden directory. Note that unlike the
address@hidden file, the @file{#cvs.wfl} file is just
+informational; it has no effect on the locking operation
+beyond what is provided by holding on to the
address@hidden lock itself.
+
+Note that each lock (write lock or read lock) only locks
+a single directory in the repository, including
address@hidden and @file{CVS} but not including
+subdirectories which represent other directories under
+version control.  To lock an entire tree, you need to
+lock each directory (note that if you fail to obtain
+any lock you need, you must release the whole tree
+before waiting and trying again, to avoid deadlocks).
+
+Note also that @sc{cvs} expects write locks to control
+access to individual @file{foo,v} files.  @sc{rcs} has
+a scheme where the @file{,foo,} file serves as a lock,
+but @sc{cvs} does not implement it and so taking out a
address@hidden write lock is recommended.  See the comments at
+rcs_internal_lockfile in the @sc{cvs} source code for
+further discussion/rationale.
+
address@hidden CVSROOT storage
address@hidden How files are stored in the CVSROOT directory
address@hidden CVSROOT, storage of files
+
+The @file{$CVSROOT/CVSROOT} directory contains the
+various administrative files.  In some ways this
+directory is just like any other directory in the
+repository; it contains @sc{rcs} files whose names end
+in @samp{,v}, and many of the @sc{cvs} commands operate
+on it the same way.  However, there are a few
+differences.
+
+For each administrative file, in addition to the
address@hidden file, there is also a checked out copy of the
+file.  For example, there is an @sc{rcs} file
address@hidden,v} and a file @file{loginfo} which
+contains the latest revision contained in
address@hidden,v}.  When you check in an administrative
+file, @sc{cvs} should print
+
address@hidden
+cvs commit: Rebuilding administrative file database
address@hidden example
+
address@hidden
+and update the checked out copy in
address@hidden/CVSROOT}.  If it does not, there is
+something wrong (@pxref{BUGS}).  To add your own files
+to the files to be updated in this fashion, you can add
+them to the @file{checkoutlist} administrative file
+(@pxref{checkoutlist}).
+
address@hidden modules.db
address@hidden modules.pag
address@hidden modules.dir
+By default, the @file{modules} file behaves as
+described above.  If the modules file is very large,
+storing it as a flat text file may make looking up
+modules slow (I'm not sure whether this is as much of a
+concern now as when @sc{cvs} first evolved this
+feature; I haven't seen benchmarks).  Therefore, by
+making appropriate edits to the @sc{cvs} source code
+one can store the modules file in a database which
+implements the @code{ndbm} interface, such as Berkeley
+db or GDBM.  If this option is in use, then the modules
+database will be stored in the files @file{modules.db},
address@hidden, and/or @file{modules.dir}.
address@hidden I think fileattr also will use the database stuff.
address@hidden Anything else?
+
+For information on the meaning of the various
+administrative files, see @ref{Administrative files}.
+
address@hidden Working directory storage
address@hidden How data is stored in the working directory
+
address@hidden FIXME: Somewhere we should discuss timestamps (test
address@hidden case "stamps" in sanity.sh).  But not here.  Maybe
address@hidden in some kind of "working directory" chapter which
address@hidden would encompass the "Builds" one?  But I'm not sure
address@hidden whether that is a good organization (is it based on
address@hidden what the user wants to do?).
+
address@hidden CVS directory, in working directory
+While we are discussing @sc{cvs} internals which may
+become visible from time to time, we might as well talk
+about what @sc{cvs} puts in the @file{CVS} directories
+in the working directories.  As with the repository,
address@hidden handles this information and one can usually
+access it via @sc{cvs} commands.  But in some cases it
+may be useful to look at it, and other programs, such
+as the @code{jCVS} graphical user interface or the
address@hidden package for emacs, may need to look at it.
+Such programs should follow the recommendations in this
+section if they hope to be able to work with other
+programs which use those files, including future
+versions of the programs just mentioned and the
+command-line @sc{cvs} client.
+
+The @file{CVS} directory contains several files.
+Programs which are reading this directory should
+silently ignore files which are in the directory but
+which are not documented here, to allow for future
+expansion.
+
+The files are stored according to the text file
+convention for the system in question.  This means that
+working directories are not portable between systems
+with differing conventions for storing text files.
+This is intentional, on the theory that the files being
+managed by @sc{cvs} probably will not be portable between
+such systems either.
+
address@hidden @file
address@hidden Root
+This file contains the current @sc{cvs} root, as
+described in @ref{Specifying a repository}.
+
address@hidden Repository file, in CVS directory
address@hidden CVS/Repository file
address@hidden Repository
+This file contains the directory within the repository
+which the current directory corresponds with.  It can
+be either an absolute pathname or a relative pathname;
address@hidden has had the ability to read either format
+since at least version 1.3 or so.  The relative
+pathname is relative to the root, and is the more
+sensible approach, but the absolute pathname is quite
+common and implementations should accept either.  For
+example, after the command
+
address@hidden
+cvs -d :local:/usr/local/cvsroot checkout yoyodyne/tc
address@hidden example
+
address@hidden
address@hidden will contain
+
address@hidden
+:local:/usr/local/cvsroot
address@hidden example
+
address@hidden
+and @file{Repository} will contain either
+
address@hidden
+/usr/local/cvsroot/yoyodyne/tc
address@hidden example
+
address@hidden
+or
+
address@hidden
+yoyodyne/tc
address@hidden example
+
+If the particular working directory does not correspond
+to a directory in the repository, then @file{Repository}
+should contain @file{CVSROOT/Emptydir}.
address@hidden Emptydir, in CVSROOT directory
address@hidden CVSROOT/Emptydir directory
+
address@hidden Entries file, in CVS directory
address@hidden CVS/Entries file
address@hidden Entries
+This file lists the files and directories in the
+working directory.
+The first character of each line indicates what sort of
+line it is.  If the character is unrecognized, programs
+reading the file should silently skip that line, to
+allow for future expansion.
+
+If the first character is @samp{/}, then the format is:
+
address@hidden
+/@var{name}/@var{revision}/@address@hidden/@var{options}/@var{tagdate}
address@hidden example
+
address@hidden
+where @samp{[} and @samp{]} are not part of the entry,
+but instead indicate that the @samp{+} and conflict
+marker are optional.  @var{name} is the name of the
+file within the directory.  @var{revision} is the
+revision that the file in the working derives from, or
address@hidden for an added file, or @samp{-} followed by a
+revision for a removed file.  @var{timestamp} is the
+timestamp of the file at the time that @sc{cvs} created
+it; if the timestamp differs with the actual
+modification time of the file it means the file has
+been modified.  It is stored in
+the format used by the ISO C asctime() function (for
+example, @samp{Sun Apr  7 01:29:26 1996}).  One may
+write a string which is not in that format, for
+example, @samp{Result of merge}, to indicate that the
+file should always be considered to be modified.  This
+is not a special case; to see whether a file is
+modified a program should take the timestamp of the file
+and simply do a string compare with @var{timestamp}.
+If there was a conflict, @var{conflict} can be set to
+the modification time of the file after the file has been
+written with conflict markers (@pxref{Conflicts example}).
+Thus if @var{conflict} is subsequently the same as the actual
+modification time of the file it means that the user
+has obviously not resolved the conflict.  @var{options}
+contains sticky options (for example @samp{-kb} for a
+binary file).  @var{tagdate} contains @samp{T} followed
+by a tag name, or @samp{D} for a date, followed by a
+sticky tag or date.  Note that if @var{timestamp}
+contains a pair of timestamps separated by a space,
+rather than a single timestamp, you are dealing with a
+version of @sc{cvs} earlier than @sc{cvs} 1.5 (not
+documented here).
+
+The timezone on the timestamp in CVS/Entries (local or
+universal) should be the same as the operating system
+stores for the timestamp of the file itself.  For
+example, on Unix the file's timestamp is in universal
+time (UT), so the timestamp in CVS/Entries should be
+too.  On @sc{vms}, the file's timestamp is in local
+time, so @sc{cvs} on @sc{vms} should use local time.
+This rule is so that files do not appear to be modified
+merely because the timezone changed (for example, to or
+from summer time).
address@hidden See comments and calls to gmtime() and friends in
address@hidden src/vers_ts.c (function time_stamp).
+
+If the first character of a line in @file{Entries} is
address@hidden, then it indicates a subdirectory.  @samp{D}
+on a line all by itself indicates that the program
+which wrote the @file{Entries} file does record
+subdirectories (therefore, if there is such a line and
+no other lines beginning with @samp{D}, one knows there
+are no subdirectories).  Otherwise, the line looks
+like:
+
address@hidden
+D/@var{name}/@var{filler1}/@var{filler2}/@var{filler3}/@var{filler4}
address@hidden example
+
address@hidden
+where @var{name} is the name of the subdirectory, and
+all the @var{filler} fields should be silently ignored,
+for future expansion.  Programs which modify
address@hidden files should preserve these fields.
+
+The lines in the @file{Entries} file can be in any order.
+
address@hidden Entries.Log file, in CVS directory
address@hidden CVS/Entries.Log file
address@hidden Entries.Log
+This file does not record any information beyond that
+in @file{Entries}, but it does provide a way to update
+the information without having to rewrite the entire
address@hidden file, including the ability to preserve
+the information even if the program writing
address@hidden and @file{Entries.Log} abruptly aborts.
+Programs which are reading the @file{Entries} file
+should also check for @file{Entries.Log}.  If the latter
+exists, they should read @file{Entries} and then apply
+the changes mentioned in @file{Entries.Log}.  After
+applying the changes, the recommended practice is to
+rewrite @file{Entries} and then delete @file{Entries.Log}.
+The format of a line in @file{Entries.Log} is a single
+character command followed by a space followed by a
+line in the format specified for a line in
address@hidden  The single character command is
address@hidden to indicate that the entry is being added,
address@hidden to indicate that the entry is being removed,
+or any other character to indicate that the entire line
+in @file{Entries.Log} should be silently ignored (for
+future expansion).  If the second character of the line
+in @file{Entries.Log} is not a space, then it was
+written by an older version of @sc{cvs} (not documented
+here).
+
+Programs which are writing rather than reading can
+safely ignore @file{Entries.Log} if they so choose.
+
address@hidden Entries.Backup file, in CVS directory
address@hidden CVS/Entries.Backup file
address@hidden Entries.Backup
+This is a temporary file.  Recommended usage is to
+write a new entries file to @file{Entries.Backup}, and
+then to rename it (atomically, where possible) to @file{Entries}.
+
address@hidden Entries.Static file, in CVS directory
address@hidden CVS/Entries.Static file
address@hidden Entries.Static
+The only relevant thing about this file is whether it
+exists or not.  If it exists, then it means that only
+part of a directory was gotten and @sc{cvs} will
+not create additional files in that directory.  To
+clear it, use the @code{update} command with the
address@hidden option, which will get the additional files
+and remove @file{Entries.Static}.
address@hidden FIXME: This needs to be better documented, in places
address@hidden other than Working Directory Storage.
address@hidden FIXCVS: The fact that this setting exists needs to
address@hidden be more visible to the user.  For example "cvs
address@hidden status foo", in the case where the file would be
address@hidden gotten except for Entries.Static, might say
address@hidden something to distinguish this from other cases.
address@hidden One thing that periodically gets suggested is to
address@hidden have "cvs update" print something when it skips
address@hidden files due to Entries.Static, but IMHO that kind of
address@hidden noise pretty much makes the Entries.Static feature
address@hidden useless.
+
address@hidden Tag file, in CVS directory
address@hidden CVS/Tag file
address@hidden Sticky tags/dates, per-directory
address@hidden Per-directory sticky tags/dates
address@hidden Tag
+This file contains per-directory sticky tags or dates.
+The first character is @samp{T} for a branch tag,
address@hidden for a non-branch tag, or @samp{D} for a date,
+or another character to mean the file should be
+silently ignored, for future expansion.  This character
+is followed by the tag or date.  Note that
+per-directory sticky tags or dates are used for things
+like applying to files which are newly added; they
+might not be the same as the sticky tags or dates on
+individual files.  For general information on sticky
+tags and dates, see @ref{Sticky tags}.
address@hidden FIXME: This needs to be much better documented,
address@hidden preferably not in the context of "working directory
address@hidden storage".
address@hidden FIXME: The Sticky tags node needs to discuss, or xref to
address@hidden someplace which discusses, per-directory sticky
address@hidden tags and the distinction with per-file sticky tags.
+
address@hidden Notify file, in CVS directory
address@hidden CVS/Notify file
address@hidden Notify
+This file stores notifications (for example, for
address@hidden or @code{unedit}) which have not yet been
+sent to the server.  Its format is not yet documented
+here.
+
address@hidden Notify.tmp file, in CVS directory
address@hidden CVS/Notify.tmp file
address@hidden Notify.tmp
+This file is to @file{Notify} as @file{Entries.Backup}
+is to @file{Entries}.  That is, to write @file{Notify},
+first write the new contents to @file{Notify.tmp} and
+then (atomically where possible), rename it to
address@hidden
+
address@hidden Base directory, in CVS directory
address@hidden CVS/Base directory
address@hidden Base
+If watches are in use, then an @code{edit} command
+stores the original copy of the file in the @file{Base}
+directory.  This allows the @code{unedit} command to
+operate even if it is unable to communicate with the
+server.
+
address@hidden Baserev file, in CVS directory
address@hidden CVS/Baserev file
address@hidden Baserev
+The file lists the revision for each of the files in
+the @file{Base} directory.  The format is:
+
address@hidden
address@hidden/@var{rev}/@var{expansion}
address@hidden example
+
address@hidden
+where @var{expansion} should be ignored, to allow for
+future expansion.
+
address@hidden Baserev.tmp file, in CVS directory
address@hidden CVS/Baserev.tmp file
address@hidden Baserev.tmp
+This file is to @file{Baserev} as @file{Entries.Backup}
+is to @file{Entries}.  That is, to write @file{Baserev},
+first write the new contents to @file{Baserev.tmp} and
+then (atomically where possible), rename it to
address@hidden
+
address@hidden Template file, in CVS directory
address@hidden CVS/Template file
address@hidden Template
+This file contains the template specified by the
address@hidden file (@pxref{rcsinfo}).  It is only used
+by the client; the non-client/server @sc{cvs} consults
address@hidden directly.
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Intro administrative files
address@hidden The administrative files
address@hidden Administrative files (intro)
address@hidden Modules file
address@hidden CVSROOT, module name
address@hidden Defining modules (intro)
+
address@hidden FIXME: this node should be reorganized into "general
address@hidden information about admin files" and put the "editing
address@hidden admin files" stuff up front rather than jumping into
address@hidden the details of modules right away.  Then the
address@hidden Administrative files node can go away, the information
address@hidden on each admin file distributed to a place appropriate
address@hidden to its function, and this node can contain a table
address@hidden listing each file and a @ref to its detailed description.
+
+The directory @file{$CVSROOT/CVSROOT} contains some @dfn{administrative
+files}.  @xref{Administrative files}, for a complete description.
+You can use @sc{cvs} without any of these files, but
+some commands work better when at least the
address@hidden file is properly set up.
+
+The most important of these files is the @file{modules}
+file.  It defines all modules in the repository.  This
+is a sample @file{modules} file.
+
address@hidden FIXME: The CVSROOT line is a goofy example now that
address@hidden mkmodules doesn't exist.
address@hidden
+CVSROOT         CVSROOT
+modules         CVSROOT modules
+cvs             gnu/cvs
+rcs             gnu/rcs
+diff            gnu/diff
+tc              yoyodyne/tc
address@hidden example
+
+The @file{modules} file is line oriented.  In its
+simplest form each line contains the name of the
+module, whitespace, and the directory where the module
+resides.  The directory is a path relative to
address@hidden  The last four lines in the example
+above are examples of such lines.
+
address@hidden FIXME: might want to introduce the concept of options in modules 
file
address@hidden (the old example which was here, -i mkmodules, is obsolete).
+
+The line that defines the module called @samp{modules}
+uses features that are not explained here.
address@hidden, for a full explanation of all the
+available features.
+
address@hidden FIXME: subsection without node is bogus
address@hidden Editing administrative files
address@hidden Editing administrative files
address@hidden Administrative files, editing them
+
+You edit the administrative files in the same way that you would edit
+any other module.  Use @samp{cvs checkout CVSROOT} to get a working
+copy, edit it, and commit your changes in the normal way.
+
+It is possible to commit an erroneous administrative
+file.  You can often fix the error and check in a new
+revision, but sometimes a particularly bad error in the
+administrative file makes it impossible to commit new
+revisions.
address@hidden @xref{Bad administrative files} for a hint
address@hidden about how to solve such situations.
address@hidden -- administrative file checking--
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Multiple repositories
address@hidden Multiple repositories
address@hidden Multiple repositories
address@hidden Repositories, multiple
address@hidden Many repositories
address@hidden Parallel repositories
address@hidden Disjoint repositories
address@hidden CVSROOT, multiple repositories
+
+In some situations it is a good idea to have more than
+one repository, for instance if you have two
+development groups that work on separate projects
+without sharing any code.  All you have to do to have
+several repositories is to specify the appropriate
+repository, using the @code{CVSROOT} environment
+variable, the @samp{-d} option to @sc{cvs}, or (once
+you have checked out a working directory) by simply
+allowing @sc{cvs} to use the repository that was used
+to check out the working directory
+(@pxref{Specifying a repository}).
+
+The big advantage of having multiple repositories is
+that they can reside on different servers.  With @sc{cvs}
+version 1.10, a single command cannot recurse into
+directories from different repositories.  With development
+versions of @sc{cvs}, you can check out code from multiple
+servers into your working directory.  @sc{cvs} will
+recurse and handle all the details of making
+connections to as many server machines as necessary to
+perform the requested command.  Here is an example of
+how to set up a working directory:
+
address@hidden
+cvs -d server1:/cvs co dir1
+cd dir1
+cvs -d server2:/root co sdir
+cvs update
address@hidden example
+
+The @code{cvs co} commands set up the working
+directory, and then the @code{cvs update} command will
+contact server2, to update the dir1/sdir subdirectory,
+and server1, to update everything else.
+
address@hidden FIXME: Does the FAQ have more about this?  I have a
address@hidden dim recollection, but I'm too lazy to check right now.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Creating a repository
address@hidden Creating a repository
+
address@hidden Repository, setting up
address@hidden Creating a repository
address@hidden Setting up a repository
+
+This section describes how to set up a @sc{cvs} repository for any
+sort of access method.  After completing the setup described in this
+section, you should be able to access your @sc{cvs} repository immediately
+via the local access method and several remote access methods.  For
+more information on setting up remote access to the repository you create
+in this section, please read the section on @xref{Remote repositories}.
+
+To set up a @sc{cvs} repository, first choose the
+machine and disk on which you want to store the
+revision history of the source files.  CPU and memory
+requirements are modest, so most machines should be
+adequate.  For details see @ref{Server requirements}.
address@hidden Possible that we should be providing a quick rule of
address@hidden thumb, like the 32M memory for the server.  That
address@hidden might increase the number of people who are happy
address@hidden with the answer, without following the xref.
+
+To estimate disk space
+requirements, if you are importing RCS files from
+another system, the size of those files is the
+approximate initial size of your repository, or if you
+are starting without any version history, a rule of
+thumb is to allow for the server approximately three
+times the size of the code to be under @sc{cvs} for the
+repository (you will eventually outgrow this, but not
+for a while).  On the machines on which the developers
+will be working, you'll want disk space for
+approximately one working directory for each developer
+(either the entire tree or a portion of it, depending
+on what each developer uses).
+
+The repository should be accessible
+(directly or via a networked file system) from all
+machines which want to use @sc{cvs} in server or local
+mode; the client machines need not have any access to
+it other than via the @sc{cvs} protocol.  It is not
+possible to use @sc{cvs} to read from a repository
+which one only has read access to; @sc{cvs} needs to be
+able to create lock files (@pxref{Concurrency}).
+
address@hidden init (subcommand)
+To create a repository, run the @code{cvs init}
+command.  It will set up an empty repository in the
address@hidden root specified in the usual way
+(@pxref{Repository}).  For example,
+
address@hidden
+cvs -d /usr/local/cvsroot init
address@hidden example
+
address@hidden init} is careful to never overwrite any
+existing files in the repository, so no harm is done if
+you run @code{cvs init} on an already set-up
+repository.
+
address@hidden init} will enable history logging; if you
+don't want that, remove the history file after running
address@hidden init}.  @xref{history file}.
+
address@hidden Backing up
address@hidden Backing up a repository
address@hidden Repository, backing up
address@hidden Backing up, repository
+
+There is nothing particularly magical about the files
+in the repository; for the most part it is possible to
+back them up just like any other files.  However, there
+are a few issues to consider.
+
address@hidden Locks, cvs, and backups
address@hidden #cvs.rfl, and backups
+The first is that to be paranoid, one should either not
+use @sc{cvs} during the backup, or have the backup
+program lock @sc{cvs} while doing the backup.  To not
+use @sc{cvs}, you might forbid logins to machines which
+can access the repository, turn off your @sc{cvs}
+server, or similar mechanisms.  The details would
+depend on your operating system and how you have
address@hidden set up.  To lock @sc{cvs}, you would create
address@hidden locks in each repository directory.
+See @ref{Concurrency}, for more on @sc{cvs} locks.
+Having said all this, if you just back up without any
+of these precautions, the results are unlikely to be
+particularly dire.  Restoring from backup, the
+repository might be in an inconsistent state, but this
+would not be particularly hard to fix manually.
+
+When you restore a repository from backup, assuming
+that changes in the repository were made after the time
+of the backup, working directories which were not
+affected by the failure may refer to revisions which no
+longer exist in the repository.  Trying to run @sc{cvs}
+in such directories will typically produce an error
+message.  One way to get those changes back into the
+repository is as follows:
+
address@hidden @bullet
address@hidden
+Get a new working directory.
+
address@hidden
+Copy the files from the working directory from before
+the failure over to the new working directory (do not
+copy the contents of the @file{CVS} directories, of
+course).
+
address@hidden
+Working in the new working directory, use commands such
+as @code{cvs update} and @code{cvs diff} to figure out
+what has changed, and then when you are ready, commit
+the changes into the repository.
address@hidden itemize
+
address@hidden Moving a repository
address@hidden Moving a repository
address@hidden Repository, moving
address@hidden Moving a repository
address@hidden Copying a repository
+
+Just as backing up the files in the repository is
+pretty much like backing up any other files, if you
+need to move a repository from one place to another it
+is also pretty much like just moving any other
+collection of files.
+
+The main thing to consider is that working directories
+point to the repository.  The simplest way to deal with
+a moved repository is to just get a fresh working
+directory after the move.  Of course, you'll want to
+make sure that the old working directory had been
+checked in before the move, or you figured out some
+other way to make sure that you don't lose any
+changes.  If you really do want to reuse the existing
+working directory, it should be possible with manual
+surgery on the @file{CVS/Repository} files.  You can
+see @ref{Working directory storage}, for information on
+the @file{CVS/Repository} and @file{CVS/Root} files, but
+unless you are sure you want to bother, it probably
+isn't worth it.
address@hidden FIXME: Surgery on CVS/Repository should be avoided
address@hidden by making RELATIVE_REPOS the default.
address@hidden FIXME-maybe: might want some documented way to
address@hidden change the CVS/Root files in some particular tree.
address@hidden But then again, I don't know, maybe just having
address@hidden people do this in perl/shell/&c isn't so bad...
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Remote repositories
address@hidden Remote repositories
address@hidden Repositories, remote
address@hidden Remote repositories
address@hidden Client/Server Operation
address@hidden Server, CVS
address@hidden Remote repositories, port specification
address@hidden Repositories, remote, port specification
address@hidden Client/Server Operation, port specification
address@hidden pserver (client/server connection method), port specification
address@hidden kserver (client/server connection method), port specification
address@hidden gserver (client/server connection method), port specification
address@hidden port, specifying for remote repositories
+
+        Your working copy of the sources can be on a
+different machine than the repository.  Using @sc{cvs}
+in this manner is known as @dfn{client/server}
+operation.  You run @sc{cvs} on a machine which can
+mount your working directory, known as the
address@hidden, and tell it to communicate to a machine
+which can mount the repository, known as the
address@hidden  Generally, using a remote
+repository is just like using a local one, except that
+the format of the repository name is:
+
address@hidden
+[:@var{method}:address@hidden:@var{password}]@@address@hidden:address@hidden/path/to/repository
address@hidden example
+
+Specifying a password in the repository name is not recommended during
+checkout, since this will cause @sc{cvs} to store a cleartext copy of the
+password in each created directory.  @code{cvs login} first instead
+(@pxref{Password authentication client}).
+
+The details of exactly what needs to be set up depend
+on how you are connecting to the server.
+
address@hidden Should we try to explain which platforms are which?
address@hidden Platforms like unix and VMS, which only allow
address@hidden privileged programs to bind to sockets <1024 lose on
address@hidden :server:
address@hidden Platforms like Mac and VMS, whose rsh program is
address@hidden unusable or nonexistent, lose on :ext:
address@hidden Platforms like OS/2 and NT probably could plausibly
address@hidden default either way (modulo -b troubles).
+
address@hidden
+* Server requirements::         Memory and other resources for servers
+* The connection method::       Connection methods and method options
+* Connecting via rsh::          Using the @code{rsh} program to connect
+* Password authenticated::      Direct connections using passwords
+* GSSAPI authenticated::        Direct connections using GSSAPI
+* Kerberos authenticated::      Direct connections with Kerberos
+* Connecting via fork::         Using a forked @code{cvs server} to connect
+* Write proxies::               Distributing load across several CVS servers
address@hidden menu
+
address@hidden Server requirements
address@hidden Server requirements
+
+The quick answer to what sort of machine is suitable as
+a server is that requirements are modest---a server
+with 32M of memory or even less can handle a fairly
+large source tree with a fair amount of activity.
address@hidden Say something about CPU speed too?  I'm even less sure
address@hidden what to say on that subject...
+
+The real answer, of course, is more complicated.
+Estimating the known areas of large memory consumption
+should be sufficient to estimate memory requirements.
+There are two such areas documented here; other memory
+consumption should be small by comparison (if you find
+that is not the case, let us know, as described in
address@hidden, so we can update this documentation).
+
+The first area of big memory consumption is large
+checkouts, when using the @sc{cvs} server.  The server
+consists of two processes for each client that it is
+serving.  Memory consumption on the child process
+should remain fairly small.  Memory consumption on the
+parent process, particularly if the network connection
+to the client is slow, can be expected to grow to
+slightly more than the size of the sources in a single
+directory, or two megabytes, whichever is larger.
address@hidden "two megabytes" of course is SERVER_HI_WATER.  But
address@hidden we don't mention that here because we are
address@hidden documenting the default configuration of CVS.  If it
address@hidden is a "standard" thing to change that value, it
address@hidden should be some kind of run-time configuration.
address@hidden
address@hidden See cvsclient.texi for more on the design decision
address@hidden to not have locks in place while waiting for the
address@hidden client, which is what results in memory consumption
address@hidden as high as this.
+
+Multiplying the size of each @sc{cvs} server by the
+number of servers which you expect to have active at
+one time should give an idea of memory requirements for
+the server.  For the most part, the memory consumed by
+the parent process probably can be swap space rather
+than physical memory.
address@hidden Has anyone verified that notion about swap space?
address@hidden I say it based pretty much on guessing that the
address@hidden ->text of the struct buffer_data only gets accessed
address@hidden in a first in, first out fashion, but I haven't
address@hidden looked very closely.
+
address@hidden What about disk usage in /tmp on the server?  I think that
address@hidden it can be substantial, but I haven't looked at this
address@hidden again and tried to figure it out ("cvs import" is
address@hidden probably the worst case...).
+
+The second area of large memory consumption is
address@hidden, when checking in large files.  This is
+required even for binary files.  The rule of thumb is
+to allow about ten times the size of the largest file
+you will want to check in, although five times may be
+adequate.  For example, if you want to check in a file
+which is 10 megabytes, you should have 100 megabytes of
+memory on the machine doing the checkin (the server
+machine for client/server, or the machine running
address@hidden for non-client/server).  This can be swap
+space rather than physical memory.  Because the memory
+is only required briefly, there is no particular need
+to allow memory for more than one such checkin at a
+time.
address@hidden The 5-10 times rule of thumb is from Paul Eggert for
address@hidden GNU diff.  I don't think it is in the GNU diff
address@hidden manual or anyplace like that.
address@hidden
address@hidden Probably we could be saying more about
address@hidden non-client/server CVS.
address@hidden I would guess for non-client/server CVS in an NFS
address@hidden environment the biggest issues are the network and
address@hidden the NFS server.
+
+Resource consumption for the client is even more
+modest---any machine with enough capacity to run the
+operating system in question should have little
+trouble.
address@hidden Is that true?  I think the client still wants to
address@hidden (bogusly) store entire files in memory at times.
+
+For information on disk space requirements, see
address@hidden a repository}.
+
address@hidden The connection method
address@hidden The connection method
+
+In its simplest form, the @var{method} portion of the repository string
+(@pxref{Remote repositories}) may be one of @samp{ext}, @samp{fork},
address@hidden, @samp{kserver}, @samp{local}, @samp{pserver}, and, on some
+platforms, @samp{server}.
+
+If @var{method} is not specified, and the repository
+name starts with a @samp{/}, then the default is @code{local}.
+If @var{method} is not specified, and the repository
+name does not start with a @samp{/}, then the default is @code{ext}
+or @code{server}, depending on your platform; both the @samp{ext}
+and @samp{server} methods are described in @ref{Connecting via rsh}.
+
address@hidden connection method options
address@hidden options, connection method
+The @code{ext}, @code{fork}, @code{gserver}, and @code{pserver} connection
+methods all accept optional method options, specified as part of the
address@hidden string, like so:
+
address@hidden
+:@var{method}[;@address@hidden:@var{other_connection_data}
address@hidden example
+
address@hidden is not sensitive to the case of @var{method} or @var{option}, 
though
+it may sometimes be sensitive to the case of @var{arg}.  The possible method
+options are as follows:
+
address@hidden @code
address@hidden CVS_PROXY_PORT
address@hidden proxy, method option
address@hidden proxyport, method option
address@hidden proxies, web, connecting via
address@hidden web proxies, connecting via
address@hidden proxies, HTTP, connecting via
address@hidden HTTP proxies, connecting via
address@hidden address@hidden
address@hidden address@hidden
+These two method options can be used to connect via an HTTP tunnel style web
+proxy.  @var{hostname} should be the name of the HTTP proxy server to connect
+through and @var{port} is the port number on the HTTP proxy server to connect
+via.  @var{port} defaults to 8080.
+
address@hidden HTTP proxy server is not the same as a @sc{cvs} write proxy
+server - please see @ref{Write proxies} for more on @sc{cvs} write proxies.}
+
+For example, to connect pserver via a web proxy listening on port 8000 of
+www.myproxy.net, you would use a method of:
+
address@hidden
+:pserver;proxy=www.myproxy.net;proxyport=8000:@var{pserver_connection_string}
address@hidden example
+
address@hidden the above example, @var{pserver_connection_string} is still
+required to connect and authenticate to the CVS server, as noted in the
+upcoming sections on password authentication, @code{gserver}, and
address@hidden  The example above only demonstrates a modification to the
address@hidden portion of the repository name.}
+
+These options first appeared in @sc{cvs} version 1.12.7 and are valid as
+modifcations to the @code{gserver} and @code{pserver} connection methods.
+
address@hidden CVS_RSH method option
address@hidden address@hidden
+This method option can be used with the @code{ext} method to specify the path
+the @sc{cvs} client will use to find the remote shell used to contact the
address@hidden server and takes precedence over any path specified in the
address@hidden environment variable (@pxref{Connecting via rsh}).  For
+example, to connect to a @sc{cvs} server via the local
address@hidden/path/to/ssh/command} command, you could choose to specify the 
following
address@hidden via the @code{CVS_RSH} method option:
+
address@hidden
+:ext;CVS_RSH=/path/to/ssh/command:@var{ext_connection_string}
address@hidden example
+
+This method option first appeared in @sc{cvs} version 1.12.11 and is valid only
+as a modifcation to the @code{ext} connection method.
+
address@hidden CVS_SERVER method option
address@hidden address@hidden
+This method option can be used with the @code{ext} and @code{fork} methods to
+specify the path @sc{cvs} will use to find the @sc{cvs} executable on the
address@hidden server and takes precedence over any path specified in the
address@hidden environment variable (@pxref{Connecting via rsh}).  For
+example, to select the remote @file{/path/to/cvs/command} executable as your
address@hidden server application on the @sc{cvs} server machine, you could 
choose to
+specify the following @var{path} via the @code{CVS_SERVER} method option:
+
address@hidden
+:ext;CVS_SERVER=/path/to/cvs/command:@var{ext_connection_string}
address@hidden example
+
address@hidden
+or, to select an executable named @samp{cvs-1.12.11}, assuming it is in your
address@hidden on the @sc{cvs} server:
+
address@hidden
+:ext;CVS_SERVER=cvs-1.12.11:@var{ext_connection_string}
address@hidden example
+
+This method option first appeared in @sc{cvs} version 1.12.11 and is valid
+as a modifcation to both the @code{ext} and @code{fork} connection methods.
+
address@hidden Redirect, method option
address@hidden address@hidden
+The @code{Redirect} method option determines whether the @sc{cvs} client will
+allow a @sc{cvs} server to redirect it to a different @sc{cvs} server, usually
+for write requests, as in a write proxy setup.
+
+A @var{boolean-state} of any value acceptable for boolean @file{CVSROOT/config}
+file options is acceptable here (@pxref{config}).  For example, @samp{on},
address@hidden, @samp{true}, and @samp{false} are all valid values for
address@hidden  @var{boolean-state} for the @code{Redirect} method option
+defaults to @samp{on}.
+
+This option will have no effect when talking to any non-secondary @sc{cvs}
+server.  For more on write proxies and secondary servers, please see
address@hidden proxies}.
+
+This method option first appeared in @sc{cvs} version 1.12.11 and is valid only
+as a modifcation to the @code{ext} connection method.
+
address@hidden OpenPGP Signatures
address@hidden Commit Signatures
address@hidden sign
address@hidden no-sign
+Force OpenPGP signatures on or off.  @samp{sign} will cause the commit to abort
+if the server does not support OpenPGP signatures.  Without one of these
+options, CVS will autonegotiate signing, attempting to sign commits when the
+server supports it.  May be overridden by the @samp{--sign} and 
@samp{--no-sign}
+commit options (@pxref{commit options}).
+
address@hidden address@hidden
+Use @var{template} as the command line template to generate OpenPGP signatures.
+Format strings in this template are substituted before the commit is run:
+
address@hidden @code
address@hidden %t
+Substitute in the textmode flag (defaults to @samp{--textmode}) when a
+signature is being generated for a text file.
+
address@hidden %a
+Substitute in any @var{arg}s set via the @samp{--sign-arg} option or the
+CVSROOT sign-arg method option.
+
address@hidden %s
+Substitute the name of the file to generate a signature for.
address@hidden table
+
+This template should send the generated signature to its standard output.
+Overrides the @samp{sign-template} method optoin and defaults to something like
address@hidden/usr/bin/gpg --detach-sign --output - %t %a %s}.
address@hidden table
+
+As a further example, to combine both the @code{CVS_RSH} and @code{CVS_SERVER}
+options, a method specification like the following would work:
+
address@hidden
+:ext;CVS_RSH=/path/to/ssh/command;CVS_SERVER=/path/to/cvs/command:
address@hidden example
+
+This means that you would not need to have
+the @code{CVS_SERVER} or @code{CVS_RSH} environment
+variables set correctly.  See @ref{Connecting via rsh}, for more details on
+these environment variables.
+
address@hidden Connecting via rsh
address@hidden Connecting with rsh
+
address@hidden rsh
address@hidden uses the @samp{rsh} protocol to perform these
+operations, so the remote user host needs to have a
address@hidden file which grants access to the local
+user. Note that the program that @sc{cvs} uses for this
+purpose may be specified using the @file{--with-rsh}
+flag to configure.
+
+For example, suppose you are the user @samp{mozart} on
+the local machine @samp{toe.example.com}, and the
+server machine is @samp{faun.example.org}.  On
+faun, put the following line into the file
address@hidden in @samp{bach}'s home directory:
+
address@hidden
+toe.example.com  mozart
address@hidden example
+
address@hidden
+Then test that @samp{rsh} is working with
+
address@hidden
+rsh -l bach faun.example.org 'echo $PATH'
address@hidden example
+
address@hidden CVS_SERVER, environment variable
+Next you have to make sure that @code{rsh} will be able
+to find the server.  Make sure that the path which
address@hidden printed in the above example includes the
+directory containing a program named @code{cvs} which
+is the server.  You need to set the path in
address@hidden, @file{.cshrc}, etc., not @file{.login}
+or @file{.profile}.  Alternately, you can set the
+environment variable @code{CVS_SERVER} on the client
+machine to the filename of the server you want to use,
+for example @file{/usr/local/bin/cvs-1.6}.
+For the @code{ext} and @code{fork} methods, you may
+also specify @var{CVS_SERVER} as an otpion in the
address@hidden so that you may use different servers for
+differnt roots. See @ref{Remote repositories} for more
+details.
+
+There is no need to edit @file{inetd.conf} or start a
address@hidden server daemon.
+
address@hidden :server:, setting up
address@hidden :ext:, setting up
address@hidden Kerberos, using kerberized rsh
address@hidden SSH (rsh replacement)
address@hidden rsh replacements (Kerberized, SSH, &c)
+There are two access methods that you use in @code{CVSROOT}
+for rsh.  @code{:server:} specifies an internal rsh
+client, which is supported only by some @sc{cvs} ports.
address@hidden:ext:} specifies an external rsh program.  By
+default this is @code{rsh} (unless otherwise specified
+by the @file{--with-rsh} flag to configure) but you may set the
address@hidden environment variable to invoke another
+program which can access the remote server (for
+example, @code{remsh} on HP-UX 9 because @code{rsh} is
+something different).  It must be a program which can
+transmit data to and from the server without modifying
+it; for example the Windows NT @code{rsh} is not
+suitable since it by default translates between CRLF
+and LF.  The OS/2 @sc{cvs} port has a hack to pass @samp{-b}
+to @code{rsh} to get around this, but since this could
+potentially cause problems for programs other than the
+standard @code{rsh}, it may change in the future.  If
+you set @code{CVS_RSH} to @code{SSH} or some other rsh
+replacement, the instructions in the rest of this
+section concerning @file{.rhosts} and so on are likely
+to be inapplicable; consult the documentation for your rsh
+replacement.
+
+You may choose to specify the @var{CVS_RSH} option as a method option
+in the @var{CVSROOT} string to allow you to use different connection tools
+for different roots (@pxref{The connection method}).  For example, allowing
+some roots to use @code{CVS_RSH=remsh} and some to use
address@hidden for the @code{ext} method.  See also
+the @ref{Remote repositories} for more details.
address@hidden See also the comment in src/client.c for rationale
address@hidden concerning "rsh" being the default and never
address@hidden "remsh".
+
+Continuing our example, supposing you want to access
+the module @file{foo} in the repository
address@hidden/usr/local/cvsroot/}, on machine
address@hidden, you are ready to go:
+
address@hidden
+cvs -d :ext:bach@@faun.example.org:/usr/local/cvsroot checkout foo
address@hidden example
+
address@hidden
+(The @file{bach@@} can be omitted if the username is
+the same on both the local and remote hosts.)
+
address@hidden Should we mention "rsh host echo hi" and "rsh host
address@hidden cat" (the latter followed by typing text and ^D)
address@hidden as troubleshooting techniques?  Probably yes
address@hidden (people tend to have trouble setting this up),
address@hidden but this kind of thing can be hard to spell out.
+
address@hidden Password authenticated
address@hidden Direct connection with password authentication
+
+The @sc{cvs} client can also connect to the server
+using a password protocol.  This is particularly useful
+if using @code{rsh} is not feasible (for example,
+the server is behind a firewall), and Kerberos also is
+not available.
+
+        To use this method, it is necessary to make
+some adjustments on both the server and client sides.
+
address@hidden
+* Password authentication server::     Setting up the server
+* Password authentication client::     Using the client
+* Password authentication security::   What this method does and does not do
address@hidden menu
+
address@hidden Password authentication server
address@hidden Setting up the server for password authentication
+
+First of all, you probably want to tighten the
+permissions on the @file{$CVSROOT} and
address@hidden/CVSROOT} directories.  See @ref{Password
+authentication security}, for more details.
+
address@hidden pserver (subcommand)
address@hidden Remote repositories, port specification
address@hidden Repositories, remote, port specification
address@hidden Client/Server Operation, port specification
address@hidden pserver (client/server connection method), port specification
address@hidden kserver (client/server connection method), port specification
address@hidden gserver (client/server connection method), port specification
address@hidden port, specifying for remote repositories
address@hidden Password server, setting up
address@hidden Authenticating server, setting up
address@hidden inetd, configuring for pserver
address@hidden xinetd, configuring for pserver
address@hidden FIXME: this isn't quite right regarding port
address@hidden numbers; CVS looks up "cvspserver" in
address@hidden /etc/services (on unix, but what about non-unix?).
+On the server side, the file @file{/etc/inetd.conf}
+needs to be edited so @code{inetd} knows to run the
+command @code{cvs pserver} when it receives a
+connection on the right port.  By default, the port
+number is 2401; it would be different if your client
+were compiled with @code{CVS_AUTH_PORT} defined to
+something else, though.  This can also be specified in the CVSROOT variable
+(@pxref{Remote repositories}) or overridden with the CVS_CLIENT_PORT
+environment variable (@pxref{Environment variables}).
+
+        If your @code{inetd} allows raw port numbers in
address@hidden/etc/inetd.conf}, then the following (all on a
+single line in @file{inetd.conf}) should be sufficient:
+
address@hidden
+2401  stream  tcp  nowait  root  /usr/local/bin/cvs
+cvs -f --allow-root=/usr/cvsroot pserver
address@hidden example
+
address@hidden
+(You could also use the
address@hidden option to specify a temporary directory.)
+
+The @samp{--allow-root} option specifies the allowable
address@hidden directory.  Clients which attempt to use a
+different @sc{cvsroot} directory will not be allowed to
+connect.  If there is more than one @sc{cvsroot}
+directory which you want to allow, repeat the option.
+(Unfortunately, many versions of @code{inetd} have very small
+limits on the number of arguments and/or the total length
+of the command.  The usual solution to this problem is
+to have @code{inetd} run a shell script which then invokes
address@hidden with the necessary arguments.)
+
+        If your @code{inetd} wants a symbolic service
+name instead of a raw port number, then put this in
address@hidden/etc/services}:
+
address@hidden
+cvspserver      2401/tcp
address@hidden example
+
address@hidden
+and put @code{cvspserver} instead of @code{2401} in @file{inetd.conf}.
+
+If your system uses @code{xinetd} instead of @code{inetd},
+the procedure is slightly different.
+Create a file called @file{/etc/xinetd.d/cvspserver} containing the following:
+
address@hidden
+service cvspserver
address@hidden
+   port        = 2401
+   socket_type = stream
+   protocol    = tcp
+   wait        = no
+   user        = root
+   passenv     = PATH
+   server      = /usr/local/bin/cvs
+   server_args = -f --allow-root=/usr/cvsroot pserver
address@hidden
address@hidden example
+
address@hidden
+(If @code{cvspserver} is defined in @file{/etc/services}, you can omit
+the @code{port} line.)
+
+        Once the above is taken care of, restart your
address@hidden, or do whatever is necessary to force it
+to reread its initialization files.
+
+If you are having trouble setting this up, see
address@hidden
+
address@hidden CVS passwd file
address@hidden passwd (admin file)
+Because the client stores and transmits passwords in
+cleartext (almost---see @ref{Password authentication
+security}, for details), a separate @sc{cvs} password
+file is generally used, so people don't compromise
+their regular passwords when they access the
+repository.  This file is
address@hidden/CVSROOT/passwd} (@pxref{Intro
+administrative files}).  It uses a colon-separated
+format, similar to @file{/etc/passwd} on Unix systems,
+except that it has fewer fields: @sc{cvs} username,
+optional password, and an optional system username for
address@hidden to run as if authentication succeeds.  Here is
+an example @file{passwd} file with five entries:
+
address@hidden
+anonymous:
+bach:ULtgRLXo7NRxs
+spwang:1sOp854gDF3DY
+melissa:tGX1fS8sun6rY:pubcvs
+qproj:XR4EZcEs0szik:pubcvs
address@hidden example
+
address@hidden
+(The passwords are encrypted according to the standard
+Unix @code{crypt()} function, so it is possible to
+paste in passwords directly from regular Unix
address@hidden/etc/passwd} files.)
+
+The first line in the example will grant access to any
address@hidden client attempting to authenticate as user
address@hidden, no matter what password they use,
+including an empty password.  (This is typical for
+sites granting anonymous read-only access; for
+information on how to do the "read-only" part, see
address@hidden access}.)
+
+The second and third lines will grant access to
address@hidden and @code{spwang} if they supply their
+respective plaintext passwords.
+
address@hidden User aliases
+The fourth line will grant access to @code{melissa}, if
+she supplies the correct password, but her @sc{cvs}
+operations will actually run on the server side under
+the system user @code{pubcvs}.  Thus, there need not be
+any system user named @code{melissa}, but there
address@hidden be one named @code{pubcvs}.
+
+The fifth line shows that system user identities can be
+shared: any client who successfully authenticates as
address@hidden will actually run as @code{pubcvs}, just
+as @code{melissa} does.  That way you could create a
+single, shared system user for each project in your
+repository, and give each developer their own line in
+the @file{$CVSROOT/CVSROOT/passwd} file.  The @sc{cvs}
+username on each line would be different, but the
+system username would be the same.  The reason to have
+different @sc{cvs} usernames is that @sc{cvs} will log their
+actions under those names: when @code{melissa} commits
+a change to a project, the checkin is recorded in the
+project's history under the name @code{melissa}, not
address@hidden  And the reason to have them share a
+system username is so that you can arrange permissions
+in the relevant area of the repository such that only
+that account has write-permission there.
+
+If the system-user field is present, all
+password-authenticated @sc{cvs} commands run as that
+user; if no system user is specified, @sc{cvs} simply
+takes the @sc{cvs} username as the system username and
+runs commands as that user.  In either case, if there
+is no such user on the system, then the @sc{cvs}
+operation will fail (regardless of whether the client
+supplied a valid password).
+
+The password and system-user fields can both be omitted
+(and if the system-user field is omitted, then also
+omit the colon that would have separated it from the
+encrypted password).  For example, this would be a
+valid @file{$CVSROOT/CVSROOT/passwd} file:
+
address@hidden
+anonymous::pubcvs
+fish:rKa5jzULzmhOo:kfogel
+sussman:1sOp854gDF3DY
address@hidden example
+
address@hidden
+When the password field is omitted or empty, then the
+client's authentication attempt will succeed with any
+password, including the empty string.  However, the
+colon after the @sc{cvs} username is always necessary,
+even if the password is empty.
+
address@hidden can also fall back to use system authentication.
+When authenticating a password, the server first checks
+for the user in the @file{$CVSROOT/CVSROOT/passwd}
+file.  If it finds the user, it will use that entry for
+authentication as described above.  But if it does not
+find the user, or if the @sc{cvs} @file{passwd} file
+does not exist, then the server can try to authenticate
+the username and password using the operating system's
+user-lookup routines (this "fallback" behavior can be
+disabled by setting @code{SystemAuth=no} in the
address@hidden @file{config} file, @pxref{config}).
+
+The default fallback behavior is to look in 
address@hidden/etc/passwd} for this system user unless your
+system has PAM (Pluggable Authentication Modules)
+and your @sc{cvs} server executable was configured to
+use it at compile time (using @code{./configure --enable-pam} - see the
+INSTALL file for more).  In this case, PAM will be consulted instead.
+This means that @sc{cvs} can be configured to use any password
+authentication source PAM can be configured to use (possibilities
+include a simple UNIX password, NIS, LDAP, and others) in its
+global configuration file (usually @file{/etc/pam.conf}
+or possibly @file{/etc/pam.d/cvs}).  See your PAM documentation
+for more details on PAM configuration.
+
+Note that PAM is an experimental feature in @sc{cvs} and feedback is
+encouraged.  Please send a mail to one of the @sc{cvs} mailing lists
+(@code{info-cvs@@nongnu.org} or @code{bug-cvs@@nongnu.org}) if you use the 
address@hidden PAM support.
+
address@hidden: Using PAM gives the system administrator much more 
+flexibility about how @sc{cvs} users are authenticated but 
+no more security than other methods.  See below for more.} 
+
+CVS needs an "auth", "account" and "session" module in the 
+PAM configuration file. A typical PAM configuration 
+would therefore have the following lines 
+in @file{/etc/pam.conf} to emulate the standard @sc{cvs} 
+system @file{/etc/passwd} authentication:
+
address@hidden
+cvs    auth        required    pam_unix.so
+cvs    account     required    pam_unix.so
+cvs    session     required    pam_unix.so
address@hidden example
+
+The the equivalent @file{/etc/pam.d/cvs} would contain
+
address@hidden
+auth       required    pam_unix.so
+account            required    pam_unix.so
+session            required    pam_unix.so
address@hidden example
+
+Some systems require a full path to the module so that
address@hidden (Linux) would become something like 
address@hidden/usr/lib/security/$ISA/pam_unix.so.1} (Sun Solaris).
+See the @file{contrib/pam} subdirectory of the @sc{cvs}
+source distribution for further example configurations.
+
+The PAM service name given above as "cvs" is just
+the service name in the default configuration and can be
+set using
address@hidden/configure --with-hardcoded-pam-service-name=<pam-service-name>}
+before compiling.  @sc{cvs} can also be configured to use whatever
+name it is invoked as as its PAM service name using
address@hidden/configure --without-hardcoded-pam-service-name}, but this
+feature should not be used if you may not have control of the name
address@hidden will be invoked as.
+
+Be aware, also, that falling back to system
+authentication might be a security risk: @sc{cvs}
+operations would then be authenticated with that user's
+regular login password, and the password flies across
+the network in plaintext.  See @ref{Password
+authentication security} for more on this.
+This may be more of a problem with PAM authentication
+because it is likely that the source of the system 
+password is some central authentication service like
+LDAP which is also used to authenticate other services.
+
+On the other hand, PAM makes it very easy to change your password
+regularly.  If they are given the option of a one-password system for
+all of their activities, users are often more willing to change their
+password on a regular basis.
+
+In the non-PAM configuration where the password is stored in the
address@hidden/passwd} file, it is difficult to change passwords on a
+regular basis since only administrative users (or in some cases
+processes that act as an administrative user) are typically given
+access to modify this file.  Either there needs to be some
+hand-crafted web page or set-uid program to update the file, or the
+update needs to be done by submitting a request to an administrator to
+perform the duty by hand.  In the first case, having to remember to
+update a separate password on a periodic basis can be difficult.  In
+the second case, the manual nature of the change will typically mean
+that the password will not be changed unless it is absolutely
+necessary.
+
+Note that PAM administrators should probably avoid configuring
+one-time-passwords (OTP) for @sc{cvs} authentication/authorization.  If
+OTPs are desired, the administrator may wish to encourage the use of
+one of the other Client/Server access methods.  See the section on
address@hidden repositories} for a list of other methods.
+
+Right now, the only way to put a password in the
address@hidden @file{passwd} file is to paste it there from
+somewhere else.  Someday, there may be a @code{cvs
+passwd} command.
+
+Unlike many of the files in @file{$CVSROOT/CVSROOT}, it
+is normal to edit the @file{passwd} file in-place,
+rather than via @sc{cvs}.  This is because of the
+possible security risks of having the @file{passwd}
+file checked out to people's working copies.  If you do
+want to include the @file{passwd} file in checkouts of
address@hidden/CVSROOT}, see @ref{checkoutlist}.
+
address@hidden We might also suggest using the @code{htpasswd} command
address@hidden from freely available web servers as well, but that
address@hidden would open up a can of worms in that the users next
address@hidden questions are likely to be "where do I get it?" and
address@hidden "how do I use it?"
address@hidden Also note that htpasswd, at least the version I had,
address@hidden likes to clobber the third field.
+
address@hidden Password authentication client
address@hidden Using the client with password authentication
address@hidden Login (subcommand)
address@hidden Password client, using
address@hidden Authenticated client, using
address@hidden :pserver:, setting up
+To run a @sc{cvs} command on a remote repository via
+the password-authenticating server, one specifies the
address@hidden protocol, optional username, repository host, an
+optional port number, and path to the repository.  For example:
+
address@hidden
+cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj
address@hidden example
+
address@hidden
+or
+
address@hidden
+CVSROOT=:pserver:bach@@faun.example.org:2401/usr/local/cvsroot
+cvs checkout someproj
address@hidden example
+
+However, unless you're connecting to a public-access
+repository (i.e., one where that username doesn't
+require a password), you'll need to supply a password or @dfn{log in} first.
+Logging in verifies your password with the repository and stores it in a file.
+It's done with the @code{login} command, which will
+prompt you interactively for the password if you didn't supply one as part of
address@hidden:
+
address@hidden
+cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot login
+CVS password:
address@hidden example
+
address@hidden
+or
+
address@hidden
+cvs -d :pserver:bach:p4ss30rd@@faun.example.org:/usr/local/cvsroot login
address@hidden example
+
+After you enter the password, @sc{cvs} verifies it with
+the server.  If the verification succeeds, then that
+combination of username, host, repository, and password
+is permanently recorded, so future transactions with
+that repository won't require you to run @code{cvs
+login}.  (If verification fails, @sc{cvs} will exit
+complaining that the password was incorrect, and
+nothing will be recorded.)
+
+The records are stored, by default, in the file
address@hidden/.cvspass}.  That file's format is
+human-readable, and to a degree human-editable, but
+note that the passwords are not stored in
+cleartext---they are trivially encoded to protect them
+from "innocent" compromise (i.e., inadvertent viewing
+by a system administrator or other non-malicious
+person).
+
address@hidden CVS_PASSFILE, environment variable
+You can change the default location of this file by
+setting the @code{CVS_PASSFILE} environment variable.
+If you use this variable, make sure you set it
address@hidden @code{cvs login} is run.  If you were to
+set it after running @code{cvs login}, then later
address@hidden commands would be unable to look up the
+password for transmission to the server.
+  
+Once you have logged in, all @sc{cvs} commands using
+that remote repository and username will authenticate
+with the stored password.  So, for example
+  
address@hidden
+cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot checkout foo
address@hidden example
+
address@hidden
+should just work (unless the password changes on the
+server side, in which case you'll have to re-run
address@hidden login}).
+
+Note that if the @samp{:pserver:} were not present in
+the repository specification, @sc{cvs} would assume it
+should use @code{rsh} to connect with the server
+instead (@pxref{Connecting via rsh}).
+
+Of course, once you have a working copy checked out and
+are running @sc{cvs} commands from within it, there is
+no longer any need to specify the repository
+explicitly, because @sc{cvs} can deduce the repository
+from the working copy's @file{CVS} subdirectory.
+
address@hidden FIXME: seems to me this needs somewhat more
address@hidden explanation.
address@hidden Logout (subcommand)
+The password for a given remote repository can be
+removed from the @code{CVS_PASSFILE} by using the
address@hidden logout} command.
+
address@hidden Password authentication security
address@hidden Security considerations with password authentication
+
address@hidden Security, of pserver
+The passwords are stored on the client side in a
+trivial encoding of the cleartext, and transmitted in
+the same encoding.  The encoding is done only to
+prevent inadvertent password compromises (i.e., a
+system administrator accidentally looking at the file),
+and will not prevent even a naive attacker from gaining
+the password.
+
address@hidden FIXME: The bit about "access to the repository
address@hidden implies general access to the system is *not* specific
address@hidden to pserver; it applies to kerberos and SSH and
address@hidden everything else too.  Should reorganize the
address@hidden documentation to make this clear.
+The separate @sc{cvs} password file (@pxref{Password
+authentication server}) allows people
+to use a different password for repository access than
+for login access.  On the other hand, once a user has
+non-read-only
+access to the repository, she can execute programs on
+the server system through a variety of means.  Thus, repository
+access implies fairly broad system access as well.  It
+might be possible to modify @sc{cvs} to prevent that,
+but no one has done so as of this writing.
address@hidden OpenBSD uses chroot() and copies the repository to
address@hidden provide anonymous read-only access (for details see
address@hidden http://www.openbsd.org/anoncvs.shar).  While this
address@hidden closes the most obvious holes, I'm not sure it
address@hidden closes enough holes to recommend it (plus it is
address@hidden *very* easy to accidentally screw up a setup of this
address@hidden type).
+
+Note that because the @file{$CVSROOT/CVSROOT} directory
+contains @file{passwd} and other files which are used
+to check security, you must control the permissions on
+this directory as tightly as the permissions on
address@hidden/etc}.  The same applies to the @file{$CVSROOT}
+directory itself and any directory
+above it in the tree.  Anyone who has write access to
+such a directory will have the ability to become any
+user on the system.  Note that these permissions are
+typically tighter than you would use if you are not
+using pserver.
address@hidden TODO: Would be really nice to document/implement a
address@hidden scheme where the CVS server can run as some non-root
address@hidden user, e.g. "cvs".  CVSROOT/passwd would contain a
address@hidden bunch of entries of the form foo:xxx:cvs (or the "cvs"
address@hidden would be implicit).  This would greatly reduce
address@hidden security risks such as those hinted at in the
address@hidden previous paragraph.  I think minor changes to CVS
address@hidden might be required but mostly this would just need
address@hidden someone who wants to play with it, document it, &c.
+
+In summary, anyone who gets the password gets
+repository access (which may imply some measure of general system
+access as well).  The password is available to anyone
+who can sniff network packets or read a protected
+(i.e., user read-only) file.  If you want real
+security, get Kerberos.
+
address@hidden GSSAPI authenticated
address@hidden Direct connection with GSSAPI
+
address@hidden GSSAPI
address@hidden Security, GSSAPI
address@hidden :gserver:, setting up
address@hidden Kerberos, using :gserver:
+GSSAPI is a generic interface to network security
+systems such as Kerberos 5.
+If you have a working GSSAPI library, you can have
address@hidden connect via a direct @sc{tcp} connection,
+authenticating with GSSAPI.
+
+To do this, @sc{cvs} needs to be compiled with GSSAPI
+support; when configuring @sc{cvs} it tries to detect
+whether GSSAPI libraries using Kerberos version 5 are
+present.  You can also use the @file{--with-gssapi}
+flag to configure.
+
+The connection is authenticated using GSSAPI, but the
+message stream is @emph{not} authenticated by default.
+You must use the @code{-a} global option to request
+stream authentication.
+
+The data transmitted is @emph{not} encrypted by
+default.  Encryption support must be compiled into both
+the client and the server; use the
address@hidden configure option to turn it on.
+You must then use the @code{-x} global option to
+request encryption.
+
+GSSAPI connections are handled on the server side by
+the same server which handles the password
+authentication server; see @ref{Password authentication
+server}.  If you are using a GSSAPI mechanism such as
+Kerberos which provides for strong authentication, you
+will probably want to disable the ability to
+authenticate via cleartext passwords.  To do so, create
+an empty @file{CVSROOT/passwd} password file, and set
address@hidden in the config file
+(@pxref{config}).
+
+The GSSAPI server uses a principal name of
+cvs/@var{hostname}, where @var{hostname} is the
+canonical name of the server host.  You will have to
+set this up as required by your GSSAPI mechanism.
+
+To connect using GSSAPI, use the @samp{:gserver:} method.  For
+example,
+
address@hidden
+cvs -d :gserver:faun.example.org:/usr/local/cvsroot checkout foo
address@hidden example
+
address@hidden Kerberos authenticated
address@hidden Direct connection with Kerberos
+
address@hidden Kerberos, using :kserver:
address@hidden Security, Kerberos
address@hidden :kserver:, setting up
+The easiest way to use Kerberos is to use the Kerberos
address@hidden, as described in @ref{Connecting via rsh}.
+The main disadvantage of using rsh is that all the data
+needs to pass through additional programs, so it may be
+slower.  So if you have Kerberos installed you can
+connect via a direct @sc{tcp} connection,
+authenticating with Kerberos.
+
+This section concerns the Kerberos network security
+system, version 4.  Kerberos version 5 is supported via
+the GSSAPI generic network security interface, as
+described in the previous section.
+
+To do this, @sc{cvs} needs to be compiled with Kerberos
+support; when configuring @sc{cvs} it tries to detect
+whether Kerberos is present or you can use the
address@hidden flag to configure.
+
+The data transmitted is @emph{not} encrypted by
+default.  Encryption support must be compiled into both
+the client and server; use the
address@hidden configure option to turn it
+on.  You must then use the @code{-x} global option to
+request encryption.
+
+The CVS client will attempt to connect to port 1999 by default.
+
address@hidden kinit
+When you want to use @sc{cvs}, get a ticket in the
+usual way (generally @code{kinit}); it must be a ticket
+which allows you to log into the server machine.  Then
+you are ready to go:
+
address@hidden
+cvs -d :kserver:faun.example.org:/usr/local/cvsroot checkout foo
address@hidden example
+
+Previous versions of @sc{cvs} would fall back to a
+connection via rsh; this version will not do so.
+
address@hidden Connecting via fork
address@hidden Connecting with fork
+
address@hidden fork, access method
address@hidden :fork:, setting up
+This access method allows you to connect to a
+repository on your local disk via the remote protocol.
+In other words it does pretty much the same thing as
address@hidden:local:}, but various quirks, bugs and the like are
+those of the remote @sc{cvs} rather than the local
address@hidden
+
+For day-to-day operations you might prefer either
address@hidden:local:} or @code{:fork:}, depending on your
+preferences.  Of course @code{:fork:} comes in
+particularly handy in testing or
+debugging @code{cvs} and the remote protocol.
+Specifically, we avoid all of the network-related
+setup/configuration, timeouts, and authentication
+inherent in the other remote access methods but still
+create a connection which uses the remote protocol.
+
+To connect using the @code{fork} method, use
address@hidden:fork:} and the pathname to your local
+repository.  For example:
+
address@hidden
+cvs -d :fork:/usr/local/cvsroot checkout foo
address@hidden example
+
address@hidden CVS_SERVER, and :fork:
+As with @code{:ext:}, the server is called @samp{cvs}
+by default, or the value of the @code{CVS_SERVER}
+environment variable.
+
+
address@hidden Write proxies
address@hidden Distributing load across several CVS servers
+
address@hidden PrimaryServer, in CVSROOT/config
address@hidden Primary server
address@hidden Secondary server
address@hidden proxy, write
address@hidden write proxy
address@hidden can be configured to distribute usage across several @sc{cvs}
+servers.  This is accomplished by means of one or more @dfn{write proxies}, or
address@hidden servers}, for a single @dfn{primary server}.
+
+When a @sc{cvs} client accesses a secondary server and only sends read
+requests, then the secondary server handles the entire request.  If the client
+sends any write requests, however, the secondary server asks the client to
+redirect its write request to the primary server, if the client supports
+redirect requests, and otherwise becomes a transparent proxy for the primary
+server, which actually handles the write request.
+
+In this manner, any number of read-only secondary servers may be configured as
+write proxies for the primary server, effectively distributing the load from
+all read operations between the secondary servers and restricting the load on
+the primary server to write operations and pushing changes to the secondaries.
+
+Primary servers will not automatically push changes to secondaries.  This must
+be configured via @file{loginfo}, @file{postadmin}, @file{posttag}, &
address@hidden scripts (@pxref{Trigger Scripts}) like the following:
+
address@hidden
+ALL    rsync -gopr -essh ./ secondary:/cvsroot/%p &
address@hidden example
+
+You would probably actually want to lock directories for write on the secondary
+and for read on the primary before running the @samp{rsync} in the above
+example, but describing such a setup is beyond the scope of this document.
+
+A secondary advantage of a write proxy setup is that users pointing at the
+secondary server can still execute fast read operations while on a network that
+connects to the primary over a slow link or even one where the link to the
+primary is periodically broken.  Only write operations will require the network
+link to the primary.
+
+To configure write proxies, the primary must be specified with the
address@hidden option in @file{CVSROOT/config} (@pxref{config}).  For the
+transparent proxy mode to work, all secondary servers must also be running the
+same version of the @sc{cvs} server, or at least one that provides the same
+list of supported requests to the client as the primary server.  This is not
+necessary for redirection.
+
+Once a primary server is configured, secondary servers may be configured by:
+
address@hidden
address@hidden
+Duplicating the primary repository at the new location.
address@hidden
+Setting up the @file{loginfo}, @file{postadmin}, @file{posttag}, and
address@hidden files on the primary to propagate writes to the new secondary.
address@hidden
+Configure remote access to the secondary(ies) as you would configure access
+to any other CVS server (@pxref{Remote repositories}).
address@hidden
+Ensuring that @address@hidden is passed to
address@hidden incovations of the secondary server if the path to the @sc{cvs}
+repository directory is different on the two servers and you wish to support
+clients that do not handle the @samp{Redirect} resopnse (CVS 1.12.9 and earlier
+clients do not handle the @samp{Redirect} response).
+
+Please note, again, that writethrough proxy suport requires
address@hidden@var{secondary-cvsroot}} to be specified for @strong{all}
+incovations of the secondary server, not just @samp{pserver} invocations.
+This may require a wrapper script for the @sc{cvs} executable
+on your server machine.
address@hidden enumerate
+
+
address@hidden 
---------------------------------------------------------------------
address@hidden Read-only access
address@hidden Read-only repository access
address@hidden Read-only repository access
address@hidden readers (admin file)
address@hidden writers (admin file)
+
+        It is possible to grant read-only repository
+access to people using the password-authenticated
+server (@pxref{Password authenticated}).  (The
+other access methods do not have explicit support for
+read-only users because those methods all assume login
+access to the repository machine anyway, and therefore
+the user can do whatever local file permissions allow
+her to do.)
+
+        A user who has read-only access can do only
+those @sc{cvs} operations which do not modify the
+repository, except for certain ``administrative'' files
+(such as lock files and the history file).  It may be
+desirable to use this feature in conjunction with
+user-aliasing (@pxref{Password authentication server}).
+
+Unlike with previous versions of @sc{cvs}, read-only
+users should be able merely to read the repository, and
+not to execute programs on the server or otherwise gain
+unexpected levels of access.  Or to be more accurate,
+the @emph{known} holes have been plugged.  Because this
+feature is new and has not received a comprehensive
+security audit, you should use whatever level of
+caution seems warranted given your attitude concerning
+security.
+
+        There are two ways to specify read-only access
+for a user: by inclusion, and by exclusion.
+
+        "Inclusion" means listing that user
+specifically in the @file{$CVSROOT/CVSROOT/readers}
+file, which is simply a newline-separated list of
+users.  Here is a sample @file{readers} file:
+
address@hidden
+melissa
+splotnik
+jrandom
address@hidden example
+
address@hidden
+        (Don't forget the newline after the last user.)
+
+        "Exclusion" means explicitly listing everyone
+who has @emph{write} access---if the file
+
address@hidden
+$CVSROOT/CVSROOT/writers
address@hidden example
+
address@hidden
+exists, then only
+those users listed in it have write access, and
+everyone else has read-only access (of course, even the
+read-only users still need to be listed in the
address@hidden @file{passwd} file).  The
address@hidden file has the same format as the
address@hidden file.
+
+        Note: if your @sc{cvs} @file{passwd}
+file maps cvs users onto system users (@pxref{Password
+authentication server}), make sure you deny or grant
+read-only access using the @emph{cvs} usernames, not
+the system usernames.  That is, the @file{readers} and
address@hidden files contain cvs usernames, which may
+or may not be the same as system usernames.
+
+        Here is a complete description of the server's
+behavior in deciding whether to grant read-only or
+read-write access:
+
+        If @file{readers} exists, and this user is
+listed in it, then she gets read-only access.  Or if
address@hidden exists, and this user is NOT listed in
+it, then she also gets read-only access (this is true
+even if @file{readers} exists but she is not listed
+there).  Otherwise, she gets full read-write access.
+
+        Of course there is a conflict if the user is
+listed in both files.  This is resolved in the more
+conservative way, it being better to protect the
+repository too much than too little: such a user gets
+read-only access.
+
address@hidden Server temporary directory
address@hidden Temporary directories for the server
address@hidden Temporary directories, and server
address@hidden Server, temporary directories
+
+While running, the @sc{cvs} server creates temporary
+directories.  They are named
+
address@hidden
address@hidden
address@hidden example
+
address@hidden
+where @var{pid} is the process identification number of
+the server.
+They are located in the directory specified by 
+the @samp{-T} global option (@pxref{Global options}), 
+the @code{TMPDIR} environment variable (@pxref{Environment variables}), 
+or, failing that, @file{/tmp}.
+
+In most cases the server will remove the temporary
+directory when it is done, whether it finishes normally
+or abnormally.  However, there are a few cases in which
+the server does not or cannot remove the temporary
+directory, for example:
+
address@hidden @bullet
address@hidden
+If the server aborts due to an internal server error,
+it may preserve the directory to aid in debugging
+
address@hidden
+If the server is killed in a way that it has no way of
+cleaning up (most notably, @samp{kill -KILL} on unix).
+
address@hidden
+If the system shuts down without an orderly shutdown,
+which tells the server to clean up.
address@hidden itemize
+
+In cases such as this, you will need to manually remove
+the @address@hidden directories.  As long as
+there is no server running with process identification
+number @var{pid}, it is safe to do so.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Starting a new project
address@hidden Starting a project with CVS
address@hidden Starting a project with CVS
address@hidden Creating a project
+
address@hidden --moduledb--
+Because renaming files and moving them between
+directories is somewhat inconvenient, the first thing
+you do when you start a new project should be to think
+through your file organization.  It is not impossible
+to rename or move files, but it does increase the
+potential for confusion and @sc{cvs} does have some
+quirks particularly in the area of renaming
+directories.  @xref{Moving files}.
+
+What to do next depends on the situation at hand.
+
address@hidden
+* Setting up the files::        Getting the files into the repository
+* Defining the module::         How to make a module of the files
address@hidden menu
address@hidden -- File permissions!
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Setting up the files
address@hidden Setting up the files
+
+The first step is to create the files inside the repository.  This can
+be done in a couple of different ways.
+
address@hidden -- The contributed scripts
address@hidden
+* From files::                  This method is useful with old projects
+                                where files already exists.
+* From other version control systems::  Old projects where you want to
+                                        preserve history from another system.
+* From scratch::                Creating a directory tree from scratch.
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden From files
address@hidden Creating a directory tree from a number of files
address@hidden Importing files
+
+When you begin using @sc{cvs}, you will probably already have several
+projects that can be
+put under @sc{cvs} control.  In these cases the easiest way is to use the
address@hidden command.  An example is probably the easiest way to
+explain how to use it.  If the files you want to install in
address@hidden reside in @address@hidden, and you want them to appear in the
+repository as @file{$CVSROOT/yoyodyne/@var{rdir}}, you can do this:
+
address@hidden
+$ cd @var{wdir}
+$ cvs import -m "Imported sources" yoyodyne/@var{rdir} yoyo start
address@hidden example
+
+Unless you supply a log message with the @samp{-m}
+flag, @sc{cvs} starts an editor and prompts for a
+message.  The string @samp{yoyo} is a @dfn{vendor tag},
+and @samp{start} is a @dfn{release tag}.  They may fill
+no purpose in this context, but since @sc{cvs} requires
+them they must be present.  @xref{Tracking sources}, for
+more information about them.
+
+You can now verify that it worked, and remove your
+original source directory.
address@hidden FIXME: Need to say more about "verify that it
address@hidden worked".  What should the user look for in the output
address@hidden from "diff -r"?
+
address@hidden
+$ cd ..
+$ cvs checkout yoyodyne/@var{rdir}       # @r{Explanation below}
+$ diff -r @var{wdir} yoyodyne/@var{rdir}
+$ rm -r @var{wdir}
address@hidden example
+
address@hidden
+Erasing the original sources is a good idea, to make sure that you do
+not accidentally edit them in @var{wdir}, bypassing @sc{cvs}.
+Of course, it would be wise to make sure that you have
+a backup of the sources before you remove them.
+
+The @code{checkout} command can either take a module
+name as argument (as it has done in all previous
+examples) or a path name relative to @code{$CVSROOT},
+as it did in the example above.
+
+It is a good idea to check that the permissions
address@hidden sets on the directories inside @code{$CVSROOT}
+are reasonable, and that they belong to the proper
+groups.  @xref{File permissions}.
+
+If some of the files you want to import are binary, you
+may want to use the wrappers features to specify which
+files are binary and which are not.  @xref{Wrappers}.
+
address@hidden The node name is too long, but I am having trouble
address@hidden thinking of something more concise.
address@hidden From other version control systems
address@hidden Creating Files From Other Version Control Systems
address@hidden Importing files, from other version control systems
+
+If you have a project which you are maintaining with
+another version control system, such as @sc{rcs}, you
+may wish to put the files from that project into
address@hidden, and preserve the revision history of the
+files.
+
address@hidden @asis
address@hidden RCS, importing files from
address@hidden From RCS
+If you have been using @sc{rcs}, find the @sc{rcs}
+files---usually a file named @file{foo.c} will have its
address@hidden file in @file{RCS/foo.c,v} (but it could be
+other places; consult the @sc{rcs} documentation for
+details).  Then create the appropriate directories in
address@hidden if they do not already exist.  Then copy the
+files into the appropriate directories in the @sc{cvs}
+repository (the name in the repository must be the name
+of the source file with @samp{,v} added; the files go
+directly in the appropriate directory of the repository,
+not in an @file{RCS} subdirectory).  This is one of the
+few times when it is a good idea to access the @sc{cvs}
+repository directly, rather than using @sc{cvs}
+commands.  Then you are ready to check out a new
+working directory.
address@hidden Someday there probably should be a "cvs import -t
address@hidden rcs" or some such.  It could even create magic
address@hidden branches.  It could also do something about the case
address@hidden where the RCS file had a (non-magic) "0" branch.
+
+The @sc{rcs} file should not be locked when you move it
+into @sc{cvs}; if it is, @sc{cvs} will have trouble
+letting you operate on it.
address@hidden What is the easiest way to unlock your files if you
address@hidden have them locked?  Especially if you have a lot of them?
address@hidden This is a CVS bug/misfeature; importing RCS files
address@hidden should ignore whether they are locked and leave them in
address@hidden an unlocked state.  Yet another reason for a separate
address@hidden "import RCS file" command.
+
address@hidden How many is "many"? Or do they just import RCS files?
address@hidden From another version control system
+Many version control systems have the ability to export
address@hidden files in the standard format.  If yours does,
+export the @sc{rcs} files and then follow the above
+instructions.
+
+Failing that, probably your best bet is to write a
+script that will check out the files one revision at a
+time using the command line interface to the other
+system, and then check the revisions into @sc{cvs}.
+The @file{sccs2rcs} script mentioned below may be a
+useful example to follow.
+
address@hidden SCCS, importing files from
address@hidden From SCCS
+There is a script in the @file{contrib} directory of
+the @sc{cvs} source distribution called @file{sccs2rcs}
+which converts @sc{sccs} files to @sc{rcs} files.
+Note: you must run it on a machine which has both
address@hidden and @sc{rcs} installed, and like everything
+else in contrib it is unsupported (your mileage may
+vary).
+
address@hidden PVCS, importing files from
address@hidden From PVCS
+There is a script in the @file{contrib} directory of
+the @sc{cvs} source distribution called @file{pvcs_to_rcs}
+which converts @sc{pvcs} archives to @sc{rcs} files.
+You must run it on a machine which has both
address@hidden and @sc{rcs} installed, and like everything
+else in contrib it is unsupported (your mileage may
+vary).  See the comments in the script for details.
address@hidden table
address@hidden CMZ and/or PATCHY were systems that were used in the
address@hidden high energy physics community (especially for
address@hidden CERNLIB).  CERN has replaced them with CVS, but the
address@hidden CAR format seems to live on as a way to submit
address@hidden changes.  There is a program car2cvs which converts
address@hidden but I'm not sure where one gets a copy.
address@hidden Not sure it is worth mentioning here, since it would
address@hidden appear to affect only one particular community.
address@hidden Best page for more information is:
address@hidden http://wwwcn1.cern.ch/asd/cvs/index.html
address@hidden See also:
address@hidden http://ecponion.cern.ch/ecpsa/cernlib.html
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden From scratch
address@hidden Creating a directory tree from scratch
+
address@hidden Also/instead should be documenting
address@hidden $ cvs co -l .
address@hidden $ mkdir tc
address@hidden $ cvs add tc
address@hidden $ cd tc
address@hidden $ mkdir man
address@hidden $ cvs add man
address@hidden etc.
address@hidden Using import to create the directories only is
address@hidden probably a somewhat confusing concept.
+For a new project, the easiest thing to do is probably
+to create an empty directory structure, like this:
+
address@hidden
+$ mkdir tc
+$ mkdir tc/man
+$ mkdir tc/testing
address@hidden example
+
+After that, you use the @code{import} command to create
+the corresponding (empty) directory structure inside
+the repository:
+
address@hidden
+$ cd tc
+$ cvs import -m "Created directory structure" yoyodyne/@var{dir} yoyo start
address@hidden example
+
+This will add yoyodyne/@var{dir} as a directory under
address@hidden
+
+Use @code{checkout} to get the new project.  Then, use @code{add}
+to add files (and new directories) as needed.
+
address@hidden
+$ cd ..
+$ cvs co yoyodyne/@var{dir}
address@hidden example
+
+Check that the permissions @sc{cvs} sets on the
+directories inside @code{$CVSROOT} are reasonable.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Defining the module
address@hidden Defining the module
address@hidden Defining a module
address@hidden Editing the modules file
address@hidden Module, defining
address@hidden Modules file, changing
+
+The next step is to define the module in the
address@hidden file.  This is not strictly necessary,
+but modules can be convenient in grouping together
+related files and directories.
+
+In simple cases these steps are sufficient to define a module.
+
address@hidden
address@hidden
+Get a working copy of the modules file.
+
address@hidden
+$ cvs checkout CVSROOT/modules
+$ cd CVSROOT
address@hidden example
+
address@hidden
+Edit the file and insert a line that defines the module.  @xref{Intro
+administrative files}, for an introduction.  @xref{modules}, for a full
+description of the modules file.  You can use the
+following line to define the module @samp{tc}:
+
address@hidden
+tc   yoyodyne/tc
address@hidden example
+
address@hidden
+Commit your changes to the modules file.
+
address@hidden
+$ cvs commit -m "Added the tc module." modules
address@hidden example
+
address@hidden
+Release the modules module.
+
address@hidden
+$ cd ..
+$ cvs release -d CVSROOT
address@hidden example
address@hidden enumerate
+
address@hidden 
---------------------------------------------------------------------
address@hidden Revisions
address@hidden Revisions
+
+For many uses of @sc{cvs}, one doesn't need to worry
+too much about revision numbers; @sc{cvs} assigns
+numbers such as @code{1.1}, @code{1.2}, and so on, and
+that is all one needs to know.  However, some people
+prefer to have more knowledge and control concerning
+how @sc{cvs} assigns revision numbers.
+
+If one wants to keep track of a set of revisions
+involving more than one file, such as which revisions
+went into a particular release, one uses a @dfn{tag},
+which is a symbolic revision which can be assigned to a
+numeric revision in each file.
+
address@hidden
+* Revision numbers::            The meaning of a revision number
+* Versions revisions releases::  Terminology used in this manual
+* Assigning revisions::         Assigning revisions
+* Tags::                        Tags--Symbolic revisions
+* Tagging the working directory::  The cvs tag command
+* Tagging by date/tag::         The cvs rtag command
+* Modifying tags::              Adding, renaming, and deleting tags
+* Tagging add/remove::          Tags with adding and removing files
+* Sticky tags::                 Certain tags are persistent
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Revision numbers
address@hidden Revision numbers
address@hidden Revision numbers
address@hidden Revision tree
address@hidden Linear development
address@hidden Number, revision-
address@hidden Decimal revision number
address@hidden Branch number
address@hidden Number, branch
+
+Each version of a file has a unique @dfn{revision
+number}.  Revision numbers look like @samp{1.1},
address@hidden, @samp{1.3.2.2} or even @samp{1.3.2.2.4.5}.
+A revision number always has an even number of
+period-separated decimal integers.  By default revision
+1.1 is the first revision of a file.  Each successive
+revision is given a new number by increasing the
+rightmost number by one.  The following figure displays
+a few revisions, with newer revisions to the right.
+
address@hidden
+       +-----+    +-----+    +-----+    +-----+    +-----+
+       ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
+       +-----+    +-----+    +-----+    +-----+    +-----+
address@hidden example
+
+It is also possible to end up with numbers containing
+more than one period, for example @samp{1.3.2.2}.  Such
+revisions represent revisions on branches
+(@pxref{Branching and merging}); such revision numbers
+are explained in detail in @ref{Branches and
+revisions}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Versions revisions releases
address@hidden Versions, revisions and releases
address@hidden Revisions, versions and releases
address@hidden Versions, revisions and releases
address@hidden Releases, revisions and versions
+
+A file can have several versions, as described above.
+Likewise, a software product can have several versions.
+A software product is often given a version number such
+as @samp{4.1.1}.
+
+Versions in the first sense are called @dfn{revisions}
+in this document, and versions in the second sense are
+called @dfn{releases}.  To avoid confusion, the word
address@hidden is almost never used in this document.
+
address@hidden Assigning revisions
address@hidden Assigning revisions
+
address@hidden We avoid the "major revision" terminology.  It seems
address@hidden like jargon.  Hopefully "first number" is clear enough.
address@hidden
address@hidden Well, in the context of software release numbers,
address@hidden "major" and "minor" release or version numbers are
address@hidden documented in at least the GNU Coding Standards, but I'm
address@hidden still not sure I find that a valid reason to apply the
address@hidden terminology to RCS revision numbers.  "First", "Second",
address@hidden "subsequent", and so on is almost surely clearer,
address@hidden especially to a novice reader. -DRP
+By default, @sc{cvs} will assign numeric revisions by
+leaving the first number the same and incrementing the
+second number.  For example, @code{1.1}, @code{1.2},
address@hidden, etc.
+
+When adding a new file, the second number will always
+be one and the first number will equal the highest
+first number of any file in that directory.  For
+example, the current directory contains files whose
+highest numbered revisions are @code{1.7}, @code{3.1},
+and @code{4.12}, then an added file will be given the
+numeric revision @code{4.1}.
+(When using client/server @sc{cvs},
+only files that are actually sent to the server are considered.)
+
address@hidden This is sort of redundant with something we said a
address@hidden while ago.  Somewhere we need a better way of
address@hidden introducing how the first number can be anything
address@hidden except "1", perhaps.  Also I don't think this
address@hidden presentation is clear on why we are discussing releases
address@hidden and first numbers of numeric revisions in the same
address@hidden breath.
+Normally there is no reason to care
+about the revision numbers---it is easier to treat them
+as internal numbers that @sc{cvs} maintains, and tags
+provide a better way to distinguish between things like
+release 1 versus release 2 of your product
+(@pxref{Tags}).  However, if you want to set the
+numeric revisions, the @samp{-r} option to @code{cvs
+commit} can do that.  The @samp{-r} option implies the
address@hidden option, in the sense that it causes the
+files to be committed even if they are not modified.
+
+For example, to bring all your files up to
+revision 3.0 (including those that haven't changed),
+you might invoke:
+
address@hidden
+$ cvs commit -r 3.0
address@hidden example
+
+Note that the number you specify with @samp{-r} must be
+larger than any existing revision number.  That is, if
+revision 3.0 exists, you cannot @samp{cvs commit
+-r 1.3}.  If you want to maintain several releases in
+parallel, you need to use a branch (@pxref{Branching and merging}).
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Tags
address@hidden Tags--Symbolic revisions
address@hidden Tags
+
+The revision numbers live a life of their own.  They
+need not have anything at all to do with the release
+numbers of your software product.  Depending
+on how you use @sc{cvs} the revision numbers might change several times
+between two releases.  As an example, some of the
+source files that make up @sc{rcs} 5.6 have the following
+revision numbers:
address@hidden RCS revision numbers
+
address@hidden
+ci.c            5.21
+co.c            5.9
+ident.c         5.3
+rcs.c           5.12
+rcsbase.h       5.11
+rcsdiff.c       5.10
+rcsedit.c       5.11
+rcsfcmp.c       5.9
+rcsgen.c        5.10
+rcslex.c        5.11
+rcsmap.c        5.2
+rcsutil.c       5.10
address@hidden example
+
address@hidden tag (subcommand), introduction
address@hidden Tags, symbolic name
address@hidden Symbolic name (tag)
address@hidden Name, symbolic (tag)
address@hidden HEAD, as reserved tag name
address@hidden BASE, as reserved tag name
+You can use the @code{tag} command to give a symbolic name to a
+certain revision of a file.  You can use the @samp{-v} flag to the
address@hidden command to see all tags that a file has, and
+which revision numbers they represent.  Tag names must
+start with an uppercase or lowercase letter and can
+contain uppercase and lowercase letters, digits,
address@hidden, and @samp{_}.  The two tag names @code{BASE}
+and @code{HEAD} are reserved for use by @sc{cvs}.  It
+is expected that future names which are special to
address@hidden will be specially named, for example by
+starting with @samp{.}, rather than being named analogously to
address@hidden and @code{HEAD}, to avoid conflicts with
+actual tag names.
address@hidden Including a character such as % or = has also been
address@hidden suggested as the naming convention for future
address@hidden special tag names.  Starting with . is nice because
address@hidden that is not a legal tag name as far as RCS is concerned.
address@hidden FIXME: CVS actually accepts quite a few characters
address@hidden in tag names, not just the ones documented above
address@hidden (see RCS_check_tag).  RCS
address@hidden defines legitimate tag names by listing illegal
address@hidden characters rather than legal ones.  CVS is said to lose its
address@hidden mind if you try to use "/" (try making such a tag sticky
address@hidden and using "cvs status" client/server--see remote
address@hidden protocol format for entries line for probable cause).
address@hidden TODO: The testsuite
address@hidden should test for whatever are documented above as
address@hidden officially-OK tag names, and CVS should at least reject
address@hidden characters that won't work, like "/".
+
+You'll want to choose some convention for naming tags,
+based on information such as the name of the program
+and the version number of the release.  For example,
+one might take the name of the program, immediately
+followed by the version number with @samp{.} changed to
address@hidden, so that @sc{cvs} 1.9 would be tagged with the name
address@hidden  If you choose a consistent convention,
+then you won't constantly be guessing whether a tag is
address@hidden or @code{cvs1_9} or what.  You might
+even want to consider enforcing your convention in the
address@hidden file (@pxref{taginfo}).
address@hidden Might be nice to say more about using taginfo this
address@hidden way, like giving an example, or pointing out any particular
address@hidden issues which arise.
+
address@hidden Adding a tag
address@hidden Tags, example
+The following example shows how you can add a tag to a
+file.  The commands must be issued inside your working
+directory.  That is, you should issue the
+command in the directory where @file{backend.c}
+resides.
+
address@hidden
+$ cvs tag rel-0-4 backend.c
+T backend.c
+$ cvs status -v backend.c
+===================================================================
+File: backend.c         Status: Up-to-date
+
+    Version:            1.4     Tue Dec  1 14:39:01 1992
+    RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
+    Sticky Tag:         (none)
+    Sticky Date:        (none)
+    Sticky Options:     (none)
+
+    Existing Tags:
+        rel-0-4                     (revision: 1.4)
+
address@hidden example
+
+For a complete summary of the syntax of @code{cvs tag},
+including the various options, see @ref{Invoking CVS}.
+
+There is seldom reason to tag a file in isolation.  A more common use is
+to tag all the files that constitute a module with the same tag at
+strategic points in the development life-cycle, such as when a release
+is made.
+
address@hidden
+$ cvs tag rel-1-0 .
+cvs tag: Tagging .
+T Makefile
+T backend.c
+T driver.c
+T frontend.c
+T parser.c
address@hidden example
+
address@hidden
+(When you give @sc{cvs} a directory as argument, it generally applies the
+operation to all the files in that directory, and (recursively), to any
+subdirectories that it may contain.  @xref{Recursive behavior}.)
+
address@hidden Retrieving an old revision using tags
address@hidden Tags, retrieving old revisions
+The @code{checkout} command has a flag, @samp{-r}, that lets you check out
+a certain revision of a module.  This flag makes it easy to
+retrieve the sources that make up release 1.0 of the module @samp{tc} at
+any time in the future:
+
address@hidden
+$ cvs checkout -r rel-1-0 tc
address@hidden example
+
address@hidden
+This is useful, for instance, if someone claims that there is a bug in
+that release, but you cannot find the bug in the current working copy.
+
+You can also check out a module as it was on any branch at any given date.
address@hidden options}.  When specifying @samp{-r} or @samp{-D} to
+any of these commands, you will need beware of sticky
+tags; see @ref{Sticky tags}.
+
+When you tag more than one file with the same tag you
+can think about the tag as "a curve drawn through a
+matrix of filename vs. revision number."  Say we have 5
+files with the following revisions:
+
address@hidden
address@hidden
+        file1   file2   file3   file4   file5
+
+        1.1     1.1     1.1     1.1  /--1.1*      <-*-  TAG
+        1.2*-   1.2     1.2    -1.2*-
+        1.3  \- 1.3*-   1.3   / 1.3
+        1.4          \  1.4  /  1.4
+                      \-1.5*-   1.5
+                        1.6
address@hidden group
address@hidden example
+
+At some time in the past, the @code{*} versions were tagged.
+You can think of the tag as a handle attached to the curve
+drawn through the tagged revisions.  When you pull on
+the handle, you get all the tagged revisions.  Another
+way to look at it is that you "sight" through a set of
+revisions that is "flat" along the tagged revisions,
+like this:
+
address@hidden
address@hidden
+        file1   file2   file3   file4   file5
+
+                        1.1
+                        1.2
+                1.1     1.3                       _
+        1.1     1.2     1.4     1.1              /
+        1.2*----1.3*----1.5*----1.2*----1.1*    (--- <--- Look here
+        1.3             1.6     1.3              \_
+        1.4                     1.4
+                                1.5
address@hidden group
address@hidden example
+
address@hidden Tagging the working directory
address@hidden Specifying what to tag from the working directory
+
address@hidden tag (subcommand)
+The example in the previous section demonstrates one of
+the most common ways to choose which revisions to tag.
+Namely, running the @code{cvs tag} command without
+arguments causes @sc{cvs} to select the revisions which
+are checked out in the current working directory.  For
+example, if the copy of @file{backend.c} in working
+directory was checked out from revision 1.4, then
address@hidden will tag revision 1.4.  Note that the tag is
+applied immediately to revision 1.4 in the repository;
+tagging is not like modifying a file, or other
+operations in which one first modifies the working
+directory and then runs @code{cvs commit} to transfer
+that modification to the repository.
+
+One potentially surprising aspect of the fact that
address@hidden tag} operates on the repository is that you
+are tagging the checked-in revisions, which may differ
+from locally modified files in your working directory.
+If you want to avoid doing this by mistake, specify the
address@hidden option to @code{cvs tag}.  If there are any
+locally modified files, @sc{cvs} will abort with an
+error before it tags any files:
+
address@hidden
+$ cvs tag -c rel-0-4
+cvs tag: backend.c is locally modified
+cvs [tag aborted]: correct the above errors first!
address@hidden example
+
address@hidden Tagging by date/tag
address@hidden Specifying what to tag by date or revision
address@hidden rtag (subcommand)
+
+The @code{cvs rtag} command tags the repository as of a
+certain date or time (or can be used to tag the latest
+revision).  @code{rtag} works directly on the
+repository contents (it requires no prior checkout and
+does not look for a working directory).
+
+The following options specify which date or revision to
+tag.  See @ref{Common options}, for a complete
+description of them.
+
address@hidden @code
address@hidden -D @var{date}
+Tag the most recent revision no later than @var{date}.
+
address@hidden -f
+Only useful with the @samp{-D} or @samp{-r}
+flags.  If no matching revision is found, use the most
+recent revision (instead of ignoring the file).
+
address@hidden -r @var{tag}[:@var{date}]
+Tag the revision already tagged with @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
address@hidden table
+
+The @code{cvs tag} command also allows one to specify
+files by revision or date, using the same @samp{-r},
address@hidden, and @samp{-f} options.  However, this
+feature is probably not what you want.  The reason is
+that @code{cvs tag} chooses which files to tag based on
+the files that exist in the working directory, rather
+than the files which existed as of the given tag/date.
+Therefore, you are generally better off using @code{cvs
+rtag}.  The exceptions might be cases like:
+
address@hidden
+cvs tag -r 1.4 stable backend.c
address@hidden example
+
address@hidden Modifying tags
address@hidden Deleting, moving, and renaming tags
+
address@hidden Also see:
address@hidden  "How do I move or rename a magic branch tag?"
address@hidden in the FAQ (I think the issues it talks about still
address@hidden apply, but this could use some sanity.sh work).
+
+Normally one does not modify tags.  They exist in order
+to record the history of the repository and so deleting
+them or changing their meaning would, generally, not be
+what you want.
+
+However, there might be cases in which one uses a tag
+temporarily or accidentally puts one in the wrong
+place.  Therefore, one might delete, move, or rename a
+tag.
+
address@hidden
address@hidden: the commands in this section are
+dangerous; they permanently discard historical
+information and it can be difficult or impossible to
+recover from errors.  If you are a @sc{cvs}
+administrator, you may consider restricting these
+commands with the @file{taginfo} file (@pxref{taginfo}).}
+
address@hidden Deleting tags
address@hidden Deleting branch tags
address@hidden Removing tags
address@hidden Removing branch tags
address@hidden Tags, deleting
address@hidden Branch tags, deleting
+To delete a tag, specify the @samp{-d} option to either
address@hidden tag} or @code{cvs rtag}.  For example:
+
address@hidden
+cvs rtag -d rel-0-4 tc
address@hidden example
+
address@hidden
+deletes the non-branch tag @code{rel-0-4} from the module @code{tc}.
+In the event that branch tags are encountered within the repository
+with the given name, a warning message will be issued and the branch 
+tag will not be deleted.  If you are absolutely certain you know what
+you are doing, the @code{-B} option may be specified to allow deletion
+of branch tags.  In that case, any non-branch tags encountered will
+trigger warnings and will not be deleted.
+
address@hidden
address@hidden: Moving branch tags is very dangerous!  If you think
+you need the @code{-B} option, think again and ask your @sc{cvs}
+administrator about it (if that isn't you).  There is almost certainly
+another way to accomplish what you want to accomplish.}
+
address@hidden Moving tags
address@hidden Moving branch tags
address@hidden Tags, moving
address@hidden Branch tags, moving
+When we say @dfn{move} a tag, we mean to make the same
+name point to different revisions.  For example, the
address@hidden tag may currently point to revision 1.4
+of @file{backend.c} and perhaps we want to make it
+point to revision 1.6.  To move a non-branch tag, specify the
address@hidden option to either @code{cvs tag} or @code{cvs
+rtag}.  For example, the task just mentioned might be
+accomplished as:
+
address@hidden
+cvs tag -r 1.6 -F stable backend.c
address@hidden example
+
address@hidden
+If any branch tags are encountered in the repository 
+with the given name, a warning is issued and the branch
+tag is not disturbed.  If you are absolutely certain you
+wish to move the branch tag, the @code{-B} option may be specified.
+In that case, non-branch tags encountered with the given
+name are ignored with a warning message.
+
address@hidden
address@hidden: Moving branch tags is very dangerous!  If you think you
+need the @code{-B} option, think again and ask your @sc{cvs}
+administrator about it (if that isn't you).  There is almost certainly
+another way to accomplish what you want to accomplish.}
+
address@hidden Renaming tags
address@hidden Tags, renaming
+When we say @dfn{rename} a tag, we mean to make a
+different name point to the same revisions as the old
+tag.  For example, one may have misspelled the tag name
+and want to correct it (hopefully before others are
+relying on the old spelling).  To rename a tag, first
+create a new tag using the @samp{-r} option to
address@hidden rtag}, and then delete the old name.  (Caution:
+this method will not work with branch tags.) 
+This leaves the new tag on exactly the 
+same files as the old tag.  For example:
+
address@hidden
+cvs rtag -r old-name-0-4 rel-0-4 tc
+cvs rtag -d old-name-0-4 tc
address@hidden example
+
address@hidden Tagging add/remove
address@hidden Tagging and adding and removing files
+
+The subject of exactly how tagging interacts with
+adding and removing files is somewhat obscure; for the
+most part @sc{cvs} will keep track of whether files
+exist or not without too much fussing.  By default,
+tags are applied to only files which have a revision
+corresponding to what is being tagged.  Files which did
+not exist yet, or which were already removed, simply
+omit the tag, and @sc{cvs} knows to treat the absence
+of a tag as meaning that the file didn't exist as of
+that tag.
+
+However, this can lose a small amount of information.
+For example, suppose a file was added and then removed.
+Then, if the tag is missing for that file, there is no
+way to know whether the tag refers to the time before
+the file was added, or the time after it was removed.
+If you specify the @samp{-r} option to @code{cvs rtag},
+then @sc{cvs} tags the files which have been removed,
+and thereby avoids this problem.  For example, one
+might specify @code{-r HEAD} to tag the head.
+
+On the subject of adding and removing files, the
address@hidden rtag} command has a @samp{-a} option which
+means to clear the tag from removed files that would
+not otherwise be tagged.  For example, one might
+specify this option in conjunction with @samp{-F} when
+moving a tag.  If one moved a tag without @samp{-a},
+then the tag in the removed files might still refer to
+the old revision, rather than reflecting the fact that
+the file had been removed.  I don't think this is
+necessary if @samp{-r} is specified, as noted above.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Sticky tags
address@hidden Sticky tags
address@hidden Sticky tags
address@hidden Tags, sticky
+
address@hidden A somewhat related issue is per-directory sticky
address@hidden tags (see comment at CVS/Tag in node Working
address@hidden directory storage); we probably want to say
address@hidden something like "you can set a sticky tag for only
address@hidden some files, but you don't want to" or some such.
+
+Sometimes a working copy's revision has extra data
+associated with it, for example it might be on a branch
+(@pxref{Branching and merging}), or restricted to
+versions prior to a certain date by @samp{checkout -D}
+or @samp{update -D}.  Because this data persists --
+that is, it applies to subsequent commands in the
+working copy -- we refer to it as @dfn{sticky}.
+
+Most of the time, stickiness is an obscure aspect of
address@hidden that you don't need to think about.  However,
+even if you don't want to use the feature, you may need
+to know @emph{something} about sticky tags (for
+example, how to avoid them!).
+
+You can use the @code{status} command to see if any
+sticky tags or dates are set:
+
address@hidden
+$ cvs status driver.c
+===================================================================
+File: driver.c          Status: Up-to-date
+
+    Version:            1.7.2.1 Sat Dec  5 19:35:03 1992
+    RCS Version:        1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
+    Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
+    Sticky Date:        (none)
+    Sticky Options:     (none)
+
address@hidden example
+
address@hidden Resetting sticky tags
address@hidden Sticky tags, resetting
address@hidden Deleting sticky tags
+The sticky tags will remain on your working files until
+you delete them with @samp{cvs update -A}.  The
address@hidden option merges local changes into the version of the
+file from the head of the trunk, removing any sticky tags,
+dates, or options.  See @ref{update} for more on the operation
+of @code{cvs update}.
+
address@hidden Sticky date
+The most common use of sticky tags is to identify which
+branch one is working on, as described in
address@hidden branches}.  However, non-branch
+sticky tags have uses as well.  For example,
+suppose that you want to avoid updating your working
+directory, to isolate yourself from possibly
+destabilizing changes other people are making.  You
+can, of course, just refrain from running @code{cvs
+update}.  But if you want to avoid updating only a
+portion of a larger tree, then sticky tags can help.
+If you check out a certain revision (such as 1.4) it
+will become sticky.  Subsequent @code{cvs update}
+commands will
+not retrieve the latest revision until you reset the
+tag with @code{cvs update -A}.  Likewise, use of the
address@hidden option to @code{update} or @code{checkout}
+sets a @dfn{sticky date}, which, similarly, causes that
+date to be used for future retrievals.
+
+People often want to retrieve an old version of
+a file without setting a sticky tag.  This can
+be done with the @samp{-p} option to @code{checkout} or
address@hidden, which sends the contents of the file to
+standard output.  For example:
address@hidden
+$ cvs update -p -r 1.1 file1 >file1
+===================================================================
+Checking out file1
+RCS:  /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v
+VERS: 1.1
+***************
+$
address@hidden example
+
+However, this isn't the easiest way, if you are asking
+how to undo a previous checkin (in this example, put
address@hidden back to the way it was as of revision
+1.1).  In that case you are better off using the
address@hidden option to @code{update}; for further
+discussion see @ref{Merging two revisions}.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Branching and merging
address@hidden Branching and merging
address@hidden Branching
address@hidden Merging
address@hidden Copying changes
address@hidden Main trunk and branches
address@hidden Revision tree, making branches
address@hidden Branches, copying changes between
address@hidden Changes, copying between branches
address@hidden Modifications, copying between branches
+
address@hidden allows you to isolate changes onto a separate
+line of development, known as a @dfn{branch}.  When you
+change files on a branch, those changes do not appear
+on the main trunk or other branches.
+
+Later you can move changes from one branch to another
+branch (or the main trunk) by @dfn{merging}.  Merging
+involves first running @code{cvs update -j}, to merge
+the changes into the working directory.
+You can then commit that revision, and thus effectively
+copy the changes onto another branch.
+
address@hidden
+* Branches motivation::         What branches are good for
+* Creating a branch::           Creating a branch
+* Accessing branches::          Checking out and updating branches
+* Branches and revisions::      Branches are reflected in revision numbers
+* Magic branch numbers::        Magic branch numbers
+* Merging a branch::            Merging an entire branch
+* Merging more than once::      Merging from a branch several times
+* Merging two revisions::       Merging differences between two revisions
+* Merging adds and removals::   What if files are added or removed?
+* Merging and keywords::        Avoiding conflicts due to keyword substitution
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Branches motivation
address@hidden What branches are good for
address@hidden Branches motivation
address@hidden What branches are good for
address@hidden Motivation for branches
+
address@hidden FIXME: this node mentions one way to use branches,
address@hidden but it is by no means the only way.  For example,
address@hidden the technique of committing a new feature on a branch,
address@hidden until it is ready for the main trunk.  The whole
address@hidden thing is generally speaking more akin to the
address@hidden "Revision management" node although it isn't clear to
address@hidden me whether policy matters should be centralized or
address@hidden distributed throughout the relevant sections.
+Suppose that release 1.0 of tc has been made.  You are continuing to
+develop tc, planning to create release 1.1 in a couple of months.  After a
+while your customers start to complain about a fatal bug.  You check
+out release 1.0 (@pxref{Tags}) and find the bug
+(which turns out to have a trivial fix).  However, the current revision
+of the sources are in a state of flux and are not expected to be stable
+for at least another month.  There is no way to make a
+bug fix release based on the newest sources.
+
+The thing to do in a situation like this is to create a @dfn{branch} on
+the revision trees for all the files that make up
+release 1.0 of tc.  You can then make
+modifications to the branch without disturbing the main trunk.  When the
+modifications are finished you can elect to either incorporate them on
+the main trunk, or leave them on the branch.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Creating a branch
address@hidden Creating a branch
address@hidden Creating a branch
address@hidden Branch, creating a
address@hidden tag (subcommand), creating a branch using
address@hidden rtag (subcommand), creating a branch using
+
+You can create a branch with @code{tag -b}; for
+example, assuming you're in a working copy:
+
address@hidden
+$ cvs tag -b rel-1-0-patches
address@hidden example
+
address@hidden FIXME: we should be more explicit about the value of
address@hidden having a tag on the branchpoint.  For example
address@hidden "cvs tag rel-1-0-patches-branchpoint" before
address@hidden the "cvs tag -b".  This points out that
address@hidden rel-1-0-patches is a pretty awkward name for
address@hidden this example (more so than for the rtag example
address@hidden below).
+
+This splits off a branch based on the current revisions
+in the working copy, assigning that branch the name
address@hidden
+
+It is important to understand that branches get created
+in the repository, not in the working copy.  Creating a
+branch based on current revisions, as the above example
+does, will @emph{not} automatically switch the working
+copy to be on the new branch.  For information on how
+to do that, see @ref{Accessing branches}.
+
+You can also create a branch without reference to any
+working copy, by using @code{rtag}:
+
address@hidden
+$ cvs rtag -b -r rel-1-0 rel-1-0-patches tc
address@hidden example
+
address@hidden rel-1-0} says that this branch should be
+rooted at the revision that
+corresponds to the tag @samp{rel-1-0}.  It need not
+be the most recent revision -- it's often useful to
+split a branch off an old revision (for example, when
+fixing a bug in a past release otherwise known to be
+stable).
+
+As with @samp{tag}, the @samp{-b} flag tells
address@hidden to create a branch (rather than just a
+symbolic revision name).  Note that the numeric
+revision number that matches @samp{rel-1-0} will
+probably be different from file to file.
+
+So, the full effect of the command is to create a new
+branch -- named @samp{rel-1-0-patches} -- in module
address@hidden, rooted in the revision tree at the point tagged
+by @samp{rel-1-0}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Accessing branches
address@hidden Accessing branches
address@hidden Check out a branch
address@hidden Retrieve a branch
address@hidden Access a branch
address@hidden Identifying a branch
address@hidden Branch, check out
address@hidden Branch, retrieving
address@hidden Branch, accessing
address@hidden Branch, identifying
+
+You can retrieve a branch in one of two ways: by
+checking it out fresh from the repository, or by
+switching an existing working copy over to the branch.
+
+To check out a branch from the repository, invoke
address@hidden with the @samp{-r} flag, followed by
+the tag name of the branch (@pxref{Creating a branch}):
+
address@hidden
+$ cvs checkout -r rel-1-0-patches tc
address@hidden example
+
+Or, if you already have a working copy, you can switch
+it to a given branch with @samp{update -r}:
+
address@hidden
+$ cvs update -r rel-1-0-patches tc
address@hidden example
+
address@hidden
+or equivalently:
+
address@hidden
+$ cd tc
+$ cvs update -r rel-1-0-patches
address@hidden example
+
+It does not matter if the working copy was originally
+on the main trunk or on some other branch -- the above
+command will switch it to the named branch.  And
+similarly to a regular @samp{update} command,
address@hidden -r} merges any changes you have made,
+notifying you of conflicts where they occur.
+
+Once you have a working copy tied to a particular
+branch, it remains there until you tell it otherwise.
+This means that changes checked in from the working
+copy will add new revisions on that branch, while
+leaving the main trunk and other branches unaffected.
+
address@hidden Branches, sticky
+To find out what branch a working copy is on, you can
+use the @samp{status} command.  In its output, look for
+the field named @samp{Sticky tag} (@pxref{Sticky tags})
+-- that's @sc{cvs}'s way of telling you the branch, if
+any, of the current working files:
+
address@hidden
+$ cvs status -v driver.c backend.c
+===================================================================
+File: driver.c          Status: Up-to-date
+
+    Version:            1.7     Sat Dec  5 18:25:54 1992
+    RCS Version:        1.7     /u/cvsroot/yoyodyne/tc/driver.c,v
+    Sticky Tag:         rel-1-0-patches (branch: 1.7.2)
+    Sticky Date:        (none)
+    Sticky Options:     (none)
+
+    Existing Tags:
+        rel-1-0-patches             (branch: 1.7.2)
+        rel-1-0                     (revision: 1.7)
+
+===================================================================
+File: backend.c         Status: Up-to-date
+
+    Version:            1.4     Tue Dec  1 14:39:01 1992
+    RCS Version:        1.4     /u/cvsroot/yoyodyne/tc/backend.c,v
+    Sticky Tag:         rel-1-0-patches (branch: 1.4.2)
+    Sticky Date:        (none)
+    Sticky Options:     (none)
+
+    Existing Tags:
+        rel-1-0-patches             (branch: 1.4.2)
+        rel-1-0                     (revision: 1.4)
+        rel-0-4                     (revision: 1.4)
+
address@hidden example
+
+Don't be confused by the fact that the branch numbers
+for each file are different (@samp{1.7.2} and
address@hidden respectively).  The branch tag is the
+same, @samp{rel-1-0-patches}, and the files are
+indeed on the same branch.  The numbers simply reflect
+the point in each file's revision history at which the
+branch was made.  In the above example, one can deduce
+that @samp{driver.c} had been through more changes than
address@hidden before this branch was created.
+
+See @ref{Branches and revisions} for details about how
+branch numbers are constructed.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Branches and revisions
address@hidden Branches and revisions
address@hidden Branch number
address@hidden Number, branch
address@hidden Revision numbers (branches)
+
+Ordinarily, a file's revision history is a linear
+series of increments (@pxref{Revision numbers}):
+
address@hidden
+       +-----+    +-----+    +-----+    +-----+    +-----+
+       ! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !
+       +-----+    +-----+    +-----+    +-----+    +-----+
address@hidden example
+
+However, @sc{cvs} is not limited to linear development.  The
address@hidden tree} can be split into @dfn{branches},
+where each branch is a self-maintained line of
+development.  Changes made on one branch can easily be
+moved back to the main trunk.
+
+Each branch has a @dfn{branch number}, consisting of an
+odd number of period-separated decimal integers.  The
+branch number is created by appending an integer to the
+revision number where the corresponding branch forked
+off.  Having branch numbers allows more than one branch
+to be forked off from a certain revision.
+
address@hidden 3500
+All revisions on a branch have revision numbers formed
+by appending an ordinal number to the branch number.
+The following figure illustrates branching with an
+example.
+
address@hidden
address@hidden This example used to have a 1.2.2.4 revision, which
address@hidden might help clarify that development can continue on
address@hidden 1.2.2.  Might be worth reinstating if it can be done
address@hidden without overfull hboxes.
address@hidden
+                                                      +-------------+
+                           Branch 1.2.2.3.2 ->        ! 1.2.2.3.2.1 !
+                                                    / +-------------+
+                                                   /
+                                                  /
+                 +---------+    +---------+    +---------+
+Branch 1.2.2 -> _! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
+               / +---------+    +---------+    +---------+
+              /
+             /
++-----+    +-----+    +-----+    +-----+    +-----+
+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !  <- The main trunk
++-----+    +-----+    +-----+    +-----+    +-----+
+                !
+                !
+                !   +---------+    +---------+    +---------+
+Branch 1.2.4 -> +---! 1.2.4.1 !----! 1.2.4.2 !----! 1.2.4.3 !
+                    +---------+    +---------+    +---------+
+
address@hidden group
address@hidden example
+
address@hidden --   However, at least for me the figure is not enough.  I 
suggest more
address@hidden --   text to accompany it.  "A picture is worth a thousand 
words", so you
address@hidden --   have to make sure the reader notices the couple of hundred 
words
address@hidden --   *you* had in mind more than the others!
+
address@hidden --   Why an even number of segments?  This section implies that 
this is
address@hidden --   how the main trunk is distinguished from branch roots, but 
you never
address@hidden --   explicitly say that this is the purpose of the [by itself 
rather
address@hidden --   surprising] restriction to an even number of segments.
+
+The exact details of how the branch number is
+constructed is not something you normally need to be
+concerned about, but here is how it works: When
address@hidden creates a branch number it picks the first
+unused even integer, starting with 2.  So when you want
+to create a branch from revision 6.4 it will be
+numbered 6.4.2.  All branch numbers ending in a zero
+(such as 6.4.0) are used internally by @sc{cvs}
+(@pxref{Magic branch numbers}).  The branch 1.1.1 has a
+special meaning.  @xref{Tracking sources}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Magic branch numbers
address@hidden Magic branch numbers
+
address@hidden Want xref to here from "log"?
+
+This section describes a @sc{cvs} feature called
address@hidden branches}.  For most purposes, you need not
+worry about magic branches; @sc{cvs} handles them for
+you.  However, they are visible to you in certain
+circumstances, so it may be useful to have some idea of
+how it works.
+
+Externally, branch numbers consist of an odd number of
+dot-separated decimal integers.  @xref{Revision
+numbers}.  That is not the whole truth, however.  For
+efficiency reasons @sc{cvs} sometimes inserts an extra 0
+in the second rightmost position (1.2.4 becomes
+1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
+on).
+
address@hidden does a pretty good job at hiding these so
+called magic branches, but in a few places the hiding
+is incomplete:
+
address@hidden @bullet
address@hidden
address@hidden This is in ignore as I'm taking their word for it,
address@hidden that this was fixed
address@hidden a long time ago.  But before deleting this
address@hidden entirely, I'd rather verify it (and add a test
address@hidden case to the testsuite).
address@hidden
+The magic branch can appear in the output from
address@hidden status} in vanilla @sc{cvs} 1.3.  This is
+fixed in @sc{cvs} 1.3-s2.
+
address@hidden ignore
address@hidden
+The magic branch number appears in the output from
address@hidden log}.
address@hidden What output should appear instead?
+
address@hidden
+You cannot specify a symbolic branch name to @code{cvs
+admin}.
+
address@hidden itemize
+
address@hidden Can CVS do this automatically the first time
address@hidden you check something in to that branch?  Should
address@hidden it?
+You can use the @code{admin} command to reassign a
+symbolic name to a branch the way @sc{rcs} expects it
+to be.  If @code{R4patches} is assigned to the branch
+1.4.2 (magic branch number 1.4.0.2) in file
address@hidden you can do this:
+
address@hidden
+$ cvs admin -NR4patches:1.4.2 numbers.c
address@hidden example
+
+It only works if at least one revision is already
+committed on the branch.  Be very careful so that you
+do not assign the tag to the wrong number.  (There is
+no way to see how the tag was assigned yesterday).
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Merging a branch
address@hidden Merging an entire branch
address@hidden Merging a branch
address@hidden -j (merging branches)
+
+You can merge changes made on a branch into your working copy by giving
+the @samp{-j @var{branchname}} flag to the @code{update} subcommand.  With one
address@hidden @var{branchname}} option it merges the changes made between the
+greatest common ancestor (GCA) of the branch and the destination revision (in
+the simple case below the GCA is the point where the branch forked) and the
+newest revision on that branch into your working copy.
+
address@hidden Join
+The @samp{-j} stands for ``join''.
+
address@hidden Branch merge example
address@hidden Example, branch merge
address@hidden Merge, branch example
+Consider this revision tree:
+
address@hidden
++-----+    +-----+    +-----+    +-----+
+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !      <- The main trunk
++-----+    +-----+    +-----+    +-----+
+                !
+                !
+                !   +---------+    +---------+
+Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
+                    +---------+    +---------+
address@hidden example
+
address@hidden
+The branch 1.2.2 has been given the tag (symbolic name) @samp{R1fix}.  The
+following example assumes that the module @samp{mod} contains only one
+file, @file{m.c}.
+
address@hidden
+$ cvs checkout mod               # @r{Retrieve the latest revision, 1.4}
+
+$ cvs update -j R1fix m.c        # @r{Merge all changes made on the branch,}
+                                 # @r{i.e. the changes between revision 1.2}
+                                 # @r{and 1.2.2.2, into your working copy}
+                                 # @r{of the file.}
+
+$ cvs commit -m "Included R1fix" # @r{Create revision 1.5.}
address@hidden example
+
+A conflict can result from a merge operation.  If that
+happens, you should resolve it before committing the
+new revision.  @xref{Conflicts example}.
+
+If your source files contain keywords (@pxref{Keyword substitution}),
+you might be getting more conflicts than strictly necessary.  See
address@hidden and keywords}, for information on how to avoid this.
+
+The @code{checkout} command also supports the @samp{-j @var{branchname}} flag. 
 The
+same effect as above could be achieved with this:
+
address@hidden
+$ cvs checkout -j R1fix mod
+$ cvs commit -m "Included R1fix"
address@hidden example
+
+It should be noted that @code{update -j @var{tagname}} will also work but may
+not produce the desired result.  @xref{Merging adds and removals}, for more.
+
address@hidden Merging more than once
address@hidden Merging from a branch several times
+
+Continuing our example, the revision tree now looks
+like this:
+
address@hidden
++-----+    +-----+    +-----+    +-----+    +-----+
+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   <- The main trunk
++-----+    +-----+    +-----+    +-----+    +-----+
+                !                           *
+                !                          *
+                !   +---------+    +---------+
+Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !
+                    +---------+    +---------+
address@hidden example
+
address@hidden
+where the starred line represents the merge from the
address@hidden branch to the main trunk, as just
+discussed.
+
+Now suppose that development continues on the
address@hidden branch:
+
address@hidden
++-----+    +-----+    +-----+    +-----+    +-----+
+! 1.1 !----! 1.2 !----! 1.3 !----! 1.4 !----! 1.5 !   <- The main trunk
++-----+    +-----+    +-----+    +-----+    +-----+
+                !                           *
+                !                          *
+                !   +---------+    +---------+    +---------+
+Branch R1fix -> +---! 1.2.2.1 !----! 1.2.2.2 !----! 1.2.2.3 !
+                    +---------+    +---------+    +---------+
address@hidden example
+
address@hidden
+and then you want to merge those new changes onto the
+main trunk.  If you just use the @code{cvs update -j
+R1fix m.c} command again, @sc{cvs} will attempt to
+merge again the changes which you have already merged,
+which can have undesirable side effects.
+
+So instead you need to specify that you only want to
+merge the changes on the branch which have not yet been
+merged into the trunk.  To do that you specify two
address@hidden options, and @sc{cvs} merges the changes from
+the first revision to the second revision.  For
+example, in this case the simplest way would be
+
address@hidden
+cvs update -j 1.2.2.2 -j R1fix m.c    # @r{Merge changes from 1.2.2.2 to the}
+                                      # @r{head of the R1fix branch}
address@hidden example
+
+The problem with this is that you need to specify the
+1.2.2.2 revision manually.  A slightly better approach
+might be to use the date the last merge was done:
+
address@hidden
+cvs update -j R1fix:yesterday -j R1fix m.c
address@hidden example
+
+Better yet, tag the R1fix branch after every merge into
+the trunk, and then use that tag for subsequent merges:
+
address@hidden
+cvs update -j merged_from_R1fix_to_trunk -j R1fix m.c
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Merging two revisions
address@hidden Merging differences between any two revisions
address@hidden Merging two revisions
address@hidden Revisions, merging differences between
address@hidden Differences, merging
+
+With two @samp{-j @var{revision}} flags, the @code{update}
+(and @code{checkout}) command can merge the differences
+between any two revisions into your working file.
+
address@hidden Undoing a change
address@hidden Removing a change
address@hidden
+$ cvs update -j 1.5 -j 1.3 backend.c
address@hidden example
+
address@hidden
+will undo all changes made between revision
+1.3 and 1.5.  Note the order of the revisions!
+
+If you try to use this option when operating on
+multiple files, remember that the numeric revisions will
+probably be very different between the various files.
+You almost always use symbolic
+tags rather than revision numbers when operating on
+multiple files.
+
address@hidden Restoring old version of removed file
address@hidden Resurrecting old version of dead file
+Specifying two @samp{-j} options can also undo file
+removals or additions.  For example, suppose you have
+a file
+named @file{file1} which existed as revision 1.1, and
+you then removed it (thus adding a dead revision 1.2).
+Now suppose you want to add it again, with the same
+contents it had previously.  Here is how to do it:
+
address@hidden
+$ cvs update -j 1.2 -j 1.1 file1
+U file1
+$ cvs commit -m test
+Checking in file1;
+/tmp/cvs-sanity/cvsroot/first-dir/file1,v  <--  file1
+new revision: 1.3; previous revision: 1.2
+done
+$
address@hidden example
+
address@hidden Merging adds and removals
address@hidden Merging can add or remove files
+
+If the changes which you are merging involve removing
+or adding some files, @code{update -j} will reflect
+such additions or removals.
+
address@hidden FIXME: This example needs a lot more explanation.
address@hidden We also need other examples for some of the other
address@hidden cases (not all--there are too many--as long as we present a
address@hidden coherent general principle).
+For example:
address@hidden
+cvs update -A
+touch a b c
+cvs add a b c ; cvs ci -m "added" a b c
+cvs tag -b branchtag
+cvs update -r branchtag
+touch d ; cvs add d
+rm a ; cvs rm a
+cvs ci -m "added d, removed a"
+cvs update -A
+cvs update -jbranchtag
address@hidden example
+
+After these commands are executed and a @samp{cvs commit} is done,
+file @file{a} will be removed and file @file{d} added in the main branch.
address@hidden (which was determined by trying it)
+
+Note that using a single static tag (@samp{-j @var{tagname}})
+rather than a dynamic tag (@samp{-j @var{branchname}}) to merge
+changes from a branch will usually not remove files which were removed on the
+branch since @sc{cvs} does not automatically add static tags to dead revisions.
+The exception to this rule occurs when
+a static tag has been attached to a dead revision manually.  Use the branch tag
+to merge all changes from the branch or use two static tags as merge endpoints
+to be sure that all intended changes are propagated in the merge.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Merging and keywords
address@hidden Merging and keywords
address@hidden Merging, and keyword substitution
address@hidden Keyword substitution, and merging
address@hidden -j (merging branches), and keyword substitution
address@hidden -kk, to avoid conflicts during a merge
+
+If you merge files containing keywords (@pxref{Keyword
+substitution}), you will normally get numerous
+conflicts during the merge, because the keywords are
+expanded differently in the revisions which you are
+merging.
+
+Therefore, you will often want to specify the
address@hidden (@pxref{Substitution modes}) switch to the
+merge command line.  By substituting just the name of
+the keyword, not the expanded value of that keyword,
+this option ensures that the revisions which you are
+merging will be the same as each other, and avoid
+spurious conflicts.
+
+For example, suppose you have a file like this:
+
address@hidden
+       +---------+
+      _! 1.1.2.1 !   <-  br1
+     / +---------+
+    /
+   /
++-----+    +-----+
+! 1.1 !----! 1.2 !
++-----+    +-----+
address@hidden example
+
address@hidden
+and your working directory is currently on the trunk
+(revision 1.2).  Then you might get the following
+results from a merge:
+
address@hidden
+$ cat file1
+key address@hidden: 1.2 $
+. . .
+$ cvs update -j br1
+U file1
+RCS file: /cvsroot/first-dir/file1,v
+retrieving revision 1.1
+retrieving revision 1.1.2.1
+Merging differences between 1.1 and 1.1.2.1 into file1
+rcsmerge: warning: conflicts during merge
+$ cat file1
address@hidden<<<<<<< file1
+key address@hidden: 1.2 $
address@hidden
+key address@hidden: 1.1.2.1 $
address@hidden>>>>>>> 1.1.2.1
+. . .
address@hidden example
+
+What happened was that the merge tried to merge the
+differences between 1.1 and 1.1.2.1 into your working
+directory.  So, since the keyword changed from
address@hidden: 1.1} to @code{Revision: 1.1.2.1},
address@hidden tried to merge that change into your working
+directory, which conflicted with the fact that your
+working directory had contained @code{Revision: 1.2}.
+
+Here is what happens if you had used @samp{-kk}:
+
address@hidden
+$ cat file1
+key address@hidden: 1.2 $
+. . .
+$ cvs update -kk -j br1
+U file1
+RCS file: /cvsroot/first-dir/file1,v
+retrieving revision 1.1
+retrieving revision 1.1.2.1
+Merging differences between 1.1 and 1.1.2.1 into file1
+$ cat file1
+key address@hidden
+. . .
address@hidden example
+
+What is going on here is that revision 1.1 and 1.1.2.1
+both expand as plain @code{Revision}, and therefore
+merging the changes between them into the working
+directory need not change anything.  Therefore, there
+is no conflict.
+
address@hidden: In versions of @sc{cvs} prior to 1.12.2, there was a
+major problem with using @samp{-kk} on merges.  Namely, @samp{-kk}
+overrode any default keyword expansion mode set in the archive file in
+the repository.  This could, unfortunately for some users, cause data
+corruption in binary files (with a default keyword expansion mode set
+to @samp{-kb}).  Therefore, when a repository contained binary files,
+conflicts had to be dealt with manually rather than using @samp{-kk} in
+a merge command.}
+
+In @sc{cvs} version 1.12.2 and later, the keyword expansion mode
+provided on the command line to any @sc{cvs} command no longer
+overrides the @samp{-kb} keyword expansion mode setting for binary
+files, though it will still override other default keyword expansion
+modes.  You can now safely merge using @samp{-kk} to avoid spurious conflicts
+on lines containing RCS keywords, even when your repository contains
+binary files.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Recursive behavior
address@hidden Recursive behavior
address@hidden Recursive (directory descending)
address@hidden Directory, descending
address@hidden Descending directories
address@hidden Subdirectories
+
+Almost all of the subcommands of @sc{cvs} work
+recursively when you specify a directory as an
+argument.  For instance, consider this directory
+structure:
+
address@hidden
+      @code{$HOME}
+        |
+        address@hidden
+        |   |
+            address@hidden
+            |      (internal @sc{cvs} files)
+            address@hidden
+            address@hidden
+            address@hidden
+            address@hidden
+            address@hidden
+            address@hidden
+            |    |
+            |    address@hidden
+            |    |  (internal @sc{cvs} files)
+            |    address@hidden
+            |
+            address@hidden
+                 |
+                 address@hidden
+                 |  (internal @sc{cvs} files)
+                 address@hidden
+                 address@hidden
address@hidden example
+
address@hidden
+If @file{tc} is the current working directory, the
+following is true:
+
address@hidden @bullet
address@hidden
address@hidden update testing} is equivalent to
+
address@hidden
+cvs update testing/testpgm.t testing/test2.t
address@hidden example
+
address@hidden
address@hidden update testing man} updates all files in the
+subdirectories
+
address@hidden
address@hidden update .} or just @samp{cvs update} updates
+all files in the @code{tc} directory
address@hidden itemize
+
+If no arguments are given to @code{update} it will
+update all files in the current working directory and
+all its subdirectories.  In other words, @file{.} is a
+default argument to @code{update}.  This is also true
+for most of the @sc{cvs} subcommands, not only the
address@hidden command.
+
+The recursive behavior of the @sc{cvs} subcommands can be
+turned off with the @samp{-l} option.
+Conversely, the @samp{-R} option can be used to force recursion if
address@hidden is specified in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
+
address@hidden
+$ cvs update -l         # @r{Don't update files in subdirectories}
address@hidden example
+
address@hidden 
---------------------------------------------------------------------
address@hidden Adding and removing
address@hidden Adding, removing, and renaming files and directories
+
+In the course of a project, one will often add new
+files.  Likewise with removing or renaming, or with
+directories.  The general concept to keep in mind in
+all these cases is that instead of making an
+irreversible change you want @sc{cvs} to record the
+fact that a change has taken place, just as with
+modifying an existing file.  The exact mechanisms to do
+this in @sc{cvs} vary depending on the situation.
+
address@hidden
+* Adding files::                Adding files
+* Removing files::              Removing files
+* Removing directories::        Removing directories
+* Moving files::                Moving and renaming files
+* Moving directories::          Moving and renaming directories
address@hidden menu
+
address@hidden Adding files
address@hidden Adding files to a directory
address@hidden Adding files
+
+To add a new file to a directory, follow these steps.
+
address@hidden @bullet
address@hidden
+You must have a working copy of the directory.
address@hidden the source}.
+
address@hidden
+Create the new file inside your working copy of the directory.
+
address@hidden
+Use @samp{cvs add @var{filename}} to tell @sc{cvs} that you
+want to version control the file.  If the file contains
+binary data, specify @samp{-kb} (@pxref{Binary files}).
+
address@hidden
+Use @samp{cvs commit @var{filename}} to actually check
+in the file into the repository.  Other developers
+cannot see the file until you perform this step.
address@hidden itemize
+
+You can also use the @code{add} command to add a new
+directory.
address@hidden FIXCVS and/or FIXME: Adding a directory doesn't
address@hidden require the commit step.  This probably can be
address@hidden considered a CVS bug, but it is possible we should
address@hidden warn people since this behavior probably won't be
address@hidden changing right away.
+
+Unlike most other commands, the @code{add} command is
+not recursive.  You have to expcicitly name files and
+directories that you wish to add to the repository.
+However, each directory will need to be added
+separately before you will be able to add new files
+to those directories.
+
address@hidden
+$ mkdir -p foo/bar
+$ cp ~/myfile foo/bar/myfile
+$ cvs add foo foo/bar
+$ cvs add foo/bar/myfile
address@hidden example
+
address@hidden add (subcommand)
address@hidden Command {cvs add} address@hidden kflag] address@hidden message] 
files @dots{}
+
+Schedule @var{files} to be added to the repository.
+The files or directories specified with @code{add} must
+already exist in the current directory.  To add a whole
+new directory hierarchy to the source repository (for
+example, files received from a third-party vendor), use
+the @code{import} command instead.  @xref{import}.
+
+The added files are not placed in the source repository
+until you use @code{commit} to make the change
+permanent.  Doing an @code{add} on a file that was
+removed with the @code{remove} command will undo the
+effect of the @code{remove}, unless a @code{commit}
+command intervened.  @xref{Removing files}, for an
+example.
+
+The @samp{-k} option specifies the default way that
+this file will be checked out; for more information see
address@hidden modes}.
+
address@hidden As noted in BUGS, -m is broken client/server (Nov
address@hidden 96).  Also see testsuite log2-* tests.
+The @samp{-m} option specifies a description for the
+file.  This description appears in the history log (if
+it is enabled, @pxref{history file}).  It will also be
+saved in the version history inside the repository when
+the file is committed.  The @code{log} command displays
+this description.  The description can be changed using
address@hidden -t}.  @xref{admin}.  If you omit the
address@hidden @var{description}} flag, an empty string will
+be used.  You will not be prompted for a description.
address@hidden deffn
+
+For example, the following commands add the file
address@hidden to the repository:
+
address@hidden This example used to specify
address@hidden     -m "Optimizer and code generation passes."
address@hidden to the cvs add command, but that doesn't work
address@hidden client/server (see log2 in sanity.sh).  Should fix CVS,
address@hidden but also seems strange to document things which
address@hidden don't work...
address@hidden
+$ cvs add backend.c
+$ cvs commit -m "Early version. Not yet compilable." backend.c
address@hidden example
+
+When you add a file it is added only on the branch
+which you are working on (@pxref{Branching and merging}).  You can
+later merge the additions to another branch if you want
+(@pxref{Merging adds and removals}).
address@hidden Should we mention that earlier versions of CVS
address@hidden lacked this feature (1.3) or implemented it in a buggy
address@hidden way (well, 1.8 had many bugs in cvs update -j)?
address@hidden Should we mention the bug/limitation regarding a
address@hidden file being a regular file on one branch and a directory
address@hidden on another?
address@hidden FIXME: This needs an example, or several, here or
address@hidden elsewhere, for it to make much sense.
address@hidden Somewhere we need to discuss the aspects of death
address@hidden support which don't involve branching, I guess.
address@hidden Like the ability to re-create a release from a tag.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Removing files
address@hidden Removing files
address@hidden Removing files
address@hidden Deleting files
+
address@hidden FIXME: this node wants to be split into several
address@hidden smaller nodes.  Could make these children of
address@hidden "Adding and removing", probably (death support could
address@hidden be its own section, for example, as could the
address@hidden various bits about undoing mistakes in adding and
address@hidden removing).
+Directories change.  New files are added, and old files
+disappear.  Still, you want to be able to retrieve an
+exact copy of old releases.
+
+Here is what you can do to remove a file,
+but remain able to retrieve old revisions:
+
address@hidden @bullet
address@hidden FIXME: should probably be saying something about
address@hidden having a working directory in the first place.
address@hidden
+Make sure that you have not made any uncommitted
+modifications to the file.  @xref{Viewing differences},
+for one way to do that.  You can also use the
address@hidden or @code{update} command.  If you remove
+the file without committing your changes, you will of
+course not be able to retrieve the file as it was
+immediately before you deleted it.
+
address@hidden
+Remove the file from your working copy of the directory.
+You can for instance use @code{rm}.
+
address@hidden
+Use @samp{cvs remove @var{filename}} to tell @sc{cvs} that
+you really want to delete the file.
+
address@hidden
+Use @samp{cvs commit @var{filename}} to actually
+perform the removal of the file from the repository.
address@hidden itemize
+
address@hidden FIXME: Somehow this should be linked in with a more
address@hidden general discussion of death support.  I don't know
address@hidden whether we want to use the term "death support" or
address@hidden not (we can perhaps get by without it), but we do
address@hidden need to discuss the "dead" state in "cvs log" and
address@hidden related subjects.  The current discussion is
address@hidden scattered around, and not xref'd to each other.
address@hidden FIXME: I think this paragraph wants to be moved
address@hidden later down, at least after the first example.
+When you commit the removal of the file, @sc{cvs}
+records the fact that the file no longer exists.  It is
+possible for a file to exist on only some branches and
+not on others, or to re-add another file with the same
+name later.  @sc{cvs} will correctly create or not create
+the file, based on the @samp{-r} and @samp{-D} options
+specified to @code{checkout} or @code{update}.
+
address@hidden FIXME: This style seems to clash with how we
address@hidden document things in general.
address@hidden Remove (subcommand)
address@hidden Command {cvs remove} [options] files @dots{}
+
+Schedule file(s) to be removed from the repository
+(files which have not already been removed from the
+working directory are not processed).  This command
+does not actually remove the file from the repository
+until you commit the removal.  For a full list of
+options, see @ref{Invoking CVS}.
address@hidden deffn
+
+Here is an example of removing several files:
+
address@hidden
+$ cd test
+$ rm *.c
+$ cvs remove
+cvs remove: Removing .
+cvs remove: scheduling a.c for removal
+cvs remove: scheduling b.c for removal
+cvs remove: use 'cvs commit' to remove these files permanently
+$ cvs ci -m "Removed unneeded files"
+cvs commit: Examining .
+cvs commit: Committing .
address@hidden example
+
+As a convenience you can remove the file and @code{cvs
+remove} it in one step, by specifying the @samp{-f}
+option.  For example, the above example could also be
+done like this:
+
address@hidden
+$ cd test
+$ cvs remove -f *.c
+cvs remove: scheduling a.c for removal
+cvs remove: scheduling b.c for removal
+cvs remove: use 'cvs commit' to remove these files permanently
+$ cvs ci -m "Removed unneeded files"
+cvs commit: Examining .
+cvs commit: Committing .
address@hidden example
+
+If you execute @code{remove} for a file, and then
+change your mind before you commit, you can undo the
address@hidden with an @code{add} command.
address@hidden
address@hidden is this worth saying or not?  Somehow it seems
address@hidden confusing to me.
+Of course,
+since you have removed your copy of file in the working
+directory, @sc{cvs} does not necessarily bring back the
+contents of the file from right before you executed
address@hidden; instead it gets the file from the
+repository again.
address@hidden ignore
+
address@hidden FIXME: what if you change your mind after you commit
address@hidden it?  (answer is also "cvs add" but we don't say that...).
address@hidden We need some index entries for thinks like "undoing
address@hidden removal" too.
+
address@hidden
+$ ls
+CVS   ja.h  oj.c
+$ rm oj.c
+$ cvs remove oj.c
+cvs remove: scheduling oj.c for removal
+cvs remove: use 'cvs commit' to remove this file permanently
+$ cvs add oj.c
+U oj.c
+cvs add: oj.c, version 1.1.1.1, resurrected
address@hidden example
+
+If you realize your mistake before you run the
address@hidden command you can use @code{update} to
+resurrect the file:
+
address@hidden
+$ rm oj.c
+$ cvs update oj.c
+cvs update: warning: oj.c was lost
+U oj.c
address@hidden example
+
+When you remove a file it is removed only on the branch
+which you are working on (@pxref{Branching and merging}).  You can
+later merge the removals to another branch if you want
+(@pxref{Merging adds and removals}).
+
address@hidden Removing directories
address@hidden Removing directories
address@hidden Removing directories
address@hidden Directories, removing
+
+In concept, removing directories is somewhat similar to
+removing files---you want the directory to not exist in
+your current working directories, but you also want to
+be able to retrieve old releases in which the directory
+existed.
+
+The way that you remove a directory is to remove all
+the files in it.  You don't remove the directory
+itself; there is no way to do that.
+Instead you specify the @samp{-P} option to
address@hidden update} or @code{cvs checkout},
+which will cause @sc{cvs} to remove empty
+directories from working directories.
+(Note that @code{cvs export} always removes empty directories.)
+Probably the
+best way to do this is to always specify @samp{-P}; if
+you want an empty directory then put a dummy file (for
+example @file{.keepme}) in it to prevent @samp{-P} from
+removing it.
+
address@hidden I'd try to give a rationale for this, but I'm not
address@hidden sure there is a particularly convincing one.  What
address@hidden we would _like_ is for CVS to do a better job of version
address@hidden controlling whether directories exist, to eliminate the
address@hidden need for -P and so that a file can be a directory in
address@hidden one revision and a regular file in another.
+Note that @samp{-P} is implied by the @samp{-r} or @samp{-D}
+options of @code{checkout}.  This way,
address@hidden will be able to correctly create the directory
+or not depending on whether the particular version you
+are checking out contains any files in that directory.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Moving files
address@hidden Moving and renaming files
address@hidden Moving files
address@hidden Renaming files
address@hidden Files, moving
+
+Moving files to a different directory or renaming them
+is not difficult, but some of the ways in which this
+works may be non-obvious.  (Moving or renaming a
+directory is even harder.  @xref{Moving directories}.).
+
+The examples below assume that the file @var{old} is renamed to
address@hidden
+
address@hidden
+* Outside::                     The normal way to Rename
+* Inside::                      A tricky, alternative way
+* Rename by copying::           Another tricky, alternative way
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Outside
address@hidden The Normal way to Rename
+
address@hidden More rename issues.  Not sure whether these are
address@hidden worth documenting; I'm putting them here because
address@hidden it seems to be as good a place as any to try to
address@hidden set down the issues.
address@hidden * "cvs annotate" will annotate either the new
address@hidden file or the old file; it cannot annotate _each
address@hidden line_ based on whether it was last changed in the
address@hidden new or old file.  Unlike "cvs log", where the
address@hidden consequences of having to select either the new
address@hidden or old name seem fairly benign, this may be a
address@hidden real advantage to having CVS know about renames
address@hidden other than as a deletion and an addition.
+
+The normal way to move a file is to copy @var{old} to
address@hidden, and then issue the normal @sc{cvs} commands
+to remove @var{old} from the repository, and add
address@hidden to it.
address@hidden The following sentence is not true: one must cd into
address@hidden the directory to run "cvs add".
address@hidden  (Both @var{old} and @var{new} could
address@hidden contain relative paths, for example @file{foo/bar.c}).
+
address@hidden
+$ mv @var{old} @var{new}
+$ cvs remove @var{old}
+$ cvs add @var{new}
+$ cvs commit -m "Renamed @var{old} to @var{new}" @var{old} @var{new}
address@hidden example
+
+This is the simplest way to move a file, it is not
+error-prone, and it preserves the history of what was
+done.  Note that to access the history of the file you
+must specify the old or the new name, depending on what
+portion of the history you are accessing.  For example,
address@hidden log @var{old}} will give the log up until the
+time of the rename.
+
+When @var{new} is committed its revision numbers will
+start again, usually at 1.1, so if that bothers you,
+use the @samp{-r @var{tag}} option to commit.  For more
+information see @ref{Assigning revisions}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Inside
address@hidden Moving the history file
+
+This method is more dangerous, since it involves moving
+files inside the repository.  Read this entire section
+before trying it out!
+
address@hidden
+$ cd $CVSROOT/@var{dir}
+$ mv @var{old},v @var{new},v
address@hidden example
+
address@hidden
+Advantages:
+
address@hidden @bullet
address@hidden
+The log of changes is maintained intact.
+
address@hidden
+The revision numbers are not affected.
address@hidden itemize
+
address@hidden
+Disadvantages:
+
address@hidden @bullet
address@hidden
+Old releases cannot easily be fetched from the
+repository.  (The file will show up as @var{new} even
+in revisions from the time before it was renamed).
+
address@hidden
+There is no log information of when the file was renamed.
+
address@hidden
+Nasty things might happen if someone accesses the history file
+while you are moving it.  Make sure no one else runs any of the @sc{cvs}
+commands while you move it.
address@hidden itemize
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Rename by copying
address@hidden Copying the history file
+
+This way also involves direct modifications to the
+repository.  It is safe, but not without drawbacks.
+
address@hidden
+# @r{Copy the @sc{rcs} file inside the repository}
+$ cd $CVSROOT/@var{dir}
+$ cp @var{old},v @var{new},v
+# @r{Remove the old file}
+$ cd ~/@var{dir}
+$ rm @var{old}
+$ cvs remove @var{old}
+$ cvs commit @var{old}
+# @r{Remove all tags from @var{new}}
+$ cvs update @var{new}
+$ cvs log @var{new}             # @r{Remember the non-branch tag names}
+$ cvs tag -d @var{tag1} @var{new}
+$ cvs tag -d @var{tag2} @var{new}
address@hidden
address@hidden example
+
+By removing the tags you will be able to check out old
+revisions.
+
address@hidden
+Advantages:
+
address@hidden @bullet
address@hidden
address@hidden FIXME: Is this true about -D now that we have death
address@hidden support?  See 5B.3 in the FAQ.
+Checking out old revisions works correctly, as long as
+you use @samp{-r @var{tag}} and not @samp{-D @var{date}}
+to retrieve the revisions.
+
address@hidden
+The log of changes is maintained intact.
+
address@hidden
+The revision numbers are not affected.
address@hidden itemize
+
address@hidden
+Disadvantages:
+
address@hidden @bullet
address@hidden
+You cannot easily see the history of the file across the rename.
+
address@hidden
address@hidden Is this true?  I don't see how the revision numbers
address@hidden _could_ start over, when new,v is just old,v with
address@hidden the tags deleted.
address@hidden If there is some need to reinstate this text,
address@hidden it is "usually 1.1", not "1.0" and it needs an
address@hidden xref to Assigning revisions
address@hidden
+Unless you use the @samp{-r @var{tag}} (@pxref{commit
+options}) flag when @var{new} is committed its revision
+numbers will start at 1.0 again.
address@hidden ignore
address@hidden itemize
+
address@hidden 
---------------------------------------------------------------------
address@hidden Moving directories
address@hidden Moving and renaming directories
address@hidden Moving directories
address@hidden Renaming directories
address@hidden Directories, moving
+
+The normal way to rename or move a directory is to
+rename or move each file within it as described in
address@hidden  Then check out with the @samp{-P}
+option, as described in @ref{Removing directories}.
+
+If you really want to hack the repository to rename or
+delete a directory in the repository, you can do it
+like this:
+
address@hidden
address@hidden
+Inform everyone who has a checked out copy of the directory that the
+directory will be renamed.  They should commit all their changes in all their
+copies of the project containing the directory to be removed, and remove
+all their working copies of said project, before you take the steps below.
+
address@hidden
+Rename the directory inside the repository.
+
address@hidden
+$ cd $CVSROOT/@var{parent-dir}
+$ mv @var{old-dir} @var{new-dir}
address@hidden example
+
address@hidden
+Fix the @sc{cvs} administrative files, if necessary (for
+instance if you renamed an entire module).
+
address@hidden
+Tell everyone that they can check out again and continue
+working.
+
address@hidden enumerate
+
+If someone had a working copy the @sc{cvs} commands will
+cease to work for him, until he removes the directory
+that disappeared inside the repository.
+
+It is almost always better to move the files in the
+directory instead of moving the directory.  If you move the
+directory you are unlikely to be able to retrieve old
+releases correctly, since they probably depend on the
+name of the directories.
+
address@hidden 
---------------------------------------------------------------------
address@hidden History browsing
address@hidden History browsing
address@hidden History browsing
address@hidden Traceability
address@hidden Isolation
+
address@hidden
address@hidden This is too long for an introduction (goal is
address@hidden one 20x80 character screen), and also mixes up a
address@hidden variety of issues (parallel development, history,
address@hidden maybe even touches on process control).
+
address@hidden -- @quote{To lose ones history is to lose ones soul.}
address@hidden -- ///
address@hidden -- ///Those who cannot remember the past are condemned to repeat 
it.
address@hidden -- ///               -- George Santayana
address@hidden -- ///
+
address@hidden tries to make it easy for a group of people to work
+together.  This is done in two ways:
+
address@hidden @bullet
address@hidden
+Isolation---You have your own working copy of the
+source.  You are not affected by modifications made by
+others until you decide to incorporate those changes
+(via the @code{update} address@hidden).
+
address@hidden
+Traceability---When something has changed, you can
+always see @emph{exactly} what changed.
address@hidden itemize
+
+There are several features of @sc{cvs} that together lead
+to traceability:
+
address@hidden @bullet
address@hidden
+Each revision of a file has an accompanying log
+message.
+
address@hidden
+All commits are optionally logged to a central history
+database.
+
address@hidden
+Logging information can be sent to a user-defined
+program (@pxref{loginfo}).
address@hidden itemize
+
address@hidden -- More text here.
+
+This chapter should talk about the history file, the
address@hidden command, the usefulness of ChangeLogs
+even when you run @sc{cvs}, and things like that.
+
address@hidden ignore
+
address@hidden kind of lame, in a lot of ways the above text inside
address@hidden the @ignore motivates this chapter better
+Once you have used @sc{cvs} to store a version control
+history---what files have changed when, how, and by
+whom, there are a variety of mechanisms for looking
+through the history.
+
address@hidden FIXME: should also be talking about how you look at
address@hidden old revisions (e.g. "cvs update -p -r 1.2 foo.c").
address@hidden
+* log messages::                Log messages
+* history database::            The history database
+* user-defined logging::        User-defined logging
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden log messages
address@hidden Log messages
+
address@hidden FIXME: @xref to place where we talk about how to
address@hidden specify message to commit.
+Whenever you commit a file you specify a log message.
+
address@hidden FIXME: bring the information here, and get rid of or
address@hidden greatly shrink the "log" node.
+To look through the log messages which have been
+specified for every revision which has been committed,
+use the @code{cvs log} command (@pxref{log}).
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden history database
address@hidden The history database
+
address@hidden FIXME: bring the information from the history file
address@hidden and history nodes here.  Rewrite it to be motivated
address@hidden better (start out by clearly explaining what gets
address@hidden logged in history, for example).
+You can use the history file (@pxref{history file}) to
+log various @sc{cvs} actions.  To retrieve the
+information from the history file, use the @code{cvs
+history} command (@pxref{history}).
+
+Note: you can control what is logged to this file by using the
address@hidden keyword in the @file{CVSROOT/config} file
+(@pxref{config}).
+
address@hidden
address@hidden The history database has many problems:
address@hidden * It is very unclear what field means what.  This
address@hidden could be improved greatly by better documentation,
address@hidden but there are still non-orthogonalities (for
address@hidden example, tag does not record the "repository"
address@hidden field but most records do).
address@hidden * Confusion about files, directories, and modules.
address@hidden Some commands record one, some record others.
address@hidden * File removal is not logged.  There is an 'R'
address@hidden record type documented, but CVS never uses it.
address@hidden * Tags are only logged for the "cvs rtag" command,
address@hidden not "cvs tag".  The fix for this is not completely
address@hidden clear (see above about modules vs. files).
address@hidden * Are there other cases of operations that are not
address@hidden logged?  One would hope for all changes to the
address@hidden repository to be logged somehow (particularly
address@hidden operations like tagging, "cvs admin -k", and other
address@hidden operations which do not record a history that one
address@hidden can get with "cvs log").  Operations on the working
address@hidden directory, like export, get, and release, are a
address@hidden second category also covered by the current "cvs
address@hidden history".
address@hidden * The history file does not record the options given
address@hidden to a command.  The most serious manifestation of
address@hidden this is perhaps that it doesn't record whether a command
address@hidden was recursive.  It is not clear to me whether one
address@hidden wants to log at a level very close to the command
address@hidden line, as a sort of way of logging each command
address@hidden (more or less), or whether one wants
address@hidden to log more at the level of what was changed (or
address@hidden something in between), but either way the current
address@hidden information has pretty big gaps.
address@hidden * Further details about a tag--like whether it is a
address@hidden branch tag or, if a non-branch tag, which branch it
address@hidden is on.  One can find out this information about the
address@hidden tag as it exists _now_, but if the tag has been
address@hidden moved, one doesn't know what it was like at the time
address@hidden the history record was written.
address@hidden * Whether operating on a particular tag, date, or
address@hidden options was implicit (sticky) or explicit.
address@hidden
address@hidden Another item, only somewhat related to the above, is a
address@hidden way to control what is logged in the history file.
address@hidden This is probably the only good way to handle
address@hidden different people having different ideas about
address@hidden information/space tradeoffs.
address@hidden
address@hidden It isn't really clear that it makes sense to try to
address@hidden patch up the history file format as it exists now to
address@hidden include all that stuff.  It might be better to
address@hidden design a whole new CVSROOT/nhistory file and "cvs
address@hidden nhistory" command, or some such, or in some other
address@hidden way trying to come up with a clean break from the
address@hidden past, which can address the above concerns.  Another
address@hidden open question is how/whether this relates to
address@hidden taginfo/loginfo/etc.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden user-defined logging
address@hidden User-defined logging
+
address@hidden FIXME: probably should centralize this information
address@hidden here, at least to some extent.  Maybe by moving the
address@hidden loginfo, etc., nodes here and replacing
address@hidden the "user-defined logging" node with one node for
address@hidden each method.
+You can customize @sc{cvs} to log various kinds of
+actions, in whatever manner you choose.  These
+mechanisms operate by executing a script at various
+times.  The script might append a message to a file
+listing the information and the programmer who created
+it, or send mail to a group of developers, or, perhaps,
+post a message to a particular newsgroup.  To log
+commits, use the @file{loginfo} file (@pxref{loginfo}), and
+to log tagging operations, use the @file{taginfo} file
+(@pxref{taginfo}).
+
address@hidden FIXME: What is difference between doing it in the
address@hidden modules file and using loginfo/taginfo?  Why should
address@hidden user use one or the other?
+To log commits, checkouts, exports, and tags,
+respectively, you can also use the @samp{-i},
address@hidden, @samp{-e}, and @samp{-t} options in the
+modules file.  For a more flexible way of giving
+notifications to various users, which requires less in
+the way of keeping centralized scripts up to date, use
+the @code{cvs watch add} command (@pxref{Getting
+Notified}); this command is useful even if you are not
+using @code{cvs watch on}.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Binary files
address@hidden Handling binary files
address@hidden Binary files
+
+The most common use for @sc{cvs} is to store text
+files.  With text files, @sc{cvs} can merge revisions,
+display the differences between revisions in a
+human-visible fashion, and other such operations.
+However, if you are willing to give up a few of these
+abilities, @sc{cvs} can store binary files.  For
+example, one might store a web site in @sc{cvs}
+including both text files and binary images.
+
address@hidden
+* Binary why::     More details on issues with binary files
+* Binary howto::   How to store them
address@hidden menu
+
address@hidden Binary why
address@hidden The issues with binary files
+
+While the need to manage binary files may seem obvious
+if the files that you customarily work with are binary,
+putting them into version control does present some
+additional issues.
+
+One basic function of version control is to show the
+differences between two revisions.  For example, if
+someone else checked in a new version of a file, you
+may wish to look at what they changed and determine
+whether their changes are good.  For text files,
address@hidden provides this functionality via the @code{cvs
+diff} command.  For binary files, it may be possible to
+extract the two revisions and then compare them with a
+tool external to @sc{cvs} (for example, word processing
+software often has such a feature).  If there is no
+such tool, one must track changes via other mechanisms,
+such as urging people to write good log messages, and
+hoping that the changes they actually made were the
+changes that they intended to make.
+
+Another ability of a version control system is the
+ability to merge two revisions.  For @sc{cvs} this
+happens in two contexts.  The first is when users make
+changes in separate working directories
+(@pxref{Multiple developers}).  The second is when one
+merges explicitly with the @samp{update -j} command
+(@pxref{Branching and merging}).
+
+In the case of text
+files, @sc{cvs} can merge changes made independently,
+and signal a conflict if the changes conflict.  With
+binary files, the best that @sc{cvs} can do is present
+the two different copies of the file, and leave it to
+the user to resolve the conflict.  The user may choose
+one copy or the other, or may run an external merge
+tool which knows about that particular file format, if
+one exists.
+Note that having the user merge relies primarily on the
+user to not accidentally omit some changes, and thus is
+potentially error prone.
+
+If this process is thought to be undesirable, the best
+choice may be to avoid merging.  To avoid the merges
+that result from separate working directories, see the
+discussion of reserved checkouts (file locking) in
address@hidden developers}.  To avoid the merges
+resulting from branches, restrict use of branches.
+
address@hidden Binary howto
address@hidden How to store binary files
+
+There are two issues with using @sc{cvs} to store
+binary files.  The first is that @sc{cvs} by default
+converts line endings between the canonical form in
+which they are stored in the repository (linefeed
+only), and the form appropriate to the operating system
+in use on the client (for example, carriage return
+followed by line feed for Windows NT).
+
+The second is that a binary file might happen to
+contain data which looks like a keyword (@pxref{Keyword
+substitution}), so keyword expansion must be turned
+off.
+
address@hidden FIXME: the third is that one can't do merges with
address@hidden binary files.  xref to Multiple Developers and the
address@hidden reserved checkout issues.
+
+The @samp{-kb} option available with some @sc{cvs}
+commands insures that neither line ending conversion
+nor keyword expansion will be done.
+
+Here is an example of how you can create a new file
+using the @samp{-kb} flag:
+
address@hidden
+$ echo 'address@hidden' > kotest
+$ cvs add -kb -m"A test file" kotest
+$ cvs ci -m"First checkin; contains a keyword" kotest
address@hidden example
+
+If a file accidentally gets added without @samp{-kb},
+one can use the @code{cvs admin} command to recover.
+For example:
+
address@hidden
+$ echo 'address@hidden' > kotest
+$ cvs add -m"A test file" kotest
+$ cvs ci -m"First checkin; contains a keyword" kotest
+$ cvs admin -kb kotest
+$ cvs update -A kotest
+# @r{For non-unix systems:}
+# @r{Copy in a good copy of the file from outside CVS}
+$ cvs commit -m "make it binary" kotest
address@hidden example
+
address@hidden Trying to describe this for both unix and non-unix
address@hidden in the same description is very confusing.  Might
address@hidden want to split the two, or just ditch the unix "shortcut"
address@hidden (unixheads don't do much with binary files, anyway).
address@hidden This used to say "(Try the above example, and do a
address@hidden @code{cat kotest} after every command)".  But that
address@hidden only really makes sense for the unix case.
+When you check in the file @file{kotest} the file is
+not preserved as a binary file, because you did not
+check it in as a binary file.  The @code{cvs
+admin -kb} command sets the default keyword
+substitution method for this file, but it does not
+alter the working copy of the file that you have.  If you need to
+cope with line endings (that is, you are using
address@hidden on a non-unix system), then you need to
+check in a new copy of the file, as shown by the
address@hidden commit} command above.
+On unix, the @code{cvs update -A} command suffices.
address@hidden FIXME: should also describe what the *other users*
address@hidden need to do, if they have checked out copies which
address@hidden have been corrupted by lack of -kb.  I think maybe
address@hidden "cvs update -kb" or "cvs
address@hidden update -A" would suffice, although the user who
address@hidden reported this suggested removing the file, manually
address@hidden removing it from CVS/Entries, and then "cvs update"
+(Note that you can use @code{cvs log} to determine the default keyword
+substitution method for a file and @code{cvs status} to determine
+the keyword substitution method for a working copy.)
+
+However, in using @code{cvs admin -k} to change the
+keyword expansion, be aware that the keyword expansion
+mode is not version controlled.  This means that, for
+example, that if you have a text file in old releases,
+and a binary file with the same name in new releases,
address@hidden provides no way to check out the file in text
+or binary mode depending on what version you are
+checking out.  There is no good workaround for this
+problem.
+
+You can also set a default for whether @code{cvs add}
+and @code{cvs import} treat a file as binary based on
+its name; for example you could say that files who
+names end in @samp{.exe} are binary.  @xref{Wrappers}.
+There is currently no way to have @sc{cvs} detect
+whether a file is binary based on its contents.  The
+main difficulty with designing such a feature is that
+it is not clear how to distinguish between binary and
+non-binary files, and the rules to apply would vary
+considerably with the operating system.
address@hidden For example, it would be good on MS-DOS-family OSes
address@hidden for anything containing ^Z to be binary.  Having
address@hidden characters with the 8th bit set imply binary is almost
address@hidden surely a bad idea in the context of ISO-8859-* and
address@hidden other such character sets.  On VMS or the Mac, we
address@hidden could use the OS's file typing.  This is a
address@hidden commonly-desired feature, and something of this sort
address@hidden may make sense.  But there are a lot of pitfalls here.
address@hidden
address@hidden Another, probably better, way to tell is to read the
address@hidden file in text mode, write it to a temp file in text
address@hidden mode, and then do a binary mode compare of the two
address@hidden files.  If they differ, it is a binary file.  This
address@hidden might have problems on VMS (or some other system
address@hidden with several different text modes), but in general
address@hidden should be relatively portable.  The only other
address@hidden downside I can think of is that it would be fairly
address@hidden slow, but that is perhaps a small price to pay for
address@hidden not having your files corrupted.  Another issue is
address@hidden what happens if you import a text file with bare
address@hidden linefeeds on Windows.  Such files will show up on
address@hidden Windows sometimes (I think some native windows
address@hidden programs even write them, on occasion).  Perhaps it
address@hidden is reasonable to treat such files as binary; after
address@hidden all it is something of a presumption to assume that
address@hidden the user would want the linefeeds converted to CRLF.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Multiple developers
address@hidden Multiple developers
address@hidden Multiple developers
address@hidden Team of developers
address@hidden File locking
address@hidden Locking files
address@hidden Working copy
address@hidden Reserved checkouts
address@hidden Unreserved checkouts
address@hidden RCS-style locking
+
+When more than one person works on a software project
+things often get complicated.  Often, two people try to
+edit the same file simultaneously.  One solution, known
+as @dfn{file locking} or @dfn{reserved checkouts}, is
+to allow only one person to edit each file at a time.
+This is the only solution with some version control
+systems, including @sc{rcs} and @sc{sccs}.  Currently
+the usual way to get reserved checkouts with @sc{cvs}
+is the @code{cvs admin -l} command (@pxref{admin
+options}).  This is not as nicely integrated into
address@hidden as the watch features, described below, but it
+seems that most people with a need for reserved
+checkouts find it adequate.
address@hidden Or "find it better than worrying about implementing
address@hidden nicely integrated reserved checkouts" or ...?
+
+As of @sc{cvs} version 1.12.10, another technique for getting most of the
+effect of reserved checkouts is to enable advisory locks.  To enable advisory
+locks, have all developers put "edit -c", "commit -c" in their
+.cvsrc file, and turn on watches in the repository.  This
+prevents them from doing a @code{cvs edit} if anyone is
+already editting the file.  It also may
+be possible to use plain watches together with suitable
+procedures (not enforced by software), to avoid having
+two people edit at the same time.
+
address@hidden Our unreserved checkout model might not
address@hidden be quite the same as others.  For example, I
address@hidden think that some systems will tend to create a branch
address@hidden in the case where CVS prints "up-to-date check failed".
address@hidden It isn't clear to me whether we should try to
address@hidden explore these subtleties; it could easily just
address@hidden confuse people.
+The default model with @sc{cvs} is known as
address@hidden checkouts}.  In this model, developers
+can edit their own @dfn{working copy} of a file
+simultaneously.  The first person that commits his
+changes has no automatic way of knowing that another
+has started to edit it.  Others will get an error
+message when they try to commit the file.  They must
+then use @sc{cvs} commands to bring their working copy
+up to date with the repository revision.  This process
+is almost automatic.
+
address@hidden FIXME? should probably use the word "watch" here, to
address@hidden tie this into the text below and above.
address@hidden also supports mechanisms which facilitate
+various kinds of communication, without actually
+enforcing rules like reserved checkouts do.
+
+The rest of this chapter describes how these various
+models work, and some of the issues involved in
+choosing between them.
+
address@hidden
+Here is a draft reserved checkout design or discussion
+of the issues.  This seems like as good a place as any
+for this.
+
+Might want a cvs lock/cvs unlock--in which the names
+differ from edit/unedit because the network must be up
+for these to work.  unedit gives an error if there is a
+reserved checkout in place (so that people don't
+accidentally leave locks around); unlock gives an error
+if one is not in place (this is more arguable; perhaps
+it should act like unedit in that case).
+
+On the other hand, might want it so that emacs,
+scripts, etc., can get ready to edit a file without
+having to know which model is in use.  In that case we
+would have a "cvs watch lock" (or .cvsrc?) (that is,
+three settings, "on", "off", and "lock").  Having cvs
+watch lock set would cause a get to record in the CVS
+directory which model is in use, and cause "cvs edit"
+to change behaviors.  We'd want a way to query which
+setting is in effect (this would be handy even if it is
+only "on" or "off" as presently).  If lock is in
+effect, then commit would require a lock before
+allowing a checkin; chmod wouldn't suffice (might be
+debatable--see chmod comment below, in watches--but it
+is the way people expect RCS to work and I can't think
+of any significant downside.  On the other hand, maybe
+it isn't worth bothering, because people who are used
+to RCS wouldn't think to use chmod anyway).
+
+Implementation: use file attributes or use RCS
+locking.  The former avoids more dependence on RCS
+behaviors we will need to re-implement as we librarify
+RCS, and makes it easier to import/export RCS files (in
+that context, want to ignore the locker field).  But
+note that RCS locks are per-branch, which is the
+correct behavior (this is also an issue for the "watch
+on" features; they should be per-branch too).
+
+Here are a few more random notes about implementation
+details, assuming "cvs watch lock" and
+
+CVS/Watched file?  Or try to fit this into CVS/Entries somehow?
+Cases: (1) file is checked out (unreserved or with watch on) by old
+version of @sc{cvs}, now we do something with new one, (2) file is checked
+out by new version, now we do something with old one.
+
+Remote protocol would have a "Watched" analogous to "Mode".  Of course
+it would apply to all Updated-like requests.  How do we keep this
+setting up to date?  I guess that there wants to be a Watched request,
+and the server would send a new one if it isn't up to date? (Ugh--hard
+to implement and slows down "cvs -q update"--is there an easier way?)
+
+"cvs edit"--checks CVS/Watched, and if watch lock, then sends
+"edit-lock" request.  Which comes back with a Checked-in with
+appropriate Watched (off, on, lock, locked, or some such?), or error
+message if already locked.
+
+"cvs commit"--only will commit if off/on/locked.  lock is not OK.
+
+Doc:
+note that "cvs edit" must be connected to network if watch lock is in
+effect.
+
+Talk about what to do if someone has locked a file and you want to
+edit that file.  (breaking locks, or lack thereof).
+
+
+One other idea (which could work along with the
+existing "cvs admin -l" reserved checkouts, as well as
+the above):
+
+"cvs editors" could show who has the file locked, if
+someone does.
+
address@hidden ignore
+
address@hidden
+* File status::                 A file can be in several states
+* Updating a file::             Bringing a file up-to-date
+* Conflicts example::           An informative example
+* Informing others::            To cooperate you must inform
+* Concurrency::                 Simultaneous repository access
+* Watches::                     Mechanisms to track who is editing files
+* Choosing a model::            Reserved or unreserved checkouts?
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden File status
address@hidden File status
address@hidden File status
address@hidden Status of a file
+
address@hidden Shouldn't this start with an example or something,
address@hidden introducing the unreserved checkout model?  Before we
address@hidden dive into listing states?
+Based on what operations you have performed on a
+checked out file, and what operations others have
+performed to that file in the repository, one can
+classify a file in a number of states.  The states, as
+reported by the @code{status} command, are:
+
address@hidden The order of items is chosen to group logically
address@hidden similar outputs together.
address@hidden People who want alphabetical can use the index...
address@hidden @asis
address@hidden Up-to-date
address@hidden Up-to-date
+The file is identical with the latest revision in the
+repository for the branch in use.
address@hidden FIXME: should we clarify "in use"?  The answer is
address@hidden sticky tags, and trying to distinguish branch sticky
address@hidden tags from non-branch sticky tags seems rather awkward
address@hidden here.
address@hidden FIXME: What happens with non-branch sticky tags?  Is
address@hidden a stuck file "Up-to-date" or "Needs checkout" or what?
+
address@hidden Locally Modified
address@hidden Locally Modified
+You have edited the file, and not yet committed your changes.
+
address@hidden Locally Added
address@hidden Locally Added
+You have added the file with @code{add}, and not yet
+committed your changes.
address@hidden There are many cases involving the file being
address@hidden added/removed/modified in the working directory, and
address@hidden added/removed/modified in the repository, which we
address@hidden don't try to describe here.  I'm not sure that "cvs
address@hidden status" produces a non-confusing output in most of
address@hidden those cases.
+
address@hidden Locally Removed
address@hidden Locally Removed
+You have removed the file with @code{remove}, and not yet
+committed your changes.
+
address@hidden Needs Checkout
address@hidden Needs Checkout
+Someone else has committed a newer revision to the
+repository.  The name is slightly misleading; you will
+ordinarily use @code{update} rather than
address@hidden to get that newer revision.
+
address@hidden Needs Patch
address@hidden Needs Patch
address@hidden See also newb-123j0 in sanity.sh (although that case
address@hidden should probably be changed rather than documented).
+Like Needs Checkout, but the @sc{cvs} server will send
+a patch rather than the entire file.  Sending a patch or
+sending an entire file accomplishes the same thing.
+
address@hidden Needs Merge
address@hidden Needs Merge
+Someone else has committed a newer revision to the repository, and you
+have also made modifications to the file.
+
address@hidden Unresolved Conflict
address@hidden Unresolved Conflict
address@hidden FIXCVS - This file status needs to be changed to some more 
informative
address@hidden text that distinguishes it more clearly from each of the Locally 
Added,
address@hidden File had conflicts on merge, and Unknown status types, but an 
exact and
address@hidden succinct wording escapes me at the moment.
+A file with the same name as this new file has been added to the repository
+from a second workspace.  This file will need to be moved out of the way
+to allow an @code{update} to complete.
+
address@hidden File had conflicts on merge
address@hidden File had conflicts on merge
address@hidden is it worth saying that this message was "Unresolved
address@hidden Conflict" in CVS 1.9 and earlier?  I'm inclined to
address@hidden think that is unnecessarily confusing to new users.
+This is like Locally Modified, except that a previous
address@hidden command gave a conflict.  If you have not
+already done so, you need to
+resolve the conflict as described in @ref{Conflicts example}.
+
address@hidden Unknown
address@hidden Unknown
address@hidden doesn't know anything about this file.  For
+example, you have created a new file and have not run
address@hidden
address@hidden
address@hidden "Entry Invalid" and "Classify Error" are also in the
address@hidden status.c.  The latter definitely indicates a CVS bug
address@hidden (should it be worded more like "internal error" so
address@hidden people submit bug reports if they see it?).  The former
address@hidden I'm not as sure; I haven't tracked down whether/when it
address@hidden appears in "cvs status" output.
+
address@hidden table
+
+To help clarify the file status, @code{status} also
+reports the @code{Working revision} which is the
+revision that the file in the working directory derives
+from, and the @code{Repository revision} which is the
+latest revision in the repository for the branch in
+use.
+The @samp{Commit Identifier} reflects the unique commitid
+of the @code{commit}.
address@hidden FIXME: should we clarify "in use"?  The answer is
address@hidden sticky tags, and trying to distinguish branch sticky
address@hidden tags from non-branch sticky tags seems rather awkward
address@hidden here.
address@hidden FIXME: What happens with non-branch sticky tags?
address@hidden What is the Repository Revision there?  See the
address@hidden comment at vn_rcs in cvs.h, which is kind of
address@hidden confused--we really need to document better what this
address@hidden field contains.
address@hidden Q: Should we document "New file!" and other such
address@hidden outputs or are they self-explanatory?
address@hidden FIXME: what about the date to the right of "Working
address@hidden revision"?  It doesn't appear with client/server and
address@hidden seems unnecessary (redundant with "ls -l") so
address@hidden perhaps it should be removed for non-client/server too?
address@hidden FIXME: Need some examples.
address@hidden FIXME: Working revision can also be something like
address@hidden "-1.3" for a locally removed file.  Not at all
address@hidden self-explanatory (and it is possible that CVS should
address@hidden be changed rather than documenting this).
+
address@hidden Would be nice to have an @example showing output
address@hidden from cvs status, with comments showing the xref
address@hidden where each part of the output is described.  This
address@hidden might fit in nicely if it is desirable to split this
address@hidden node in two; one to introduce "cvs status" and one
address@hidden to list each of the states.
+The options to @code{status} are listed in
address@hidden CVS}.  For information on its @code{Sticky tag}
+and @code{Sticky date} output, see @ref{Sticky tags}.
+For information on its @code{Sticky options} output,
+see the @samp{-k} option in @ref{update options}.
+
+You can think of the @code{status} and @code{update}
+commands as somewhat complementary.  You use
address@hidden to bring your files up to date, and you
+can use @code{status} to give you some idea of what an
address@hidden would do (of course, the state of the
+repository might change before you actually run
address@hidden).  In fact, if you want a command to
+display file status in a more brief format than is
+displayed by the @code{status} command, you can invoke
+
address@hidden update, to display file status
address@hidden
+$ cvs -n -q update
address@hidden example
+
+The @samp{-n} option means to not actually do the
+update, but merely to display statuses; the @samp{-q}
+option avoids printing the name of each directory.  For
+more information on the @code{update} command, and
+these options, see @ref{Invoking CVS}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Updating a file
address@hidden Bringing a file up to date
address@hidden Bringing a file up to date
address@hidden Updating a file
address@hidden Merging a file
address@hidden Update, introduction
+
+When you want to update or merge a file, use the @code{cvs update -d}
+command.  For files that are not up to date this is roughly equivalent
+to a @code{checkout} command: the newest revision of the file is
+extracted from the repository and put in your working directory.  The
address@hidden option, not necessary with @code{checkout}, tells @sc{cvs}
+that you wish it to create directories added by other developers.
+
+Your modifications to a file are never lost when you
+use @code{update}.  If no newer revision exists,
+running @code{update} has no effect.  If you have
+edited the file, and a newer revision is available,
address@hidden will merge all changes into your working copy.
+
+For instance, imagine that you checked out revision 1.4 and started
+editing it.  In the meantime someone else committed revision 1.5, and
+shortly after that revision 1.6.  If you run @code{update} on the file
+now, @sc{cvs} will incorporate all changes between revision 1.4 and 1.6 into
+your file.
+
address@hidden Overlap
+If any of the changes between 1.4 and 1.6 were made too
+close to any of the changes you have made, an
address@hidden occurs.  In such cases a warning is
+printed, and the resulting file includes both
+versions of the lines that overlap, delimited by
+special markers.
address@hidden, for a complete description of the
address@hidden command.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Conflicts example
address@hidden Conflicts example
address@hidden Merge, an example
address@hidden Example of merge
address@hidden driver.c (merge example)
+
+Suppose revision 1.4 of @file{driver.c} contains this:
+
address@hidden
+#include <stdio.h>
+
+void main()
address@hidden
+    parse();
+    if (nerr == 0)
+        gencode();
+    else
+        fprintf(stderr, "No code generated.\n");
+    exit(nerr == 0 ? 0 : 1);
address@hidden
address@hidden example
+
address@hidden
+Revision 1.6 of @file{driver.c} contains this:
+
address@hidden
+#include <stdio.h>
+
+int main(int argc,
+         char **argv)
address@hidden
+    parse();
+    if (argc != 1)
+    @{
+        fprintf(stderr, "tc: No args expected.\n");
+        exit(1);
+    @}
+    if (nerr == 0)
+        gencode();
+    else
+        fprintf(stderr, "No code generated.\n");
+    exit(!!nerr);
address@hidden
address@hidden example
+
address@hidden
+Your working copy of @file{driver.c}, based on revision
+1.4, contains this before you run @samp{cvs update}:
address@hidden -- Really include "cvs"?
+
address@hidden
+#include <stdlib.h>
+#include <stdio.h>
+
+void main()
address@hidden
+    init_scanner();
+    parse();
+    if (nerr == 0)
+        gencode();
+    else
+        fprintf(stderr, "No code generated.\n");
+    exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
address@hidden
address@hidden example
+
address@hidden
+You run @samp{cvs update}:
address@hidden -- Really include "cvs"?
+
address@hidden
+$ cvs update driver.c
+RCS file: /usr/local/cvsroot/yoyodyne/tc/driver.c,v
+retrieving revision 1.4
+retrieving revision 1.6
+Merging differences between 1.4 and 1.6 into driver.c
+rcsmerge warning: overlaps during merge
+cvs update: conflicts found in driver.c
+C driver.c
address@hidden example
+
address@hidden
address@hidden Conflicts (merge example)
address@hidden tells you that there were some conflicts.
+Your original working file is saved unmodified in
address@hidden  The new version of
address@hidden contains this:
+
address@hidden
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc,
+         char **argv)
address@hidden
+    init_scanner();
+    parse();
+    if (argc != 1)
+    @{
+        fprintf(stderr, "tc: No args expected.\n");
+        exit(1);
+    @}
+    if (nerr == 0)
+        gencode();
+    else
+        fprintf(stderr, "No code generated.\n");
address@hidden<<<<<<< driver.c
+    exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
address@hidden
+    exit(!!nerr);
address@hidden>>>>>>> 1.6
address@hidden
address@hidden example
+
address@hidden
address@hidden Markers, conflict
address@hidden Conflict markers
address@hidden <<<<<<<
address@hidden >>>>>>>
address@hidden =======
+
+Note how all non-overlapping modifications are incorporated in your working
+copy, and that the overlapping section is clearly marked with
address@hidden<<<<<<<}, @samp{=======} and @samp{>>>>>>>}.
+
address@hidden Resolving a conflict
address@hidden Conflict resolution
+You resolve the conflict by editing the file, removing the markers and
+the erroneous line.  Suppose you end up with this file:
address@hidden -- Add xref to the pcl-cvs manual when it talks
address@hidden -- about this.
address@hidden
+#include <stdlib.h>
+#include <stdio.h>
+
+int main(int argc,
+         char **argv)
address@hidden
+    init_scanner();
+    parse();
+    if (argc != 1)
+    @{
+        fprintf(stderr, "tc: No args expected.\n");
+        exit(1);
+    @}
+    if (nerr == 0)
+        gencode();
+    else
+        fprintf(stderr, "No code generated.\n");
+    exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
address@hidden
address@hidden example
+
address@hidden
+You can now go ahead and commit this as revision 1.7.
+
address@hidden
+$ cvs commit -m "Initialize scanner. Use symbolic exit values." driver.c
+Checking in driver.c;
+/usr/local/cvsroot/yoyodyne/tc/driver.c,v  <--  driver.c
+new revision: 1.7; previous revision: 1.6
+done
address@hidden example
+
+For your protection, @sc{cvs} will refuse to check in a
+file if a conflict occurred and you have not resolved
+the conflict.  Currently to resolve a conflict, you
+must change the timestamp on the file.  In previous
+versions of @sc{cvs}, you also needed to
+insure that the file contains no conflict markers.
+Because
+your file may legitimately contain conflict markers (that
+is, occurrences of @samp{>>>>>>> } at the start of a
+line that don't mark a conflict), the current
+version of @sc{cvs} will print a warning and proceed to
+check in the file.
address@hidden The old behavior was really icky; the only way out
address@hidden was to start hacking on
address@hidden the @code{CVS/Entries} file or other such workarounds.
address@hidden
address@hidden If the timestamp thing isn't considered nice enough,
address@hidden maybe there should be a "cvs resolved" command
address@hidden which clears the conflict indication.  For a nice user
address@hidden interface, this should be invoked by an interactive
address@hidden merge tool like emerge rather than by the user
address@hidden directly--such a tool can verify that the user has
address@hidden really dealt with each conflict.
+
address@hidden emerge
+If you use release 1.04 or later of pcl-cvs (a @sc{gnu}
+Emacs front-end for @sc{cvs}) you can use an Emacs
+package called emerge to help you resolve conflicts.
+See the documentation for pcl-cvs.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Informing others
address@hidden Informing others about commits
address@hidden Informing others
address@hidden Spreading information
address@hidden Mail, automatic mail on commit
+
+It is often useful to inform others when you commit a
+new revision of a file.  The @samp{-i} option of the
address@hidden file, or the @file{loginfo} file, can be
+used to automate this process.  @xref{modules}.
address@hidden  You can use these features of @sc{cvs}
+to, for instance, instruct @sc{cvs} to mail a
+message to all developers, or post a message to a local
+newsgroup.
address@hidden -- More text would be nice here.
+
address@hidden Concurrency
address@hidden Several developers simultaneously attempting to run CVS
+
address@hidden Locks, cvs, introduction
address@hidden For a discussion of *why* CVS creates locks, see
address@hidden the comment at the start of src/lock.c
+If several developers try to run @sc{cvs} at the same
+time, one may get the following message:
+
address@hidden
+[11:43:23] waiting for bach's lock in /usr/local/cvsroot/foo
address@hidden example
+
address@hidden #cvs.rfl, removing
address@hidden #cvs.wfl, removing
address@hidden #cvs.lock, removing
address@hidden will try again every 30 seconds, and either
+continue with the operation or print the message again,
+if it still needs to wait.  If a lock seems to stick
+around for an undue amount of time, find the person
+holding the lock and ask them about the cvs command
+they are running.  If they aren't running a cvs
+command, look in the repository directory mentioned in
+the message and remove files which they own whose names
+start with @file{#cvs.rfl},
address@hidden, or @file{#cvs.lock}.
+
+Note that these locks are to protect @sc{cvs}'s
+internal data structures and have no relationship to
+the word @dfn{lock} in the sense used by
address@hidden refers to reserved checkouts
+(@pxref{Multiple developers}).
+
+Any number of people can be reading from a given
+repository at a time; only when someone is writing do
+the locks prevent other people from reading or writing.
+
address@hidden Atomic transactions, lack of
address@hidden Transactions, atomic, lack of
address@hidden the following talks about what one might call commit/update
address@hidden atomicity.
address@hidden Probably also should say something about
address@hidden commit/commit atomicity, that is, "An update will
address@hidden not get partial versions of more than one commit".
address@hidden CVS currently has this property and I guess we can
address@hidden make it a documented feature.
address@hidden For example one person commits
address@hidden a/one.c and b/four.c and another commits a/two.c and
address@hidden b/three.c.  Then an update cannot get the new a/one.c
address@hidden and a/two.c and the old b/four.c and b/three.c.
+One might hope for the following property:
+
address@hidden
+If someone commits some changes in one cvs command,
+then an update by someone else will either get all the
+changes, or none of them.
address@hidden quotation
+
address@hidden
+but @sc{cvs} does @emph{not} have this property.  For
+example, given the files
+
address@hidden
+a/one.c
+a/two.c
+b/three.c
+b/four.c
address@hidden example
+
address@hidden
+if someone runs
+
address@hidden
+cvs ci a/two.c b/three.c
address@hidden example
+
address@hidden
+and someone else runs @code{cvs update} at the same
+time, the person running @code{update} might get only
+the change to @file{b/three.c} and not the change to
address@hidden/two.c}.
+
address@hidden Watches
address@hidden Mechanisms to track who is editing files
address@hidden Watches
+
+For many groups, use of @sc{cvs} in its default mode is
+perfectly satisfactory.  Users may sometimes go to
+check in a modification only to find that another
+modification has intervened, but they deal with it and
+proceed with their check in.  Other groups prefer to be
+able to know who is editing what files, so that if two
+people try to edit the same file they can choose to
+talk about who is doing what when rather than be
+surprised at check in time.  The features in this
+section allow such coordination, while retaining the
+ability of two developers to edit the same file at the
+same time.
+
address@hidden Some people might ask why CVS does not enforce the
address@hidden rule on chmod, by requiring a cvs edit before a cvs
address@hidden commit.  The main reason is that it could always be
address@hidden circumvented--one could edit the file, and
address@hidden then when ready to check it in, do the cvs edit and put
address@hidden in the new contents and do the cvs commit.  One
address@hidden implementation note: if we _do_ want to have cvs commit
address@hidden require a cvs edit, we should store the state on
address@hidden whether the cvs edit has occurred in the working
address@hidden directory, rather than having the server try to keep
address@hidden track of what working directories exist.
address@hidden FIXME: should the above discussion be part of the
address@hidden manual proper, somewhere, not just in a comment?
+For maximum benefit developers should use @code{cvs
+edit} (not @code{chmod}) to make files read-write to
+edit them, and @code{cvs release} (not @code{rm}) to
+discard a working directory which is no longer in use,
+but @sc{cvs} is not able to enforce this behavior.
+
+If a development team wants stronger enforcement of
+watches and all team members are using a @sc{cvs} client version 1.12.10 or
+greater to access a @sc{cvs} server version 1.12.10 or greater, they can
+enable advisory locks.  To enable advisory locks, have all developers
+put "edit -c" and "commit -c" into all .cvsrc files,
+and make files default to read only by turning on watches
+or putting "cvs -r" into all .cvsrc files.
+This prevents multiple people from editting a file at
+the same time (unless explicitly overriden with @samp{-f}).
+
address@hidden I'm a little dissatisfied with this presentation,
address@hidden because "watch on"/"edit"/"editors" are one set of
address@hidden functionality, and "watch add"/"watchers" is another
address@hidden which is somewhat orthogonal even though they interact in
address@hidden various ways.  But I think it might be
address@hidden confusing to describe them separately (e.g. "watch
address@hidden add" with loginfo).  I don't know.
+
address@hidden
+* Setting a watch::             Telling CVS to watch certain files
+* Getting Notified::            Telling CVS to notify you
+* Editing files::               How to edit a file which is being watched
+* Watch information::           Information about who is watching and editing
+* Watches Compatibility::       Watches interact poorly with CVS 1.6 or earlier
address@hidden menu
+
address@hidden Setting a watch
address@hidden Telling CVS to watch certain files
+
+To enable the watch features, you first specify that
+certain files are to be watched.
+
address@hidden watch on (subcommand)
address@hidden Command {cvs watch on} address@hidden address@hidden@dots{}
+
address@hidden Read-only files, and watches
+Specify that developers should run @code{cvs edit}
+before editing @var{files}.  @sc{cvs} will create working
+copies of @var{files} read-only, to remind developers
+to run the @code{cvs edit} command before working on
+them.
+
+If @var{files} includes the name of a directory, @sc{cvs}
+arranges to watch all files added to the corresponding
+repository directory, and sets a default for files
+added in the future; this allows the user to set
+notification policies on a per-directory basis.  The
+contents of the directory are processed recursively,
+unless the @code{-l} option is given.
+The @code{-R} option can be used to force recursion if the @code{-l}
+option is set in @file{~/.cvsrc} (@pxref{~/.cvsrc}).
+
+If @var{files} is omitted, it defaults to the current directory.
+
address@hidden watch off (subcommand)
address@hidden deffn
+
address@hidden Command {cvs watch off} address@hidden address@hidden@dots{}
+
+Do not create @var{files} read-only on checkout; thus,
+developers will not be reminded to use @code{cvs edit}
+and @code{cvs unedit}.
address@hidden
address@hidden will check out @var{files}
+read-write as usual, unless other permissions override
+due to the @code{PreservePermissions} option being
+enabled in the @file{config} administrative file
+(@pxref{Special Files}, @pxref{config})
address@hidden ignore
+
+The @var{files} and options are processed as for @code{cvs
+watch on}.
+
address@hidden deffn
+
address@hidden Getting Notified
address@hidden Telling CVS to notify you
+
+You can tell @sc{cvs} that you want to receive
+notifications about various actions taken on a file.
+You can do this without using @code{cvs watch on} for
+the file, but generally you will want to use @code{cvs
+watch on}, to remind developers to use the @code{cvs edit}
+command.
+
address@hidden watch add (subcommand)
address@hidden Command {cvs watch add} address@hidden address@hidden 
@address@hidden address@hidden@dots{}
+
+Add the current user to the list of people to receive notification of
+work done on @var{files}.
+
+The @code{-a} option specifies what kinds of events @sc{cvs} should notify
+the user about.  @var{action} is one of the following:
+
address@hidden @code
+
address@hidden edit
+Another user has applied the @code{cvs edit} command (described
+below) to a watched file.
+
address@hidden commit
+Another user has committed changes to one of the named @var{files}.
+
address@hidden unedit
+Another user has abandoned editing a file (other than by committing changes).
+They can do this in several ways, by:
+
address@hidden @bullet
+
address@hidden
+applying the @code{cvs unedit} command (described below) to the file
+
address@hidden
+applying the @code{cvs release} command (@pxref{release}) to the file's parent 
directory
+(or recursively to a directory more than one level up)
+
address@hidden
+deleting the file and allowing @code{cvs update} to recreate it
+
address@hidden itemize
+
address@hidden all
+All of the above.
+
address@hidden none
+None of the above.  (This is useful with @code{cvs edit},
+described below.)
+
address@hidden table
+
+The @code{-a} option may appear more than once, or not at all.  If
+omitted, the action defaults to @code{all}.
+
+The @var{files} and options are processed as for
address@hidden watch on}.
+
address@hidden deffn
+
+
address@hidden watch remove (subcommand)
address@hidden Command {cvs watch remove} address@hidden address@hidden 
@address@hidden address@hidden@dots{}
+
+Remove a notification request established using @code{cvs watch add};
+the arguments are the same.  If the @code{-a} option is present, only
+watches for the specified actions are removed.
+
address@hidden deffn
+
address@hidden notify (admin file)
+When the conditions exist for notification, @sc{cvs}
+calls the @file{notify} administrative file.  Edit
address@hidden as one edits the other administrative
+files (@pxref{Intro administrative files}).  This
+file follows the usual conventions for administrative
+files (@pxref{syntax}), where each line is a regular
+expression followed by a command to execute.  The
+command should contain a single occurrence of @samp{%s}
+which will be replaced by the user to notify; the rest
+of the information regarding the notification will be
+supplied to the command on standard input.  The
+standard thing to put in the @code{notify} file is the
+single line:
+
address@hidden
+ALL mail %s -s "CVS notification"
address@hidden example
+
address@hidden
+This causes users to be notified by electronic mail.
address@hidden FIXME: should it be this hard to set up this
address@hidden behavior (and the result when one fails to do so,
address@hidden silent failure to notify, so non-obvious)?  Should
address@hidden CVS give a warning if no line in notify matches (and
address@hidden document the use of "DEFAULT :" for the case where
address@hidden skipping the notification is indeed desired)?
+
address@hidden users (admin file)
+Note that if you set this up in the straightforward
+way, users receive notifications on the server machine.
+One could of course write a @file{notify} script which
+directed notifications elsewhere, but to make this
+easy, @sc{cvs} allows you to associate a notification
+address for each user.  To do so create a file
address@hidden in @file{CVSROOT} with a line for each
+user in the format @var{user}:@var{value}.  Then
+instead of passing the name of the user to be notified
+to @file{notify}, @sc{cvs} will pass the @var{value}
+(normally an email address on some other machine).
+
address@hidden does not notify you for your own changes.
+Currently this check is done based on whether the user
+name of the person taking the action which triggers
+notification matches the user name of the person
+getting notification.  In fact, in general, the watches
+features only track one edit by each user.  It probably
+would be more useful if watches tracked each working
+directory separately, so this behavior might be worth
+changing.
address@hidden "behavior might be worth changing" is an effort to
address@hidden point to future directions while also not promising
address@hidden that "they" (as in "why don't they fix CVS to....")
address@hidden will do this.
address@hidden one implementation issue is identifying whether a
address@hidden working directory is same or different.  Comparing
address@hidden pathnames/hostnames is hopeless, but having the server
address@hidden supply a serial number which the client stores in the
address@hidden CVS directory as a magic cookie should work.
+
address@hidden Editing files
address@hidden How to edit a file which is being watched
+
address@hidden Checkout, as term for getting ready to edit
+Since a file which is being watched is checked out
+read-only, you cannot simply edit it.  To make it
+read-write, and inform others that you are planning to
+edit it, use the @code{cvs edit} command.  Some systems
+call this a @dfn{checkout}, but @sc{cvs} uses that term
+for obtaining a copy of the sources (@pxref{Getting the
+source}), an operation which those systems call a
address@hidden or a @dfn{fetch}.
address@hidden Issue to think about: should we transition CVS
address@hidden towards the "get" terminology?  "cvs get" is already a
address@hidden synonym for "cvs checkout" and that section of the
address@hidden manual refers to "Getting the source".  If this is
address@hidden done, needs to be done gingerly (for example, we should
address@hidden still accept "checkout" in .cvsrc files indefinitely
address@hidden even if the CVS's messages are changed from "cvs checkout: "
address@hidden to "cvs get: ").
address@hidden There is a concern about whether "get" is not as
address@hidden good for novices because it is a more general term
address@hidden than "checkout" (and thus arguably harder to assign
address@hidden a technical meaning for).
+
address@hidden edit (subcommand)
address@hidden Command {cvs edit} address@hidden address@hidden @address@hidden 
address@hidden@dots{}
+
+Prepare to edit the working files @var{files}.  @sc{cvs} makes the
address@hidden read-write, and notifies users who have requested
address@hidden notification for any of @var{files}.
+
+The @code{cvs edit} command accepts the same options as the
address@hidden watch add} command, and establishes a temporary watch for the
+user on @var{files}; @sc{cvs} will remove the watch when @var{files} are
address@hidden or @code{commit}ted.  If the user does not wish to
+receive notifications, she should specify @code{-a none}.
+
+The @var{files} and the options are processed as for the @code{cvs
+watch} commands.
+
+There are two additional options that @code{cvs edit} understands as of
address@hidden client and server versions 1.12.10 but @code{cvs watch} does not.
+The first is @code{-c}, which causes @code{cvs edit} to fail if anyone else
+is editting the file.  This is probably only useful when @samp{edit -c} and
address@hidden -c} are specified in all developers' @file{.cvsrc} files.  This
+behavior may be overriden this via the @code{-f} option, which overrides
address@hidden and allows multiple edits to succeed.
+
address@hidden
address@hidden: If the @code{PreservePermissions}
+option is enabled in the repository (@pxref{config}),
address@hidden will not change the permissions on any of the
address@hidden  The reason for this change is to ensure
+that using @samp{cvs edit} does not interfere with the
+ability to store file permissions in the @sc{cvs}
+repository.}
address@hidden ignore
+
address@hidden deffn
+
+Normally when you are done with a set of changes, you
+use the @code{cvs commit} command, which checks in your
+changes and returns the watched files to their usual
+read-only state.  But if you instead decide to abandon
+your changes, or not to make any changes, you can use
+the @code{cvs unedit} command.
+
address@hidden unedit (subcommand)
address@hidden Abandoning work
address@hidden Reverting to repository version
address@hidden Command {cvs unedit} address@hidden address@hidden@dots{}
+
+Abandon work on the working files @var{files}, and revert them to the
+repository versions on which they are based.  @sc{cvs} makes those
address@hidden read-only for which users have requested notification using
address@hidden watch on}.  @sc{cvs} notifies users who have requested 
@code{unedit}
+notification for any of @var{files}.
+
+The @var{files} and options are processed as for the
address@hidden watch} commands.
+
+If watches are not in use, the @code{unedit} command
+probably does not work, and the way to revert to the
+repository version is with the command @code{cvs update -C file}
+(@pxref{update}).
+The meaning is
+not precisely the same; the latter may also
+bring in some changes which have been made in the
+repository since the last time you updated.
address@hidden It would be a useful enhancement to CVS to make
address@hidden unedit work in the non-watch case as well.
address@hidden deffn
+
+When using client/server @sc{cvs}, you can use the
address@hidden edit} and @code{cvs unedit} commands even if
address@hidden is unable to successfully communicate with the
+server; the notifications will be sent upon the next
+successful @sc{cvs} command.
+
address@hidden Watch information
address@hidden Information about who is watching and editing
+
address@hidden watchers (subcommand)
address@hidden Command {cvs watchers} address@hidden address@hidden@dots{}
+
+List the users currently watching changes to @var{files}.  The report
+includes the files being watched, and the mail address of each watcher.
+
+The @var{files} and options are processed as for the
address@hidden watch} commands.
+
address@hidden deffn
+
+
address@hidden editors (subcommand)
address@hidden Command {cvs editors} address@hidden address@hidden@dots{}
+
+List the users currently working on @var{files}.  The report
+includes the mail address of each user, the time when the user began
+working with the file, and the host and path of the working directory
+containing the file.
+
+The @var{files} and options are processed as for the
address@hidden watch} commands.
+
address@hidden deffn
+
address@hidden Watches Compatibility
address@hidden Using watches with old versions of CVS
+
address@hidden CVS 1.6, and watches
+If you use the watch features on a repository, it
+creates @file{CVS} directories in the repository and
+stores the information about watches in that directory.
+If you attempt to use @sc{cvs} 1.6 or earlier with the
+repository, you get an error message such as the
+following (all on one line):
+
address@hidden
+cvs update: cannot open CVS/Entries for reading:
+No such file or directory
address@hidden example
+
address@hidden
+and your operation will likely be aborted.  To use the
+watch features, you must upgrade all copies of @sc{cvs}
+which use that repository in local or server mode.  If
+you cannot upgrade, use the @code{watch off} and
address@hidden remove} commands to remove all watches, and
+that will restore the repository to a state which
address@hidden 1.6 can cope with.
+
address@hidden Choosing a model
address@hidden Choosing between reserved or unreserved checkouts
address@hidden Choosing, reserved or unreserved checkouts
+
+Reserved and unreserved checkouts each have pros and
+cons.  Let it be said that a lot of this is a matter of
+opinion or what works given different groups' working
+styles, but here is a brief description of some of the
+issues.  There are many ways to organize a team of
+developers.  @sc{cvs} does not try to enforce a certain
+organization.  It is a tool that can be used in several
+ways.
+
+Reserved checkouts can be very counter-productive.  If
+two persons want to edit different parts of a file,
+there may be no reason to prevent either of them from
+doing so.  Also, it is common for someone to take out a
+lock on a file, because they are planning to edit it,
+but then forget to release the lock.
+
address@hidden "many groups"?  specifics?  cites to papers on this?
address@hidden some way to weasel-word it a bit more so we don't
address@hidden need facts :-)?
+People, especially people who are familiar with
+reserved checkouts, often wonder how often conflicts
+occur if unreserved checkouts are used, and how
+difficult they are to resolve.  The experience with
+many groups is that they occur rarely and usually are
+relatively straightforward to resolve.
+
+The rarity of serious conflicts may be surprising, until one realizes
+that they occur only when two developers disagree on the proper design
+for a given section of code; such a disagreement suggests that the
+team has not been communicating properly in the first place.  In order
+to collaborate under @emph{any} source management regimen, developers
+must agree on the general design of the system; given this agreement,
+overlapping changes are usually straightforward to merge.
+
+In some cases unreserved checkouts are clearly
+inappropriate.  If no merge tool exists for the kind of
+file you are managing (for example word processor files
+or files edited by Computer Aided Design programs), and
+it is not desirable to change to a program which uses a
+mergeable data format, then resolving conflicts is
+going to be unpleasant enough that you generally will
+be better off to simply avoid the conflicts instead, by
+using reserved checkouts.
+
+The watches features described above in @ref{Watches}
+can be considered to be an intermediate model between
+reserved checkouts and unreserved checkouts.  When you
+go to edit a file, it is possible to find out who else
+is editing it.  And rather than having the system
+simply forbid both people editing the file, it can tell
+you what the situation is and let you figure out
+whether it is a problem in that particular case or not.
+Therefore, for some groups watches can be
+considered the best of both the reserved checkout and unreserved
+checkout worlds.
+
+As of @sc{cvs} client and server versions 1.12.10, you may also enable
+advisory locks by putting @samp{edit -c} and @samp{commit -c} in all
+developers' @file{.cvsrc} files.  After this is done, @code{cvs edit}
+will fail if there are any other editors, and @code{cvs commit} will
+fail if the committer has not registered to edit the file via @code{cvs edit}.
+This is most effective in conjunction with files checked out read-only by
+default, which may be enabled by turning on watches in the repository or by
+putting @samp{cvs -r} in all @file{.cvsrc} files.
+
+
address@hidden 
---------------------------------------------------------------------
address@hidden Revision management
address@hidden Revision management
address@hidden Revision management
+
address@hidden -- This chapter could be expanded a lot.
address@hidden -- Experiences are very welcome!
+
+If you have read this far, you probably have a pretty
+good grasp on what @sc{cvs} can do for you.  This
+chapter talks a little about things that you still have
+to decide.
+
+If you are doing development on your own using @sc{cvs}
+you could probably skip this chapter.  The questions
+this chapter takes up become more important when more
+than one person is working in a repository.
+
address@hidden
+* When to commit::              Some discussion on the subject
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden When to commit
address@hidden When to commit?
address@hidden When to commit
address@hidden Committing, when to
address@hidden Policy
+
+Your group should decide which policy to use regarding
+commits.  Several policies are possible, and as your
+experience with @sc{cvs} grows you will probably find
+out what works for you.
+
+If you commit files too quickly you might commit files
+that do not even compile.  If your partner updates his
+working sources to include your buggy file, he will be
+unable to compile the code.  On the other hand, other
+persons will not be able to benefit from the
+improvements you make to the code if you commit very
+seldom, and conflicts will probably be more common.
+
+It is common to only commit files after making sure
+that they can be compiled.  Some sites require that the
+files pass a test suite.  Policies like this can be
+enforced using the commitinfo file
+(@pxref{commitinfo}), but you should think twice before
+you enforce such a convention.  By making the
+development environment too controlled it might become
+too regimented and thus counter-productive to the real
+goal, which is to get software written.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Keyword substitution
address@hidden Keyword substitution
address@hidden Keyword substitution
address@hidden Keyword expansion
address@hidden Identifying files
+
address@hidden   Be careful when editing this chapter.
address@hidden   Remember that this file is kept under
address@hidden   version control, so we must not accidentally
address@hidden   include a valid keyword in the running text.
+
+As long as you edit source files inside a working
+directory you can always find out the state of
+your files via @samp{cvs status} and @samp{cvs log}.
+But as soon as you export the files from your
+development environment it becomes harder to identify
+which revisions they are.
+
address@hidden can use a mechanism known as @dfn{keyword
+substitution} (or @dfn{keyword expansion}) to help
+identifying the files.  Embedded strings of the form
address@hidden@var{keyword}$} and
address@hidden@var{keyword}:@dots{}$} in a file are replaced
+with strings of the form
address@hidden@var{keyword}:@var{value}$} whenever you obtain
+a new revision of the file.
+
address@hidden
+* Keyword list::                   Keywords
+* Using keywords::                 Using keywords
+* Avoiding substitution::          Avoiding substitution
+* Substitution modes::             Substitution modes
+* Configuring keyword expansion::  Configuring keyword expansion
+* Log keyword::                    Problems with the address@hidden keyword.
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Keyword list
address@hidden Keyword List
address@hidden Keyword List
+
address@hidden FIXME: need some kind of example here I think,
address@hidden perhaps in a
address@hidden "Keyword intro" node.  The intro in the "Keyword
address@hidden substitution" node itself seems OK, but to launch
address@hidden into a list of the keywords somehow seems too abrupt.
+
+This is a list of the keywords:
+
address@hidden @code
address@hidden Author keyword
address@hidden address@hidden
+The login name of the user who checked in the revision.
+
address@hidden CVSHeader keyword
address@hidden address@hidden
+A standard header (similar to address@hidden, but with
+the CVS root stripped off). It contains the relative
+pathname of the @sc{rcs} file to the CVS root, the
+revision number, the date (UTC), the author, the state,
+and the locker (if locked). Files will normally never
+be locked when you use @sc{cvs}.
+
+Note that this keyword has only been recently
+introduced to @sc{cvs} and may cause problems with
+existing installations if address@hidden is already
+in the files for a different purpose. This keyword may
+be excluded using the @code{KeywordExpand=eCVSHeader}
+in the @file{CVSROOT/config} file. 
+See @ref{Configuring keyword expansion} for more details.
+
address@hidden Date keyword
address@hidden address@hidden
+The date and time (UTC) the revision was checked in.
+
address@hidden Header keyword
address@hidden address@hidden
+A standard header containing the full pathname of the
address@hidden file, the revision number, the date (UTC), the
+author, the state, and the locker (if locked).  Files
+will normally never be locked when you use @sc{cvs}.
+
address@hidden Id keyword
address@hidden address@hidden
+Same as @address@hidden, except that the @sc{rcs}
+filename is without a path.
+
address@hidden Name keyword
address@hidden address@hidden
+Tag name used to check out this file.  The keyword is
+expanded only if one checks out with an explicit tag
+name.  For example, when running the command @code{cvs
+co -r first}, the keyword expands to @samp{Name: first}.
+
address@hidden Locker keyword
address@hidden address@hidden
+The login name of the user who locked the revision
+(empty if not locked, which is the normal case unless
address@hidden admin -l} is in use).
+
address@hidden Log keyword
address@hidden MaxCommentLeaderLength
address@hidden UseArchiveCommentLeader
address@hidden Log keyword, configuring substitution behavior
address@hidden address@hidden
+The log message supplied during commit, preceded by a
+header containing the @sc{rcs} filename, the revision
+number, the author, and the date (UTC).  Existing log
+messages are @emph{not} replaced.  Instead, the new log
+message is inserted after @address@hidden:@dots{}$}.
+By default, each new line is prefixed with the same string which
+precedes the @address@hidden keyword, unless it exceeds the
address@hidden set in @file{CVSROOT/config}.
+
+For example, if the file contains:
+
address@hidden
+  /* Here is what people have been up to:
+   *
+   * address@hidden: frob.c,v $
+   * Revision 1.1  1997/01/03 14:23:51  joe
+   * Add the superfrobnicate option
+   *
+   */
address@hidden example
+
address@hidden
+then additional lines which are added when expanding
+the @address@hidden keyword will be preceded by @samp{   * }.
+Unlike previous versions of @sc{cvs} and @sc{rcs}, the
address@hidden leader} from the @sc{rcs} file is not used.
+The @address@hidden keyword is useful for
+accumulating a complete change log in a source file,
+but for several reasons it can be problematic.
+
+If the prefix of the @address@hidden keyword turns out to be
+longer than @code{MaxCommentLeaderLength}, CVS will skip expansion of this
+keyword unless @code{UseArchiveCommentLeader} is also set in
address@hidden/config} and a @samp{comment leader} is set in the RCS archive
+file, in which case the comment leader will be used instead.  For more on
+setting the comment leader in the RCS archive file, @xref{admin}.  For more
+on configuring the default @address@hidden substitution
+behavior, @xref{config}.
+
address@hidden keyword}.
+
address@hidden RCSfile keyword
address@hidden address@hidden
+The name of the RCS file without a path.
+
address@hidden Revision keyword
address@hidden address@hidden
+The revision number assigned to the revision.
+
address@hidden Source keyword
address@hidden address@hidden
+The full pathname of the RCS file.
+
address@hidden State keyword
address@hidden address@hidden
+The state assigned to the revision.  States can be
+assigned with @code{cvs admin -s}---see @ref{admin options}.
+
address@hidden Local keyword
address@hidden Local keyword
+The @code{LocalKeyword} option in the @file{CVSROOT/config} file
+may be used to specify a local keyword which is to be
+used as an alias for one of the keywords: address@hidden,
address@hidden, or address@hidden For
+example, if the @file{CVSROOT/config} file contains
+a line with @code{LocalKeyword=MYBSD=CVSHeader}, then a
+file with the local keyword address@hidden will be
+expanded as if it were a address@hidden keyword. If
+the src/frob.c file contained this keyword, it might
+look something like this:
+
address@hidden
+  /*
+   * address@hidden: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 
+   */
address@hidden example
+
+Many repositories make use of a such a ``local
+keyword'' feature. An old patch to @sc{cvs} provided
+the @code{LocalKeyword} feature using a @code{tag=}
+option and called this the ``custom tag'' or ``local
+tag'' feature. It was used in conjunction with the
+what they called the @code{tagexpand=} option. In
address@hidden this other option is known as the
address@hidden option. 
+See @ref{Configuring keyword expansion} for more
+details.
+
+Examples from popular projects include:
address@hidden, address@hidden,
address@hidden, address@hidden,
address@hidden
+
+The advantage of this is that you can include your
+local version information in a file using this local
+keyword without disrupting the upstream version
+information (which may be a different local keyword or
+a standard keyword). Allowing bug reports and the like
+to more properly identify the source of the original
+bug to the third-party and reducing the number of
+conflicts that arise during an import of a new version.
+
+All keyword expansion except the local keyword may be
+disabled using the @code{KeywordExpand} option in
+the @file{CVSROOT/config} file---see 
address@hidden keyword expansion} for more details.
+
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Using keywords
address@hidden Using keywords
+
+To include a keyword string you simply include the
+relevant text string, such as @address@hidden, inside the
+file, and commit the file.  @sc{cvs} will automatically (Or,
+more accurately, as part of the update run that
+automatically happens after a commit.)
+expand the string as part of the commit operation.
+
+It is common to embed the @address@hidden string in
+the source files so that it gets passed through to
+generated files.  For example, if you are managing
+computer program source code, you might include a
+variable which is initialized to contain that string.
+Or some C compilers may provide a @code{#pragma ident}
+directive.  Or a document management system might
+provide a way to pass a string through to generated
+files.
+
address@hidden Would be nice to give an example, but doing this in
address@hidden portable C is not possible and the problem with
address@hidden picking any one language (VMS HELP files, Ada,
address@hidden troff, whatever) is that people use CVS for all
address@hidden kinds of files.
+
address@hidden Ident (shell command)
+The @code{ident} command (which is part of the @sc{rcs}
+package) can be used to extract keywords and their
+values from a file.  This can be handy for text files,
+but it is even more useful for extracting keywords from
+binary files.
+
address@hidden
+$ ident samp.c
+samp.c:
+     address@hidden: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
+$ gcc samp.c
+$ ident a.out
+a.out:
+     address@hidden: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
address@hidden example
+
address@hidden What (shell command)
address@hidden is another popular revision control system.
+It has a command, @code{what}, which is very similar to
address@hidden and used for the same purpose.  Many sites
+without @sc{rcs} have @sc{sccs}.  Since @code{what}
+looks for the character sequence @code{@@(#)} it is
+easy to include keywords that are detected by either
+command.  Simply prefix the keyword with the
+magic @sc{sccs} phrase, like this:
+
address@hidden
+static char *id="@@(#) address@hidden: ab.c,v 1.5 1993/10/19 14:57:32 ceder 
Exp $";
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Avoiding substitution
address@hidden Avoiding substitution
+
+Keyword substitution has its disadvantages.  Sometimes
+you might want the literal text string
address@hidden@splitrcskeyword{Author}$} to appear inside a file without
address@hidden interpreting it as a keyword and expanding it
+into something like @address@hidden: ceder $}.
+
+There is unfortunately no way to selectively turn off
+keyword substitution.  You can use @samp{-ko}
+(@pxref{Substitution modes}) to turn off keyword
+substitution entirely.
+
+In many cases you can avoid using keywords in
+the source, even though they appear in the final
+product.  For example, the source for this manual
+contains @samp{$@@address@hidden@}Author$} whenever the text
address@hidden@splitrcskeyword{Author}$} should appear.  In @code{nroff}
+and @code{troff} you can embed the null-character
address@hidden&} inside the keyword for a similar effect.
+
+It is also possible to specify an explicit list of
+keywords to include or exclude using the
address@hidden option in the
address@hidden/config} file--see @ref{Configuring keyword expansion}
+for more details. This feature is intended primarily
+for use with the @code{LocalKeyword} option--see
address@hidden list}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Substitution modes
address@hidden Substitution modes
address@hidden Keyword substitution, changing modes
address@hidden -k (keyword substitution)
address@hidden Kflag
+
address@hidden FIXME: This could be made more coherent, by expanding it
address@hidden with more examples or something.
+Each file has a stored default substitution mode, and
+each working directory copy of a file also has a
+substitution mode.  The former is set by the @samp{-k}
+option to @code{cvs add} and @code{cvs admin}; the
+latter is set by the @samp{-k} or @samp{-A} options to @code{cvs
+checkout} or @code{cvs update}.
address@hidden diff} and @code{cvs rdiff} also
+have @samp{-k} options.
+For some examples,
+see @ref{Binary files}, and @ref{Merging and keywords}.
address@hidden The fact that -A is overloaded to mean both reset
address@hidden sticky options and reset sticky tags/dates is
address@hidden somewhat questionable.  Perhaps there should be
address@hidden separate options to reset sticky options (e.g. -k
address@hidden A") and tags/dates (someone suggested -r HEAD could
address@hidden do this instead of setting a sticky tag of "HEAD"
address@hidden as in the status quo but I haven't thought much
address@hidden about that idea.  Of course -r .reset or something
address@hidden could be coined if this needs to be a new option).
address@hidden On the other hand, having -A mean "get things back
address@hidden into the state after a fresh checkout" has a certain
address@hidden appeal, and maybe there is no sufficient reason for
address@hidden creeping featurism in this area.
+
+The modes available are:
+
address@hidden @samp
address@hidden -kkv
+Generate keyword strings using the default form, e.g.
address@hidden@splitrcskeyword{Revision}: 5.7 $} for the @code{Revision}
+keyword.
+
address@hidden -kkvl
+Like @samp{-kkv}, except that a locker's name is always
+inserted if the given revision is currently locked.
+The locker's name is only relevant if @code{cvs admin
+-l} is in use.
+
address@hidden -kk
+Generate only keyword names in keyword strings; omit
+their values.  For example, for the @code{Revision}
+keyword, generate the string @address@hidden
+instead of @address@hidden: 5.7 $}.  This option
+is useful to ignore differences due to keyword
+substitution when comparing different revisions of a
+file (@pxref{Merging and keywords}).
+
address@hidden -ko
+Generate the old keyword string, present in the working
+file just before it was checked in.  For example, for
+the @code{Revision} keyword, generate the string
address@hidden@splitrcskeyword{Revision}: 1.1 $} instead of
address@hidden@splitrcskeyword{Revision}: 5.7 $} if that is how the
+string appeared when the file was checked in.
+
address@hidden -kb
+Like @samp{-ko}, but also inhibit conversion of line
+endings between the canonical form in which they are
+stored in the repository (linefeed only), and the form
+appropriate to the operating system in use on the
+client.  For systems, like unix, which use linefeed
+only to terminate lines, this is very similar to
address@hidden  For more information on binary files, see
address@hidden files}.  In @sc{cvs} version 1.12.2 and later
address@hidden, as set by @code{cvs add}, @code{cvs admin}, or
address@hidden import} may not be overridden by a @samp{-k} option
+specified on the command line.
+
address@hidden -kv
+Generate only keyword values for keyword strings.  For
+example, for the @code{Revision} keyword, generate the string
address@hidden instead of @address@hidden: 5.7 $}.
+This can help generate files in programming languages
+where it is hard to strip keyword delimiters like
address@hidden@splitrcskeyword{Revision}: $} from a string.  However,
+further keyword substitution cannot be performed once
+the keyword names are removed, so this option should be
+used with care.
+
+One often would like to use @samp{-kv} with @code{cvs
address@hidden  But be aware that doesn't
+handle an export containing binary files correctly.
+
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Configuring keyword expansion
address@hidden Configuring Keyword Expansion
address@hidden Configuring keyword expansion
+
+In a repository that includes third-party software on
+vendor branches, it is sometimes helpful to configure
+CVS to use a local keyword instead of the standard
address@hidden or address@hidden keywords. Examples from
+real projects include address@hidden, address@hidden,
address@hidden, address@hidden,
address@hidden, and even address@hidden
+The advantage of this is that
+you can include your local version information in a
+file using this local keyword (sometimes called a
+``custom tag'' or a ``local tag'') without disrupting
+the upstream version information (which may be a
+different local keyword or a standard keyword). In
+these cases, it is typically desirable to disable the
+expansion of all keywords except the configured local
+keyword.
+
+The @code{KeywordExpand} option in the
address@hidden/config} file is intended to allow for the
+either the explicit exclusion of a keyword or list of
+keywords, or for the explicit inclusion of a keyword or
+a list of keywords. This list may include the
address@hidden that has been configured.
+
+The @code{KeywordExpand} option is followed by
address@hidden and the next character may either be @code{i}
+to start an inclusion list or @code{e} to start an
+exclusion list. If the following lines were added to
+the @file{CVSROOT/config} file:
+
address@hidden
+        # Add a "MyBSD" keyword and restrict keyword
+        # expansion
+        LocalKeyword=MyBSD=CVSHeader
+        KeywordExpand=iMyBSD
address@hidden example
+
+then only the address@hidden keyword would be expanded.
+A list may be used. The this example:
+
address@hidden
+        # Add a "MyBSD" keyword and restrict keyword
+        # expansion to the MyBSD, Name and Date keywords.
+        LocalKeyword=MyBSD=CVSHeader
+        KeywordExpand=iMyBSD,Name,Date
address@hidden example
+
+would allow address@hidden, address@hidden, and
address@hidden to be expanded.
+
+It is also possible to configure an exclusion list
+using the following:
+
address@hidden
+        # Do not expand the non-RCS keyword CVSHeader
+        KeywordExpand=eCVSHeader
address@hidden example
+
+This allows @sc{cvs} to ignore the recently introduced
address@hidden keyword and retain all of the
+others. The exclusion entry could also contain the
+standard RCS keyword list, but this could be confusing
+to users that expect RCS keywords to be expanded, so
+care should be taken to properly set user expectations
+for a repository that is configured in that manner.
+
+If there is a desire to not have any RCS keywords
+expanded and not use the @code{-ko} flags everywhere,
+an administrator may disable all keyword expansion
+using the @file{CVSROOT/config} line:
+
address@hidden
+       # Do not expand any RCS keywords
+       KeywordExpand=i
address@hidden example
+
+this could be confusing to users that expect RCS
+keywords like address@hidden to be expanded properly,
+so care should be taken to properly set user
+expectations for a repository so configured.
+
+It should be noted that a patch to provide both the
address@hidden and @code{LocalKeyword} features
+has been around a long time. However, that patch
+implemented these features using @code{tag=} and
address@hidden keywords and those keywords are NOT
+recognized.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Log keyword
address@hidden Problems with the address@hidden keyword.
+
+The @address@hidden keyword is somewhat
+controversial.  As long as you are working on your
+development system the information is easily accessible
+even if you do not use the @address@hidden
+keyword---just do a @code{cvs log}.  Once you export
+the file the history information might be useless
+anyhow.
+
+A more serious concern is that @sc{cvs} is not good at
+handling @address@hidden entries when a branch is
+merged onto the main trunk.  Conflicts often result
+from the merging operation.
address@hidden Might want to check whether the CVS implementation
address@hidden of RCS_merge has this problem the same way rcsmerge
address@hidden does.  I would assume so....
+
+People also tend to "fix" the log entries in the file
+(correcting spelling mistakes and maybe even factual
+errors).  If that is done the information from
address@hidden log} will not be consistent with the
+information inside the file.  This may or may not be a
+problem in real life.
+
+It has been suggested that the @address@hidden
+keyword should be inserted @emph{last} in the file, and
+not in the files header, if it is to be used at all.
+That way the long list of change messages will not
+interfere with everyday source file browsing.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Tracking sources
address@hidden Tracking third-party sources
address@hidden Third-party sources
address@hidden Tracking sources
+
address@hidden FIXME: Need discussion of added and removed files.
address@hidden FIXME: This doesn't really adequately introduce the
address@hidden concepts of "vendor" and "you".  They don't *have*
address@hidden to be separate organizations or separate people.
address@hidden We want a description which is somewhat more based on
address@hidden the technical issues of which sources go where, but
address@hidden also with enough examples of how this relates to
address@hidden relationships like customer-supplier, developer-QA,
address@hidden maintainer-contributor, or whatever, to make it
address@hidden seem concrete.
+If you modify a program to better fit your site, you
+probably want to include your modifications when the next
+release of the program arrives.  @sc{cvs} can help you with
+this task.
+
address@hidden Vendor
address@hidden Vendor branch
address@hidden Branch, vendor-
+In the terminology used in @sc{cvs}, the supplier of the
+program is called a @dfn{vendor}.  The unmodified
+distribution from the vendor is checked in on its own
+branch, the @dfn{vendor branch}.  @sc{cvs} reserves branch
+1.1.1 for this use.
+
+When you modify the source and commit it, your revision
+will end up on the main trunk.  When a new release is
+made by the vendor, you commit it on the vendor branch
+and copy the modifications onto the main trunk.
+
+Use the @code{import} command to create and update
+the vendor branch.  When you import a new file,
+(usually) the vendor branch is made the `head' revision, so
+anyone that checks out a copy of the file gets that
+revision.  When a local modification is committed it is
+placed on the main trunk, and made the `head'
+revision.
+
address@hidden
+* First import::                Importing for the first time
+* Update imports::              Updating with the import command
+* Reverting local changes::     Reverting to the latest vendor release
+* Binary files in imports::     Binary files require special handling
+* Keywords in imports::         Keyword substitution might be undesirable
+* Multiple vendor branches::    What if you get sources from several places?
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden First import
address@hidden Importing for the first time
address@hidden Importing modules
+
address@hidden Should mention naming conventions for vendor tags,
address@hidden release tags, and perhaps directory names.
+Use the @code{import} command to check in the sources
+for the first time.  When you use the @code{import}
+command to track third-party sources, the @dfn{vendor
+tag} and @dfn{release tags} are useful.  The
address@hidden tag} is a symbolic name for the branch
+(which is always 1.1.1, unless you use the @samp{-b
address@hidden flag---see @ref{Multiple vendor branches}.).  The
address@hidden tags} are symbolic names for a particular
+release, such as @samp{FSF_0_04}.
+
address@hidden I'm not completely sure this belongs here.  But
address@hidden we need to say it _somewhere_ reasonably obvious; it
address@hidden is a common misconception among people first learning CVS
+Note that @code{import} does @emph{not} change the
+directory in which you invoke it.  In particular, it
+does not set up that directory as a @sc{cvs} working
+directory; if you want to work with the sources import
+them first and then check them out into a different
+directory (@pxref{Getting the source}).
+
address@hidden wdiff (import example)
+Suppose you have the sources to a program called
address@hidden in a directory @file{wdiff-0.04},
+and are going to make private modifications that you
+want to be able to use even when new releases are made
+in the future.  You start by importing the source to
+your repository:
+
address@hidden
+$ cd wdiff-0.04
+$ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04
address@hidden example
+
+The vendor tag is named @samp{FSF_DIST} in the above
+example, and the only release tag assigned is
address@hidden
address@hidden FIXME: Need to say where fsf/wdiff comes from.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Update imports
address@hidden Updating with the import command
+
+When a new release of the source arrives, you import it into the
+repository with the same @code{import} command that you used to set up
+the repository in the first place.  The only difference is that you
+specify a different release tag this time:
+
address@hidden
+$ tar xfz wdiff-0.05.tar.gz
+$ cd wdiff-0.05
+$ cvs import -m "Import of FSF v. 0.05" fsf/wdiff FSF_DIST WDIFF_0_05
address@hidden example
+
address@hidden: If you use a release tag that already exists in one of the
+repository archives, files removed by an import may not be detected.}
+
+For files that have not been modified locally, the newly created
+revision becomes the head revision.  If you have made local
+changes, @code{import} will warn you that you must merge the changes
+into the main trunk, and tell you to use @samp{checkout -j} to do so:
+
address@hidden FIXME: why "wdiff" here and "fsf/wdiff" in the
address@hidden "import"?  I think the assumption is that one has
address@hidden "wdiff fsf/wdiff" or some such in modules, but it
address@hidden would be better to not use modules in this example.
address@hidden
+$ cvs checkout -jFSF_DIST:yesterday -jFSF_DIST wdiff
address@hidden example
+
address@hidden
+The above command will check out the latest revision of
address@hidden, merging the changes made on the vendor branch @samp{FSF_DIST}
+since yesterday into the working copy.  If any conflicts arise during
+the merge they should be resolved in the normal way (@pxref{Conflicts
+example}).  Then, the modified files may be committed.
+
+However, it is much better to use the two release tags rather than using
+a date on the branch as suggested above:
+
address@hidden
+$ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff
address@hidden example
+
address@hidden
+The reason this is better is that
+using a date, as suggested above, assumes that you do
+not import more than one release of a product per day.
+More importantly, using the release tags allows @sc{cvs} to detect files
+that were removed between the two vendor releases and mark them for
+removal.  Since @code{import} has no way to detect removed files, you
+should do a merge like this even if @code{import} doesn't tell you to.
+
address@hidden Reverting local changes
address@hidden Reverting to the latest vendor release
+
+You can also revert local changes completely and return
+to the latest vendor release by changing the `head'
+revision back to the vendor branch on all files.  For
+example, if you have a checked-out copy of the sources
+in @file{~/work.d/wdiff}, and you want to revert to the
+vendor's version for all the files in that directory,
+you would type:
+
address@hidden
+$ cd ~/work.d/wdiff
+$ cvs admin -bFSF_DIST .
address@hidden example
+
address@hidden
+You must specify the @samp{-bFSF_DIST} without any space
+after the @samp{-b}.  @xref{admin options}.
+
address@hidden Binary files in imports
address@hidden How to handle binary files with cvs import
+
+Use the @samp{-k} wrapper option to tell import which
+files are binary.  @xref{Wrappers}.
+
address@hidden Keywords in imports
address@hidden How to handle keyword substitution with cvs import
+
+The sources which you are importing may contain
+keywords (@pxref{Keyword substitution}).  For example,
+the vendor may use @sc{cvs} or some other system
+which uses similar keyword expansion syntax.  If you
+just import the files in the default fashion, then
+the keyword expansions supplied by the vendor will
+be replaced by keyword expansions supplied by your
+own copy of @sc{cvs}.  It may be more convenient to
+maintain the expansions supplied by the vendor, so
+that this information can supply information about
+the sources that you imported from the vendor.
+
+To maintain the keyword expansions supplied by the
+vendor, supply the @samp{-ko} option to @code{cvs
+import} the first time you import the file.
+This will turn off keyword expansion
+for that file entirely, so if you want to be more
+selective you'll have to think about what you want
+and use the @samp{-k} option to @code{cvs update} or
address@hidden admin} as appropriate.
address@hidden Supplying -ko to import if the file already existed
address@hidden has no effect.  Not clear to me whether it should
address@hidden or not.
+
address@hidden Multiple vendor branches
address@hidden Multiple vendor branches
+
+All the examples so far assume that there is only one
+vendor from which you are getting sources.  In some
+situations you might get sources from a variety of
+places.  For example, suppose that you are dealing with
+a project where many different people and teams are
+modifying the software.  There are a variety of ways to
+handle this, but in some cases you have a bunch of
+source trees lying around and what you want to do more
+than anything else is just to all put them in @sc{cvs} so
+that you at least have them in one place.
+
+For handling situations in which there may be more than
+one vendor, you may specify the @samp{-b} option to
address@hidden import}.  It takes as an argument the vendor
+branch to import to.  The default is @samp{-b 1.1.1}.
+
+For example, suppose that there are two teams, the red
+team and the blue team, that are sending you sources.
+You want to import the red team's efforts to branch
+1.1.1 and use the vendor tag RED.  You want to import
+the blue team's efforts to branch 1.1.3 and use the
+vendor tag BLUE.  So the commands you might use are:
+
address@hidden
+$ cvs import dir RED RED_1-0
+$ cvs import -b 1.1.3 dir BLUE BLUE_1-5
address@hidden example
+
+Note that if your vendor tag does not match your
address@hidden option, @sc{cvs} will not detect this case!  For
+example,
+
address@hidden
+$ cvs import -b 1.1.3 dir RED RED_1-0
address@hidden example
+
address@hidden
+Be careful; this kind of mismatch is sure to sow
+confusion or worse.  I can't think of a useful purpose
+for the ability to specify a mismatch here, but if you
+discover such a use, don't.  @sc{cvs} is likely to make this
+an error in some future release.
+
address@hidden Probably should say more about the semantics of
address@hidden multiple branches.  What about the default branch?
address@hidden What about joining (perhaps not as useful with
address@hidden multiple branches, or perhaps it is.  Either way
address@hidden should be mentioned).
+
address@hidden I'm not sure about the best location for this.  In
address@hidden one sense, it might belong right after we've introduced
address@hidden CVS's basic version control model, because people need
address@hidden to figure out builds right away.  The current location
address@hidden is based on the theory that it kind of akin to the
address@hidden "Revision management" section.
address@hidden Builds
address@hidden How your build system interacts with CVS
address@hidden Builds
address@hidden make
+
+As mentioned in the introduction, @sc{cvs} does not
+contain software for building your software from source
+code.  This section describes how various aspects of
+your build system might interact with @sc{cvs}.
+
address@hidden Is there a way to discuss this without reference to
address@hidden tools other than CVS?  I'm not sure there is; I
address@hidden wouldn't think that people who learn CVS first would
address@hidden even have this concern.
+One common question, especially from people who are
+accustomed to @sc{rcs}, is how to make their build get
+an up to date copy of the sources.  The answer to this
+with @sc{cvs} is two-fold.  First of all, since
address@hidden itself can recurse through directories, there
+is no need to modify your @file{Makefile} (or whatever
+configuration file your build tool uses) to make sure
+each file is up to date.  Instead, just use two
+commands, first @code{cvs -q update} and then
address@hidden or whatever the command is to invoke your
+build tool.  Secondly, you do not necessarily
address@hidden to get a copy of a change someone else made
+until you have finished your own work.  One suggested
+approach is to first update your sources, then
+implement, build and
+test the change you were thinking of, and then commit
+your sources (updating first if necessary).  By
+periodically (in between changes, using the approach
+just described) updating your entire tree, you ensure
+that your sources are sufficiently up to date.
+
address@hidden Bill of materials
+One common need is to record which versions of which
+source files went into a particular build.  This kind
+of functionality is sometimes called @dfn{bill of
+materials} or something similar.  The best way to do
+this with @sc{cvs} is to use the @code{tag} command to
+record which versions went into a given build
+(@pxref{Tags}).
+
+Using @sc{cvs} in the most straightforward manner
+possible, each developer will have a copy of the entire
+source tree which is used in a particular build.  If
+the source tree is small, or if developers are
+geographically dispersed, this is the preferred
+solution.  In fact one approach for larger projects is
+to break a project down into smaller
address@hidden I say subsystem instead of module because they may or
address@hidden may not use the modules file.
+separately-compiled subsystems, and arrange a way of
+releasing them internally so that each developer need
+check out only those subsystems which they are
+actively working on.
+
+Another approach is to set up a structure which allows
+developers to have their own copies of some files, and
+for other files to access source files from a central
+location.  Many people have come up with some such a
address@hidden two such people are address@hidden (for
address@hidden a previous employer)
address@hidden and address@hidden (spicm and related tools),
address@hidden but as far as I know
address@hidden no one has nicely packaged or released such a system (or
address@hidden instructions for constructing one).
+system using features such as the symbolic link feature
+found in many operating systems, or the @code{VPATH}
+feature found in many versions of @code{make}.  One build
+tool which is designed to help with this kind of thing
+is Odin (see
address@hidden://ftp.cs.colorado.edu/pub/distribs/odin}).
address@hidden Should we be saying more about Odin?  Or how you use
address@hidden it with CVS?  Also, the Prime Time Freeware for Unix
address@hidden disk (see http://www.ptf.com/) has Odin (with a nice
address@hidden paragraph summarizing it on the web), so that might be a
address@hidden semi-"official" place to point people.
address@hidden
address@hidden Of course, many non-CVS systems have this kind of
address@hidden functionality, for example OSF's ODE
address@hidden (http://www.osf.org/ode/) or mk
address@hidden (http://www.grin.net/~pzi/mk-3.18.4.docs/mk_toc.html
address@hidden He has changed providers in the past; a search engine search
address@hidden for "Peter Ziobrzynski" probably won't get too many
address@hidden spurious hits :-).  A more stable URL might be
address@hidden ftp://ftp.uu.net/pub/cmvc/mk).  But I'm not sure
address@hidden there is any point in mentioning them here unless they
address@hidden can work with CVS.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Special Files
address@hidden Special Files
+
address@hidden Special files
address@hidden Device nodes
address@hidden Ownership, saving in CVS
address@hidden Permissions, saving in CVS
address@hidden Hard links
address@hidden Symbolic links
+
+In normal circumstances, @sc{cvs} works only with regular
+files.  Every file in a project is assumed to be
+persistent; it must be possible to open, read and close
+them; and so on.  @sc{cvs} also ignores file permissions and
+ownerships, leaving such issues to be resolved by the
+developer at installation time.  In other words, it is
+not possible to "check in" a device into a repository;
+if the device file cannot be opened, @sc{cvs} will refuse to
+handle it.  Files also lose their ownerships and
+permissions during repository transactions.
+
address@hidden
+If the configuration variable @code{PreservePermissions}
+(@pxref{config}) is set in the repository, @sc{cvs} will
+save the following file characteristics in the
+repository:
+
address@hidden @bullet
address@hidden user and group ownership
address@hidden permissions
address@hidden major and minor device numbers
address@hidden symbolic links
address@hidden hard link structure
address@hidden itemize
+
+Using the @code{PreservePermissions} option affects the
+behavior of @sc{cvs} in several ways.  First, some of the
+new operations supported by @sc{cvs} are not accessible to
+all users.  In particular, file ownership and special
+file characteristics may only be changed by the
+superuser.  When the @code{PreservePermissions}
+configuration variable is set, therefore, users will
+have to be `root' in order to perform @sc{cvs} operations.
+
+When @code{PreservePermissions} is in use, some @sc{cvs}
+operations (such as @samp{cvs status}) will not
+recognize a file's hard link structure, and so will
+emit spurious warnings about mismatching hard links.
+The reason is that @sc{cvs}'s internal structure does not
+make it easy for these operations to collect all the
+necessary data about hard links, so they check for file
+conflicts with inaccurate data.
+
+A more subtle difference is that @sc{cvs} considers a file
+to have changed only if its contents have changed
+(specifically, if the modification time of the working
+file does not match that of the repository's file).
+Therefore, if only the permissions, ownership or hard
+linkage have changed, or if a device's major or minor
+numbers have changed, @sc{cvs} will not notice.  In order to
+commit such a change to the repository, you must force
+the commit with @samp{cvs commit -f}.  This also means
+that if a file's permissions have changed and the
+repository file is newer than the working copy,
+performing @samp{cvs update} will silently change the
+permissions on the working copy.
+
+Changing hard links in a @sc{cvs} repository is particularly
+delicate.  Suppose that file @file{foo} is linked to
+file @file{old}, but is later relinked to file
address@hidden  You can wind up in the unusual situation
+where, although @file{foo}, @file{old} and @file{new}
+have all had their underlying link patterns changed,
+only @file{foo} and @file{new} have been modified, so
address@hidden is not considered a candidate for checking
+in.  It can be very easy to produce inconsistent
+results this way.  Therefore, we recommend that when it
+is important to save hard links in a repository, the
+prudent course of action is to @code{touch} any file
+whose linkage or status has changed since the last
+checkin.  Indeed, it may be wise to @code{touch *}
+before each commit in a directory with complex hard
+link structures.
+
+It is worth noting that only regular files may
+be merged, for reasons that hopefully are obvious.  If
address@hidden update} or @samp{cvs checkout -j} attempts to
+merge a symbolic link with a regular file, or two
+device files for different kinds of devices, @sc{cvs} will
+report a conflict and refuse to perform the merge.  At
+the same time, @samp{cvs diff} will not report any
+differences between these files, since no meaningful
+textual comparisons can be made on files which contain
+no text.
+
+The @code{PreservePermissions} features do not work
+with client/server @sc{cvs}.  Another limitation is
+that hard links must be to other files within the same
+directory; hard links across directories are not
+supported.
address@hidden ignore
+
address@hidden 
---------------------------------------------------------------------
address@hidden ----- START MAN 1 -----
address@hidden CVS commands
address@hidden Guide to CVS commands
+
+This appendix describes the overall structure of
address@hidden commands, and describes some commands in
+detail (others are described elsewhere; for a quick
+reference to @sc{cvs} commands, @pxref{Invoking CVS}).
address@hidden The idea is that we want to move the commands which
address@hidden are described here into the main body of the manual,
address@hidden in the process reorganizing the manual to be
address@hidden organized around what the user wants to do, not
address@hidden organized around CVS commands.
address@hidden
address@hidden Note that many users do expect a manual which is
address@hidden organized by command.  At least some users do.
address@hidden One good addition to the "organized by command"
address@hidden section (if any) would be "see also" links.
address@hidden The awk manual might be a good example; it has a
address@hidden reference manual which is more verbose than Invoking
address@hidden CVS but probably somewhat less verbose than CVS
address@hidden Commands.
+
address@hidden
+* Structure::                   Overall structure of CVS commands
+* Exit status::                 Indicating CVS's success or failure
+* ~/.cvsrc::                    Default options with the ~/.cvsrc file
+* Global options::              Options you give to the left of cvs_command
+* Common options::              Options you give to the right of cvs_command
+* Date input formats::         Acceptable formats for date specifications
+* admin::                       Administration
+* annotate::                    What revision modified each line of a file?
+* checkout::                    Checkout sources for editing
+* commit::                      Check files into the repository
+* diff::                        Show differences between revisions
+* export::                      Export sources from CVS, similar to checkout
+* history::                     Show status of files and users
+* import::                      Import sources into CVS, using vendor branches
+* log::                         Show log messages for files
+* ls & rls::                    List files in the repository
+* rdiff::                       'patch' format diffs between releases
+* release::                     Indicate that a directory is no longer in use
+* server & pserver::            Act as a server for a client on stdin/stdout
+* update::                      Bring work tree in sync with repository
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Structure
address@hidden Overall structure of CVS commands
address@hidden Structure
address@hidden CVS command structure
address@hidden Command structure
address@hidden Format of CVS commands
+
+The overall format of all @sc{cvs} commands is:
+
address@hidden
+cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
address@hidden example
+
address@hidden @code
address@hidden cvs
+The name of the @sc{cvs} program.
+
address@hidden cvs_options
+Some options that affect all sub-commands of @sc{cvs}.  These are
+described below.
+
address@hidden cvs_command
+One of several different sub-commands.  Some of the commands have
+aliases that can be used instead; those aliases are noted in the
+reference manual for that command.  There are only two situations
+where you may omit @samp{cvs_command}: @samp{cvs -H} elicits a
+list of available commands, and @samp{cvs -v} displays version
+information on @sc{cvs} itself.
+
address@hidden command_options
+Options that are specific for the command.
+
address@hidden command_args
+Arguments to the commands.
address@hidden table
+
+There is unfortunately some confusion between
address@hidden and @code{command_options}.
+When given as a @code{cvs_option}, some options only
+affect some of the commands.  When given as a
address@hidden it may have a different meaning, and
+be accepted by more commands.  In other words, do not
+take the above categorization too seriously.  Look at
+the documentation instead.
+
address@hidden Exit status
address@hidden CVS's exit status
address@hidden Exit status, of CVS
+
address@hidden can indicate to the calling environment whether it
+succeeded or failed by setting its @dfn{exit status}.
+The exact way of testing the exit status will vary from
+one operating system to another.  For example in a unix
+shell script the @samp{$?} variable will be 0 if the
+last command returned a successful exit status, or
+greater than 0 if the exit status indicated failure.
+
+If @sc{cvs} is successful, it returns a successful status;
+if there is an error, it prints an error message and
+returns a failure status.  The one exception to this is
+the @code{cvs diff} command.  It will return a
+successful status if it found no differences, or a
+failure status if there were differences or if there
+was an error.  Because this behavior provides no good
+way to detect errors, in the future it is possible that
address@hidden diff} will be changed to behave like the
+other @sc{cvs} commands.
address@hidden It might seem like checking whether cvs -q diff
address@hidden produces empty or non-empty output can tell whether
address@hidden there were differences or not.  But it seems like
address@hidden there are cases with output but no differences
address@hidden (testsuite basica-8b).  It is not clear to me how
address@hidden useful it is for a script to be able to check
address@hidden whether there were differences.
address@hidden FIXCVS? In previous versions of CVS, cvs diff
address@hidden returned 0 for no differences, 1 for differences, or
address@hidden 2 for errors.  Is this behavior worth trying to
address@hidden bring back (but what does it mean for VMS?)?
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden ~/.cvsrc
address@hidden Default options and the ~/.cvsrc file
address@hidden .cvsrc file
address@hidden Option defaults
+
+There are some @code{command_options} that are used so
+often that you might have set up an alias or some other
+means to make sure you always specify that option.  One
+example (the one that drove the implementation of the
address@hidden support, actually) is that many people find the
+default output of the @samp{diff} command to be very
+hard to read, and that either context diffs or unidiffs
+are much easier to understand.
+
+The @file{~/.cvsrc} file is a way that you can add
+default options to @code{cvs_commands} within cvs,
+instead of relying on aliases or other shell scripts.
+
+The format of the @file{~/.cvsrc} file is simple.  The
+file is searched for a line that begins with the same
+name as the @code{cvs_command} being executed.  If a
+match is found, then the remainder of the line is split
+up (at whitespace characters) into separate options and
+added to the command arguments @emph{before} any
+options from the command line.
+
+If a command has two names (e.g., @code{checkout} and
address@hidden), the official name, not necessarily the one
+used on the command line, will be used to match against
+the file.  So if this is the contents of the user's
address@hidden/.cvsrc} file:
+
address@hidden
+log -N
+diff -uN
+rdiff -u
+update -Pd
+checkout -P
+release -d
address@hidden example
+
address@hidden
+the command @samp{cvs checkout foo} would have the
address@hidden option added to the arguments, as well as
address@hidden co foo}.
+
+With the example file above, the output from @samp{cvs
+diff foobar} will be in unidiff format.  @samp{cvs diff
+-c foobar} will provide context diffs, as usual.
+Getting "old" format diffs would be slightly more
+complicated, because @code{diff} doesn't have an option
+to specify use of the "old" format, so you would need
address@hidden -f diff foobar}.
+
+In place of the command name you can use @code{cvs} to
+specify global options (@pxref{Global options}).  For
+example the following line in @file{.cvsrc}
+
address@hidden
+cvs -z6
address@hidden example
+
address@hidden
+causes @sc{cvs} to use compression level 6.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Global options
address@hidden Global options
address@hidden Options, global
address@hidden Global options
address@hidden Left-hand options
+
+The available @samp{cvs_options} (that are given to the
+left of @samp{cvs_command}) are:
+
address@hidden @code
address@hidden address@hidden
+May be invoked multiple times to specify one legal @sc{cvsroot} directory with
+each invocation.  Also causes CVS to preparse the configuration file for each
+specified root, which can be useful when configuring write proxies,  See
address@hidden authentication server} & @ref{Write proxies}.
+
address@hidden Authentication, stream
address@hidden Stream authentication
address@hidden -a
+Authenticate all communication between the client and
+the server.  Only has an effect on the @sc{cvs} client.
+As of this writing, this is only implemented when using
+a GSSAPI connection (@pxref{GSSAPI authenticated}).
+Authentication prevents certain sorts of attacks
+involving hijacking the active @sc{tcp} connection.
+Enabling authentication does not enable encryption.
+
address@hidden RCSBIN, overriding
address@hidden Overriding RCSBIN
address@hidden -b @var{bindir}
+In @sc{cvs} 1.9.18 and older, this specified that
address@hidden programs are in the @var{bindir} directory.
+Current versions of @sc{cvs} do not run @sc{rcs}
+programs; for compatibility this option is accepted,
+but it does nothing.
+
address@hidden TMPDIR, environment variable
address@hidden temporary file directory, set via command line
address@hidden temporary file directory, set via environment variable
address@hidden temporary file directory, set via config
address@hidden temporary files, location of
address@hidden -T @var{tempdir}
+Use @var{tempdir} as the directory where temporary files are
+located.
+
+The @sc{cvs} client and server store temporary files in a temporary directory.
+The path to this temporary directory is set via, in order of precedence:
+
address@hidden @bullet
address@hidden
+The argument to the global @samp{-T} option.
+
address@hidden
+The value set for @code{TmpDir} in the config file (server only -
address@hidden).
+
address@hidden
+The contents of the @code{$TMPDIR} environment variable (@code{%TMPDIR%} on
+Windows - @pxref{Environment variables}).
+
address@hidden
+/tmp
+
address@hidden itemize
+
+Temporary directories should always be specified as an absolute pathname.
+When running a CVS client, @samp{-T} affects only the local process;
+specifying @samp{-T} for the client has no effect on the server and
+vice versa.
+
address@hidden CVSROOT, overriding
address@hidden Overriding CVSROOT
address@hidden -d @var{cvs_root_directory}
+Use @var{cvs_root_directory} as the root directory
+pathname of the repository.  Overrides the setting of
+the @code{$CVSROOT} environment variable.  @xref{Repository}.
+
address@hidden EDITOR, overriding
address@hidden Overriding EDITOR
address@hidden -e @var{editor}
+Use @var{editor} to enter revision log information.  Overrides the
+setting of the @code{$CVSEDITOR} and @code{$EDITOR}
+environment variables.  For more information, see
address@hidden your changes}.
+
address@hidden -f
+Do not read the @file{~/.cvsrc} file.  This
+option is most often used because of the
+non-orthogonality of the @sc{cvs} option set.  For
+example, the @samp{cvs log} option @samp{-N} (turn off
+display of tag names) does not have a corresponding
+option to turn the display on.  So if you have
address@hidden in the @file{~/.cvsrc} entry for @samp{log},
+you may need to use @samp{-f} to show the tag names.
+
address@hidden -H
address@hidden --help
+Display usage information about the specified @samp{cvs_command}
+(but do not actually execute the command).  If you don't specify
+a command name, @samp{cvs -H} displays overall help for
address@hidden, including a list of other help options.
address@hidden It seems to me it is better to document it this way
address@hidden rather than trying to update this documentation
address@hidden every time that we add a --help-foo option.  But
address@hidden perhaps that is confusing...
+
address@hidden Read-only repository mode
address@hidden -R
+Turns on read-only repository mode.  This allows one to check out from a
+read-only repository, such as within an anoncvs server, or from a @sc{cd-rom}
+repository.
+
+Same effect as if the @code{CVSREADONLYFS} environment
+variable is set. Using @samp{-R} can also considerably
+speed up checkouts over NFS.
+
address@hidden Read-only mode
address@hidden -n
+Do not change any files.  Attempt to execute the
address@hidden, but only to issue reports; do not remove,
+update, or merge any existing files, or create any new files.
+
+Note that @sc{cvs} will not necessarily produce exactly
+the same output as without @samp{-n}.  In some cases
+the output will be the same, but in other cases
address@hidden will skip some of the processing that would
+have been required to produce the exact same output.
+
address@hidden -Q
+Cause the command to be really quiet; the command will only
+generate output for serious problems.
+
address@hidden -q
+Cause the command to be somewhat quiet; informational messages,
+such as reports of recursion through subdirectories, are
+suppressed.
+
address@hidden Read-only files, and -r
address@hidden -r
+Make new working files read-only.  Same effect
+as if the @code{$CVSREAD} environment variable is set
+(@pxref{Environment variables}).  The default is to
+make working files writable, unless watches are on
+(@pxref{Watches}).
+
address@hidden -s @address@hidden
+Set a user variable (@pxref{Variables}).
+
address@hidden Trace
address@hidden -t
+Trace program execution; display messages showing the steps of
address@hidden activity.  Particularly useful with @samp{-n} to explore the
+potential impact of an unfamiliar command.
+
address@hidden -v
address@hidden --version
+Display version and copyright information for @sc{cvs}.
+
address@hidden CVSREAD, overriding
address@hidden Overriding CVSREAD
address@hidden -w
+Make new working files read-write.  Overrides the
+setting of the @code{$CVSREAD} environment variable.
+Files are created read-write by default, unless @code{$CVSREAD} is
+set or @samp{-r} is given.
address@hidden Note that -w only overrides -r and CVSREAD; it has
address@hidden no effect on files which are readonly because of
address@hidden "cvs watch on".  My guess is that is the way it
address@hidden should be (or should "cvs -w get" on a watched file
address@hidden be the same as a get and a cvs edit?), but I'm not
address@hidden completely sure whether to document it this way.
+
address@hidden -x
address@hidden Encryption
+Encrypt all communication between the client and the
+server.  Only has an effect on the @sc{cvs} client.  As
+of this writing, this is only implemented when using a
+GSSAPI connection (@pxref{GSSAPI authenticated}) or a
+Kerberos connection (@pxref{Kerberos authenticated}).
+Enabling encryption implies that message traffic is
+also authenticated.  Encryption support is not
+available by default; it must be enabled using a
+special configure option, @file{--enable-encryption},
+when you build @sc{cvs}.
+
address@hidden -z @var{level}
address@hidden Compression
address@hidden Gzip
+Request compression @var{level} for network traffic.
address@hidden interprets @var{level} identically to the @code{gzip} program.
+Valid levels are 1 (high speed, low compression) to
+9 (low speed, high compression), or 0 to disable
+compression (the default).  Data sent to the server will
+be compressed at the requested level and the client will request
+the server use the same compression level for data returned.  The
+server will use the closest level allowed by the server administrator to
+compress returned data.  This option only has an effect when passed to
+the @sc{cvs} client.
+
address@hidden OpenPGP Signatures
address@hidden Commit Signatures
address@hidden -g
address@hidden --sign
address@hidden --no-sign
+Force OpenPGP signatures on or off.  @samp{-g} & @samp{--sign} will cause the
+commit to abort if the server does not support OpenPGP signatures.  Without one
+of these options, CVS will autonegotiate signing, attempting to sign commits
+when the server supports it.  Overrides the @samp{sign} and @samp{no-sign}
+method options.
+
address@hidden --sign-template @var{template}
+Use @var{template} as the command line template to generate OpenPGP signatures.
+Format strings in this template are substituted before the commit is run:
+
address@hidden @code
address@hidden %t
+Substitute in the textmode flag (defaults to @samp{--textmode}) when a
+signature is being generated for a text file.
+
address@hidden %a
+Substitute in any @var{arg}s set via the @samp{--sign-arg} option or the
+CVSROOT sign-arg method option.
+
address@hidden %s
+Substitute the name of the file to generate a signature for.
address@hidden table
+
+This template should send the generated signature to its standard output.
+Overrides the @samp{sign-template} method optoin and defaults to something like
address@hidden/usr/bin/gpg --detach-sign --output - %t %a %s}.
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Common options
address@hidden Common command options
address@hidden Common options
address@hidden Right-hand options
+
+This section describes the @samp{command_options} that
+are available across several @sc{cvs} commands.  These
+options are always given to the right of
address@hidden Not all
+commands support all of these options; each option is
+only supported for commands where it makes sense.
+However, when a command has one of these options you
+can almost always count on the same behavior of the
+option as in other commands.  (Other command options,
+which are listed with the individual commands, may have
+different behavior from one @sc{cvs} command to the other).
+
address@hidden @samp{history} command is an exception; it supports
+many options that conflict even with these standard options.}
+
address@hidden @code
address@hidden Dates
address@hidden Time
address@hidden Specifying dates
address@hidden -D @var{date_spec}
+Use the most recent revision no later than @var{date_spec}.
address@hidden is a single argument, a date description
+specifying a date in the past.
+
+The specification is @dfn{sticky} when you use it to make a
+private copy of a source file; that is, when you get a working
+file using @samp{-D}, @sc{cvs} records the date you specified, so that
+further updates in the same directory will use the same date
+(for more information on sticky tags/dates, @pxref{Sticky tags}).
+
address@hidden is available with the @code{annotate}, @code{checkout},
address@hidden, @code{export}, @code{history}, @code{ls},
address@hidden, @code{rls}, @code{rtag}, @code{tag}, and @code{update} commands.
+(The @code{history} command uses this option in a
+slightly different way; @pxref{history options}).
+
+For a complete description of the date formats accepted by @sc{cvs},
address@hidden input formats}.
address@hidden What other formats should we accept?  I don't want
address@hidden to start accepting a whole mess of non-standard
address@hidden new formats (there are a lot which are in wide use in
address@hidden one context or another), but practicality does
address@hidden dictate some level of flexibility.
address@hidden * POSIX.2 (e.g. touch, ls output, date) and other
address@hidden POSIX and/or de facto unix standards (e.g. at).  The
address@hidden practice here is too inconsistent to be of any use.
address@hidden * VMS dates.  This is not a formal standard, but
address@hidden there is a published specification (see SYS$ASCTIM
address@hidden and SYS$BINTIM in the _VMS System Services Reference
address@hidden Manual_), it is implemented consistently in VMS
address@hidden utilities, and VMS users will expect CVS running on
address@hidden VMS to support this format (and if we're going to do
address@hidden that, better to make CVS support it on all
address@hidden platforms.  Maybe).
address@hidden
address@hidden One more note: In output, CVS should consistently
address@hidden use one date format, and that format should be one that
address@hidden it accepts in input as well.  The former isn't
address@hidden really true (see survey below), and I'm not
address@hidden sure that either of those formats is accepted in
address@hidden input.
address@hidden
address@hidden cvs log
address@hidden   current 1996/01/02 13:45:31
address@hidden   Internet 02 Jan 1996 13:45:31 UT
address@hidden   ISO 1996-01-02 13:45:31
address@hidden cvs ann
address@hidden   current 02-Jan-96
address@hidden   Internet-like 02 Jan 96
address@hidden   ISO 96-01-02
address@hidden cvs status
address@hidden   current Tue Jun 11 02:54:53 1996
address@hidden   Internet [Tue,] 11 Jun 1996 02:54:53
address@hidden   ISO 1996-06-11 02:54:53
address@hidden   note: date possibly should be omitted entirely for
address@hidden   other reasons.
address@hidden cvs editors
address@hidden   current Tue Jun 11 02:54:53 1996 GMT
address@hidden cvs history
address@hidden   current 06/11 02:54 +0000
address@hidden any others?
address@hidden There is a good chance the proper solution has to
address@hidden involve at least some level of letting the user
address@hidden decide which format (with the default being the
address@hidden formats CVS has always used; changing these might be
address@hidden _very_ disruptive since scripts may very well be
address@hidden parsing them).
address@hidden
address@hidden Another random bit of prior art concerning dates is
address@hidden the strptime function which takes templates such as
address@hidden "%m/%d/%y", and apparent a variant of getdate()
address@hidden which also honors them.  See
address@hidden X/Open CAE Specification, System Interfaces and
address@hidden Headers Issue 4, Version 2 (September 1994), in the
address@hidden entry for getdate() on page 231
+
+Remember to quote the argument to the @samp{-D}
+flag so that your shell doesn't interpret spaces as
+argument separators.  A command using the @samp{-D}
+flag can look like this:
+
address@hidden
+$ cvs diff -D "1 hour ago" cvs.texinfo
address@hidden example
+
address@hidden Forcing a tag match
address@hidden -f
+When you specify a particular date or tag to @sc{cvs} commands, they
+normally ignore files that do not contain the tag (or did not
+exist prior to the date) that you specified.  Use the @samp{-f} option
+if you want files retrieved even when there is no match for the
+tag or date.  (The most recent revision of the file
+will be used).
+
+Note that even with @samp{-f}, a tag that you specify
+must exist (that is, in some file, not necessary in
+every file).  This is so that @sc{cvs} will continue to
+give an error if you mistype a tag name.
+
address@hidden 800
address@hidden is available with these commands:
address@hidden, @code{checkout}, @code{export},
address@hidden, @code{rtag}, and @code{update}.
+
address@hidden:  The @code{commit} and @code{remove}
+commands also have a
address@hidden option, but it has a different behavior for
+those commands.  See @ref{commit options}, and
address@hidden files}.}
+
address@hidden -k @var{kflag}
+Override the default processing of RCS keywords other than
address@hidden  @xref{Keyword substitution}, for the meaning of
address@hidden  Used with the @code{checkout} and @code{update}
+commands, your @var{kflag} specification is
address@hidden; that is, when you use this option
+with a @code{checkout} or @code{update} command,
address@hidden associates your selected @var{kflag} with any files
+it operates on, and continues to use that @var{kflag} with future
+commands on the same files until you specify otherwise.
+
+The @samp{-k} option is available with the @code{add},
address@hidden, @code{diff}, @code{export}, @code{import},
address@hidden, and @code{update} commands.
+
address@hidden: Prior to CVS version 1.12.2, the @samp{-k} flag
+overrode the @samp{-kb} indication for a binary file.  This could
+sometimes corrupt binary files.  @xref{Merging and keywords}, for
+more.}
+
address@hidden -l
+Local; run only in current working directory, rather than
+recursing through subdirectories.
+
+Available with the following commands: @code{annotate}, @code{checkout},
address@hidden, @code{diff}, @code{edit}, @code{editors}, @code{export},
address@hidden, @code{rdiff}, @code{remove}, @code{rtag},
address@hidden, @code{tag}, @code{unedit}, @code{update}, @code{watch},
+and @code{watchers}.
+
address@hidden Editor, avoiding invocation of
address@hidden Avoiding editor invocation
address@hidden -m @var{message}
+Use @var{message} as log information, instead of
+invoking an editor.
+
+Available with the following commands: @code{add},
address@hidden and @code{import}.
+
address@hidden -n
+Do not run any tag program.  (A program can be
+specified to run in the modules
+database (@pxref{modules}); this option bypasses it).
+
address@hidden is not the same as the @samp{cvs -n}
+program option, which you can specify to the left of a cvs command!}
+
+Available with the @code{checkout}, @code{export},
+and @code{rtag} commands.
+
address@hidden -P
+Prune empty directories.  See @ref{Removing directories}.
+
address@hidden -p
+Pipe the files retrieved from the repository to standard output,
+rather than writing them in the current directory.  Available
+with the @code{checkout} and @code{update} commands.
+
address@hidden -R
+Process directories recursively.  This is the default for all @sc{cvs}
+commands, with the exception of @code{ls} & @code{rls}.
+
+Available with the following commands: @code{annotate}, @code{checkout},
address@hidden, @code{diff}, @code{edit}, @code{editors}, @code{export},
address@hidden, @code{rdiff}, @code{remove}, @code{rls}, @code{rtag},
address@hidden, @code{tag}, @code{unedit}, @code{update}, @code{watch},
+and @code{watchers}.
+
address@hidden -r @var{tag}
address@hidden -r @var{tag}[:@var{date}]
address@hidden HEAD, special tag
address@hidden BASE, special tag
+Use the revision specified by the @var{tag} argument (and the @var{date}
+argument for the commands which accept it) instead of the
+default @dfn{head} revision.  As well as arbitrary tags defined
+with the @code{tag} or @code{rtag} command, two special tags are
+always available: @samp{HEAD} refers to the most recent version
+available in the repository, and @samp{BASE} refers to the
+revision you last checked out into the current working directory.
+
address@hidden FIXME: What does HEAD really mean?  I believe that
address@hidden the current answer is the head of the default branch
address@hidden for all cvs commands except diff.  For diff, it
address@hidden seems to be (a) the head of the trunk (or the default
address@hidden branch?) if there is no sticky tag, (b) the head of the
address@hidden branch for the sticky tag, if there is a sticky tag.
address@hidden (b) is ugly as it differs
address@hidden from what HEAD means for other commands, but people
address@hidden and/or scripts are quite possibly used to it.
address@hidden See "head" tests in sanity.sh.
address@hidden Probably the best fix is to introduce two new
address@hidden special tags, ".thead" for the head of the trunk,
address@hidden and ".bhead" for the head of the current branch.
address@hidden Then deprecate HEAD.  This has the advantage of
address@hidden not surprising people with a change to HEAD, and a
address@hidden side benefit of also phasing out the poorly-named
address@hidden HEAD (see discussion of reserved tag names in node
address@hidden "Tags").  Of course, .thead and .bhead should be
address@hidden carefully implemented (with the implementation the
address@hidden same for "diff" as for everyone else), test cases
address@hidden written (similar to the ones in "head"), new tests
address@hidden cases written for things like default branches, &c.
+
+The tag specification is sticky when you use this
+with @code{checkout} or @code{update} to make your own
+copy of a file: @sc{cvs} remembers the tag and continues to use it on
+future update commands, until you specify otherwise (for more information
+on sticky tags/dates, @pxref{Sticky tags}).
+
+The tag can be either a symbolic or numeric tag, as
+described in @ref{Tags}, or the name of a branch, as
+described in @ref{Branching and merging}.
+When @var{tag} is the name of a
+branch, some commands accept the optional @var{date} argument to specify
+the revision as of the given date on the branch.
+When a command expects a specific revision,
+the name of a branch is interpreted as the most recent
+revision on that branch.
+
+Specifying the @samp{-q} global option along with the
address@hidden command option is often useful, to suppress
+the warning messages when the @sc{rcs} file
+does not contain the specified tag.
+
address@hidden is not the same as the overall @samp{cvs -r} option,
+which you can specify to the left of a @sc{cvs} command!}
+
address@hidden @var{tag}} is available with the @code{commit} and @code{history}
+commands.
+
address@hidden @var{tag}[:@var{date}]} is available with the @code{annotate},
address@hidden, @code{diff}, @code{export}, @code{rdiff}, @code{rtag},
+and @code{update} commands.
+
address@hidden -W
+Specify file names that should be filtered.  You can
+use this option repeatedly.  The spec can be a file
+name pattern of the same type that you can specify in
+the @file{.cvswrappers} file.
+Available with the following commands: @code{import},
+and @code{update}.
+
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden getdate-cvs.texi
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden admin
address@hidden admin---Administration
address@hidden Admin (subcommand)
+
address@hidden @bullet
address@hidden
+Requires: repository, working directory.
address@hidden
+Changes: repository.
address@hidden
+Synonym: rcs
address@hidden itemize
+
+This is the @sc{cvs} interface to assorted
+administrative facilities.  Some of them have
+questionable usefulness for @sc{cvs} but exist for
+historical purposes.  Some of the questionable options
+are likely to disappear in the future.  This command
address@hidden work recursively, so extreme care should be
+used.
+
address@hidden cvsadmin
address@hidden UserAdminOptions, in CVSROOT/config
+On unix, if there is a group named @code{cvsadmin},
+only members of that group can run @code{cvs admin}
+commands, except for those specified using the
address@hidden configuration option in the
address@hidden/config} file.  Options specified using
address@hidden can be run by any user.  See
address@hidden for more on @code{UserAdminOptions}.
+
+The @code{cvsadmin} group should exist on the server,
+or any system running the non-client/server @sc{cvs}.
+To disallow @code{cvs admin} for all users, create a
+group with no users in it.  On NT, the @code{cvsadmin}
+feature does not exist and all users
+can run @code{cvs admin}.
+
address@hidden
+* admin options::               admin options
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden admin options
address@hidden admin options
+
+Some of these options have questionable usefulness for
address@hidden but exist for historical purposes.  Some even
+make it impossible to use @sc{cvs} until you undo the
+effect!
+
address@hidden @code
address@hidden address@hidden
+Might not work together with @sc{cvs}.  Append the
+access list of @var{oldfile} to the access list of the
address@hidden file.
+
address@hidden address@hidden
+Might not work together with @sc{cvs}.  Append the
+login names appearing in the comma-separated list
address@hidden to the access list of the @sc{rcs} file.
+
address@hidden address@hidden
+Set the default branch to @var{rev}.  In @sc{cvs}, you
+normally do not manipulate default branches; sticky
+tags (@pxref{Sticky tags}) are a better way to decide
+which branch you want to work on.  There is one reason
+to run @code{cvs admin -b}: to revert to the vendor's
+version when using vendor branches (@pxref{Reverting
+local changes}).
+There can be no space between @samp{-b} and its argument.
address@hidden Hmm, we don't document the usage where rev is
address@hidden omitted.  Maybe that usage can/should be deprecated
address@hidden (and replaced with -bHEAD or something?) (so we can toss
address@hidden the optional argument).  Note that -bHEAD does not
address@hidden work, as of 17 Sep 1997, but probably will once "cvs
address@hidden admin" is internal to CVS.
+
address@hidden Comment leader
address@hidden address@hidden
+Sets the comment leader to @var{string}.  The comment
+leader is not used by current versions of @sc{cvs} or
address@hidden 5.7.  Therefore, you can almost surely not
+worry about it.  @xref{Keyword substitution}.
+
address@hidden address@hidden
+Might not work together with @sc{cvs}.  Erase the login
+names appearing in the comma-separated list
address@hidden from the access list of the RCS file.  If
address@hidden is omitted, erase the entire access list.
+There can be no space between @samp{-e} and its argument.
+
address@hidden -I
+Run interactively, even if the standard input is not a
+terminal.  This option does not work with the
+client/server @sc{cvs} and is likely to disappear in
+a future release of @sc{cvs}.
+
address@hidden -i
+Useless with @sc{cvs}.  This creates and initializes a
+new @sc{rcs} file, without depositing a revision.  With
address@hidden, add files with the @code{cvs add} command
+(@pxref{Adding files}).
+
address@hidden address@hidden
+Set the default keyword
+substitution to @var{subst}.  @xref{Keyword
+substitution}.  Giving an explicit @samp{-k} option to
address@hidden update}, @code{cvs export}, or @code{cvs
+checkout} overrides this default.
+
address@hidden address@hidden
+Lock the revision with number @var{rev}.  If a branch
+is given, lock the latest revision on that branch.  If
address@hidden is omitted, lock the latest revision on the
+default branch.  There can be no space between
address@hidden and its argument.
+
+This can be used in conjunction with the
address@hidden script in the @file{contrib}
+directory of the @sc{cvs} source distribution to
+provide reserved checkouts (where only one user can be
+editing a given file at a time).  See the comments in
+that file for details (and see the @file{README} file
+in that directory for disclaimers about the unsupported
+nature of contrib).  According to comments in that
+file, locking must set to strict (which is the default).
+
address@hidden -L
+Set locking to strict.  Strict locking means that the
+owner of an RCS file is not exempt from locking for
+checkin.  For use with @sc{cvs}, strict locking must be
+set; see the discussion under the @samp{-l} option above.
+
address@hidden Changing a log message
address@hidden Replacing a log message
address@hidden Correcting a log message
address@hidden Fixing a log message
address@hidden Log message, correcting
address@hidden address@hidden:@var{msg}
+Replace the log message of revision @var{rev} with
address@hidden
+
address@hidden The rcs -M option, to suppress sending mail, has never been
address@hidden documented as a cvs admin option.
+
address@hidden address@hidden:address@hidden
+Act like @samp{-n}, except override any previous
+assignment of @var{name}.  For use with magic branches,
+see @ref{Magic branch numbers}.
+
address@hidden address@hidden:address@hidden
+Associate the symbolic name @var{name} with the branch
+or revision @var{rev}.  It is normally better to use
address@hidden tag} or @samp{cvs rtag} instead.  Delete the
+symbolic name if both @samp{:} and @var{rev} are
+omitted; otherwise, print an error message if
address@hidden is already associated with another number.
+If @var{rev} is symbolic, it is expanded before
+association.  A @var{rev} consisting of a branch number
+followed by a @samp{.} stands for the current latest
+revision in the branch.  A @samp{:} with an empty
address@hidden stands for the current latest revision on the
+default branch, normally the trunk.  For example,
address@hidden admin address@hidden:} associates @var{name} with the
+current latest revision of all the RCS files;
+this contrasts with @samp{cvs admin address@hidden:$} which
+associates @var{name} with the revision numbers
+extracted from keyword strings in the corresponding
+working files.
+
address@hidden Deleting revisions
address@hidden Outdating revisions
address@hidden Saving space
address@hidden address@hidden
+Deletes (@dfn{outdates}) the revisions given by
address@hidden
+
+Note that this command can be quite dangerous unless
+you know @emph{exactly} what you are doing (for example
+see the warnings below about how the
address@hidden:@var{rev2} syntax is confusing).
+
+If you are short on disc this option might help you.
+But think twice before using it---there is no way short
+of restoring the latest backup to undo this command!
+If you delete different revisions than you planned,
+either due to carelessness or (heaven forbid) a @sc{cvs}
+bug, there is no opportunity to correct the error
+before the revisions are deleted.  It probably would be
+a good idea to experiment on a copy of the repository
+first.
+
+Specify @var{range} in one of the following ways:
+
address@hidden @code
address@hidden @var{rev1}::@var{rev2}
+Collapse all revisions between rev1 and rev2, so that
address@hidden only stores the differences associated with going
+from rev1 to rev2, not intermediate steps.  For
+example, after @samp{-o 1.3::1.5} one can retrieve
+revision 1.3, revision 1.5, or the differences to get
+from 1.3 to 1.5, but not the revision 1.4, or the
+differences between 1.3 and 1.4.  Other examples:
address@hidden 1.3::1.4} and @samp{-o 1.3::1.3} have no
+effect, because there are no intermediate revisions to
+remove.
+
address@hidden ::@var{rev}
+Collapse revisions between the beginning of the branch
+containing @var{rev} and @var{rev} itself.  The
+branchpoint and @var{rev} are left intact.  For
+example, @samp{-o ::1.3.2.6} deletes revision 1.3.2.1,
+revision 1.3.2.5, and everything in between, but leaves
+1.3 and 1.3.2.6 intact.
+
address@hidden @var{rev}::
+Collapse revisions between @var{rev} and the end of the
+branch containing @var{rev}.  Revision @var{rev} is
+left intact but the head revision is deleted.
+
address@hidden @var{rev}
+Delete the revision @var{rev}.  For example, @samp{-o
+1.3} is equivalent to @samp{-o 1.2::1.4}.
+
address@hidden @var{rev1}:@var{rev2}
+Delete the revisions from @var{rev1} to @var{rev2},
+inclusive, on the same branch.  One will not be able to
+retrieve @var{rev1} or @var{rev2} or any of the
+revisions in between.  For example, the command
address@hidden admin -oR_1_01:R_1_02 .} is rarely useful.
+It means to delete revisions up to, and including, the
+tag R_1_02.  But beware!  If there are files that have not
+changed between R_1_02 and R_1_03 the file will have
address@hidden same} numerical revision number assigned to
+the tags R_1_02 and R_1_03.  So not only will it be
+impossible to retrieve R_1_02; R_1_03 will also have to
+be restored from the tapes!  In most cases you want to
+specify @var{rev1}::@var{rev2} instead.
+
address@hidden :@var{rev}
+Delete revisions from the beginning of the
+branch containing @var{rev} up to and including
address@hidden
+
address@hidden @var{rev}:
+Delete revisions from revision @var{rev}, including
address@hidden itself, to the end of the branch containing
address@hidden
address@hidden table
+
+None of the revisions to be deleted may have
+branches or locks.
+
+If any of the revisions to be deleted have symbolic
+names, and one specifies one of the @samp{::} syntaxes,
+then @sc{cvs} will give an error and not delete any
+revisions.  If you really want to delete both the
+symbolic names and the revisions, first delete the
+symbolic names with @code{cvs tag -d}, then run
address@hidden admin -o}.  If one specifies the
address@hidden::} syntaxes, then @sc{cvs} will delete the
+revisions but leave the symbolic names pointing to
+nonexistent revisions.  This behavior is preserved for
+compatibility with previous versions of @sc{cvs}, but
+because it isn't very useful, in the future it may
+change to be like the @samp{::} case.
+
+Due to the way @sc{cvs} handles branches @var{rev}
+cannot be specified symbolically if it is a branch.
address@hidden branch numbers}, for an explanation.
address@hidden FIXME: is this still true?  I suspect not.
+
+Make sure that no-one has checked out a copy of the
+revision you outdate.  Strange things will happen if he
+starts to edit it and tries to check it back in.  For
+this reason, this option is not a good way to take back
+a bogus commit; commit a new revision undoing the bogus
+change instead (@pxref{Merging two revisions}).
+
address@hidden -q
+Run quietly; do not print diagnostics.
+
address@hidden address@hidden:@var{rev}]
+Useful with @sc{cvs}.  Set the state attribute of the
+revision @var{rev} to @var{state}.  If @var{rev} is a
+branch number, assume the latest revision on that
+branch.  If @var{rev} is omitted, assume the latest
+revision on the default branch.  Any identifier is
+acceptable for @var{state}.  A useful set of states is
address@hidden (for experimental), @samp{Stab} (for
+stable), and @samp{Rel} (for released).  By default,
+the state of a new revision is set to @samp{Exp} when
+it is created.  The state is visible in the output from
address@hidden log} (@pxref{log}), and in the
address@hidden@splitrcskeyword{Log}$} and @address@hidden keywords
+(@pxref{Keyword substitution}).  Note that @sc{cvs}
+uses the @code{dead} state for its own purposes (@pxref{Attic}); to
+take a file to or from the @code{dead} state use
+commands like @code{cvs remove} and @code{cvs add}
+(@pxref{Adding and removing}), not @code{cvs admin -s}.
+
address@hidden address@hidden
+Useful with @sc{cvs}.  Write descriptive text from the
+contents of the named @var{file} into the RCS file,
+deleting the existing text.  The @var{file} pathname
+may not begin with @samp{-}.  The descriptive text can be seen in the
+output from @samp{cvs log} (@pxref{log}).
+There can be no space between @samp{-t} and its argument.
+
+If @var{file} is omitted,
+obtain the text from standard input, terminated by
+end-of-file or by a line containing @samp{.} by itself.
+Prompt for the text if interaction is possible; see
address@hidden
+
address@hidden address@hidden
+Similar to @address@hidden Write descriptive text
+from the @var{string} into the @sc{rcs} file, deleting
+the existing text.
+There can be no space between @samp{-t} and its argument.
+
address@hidden The rcs -T option, do not update last-mod time for
address@hidden minor changes, has never been documented as a
address@hidden cvs admin option.
+
address@hidden -U
+Set locking to non-strict.  Non-strict locking means
+that the owner of a file need not lock a revision for
+checkin.  For use with @sc{cvs}, strict locking must be
+set; see the discussion under the @samp{-l} option
+above.
+
address@hidden address@hidden
+See the option @samp{-l} above, for a discussion of
+using this option with @sc{cvs}.  Unlock the revision
+with number @var{rev}.  If a branch is given, unlock
+the latest revision on that branch.  If @var{rev} is
+omitted, remove the latest lock held by the caller.
+Normally, only the locker of a revision may unlock it;
+somebody else unlocking a revision breaks the lock.
+This causes the original locker to be sent a @code{commit}
+notification (@pxref{Getting Notified}).
+There can be no space between @samp{-u} and its argument.
+
address@hidden address@hidden
+In previous versions of @sc{cvs}, this option meant to
+write an @sc{rcs} file which would be acceptable to
address@hidden version @var{n}, but it is now obsolete and
+specifying it will produce an error.
address@hidden Note that -V without an argument has never been
address@hidden documented as a cvs admin option.
+
address@hidden address@hidden
+In previous versions of @sc{cvs}, this was documented
+as a way of specifying the names of the @sc{rcs}
+files.  However, @sc{cvs} has always required that the
address@hidden files used by @sc{cvs} end in @samp{,v}, so
+this option has never done anything useful.
+
address@hidden List long options after the short options
address@hidden --execute
+On unix systems, when @sc{cvs} adds a new file to a repository,
+the execute bits of the file are applied to the @sc{rcs} file
+and are thus preserved. This can be useful for shell scripts
+or other files that you want to be executable when they are
+later checked out (saves you from doing chmod +x to alter the
+file permissions).
+This option can turn on the execute bits for repository files
+that where originally added without them (or were made
+non-executable with the --no-execute option).
+
address@hidden --no-execute
+This option turns off the execute bits from repository files,
+(useful for files that where originally added as executables or
+were made executable with the --execute option) when you want to
+avoid those files from being executable on subsequent checkouts.
+
address@hidden The rcs -z option, to specify the timezone, has
address@hidden never been documented as a cvs admin option.
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden annotate
address@hidden annotate---What revision modified each line of a file?
address@hidden annotate (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis: annotate [options] address@hidden
address@hidden
+Requires: repository.
address@hidden
+Changes: nothing.
address@hidden itemize
+
+For each file in @var{files}, print the head revision
+of the trunk, together with information on the last
+modification for each line.  
+
address@hidden
+* annotate options::            annotate options
+* annotate example::            annotate example
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden annotate options
address@hidden annotate options
+
+These standard options are supported by @code{annotate}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -l
+Local directory only, no recursion.
+
address@hidden -R
+Process directories recursively.
+
address@hidden -f
+Use head revision if tag/date not found.
+
address@hidden -F
+Annotate binary files.
+
address@hidden -r @var{tag}[:@var{date}]
+Annotate file as of specified revision/tag or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
+
address@hidden -D @var{date}
+Annotate file as of specified date.
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden annotate example
address@hidden annotate example
+
+For example:
+
address@hidden
+$ cvs annotate ssfile
+Annotations for ssfile
+***************
+1.1          (mary     27-Mar-96): ssfile line 1
+1.2          (joe      28-Mar-96): ssfile line 2
address@hidden example
+
+The file @file{ssfile} currently contains two lines.
+The @code{ssfile line 1} line was checked in by
address@hidden on March 27.  Then, on March 28, @code{joe}
+added a line @code{ssfile line 2}, without modifying
+the @code{ssfile line 1} line.  This report doesn't
+tell you anything about lines which have been deleted
+or replaced; you need to use @code{cvs diff} for that
+(@pxref{diff}).
+
+The options to @code{cvs annotate} are listed in
address@hidden CVS}, and can be used to select the files
+and revisions to annotate.  The options are described
+in more detail there and in @ref{Common options}.
+
address@hidden FIXME: maybe an example using the options?  Just
address@hidden what it means to select a revision might be worth a
address@hidden few words of explanation ("you want to see who
address@hidden changed this line *before* 1.4"...).
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden checkout
address@hidden checkout---Check out sources for editing
address@hidden checkout (subcommand)
address@hidden co (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis: checkout [options] address@hidden
address@hidden
+Requires: repository.
address@hidden
+Changes: working directory.
address@hidden
+Synonyms: co, get
address@hidden itemize
+
+Create or update a working directory containing copies of the
+source files specified by @var{modules}.  You must execute
address@hidden before using most of the other @sc{cvs}
+commands, since most of them operate on your working
+directory.
+
+The @var{modules} are either
+symbolic names for some
+collection of source directories and files, or paths to
+directories or files in the repository.  The symbolic
+names are defined in the @samp{modules} file.
address@hidden
address@hidden Needs an example, particularly of the non-"modules"
address@hidden case but probably of both.
+
address@hidden FIXME: this seems like a very odd place to introduce
address@hidden people to how CVS works.  The bit about unreserved
address@hidden checkouts is also misleading as it depends on how
address@hidden things are set up.
+Depending on the modules you specify, @code{checkout} may
+recursively create directories and populate them with
+the appropriate source files.  You can then edit these
+source files at any time (regardless of whether other
+software developers are editing their own copies of the
+sources); update them to include new changes applied by
+others to the source repository; or commit your work as
+a permanent change to the source repository.
+
+Note that @code{checkout} is used to create
+directories.  The top-level directory created is always
+added to the directory where @code{checkout} is
+invoked, and usually has the same name as the specified
+module.  In the case of a module alias, the created
+sub-directory may have a different name, but you can be
+sure that it will be a sub-directory, and that
address@hidden will show the relative path leading to
+each file as it is extracted into your private work
+area (unless you specify the @samp{-Q} global option).
+
+The files created by @code{checkout} are created
+read-write, unless the @samp{-r} option to @sc{cvs}
+(@pxref{Global options}) is specified, the
address@hidden environment variable is specified
+(@pxref{Environment variables}), or a watch is in
+effect for that file (@pxref{Watches}).
+
+Note that running @code{checkout} on a directory that was already
+built by a prior @code{checkout} is also permitted.
+This is similar to specifying the @samp{-d} option
+to the @code{update} command in the sense that new
+directories that have been created in the repository
+will appear in your work area.
+However, @code{checkout} takes a module name whereas
address@hidden takes a directory name.  Also
+to use @code{checkout} this way it must be run from the
+top level directory (where you originally ran
address@hidden from), so before you run
address@hidden to update an existing directory, don't
+forget to change your directory to the top level
+directory.
+
+For the output produced by the @code{checkout} command
+see @ref{update output}.
+
address@hidden
+* checkout options::            checkout options
+* checkout examples::           checkout examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden checkout options
address@hidden checkout options
+
+These standard options are supported by @code{checkout}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -D @var{date}
+Use the most recent revision no later than @var{date}.
+This option is sticky, and implies @samp{-P}.  See
address@hidden tags}, for more information on sticky tags/dates.
+
address@hidden -f
+Only useful with the @samp{-D} or @samp{-r} flags.  If no matching revision is
+found, retrieve the most recent revision (instead of ignoring the file).
+
address@hidden -k @var{kflag}
+Process keywords according to @var{kflag}.  See
address@hidden substitution}.
+This option is sticky; future updates of
+this file in this working directory will use the same
address@hidden  The @code{status} command can be viewed
+to see the sticky options.  See @ref{Invoking CVS}, for
+more information on the @code{status} command.
+
address@hidden -l
+Local; run only in current working directory.
+
address@hidden -n
+Do not run any checkout program (as specified
+with the @samp{-o} option in the modules file;
address@hidden).
+
address@hidden -P
+Prune empty directories.  See @ref{Moving directories}.
+
address@hidden -p
+Pipe files to the standard output.
+
address@hidden -R
+Checkout directories recursively.  This option is on by default.
+
address@hidden -r @var{tag}[:@var{date}]
+Checkout the revision specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  This option is sticky, and implies @samp{-P}.
+See @ref{Sticky tags}, for more information on sticky tags/dates.  Also,
+see @ref{Common options}.
address@hidden table
+
+In addition to those, you can use these special command
+options with @code{checkout}:
+
address@hidden @code
address@hidden -A
+Reset any sticky tags, dates, or @samp{-k} options.
+See @ref{Sticky tags}, for more information on sticky tags/dates.
+
address@hidden -c
+Copy the module file, sorted, to the standard output,
+instead of creating or modifying any files or
+directories in your working directory.
+
address@hidden -d @var{dir}
+Create a directory called @var{dir} for the working
+files, instead of using the module name.  In general,
+using this flag is equivalent to using @samp{mkdir
address@hidden; cd @var{dir}} followed by the checkout
+command without the @samp{-d} flag.
+
+There is an important exception, however.  It is very
+convenient when checking out a single item to have the
+output appear in a directory that doesn't contain empty
+intermediate directories.  In this case @emph{only},
address@hidden tries to ``shorten'' pathnames to avoid those empty
+directories.
+
+For example, given a module @samp{foo} that contains
+the file @samp{bar.c}, the command @samp{cvs co -d dir
+foo} will create directory @samp{dir} and place
address@hidden inside.  Similarly, given a module
address@hidden which has subdirectory @samp{baz} wherein
+there is a file @samp{quux.c}, the command @samp{cvs co
+-d dir bar/baz} will create directory @samp{dir} and
+place @samp{quux.c} inside.
+
+Using the @samp{-N} flag will defeat this behavior.
+Given the same module definitions above, @samp{cvs co
+-N -d dir foo} will create directories @samp{dir/foo}
+and place @samp{bar.c} inside, while @samp{cvs co -N -d
+dir bar/baz} will create directories @samp{dir/bar/baz}
+and place @samp{quux.c} inside.
+
address@hidden -j @var{tag}
+With two @samp{-j} options, merge changes from the
+revision specified with the first @samp{-j} option to
+the revision specified with the second @samp{j} option,
+into the working directory.
+
+With one @samp{-j} option, merge changes from the
+ancestor revision to the revision specified with the
address@hidden option, into the working directory.  The
+ancestor revision is the common ancestor of the
+revision which the working directory is based on, and
+the revision specified in the @samp{-j} option.
+
+In addition, each -j option can contain an optional
+date specification which, when used with branches, can
+limit the chosen revision to one within a specific
+date.  An optional date is specified by adding a colon
+(:) to the tag:
address@hidden@var{Symbolic_Tag}:@var{Date_Specifier}}.
+
address@hidden and merging}.
+
address@hidden -N
+Only useful together with @samp{-d @var{dir}}.  With
+this option, @sc{cvs} will not ``shorten'' module paths
+in your working directory when you check out a single
+module.  See the @samp{-d} flag for examples and a
+discussion.
+
address@hidden -s
+Like @samp{-c}, but include the status of all modules,
+and sort it by the status string.  @xref{modules}, for
+info about the @samp{-s} option that is used inside the
+modules file to set the module status.
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden checkout examples
address@hidden checkout examples
+
+Get a copy of the module @samp{tc}:
+
address@hidden
+$ cvs checkout tc
address@hidden example
+
+Get a copy of the module @samp{tc} as it looked one day
+ago:
+
address@hidden
+$ cvs checkout -D yesterday tc
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden commit
address@hidden commit---Check files into the repository
address@hidden commit (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis: commit [-fglnR] [-m 'log_message' | -F file] [-r revision]
+                address@hidden
address@hidden
+Requires: working directory, repository.
address@hidden
+Changes: repository.
address@hidden
+Synonym: ci
address@hidden itemize
+
+Use @code{commit} when you want to incorporate changes
+from your working source files into the source
+repository.
+
+If you don't specify particular files to commit, all of
+the files in your working current directory are
+examined.  @code{commit} is careful to change in the
+repository only those files that you have really
+changed.  By default (or if you explicitly specify the
address@hidden option), files in subdirectories are also
+examined and committed if they have changed; you can
+use the @samp{-l} option to limit @code{commit} to the
+current directory only.
+
address@hidden verifies that the selected files are up
+to date with the current revisions in the source
+repository; it will notify you, and exit without
+committing, if any of the specified files must be made
+current first with @code{update} (@pxref{update}).
address@hidden does not call the @code{update} command
+for you, but rather leaves that for you to do when the
+time is right.
+
+When all is well, an editor is invoked to allow you to
+enter a log message that will be written to one or more
+logging programs (@pxref{modules}, and @pxref{loginfo})
+and placed in the @sc{rcs} file inside the
+repository.  This log message can be retrieved with the
address@hidden command; see @ref{log}.  You can specify the
+log message on the command line with the @samp{-m
address@hidden option, and thus avoid the editor invocation,
+or use the @samp{-F @var{file}} option to specify
+that the argument file contains the log message.
+
+At @code{commit}, a unique commitid is placed in the @sc{rcs}
+file inside the repository. All files committed at once
+get the same commitid. The commitid can be retrieved with
+the @code{log} and @code{status} command; see @ref{log},
address@hidden status}.
+
address@hidden
+* commit options::              commit options
+* commit examples::             commit examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden commit options
address@hidden commit options
+
+These standard options are supported by @code{commit}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -l
+Local; run only in current working directory.
+
address@hidden -R
+Commit directories recursively.  This is on by default.
+
address@hidden -r @var{revision}
+Commit to @var{revision}.  @var{revision} must be
+either a branch, or a revision on the main trunk that
+is higher than any existing revision number
+(@pxref{Assigning revisions}).  You
+cannot commit to a specific revision on a branch.
address@hidden FIXME: Need xref for branch case.
address@hidden table
+
address@hidden also supports these options:
+
address@hidden @code
address@hidden -c
+Refuse to commit files unless the user has registered a valid edit on the
+file via @code{cvs edit}.  This is most useful when @samp{commit -c}
+and @samp{edit -c} have been placed in all @file{.cvsrc} files.
+A commit can be forced anyways by either regestering an edit retroactively
+via @code{cvs edit} (no changes to the file will be lost) or using the
address@hidden option to commit.  Support for @code{commit -c} requires both
+client and a server versions 1.12.10 or greater.
+
address@hidden -F @var{file}
+Read the log message from @var{file}, instead
+of invoking an editor.
+
address@hidden -f
+Note that this is not the standard behavior of
+the @samp{-f} option as defined in @ref{Common options}.
+
+Force @sc{cvs} to commit a new revision even if you haven't
+made any changes to the file.  As of @sc{cvs} version 1.12.10,
+it also causes the @code{-c} option to be ignored.  If the current revision
+of @var{file} is 1.7, then the following two commands
+are equivalent:
+
address@hidden
+$ cvs commit -f @var{file}
+$ cvs commit -r 1.8 @var{file}
address@hidden example
+
address@hidden This is odd, but it's how CVS has worked for some
address@hidden time.
+The @samp{-f} option disables recursion (i.e., it
+implies @samp{-l}).  To force @sc{cvs} to commit a new
+revision for all files in all subdirectories, you must
+use @samp{-f -R}.
+
address@hidden -m @var{message}
+Use @var{message} as the log message, instead of
+invoking an editor.
address@hidden table
+
address@hidden 2000
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden commit examples
address@hidden commit examples
+
address@hidden FIXME: this material wants to be somewhere
address@hidden in "Branching and merging".
+
address@hidden Committing to a branch
+
+You can commit to a branch revision (one that has an
+even number of dots) with the @samp{-r} option.  To
+create a branch revision, use the @samp{-b} option
+of the @code{rtag} or @code{tag} commands
+(@pxref{Branching and merging}).  Then, either @code{checkout} or
address@hidden can be used to base your sources on the
+newly created branch.  From that point on, all
address@hidden changes made within these working sources
+will be automatically added to a branch revision,
+thereby not disturbing main-line development in any
+way.  For example, if you had to create a patch to the
+1.2 version of the product, even though the 2.0 version
+is already under development, you might do:
+
address@hidden
+$ cvs rtag -b -r FCS1_2 FCS1_2_Patch product_module
+$ cvs checkout -r FCS1_2_Patch product_module
+$ cd product_module
+[[ hack away ]]
+$ cvs commit
address@hidden example
+
address@hidden
+This works automatically since the @samp{-r} option is
+sticky.
+
address@hidden Creating the branch after editing
+
+Say you have been working on some extremely
+experimental software, based on whatever revision you
+happened to checkout last week.  If others in your
+group would like to work on this software with you, but
+without disturbing main-line development, you could
+commit your change to a new branch.  Others can then
+checkout your experimental stuff and utilize the full
+benefit of @sc{cvs} conflict resolution.  The scenario might
+look like:
+
address@hidden FIXME: Should we be recommending tagging the branchpoint?
address@hidden
+[[ hacked sources are present ]]
+$ cvs tag -b EXPR1
+$ cvs update -r EXPR1
+$ cvs commit
address@hidden example
+
+The @code{update} command will make the @samp{-r
+EXPR1} option sticky on all files.  Note that your
+changes to the files will never be removed by the
address@hidden command.  The @code{commit} will
+automatically commit to the correct branch, because the
address@hidden is sticky.  You could also do like this:
+
address@hidden FIXME: Should we be recommending tagging the branchpoint?
address@hidden
+[[ hacked sources are present ]]
+$ cvs tag -b EXPR1
+$ cvs commit -r EXPR1
address@hidden example
+
address@hidden
+but then, only those files that were changed by you
+will have the @samp{-r EXPR1} sticky flag.  If you hack
+away, and commit without specifying the @samp{-r EXPR1}
+flag, some files may accidentally end up on the main
+trunk.
+
+To work with you on the experimental change, others
+would simply do
+
address@hidden
+$ cvs checkout -r EXPR1 whatever_module
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden diff
address@hidden diff---Show differences between revisions
address@hidden diff (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis: diff [-lR] [-k kflag] [format_options] [(-r rev1[:date1] | -D date1) 
[-r rev2[:date2] | -D date2]] address@hidden
address@hidden
+Requires: working directory, repository.
address@hidden
+Changes: nothing.
address@hidden itemize
+
+The @code{diff} command is used to compare different
+revisions of files.  The default action is to compare
+your working files with the revisions they were based
+on, and report any differences that are found.
+
+If any file names are given, only those files are
+compared.  If any directories are given, all files
+under them will be compared.
+
+The exit status for diff is different than for other
address@hidden commands; for details @ref{Exit status}.
+
address@hidden
+* diff options::                diff options
+* diff examples::               diff examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden diff options
address@hidden diff options
+
+These standard options are supported by @code{diff}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -D @var{date}
+Use the most recent revision no later than @var{date}.
+See @samp{-r} for how this affects the comparison.
+
address@hidden -k @var{kflag}
+Process keywords according to @var{kflag}.  See
address@hidden substitution}.
+
address@hidden -l
+Local; run only in current working directory.
+
address@hidden -R
+Examine directories recursively.  This option is on by
+default.
+
address@hidden -r @var{tag}[:@var{date}]
+Compare with revision specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  Zero, one or two
address@hidden options can be present.  With no @samp{-r}
+option, the working file will be compared with the
+revision it was based on.  With one @samp{-r}, that
+revision will be compared to your current working file.
+With two @samp{-r} options those two revisions will be
+compared (and your working file will not affect the
+outcome in any way).
address@hidden We should be a lot more explicit, with examples,
address@hidden about the difference between "cvs diff" and "cvs
address@hidden diff -r HEAD".  This often confuses new users.
+
+One or both @samp{-r} options can be replaced by a
address@hidden @var{date}} option, described above.
address@hidden table
+
address@hidden Conceptually, this is a disaster.  There are 3
address@hidden zillion diff formats that we support via the diff
address@hidden library.  It is not obvious to me that we should
address@hidden document them all.  Maybe just the most common ones
address@hidden like -c and -u, and think about phasing out the
address@hidden obscure ones.
address@hidden FIXCVS: also should be a way to specify an external
address@hidden diff program (which can be different for different
address@hidden file types) and pass through
address@hidden arbitrary options, so that the user can do
address@hidden "--pass=-Z --pass=foo" or something even if CVS
address@hidden doesn't know about the "-Z foo" option to diff.
address@hidden This would fit nicely with deprecating/eliminating
address@hidden the obscure options of the diff library, because it
address@hidden would let people specify an external GNU diff if
address@hidden they are into that sort of thing.
+The following options specify the format of the
+output.  They have the same meaning as in GNU diff.
+Most options have two equivalent names, one of which is a single letter
+preceded by @samp{-}, and the other of which is a long name preceded by
address@hidden
+
address@hidden @samp
address@hidden address@hidden
+Show @var{lines} (an integer) lines of context.  This option does not
+specify an output format by itself; it has no effect unless it is
+combined with @samp{-c} or @samp{-u}.  This option is obsolete.  For proper
+operation, @code{patch} typically needs at least two lines of context.
+
address@hidden -a
+Treat all files as text and compare them line-by-line, even if they
+do not seem to be text.
+
address@hidden -b
+Ignore trailing white space and consider all other sequences of one or
+more white space characters to be equivalent.
+
address@hidden -B
+Ignore changes that just insert or delete blank lines.
+
address@hidden --binary
+Read and write data in binary mode.
+
address@hidden --brief
+Report only whether the files differ, not the details of the
+differences.
+
address@hidden -c
+Use the context output format.
+
address@hidden -C @var{lines}
address@hidden address@hidden@address@hidden
+Use the context output format, showing @var{lines} (an integer) lines of
+context, or three if @var{lines} is not given.
+For proper operation, @code{patch} typically needs at least two lines of
+context.
+
address@hidden address@hidden
+Use @var{format} to output a line group containing differing lines from
+both files in if-then-else format.  @xref{Line group formats}.
+
address@hidden -d
+Change the algorithm to perhaps find a smaller set of changes.  This makes
address@hidden slower (sometimes much slower).
+
address@hidden -e
address@hidden --ed
+Make output that is a valid @code{ed} script.
+
address@hidden --expand-tabs
+Expand tabs to spaces in the output, to preserve the alignment of tabs
+in the input files.
+
address@hidden -f
+Make output that looks vaguely like an @code{ed} script but has changes
+in the order they appear in the file.
+
address@hidden -F @var{regexp}
+In context and unified format, for each hunk of differences, show some
+of the last preceding line that matches @var{regexp}.
+
address@hidden --forward-ed
+Make output that looks vaguely like an @code{ed} script but has changes
+in the order they appear in the file.
+
address@hidden -H
+Use heuristics to speed handling of large files that have numerous
+scattered small changes.
+
address@hidden address@hidden
+Do not discard the last @var{lines} lines of the common prefix
+and the first @var{lines} lines of the common suffix.
+
address@hidden -i
+Ignore changes in case; consider upper- and lower-case letters
+equivalent.
+
address@hidden -I @var{regexp}
+Ignore changes that just insert or delete lines that match @var{regexp}.
+
address@hidden address@hidden
+Make merged if-then-else output using @var{name}.
+
address@hidden --ignore-all-space
+Ignore white space when comparing lines.
+
address@hidden --ignore-blank-lines
+Ignore changes that just insert or delete blank lines.
+
address@hidden --ignore-case
+Ignore changes in case; consider upper- and lower-case to be the same.
+
address@hidden address@hidden
+Ignore changes that just insert or delete lines that match @var{regexp}.
+
address@hidden --ignore-space-change
+Ignore trailing white space and consider all other sequences of one or
+more white space characters to be equivalent.
+
address@hidden --initial-tab
+Output a tab rather than a space before the text of a line in normal or
+context format.  This causes the alignment of tabs in the line to look
+normal.
+
address@hidden -L @var{label}
+Use @var{label} instead of the file name in the context format
+and unified format headers.
+
address@hidden address@hidden
+Use @var{label} instead of the file name in the context format
+and unified format headers.
+
address@hidden --left-column
+Print only the left column of two common lines in side by side format.
+
address@hidden address@hidden
+Use @var{format} to output all input lines in if-then-else format.
address@hidden formats}.
+
address@hidden --minimal
+Change the algorithm to perhaps find a smaller set of changes.  This
+makes @code{diff} slower (sometimes much slower).
+
address@hidden -n
+Output RCS-format diffs; like @samp{-f} except that each command
+specifies the number of lines affected.
+
address@hidden -N
address@hidden --new-file
+In directory comparison, if a file is found in only one directory,
+treat it as present but empty in the other directory.
+
address@hidden address@hidden
+Use @var{format} to output a group of lines taken from just the second
+file in if-then-else format.  @xref{Line group formats}.
+
address@hidden address@hidden
+Use @var{format} to output a line taken from just the second file in
+if-then-else format.  @xref{Line formats}.
+
address@hidden address@hidden
+Use @var{format} to output a group of lines taken from just the first
+file in if-then-else format.  @xref{Line group formats}.
+
address@hidden address@hidden
+Use @var{format} to output a line taken from just the first file in
+if-then-else format.  @xref{Line formats}.
+
address@hidden -p
+Show which C function each change is in.
+
address@hidden --rcs
+Output RCS-format diffs; like @samp{-f} except that each command
+specifies the number of lines affected.
+
address@hidden --report-identical-files
address@hidden -s
+Report when two files are the same.
+
address@hidden --show-c-function
+Show which C function each change is in.
+
address@hidden address@hidden
+In context and unified format, for each hunk of differences, show some
+of the last preceding line that matches @var{regexp}.
+
address@hidden --side-by-side
+Use the side by side output format.
+
address@hidden --speed-large-files
+Use heuristics to speed handling of large files that have numerous
+scattered small changes.
+
address@hidden --suppress-common-lines
+Do not print common lines in side by side format.
+
address@hidden -t
+Expand tabs to spaces in the output, to preserve the alignment of tabs
+in the input files.
+
address@hidden -T
+Output a tab rather than a space before the text of a line in normal or
+context format.  This causes the alignment of tabs in the line to look
+normal.
+
address@hidden --text
+Treat all files as text and compare them line-by-line, even if they
+do not appear to be text.
+
address@hidden -u
+Use the unified output format.
+
address@hidden address@hidden
+Use @var{format} to output a group of common lines taken from both files
+in if-then-else format.  @xref{Line group formats}.
+
address@hidden address@hidden
+Use @var{format} to output a line common to both files in if-then-else
+format.  @xref{Line formats}.
+
address@hidden -U @var{lines}
address@hidden address@hidden@address@hidden
+Use the unified output format, showing @var{lines} (an integer) lines of
+context, or three if @var{lines} is not given.
+For proper operation, @code{patch} typically needs at least two lines of
+context.
+
address@hidden -w
+Ignore white space when comparing lines.
+
address@hidden -W @var{columns}
address@hidden address@hidden
+Use an output width of @var{columns} in side by side format.
+
address@hidden -y
+Use the side by side output format.
address@hidden table
+
address@hidden
+* Line group formats::          Line group formats
+* Line formats::                Line formats
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden Line group formats
address@hidden Line group formats
+
+Line group formats let you specify formats suitable for many
+applications that allow if-then-else input, including programming
+languages and text formatting languages.  A line group format specifies
+the output format for a contiguous group of similar lines.
+
+For example, the following command compares the TeX file @file{myfile}
+with the original version from the repository,
+and outputs a merged file in which old regions are
+surrounded by @address@hidden@address@hidden@address@hidden lines, and new
+regions are surrounded by @address@hidden@address@hidden@address@hidden lines.
+
address@hidden
+cvs diff \
+   --old-group-format='address@hidden@}
+%<address@hidden@}
+' \
+   --new-group-format='address@hidden@}
+%>address@hidden@}
+' \
+   myfile
address@hidden example
+
+The following command is equivalent to the above example, but it is a
+little more verbose, because it spells out the default line group formats.
+
address@hidden
+cvs diff \
+   --old-group-format='address@hidden@}
+%<address@hidden@}
+' \
+   --new-group-format='address@hidden@}
+%>address@hidden@}
+' \
+   --unchanged-group-format='%=' \
+   --changed-group-format='address@hidden@}
+%<address@hidden@}
address@hidden@}
+%>address@hidden@}
+' \
+   myfile
address@hidden example
+
+Here is a more advanced example, which outputs a diff listing with
+headers containing line numbers in a ``plain English'' style.
+
address@hidden
+cvs diff \
+   --unchanged-group-format='' \
+   --old-group-format='-------- %dn line%(n=1?:s) deleted at %df:
+%<' \
+   --new-group-format='-------- %dN line%(N=1?:s) added after %de:
+%>' \
+   --changed-group-format='-------- %dn line%(n=1?:s) changed at %df:
+%<-------- to:
+%>' \
+   myfile
address@hidden example
+
+To specify a line group format, use one of the options
+listed below.  You can specify up to four line group formats, one for
+each kind of line group.  You should quote @var{format}, because it
+typically contains shell metacharacters.
+
address@hidden @samp
address@hidden address@hidden
+These line groups are hunks containing only lines from the first file.
+The default old group format is the same as the changed group format if
+it is specified; otherwise it is a format that outputs the line group as-is.
+
address@hidden address@hidden
+These line groups are hunks containing only lines from the second
+file.  The default new group format is same as the changed group
+format if it is specified; otherwise it is a format that outputs the
+line group as-is.
+
address@hidden address@hidden
+These line groups are hunks containing lines from both files.  The
+default changed group format is the concatenation of the old and new
+group formats.
+
address@hidden address@hidden
+These line groups contain lines common to both files.  The default
+unchanged group format is a format that outputs the line group as-is.
address@hidden table
+
+In a line group format, ordinary characters represent themselves;
+conversion specifications start with @samp{%} and have one of the
+following forms.
+
address@hidden @samp
address@hidden %<
+stands for the lines from the first file, including the trailing newline.
+Each line is formatted according to the old line format (@pxref{Line formats}).
+
address@hidden %>
+stands for the lines from the second file, including the trailing newline.
+Each line is formatted according to the new line format.
+
address@hidden %=
+stands for the lines common to both files, including the trailing newline.
+Each line is formatted according to the unchanged line format.
+
address@hidden %%
+stands for @samp{%}.
+
address@hidden %c'@var{C}'
+where @var{C} is a single character, stands for @var{C}.
address@hidden may not be a backslash or an apostrophe.
+For example, @samp{%c':'} stands for a colon, even inside
+the then-part of an if-then-else format, which a colon would
+normally terminate.
+
address@hidden %c'address@hidden'
+where @var{O} is a string of 1, 2, or 3 octal digits,
+stands for the character with octal code @var{O}.
+For example, @samp{%c'\0'} stands for a null character.
+
address@hidden @address@hidden
+where @var{F} is a @code{printf} conversion specification and @var{n} is one
+of the following letters, stands for @var{n}'s value formatted with @var{F}.
+
address@hidden @samp
address@hidden e
+The line number of the line just before the group in the old file.
+
address@hidden f
+The line number of the first line in the group in the old file;
+equals @var{e} + 1.
+
address@hidden l
+The line number of the last line in the group in the old file.
+
address@hidden m
+The line number of the line just after the group in the old file;
+equals @var{l} + 1.
+
address@hidden n
+The number of lines in the group in the old file; equals @var{l} - @var{f} + 1.
+
address@hidden E, F, L, M, N
+Likewise, for lines in the new file.
+
address@hidden table
+
+The @code{printf} conversion specification can be @samp{%d},
address@hidden, @samp{%x}, or @samp{%X}, specifying decimal, octal,
+lower case hexadecimal, or upper case hexadecimal output
+respectively.  After the @samp{%} the following options can appear in
+sequence: a @samp{-} specifying left-justification; an integer
+specifying the minimum field width; and a period followed by an
+optional integer specifying the minimum number of digits.
+For example, @samp{%5dN} prints the number of new lines in the group
+in a field of width 5 characters, using the @code{printf} format @code{"%5d"}.
+
address@hidden (@address@hidden@var{T}:@var{E})
+If @var{A} equals @var{B} then @var{T} else @var{E}.
address@hidden and @var{B} are each either a decimal constant
+or a single letter interpreted as above.
+This format spec is equivalent to @var{T} if
address@hidden's value equals @var{B}'s; otherwise it is equivalent to @var{E}.
+
+For example, @samp{%(N=0?no:%dN) line%(N=1?:s)} is equivalent to
address@hidden lines} if @var{N} (the number of lines in the group in the
+new file) is 0, to @samp{1 line} if @var{N} is 1, and to @samp{%dN lines}
+otherwise.
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden Line formats
address@hidden Line formats
+
+Line formats control how each line taken from an input file is
+output as part of a line group in if-then-else format.
+
+For example, the following command outputs text with a one-column
+change indicator to the left of the text.  The first column of output
+is @samp{-} for deleted lines, @samp{|} for added lines, and a space
+for unchanged lines.  The formats contain newline characters where
+newlines are desired on output.
+
address@hidden
+cvs diff \
+   --old-line-format='-%l
+' \
+   --new-line-format='|%l
+' \
+   --unchanged-line-format=' %l
+' \
+   myfile
address@hidden example
+
+To specify a line format, use one of the following options.  You should
+quote @var{format}, since it often contains shell metacharacters.
+
address@hidden @samp
address@hidden address@hidden
+formats lines just from the first file.
+
address@hidden address@hidden
+formats lines just from the second file.
+
address@hidden address@hidden
+formats lines common to both files.
+
address@hidden address@hidden
+formats all lines; in effect, it sets all three above options simultaneously.
address@hidden table
+
+In a line format, ordinary characters represent themselves;
+conversion specifications start with @samp{%} and have one of the
+following forms.
+
address@hidden @samp
address@hidden %l
+stands for the contents of the line, not counting its trailing
+newline (if any).  This format ignores whether the line is incomplete.
+
address@hidden %L
+stands for the contents of the line, including its trailing newline
+(if any).  If a line is incomplete, this format preserves its
+incompleteness.
+
address@hidden %%
+stands for @samp{%}.
+
address@hidden %c'@var{C}'
+where @var{C} is a single character, stands for @var{C}.
address@hidden may not be a backslash or an apostrophe.
+For example, @samp{%c':'} stands for a colon.
+
address@hidden %c'address@hidden'
+where @var{O} is a string of 1, 2, or 3 octal digits,
+stands for the character with octal code @var{O}.
+For example, @samp{%c'\0'} stands for a null character.
+
address@hidden @var{F}n
+where @var{F} is a @code{printf} conversion specification,
+stands for the line number formatted with @var{F}.
+For example, @samp{%.5dn} prints the line number using the
address@hidden format @code{"%.5d"}.  @xref{Line group formats}, for
+more about printf conversion specifications.
+
address@hidden table
+
+The default line format is @samp{%l} followed by a newline character.
+
+If the input contains tab characters and it is important that they line
+up on output, you should ensure that @samp{%l} or @samp{%L} in a line
+format is just after a tab stop (e.g.@: by preceding @samp{%l} or
address@hidden with a tab character), or you should use the @samp{-t} or
address@hidden option.
+
+Taken together, the line and line group formats let you specify many
+different formats.  For example, the following command uses a format
+similar to @code{diff}'s normal format.  You can tailor this command
+to get fine control over @code{diff}'s output.
+
address@hidden
+cvs diff \
+   --old-line-format='< %l
+' \
+   --new-line-format='> %l
+' \
+   --old-group-format='%df%(f=l?:,%dl)d%dE
+%<' \
+   --new-group-format='%dea%dF%(F=L?:,%dL)
+%>' \
+   --changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
+%<---
+%>' \
+   --unchanged-group-format='' \
+   myfile
address@hidden example
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden diff examples
address@hidden diff examples
+
+The following line produces a Unidiff (@samp{-u} flag)
+between revision 1.14 and 1.19 of
address@hidden  Due to the @samp{-kk} flag no
+keywords are substituted, so differences that only depend
+on keyword substitution are ignored.
+
address@hidden
+$ cvs diff -kk -u -r 1.14 -r 1.19 backend.c
address@hidden example
+
+Suppose the experimental branch EXPR1 was based on a
+set of files tagged RELEASE_1_0.  To see what has
+happened on that branch, the following can be used:
+
address@hidden
+$ cvs diff -r RELEASE_1_0 -r EXPR1
address@hidden example
+
+A command like this can be used to produce a context
+diff between two releases:
+
address@hidden
+$ cvs diff -c -r RELEASE_1_0 -r RELEASE_1_1 > diffs
address@hidden example
+
+If you are maintaining ChangeLogs, a command like the following
+just before you commit your changes may help you write
+the ChangeLog entry.  All local modifications that have
+not yet been committed will be printed.
+
address@hidden
+$ cvs diff -u | less
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden export
address@hidden export---Export sources from CVS, similar to checkout
address@hidden export (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis: export [-flNnR] (-r rev[:date] | -D date) [-k subst] [-d dir] 
address@hidden
address@hidden
+Requires: repository.
address@hidden
+Changes: current directory.
address@hidden itemize
+
+This command is a variant of @code{checkout}; use it
+when you want a copy of the source for module without
+the @sc{cvs} administrative directories.  For example, you
+might use @code{export} to prepare source for shipment
+off-site.  This command requires that you specify a
+date or tag (with @samp{-D} or @samp{-r}), so that you
+can count on reproducing the source you ship to others
+(and thus it always prunes empty directories).
+
+One often would like to use @samp{-kv} with @code{cvs
+export}.  This causes any keywords to be
+expanded such that an import done at some other site
+will not lose the keyword revision information.  But be
+aware that doesn't handle an export containing binary
+files correctly.  Also be aware that after having used
address@hidden, one can no longer use the @code{ident}
+command (which is part of the @sc{rcs} suite---see
+ident(1)) which looks for keyword strings.  If
+you want to be able to use @code{ident} you must not
+use @samp{-kv}.
+
address@hidden
+* export options::              export options
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden export options
address@hidden export options
+
+These standard options are supported by @code{export}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -D @var{date}
+Use the most recent revision no later than @var{date}.
+
address@hidden -f
+If no matching revision is found, retrieve the most
+recent revision (instead of ignoring the file).
+
address@hidden -l
+Local; run only in current working directory.
+
address@hidden -n
+Do not run any checkout program.
+
address@hidden -R
+Export directories recursively.  This is on by default.
+
address@hidden -r @var{tag}[:@var{date}]
+Export the revision specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
address@hidden table
+
+In addition, these options (that are common to
address@hidden and @code{export}) are also supported:
+
address@hidden @code
address@hidden -d @var{dir}
+Create a directory called @var{dir} for the working
+files, instead of using the module name.
address@hidden options}, for complete details on how
address@hidden handles this flag.
+
address@hidden -k @var{subst}
+Set keyword expansion mode (@pxref{Substitution modes}).
+
address@hidden -N
+Only useful together with @samp{-d @var{dir}}.
address@hidden options}, for complete details on how
address@hidden handles this flag.
address@hidden table
+
address@hidden
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden @node export examples
address@hidden export examples
+
+Contributed examples are gratefully accepted.
address@hidden -- Examples here!!
address@hidden ignore
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden history
address@hidden history---Show status of files and users
address@hidden history (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis:     history [-report] [-flags] [-options args] address@hidden
address@hidden
+Requires: the file @file{$CVSROOT/CVSROOT/history}
address@hidden
+Changes: nothing.
address@hidden itemize
+
address@hidden can keep a history log that tracks each use of most @sc{cvs}
+commands.  You can use @code{history} to display this information in
+various formats.
+
+To enable logging, the @samp{LogHistory} config option must be set to
+some value other than the empty string and the history file specified by
+the @samp{HistoryLogPath} option must be writable by all users who may run
+the @sc{cvs} executable (@pxref{config}).
+
+To enable the @code{history} command, logging must be enabled as above and
+the @samp{HistorySearchPath} config option (@pxref{config}) must be set to
+specify some number of the history logs created thereby and these files must
+be readable by each user who might run the @code{history} command.
+
+Creating a repository via the @code{cvs init} command will enable logging of
+all possible events to a single history log file
+(@file{$CVSROOT/CVSROOT/history}) with read and write permissions for all
+users (@pxref{Creating a repository}).
+
address@hidden@code{history} uses @samp{-f}, @samp{-l},
address@hidden, and @samp{-p} in ways that conflict with the
+normal use inside @sc{cvs} (@pxref{Common options}).}
+
address@hidden
+* history options::             history options
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden history options
address@hidden history options
+
+Several options (shown above as @samp{-report})  control  what
+kind of report is generated:
+
address@hidden @code
address@hidden -c
+Report on each time commit was used (i.e., each time
+the repository was modified).
+
address@hidden -e
+Everything (all record types).  Equivalent to
+specifying @samp{-x} with all record types.  Of course,
address@hidden will also include record types which are
+added in a future version of @sc{cvs}; if you are
+writing a script which can only handle certain record
+types, you'll want to specify @samp{-x}.
+
address@hidden -m @var{module}
+Report on a particular module.  (You can meaningfully
+use @samp{-m} more than once on the command line.)
+
address@hidden -o
+Report on checked-out modules.  This is the default report type.
+
address@hidden -T
+Report on all tags.
+
address@hidden -x @var{type}
+Extract a particular set of record types @var{type} from the @sc{cvs}
+history.  The types are indicated by single letters,
+which you may specify in combination.
+
+Certain commands have a single record type:
+
address@hidden @code
address@hidden F
+release
address@hidden O
+checkout
address@hidden E
+export
address@hidden T
+rtag
address@hidden table
+
address@hidden
+One of five record types may result from an update:
+
address@hidden @code
address@hidden C
+A merge was necessary but collisions were
+detected (requiring manual merging).
address@hidden G
+A merge was necessary and it succeeded.
address@hidden U
+A working file was copied from the repository.
address@hidden P
+A working file was patched to match the repository.
address@hidden W
+The working copy of a file was deleted during
+update (because it was gone from the repository).
address@hidden table
+
address@hidden
+One of three record types results from commit:
+
address@hidden @code
address@hidden A
+A file was added for the first time.
address@hidden M
+A file was modified.
address@hidden R
+A file was removed.
address@hidden table
address@hidden table
+
+The options shown as @samp{-flags} constrain or expand
+the report without requiring option arguments:
+
address@hidden @code
address@hidden -a
+Show data for all users (the default is to show data
+only for the user executing @code{history}).
+
address@hidden -l
+Show last modification only.
+
address@hidden -w
+Show only the records for modifications done from the
+same working directory where @code{history} is
+executing.
address@hidden table
+
+The options shown as @samp{-options @var{args}} constrain the report
+based on an argument:
+
address@hidden @code
address@hidden -b @var{str}
+Show data back to a record containing  the  string
address@hidden  in  either the module name, the file name, or
+the repository path.
+
address@hidden -D @var{date}
+Show data since @var{date}.  This is slightly different
+from the normal use of @samp{-D @var{date}}, which
+selects the newest revision older than @var{date}.
+
address@hidden -f @var{file}
+Show data for a particular file
+(you can specify several @samp{-f} options on the same command line).
+This is equivalent to specifying the file on the command line.
+
address@hidden -n @var{module}
+Show data for a particular module
+(you can specify several @samp{-n} options on the same command line).
+
address@hidden -p @var{repository}
+Show data for a particular source repository  (you
+can specify several @samp{-p} options on the same command
+line).
+
address@hidden -r @var{rev}
+Show records referring to revisions since the revision
+or tag named @var{rev} appears in individual @sc{rcs}
+files.  Each @sc{rcs} file is searched for the revision or
+tag.
+
address@hidden -t @var{tag}
+Show records since tag @var{tag} was last added to the
+history file.  This differs from the @samp{-r} flag
+above in that it reads only the history file, not the
address@hidden files, and is much faster.
+
address@hidden -u @var{name}
+Show records for user @var{name}.
+
address@hidden -z @var{timezone}
+Show times in the selected records using the specified
+time zone instead of UTC.
address@hidden table
+
address@hidden
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden @node history examples
address@hidden history examples
+
+Contributed examples will gratefully be accepted.
address@hidden -- Examples here!
address@hidden ignore
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden import
address@hidden import---Import sources into CVS, using vendor branches
address@hidden import (subcommand)
+
address@hidden FIXME: This node is way too long for one which has subnodes.
+
address@hidden @bullet
address@hidden
+Synopsis: import [-options] repository vendortag address@hidden
address@hidden
+Requires: Repository, source distribution directory.
address@hidden
+Changes: repository.
address@hidden itemize
+
+Use @code{import} to incorporate an entire source
+distribution from an outside source (e.g., a source
+vendor) into your source repository directory.  You can
+use this command both for initial creation of a
+repository, and for wholesale updates to the module
+from the outside source.  @xref{Tracking sources}, for
+a discussion on this subject.
+
+The @var{repository} argument gives a directory name
+(or a path to a directory) under the @sc{cvs} root directory
+for repositories; if the directory did not exist,
+import creates it.
+
+When you use import for updates to source that has been
+modified in your source repository (since a prior
+import), it will notify you of any files that conflict
+in the two branches of development; use @samp{checkout
+-j} to reconcile the differences, as import instructs
+you to do.
+
+If @sc{cvs} decides a file should be ignored
+(@pxref{cvsignore}), it does not import it and prints
address@hidden } followed by the filename (@pxref{import output}, for a
+complete description of the output).
+
+If the file @file{$CVSROOT/CVSROOT/cvswrappers} exists,
+any file whose names match the specifications in that
+file will be treated as packages and the appropriate
+filtering will be performed on the file/directory
+before being imported.  @xref{Wrappers}.
+
+The outside source is saved in a first-level
+branch, by default 1.1.1.  Updates are leaves of this
+branch; for example, files from the first imported
+collection of source will be revision 1.1.1.1, then
+files from the first imported update will be revision
+1.1.1.2, and so on.
+
+At least three arguments are required.
address@hidden is needed to identify the collection
+of source.  @var{vendortag} is a tag for the entire
+branch (e.g., for 1.1.1).  You must also specify at
+least one @var{releasetag} to uniquely identify the files at
+the leaves created each time you execute @code{import}.  The
address@hidden should be new, not previously existing in the
+repository file, and uniquely identify the imported release,
+
address@hidden I'm not completely sure this belongs here.  But
address@hidden we need to say it _somewhere_ reasonably obvious; it
address@hidden is a common misconception among people first learning CVS
+Note that @code{import} does @emph{not} change the
+directory in which you invoke it.  In particular, it
+does not set up that directory as a @sc{cvs} working
+directory; if you want to work with the sources import
+them first and then check them out into a different
+directory (@pxref{Getting the source}).
+
address@hidden
+* import options::              import options
+* import output::               import output
+* import examples::             import examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden import options
address@hidden import options
+
+This standard option is supported by @code{import}
+(@pxref{Common options}, for a complete description):
+
address@hidden @code
address@hidden -m @var{message}
+Use @var{message} as log information, instead of
+invoking an editor.
address@hidden table
+
+There are the following additional special options.
+
address@hidden @code
address@hidden -b @var{branch}
+See @ref{Multiple vendor branches}.
+
address@hidden -k @var{subst}
+Indicate the keyword expansion mode desired.  This
+setting will apply to all files created during the
+import, but not to any files that previously existed in
+the repository.  See @ref{Substitution modes}, for a
+list of valid @samp{-k} settings.
+
address@hidden -I @var{name}
+Specify file names that should be ignored during
+import.  You can use this option repeatedly.  To avoid
+ignoring any files at all (even those ignored by
+default), specify `-I !'.
+
address@hidden can be a file name pattern of the same type
+that you can specify in the @file{.cvsignore} file.
address@hidden
address@hidden -- Is this really true?
+
address@hidden -W @var{spec}
+Specify file names that should be filtered during
+import.  You can use this option repeatedly.
+
address@hidden can be a file name pattern of the same type
+that you can specify in the @file{.cvswrappers}
+file. @xref{Wrappers}.
+
address@hidden -X
+Modify the algorithm used by @sc{cvs} when importing new files
+so that new files do not immediately appear on the main trunk.
+
+Specifically, this flag causes @sc{cvs} to mark new files as
+if they were deleted on the main trunk, by taking the following
+steps for each file in addition to those normally taken on import:
+creating a new revision on the main trunk indicating that
+the new file is @code{dead}, resetting the new file's default branch,
+and placing the file in the Attic (@pxref{Attic}) directory.
+
+Use of this option can be forced on a repository-wide basis
+by setting the @samp{ImportNewFilesToVendorBranchOnly} option in
+CVSROOT/config (@pxref{config}).
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden import output
address@hidden import output
+
address@hidden keeps you informed of its progress by printing a line
+for each file, preceded by one character indicating the status of the file:
+
address@hidden @code
address@hidden U @var{file}
+The file already exists in the repository and has not been locally
+modified; a new revision has been created (if necessary).
+
address@hidden N @var{file}
+The file is a new file which has been added to the repository.
+
address@hidden C @var{file}
+The file already exists in the repository but has been locally modified;
+you will have to merge the changes.
+
address@hidden I @var{file}
+The file is being ignored (@pxref{cvsignore}).
+
address@hidden Symbolic link, importing
address@hidden Link, symbolic, importing
address@hidden FIXME: also (somewhere else) probably
address@hidden should be documenting what happens if you "cvs add"
address@hidden a symbolic link.  Also maybe what happens if
address@hidden you manually create symbolic links within the
address@hidden repository (? - not sure why we'd want to suggest
address@hidden doing that).
address@hidden L @var{file}
+The file is a symbolic link; @code{cvs import} ignores symbolic links.
+People periodically suggest that this behavior should
+be changed, but if there is a consensus on what it
+should be changed to, it is not apparent.
+(Various options in the @file{modules} file can be used
+to recreate symbolic links on checkout, update, etc.;
address@hidden)
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden import examples
address@hidden import examples
+
+See @ref{Tracking sources}, and @ref{From files}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden log
address@hidden log---Print out log information for files
address@hidden log (subcommand)
+
address@hidden @bullet
address@hidden
+Synopsis: log [options] address@hidden
address@hidden
+Requires: repository, working directory.
address@hidden
+Changes: nothing.
address@hidden itemize
+
+Display log information for files.  @code{log} used to
+call the @sc{rcs} utility @code{rlog}.  Although this
+is no longer true in the current sources, this history
+determines the format of the output and the options,
+which are not quite in the style of the other @sc{cvs}
+commands.
+
address@hidden Timezone, in output
address@hidden Zone, time, in output
+The output includes the location of the @sc{rcs} file,
+the @dfn{head} revision (the latest revision on the
+trunk), all symbolic names (tags) and some other
+things.  For each revision, the revision number, the
+date, the author, the number of lines added/deleted, the commitid
+and the log message are printed.  All dates are displayed
+in local time at the client. This is typically specified in
+the @code{$TZ} environment variable, which can be set to
+govern how @code{log} displays dates.
+
address@hidden@code{log} uses @samp{-R} in a way that conflicts
+with the normal use inside @sc{cvs} (@pxref{Common options}).}
+
address@hidden
+* log options::                 log options
+* log examples::                log examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden log options
address@hidden log options
+
+By default, @code{log} prints all information that is
+available.  All other options restrict the output.  Note that the revision
+selection options (@code{-d}, @code{-r}, @code{-s}, and @code{-w}) have no
+effect, other than possibly causing a search for files in Attic directories,
+when used in conjunction with the options that restrict the output to only
address@hidden header fields (@code{-b}, @code{-h}, @code{-R}, and @code{-t})
+unless the @code{-S} option is also specified.
+
address@hidden @code
address@hidden -b
+Print information about the revisions on the default
+branch, normally the highest branch on the trunk.
+
address@hidden -d @var{dates}
+Print information about revisions with a checkin
+date/time in the range given by the
+semicolon-separated list of dates.  The date formats
+accepted are those accepted by the @samp{-D} option to
+many other @sc{cvs} commands (@pxref{Common options}).
+Dates can be combined into ranges as follows:
+
address@hidden Should we be thinking about accepting ISO8601
address@hidden ranges?  For example "1972-09-10/1972-09-12".
address@hidden @code
address@hidden @var{d1}<@var{d2}
address@hidden @var{d2}>@var{d1}
+Select the revisions that were deposited between
address@hidden and @var{d2}.
+
address@hidden <@var{d}
address@hidden @var{d}>
+Select all revisions dated @var{d} or earlier.
+
address@hidden @var{d}<
address@hidden >@var{d}
+Select all revisions dated @var{d} or later.
+
address@hidden @var{d}
+Select the single, latest revision dated @var{d} or
+earlier.
address@hidden table
+
+The @samp{>} or @samp{<} characters may be followed by
address@hidden to indicate an inclusive range rather than an
+exclusive one.
+
+Note that the separator is a semicolon (;).
+
address@hidden -h
+Print only the name of the @sc{rcs} file, name
+of the file in the working directory, head,
+default branch, access list, locks, symbolic names, and
+suffix.
+
address@hidden -l
+Local; run only in current working directory.  (Default
+is to run recursively).
+
address@hidden -N
+Do not print the list of tags for this file.  This
+option can be very useful when your site uses a lot of
+tags, so rather than "more"'ing over 3 pages of tag
+information, the log information is presented without
+tags at all.
+
address@hidden -R
+Print only the name of the @sc{rcs} file.
+
address@hidden Note that using a bare revision (in addition to not
address@hidden being explicitly documented here) is potentially
address@hidden confusing; it shows the log message to get from the
address@hidden previous revision to that revision.  "-r1.3 -r1.6"
address@hidden (equivalent to "-r1.3,1.6") is even worse; it
address@hidden prints the messages to get from 1.2 to 1.3 and 1.5
address@hidden to 1.6.  By analogy with "cvs diff", users might
address@hidden expect that it is more like specifying a range.
address@hidden It is not 100% clear to me how much of this should
address@hidden be documented (for example, multiple -r options
address@hidden perhaps could/should be deprecated given the false
address@hidden analogy with "cvs diff").
address@hidden In general, this section should be rewritten to talk
address@hidden about messages to get from revision rev1 to rev2,
address@hidden rather than messages for revision rev2 (that is, the
address@hidden messages are associated with a change not a static
address@hidden revision and failing to make this distinction causes
address@hidden much confusion).
address@hidden address@hidden
+Print information about revisions given in the
+comma-separated list @var{revisions} of revisions and
+ranges.  The following table explains the available
+range formats:
+
address@hidden @code
address@hidden @var{rev1}:@var{rev2}
+Revisions @var{rev1} to @var{rev2} (which must be on
+the same branch).
+
address@hidden @var{rev1}::@var{rev2}
+The same, but excluding @var{rev1}.
+
address@hidden :@var{rev}
address@hidden ::@var{rev}
+Revisions from the beginning of the branch up to
+and including @var{rev}.
+
address@hidden @var{rev}:
+Revisions starting with @var{rev} to the end of the
+branch containing @var{rev}.
+
address@hidden @var{rev}::
+Revisions starting just after @var{rev} to the end of the
+branch containing @var{rev}.
+
address@hidden @var{branch}
+An argument that is a branch means all revisions on
+that branch.
+
address@hidden @var{branch1}:@var{branch2}
address@hidden @var{branch1}::@var{branch2}
+A range of branches means all revisions
+on the branches in that range.
+
address@hidden @var{branch}.
+The latest revision in @var{branch}.
address@hidden table
+
+A bare @samp{-r} with no revisions means the latest
+revision on the default branch, normally the trunk.
+There can be no space between the @samp{-r} option and
+its argument.
+
address@hidden -S
+Suppress the header if no revisions are selected.
+
address@hidden -s @var{states}
+Print information about revisions whose state
+attributes match one of the states given in the
+comma-separated list @var{states}.  Individual states may
+be any text string, though @sc{cvs} commonly only uses two
+states, @samp{Exp} and @samp{dead}.  See @ref{admin options}
+for more information.
+
address@hidden -t
+Print the same as @samp{-h}, plus the descriptive text.
+
address@hidden address@hidden
+Print information about revisions checked in by users
+with login names appearing in the comma-separated list
address@hidden  If @var{logins} is omitted, the user's
+login is assumed.  There can be no space between the
address@hidden option and its argument.
address@hidden table
+
address@hidden prints the intersection of the revisions
+selected with the options @samp{-d}, @samp{-s}, and
address@hidden, intersected with the union of the revisions
+selected by @samp{-b} and @samp{-r}.
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden log examples
address@hidden log examples
+
address@hidden Timezone, in output
address@hidden Zone, time, in output
+Since @code{log} shows dates in local time,
+you might want to see them in Coordinated Universal Time (UTC) or
+some other timezone.
+To do this you can set your @code{$TZ} environment
+variable before invoking @sc{cvs}:
+
address@hidden
+$ TZ=UTC cvs log foo.c
+$ TZ=EST cvs log bar.c
address@hidden example
+
+(If you are using a @code{csh}-style shell, like @code{tcsh},
+you would need to prefix the examples above with @code{env}.)
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden ls & rls
address@hidden ls & rls
address@hidden ls (subcommand)
address@hidden rls (subcommand)
+
address@hidden @bullet
address@hidden
+ls [-e | -l] [-RP] [-r tag[:date]] [-D date] address@hidden
address@hidden
+Requires: repository for @code{rls}, repository & working directory for
address@hidden
address@hidden
+Changes: nothing.
address@hidden
+Synonym: @code{dir} & @code{list} are synonyms for @code{ls} and @code{rdir}
+& @code{rlist} are synonyms for @code{rls}.
address@hidden itemize
+
+The @code{ls} and @code{rls} commands are used to list
+files and directories in the repository.
+
+By default @code{ls} lists the files and directories
+that belong in your working directory, what would be
+there after an @code{update}.
+
+By default @code{rls} lists the files and directories
+on the tip of the trunk in the topmost directory of the
+repository.
+
+Both commands accept an optional list of file and
+directory names, relative to the working directory for
address@hidden and the topmost directory of the repository
+for @code{rls}.  Neither is recursive by default.
+
address@hidden
+* ls & rls options::         ls & rls options
+* rls examples:              rls examples
address@hidden menu
+
address@hidden ls & rls options
address@hidden ls & rls options
+
+These standard options are supported by @code{ls} & @code{rls}:
+
address@hidden @code
address@hidden -d
+Show dead revisions (with tag when specified).
+
address@hidden -e
+Display in CVS/Entries format.  This format is meant to remain easily parsable
+by automation.
+
address@hidden -l
+Display all details.
+
address@hidden -P
+Don't list contents of empty directories when recursing.
+
address@hidden -R
+List recursively.
+
address@hidden -r @var{tag}[:@var{date}]
+Show files specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
+
address@hidden -D @var{date}
+Show files from date.
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden rls examples
address@hidden rls examples
+
address@hidden
+$ cvs rls
+cvs rls: Listing module: `.'
+CVSROOT
+first-dir
address@hidden example
+
address@hidden
+$ cvs rls CVSROOT
+cvs rls: Listing module: `CVSROOT'
+checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+rcsinfo
+taginfo
+verifymsg
+
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden rdiff
address@hidden rdiff---'patch' format diffs between releases
address@hidden rdiff (subcommand)
+
address@hidden @bullet
address@hidden
+rdiff [-flags] [-V vn] (-r tag1[:date1] | -D date1) [-r tag2[:date2] | -D 
date2] address@hidden
address@hidden
+Requires: repository.
address@hidden
+Changes: nothing.
address@hidden
+Synonym: patch
address@hidden itemize
+
+Builds a Larry Wall format patch(1) file between two
+releases, that can be fed directly into the @code{patch}
+program to bring an old release up-to-date with the new
+release.  (This is one of the few @sc{cvs} commands that
+operates directly from the repository, and doesn't
+require a prior checkout.) The diff output is sent to
+the standard output device.
+
+You can specify (using the standard @samp{-r} and
address@hidden options) any combination of one or two
+revisions or dates.  If only one revision or date is
+specified, the patch file reflects differences between
+that revision or date and the current head revisions in
+the @sc{rcs} file.
+
+Note that if the software release affected is contained
+in more than one directory, then it may be necessary to
+specify the @samp{-p} option to the @code{patch} command when
+patching the old sources, so that @code{patch} is able to find
+the files that are located in other directories.
+
address@hidden
+* rdiff options::               rdiff options
+* rdiff examples::              rdiff examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden rdiff options
address@hidden rdiff options
+
+These standard options are supported by @code{rdiff}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -D @var{date}
+Use the most recent revision no later than @var{date}.
+
address@hidden -f
+If no matching revision is found, retrieve the most
+recent revision (instead of ignoring the file).
+
address@hidden -k @var{kflag}
+Process keywords according to @var{kflag}.  See
address@hidden substitution}.
+
address@hidden -l
+Local; don't descend subdirectories.
+
address@hidden -R
+Examine directories recursively.  This option is on by default.
+
address@hidden -r @var{tag}
+Use the revision specified by @var{tag}, or when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
address@hidden table
+
+In addition to the above, these options are available:
+
address@hidden @code
address@hidden -c
+Use the context diff format.  This is the default format.
+
address@hidden -s
+Create a summary change report instead of a patch.  The
+summary includes information about files that were
+changed or added between the releases.  It is sent to
+the standard output device.  This is useful for finding
+out, for example, which files have changed between two
+dates or revisions.
+
address@hidden -t
+A diff of the top two revisions is sent to the standard
+output device.  This is most useful for seeing what the
+last change to a file was.
+
address@hidden -u
+Use the unidiff format for the context diffs.
+Remember that old versions
+of the @code{patch} program can't handle the unidiff
+format, so if you plan to post this patch to the net
+you should probably not use @samp{-u}.
+
address@hidden -V @var{vn}
+Expand keywords according to the rules current in
address@hidden version @var{vn} (the expansion format changed with
address@hidden version 5).  Note that this option is no
+longer accepted.  @sc{cvs} will always expand keywords the
+way that @sc{rcs} version 5 does.
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden rdiff examples
address@hidden rdiff examples
+
+Suppose you receive mail from @t{foo@@example.net} asking for an
+update from release 1.2 to 1.4 of the tc compiler.  You
+have no such patches on hand, but with @sc{cvs} that can
+easily be fixed with a command such as this:
+
address@hidden
+$ cvs rdiff -c -r FOO1_2 -r FOO1_4 tc | \
+$$ Mail -s 'The patches you asked for' foo@@example.net
address@hidden example
+
+Suppose you have made release 1.3, and forked a branch
+called @samp{R_1_3fix} for bug fixes.  @samp{R_1_3_1}
+corresponds to release 1.3.1, which was made some time
+ago.  Now, you want to see how much development has been
+done on the branch.  This command can be used:
+
address@hidden
+$ cvs patch -s -r R_1_3_1 -r R_1_3fix module-name
+cvs rdiff: Diffing module-name
+File ChangeLog,v changed from revision 1.52.2.5 to 1.52.2.6
+File foo.c,v changed from revision 1.52.2.3 to 1.52.2.4
+File bar.h,v changed from revision 1.29.2.1 to 1.2
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden release
address@hidden release---Indicate that a Module is no longer in use
address@hidden release (subcommand)
+
address@hidden @bullet
address@hidden
+release [-d] address@hidden
address@hidden
+Requires: Working directory.
address@hidden
+Changes: Working directory, history log.
address@hidden itemize
+
+This command is meant to safely cancel the effect of
address@hidden checkout}.  Since @sc{cvs} doesn't lock files, it
+isn't strictly necessary to use this command.  You can
+always simply delete your working directory, if you
+like; but you risk losing changes you may have
+forgotten, and you leave no trace in the @sc{cvs} history
+file (@pxref{history file}) that you've abandoned your
+checkout.
+
+Use @samp{cvs release} to avoid these problems.  This
+command checks that no uncommitted changes are
+present; that you are executing it from immediately
+above a @sc{cvs} working directory; and that the repository
+recorded for your files is the same as the repository
+defined in the module database.
+
+If all these conditions are true, @samp{cvs release}
+leaves a record of its execution (attesting to your
+intentionally abandoning your checkout) in the @sc{cvs}
+history log.
+
address@hidden
+* release options::             release options
+* release output::              release output
+* release examples::            release examples
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden release options
address@hidden release options
+
+The @code{release} command supports one command option:
+
address@hidden @code
address@hidden -d
+Delete your working copy of the file if the release
+succeeds.  If this flag is not given your files will
+remain in your working directory.
+
address@hidden:  The @code{release} command deletes
+all directories and files recursively.  This
+has the very serious side-effect that any directory
+that you have created inside your checked-out sources,
+and not added to the repository (using the @code{add}
+command; @pxref{Adding files}) will be silently deleted---even
+if it is non-empty!}
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden release output
address@hidden release output
+
+Before @code{release} releases your sources it will
+print a one-line message for any file that is not
+up-to-date.
+
address@hidden @code
address@hidden U @var{file}
+There exists a newer revision of this file in the
+repository, and you have not modified your local copy
+of the file.
+
address@hidden A @var{file}
+The file has been added to your private copy of the
+sources, but has not yet been committed to the
+repository.  If you delete your copy of the sources
+this file will be lost.
+
address@hidden R @var{file}
+The file has been removed from your private copy of the
+sources, but has not yet been removed from the
+repository, since you have not yet committed the
+removal.  @xref{commit}.
+
address@hidden M @var{file}
+The file is modified in your working directory.  There
+might also be a newer revision inside the repository.
+
address@hidden ? @var{file}
address@hidden is in your working directory, but does not
+correspond to anything in the source repository, and is
+not in the list of files for @sc{cvs} to ignore (see the
+description of the @samp{-I} option, and
address@hidden).  If you remove your working
+sources, this file will be lost.
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden release examples
address@hidden release examples
+
+Release the @file{tc} directory, and delete your local working copy
+of the files.
+
address@hidden
+$ cd ..         # @r{You must stand immediately above the}
+                # @r{sources when you issue @samp{cvs release}.}
+$ cvs release -d tc
+You have [0] altered files in this repository.
+Are you sure you want to release (and delete) directory `tc': y
+$
address@hidden example
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden server & pserver
address@hidden server & pserver---Act as a server for a client on stdin/stdout
address@hidden pserver (subcommand)
address@hidden server (subcommand)
+
address@hidden @bullet
address@hidden
+pserver [-c path]
+
+server [-c path]
address@hidden
+Requires: repository, client conversation on stdin/stdout
address@hidden
+Changes: Repository or, indirectly, client working directory.
address@hidden itemize
+
+The @sc{cvs} @code{server} and @code{pserver} commands are used to provide
+repository access to remote clients and expect a client conversation on
+stdin & stdout.  Typically these commands are launched from @code{inetd} or
+via @code{ssh} (@pxref{Remote repositories}).
+
address@hidden expects that the client has already been authenticated somehow,
+typically via @sc{ssh}, and @code{pserver} attempts to authenticate the client
+itself.
+
+Only one option is available with the @code{server} and @code{pserver}
+commands:
+
address@hidden configuration file
address@hidden @code
address@hidden -c path
+Load configuration from @var{path} rather than the default location 
address@hidden/CVSROOT/config} (@pxref{config}).  @var{path} must be
address@hidden/etc/cvs.conf} or prefixed by @file{/etc/cvs/}.  This option is
+supported beginning with @sc{cvs} release 1.12.13.
address@hidden table
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden update
address@hidden update---Bring work tree in sync with repository
address@hidden update (subcommand)
+
address@hidden @bullet
address@hidden
+update [-ACdflPpR] [-I name] [-j rev [-j rev]] [-k kflag] [-r tag[:date] | -D 
date] [-W spec] address@hidden
address@hidden
+Requires: repository, working directory.
address@hidden
+Changes: working directory.
address@hidden itemize
+
+After you've run checkout to create your private copy
+of source from the common repository, other developers
+will continue changing the central source.  From time
+to time, when it is convenient in your development
+process, you can use the @code{update} command from
+within your working directory to reconcile your work
+with any revisions applied to the source repository
+since your last checkout or update.  Without the @code{-C}
+option, @code{update} will also merge any differences
+between the local copy of files and their base revisions
+into any destination revisions specified with @code{-r},
address@hidden, or @code{-A}.
+
address@hidden
+* update options::              update options
+* update output::               update output
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden update options
address@hidden update options
+
+These standard options are available with @code{update}
+(@pxref{Common options}, for a complete description of
+them):
+
address@hidden @code
address@hidden -D date
+Use the most recent revision no later than @var{date}.
+This option is sticky, and implies @samp{-P}.
+See @ref{Sticky tags}, for more information on sticky tags/dates.
+
address@hidden -f
+Only useful with the @samp{-D} or @samp{-r} flags.  If no matching revision
+is found, retrieve the most recent revision (instead of ignoring the file).
+
address@hidden -k @var{kflag}
+Process keywords according to @var{kflag}.  See
address@hidden substitution}.
+This option is sticky; future updates of
+this file in this working directory will use the same
address@hidden  The @code{status} command can be viewed
+to see the sticky options.  See @ref{Invoking CVS}, for
+more information on the @code{status} command.
+
address@hidden -l
+Local; run only in current working directory.  @xref{Recursive behavior}.
+
address@hidden -P
+Prune empty directories.  See @ref{Moving directories}.
+
address@hidden -p
+Pipe files to the standard output.
+
address@hidden -R
+Update directories recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Retrieve the revisions specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  This option is sticky, and implies @samp{-P}.
+See @ref{Sticky tags}, for more information on sticky tags/dates. Also
+see @ref{Common options}.
address@hidden table
+
address@hidden 800
+These special options are also available with
address@hidden
+
address@hidden @code
address@hidden -A
+Reset any sticky tags, dates, or @samp{-k} options.
+See @ref{Sticky tags}, for more information on sticky tags/dates.
+
address@hidden -C
+Overwrite locally modified files with clean copies from
+the repository (the modified file is saved in
address@hidden@address@hidden, however).
+
address@hidden -d
+Create any directories that exist in the repository if
+they're missing from the working directory.  Normally,
address@hidden acts only on directories and files that
+were already enrolled in your working directory.
+
+This is useful for updating directories that were
+created in the repository since the initial checkout;
+but it has an unfortunate side effect.  If you
+deliberately avoided certain directories in the
+repository when you created your working directory
+(either through use of a module name or by listing
+explicitly the files and directories you wanted on the
+command line), then updating with @samp{-d} will create
+those directories, which may not be what you want.
+
address@hidden -I @var{name}
+Ignore files whose names match @var{name} (in your
+working directory) during the update.  You can specify
address@hidden more than once on the command line to specify
+several files to ignore.  Use @samp{-I !} to avoid
+ignoring any files at all.  @xref{cvsignore}, for other
+ways to make @sc{cvs} ignore some files.
+
address@hidden address@hidden
+Specify file names that should be filtered during
+update.  You can use this option repeatedly.
+
address@hidden can be a file name pattern of the same type
+that you can specify in the @file{.cvswrappers}
+file. @xref{Wrappers}.
+
address@hidden address@hidden
+With two @samp{-j} options, merge changes from the
+revision specified with the first @samp{-j} option to
+the revision specified with the second @samp{j} option,
+into the working directory.
+
+With one @samp{-j} option, merge changes from the
+ancestor revision to the revision specified with the
address@hidden option, into the working directory.  The
+ancestor revision is the common ancestor of the
+revision which the working directory is based on, and
+the revision specified in the @samp{-j} option.
+
+Note that using a single @samp{-j @var{tagname}} option rather than
address@hidden @var{branchname}} to merge changes from a branch will
+often not remove files which were removed on the branch.
address@hidden adds and removals}, for more.
+
+In addition, each @samp{-j} option can contain an optional
+date specification which, when used with branches, can
+limit the chosen revision to one within a specific
+date.  An optional date is specified by adding a colon
+(:) to the tag:
address@hidden@var{Symbolic_Tag}:@var{Date_Specifier}}.
+
address@hidden and merging}.
+
address@hidden table
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden update output
address@hidden update output
+
address@hidden and @code{checkout} keep you informed of
+their progress by printing a line for each file, preceded
+by one character indicating the status of the file:
+
address@hidden @code
address@hidden U @var{file}
+The file was brought up to date with respect to the
+repository.  This is done for any file that exists in
+the repository but not in your working directory, and for files
+that you haven't changed but are not the most recent
+versions available in the repository.
+
address@hidden A @var{file}
+The file has been added to your private copy of the
+sources, and will be added to the source repository
+when you run @code{commit} on the file.  This is a
+reminder to you that the file needs to be committed.
+
address@hidden R @var{file}
+The file has been removed from your private copy of the
+sources, and will be removed from the source repository
+when you run @code{commit} on the file.  This is a
+reminder to you that the file needs to be committed.
+
address@hidden M @var{file}
+The file is modified in  your  working  directory.
+
address@hidden can indicate one of two states for a file
+you're working on: either there were no modifications
+to the same file in the repository, so that your file
+remains as you last saw it; or there were modifications
+in the repository as well as in your copy, but they
+were merged successfully, without conflict, in your
+working directory.
+
address@hidden will print some messages if it merges your work,
+and a backup copy of your working file (as it looked
+before you ran @code{update}) will be made.  The exact
+name of that file is printed while @code{update} runs.
+
address@hidden C @var{file}
address@hidden .# files
address@hidden __ files (VMS)
+A conflict was detected while trying to merge your
+changes to @var{file} with changes from the source
+repository.  @var{file} (the copy in your working
+directory) is now the result of attempting to merge
+the two revisions; an unmodified copy of your file
+is also in your working directory, with the name
address@hidden@address@hidden where @var{revision}
+is the revision that your modified file started
+from.  Resolve the conflict as described in
address@hidden example}.
address@hidden "some systems" as in out-of-the-box OSes?  Not as
address@hidden far as I know.  We need to advise sysadmins as well
address@hidden as users how to set up this kind of purge, if that is
address@hidden what they want.
address@hidden We also might want to think about cleaner solutions,
address@hidden like having CVS remove the .# file once the conflict
address@hidden has been resolved or something like that.
+(Note that some systems automatically purge
+files that begin with @file{.#} if they have not been
+accessed for a few days.  If you intend to keep a copy
+of your original file, it is a very good idea to rename
+it.)  Under @sc{vms}, the file name starts with
address@hidden rather than @file{.#}.
+
address@hidden ? @var{file}
address@hidden is in your working directory, but does not
+correspond to anything in the source repository, and is
+not in the list of files for @sc{cvs} to ignore (see the
+description of the @samp{-I} option, and
address@hidden).
address@hidden table
+
address@hidden ----- END MAN 1 -----
address@hidden 
---------------------------------------------------------------------
address@hidden Invoking CVS
address@hidden Quick reference to CVS commands
address@hidden Command reference
address@hidden Reference, commands
address@hidden Invoking CVS
+
+This appendix describes how to invoke @sc{cvs}, with
+references to where each command or feature is
+described in detail.  For other references run the
address@hidden --help} command, or see @ref{Index}.
+
+A @sc{cvs} command looks like:
+
address@hidden
+cvs [ @var{global_options} ] @var{command} [ @var{command_options} ] [ 
@var{command_args} ]
address@hidden example
+
+Global options:
+
address@hidden @code
address@hidden address@hidden
+Specify legal @sc{cvsroot} directory (server only) (not
+in @sc{cvs} 1.9 and older).  See @ref{Password
+authentication server}.
+
address@hidden -a
+Authenticate all communication (client only) (not in @sc{cvs}
+1.9 and older).  See @ref{Global options}.
+
address@hidden -b
+Specify RCS location (@sc{cvs} 1.9 and older).  See
address@hidden options}.
+
address@hidden -d @var{root}
+Specify the @sc{cvsroot}.  See @ref{Repository}.
+
address@hidden -e @var{editor}
+Edit messages with @var{editor}.  See @ref{Committing
+your changes}.
+
address@hidden -f
+Do not read the @file{~/.cvsrc} file.  See @ref{Global
+options}.
+
address@hidden -H
address@hidden --help
+Print a help message.  See @ref{Global options}.
+
address@hidden -n
+Do not change any files.  See @ref{Global options}.
+
address@hidden -Q
+Be really quiet.  See @ref{Global options}.
+
address@hidden -q
+Be somewhat quiet.  See @ref{Global options}.
+
address@hidden -r
+Make new working files read-only.  See @ref{Global options}.
+
address@hidden -s @address@hidden
+Set a user variable.  See @ref{Variables}.
+
address@hidden -T @var{tempdir}
+Put temporary files in @var{tempdir}.  See @ref{Global
+options}.
+
address@hidden -t
+Trace @sc{cvs} execution.  See @ref{Global options}.
+
address@hidden -v
address@hidden --version
+Display version and copyright information for @sc{cvs}.
+
address@hidden -w
+Make new working files read-write.  See @ref{Global
+options}.
+
address@hidden -x
+Encrypt all communication (client only).
+See @ref{Global options}.
+
address@hidden -z @var{gzip-level}
address@hidden Compression
address@hidden Gzip
+Set the compression level (client only).
+See @ref{Global options}.
address@hidden table
+
+Keyword expansion modes (@pxref{Substitution modes}):
+
address@hidden
+-kkv  address@hidden: file1,v 1.1 1993/12/09 03:21:13 joe Exp $
+-kkvl address@hidden: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
+-kk   address@hidden
+-kv   file1,v 1.1 1993/12/09 03:21:13 joe Exp
+-ko   @i{no expansion}
+-kb   @i{no expansion, file is binary}
address@hidden example
+
+Keywords (@pxref{Keyword list}):
+
address@hidden
address@hidden: joe $
address@hidden: 1993/12/09 03:21:13 $
address@hidden: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
address@hidden: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
address@hidden: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
address@hidden: harry $
address@hidden: snapshot_1_14 $
address@hidden: file1,v $
address@hidden: 1.1 $
address@hidden: /home/files/file1,v $
address@hidden: Exp $
address@hidden: file1,v $
+Revision 1.1  1993/12/09 03:30:17  joe
+Initial revision
+
address@hidden example
+
address@hidden The idea behind this table is that we want each item
address@hidden to be a sentence or two at most.  Preferably a
address@hidden single line.
address@hidden
address@hidden In some cases refs to "foo options" are just to get
address@hidden this thing written quickly, not because the "foo
address@hidden options" node is really the best place to point.
+Commands, command options, and command arguments:
+
address@hidden @code
address@hidden ------------------------------------------------------------
address@hidden add address@hidden address@hidden@dots{}]
+Add a new file/directory.  See @ref{Adding files}.
+
address@hidden @code
address@hidden -k @var{kflag}
+Set keyword expansion.
+
address@hidden -m @var{msg}
+Set file description.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden admin address@hidden address@hidden@dots{}]
+Administration of history files in the repository.  See
address@hidden
address@hidden This list omits those options which are not
address@hidden documented as being useful with CVS.  That might be
address@hidden a mistake...
+
address@hidden @code
address@hidden address@hidden
+Set default branch.  See @ref{Reverting local changes}.
+
address@hidden address@hidden
+Set comment leader.
+
address@hidden address@hidden
+Set keyword substitution.  See @ref{Keyword
+substitution}.
+
address@hidden address@hidden
+Lock revision @var{rev}, or latest revision.
+
address@hidden address@hidden:@var{msg}
+Replace the log message of revision @var{rev} with
address@hidden
+
address@hidden address@hidden
+Delete revisions from the repository.  See
address@hidden options}.
+
address@hidden -q
+Run quietly; do not print diagnostics.
+
address@hidden address@hidden:@var{rev}]
+Set the state.  See @ref{admin options} for more information on possible
+states.
+
address@hidden Does not work for client/server CVS
address@hidden -t
+Set file description from standard input.
+
address@hidden address@hidden
+Set file description from @var{file}.
+
address@hidden address@hidden
+Set file description to @var{string}.
+
address@hidden address@hidden
+Unlock revision @var{rev}, or latest revision.
+
address@hidden List long options after the short options
address@hidden --execute
+Turn on execute bits on repository file.
+See @ref{admin options} for more information.
+
address@hidden --no-execute
+Turn off execute bits on repository file.
+See @ref{admin options} for more information.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden annotate address@hidden address@hidden@dots{}]
+Show last revision where each line was modified.  See
address@hidden
+
address@hidden @code
address@hidden -D @var{date}
+Annotate the most recent revision no later than
address@hidden  See @ref{Common options}.
+
address@hidden -F
+Force annotation of binary files.  (Without this option,
+binary files are skipped with a message.)
+
address@hidden -f
+Use head revision if tag/date not found.  See
address@hidden options}.
+
address@hidden -l
+Local; run only in current working directory.  @xref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Annotate revisions specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden checkout address@hidden @address@hidden
+Get a copy of the sources.  See @ref{checkout}.
+
address@hidden @code
address@hidden -A
+Reset any sticky tags/date/options.  See @ref{Sticky
+tags} and @ref{Keyword substitution}.
+
address@hidden -c
+Output the module database.  See @ref{checkout options}.
+
address@hidden -D @var{date}
+Check out revisions as of @var{date} (is sticky).  See
address@hidden options}.
+
address@hidden -d @var{dir}
+Check out into @var{dir}.  See @ref{checkout options}.
+
address@hidden -f
+Use head revision if tag/date not found.  See
address@hidden options}.
+
address@hidden Probably want to use rev1/rev2 style like for diff
address@hidden -r.  Here and in on-line help.
address@hidden -j @var{tag}[:@var{date}]
+Merge in the change specified by @var{tag}, or when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{checkout options}.
+
address@hidden -k @var{kflag}
+Use @var{kflag} keyword expansion.  See
address@hidden modes}.
+
address@hidden -l
+Local; run only in current working directory.  @xref{Recursive behavior}.
+
address@hidden -N
+Don't ``shorten'' module paths if -d specified.  See
address@hidden options}.
+
address@hidden -n
+Do not run module program (if any).  See @ref{checkout options}.
+
address@hidden -P
+Prune empty directories.  See @ref{Moving directories}.
+
address@hidden -p
+Check out files to standard output (avoids
+stickiness).  See @ref{checkout options}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Checkout the revision already tagged with @var{tag} or, when @var{date} is
+specified and @var{tag} is a branch tag, the version from the branch @var{tag}
+as it existed on @var{date}.  This .  See @ref{Common options}.
+
address@hidden -s
+Like -c, but include module status.  See @ref{checkout options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden commit address@hidden address@hidden@dots{}]
+Check changes into the repository.  See @ref{commit}.
+
address@hidden @code
address@hidden -c
+Check for valid edits before committing.  Requires a @sc{cvs} client and server
+both version 1.12.10 or greater.
+
address@hidden -F @var{file}
+Read log message from @var{file}.  See @ref{commit options}.
+
address@hidden -f
address@hidden What is this "disables recursion"?  It is from the
address@hidden on-line help; is it documented in this manual?
+Force the file to be committed; disables recursion.
+See @ref{commit options}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -m @var{msg}
+Use @var{msg} as log message.  See @ref{commit options}.
+
address@hidden -n
+Do not run module program (if any).  See @ref{commit options}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{rev}
+Commit to @var{rev}.  See @ref{commit options}.
address@hidden FIXME: should be dragging over text from
address@hidden commit options, especially if it can be cleaned up
address@hidden and made concise enough.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden diff address@hidden address@hidden@dots{}]
+Show differences between revisions.  See @ref{diff}.
+In addition to the options shown below, accepts a wide
+variety of options to control output style, for example
address@hidden for context diffs.
+
address@hidden @code
address@hidden -D @var{date1}
+Diff revision for date against working file.  See
address@hidden options}.
+
address@hidden -D @var{date2}
+Diff @var{rev1}/@var{date1} against @var{date2}.  See
address@hidden options}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -N
+Include diffs for added and removed files.  See
address@hidden options}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag1}[:@var{date1}]
+Diff the revisions specified by @var{tag1} or, when @var{date1} is specified
+and @var{tag1} is a branch tag, the version from the branch @var{tag1} as it
+existed on @var{date1}, against the working file.  See @ref{diff options}
+and @ref{Common options}.
+
address@hidden -r @var{tag2}[:@var{date2}]
+Diff the revisions specified by @var{tag2} or, when @var{date2} is specified
+and @var{tag2} is a branch tag, the version from the branch @var{tag2} as it
+existed on @var{date2}, against @var{rev1}/@var{date1}.  See @ref{diff options}
+and @ref{Common options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden edit address@hidden address@hidden@dots{}]
+Get ready to edit a watched file.  See @ref{Editing files}.
+
address@hidden @code
address@hidden -a @var{actions}
+Specify actions for temporary watch, where
address@hidden is @code{edit}, @code{unedit},
address@hidden, @code{all}, or @code{none}.  See
address@hidden files}.
+
address@hidden -c
+Check edits: Edit fails if someone else is already editting the file.
+Requires a @sc{cvs} client and server both of version 1.12.10 or greater.
+
address@hidden -f
+Force edit; ignore other edits.  Added in CVS 1.12.10.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden editors address@hidden address@hidden@dots{}]
+See who is editing a watched file.  See @ref{Watch information}.
+
address@hidden @code
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden export address@hidden @address@hidden
+Export files from @sc{cvs}.  See @ref{export}.
+
address@hidden @code
address@hidden -D @var{date}
+Check out revisions as of @var{date}.  See
address@hidden options}.
+
address@hidden -d @var{dir}
+Check out into @var{dir}.  See @ref{export options}.
+
address@hidden -f
+Use head revision if tag/date not found.  See
address@hidden options}.
+
address@hidden -k @var{kflag}
+Use @var{kflag} keyword expansion.  See
address@hidden modes}.
+
address@hidden -l
+Local; run only in current working directory.  @xref{Recursive behavior}.
+
address@hidden -N
+Don't ``shorten'' module paths if -d specified.  See
address@hidden options}.
+
address@hidden -n
+Do not run module program (if any).  See @ref{export options}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Export the revisions specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden history address@hidden address@hidden@dots{}]
+Show repository access history.  See @ref{history}.
+
address@hidden @code
address@hidden -a
+All users (default is self).  See @ref{history options}.
+
address@hidden -b @var{str}
+Back to record with @var{str} in module/file/repos
+field.  See @ref{history options}.
+
address@hidden -c
+Report on committed (modified) files.  See @ref{history options}.
+
address@hidden -D @var{date}
+Since @var{date}.  See @ref{history options}.
+
address@hidden -e
+Report on all record types.  See @ref{history options}.
+
address@hidden -l
+Last modified (committed or modified report).  See @ref{history options}.
+
address@hidden -m @var{module}
+Report on @var{module} (repeatable).  See @ref{history options}.
+
address@hidden -n @var{module}
+In @var{module}.  See @ref{history options}.
+
address@hidden -o
+Report on checked out modules.  See @ref{history options}.
+
address@hidden -p @var{repository}
+In @var{repository}.  See @ref{history options}.
+
address@hidden -r @var{rev}
+Since revision @var{rev}.  See @ref{history options}.
+
address@hidden -T
address@hidden What the @address@hidden is a TAG?  Same as a tag?  This
address@hidden wording is also in the online-line help.
+Produce report on all TAGs.  See @ref{history options}.
+
address@hidden -t @var{tag}
+Since tag record placed in history file (by anyone).
+See @ref{history options}.
+
address@hidden -u @var{user}
+For user @var{user} (repeatable).  See @ref{history options}.
+
address@hidden -w
+Working directory must match.  See @ref{history options}.
+
address@hidden -x @var{types}
+Report on @var{types}, one or more of
address@hidden  See @ref{history options}.
+
address@hidden -z @var{zone}
+Output for time zone @var{zone}.  See @ref{history options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden import address@hidden @var{repository} @var{vendor-tag} 
@address@hidden
+Import files into @sc{cvs}, using vendor branches.  See
address@hidden
+
address@hidden @code
address@hidden -b @var{bra}
+Import to vendor branch @var{bra}.  See
address@hidden vendor branches}.
+
address@hidden -d
+Use the file's modification time as the time of
+import.  See @ref{import options}.
+
address@hidden -k @var{kflag}
+Set default keyword substitution mode.  See
address@hidden options}.
+
address@hidden -m @var{msg}
+Use @var{msg} for log message.  See
address@hidden options}.
+
address@hidden -I @var{ign}
+More files to ignore (! to reset).  See
address@hidden options}.
+
address@hidden -W @var{spec}
+More wrappers.  See @ref{import options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden init
+Create a @sc{cvs} repository if it doesn't exist.  See
address@hidden a repository}.
+
address@hidden ------------------------------------------------------------
address@hidden kserver
+Kerberos authenticated server.
+See @ref{Kerberos authenticated}.
+
address@hidden ------------------------------------------------------------
address@hidden log address@hidden address@hidden@dots{}]
+Print out history information for files.  See @ref{log}.
+
address@hidden @code
address@hidden -b
+Only list revisions on the default branch.  See @ref{log options}.
+
address@hidden -d @var{dates}
+Specify dates (@var{d1}<@var{d2} for range, @var{d} for
+latest before).  See @ref{log options}.
+
address@hidden -h
+Only print header.  See @ref{log options}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -N
+Do not list tags.  See @ref{log options}.
+
address@hidden -R
+Only print name of RCS file.  See @ref{log options}.
+
address@hidden address@hidden
+Only list revisions @var{revs}.  See @ref{log options}.
+
address@hidden -s @var{states}
+Only list revisions with specified states.  See @ref{log options}.
+
address@hidden -t
+Only print header and descriptive text.  See @ref{log
+options}.
+
address@hidden address@hidden
+Only list revisions checked in by specified logins.  See @ref{log options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden login
+Prompt for password for authenticating server.  See
address@hidden authentication client}.
+
address@hidden ------------------------------------------------------------
address@hidden logout
+Remove stored password for authenticating server.  See
address@hidden authentication client}.
+
address@hidden ------------------------------------------------------------
address@hidden pserver
+Password authenticated server.
+See @ref{Password authentication server}.
+
address@hidden ------------------------------------------------------------
address@hidden rannotate address@hidden address@hidden@dots{}]
+Show last revision where each line was modified.  See
address@hidden
+
address@hidden @code
address@hidden -D @var{date}
+Annotate the most recent revision no later than
address@hidden  See @ref{Common options}.
+
address@hidden -F
+Force annotation of binary files.  (Without this option,
+binary files are skipped with a message.)
+
address@hidden -f
+Use head revision if tag/date not found.  See
address@hidden options}.
+
address@hidden -l
+Local; run only in current working directory.  @xref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Annotate the revision specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag}
+as it existed on @var{date}.  See @ref{Common options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden rdiff address@hidden @address@hidden
+Show differences between releases.  See @ref{rdiff}.
+
address@hidden @code
address@hidden -c
+Context diff output format (default).  See @ref{rdiff options}.
+
address@hidden -D @var{date}
+Select revisions based on @var{date}.  See @ref{Common options}.
+
address@hidden -f
+Use head revision if tag/date not found.  See
address@hidden options}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Select the revisions specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{diff options} and @ref{Common options}.
+
address@hidden -s
+Short patch - one liner per file.  See @ref{rdiff options}.
+
address@hidden -t
+Top two diffs - last change made to the file.  See
address@hidden options}.
+
address@hidden -u
+Unidiff output format.  See @ref{rdiff options}.
+
address@hidden -V @var{vers}
+Use RCS Version @var{vers} for keyword expansion (obsolete).  See
address@hidden options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden release address@hidden @var{directory}
+Indicate that a directory is no longer in use.  See
address@hidden
+
address@hidden @code
address@hidden -d
+Delete the given directory.  See @ref{release options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden remove address@hidden address@hidden@dots{}]
+Remove an entry from the repository.  See @ref{Removing files}.
+
address@hidden @code
address@hidden -f
+Delete the file before removing it.  See @ref{Removing files}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden rlog address@hidden address@hidden@dots{}]
+Print out history information for modules.  See @ref{log}.
+
address@hidden @code
address@hidden -b
+Only list revisions on the default branch.  See @ref{log options}.
+
address@hidden -d @var{dates}
+Specify dates (@var{d1}<@var{d2} for range, @var{d} for
+latest before).  See @ref{log options}.
+
address@hidden -h
+Only print header.  See @ref{log options}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -N
+Do not list tags.  See @ref{log options}.
+
address@hidden -R
+Only print name of RCS file.  See @ref{log options}.
+
address@hidden address@hidden
+Only list revisions @var{revs}.  See @ref{log options}.
+
address@hidden -s @var{states}
+Only list revisions with specified states.  See @ref{log options}.
+
address@hidden -t
+Only print header and descriptive text.  See @ref{log options}.
+
address@hidden address@hidden
+Only list revisions checked in by specified logins.  See @ref{log options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden rtag address@hidden @var{tag} @address@hidden
+Add a symbolic tag to a module.
+See @ref{Revisions} and @ref{Branching and merging}.
+
address@hidden @code
address@hidden -a
+Clear tag from removed files that would not otherwise
+be tagged.  See @ref{Tagging add/remove}.
+
address@hidden -b
+Create a branch named @var{tag}.  See @ref{Branching and merging}.
+
address@hidden -B
+Used in conjunction with -F or -d, enables movement and deletion of
+branch tags.  Use with extreme caution. 
+
address@hidden -D @var{date}
+Tag revisions as of @var{date}.  See @ref{Tagging by date/tag}.
+
address@hidden -d
+Delete @var{tag}.  See @ref{Modifying tags}.
+
address@hidden -F
+Move @var{tag} if it already exists.  See @ref{Modifying tags}.
+
address@hidden -f
+Force a head revision match if tag/date not found.
+See @ref{Tagging by date/tag}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -n
+No execution of tag program.  See @ref{Common options}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Tag the revision already tagged with @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Tagging by date/tag} and @ref{Common options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden server
+Rsh server.  See @ref{Connecting via rsh}.
+
address@hidden ------------------------------------------------------------
address@hidden status address@hidden @address@hidden
+Display status information in a working directory.  See
address@hidden status}.
+
address@hidden @code
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive behavior}.
+
address@hidden -v
+Include tag information for file.  See @ref{Tags}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden tag address@hidden @var{tag} address@hidden@dots{}]
+Add a symbolic tag to checked out version of files.
+See @ref{Revisions} and @ref{Branching and merging}.
+
address@hidden @code
address@hidden -b
+Create a branch named @var{tag}.  See @ref{Branching and merging}.
+
address@hidden -c
+Check that working files are unmodified.  See
address@hidden the working directory}.
+
address@hidden -D @var{date}
+Tag revisions as of @var{date}.  See @ref{Tagging by date/tag}.
+
address@hidden -d
+Delete @var{tag}.  See @ref{Modifying tags}.
+
address@hidden -F
+Move @var{tag} if it already exists.  See @ref{Modifying tags}.
+
address@hidden -f
+Force a head revision match if tag/date not found.
+See @ref{Tagging by date/tag}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Tag the revision already tagged with @var{tag}, or when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Tagging by date/tag} and @ref{Common options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden unedit address@hidden address@hidden@dots{}]
+Undo an edit command.  See @ref{Editing files}.
+
address@hidden @code
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive behavior}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden update address@hidden address@hidden@dots{}]
+Bring work tree in sync with repository.  See
address@hidden
+
address@hidden @code
address@hidden -A
+Reset any sticky tags/date/options.  See @ref{Sticky
+tags} and @ref{Keyword substitution}.
+
address@hidden -C
+Overwrite locally modified files with clean copies from
+the repository (the modified file is saved in
address@hidden@address@hidden, however).
+
address@hidden -D @var{date}
+Check out revisions as of @var{date} (is sticky).  See
address@hidden options}.
+
address@hidden -d
+Create directories.  See @ref{update options}.
+
address@hidden -f
+Use head revision if tag/date not found.  See
address@hidden options}.
+
address@hidden -I @var{ign}
+More files to ignore (! to reset).  See
address@hidden options}.
+
address@hidden Probably want to use rev1/rev2 style like for diff
address@hidden -r.  Here and in on-line help.
address@hidden -j @var{tag}[:@var{date}]
+Merge in changes from revisions specified by @var{tag} or, when @var{date} is
+specified and @var{tag} is a branch tag, the version from the branch @var{tag}
+as it existed on @var{date}.  See @ref{update options}.
+
address@hidden -k @var{kflag}
+Use @var{kflag} keyword expansion.  See
address@hidden modes}.
+
address@hidden -l
+Local; run only in current working directory.  @xref{Recursive behavior}.
+
address@hidden -P
+Prune empty directories.  See @ref{Moving directories}.
+
address@hidden -p
+Check out files to standard output (avoids
+stickiness).  See @ref{update options}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
+
address@hidden -r @var{tag}[:@var{date}]
+Checkout the revisions specified by @var{tag} or, when @var{date} is specified
+and @var{tag} is a branch tag, the version from the branch @var{tag} as it
+existed on @var{date}.  See @ref{Common options}.
+
address@hidden -W @var{spec}
+More wrappers.  See @ref{import options}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden version
address@hidden version (subcommand)
+
+Display the version of @sc{cvs} being used.  If the repository
+is remote, display both the client and server versions.
+
address@hidden ------------------------------------------------------------
address@hidden watch [on|off|add|remove] address@hidden address@hidden@dots{}]
+
+on/off: turn on/off read-only checkouts of files.  See
address@hidden a watch}.
+
+add/remove: add or remove notification on actions.  See
address@hidden Notified}.
+
address@hidden @code
address@hidden -a @var{actions}
+Specify actions for temporary watch, where
address@hidden is @code{edit}, @code{unedit},
address@hidden, @code{all}, or @code{none}.  See
address@hidden files}.
+
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
address@hidden table
+
address@hidden ------------------------------------------------------------
address@hidden watchers address@hidden address@hidden@dots{}]
+See who is watching a file.  See @ref{Watch information}.
+
address@hidden @code
address@hidden -l
+Local; run only in current working directory.  See @ref{Recursive behavior}.
+
address@hidden -R
+Operate recursively (default).  @xref{Recursive
+behavior}.
address@hidden table
+
address@hidden table
+
address@hidden 
---------------------------------------------------------------------
address@hidden Administrative files
address@hidden Reference manual for Administrative files
address@hidden Administrative files (reference)
address@hidden Files, reference manual
address@hidden Reference manual (files)
address@hidden CVSROOT (file)
+
+Inside the repository, in the directory
address@hidden/CVSROOT}, there are a number of
+supportive files for @sc{cvs}.  You can use @sc{cvs} in a limited
+fashion without any of them, but if they are set up
+properly they can help make life easier.  For a
+discussion of how to edit them, see @ref{Intro
+administrative files}.
+
+The most important of these files is the @file{modules}
+file, which defines the modules inside the repository.
+
address@hidden
+* modules::                     Defining modules
+* Wrappers::                    Specify binary-ness based on file name
+* Trigger Scripts::            Launch scripts in response to server events
+* rcsinfo::                     Templates for the log messages
+* cvsignore::                   Ignoring files via cvsignore
+* checkoutlist::                Adding your own administrative files
+* history file::                History information
+* Variables::                   Various variables are expanded
+* config::                      Miscellaneous CVS configuration
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden modules
address@hidden The modules file
address@hidden Modules (admin file)
address@hidden Defining modules (reference manual)
+
+The @file{modules} file records your definitions of
+names for collections of source code.  @sc{cvs} will
+use these definitions if you use @sc{cvs} to update the
+modules file (use normal commands like @code{add},
address@hidden, etc).
+
+The @file{modules} file may contain blank lines and
+comments (lines beginning with @samp{#}) as well as
+module definitions.  Long lines can be continued on the
+next line by specifying a backslash (@samp{\}) as the
+last character on the line.
+
+There are three basic types of modules: alias modules,
+regular modules, and ampersand modules.  The difference
+between them is the way that they map files in the
+repository to files in the working directory.  In all
+of the following examples, the top-level repository
+contains a directory called @file{first-dir}, which
+contains two files, @file{file1} and @file{file2}, and a
+directory @file{sdir}.  @file{first-dir/sdir} contains
+a file @file{sfile}.
+
address@hidden FIXME: should test all the examples in this section.
+
address@hidden
+* Alias modules::             The simplest kind of module
+* Regular modules::
+* Ampersand modules::
+* Excluding directories::     Excluding directories from a module
+* Module options::            Regular and ampersand modules can take options
+* Module program options::    How the modules ``program options'' programs
+                              are run. 
address@hidden menu
+
address@hidden Alias modules
address@hidden Alias modules
address@hidden Alias modules
address@hidden -a, in modules file
+
+Alias modules are the simplest kind of module:
+
address@hidden @code
address@hidden @var{mname} -a @address@hidden
+This represents the simplest way of defining a module
address@hidden  The @samp{-a} flags the definition as a
+simple alias: @sc{cvs} will treat any use of @var{mname} (as
+a command argument) as if the list of names
address@hidden had been specified instead.
address@hidden may contain either other module names or
+paths.  When you use paths in aliases, @code{checkout}
+creates all intermediate directories in the working
+directory, just as if the path had been specified
+explicitly in the @sc{cvs} arguments.
address@hidden table
+
+For example, if the modules file contains:
+
address@hidden
+amodule -a first-dir
address@hidden example
+
address@hidden
+then the following two commands are equivalent:
+
address@hidden
+$ cvs co amodule
+$ cvs co first-dir
address@hidden example
+
address@hidden
+and they each would provide output such as:
+
address@hidden
+cvs checkout: Updating first-dir
+U first-dir/file1
+U first-dir/file2
+cvs checkout: Updating first-dir/sdir
+U first-dir/sdir/sfile
address@hidden example
+
address@hidden Regular modules
address@hidden Regular modules
address@hidden Regular modules
+
address@hidden @code
address@hidden @var{mname} [ options ] @var{dir} [ @address@hidden ]
+In the simplest case, this form of module definition
+reduces to @address@hidden @var{dir}}.  This defines
+all the files in directory @var{dir} as module mname.
address@hidden is a relative path (from @code{$CVSROOT}) to a
+directory of source in the source repository.  In this
+case, on checkout, a single directory called
address@hidden is created as a working directory; no
+intermediate directory levels are used by default, even
+if @var{dir} was a path involving several directory
+levels.
address@hidden table
+
+For example, if a module is defined by:
+
address@hidden
+regmodule first-dir
address@hidden example
+
address@hidden
+then regmodule will contain the files from first-dir:
+
address@hidden
+$ cvs co regmodule
+cvs checkout: Updating regmodule
+U regmodule/file1
+U regmodule/file2
+cvs checkout: Updating regmodule/sdir
+U regmodule/sdir/sfile
+$
address@hidden example
+
+By explicitly specifying files in the module definition
+after @var{dir}, you can select particular files from
+directory @var{dir}.  Here is
+an example:
+
address@hidden
+regfiles first-dir/sdir sfile
address@hidden example
+
address@hidden
+With this definition, getting the regfiles module
+will create a single working directory
address@hidden containing the file listed, which
+comes from a directory deeper
+in the @sc{cvs} source repository:
+
address@hidden
+$ cvs co regfiles
+U regfiles/sfile
+$
address@hidden example
+
address@hidden Ampersand modules
address@hidden Ampersand modules
address@hidden Ampersand modules
address@hidden &, in modules file
+
+A module definition can refer to other modules by
+including @samp{&@var{module}} in its definition.
address@hidden
address@hidden [ options ] @var{&address@hidden
address@hidden example
+
+Then getting the module creates a subdirectory for each such
+module, in the directory containing the module.  For
+example, if modules contains
+
address@hidden
+ampermod &first-dir
address@hidden example
+
address@hidden
+then a checkout will create an @code{ampermod} directory
+which contains a directory called @code{first-dir},
+which in turns contains all the directories and files
+which live there.  For example, the command
+
address@hidden
+$ cvs co ampermod
address@hidden example
+
address@hidden
+will create the following files:
+
address@hidden
+ampermod/first-dir/file1
+ampermod/first-dir/file2
+ampermod/first-dir/sdir/sfile
address@hidden example
+
+There is one quirk/bug: the messages that @sc{cvs}
+prints omit the @file{ampermod}, and thus do not
+correctly display the location to which it is checking
+out the files:
+
address@hidden
+$ cvs co ampermod
+cvs checkout: Updating first-dir
+U first-dir/file1
+U first-dir/file2
+cvs checkout: Updating first-dir/sdir
+U first-dir/sdir/sfile
+$
address@hidden example
+
+Do not rely on this buggy behavior; it may get fixed in
+a future release of @sc{cvs}.
+
address@hidden FIXCVS: What happens if regular and & modules are
address@hidden combined, as in "ampermodule first-dir &second-dir"?
address@hidden When I tried it, it seemed to just ignore the
address@hidden "first-dir".  I think perhaps it should be an error
address@hidden (but this needs further investigation).
address@hidden In addition to discussing what each one does, we
address@hidden should put in a few words about why you would use one or
address@hidden the other in various situations.
+
address@hidden Excluding directories
address@hidden Excluding directories
address@hidden Excluding directories, in modules file
address@hidden !, in modules file
+
+An alias module may exclude particular directories from
+other modules by using an exclamation mark (@samp{!})
+before the name of each directory to be excluded.
+
+For example, if the modules file contains:
+
address@hidden
+exmodule -a !first-dir/sdir first-dir
address@hidden example
+
address@hidden
+then checking out the module @samp{exmodule} will check
+out everything in @samp{first-dir} except any files in
+the subdirectory @samp{first-dir/sdir}.
address@hidden Note that the "!first-dir/sdir" sometimes must be listed
address@hidden before "first-dir".  That seems like a probable bug, in which
address@hidden case perhaps it should be fixed (to allow either
address@hidden order) rather than documented.  See modules4 in testsuite.
+
address@hidden Module options
address@hidden Module options
address@hidden Options, in modules file
+
+Either regular modules or ampersand modules can contain
+options, which supply additional information concerning
+the module.
+
address@hidden @code
address@hidden -d, in modules file
address@hidden -d @var{name}
+Name the working directory something other than the
+module name.
address@hidden FIXME: Needs a bunch of examples, analogous to the
address@hidden examples for alias, regular, and ampersand modules
address@hidden which show where the files go without -d.
+
address@hidden Export program
address@hidden -e, in modules file
address@hidden -e @var{prog}
+Specify a program @var{prog} to run whenever files in a
+module are exported.  @var{prog} runs with a single
+argument, the module name.
address@hidden FIXME: Is it run on server? client?
+
address@hidden Checkout program
address@hidden -o, in modules file
address@hidden -o @var{prog}
+Specify a program @var{prog} to run whenever files in a
+module are checked out.  @var{prog} runs with a single
+argument, the module name.  See @ref{Module program options} for
+information on how @var{prog} is called.
address@hidden FIXME: Is it run on server? client?
+
address@hidden Status of a module
address@hidden Module status
address@hidden -s, in modules file
address@hidden -s @var{status}
+Assign a status to the module.  When the module file is
+printed with @samp{cvs checkout -s} the modules are
+sorted according to primarily module status, and
+secondarily according to the module name.  This option
+has no other meaning.  You can use this option for
+several things besides status: for instance, list the
+person that is responsible for this module.
+
address@hidden Tag program
address@hidden -t, in modules file
address@hidden -t @var{prog}
+Specify a program @var{prog} to run whenever files in a
+module are tagged with @code{rtag}.  @var{prog} runs
+with two arguments: the module name and the symbolic
+tag specified to @code{rtag}.  It is not run
+when @code{tag} is executed.  Generally you will find
+that the @file{taginfo} file is a better solution (@pxref{taginfo}).
address@hidden FIXME: Is it run on server? client?
address@hidden Problems with -t include:
address@hidden * It is run after the tag not before
address@hidden * It doesn't get passed all the information that
address@hidden   taginfo does ("mov", &c).
address@hidden * It only is run for rtag, not tag.
address@hidden table
+
+You should also see @pxref{Module program options} about how the
+``program options'' programs are run.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
+
address@hidden Module program options
address@hidden How the modules file ``program options'' programs are run
address@hidden Modules file program options
address@hidden -t, in modules file
address@hidden -o, in modules file
address@hidden -e, in modules file
+
address@hidden
+For checkout, rtag, and export, the program is server-based, and as such the
+following applies:-
+
+If using remote access methods (pserver, ext, etc.),
address@hidden will execute this program on the server from a temporary
+directory. The path is searched for this program.
+
+If using ``local access'' (on a local or remote NFS file system, i.e.
+repository set just to a path),
+the program will be executed from the newly checked-out tree, if
+found there, or alternatively searched for in the path if not.
+
+The programs are all run after the operation has effectively
+completed.
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Wrappers
address@hidden The cvswrappers file
address@hidden cvswrappers (admin file)
address@hidden CVSWRAPPERS, environment variable
address@hidden Wrappers
+
address@hidden FIXME: need some better way of separating this out
address@hidden by functionality.  -m is
address@hidden one feature, and -k is a another.  And this discussion
address@hidden should be better motivated (e.g. start with the
address@hidden problems, then explain how the feature solves it).
+
+Wrappers refers to a @sc{cvs} feature which lets you
+control certain settings based on the name of the file
+which is being operated on.  The settings are @samp{-k}
+for binary files, and @samp{-m} for nonmergeable text
+files.
+
+The @samp{-m} option
+specifies the merge methodology that should be used when
+a non-binary file is updated.  @code{MERGE} means the usual
address@hidden behavior: try to merge the files.  @code{COPY}
+means that @code{cvs update} will refuse to merge
+files, as it also does for files specified as binary
+with @samp{-kb} (but if the file is specified as
+binary, there is no need to specify @samp{-m 'COPY'}).
address@hidden will provide the user with the
+two versions of the files, and require the user using
+mechanisms outside @sc{cvs}, to insert any necessary
+changes.
+
address@hidden: do not use @code{COPY} with
address@hidden 1.9 or earlier - such versions of @sc{cvs} will
+copy one version of your file over the other, wiping
+out the previous contents.}
address@hidden Ordinarily we don't document the behavior of old
address@hidden versions.  But this one is so dangerous, I think we
address@hidden must.  I almost renamed it to -m 'NOMERGE' so we
address@hidden could say "never use -m 'COPY'".
+The @samp{-m} wrapper option only affects behavior when
+merging is done on update; it does not affect how files
+are stored.  See @ref{Binary files}, for more on
+binary files.
+
+The basic format of the file @file{cvswrappers} is:
+
address@hidden FIXME: @example is all wrong for this.  Use @deffn or
address@hidden something more sensible.
address@hidden
+wildcard     [option value][option value]...
+
+where option is one of
+-m           update methodology      value: MERGE or COPY
+-k           keyword expansion       value: expansion mode
+
+and value is a single-quote delimited value.
address@hidden example
+
address@hidden
address@hidden
+*.nib    -f 'unwrap %s' -t 'wrap %s %s' -m 'COPY'
+*.c      -t 'indent %s %s'
address@hidden example
address@hidden When does the filter need to be an absolute pathname
address@hidden and when will something like the above work?  I
address@hidden suspect it relates to the PATH of the server (which
address@hidden in turn depends on all kinds of stuff, e.g. inetd
address@hidden for pserver).  I'm not sure whether/where to discuss
address@hidden this.
address@hidden FIXME: What do the %s's stand for?
+
address@hidden
+The above example of a @file{cvswrappers} file
+states that all files/directories that end with a @code{.nib}
+should be filtered with the @file{wrap} program before
+checking the file into the repository. The file should
+be filtered though the @file{unwrap} program when the
+file is checked out of the repository. The
address@hidden file also states that a @code{COPY}
+methodology should be used when updating the files in
+the repository (that is, no merging should be performed).
+
address@hidden What pitfalls arise when using indent this way?  Is
address@hidden it a winning thing to do?  Would be nice to at least
address@hidden hint at those issues; we want our examples to tell
address@hidden how to solve problems, not just to say that cvs can
address@hidden do certain things.
+The last example line says that all files that end with
address@hidden should be filtered with @file{indent}
+before being checked into the repository. Unlike the previous
+example, no filtering of the @code{.c} file is done when
+it is checked out of the repository.
address@hidden
+The @code{-t} filter is called with two arguments,
+the first is the name of the file/directory to filter
+and the second is the pathname to where the resulting
+filtered file should be placed.
+
address@hidden
+The @code{-f} filter is called with one argument,
+which is the name of the file to filter from. The end
+result of this filter will be a file in the users directory
+that they can work on as they normally would.
+
+Note that the @samp{-t}/@samp{-f} features do not
+conveniently handle one portion of @sc{cvs}'s operation:
+determining when files are modified.  @sc{cvs} will still
+want a file (or directory) to exist, and it will use
+its modification time to determine whether a file is
+modified.  If @sc{cvs} erroneously thinks a file is
+unmodified (for example, a directory is unchanged but
+one of the files within it is changed), you can force
+it to check in the file anyway by specifying the
address@hidden option to @code{cvs commit} (@pxref{commit
+options}).
address@hidden This is, of course, a serious design flaw in -t/-f.
address@hidden Probably the whole functionality needs to be
address@hidden redesigned (starting from requirements) to fix this.
address@hidden ignore
+
address@hidden FIXME: We don't document -W or point to where it is
address@hidden documented.  Or .cvswrappers.
+For example, the following command imports a
+directory, treating files whose name ends in
address@hidden as binary:
+
address@hidden
+cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag
address@hidden example
+
address@hidden Another good example, would be storing files
address@hidden (e.g. binary files) compressed in the repository.
address@hidden  ::::::::::::::::::
address@hidden  cvswrappers
address@hidden  ::::::::::::::::::
address@hidden  *.t12 -m 'COPY'
address@hidden  *.t[0-9][0-9] -f 'gunzipcp %s' -t 'gzipcp %s %s' -m 'COPY'
address@hidden
address@hidden  ::::::::::::::::::
address@hidden  gunzipcp
address@hidden  ::::::::::::::::::
address@hidden  :
address@hidden  [ -f $1 ] || exit 1
address@hidden  zcat $1 > /tmp/.#$1.$$
address@hidden  mv /tmp/.#$1.$$ $1
address@hidden
address@hidden  ::::::::::::::::::
address@hidden  gzipcp
address@hidden  ::::::::::::::::::
address@hidden  :
address@hidden  DIRNAME=`echo $1 | sed -e "s|/.*/||g"`
address@hidden  if [ ! -d $DIRNAME ] ; then
address@hidden        DIRNAME=`echo $1 | sed -e "s|.*/||g"`
address@hidden  fi
address@hidden  gzip -c  $DIRNAME  > $2
address@hidden One catch--"cvs diff" will not invoke the wrappers
address@hidden (probably a CVS bug, although I haven't thought it out).
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Trigger Scripts
address@hidden The Trigger Scripts
address@hidden info files
address@hidden trigger scripts
address@hidden script hooks
+
address@hidden FIXME
address@hidden Somewhere there needs to be a more "how-to" guide to writing 
these.
address@hidden One particular issue that people sometimes are worried about is 
performance,
address@hidden and the impact of writing in perl or sh or ____.  Performance 
comparisons
address@hidden should probably remain outside the scope of this document, but 
at least
address@hidden _that_ much could be referenced, perhaps with links to other 
sources.
+
+Several of the administrative files support triggers, or the launching external
+scripts or programs at specific times before or after particular events, during
+the execution of @sc{cvs} commands.  These hooks can be used to prevent certain
+actions, log them, and/or maintain anything else you deem practical.
+
+All the trigger scripts are launched in a copy of the user sandbox being
+committed, on the server, in client-server mode.  In local mode, the scripts
+are actually launched directly from the user sandbox directory being committed.
+For most intents and purposes, the same scripts can be run in both locations
+without alteration.
+
address@hidden
+* syntax::                      The common syntax
+* Trigger Script Security::    Trigger script security
+
+* commit files::                The commit support files (commitinfo,
+                                verifymsg, loginfo)
+*   commitinfo::                Pre-commit checking
+*   verifymsg::                 How are log messages evaluated?
+*   loginfo::                   Where should log messages be sent?
+
+* postadmin::                  Logging admin commands
+* taginfo::                     Verifying/Logging tags
+* posttag::                     Logging tags
+* postwatch::                  Logging watch commands
+
+* preproxy::                   Launch a script on a secondary server prior
+                               to becoming a write proxy
+* postproxy::                  Launch a script on a secondary server after
+                               completing proxy operations
address@hidden menu
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden syntax
address@hidden The common syntax
address@hidden info files, common syntax
address@hidden script hooks, common syntax
address@hidden trigger script hooks, common syntax
address@hidden syntax of trigger script hooks
+
address@hidden FIXME: having this so totally separate from the
address@hidden Variables node is rather bogus.
+
+The administrative files such as @file{commitinfo},
address@hidden, @file{rcsinfo}, @file{verifymsg}, etc.,
+all have a common format.  The purpose of the files are
+described later on.  The common syntax is described
+here.
+
address@hidden Regular expression syntax
+Each line contains the following:
+
address@hidden @bullet
address@hidden @samp{ALL} keyword, in lieu of regular expressions in script 
hooks
address@hidden @samp{DEFAULT} keyword, in lieu of regular expressions in script 
hooks
address@hidden
+A regular expression or the literal string @samp{DEFAULT}.  Some script hooks
+also support the literal string @samp{ALL}.  Other than the @samp{ALL} and
address@hidden keywords, this is a basic regular expression in the syntax used
+by GNU emacs.  See the descriptions of the individual script hooks for
+information on whether the @samp{ALL} keyword is supported
+(@pxref{Trigger Scripts}).
address@hidden FIXME: What we probably should be saying is "POSIX Basic
address@hidden Regular Expression with the following extensions (`\('
address@hidden `\|' '+' etc)"
address@hidden rather than define it with reference to emacs.
address@hidden The reference to emacs is not strictly speaking
address@hidden true, as we don't support \=, \s, or \S.  Also it isn't
address@hidden clear we should document and/or promise to continue to
address@hidden support all the obscure emacs extensions like \<.
address@hidden Also need to better cite (or include) full
address@hidden documentation for the syntax.
address@hidden Also see comment in configure.in about what happens to the
address@hidden syntax if we pick up a system-supplied regexp matcher.
+
address@hidden
+A whitespace separator---one or more spaces and/or tabs.
+
address@hidden
+A file name or command-line template.
address@hidden itemize
+
address@hidden
+Blank lines are ignored.  Lines that start with the
+character @samp{#} are treated as comments.  Long lines
+unfortunately can @emph{not} be broken in two parts in
+any way.
+
+The first regular expression that matches the current
+directory name in the repository or the first line containing @samp{DEFAULT}
+in lieu of a regular expression is used and all lines containing @samp{ALL} is
+used for the hooks which support the @samp{ALL} keyword.  The rest of the line
+is used as a file name or command-line template as appropriate.  See the
+descriptions of the individual script hooks for information on whether the
address@hidden keyword is supported (@pxref{Trigger Scripts}).
+
address@hidden format strings
address@hidden format strings, common syntax
address@hidden info files, common syntax, format strings
address@hidden Common syntax of info files, format strings
address@hidden
address@hidden:  The following information on format strings is valid
+as long as the line @code{UseNewInfoFmtStrings=yes} appears in
+your repository's config file (@pxref{config}).  Otherwise,
+default format strings may be appended to the command line and
+the @samp{loginfo} file, especially, can exhibit slightly
+different behavior.  For more information,
address@hidden Commit Files}.}
+
+In the cases where the second segment of the matched line is a
+command line template (e.g. @file{commitinfo}, @file{loginfo},
+& @file{verifymsg}), the command line template may contain format
+strings which will be replaced with specific values before the
+script is run.
address@hidden FIXCVS then FIXME - it really would make sense to allow %r & 
maybe even %p
address@hidden to be used in rcsinfo to construct a path, but I haven't
address@hidden coded this yet.
+
+Format strings can represent a single variable or one or more
+attributes of a list variable.  An example of a list variable
+would be the list available to scripts hung on the loginfo hooks
+- the list of files which were just committed.  In the case of
+loginfo, three attributes are available for each list item: file
+name, precommit version, and postcommit version.
+
+Format strings consist of a @samp{%} character followed by an optional
address@hidden@{} (required in the multiple list attribute case), a
+single format character representing a variable or a single attribute of
+list elements or multiple format characters representing attributes of
+list elements, and a closing @address@hidden when the open bracket was present.
+
address@hidden format strings}, or single format characters which get replaced
+with a single value, will generate a single argument
+to the called script, regardless of whether the replacement variable contains
+white space or other special characters.
+
address@hidden attributes} will generate an argument for each attribute
+requested for each list item.  For example, @address@hidden@}}
+in a @file{loginfo} command template will generate three
+arguments (file name, precommit version, postcommit version,
+...) for each file committed.  As in the flat format string
+case, each attribute will be passed in as a single argument
+regardless of whether it contains white space or other
+special characters.
+ 
address@hidden will be replaced with a literal @samp{%}.
+
+The format strings available to all script hooks are:
+
address@hidden @t
address@hidden c
+The canonical name of the command being executed.  For instance, in the case of
+a hook run from @code{cvs up}, @sc{cvs} would replace @samp{%c} with the string
address@hidden and, in the case of a hook run from @code{cvs ci}, @sc{cvs} would
+replace @samp{%c} with the string @samp{commit}.
address@hidden n
+The null, or empty, string.
address@hidden p
+The name of the directory being operated on within the repository.
address@hidden r
+The name of the repository (the path portion of @code{$CVSROOT}).
address@hidden R
+On a server, the name of the referrer, if any.  The referrer is the CVSROOT the
+client reports it used to contact a server which then referred it to this
+server.  Should usually be set on a primary server with a write proxy setup.
address@hidden table
+
+Other format strings are file specific.  See the docs on the
+particular script hooks for more information
+(@pxref{Trigger Scripts}).
+
+As an example, the following line in a @file{loginfo} file would
+match only the directory @file{module} and any subdirectories of
address@hidden:
+
address@hidden
+^module\(/\|$\) (echo; echo %p; echo address@hidden@}; cat) 
>>$CVSROOT/CVSROOT/commitlog
address@hidden example
+
+Using this same line and assuming a commit of new revisions
+1.5.4.4 and 1.27.4.1 based on old revisions 1.5.4.3 and 1.27,
+respectively, of file1 and file2 in module, something like the
+following log message should be appended to commitlog:
+
address@hidden
+
+module
+file1 1.5.4.3 1.5.4.4 file2 1.27 1.27.4.1
+Update of /cvsroot/module
+In directory localhost.localdomain:/home/jrandom/work/module
+
+Modified Files:
+       file1 file2
+Log Message:
+A log message.
address@hidden example
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden Trigger Script Security
address@hidden Security and the Trigger Scripts
address@hidden info files, security
address@hidden script hooks, security
address@hidden trigger scripts, security
+
+Security is a huge subject, and implementing a secure system is a non-trivial
+task.  This section will barely touch on all the issues involved, but it is
+well to note that, as with any script you will be allowing an untrusted
+user to run on your server, there are measures you can take to help prevent
+your trigger scripts from being abused.
+
+For instance, since the CVS trigger scripts all run in a copy of the user's
+sandbox on the server, a naively coded Perl trigger script which attempts to
+use a Perl module that is not installed on the system can be hijacked by any
+user with commit access who is checking in a file with the correct name.  Other
+scripting languages may be vulnerable to similar hacks.
+
+One way to make a script more secure, at least with Perl, is to use scripts
+which invoke the @code{-T}, or "taint-check" switch on their @code{#!} line.
+In the most basic terms, this causes Perl to avoid running code that may have
+come from an external source.  Please run the @code{perldoc perlsec} command
+for more on Perl security.  Again, other languages may implement other security
+verification hooks which look more or less like Perl's "taint-check" mechanism.
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden commit files
address@hidden The commit support files
address@hidden Commits, administrative support files
address@hidden commit files, see Info files
+
+The @samp{-i} flag in the @file{modules} file can be
+used to run a certain program whenever files are
+committed (@pxref{modules}).  The files described in
+this section provide other, more flexible, ways to run
+programs whenever something is committed.
+
+There are three kinds of programs that can be run on
+commit.  They are specified in files in the repository,
+as described below.  The following table summarizes the
+file names and the purpose of the corresponding
+programs.
+
address@hidden @file
address@hidden commitinfo
+The program is responsible for checking that the commit
+is allowed.  If it exits with a non-zero exit status
+the commit will be aborted.  @xref{commitinfo}.
+
address@hidden verifymsg
+The specified program is used to evaluate the log message,
+and possibly verify that it contains all required
+fields.  This is most useful in combination with the
address@hidden file, which can hold a log message
+template (@pxref{rcsinfo}).  @xref{verifymsg}.
+
address@hidden loginfo
+The specified program is called when the commit is
+complete.  It receives the log message and some
+additional information and can store the log message in
+a file, or mail it to appropriate persons, or maybe
+post it to a local newsgroup, address@hidden  Your
+imagination is the limit!  @xref{loginfo}.
address@hidden table
+
address@hidden
+* Updating Commit Files::       Updating legacy repositories to stop using
+                                deprecated command line template formats
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden Updating Commit Files
address@hidden  Updating legacy repositories to stop using deprecated command 
line template formats
address@hidden info files, common syntax, updating legacy repositories
address@hidden Syntax of info files, updating legacy repositories
address@hidden Common syntax of info files, updating legacy repositories
+New repositories are created set to use the new format strings by default, so
+if you are creating a new repository, you shouldn't have to worry about this
+section.
+
+If you are attempting to maintain a legacy repository which was
+making use of the @file{commitinfo}, @file{editinfo}, @file{verifymsg},
address@hidden, and/or @file{taginfo} script hooks, you should have no
+immediate problems with using the current @sc{cvs} executable, but your users
+will probably start to see deprecation warnings.
+
+The reason for this is that all of the script hooks have been updated to
+use a new command line parser that extensibly supports multiple
address@hidden & @file{notify} style format strings (@pxref{syntax})
+and this support is not completely compatible with the old style format
+strings.
+
+The quick upgrade method is to stick a @samp{1} after each format string
+in your old @file{loginfo} file.  For example:
+
address@hidden
+DEFAULT (echo ""; id; echo address@hidden@}; date; cat) >> 
$CVSROOT/CVSROOT/commitlog
address@hidden example
+
+would become:
+
address@hidden
+DEFAULT (echo ""; id; echo address@hidden@}; date; cat) >> 
$CVSROOT/CVSROOT/commitlog
address@hidden example
+
+If you were counting on the fact that only the first @samp{%} in the line was
+replaced as a format string, you may also have to double up any further
+percent signs on the line.
+
+If you did this all at once and checked it in, everything should still be
+running properly.
+
+Now add the following line to your config file (@pxref{config}):
address@hidden
+UseNewInfoFmtStrings=yes
address@hidden example
+
+Everything should still be running properly, but your users will probably
+start seeing new deprecation warnings.
+  
+Dealing with the deprecation warnings now generated by @file{commitinfo},
address@hidden, @file{verifymsg}, and @file{taginfo} should be easy.  Simply
+specify what are currently implicit arguments explicitly.  This means appending
+the following strings to each active command line template in each file:
address@hidden @code
address@hidden commitinfo
address@hidden %r/%p %s}
address@hidden editinfo
address@hidden %l}
address@hidden taginfo
address@hidden %t %o %p address@hidden@}}
address@hidden verifymsg
address@hidden %l}
address@hidden table
+
+If you don't desire that any of the newly available information be passed to
+the scripts hanging off of these hooks, no further modifications to these
+files should be necessary to insure current and future compatibility with
address@hidden's format strings.
+
+Fixing @file{loginfo} could be a little tougher.  The old style
address@hidden format strings caused a single space and comma separated
+argument to be passed in in place of the format string.  This is what will
+continue to be generated due to the deprecated @samp{1} you inserted into
+the format strings.
+
+Since the new format separates each individual item and passes it into the
+script as a separate argument (for a good reason - arguments containing commas
+and/or white space are now parsable), to remove the deprecated @samp{1} from
+your @file{loginfo} command line templates, you will most likely have to
+rewrite any scripts called by the hook to handle the new argument format.
+
+Also note that the way @samp{%} followed by unrecognized characters and by
address@hidden@address@hidden was treated in past versions of CVS is not 
strictly adhered to as
+there were bugs in the old versions.  Specifically, @address@hidden@}} would 
eat the
+next character and unrecognized strings resolved only to the empty string,
+which was counter to what was stated in the documentation.  This version will
+do what the documentation said it should have (if you were using only some
+combination of @address@hidden@}}, e.g. @address@hidden@}}, 
@address@hidden@}}, or
address@hidden, you should have no troubles).
+
+On the bright side, you should have plenty of time to do this before all
+support for the old format strings is removed from @sc{cvs}, so you can just
+put up with the deprecation warnings for awhile if you like.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden commitinfo
address@hidden Commitinfo
address@hidden @file{commitinfo}
address@hidden Commits, precommit verification of
address@hidden commitinfo (admin file)
address@hidden info files, commitinfo
address@hidden script hooks, commitinfo
address@hidden trigger scripts, commitinfo
address@hidden info files, precommit verification of commits
address@hidden script hooks, precommit verification of commits
address@hidden trigger scripts, precommit verification of commits
+
+The @file{commitinfo} file defines programs to execute
+whenever @samp{cvs commit} is about to execute.  These
+programs are used for pre-commit checking to verify
+that the modified, added and removed files are really
+ready to be committed.  This could be used, for
+instance, to verify that the changed files conform to
+to your site's standards for coding practice.
+
+The @file{commitinfo} file has the standard form for script hooks
+(@pxref{Trigger Scripts}), where each line is a regular expression followed by
+a command to execute.  It supports only the DEFAULT keywords.
+
address@hidden format strings, commitinfo admin file
+In addition to the common format strings (@pxref{syntax}),
address@hidden supports:
+
address@hidden @t
address@hidden @address@hidden
+a list of the names of files to be committed
address@hidden table
+
address@hidden commitinfo (admin file), updating legacy repositories
address@hidden compatibility notes, commitinfo admin file
+Currently, if no format strings are specified, a default
+string of @samp{ %r/%p address@hidden@}} will be appended to the command
+line template before replacement is performed, but this
+feature is deprecated.  It is simply in place so that legacy
+repositories will remain compatible with the new @sc{cvs} application.
+For information on updating, @pxref{Updating Commit Files}.
+
address@hidden Exit status, of commitinfo
address@hidden commitinfo (admin file), exit status
+The first line with a regular expression matching the
+directory within the repository will be used.  If the
+command returns a non-zero exit status the commit will
+be aborted.
address@hidden FIXME: need example(s) of what "directory within the
address@hidden repository" means.
+
address@hidden @file{commitinfo}, working directory
address@hidden @file{commitinfo}, command environment
+The command will be run in the root of the workspace
+containing the new versions of any files the user would like
+to modify (commit), @emph{or in a copy of the workspace on
+the server (@pxref{Remote repositories})}.  If a file is
+being removed, there will be no copy of the file under the
+current directory.  If a file is being added, there will be
+no corresponding archive file in the repository unless the
+file is being resurrected.
+
+Note that both the repository directory and the corresponding
+Attic (@pxref{Attic}) directory may need to be checked to
+locate the archive file corresponding to any given file being
+committed.  Much of the information about the specific commit
+request being made, including the destination branch, commit
+message, and command line options specified, is not available
+to the command.
+
address@hidden FIXME: should discuss using commitinfo to control
address@hidden who has checkin access to what (e.g. Joe can check into
address@hidden directories a, b, and c, and Mary can check into
address@hidden directories b, c, and d--note this case cannot be
address@hidden conveniently handled with unix groups).  Of course,
address@hidden adding a new set of features to CVS might be a more
address@hidden natural way to fix this problem than telling people to
address@hidden use commitinfo.
address@hidden FIXME: Should make some reference, especially in
address@hidden the context of controlling who has access, to the fact
address@hidden that commitinfo can be circumvented.  Perhaps
address@hidden mention SETXID (but has it been carefully examined
address@hidden for holes?).  This fits in with the discussion of
address@hidden general CVS security in "Password authentication
address@hidden security" (the bit which is not pserver-specific).
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden verifymsg
address@hidden Verifying log messages
address@hidden @file{verifymsg} (admin file)
address@hidden Log message, verifying
address@hidden logging, commits
+
+Once you have entered a log message, you can evaluate
+that message to check for specific content, such as
+a bug ID.  Use the @file{verifymsg} file to
+specify a program that is used to verify the log message.
+This program could be a simple script that checks
+that the entered message contains the required fields.
+
+The @file{verifymsg} file is often most useful together
+with the @file{rcsinfo} file, which can be used to
+specify a log message template (@pxref{rcsinfo}).
+
+The @file{verifymsg} file has the standard form for script hooks
+(@pxref{Trigger Scripts}), where each line is a regular expression followed by
+a command to execute.  It supports only the DEFAULT keywords.
+
address@hidden format strings, verifymsg admin file
+In addition to the common format strings (@pxref{syntax}),
address@hidden supports:
+
address@hidden @t
address@hidden l
+the full path to the file containing the log message to be verified
address@hidden @address@hidden
+File attributes, where:
address@hidden @t
address@hidden s
+file name
address@hidden V
+old version number (pre-checkin)
address@hidden table
address@hidden table
+
address@hidden verifymsg (admin/commit file), updating legacy repositories
address@hidden compatibility notes, verifymsg admin file
+Currently, if no format strings are specified, a default
+string of @samp{ %l} will be appended to the command
+line template before replacement is performed, but this
+feature is deprecated.  It is simply in place so that legacy
+repositories will remain compatible with the new @sc{cvs} application.
+For information on updating, @pxref{Updating Commit Files}.
+
+One thing that should be noted is that the @samp{ALL}
+keyword is not supported.  If more than one matching
+line is found, the first one is used.  This can be
+useful for specifying a default verification script in a
+directory, and then overriding it in a subdirectory.
+
address@hidden Exit status, of @file{verifymsg}
+If the verification script exits with a non-zero exit status,
+the commit is aborted.
+
address@hidden @file{verifymsg}, changing the log message
+In the default configuration, CVS allows the
+verification script to change the log message. This is
+controlled via the RereadLogAfterVerify CVSROOT/config
+option.
+
+When @samp{RereadLogAfterVerify=always} or
address@hidden, the log message will
+either always be reread after the verification script
+is run or reread only if the log message file status
+has changed.
+
address@hidden, for more on CVSROOT/config options.
+
+It is NOT a good idea for a @file{verifymsg} script to
+interact directly with the user in the various
+client/server methods. For the @code{pserver} method,
+there is no protocol support for communicating between
address@hidden and the client on the remote end. For the
address@hidden and @code{server} methods, it is possible
+for CVS to become confused by the characters going
+along the same channel as the CVS protocol
+messages. See @ref{Remote repositories}, for more
+information on client/server setups.  In addition, at the time
+the @file{verifymsg} script runs, the CVS
+server has locks in place in the repository.  If control is
+returned to the user here then other users may be stuck waiting
+for access to the repository.
+
+This option can be useful if you find yourself using an
+rcstemplate that needs to be modified to remove empty
+elements or to fill in default values.  It can also be
+useful if the rcstemplate has changed in the repository
+and the CVS/Template was not updated, but is able to be
+adapted to the new format by the verification script
+that is run by @file{verifymsg}.
+
+An example of an update might be to change all
+occurrences of 'BugId:' to be 'DefectId:' (which can be
+useful if the rcstemplate has recently been changed and
+there are still checked-out user trees with cached
+copies in the CVS/Template file of the older version).
+
+Another example of an update might be to delete a line
+that contains 'BugID: none' from the log message after
+validation of that value as being allowed is made.
+
address@hidden
+* verifymsg example::            Verifymsg example
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden verifymsg example
address@hidden Verifying log messages
address@hidden verifymsg, example
+The following is a little silly example of a
address@hidden file, together with the corresponding
address@hidden file, the log message template and a
+verification script.  We begin with the log message template.
+We want to always record a bug-id number on the first
+line of the log message.  The rest of log message is
+free text.  The following template is found in the file
address@hidden/usr/cvssupport/tc.template}.
+
address@hidden
+BugId:
address@hidden example
+
+The script @file{/usr/cvssupport/bugid.verify} is used to
+evaluate the log message.
+
address@hidden
+#!/bin/sh
+#
+#       bugid.verify filename
+#
+#  Verify that the log message contains a valid bugid
+#  on the first line.
+#
+if sed 1q < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
+    exit 0
+elif sed 1q < $1 | grep '^BugId:[ ]*none$' > /dev/null; then
+    # It is okay to allow commits with 'BugId: none',
+    # but do not put that text into the real log message.
+    grep -v '^BugId:[ ]*none$' > $1.rewrite
+    mv $1.rewrite $1
+    exit 0
+else
+    echo "No BugId found."
+    exit 1
+fi
address@hidden example
+
+The @file{verifymsg} file contains this line:
+
address@hidden
+^tc     /usr/cvssupport/bugid.verify %l
address@hidden example
+
+The @file{rcsinfo} file contains this line:
+
address@hidden
+^tc     /usr/cvssupport/tc.template
address@hidden example
+
+The @file{config} file contains this line:
+
address@hidden
+RereadLogAfterVerify=always
address@hidden example
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden loginfo
address@hidden Loginfo
address@hidden loginfo (admin file)
address@hidden logging, commits
address@hidden Storing log messages
address@hidden Mailing log messages
address@hidden Distributing log messages
address@hidden Log messages
+
+The @file{loginfo} file is used to control where log information is sent after
+versioned changes are made to repository archive files and after directories
+are added to the repository.  @ref{posttag} for how to log tagging
+information and @ref{postadmin} for how to log changes due to the @code{admin}
+command.
+
+The @file{loginfo} file has the standard form for script hooks
+(@pxref{Trigger Scripts}), where each line is a regular expression followed by
+a command to execute.  It supports the ALL and DEFAULT keywords.
+
+Any specified scripts are called:
+
address@hidden @code
address@hidden commit
+Once per directory, immediately after a successfully completing the commit of
+all files within that directory.
address@hidden import
+Once per import, immediately after completion of all write operations.
address@hidden add
+Immediately after the successful @code{add} of a directory.
address@hidden table
+
+Any script called via @file{loginfo} will be fed the log information on its
+standard input.  Note that the filter program @strong{must} read @strong{all}
+of the log information from its standard input or @sc{cvs} may fail with a
+broken pipe signal.
+
address@hidden format strings, loginfo admin file
+In addition to the common format strings (@pxref{syntax}),
address@hidden supports:
+
address@hidden @t
address@hidden @address@hidden
+File attributes, where:
address@hidden @t
address@hidden s
+file name
address@hidden T
+tag name of destination, or the empty string when there is no associated
+tag name (this usually means the trunk)
address@hidden V
+old version number (pre-checkin)
address@hidden v
+new version number (post-checkin)
address@hidden table
address@hidden table
+
+For example, some valid format strings are @samp{%%},
address@hidden, @address@hidden@}}, and @address@hidden@}}.
+
address@hidden loginfo (admin file), updating legacy repositories
address@hidden compatibility notes, loginfo admin file
+Currently, if @samp{UseNewInfoFmtStrings} is not set in the @file{config}
+administration file (@pxref{config}), the format strings will be substituted
+as they were in past versions of @sc{cvs}, but this feature is deprecated.
+It is simply in place so that legacy repositories will remain compatible with
+the new @sc{cvs} application.  For information on updating,
+please see @ref{Updating Commit Files}.
+
+As an example, if @samp{/u/src/master/yoyodyne/tc} is the repository, @samp{%p}
+and @address@hidden@}} are the format strings, and three files (@t{ChangeLog},
address@hidden, @t{foo.c}) were modified, the output might be:
+
address@hidden
+yoyodyne/tc ChangeLog 1.1 1.2 Makefile 1.3 1.4 foo.c 1.12 1.13
address@hidden example
+
+Note: when @sc{cvs} is accessing a remote repository,
address@hidden will be run on the @emph{remote}
+(i.e., server) side, not the client side (@pxref{Remote
+repositories}).
+
address@hidden
+* loginfo example::                          Loginfo example
+* Keeping a checked out copy::               Updating a tree on every checkin
address@hidden menu
+
address@hidden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
. .
address@hidden loginfo example
address@hidden Loginfo example
+
+The following @file{loginfo} file, together with the
+tiny shell-script below, appends all log messages
+to the file @file{$CVSROOT/CVSROOT/commitlog},
+and any commits to the administrative files (inside
+the @file{CVSROOT} directory) are also logged in
address@hidden/usr/adm/cvsroot-log}.
+Commits to the @file{prog1} directory are mailed to @t{ceder}.
+
address@hidden FIXME: is it a CVS feature or bug that only the
address@hidden first matching line is used?  It is documented
address@hidden above, but is it useful?  For example, if we wanted
address@hidden to run both "cvs-log" and "Mail" for the CVSROOT
address@hidden directory, it is kind of awkward if
address@hidden only the first matching line is used.
address@hidden
+ALL                     /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
+^CVSROOT\(/\|$\)        /usr/local/bin/cvs-log /usr/adm/cvsroot-log $USER
+^prog1\(/\|$\)          Mail -s "%p %s" ceder
address@hidden example
+
+The shell-script @file{/usr/local/bin/cvs-log} looks
+like this:
+
address@hidden
+#!/bin/sh
+(echo "------------------------------------------------------";
+ echo -n "$2  ";
+ date;
+ echo;
+ cat) >> $1
address@hidden example
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden Keeping a checked out copy
address@hidden Keeping a checked out copy
+
address@hidden What other index entries?  It seems like
address@hidden people might want to use a lot of different
address@hidden words for this functionality.
address@hidden Keeping a checked out copy
address@hidden Checked out copy, keeping
address@hidden Web pages, maintaining with CVS
+
+It is often useful to maintain a directory tree which
+contains files which correspond to the latest version
+in the repository.  For example, other developers might
+want to refer to the latest sources without having to
+check them out, or you might be maintaining a web site
+with @sc{cvs} and want every checkin to cause the files
+used by the web server to be updated.
address@hidden Can we offer more details on the web example?  Or
address@hidden point the user at how to figure it out?  This text
address@hidden strikes me as sufficient for someone who already has
address@hidden some idea of what we mean but not enough for the naive
address@hidden user/sysadmin to understand it and set it up.
+
+The way to do this is by having loginfo invoke
address@hidden update}.  Doing so in the naive way will
+cause a problem with locks, so the @code{cvs update}
+must be run in the background.
address@hidden Should we try to describe the problem with locks?
address@hidden It seems like a digression for someone who just
address@hidden wants to know how to make it work.
address@hidden Another choice which might work for a single file
address@hidden is to use "cvs -n update -p" which doesn't take
address@hidden out locks (I think) but I don't see many advantages
address@hidden of that and we might as well document something which
address@hidden works for multiple files.
+Here is an example for unix (this should all be on one line):
+
address@hidden
+^cyclic-pages\(/\|$\)  (date; cat; (sleep 2; cd /u/www/local-docs;
+ cvs -q update -d) &) >> $CVSROOT/CVSROOT/updatelog 2>&1
address@hidden example
+
+This will cause checkins to repository directory @code{cyclic-pages}
+and its subdirectories to update the checked
+out tree in @file{/u/www/local-docs}.
address@hidden More info on some of the details?  The "sleep 2" is
address@hidden so if we are lucky the lock will be gone by the time
address@hidden we start and we can wait 2 seconds instead of 30.
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden postadmin
address@hidden Logging admin commands
address@hidden postadmin (admin file)
address@hidden script hook, postadmin
address@hidden Admin commands, logging
+
+The @file{postadmin} file defines programs to execute after an @code{admin}
+command modifies files.  The @file{postadmin} file has the standard form
+for script hooks (@pxref{Trigger Scripts}), where each line is a regular
+expression followed by a command to execute.  It supports the ALL and DEFAULT
+keywords.
+
address@hidden format strings, postadmin admin file
+The @file{postadmin} file supports no format strings other than the common
+ones (@pxref{syntax}),
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden taginfo
address@hidden Taginfo
address@hidden taginfo (admin file)
address@hidden script hook, taginfo
address@hidden Tags, logging
address@hidden Tags, verifying
+The @file{taginfo} file defines programs to execute
+when someone executes a @code{tag} or @code{rtag}
+command.  The @file{taginfo} file has the standard form
+for script hooks (@pxref{Trigger Scripts}), where each line
+is a regular expression followed by a command to execute.
+It supports the ALL and DEFAULT keywords.
+
address@hidden format strings, taginfo admin file
+In addition to the common format strings (@pxref{syntax}),
address@hidden supports:
+
address@hidden @t
address@hidden b
+tag type (@code{T} for branch, @code{N} for not-branch, or @code{?} for
+unknown, as during delete operations)
address@hidden o
+operation (@code{add} for @code{tag}, @code{mov} for @code{tag -F}, or
address@hidden for @code{tag -d})
address@hidden t
+new tag name
address@hidden @address@hidden
+file attributes, where:
address@hidden @t
address@hidden s
+file name
address@hidden T
+tag name of destination, or the empty string when there is no associated
+tag name (this usually means the trunk)
address@hidden V
+old version number (for a move or delete operation)
address@hidden v
+new version number (for an add or move operation)
address@hidden table
address@hidden table
+
+For example, some valid format strings are @samp{%%}, @samp{%p}, @samp{%t},
address@hidden, @address@hidden@}}, and @address@hidden@}}.
+
address@hidden taginfo (admin file), updating legacy repositories
address@hidden compatibility notes, taginfo admin file
+Currently, if no format strings are specified, a default
+string of @samp{ %t %o %p address@hidden@}} will be appended to the command
+line template before replacement is performed, but this
+feature is deprecated.  It is simply in place so that legacy
+repositories will remain compatible with the new @sc{cvs} application.
+For information on updating, @pxref{Updating Commit Files}.
+
address@hidden Exit status, of taginfo admin file
address@hidden taginfo (admin file), exit status
+A non-zero exit of the filter program will cause the tag to be
+aborted.
+
+Here is an example of using @file{taginfo} to log @code{tag} and @code{rtag}
+commands.  In the @file{taginfo} file put:
+
address@hidden
+ALL /usr/local/cvsroot/CVSROOT/loggit %t %b %o %p address@hidden@}
address@hidden example
+
address@hidden
+Where @file{/usr/local/cvsroot/CVSROOT/loggit} contains the
+following script:
+
address@hidden
+#!/bin/sh
+echo "$@@" >>/home/kingdon/cvsroot/CVSROOT/taglog
address@hidden example
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden posttag
address@hidden Logging tags
address@hidden posttag (admin file)
address@hidden script hook, posttag
address@hidden Tags, logging
+
+The @file{posttag} file defines programs to execute after a @code{tag} or
address@hidden command modifies files.  The @file{posttag} file has the standard
+form for script hooks (@pxref{Trigger Scripts}), where each line is a regular
+expression followed by a command to execute.  It supports the ALL and DEFAULT
+keywords.
+
address@hidden format strings, posttag admin file
+The @file{posttag} admin file supports the same format strings as the
address@hidden file (@pxref{taginfo}),
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden postwatch
address@hidden Logging watch commands
address@hidden postwatch (admin file)
address@hidden script hook, postwatch
address@hidden Watch family of commands, logging
+
+The @file{postwatch} file defines programs to execute after any command (for
+instance, @code{watch}, @code{edit}, @code{unedit}, or @code{commit}) modifies
+any @file{CVS/fileattr} file in the repository (@pxref{Watches}).  The
address@hidden file has the standard form for script hooks
+(@pxref{Trigger Scripts}), where each line is a regular expression followed by
+a command to execute.  It supports the ALL and DEFAULT keywords.
+
address@hidden format strings, postwatch admin file
+The @file{postwatch} file supports no format strings other than the common
+ones (@pxref{syntax}), but it is worth noting that the @code{%c} format string
+may not be replaced as you might expect.  Client runs of @code{edit} and
address@hidden can sometimes skip contacting the @sc{cvs} server and cache the
+notification of the file attribute change to be sent the next time the client
+contacts the server for whatever other reason,
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden preproxy
address@hidden Launch a Script before Proxying
address@hidden preproxy (admin file)
address@hidden script hook, preproxy
address@hidden Write proxy, verifying
address@hidden Write proxy, logging
+
+The @file{preproxy} file defines programs to execute after a secondary
+server receives a write request from a client, just before it starts up the
+primary server and becomes a write proxy.  This hook could be used to
+dial a modem, launch an SSH tunnel, establish a VPN, or anything else that
+might be necessary to do before contacting the primary server.
+
address@hidden scripts are called once, at the time of the write request, with
+the repository argument (if requested) set from the topmost directory sent by
+the client.
+
+The @file{preproxy} file has the standard form
+for script hooks (@pxref{Trigger Scripts}), where each line is a regular
+expression followed by a command to execute.  It supports the ALL and DEFAULT
+keywords.
+
address@hidden format strings, preproxy admin file
+In addition to the common format strings, the @file{preproxy} file supports the
+following format string:
+
address@hidden @t
address@hidden P
+the CVSROOT string which specifies the primary server
address@hidden table
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden postproxy
address@hidden Launch a Script after Proxying
address@hidden postproxy (admin file)
address@hidden script hook, postproxy
address@hidden Write proxy, logging
address@hidden Write proxy, pull updates
address@hidden secondary server, pull updates
+
+The @file{postproxy} file defines programs to execute after a secondary
+server notes that the connection to the primary server has shut down and before
+it releases the client by shutting down the connection to the client.
+This could hook could be used to
+disconnect a modem, an SSH tunnel, a VPN, or anything else that
+might be necessary to do after contacting the primary server.  This hook should
+also be used to pull updates from the primary server before allowing the client
+which did the write to disconnect since otherwise the client's next read
+request may generate error messages and fail upon encountering an out of date
+repository on the secondary server.
+
address@hidden scripts are called once per directory.
+
+The @file{postproxy} file has the standard form
+for script hooks (@pxref{Trigger Scripts}), where each line is a regular
+expression followed by a command to execute.  It supports the ALL and DEFAULT
+keywords.
+
address@hidden format strings, postproxy admin file
+In addition to the common format strings, the @file{postproxy} file supports
+the following format string:
+
address@hidden @t
address@hidden P
+the CVSROOT string which specifies the primary server
address@hidden table
+
+
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden rcsinfo
address@hidden Rcsinfo
address@hidden rcsinfo (admin file)
address@hidden Form for log message
address@hidden Log message template
address@hidden Template for log message
address@hidden logging, commits
+
+The @file{rcsinfo} file can be used to specify a form to
+edit when filling out the commit log.  The
address@hidden file has a syntax similar to the
address@hidden, @file{commitinfo} and @file{loginfo}
+files.  @xref{syntax}.  Unlike the other files the second
+part is @emph{not} a command-line template.  Instead,
+the part after the regular expression should be a full pathname to
+a file containing the log message template.
+
+If the repository name does not match any of the
+regular expressions in this file, the @samp{DEFAULT}
+line is used, if it is specified.
+
+All occurrences of the name @samp{ALL} appearing as a
+regular expression are used in addition to the first
+matching regular expression or @samp{DEFAULT}.
+
address@hidden FIXME: should be offering advice, somewhere around
address@hidden here, about where to put the template file.  The
address@hidden verifymsg example uses /usr/cvssupport but doesn't
address@hidden say anything about what that directory is for or
address@hidden whether it is hardwired into CVS or who creates
address@hidden it or anything.  In particular we should say
address@hidden how to version control the template file.  A
address@hidden probably better answer than the /usr/cvssupport
address@hidden stuff is to use checkoutlist (with xref to the
address@hidden checkoutlist doc).
address@hidden Also I am starting to see a connection between
address@hidden this and the Keeping a checked out copy node.
address@hidden Probably want to say something about that.
+The log message template will be used as a default log
+message.  If you specify a log message with @samp{cvs
+commit -m @var{message}} or @samp{cvs commit -f
address@hidden that log message will override the
+template.
+
address@hidden, for an example @file{rcsinfo}
+file.
+
+When @sc{cvs} is accessing a remote repository,
+the contents of @file{rcsinfo} at the time a directory
+is first checked out will specify a template. This
+template will be updated on all @samp{cvs update}
+commands. It will also be added to new directories
+added with a @samp{cvs add new-directory} command.
+In versions of @sc{cvs} prior to version 1.12, the
address@hidden/Template} file was not updated. If the
address@hidden server is at version 1.12 or higher an older
+client may be used and the @file{CVS/Template} will
+be updated from the server.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden cvsignore
address@hidden Ignoring files via cvsignore
address@hidden cvsignore (admin file), global
address@hidden Global cvsignore
address@hidden Ignoring files
address@hidden -- This chapter should maybe be moved to the
address@hidden tutorial part of the manual?
+
+There are certain file names that frequently occur
+inside your working copy, but that you don't want to
+put under @sc{cvs} control.  Examples are all the object
+files that you get while you compile your sources.
+Normally, when you run @samp{cvs update}, it prints a
+line for each file it encounters that it doesn't know
+about (@pxref{update output}).
+
address@hidden has a list of files (or sh(1) file name patterns)
+that it should ignore while running @code{update},
address@hidden and @code{release}.
address@hidden -- Are those the only three commands affected?
+This list is constructed in the following way.
+
address@hidden @bullet
address@hidden
+The list is initialized to include certain file name
+patterns: names associated with @sc{cvs}
+administration, or with other common source control
+systems; common names for patch files, object files,
+archive files, and editor backup files; and other names
+that are usually artifacts of assorted utilities.
+Currently, the default list of ignored file name
+patterns is:
+
address@hidden Ignored files
address@hidden Automatically ignored files
address@hidden
+    RCS     SCCS    CVS     CVS.adm
+    RCSLOG  cvslog.*
+    tags    TAGS
+    .make.state     .nse_depinfo
+    *~      #*      .#*     ,*      _$*     *$
+    *.old   *.bak   *.BAK   *.orig  *.rej   .del-*
+    *.a     *.olb   *.o     *.obj   *.so    *.exe
+    *.Z     *.elc   *.ln
+    core
address@hidden example
+
address@hidden
+The per-repository list in
address@hidden/CVSROOT/cvsignore} is appended to
+the list, if that file exists.
+
address@hidden
+The per-user list in @file{.cvsignore} in your home
+directory is appended to the list, if it exists.
+
address@hidden
+Any entries in the environment variable
address@hidden is appended to the list.
+
address@hidden
+Any @samp{-I} options given to @sc{cvs} is appended.
+
address@hidden
+As @sc{cvs} traverses through your directories, the contents
+of any @file{.cvsignore} will be appended to the list.
+The patterns found in @file{.cvsignore} are only valid
+for the directory that contains them, not for
+any sub-directories.
address@hidden itemize
+
+In any of the 5 places listed above, a single
+exclamation mark (@samp{!}) clears the ignore list.
+This can be used if you want to store any file which
+normally is ignored by @sc{cvs}.
+
+Specifying @samp{-I !} to @code{cvs import} will import
+everything, which is generally what you want to do if
+you are importing files from a pristine distribution or
+any other source which is known to not contain any
+extraneous files.  However, looking at the rules above
+you will see there is a fly in the ointment; if the
+distribution contains any @file{.cvsignore} files, then
+the patterns from those files will be processed even if
address@hidden !} is specified.  The only workaround is to
+remove the @file{.cvsignore} files in order to do the
+import.  Because this is awkward, in the future
address@hidden !} might be modified to override
address@hidden files in each directory.
+
+Note that the syntax of the ignore files consists of a
+series of lines, each of which contains a space
+separated list of filenames.  This offers no clean way
+to specify filenames which contain spaces, but you can
+use a workaround like @file{foo?bar} to match a file
+named @file{foo bar} (it also matches @file{fooxbar}
+and the like).  Also note that there is currently no
+way to specify comments.
address@hidden FIXCVS?  I don't _like_ this syntax at all, but
address@hidden changing it raises all the usual compatibility
address@hidden issues and I'm also not sure what to change it to.
+
address@hidden checkoutlist
address@hidden The checkoutlist file
address@hidden checkoutlist
+
+It may be helpful to use @sc{cvs} to maintain your own
+files in the @file{CVSROOT} directory.  For example,
+suppose that you have a script @file{logcommit.pl}
+which you run by including the following line in the
address@hidden administrative file:
+
address@hidden
+ALL   $CVSROOT/CVSROOT/logcommit.pl %r/%p %s
address@hidden example
+
+To maintain @file{logcommit.pl} with @sc{cvs} you would
+add the following line to the @file{checkoutlist}
+administrative file:
+
address@hidden
+logcommit.pl
address@hidden example
+
+The format of @file{checkoutlist} is one line for each
+file that you want to maintain using @sc{cvs}, giving
+the name of the file, followed optionally by more whitespace
+and any error message that should print if the file cannot be
+checked out into CVSROOT after a commit:
+
address@hidden
+logcommit.pl   Could not update CVSROOT/logcommit.pl.
address@hidden example
+
+After setting up @file{checkoutlist} in this fashion,
+the files listed there will function just like
address@hidden's built-in administrative files.  For example,
+when checking in one of the files you should get a
+message such as:
+
address@hidden
+cvs commit: Rebuilding administrative file database
address@hidden example
+
address@hidden
+and the checked out copy in the @file{CVSROOT}
+directory should be updated.
+
+Note that listing @file{passwd} (@pxref{Password
+authentication server}) in @file{checkoutlist} is not
+recommended for security reasons.
+
+For information about keeping a checkout out copy in a
+more general context than the one provided by
address@hidden, see @ref{Keeping a checked out
+copy}.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden history file
address@hidden The history file
address@hidden History file
address@hidden Log information, saving
+
+By default, the file @file{$CVSROOT/CVSROOT/history} is used
+to log information for the @code{history} command (@pxref{history}).
+This file name may be changed with the @samp{HistoryLogPath} and
address@hidden config options (@pxref{config}).
+
+The file format of the @file{history} file is
+documented only in comments in the @sc{cvs} source
+code, but generally programs should use the @code{cvs
+history} command to access it anyway, in case the
+format changes with future releases of @sc{cvs}.
+
address@hidden Variables
address@hidden Expansions in administrative files
address@hidden Internal variables
address@hidden Variables
+
+Sometimes in writing an administrative file, you might
+want the file to be able to know various things based
+on environment @sc{cvs} is running in.  There are
+several mechanisms to do that.
+
+To find the home directory of the user running @sc{cvs}
+(from the @code{HOME} environment variable), use
address@hidden followed by @samp{/} or the end of the line.
+Likewise for the home directory of @var{user}, use
address@hidden@var{user}}.  These variables are expanded on
+the server machine, and don't get any reasonable
+expansion if pserver (@pxref{Password authenticated})
+is in use; therefore user variables (see below) may be
+a better choice to customize behavior based on the user
+running @sc{cvs}.
address@hidden Based on these limitations, should we deprecate ~?
address@hidden What is it good for?  Are people using it?
+
+One may want to know about various pieces of
+information internal to @sc{cvs}.  A @sc{cvs} internal
+variable has the syntax @address@hidden@address@hidden,
+where @var{variable} starts with a letter and consists
+of alphanumeric characters and @samp{_}.  If the
+character following @var{variable} is a
+non-alphanumeric character other than @samp{_}, the
address@hidden@{} and @address@hidden can be omitted.  The @sc{cvs}
+internal variables are:
+
address@hidden @code
address@hidden CVSROOT
address@hidden CVSROOT, internal variable
+This is the absolute path to the current @sc{cvs} root directory.
address@hidden, for a description of the various
+ways to specify this, but note that the internal
+variable contains just the directory and not any
+of the access method information.
+
address@hidden RCSBIN
address@hidden RCSBIN, internal variable
+In @sc{cvs} 1.9.18 and older, this specified the
+directory where @sc{cvs} was looking for @sc{rcs}
+programs.  Because @sc{cvs} no longer runs @sc{rcs}
+programs, specifying this internal variable is now an
+error.
+
address@hidden CVSEDITOR
address@hidden CVSEDITOR, internal variable
address@hidden EDITOR
address@hidden EDITOR, internal variable
address@hidden VISUAL
address@hidden VISUAL, internal variable
+These all expand to the same value, which is the editor
+that @sc{cvs} is using.  @xref{Global options}, for how
+to specify this.
+
address@hidden USER
address@hidden USER, internal variable
+Username of the user running @sc{cvs} (on the @sc{cvs}
+server machine).
+When using pserver, this is the user specified in the repository
+specification which need not be the same as the username the
+server is running as (@pxref{Password authentication server}).
+Do not confuse this with the environment variable of the same name.
+
address@hidden SESSIONID
address@hidden COMMITID, internal variable
+Unique Session ID of the @sc{cvs} process. This is a
+random string of printable characters of at least 16
+characters length. Users should assume that it may
+someday grow to at most 256 characters in length.
+
address@hidden COMMITID
address@hidden COMMITID, internal variable
+Unique Session ID of the @sc{cvs} process. This is a
+random string of printable characters of at least 16
+characters length. Users should assume that it may
+someday grow to at most 256 characters in length.
address@hidden table
+
+If you want to pass a value to the administrative files
+which the user who is running @sc{cvs} can specify,
+use a user variable.
address@hidden User variables
+To expand a user variable, the
+administrative file contains
address@hidden@address@hidden@}}.  To set a user variable,
+specify the global option @samp{-s} to @sc{cvs}, with
+argument @address@hidden@var{value}}.  It may be
+particularly useful to specify this option via
address@hidden (@pxref{~/.cvsrc}).
+
+For example, if you want the administrative file to
+refer to a test directory you might create a user
+variable @code{TESTDIR}.  Then if @sc{cvs} is invoked
+as
+
address@hidden
+cvs -s TESTDIR=/work/local/tests
address@hidden example
+
address@hidden
+and the
+administrative file contains @code{sh
address@hidden@}/runtests}, then that string is expanded
+to @code{sh /work/local/tests/runtests}.
+
+All other strings containing @samp{$} are reserved;
+there is no way to quote a @samp{$} character so that
address@hidden represents itself.
+
+Environment variables passed to administrative files are:
+
address@hidden @code
address@hidden environment variables, passed to administrative files
+
address@hidden CVS_USER
address@hidden CVS_USER, environment variable
+The @sc{cvs}-specific username provided by the user, if it
+can be provided (currently just for the pserver access
+method), and to the empty string otherwise.  (@code{CVS_USER}
+and @code{USER} may differ when @file{$CVSROOT/CVSROOT/passwd}
+is used to map @sc{cvs} usernames to system usernames.)
+
address@hidden LOGNAME
address@hidden LOGNAME, environment variable
+The username of the system user.
+
address@hidden USER
address@hidden USER, environment variable
+Same as @code{LOGNAME}.
+Do not confuse this with the internal variable of the same name.
address@hidden table
+
address@hidden config
address@hidden The CVSROOT/config configuration file
+
address@hidden configuration file
address@hidden config, in CVSROOT
address@hidden CVSROOT/config
+
+Usually, the @file{config} file is found at @file{$CVSROOT/CVSROOT/config},
+but this may be overridden on the @code{pserver} and @code{server} command
+lines (@pxref{server & pserver}).
+
+The administrative file @file{config} contains various
+miscellaneous settings which affect the behavior of
address@hidden  The syntax is slightly different from the
+other administrative files.
+
+Leading white space on any line is ignored, though the syntax is very strict
+and will reject spaces and tabs almost anywhere else.
+
+Empty lines, lines containing nothing but white space, and lines which start
+with @samp{#} (discounting any leading white space) are ignored.
+
address@hidden FIXME: where do we define comments for the other
address@hidden administrative files.
+Other lines consist of the optional leading white space, a keyword, @samp{=},
+and a value.  Please note again that this syntax is very strict.
+Extraneous spaces or tabs, other than the leading white space, are not
+permitted on these lines.
address@hidden See comments in parseinfo.c:parse_config for more
address@hidden discussion of this strictness.
+
+As of CVS 1.12.13, lines of the form @address@hidden mark the subsequent
+section of the config file as applying only to certain repositories.  Multiple
address@hidden@var{CVSROOT}]} lines without intervening
address@hidden@address@hidden pairs cause processing to fall through,
+processing subsequent keywords for any root in the list.  Finally, keywords
+and values which appear before any @address@hidden lines are defaults,
+and may to apply to any repository.  For example, consider the following file:
+
address@hidden
+# Defaults
+LogHistory=TMAR
+
+[/cvsroots/team1]
+  LockDir=/locks/team1
+
+[/cvsroots/team2]
+  LockDir=/locks/team2
+
+[/cvsroots/team3]
+  LockDir=/locks/team3
+
+[/cvsroots/team4]
+  LockDir=/locks/team4
+
+[/cvsroots/team3]
+[/cvsroots/team4]
+  # Override logged commands for teams 3 & 4.
+  LogHistory=all
address@hidden example
+
+This example file sets up separate lock directories for each project, as well
+as a default set of logged commands overridden for the example's team 3 &
+team 4. This syntax could be useful, for instance, if you wished to share a
+single config file, for instance @file{/etc/cvs.conf}, among several
+repositories.
+
+Currently defined keywords are:
+
address@hidden @code
address@hidden HistoryLogPath, in CVSROOT/config
address@hidden address@hidden
+Request that @sc{cvs} look for its history information in files matching
address@hidden, which is a standard UNIX file glob.  If @var{pattern} matches
+multiple files, all will be searched in lexicographically sorted order.
address@hidden, and @ref{history file}, for more.
+
+If no value is supplied for this option, it defaults to
address@hidden/CVSROOT/history}.
+
address@hidden HistorySearchPath, in CVSROOT/config
address@hidden address@hidden
+Control where @sc{cvs} logs its history.  If the file does not exist, @sc{cvs}
+will attempt to create it.  Format strings, as available to the GNU C
address@hidden function and often the UNIX date command, and the string
address@hidden will be substituted in this path.  For example, consider the
+line:
+
address@hidden
+HistoryLogPath=$CVSROOT/CVSROOT/history/%Y-%m-%d
address@hidden example
+
+This line would cause @sc{cvs} to attempt to create its history file in a
+subdirectory (@file{history}) of the configuration directory (@file{CVSROOT})
+with a name equal to the current date representation in the ISO8601 format (for
+example, on May 11, 2005, @sc{cvs} would attempt to log its history under the
+repository root directory in a file named @file{CVSROOT/history/2005-05-11}).
address@hidden, and @ref{history file}, for more.
+
+If no value is supplied for this option, it defaults to
address@hidden/CVSROOT/history}.
+
address@hidden ImportNewFilesToVendorBranchOnly, in CVSROOT/config
address@hidden import, config admin file
address@hidden config (admin file), import
address@hidden address@hidden
+Specify whether @code{cvs import} should always behave as if the
address@hidden flag was specified on the command line.  
address@hidden may be either @samp{yes} or @samp{no}.  If set to @samp{yes},
+all uses of @code{cvs import} on the repository will behave as if the
address@hidden flag was set.  The default value is @samp{no}.
+
address@hidden KeywordExpand, in CVSROOT/config
address@hidden address@hidden
+Specify @samp{i} followed by a list of keywords to be expanded
+(for example, @samp{KeywordExpand=iMYCVS,Name,Date}),
+or @samp{e} followed by a list of keywords not to be expanded
+(for example, @samp{KeywordExpand=eCVSHeader}).
+For more on keyword expansion, see @ref{Configuring keyword expansion}.
+
address@hidden LocalKeyword, in CVSROOT/config
address@hidden address@hidden
+Specify a local alias for a standard keyword.
+For example, @samp{LocalKeyword=MYCVS=CVSHeader}.
+For more on local keywords, see @ref{Keyword substitution}.
+
address@hidden LockDir, in CVSROOT/config
address@hidden address@hidden
+Put @sc{cvs} lock files in @var{directory} rather than
+directly in the repository.  This is useful if you want
+to let users read from the repository while giving them
+write access only to @var{directory}, not to the
+repository.
+It can also be used to put the locks on a very fast
+in-memory file system to speed up locking and unlocking
+the repository.
+You need to create @var{directory}, but
address@hidden will create subdirectories of @var{directory} as it
+needs them.  For information on @sc{cvs} locks, see
address@hidden
+
address@hidden Mention this in Compatibility section?
+Before enabling the LockDir option, make sure that you
+have tracked down and removed any copies of @sc{cvs} 1.9 or
+older.  Such versions neither support LockDir, nor will
+give an error indicating that they don't support it.
+The result, if this is allowed to happen, is that some
address@hidden users will put the locks one place, and others will
+put them another place, and therefore the repository
+could become corrupted.  @sc{cvs} 1.10 does not support
+LockDir but it will print a warning if run on a
+repository with LockDir enabled.
+
address@hidden LogHistory, in CVSROOT/config
address@hidden address@hidden
+Control what is logged to the @file{CVSROOT/history} file (@pxref{history}).
+Default of @samp{TOEFWUPCGMAR} (or simply @samp{all}) will log
+all transactions.  Any subset of the default is
+legal.  (For example, to only log transactions that modify the
address@hidden,v} files, use @samp{LogHistory=TMAR}.)  To disable history 
logging
+completely, use @samp{LogHistory=}.
+
address@hidden MaxCommentLeaderLength, in CVSROOT/config
address@hidden Log keyword, configuring substitution behavior
address@hidden address@hidden
+Set to some length, in bytes, where a trailing @samp{k}, @samp{M}, @samp{G},
+or @samp{T} causes the preceding nubmer to be interpreted as kilobytes,
+megabytes, gigabytes, or terrabytes, respectively, will cause
address@hidden@splitrcskeyword{Log}$} keywords (@pxref{Keyword substitution}), 
with
+more than @var{length} bytes preceding it on a line to be ignored (or to fall
+back on the comment leader set in the RCS archive file - see
address@hidden below).  Defaults to 20 bytes to allow checkouts
+to proceed normally when they include binary files containing
address@hidden@splitrcskeyword{Log}$} keywords and which users have neglected 
to mark
+as binary.
+
address@hidden MinCompressionLevel, in CVSROOT/config
address@hidden MaxCompressionLevel, in CVSROOT/config
address@hidden Compression levels, restricting on server
address@hidden address@hidden
address@hidden address@hidden
+Restricts the level of compression used by the @sc{cvs} server to a @var{value}
+between 0 and 9.  @var{value}s 1 through 9 are the same @sc{zlib} compression
+levels accepted by the @samp{-z} option (@pxref{Global options}), and 0 means
+no compression.  When one or both of these keys are set and a client requests a
+level outside the specified range, the server will simply use the closest
+permissable level.  Clients will continue compressing at the level requested by
+the user.
+
+The exception is when level 0 (no compression) is not available and the client
+fails to request any compression.  The @sc{cvs} server will then exit with an
+error message when it becomes apparent that the client is not going to request
+compression.  This will not happen with clients version 1.12.13 and later since
+these client versions allow the server to notify them that they must request
+some level of compression.
+
address@hidden
address@hidden PreservePermissions, in CVSROOT/config
address@hidden address@hidden
+Enable support for saving special device files,
+symbolic links, file permissions and ownerships in the
+repository.  The default value is @samp{no}.
address@hidden Files}, for the full implications of using
+this keyword.
address@hidden ignore
+
address@hidden PrimaryServer, in CVSROOT/config
address@hidden Primary server
address@hidden Secondary server
address@hidden proxy, write
address@hidden write proxy
address@hidden address@hidden
+When specified, and the repository specified by @var{CVSROOT} is not the one
+currently being accessed, then the server will turn itself into a transparent
+proxy to @var{CVSROOT} for write requests.  The @var{hostname} configured as
+part of @var{CVSROOT} must resolve to the same string returned by the
address@hidden command on the primary server for this to work.  Host name
+resolution is performed via some combination of @command{named}, a broken out
+line from @file{/etc/hosts}, and the Network Information Service (NIS or YP),
+depending on the configuration of the particular system.
+
+Only the @samp{:ext:} method is
+currently supported for primaries (actually, @samp{:fork:} is supported as
+well, but only for testing - if you find another use for accessing a primary
+via the @samp{:fork:} method, please send a note to @email{bug-cvs@@nongnu.org}
+about it).  See @ref{Write proxies} for more on configuring and using write
+proxies.
+
address@hidden RCSBIN, in CVSROOT/config
address@hidden address@hidden
+For @sc{cvs} 1.9.12 through 1.9.18, this setting told
address@hidden to look for @sc{rcs} programs in the
address@hidden directory.  Current versions of @sc{cvs}
+do not run @sc{rcs} programs; for compatibility this
+setting is accepted, but it does nothing.
+
address@hidden RereadLogAfterVerify, in CVSROOT/config
address@hidden @file{verifymsg}, changing the log message
address@hidden address@hidden
+Modify the @samp{commit} command such that CVS will reread the
+log message after running the program specified by @file{verifymsg}.
address@hidden may be one of @samp{yes} or @samp{always}, indicating that
+the log message should always be reread; @samp{no}
+or @samp{never}, indicating that it should never be
+reread; or @var{value} may be @samp{stat}, indicating
+that the file should be checked with the file system
address@hidden()} function to see if it has changed (see warning below)
+before rereading.  The default value is @samp{always}.
+
address@hidden `stat' mode can cause CVS to pause for up to
+one extra second per directory committed.  This can be less IO and
+CPU intensive but is not recommended for use with large repositories}
+
address@hidden, for more information on how verifymsg
+may be used.
+
address@hidden SystemAuth, in CVSROOT/config
address@hidden address@hidden
+If @var{value} is @samp{yes}, then pserver should check
+for users in the system's user database if not found in
address@hidden/passwd}.  If it is @samp{no}, then all
+pserver users must exist in @file{CVSROOT/passwd}.
+The default is @samp{yes}.  For more on pserver, see
address@hidden authenticated}.
+
address@hidden TmpDir, in config
address@hidden temporary files, location of
address@hidden temporary directory, set in config
address@hidden address@hidden
+Specify @var{path} as the directory to create temporary files in.
address@hidden options}, for more on setting the path to the temporary
+directory.  This option first appeared with @sc{cvs} release 1.12.13.
+
address@hidden TopLevelAdmin, in CVSROOT/config
address@hidden address@hidden
+Modify the @samp{checkout} command to create a
address@hidden directory at the top level of the new
+working directory, in addition to @samp{CVS}
+directories created within checked-out directories.
+The default value is @samp{no}.
+
+This option is useful if you find yourself performing
+many commands at the top level of your working
+directory, rather than in one of the checked out
+subdirectories.  The @file{CVS} directory created there
+will mean you don't have to specify @code{CVSROOT} for
+each command.  It also provides a place for the
address@hidden/Template} file (@pxref{Working directory
+storage}).
+
address@hidden UseArchiveCommentLeader, in CVSROOT/config
address@hidden Log keyword, configuring substitution behavior
address@hidden address@hidden
+Set to @code{true}, if the text preceding a @address@hidden
+keyword is found to exceed @code{MaxCommentLeaderLength} (above) bytes, then
+the comment leader set in the RCS archive file (@pxref{admin}), if any, will
+be used instead.  If there is no comment leader set in the archive file or
address@hidden is set to @samp{false}, then the keyword will not be expanded
+(@pxref{Keyword list}).  To force the comment leader in the RCS archive file to
+be used exclusively (and @address@hidden expansion skipped in
+files where the comment leader has not been set in the archive file), set
address@hidden and set @code{MaxCommentLeaderLength} to @code{0}.
+
address@hidden UseNewInfoFmtStrings, in CVSROOT/config
address@hidden format strings, config admin file
address@hidden config (admin file), updating legacy repositories
address@hidden compatibility notes, config admin file
address@hidden address@hidden
+Specify whether @sc{cvs} should support the new or old command line
+template model for the commit support files (@pxref{commit files}).
+This configuration variable began life in deprecation and is only here
+in order to give people time to update legacy repositories to use the new
+format string syntax before support for the old syntax is removed.  For
+information on updating your repository to support the new model,
+please see @ref{Updating Commit Files}.
+
address@hidden that new repositories (created with the @code{cvs init} command)
+will have this value set to @samp{yes}, but the default value is @samp{no}.}
+
address@hidden UserAdminOptions, in CVSROOT/config
address@hidden address@hidden
+Control what options will be allowed with the @code{cvs admin}
+command (@pxref{admin}) for users not in the @code{cvsadmin} group.
+The @var{value} string is a list of single character options
+which should be allowed.  If a user who is not a member of the
address@hidden group tries to execute any @code{cvs admin}
+option which is not listed they will will receive an error message
+reporting that the option is restricted.
+
+If no @code{cvsadmin} group exists on the server, @sc{cvs} will
+ignore the @code{UserAdminOptions} keyword (@pxref{admin}).
+
+When not specified, @code{UserAdminOptions} defaults to
address@hidden  In other words, it defaults to allowing
+users outside of the @code{cvsadmin} group to use the
address@hidden admin} command only to change the default keyword
+expansion mode for files.
+
+As an example, to restrict users not in the @code{cvsadmin}
+group to using @code{cvs admin} to change the default keyword
+substitution mode, lock revisions, unlock revisions, and
+replace the log message, use @samp{UserAdminOptions=klum}.
address@hidden table
+
+
+
address@hidden 
---------------------------------------------------------------------
address@hidden Environment variables
address@hidden All environment variables which affect CVS
address@hidden Environment variables
address@hidden Reference manual for variables
+
+This is a complete list of all environment variables
+that affect @sc{cvs} (Windows users, please bear with this list;
+$VAR is equivalent to %VAR% at the Windows command prompt).
+
address@hidden @code
address@hidden CVSIGNORE, environment variable
address@hidden $CVSIGNORE
+A whitespace-separated list of file name patterns that
address@hidden should ignore. @xref{cvsignore}.
+
address@hidden CVSWRAPPERS, environment variable
address@hidden $CVSWRAPPERS
+A whitespace-separated list of file name patterns that
address@hidden should treat as wrappers. @xref{Wrappers}.
+
address@hidden CVSREAD, environment variable
address@hidden Read-only files, and CVSREAD
address@hidden $CVSREAD
+If this is set, @code{checkout} and @code{update} will
+try hard to make the files in your working directory
+read-only.  When this is not set, the default behavior
+is to permit modification of your working files.
+
address@hidden CVSREADONLYFS, environment variable
address@hidden $CVSREADONLYFS
+Turns on read-only repository mode. This allows one to
+check out from a read-only repository, such as within
+an anoncvs server, or from a @sc{cd-rom} repository.
+
+It has the same effect as if the @samp{-R} command-line
+option is used. This can also allow the use of
+read-only NFS repositories.
+
address@hidden $CVSUMASK
+Controls permissions of files in the repository.  See
address@hidden permissions}.
+
address@hidden $CVSROOT
+Should contain the full pathname to the root of the @sc{cvs}
+source repository (where the @sc{rcs} files are
+kept).  This information must be available to @sc{cvs} for
+most commands to execute; if @code{$CVSROOT} is not set,
+or if you wish to override it for one invocation, you
+can supply it on the command line: @samp{cvs -d cvsroot
address@hidden Once you have checked out a working
+directory, @sc{cvs} stores the appropriate root (in
+the file @file{CVS/Root}), so normally you only need to
+worry about this when initially checking out a working
+directory.
+
address@hidden $CVSEDITOR
address@hidden CVSEDITOR, environment variable
address@hidden $EDITOR
address@hidden EDITOR, environment variable
address@hidden $VISUAL
address@hidden VISUAL, environment variable
+Specifies the program to use for recording log messages
+during commit.  @code{$CVSEDITOR} overrides
address@hidden, which overrides @code{$VISUAL}.
+See @ref{Committing your changes} for more or
address@hidden options} for alternative ways of specifying a
+log editor.
+
address@hidden PATH, environment variable
address@hidden $PATH
+If @code{$RCSBIN} is not set, and no path is compiled
+into @sc{cvs}, it will use @code{$PATH} to try to find all
+programs it uses.
+
address@hidden HOME, environment variable
address@hidden $HOME
address@hidden HOMEPATH, environment variable
address@hidden $HOMEPATH
address@hidden HOMEDRIVE, environment variable
address@hidden $HOMEDRIVE
+Used to locate the directory where the @file{.cvsrc}
+file, and other such files, are searched.  On Unix, @sc{cvs}
+just checks for @code{HOME}.  On Windows NT, the system will
+set @code{HOMEDRIVE}, for example to @samp{d:} and @code{HOMEPATH},
+for example to @file{\joe}.  On Windows 95, you'll
+probably need to set @code{HOMEDRIVE} and @code{HOMEPATH} yourself.
address@hidden We are being vague about whether HOME works on
address@hidden Windows; see long comment in windows-NT/filesubr.c.
+
address@hidden CVS_RSH, environment variable
address@hidden $CVS_RSH
+Specifies the external program which @sc{cvs} connects with,
+when @code{:ext:} access method is specified.
address@hidden via rsh}.
+
address@hidden $CVS_SERVER
+Used in client-server mode when accessing a remote
+repository using @sc{rsh}.  It specifies the name of
+the program to start on the server side (and any
+necessary arguments) when accessing a remote repository
+using the @code{:ext:}, @code{:fork:}, or @code{:server:} access methods.
+The default value for @code{:ext:} and @code{:server:} is @code{cvs};
+the default value for @code{:fork:} is the name used to run the client.
address@hidden via rsh}
+
address@hidden $CVS_PASSFILE
+Used in client-server mode when accessing the @code{cvs
+login server}.  Default value is @file{$HOME/.cvspass}.
address@hidden authentication client}
+
address@hidden CVS_CLIENT_PORT
address@hidden $CVS_CLIENT_PORT
+Used in client-server mode to set the port to use when accessing the server
+via Kerberos, GSSAPI, or @sc{cvs}'s password authentication protocol
+if the port is not specified in the CVSROOT.
address@hidden repositories}
+
address@hidden CVS_PROXY_PORT
address@hidden $CVS_PROXY_PORT
+Used in client-server mode to set the port to use when accessing a server
+via a web proxy, if the port is not specified in the CVSROOT.  Works with
+GSSAPI, and the password authentication protocol.
address@hidden repositories}
+
address@hidden CVS_RCMD_PORT, environment variable
address@hidden $CVS_RCMD_PORT
+Used in client-server mode.  If set, specifies the port
+number to be used when accessing the @sc{rcmd} demon on
+the server side. (Currently not used for Unix clients).
+
address@hidden CVS_CLIENT_LOG, environment variable
address@hidden $CVS_CLIENT_LOG
+Used for debugging only in client-server
+mode.  If set, everything sent to the server is logged
+into @address@hidden and everything
+sent from the server is logged into
address@hidden@code{$CVS_CLIENT_LOG}.out}.
+
address@hidden CVS_SERVER_SLEEP, environment variable
address@hidden $CVS_SERVER_SLEEP
+Used only for debugging the server side in
+client-server mode.  If set, delays the start of the
+server child process the specified amount of
+seconds so that you can attach to it with a debugger.
+
address@hidden CVS_IGNORE_REMOTE_ROOT, environment variable
address@hidden $CVS_IGNORE_REMOTE_ROOT
+For @sc{cvs} 1.10 and older, setting this variable
+prevents @sc{cvs} from overwriting the @file{CVS/Root}
+file when the @samp{-d} global option is specified.
+Later versions of @sc{cvs} do not rewrite
address@hidden/Root}, so @code{CVS_IGNORE_REMOTE_ROOT} has no
+effect.
+
address@hidden CVS_LOCAL_BRANCH_NUM, environment variable
address@hidden $CVS_LOCAL_BRANCH_NUM
+Setting this variable allows some control over the
+branch number that is assigned. This is specifically to
+support the local commit feature of CVSup. If one sets
address@hidden to (say) 1000 then branches
+the local repository, the revision numbers will look
+like 1.66.1000.xx. There is almost a dead-set certainty
+that there will be no conflicts with version numbers.
+
address@hidden COMSPEC, environment variable
address@hidden $COMSPEC
+Used under OS/2 only.  It specifies the name of the
+command interpreter and defaults to @sc{cmd.exe}.
+
address@hidden TMPDIR, environment variable
address@hidden temporary file directory, set via environment variable
address@hidden temporary files, location of
address@hidden $TMPDIR
+Directory in which temporary files are located.
address@hidden options}, for more on setting the temporary directory.
+
address@hidden CVS_PID, environment variable
address@hidden $CVS_PID
+This is the process identification (aka pid) number of
+the @sc{cvs} process. It is often useful in the
+programs and/or scripts specified by the
address@hidden, @file{verifymsg}, @file{loginfo}
+files.
address@hidden table
+
address@hidden Compatibility
address@hidden Compatibility between CVS Versions
+
address@hidden CVS, versions of
address@hidden Versions, of CVS
address@hidden Compatibility, between CVS versions
address@hidden We don't mention versions older than CVS 1.3
address@hidden on the theory that it would clutter it up for the vast
address@hidden majority of people, who don't have anything that old.
address@hidden
+The repository format is compatible going back to
address@hidden 1.3.  But see @ref{Watches Compatibility}, if
+you have copies of @sc{cvs} 1.6 or older and you want
+to use the optional developer communication features.
address@hidden If you "cvs rm" and commit using 1.3, then you'll
address@hidden want to run "rcs -sdead <file,v>" on each of the
address@hidden files in the Attic if you then want 1.5 and
address@hidden later to recognize those files as dead (I think the
address@hidden symptom if this is not done is that files reappear
address@hidden in joins).  (Wait: the above will work but really to
address@hidden be strictly correct we should suggest checking
address@hidden in a new revision rather than just changing the
address@hidden state of the head revision, shouldn't we?).
address@hidden The old convert.sh script was for this, but it never
address@hidden did get updated to reflect use of the RCS "dead"
address@hidden state.
address@hidden Note: this is tricky to document without confusing
address@hidden people--need to carefully say what CVS version we
address@hidden are talking about and keep in mind the distinction
address@hidden between a
address@hidden repository created with 1.3 and on which one now
address@hidden uses 1.5+, and a repository on which one wants to
address@hidden use both versions side by side (e.g. during a
address@hidden transition period).
address@hidden Wait, can't CVS just detect the case in which a file
address@hidden is in the Attic but the head revision is not dead?
address@hidden Not sure whether this should produce a warning or
address@hidden something, and probably needs further thought, but
address@hidden it would appear that the situation can be detected.
address@hidden
address@hidden We might want to separate out the 1.3 compatibility
address@hidden section (for repository & working directory) from the
address@hidden rest--that might help avoid confusing people who
address@hidden are upgrading (for example) from 1.6 to 1.8.
address@hidden
address@hidden A minor incompatibility is if a current version of CVS
address@hidden puts "Nfoo" into CVS/Tag, then CVS 1.9 or older will
address@hidden see this as if there is no tag.  Seems to me this is
address@hidden too obscure to mention.
+
+The working directory format is compatible going back
+to @sc{cvs} 1.5.  It did change between @sc{cvs} 1.3
+and @sc{cvs} 1.5.  If you run @sc{cvs} 1.5 or newer on
+a working directory checked out with @sc{cvs} 1.3,
address@hidden will convert it, but to go back to @sc{cvs}
+1.3 you need to check out a new working directory with
address@hidden 1.3.
+
+The remote protocol is interoperable going back to @sc{cvs} 1.5, but no
+further (1.5 was the first official release with the remote protocol,
+but some older versions might still be floating around).  In many
+cases you need to upgrade both the client and the server to take
+advantage of new features and bug fixes, however.
+
address@hidden Perhaps should be saying something here about the
address@hidden "D" lines in Entries (written by CVS 1.9; 1.8 and
address@hidden older don't use them).  These are supposed to be
address@hidden compatible in both directions, but I'm not sure
address@hidden they quite are 100%.  One common gripe is if you
address@hidden "rm -r" a directory and 1.9 gets confused, as it
address@hidden still sees it in Entries.  That one is fixed in
address@hidden (say) 1.9.6.  Someone else reported problems with
address@hidden starting with a directory which was checked out with
address@hidden an old version, and then using a new version, and
address@hidden some "D" lines appeared, but not for every
address@hidden directory, causing some directories to be skipped.
address@hidden They weren't sure how to reproduce this, though.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Troubleshooting
address@hidden Troubleshooting
+
+If you are having trouble with @sc{cvs}, this appendix
+may help.  If there is a particular error message which
+you are seeing, then you can look up the message
+alphabetically.  If not, you can look through the
+section on other problems to see if your problem is
+mentioned there.
+
address@hidden
+* Error messages::              Partial list of CVS errors
+* Connection::                  Trouble making a connection to a CVS server
+* Other problems::              Problems not readily listed by error message
address@hidden menu
+
address@hidden
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
address@hidden @node Bad administrative files
address@hidden Bad administrative files
+
address@hidden -- Give hints on how to fix them
address@hidden ignore
+
address@hidden Error messages
address@hidden Partial list of error messages
+
+Here is a partial list of error messages that you may
+see from @sc{cvs}.  It is not a complete address@hidden
+is capable of printing many, many error messages, often
+with parts of them supplied by the operating system,
+but the intention is to list the common and/or
+potentially confusing error messages.
+
+The messages are alphabetical, but introductory text
+such as @samp{cvs update: } is not considered in
+ordering them.
+
+In some cases the list includes messages printed by old
+versions of @sc{cvs} (partly because users may not be
+sure which version of @sc{cvs} they are using at any
+particular moment).
address@hidden If we want to start retiring messages, perhaps we
address@hidden should pick a cutoff version (for example, no more
address@hidden messages which are specific to versions before 1.9)
address@hidden and then move the old messages to an "old messages"
address@hidden node rather than deleting them completely.
+
address@hidden @code
address@hidden FIXME: What is the correct way to format a multiline
address@hidden error message here?  Maybe @table is the wrong
address@hidden choice?  Texinfo gurus?
address@hidden @var{file}:@var{line}: Assertion '@var{text}' failed
+The exact format of this message may vary depending on
+your system.  It indicates a bug in @sc{cvs}, which can
+be handled as described in @ref{BUGS}.
+
address@hidden cvs @var{command}: authorization failed: server @var{host} 
rejected access
+This is a generic response when trying to connect to a
+pserver server which chooses not to provide a
+specific reason for denying authorization.  Check that
+the username and password specified are correct and
+that the @code{CVSROOT} specified is allowed by @samp{--allow-root}
+in @file{inetd.conf}.  See @ref{Password authenticated}.
+
address@hidden cvs @var{command}: Bad root @var{directory}
+This message indicates that there were one or more
+explicit @samp{--allow-root} arguments on the cvs
+server command line which did not match the directory
+passed by the client to the server.
+
address@hidden cvs @var{command}: conflict: removed @var{file} was modified by 
second party
+This message indicates that you removed a file, and
+someone else modified it.  To resolve the conflict,
+first run @samp{cvs add @var{file}}.  If desired, look
+at the other party's modification to decide whether you
+still want to remove it.  If you don't want to remove
+it, stop here.  If you do want to remove it, proceed
+with @samp{cvs remove @var{file}} and commit your
+removal.
address@hidden Tests conflicts2-142b* in sanity.sh test for this.
+
address@hidden cannot change permissions on temporary directory
address@hidden
+Operation not permitted
address@hidden example
+This message has been happening in a non-reproducible,
+occasional way when we run the client/server testsuite,
+both on Red Hat Linux 3.0.3 and 4.1.  We haven't been
+able to figure out what causes it, nor is it known
+whether it is specific to Linux (or even to this
+particular machine!).  If the problem does occur on
+other unices, @samp{Operation not permitted} would be
+likely to read @samp{Not owner} or whatever the system
+in question uses for the unix @code{EPERM} error.  If
+you have any information to add, please let us know as
+described in @ref{BUGS}.  If you experience this error
+while using @sc{cvs}, retrying the operation which
+produced it should work fine.
address@hidden This has been seen in a variety of tests, including
address@hidden multibranch-2, multibranch-5, and basic1-24-rm-rm,
address@hidden so it doesn't seem particularly specific to any one
address@hidden test.
+
address@hidden cvs [server aborted]: Cannot check out files into the repository 
itself
+The obvious cause for this message (especially for
+non-client/server @sc{cvs}) is that the @sc{cvs} root
+is, for example, @file{/usr/local/cvsroot} and you try
+to check out files when you are in a subdirectory, such
+as @file{/usr/local/cvsroot/test}.  However, there is a
+more subtle cause, which is that the temporary
+directory on the server is set to a subdirectory of the
+root (which is also not allowed).  If this is the
+problem, set the temporary directory to somewhere else,
+for example @file{/var/tmp}; see @code{TMPDIR} in
address@hidden variables}, for how to set the
+temporary directory.
+
address@hidden cannot commit files as 'root'
+See @samp{'root' is not allowed to commit files}.
+
address@hidden For one example see basica-1a10 in the testsuite
address@hidden For another example, "cvs co ." on NT; see comment
address@hidden at windows-NT/filesubr.c (expand_wild).
address@hidden For another example, "cvs co foo/bar" where foo exists.
address@hidden cannot open CVS/Entries for reading: No such file or directory
+This generally indicates a @sc{cvs} internal error, and
+can be handled as with other @sc{cvs} bugs
+(@pxref{BUGS}).  Usually there is a workaround---the
+exact nature of which would depend on the situation but
+which hopefully could be figured out.
+
address@hidden This is more obscure than it might sound; it only
address@hidden happens if you run "cvs init" from a directory which
address@hidden contains a CVS/Root file at the start.
address@hidden cvs [init aborted]: cannot open CVS/Root: No such file or 
directory
+This message is harmless.  Provided it is not
+accompanied by other errors, the operation has
+completed successfully.  This message should not occur
+with current versions of @sc{cvs}, but it is documented
+here for the benefit of @sc{cvs} 1.9 and older.
+
address@hidden cvs server: cannot open /root/.cvsignore: Permission denied
address@hidden cvs [server aborted]: can't chdir(/root): Permission denied
+See @ref{Connection}.
+
address@hidden cvs [checkout aborted]: cannot rename file @var{file} to 
CVS/,,@var{file}: Invalid argument
+This message has been reported as intermittently
+happening with @sc{cvs} 1.9 on Solaris 2.5.  The cause is
+unknown; if you know more about what causes it, let us
+know as described in @ref{BUGS}.
+
address@hidden cvs address@hidden aborted]: cannot start server via rcmd
+This, unfortunately, is a rather nonspecific error
+message which @sc{cvs} 1.9 will print if you are
+running the @sc{cvs} client and it is having trouble
+connecting to the server.  Current versions of @sc{cvs}
+should print a much more specific error message.  If
+you get this message when you didn't mean to run the
+client at all, you probably forgot to specify
address@hidden:local:}, as described in @ref{Repository}.
+
address@hidden ci: @var{file},v: bad diff output line: Binary files - and 
/tmp/T2a22651 differ
address@hidden 1.9 and older will print this message
+when trying to check in a binary file if
address@hidden is not correctly installed.  Re-read the
+instructions that came with your @sc{rcs} distribution
+and the @sc{install} file in the @sc{cvs}
+distribution.  Alternately, upgrade to a current
+version of @sc{cvs}, which checks in files itself
+rather than via @sc{rcs}.
+
address@hidden cvs checkout: could not check out @var{file}
+With @sc{cvs} 1.9, this can mean that the @code{co} program
+(part of @sc{rcs}) returned a failure.  It should be
+preceded by another error message, however it has been
+observed without another error message and the cause is
+not well-understood.  With the current version of @sc{cvs},
+which does not run @code{co}, if this message occurs
+without another error message, it is definitely a @sc{cvs}
+bug (@pxref{BUGS}).
address@hidden My current suspicion is that the RCS in the rcs (not
address@hidden cvs/winnt/rcs57nt.zip) directory on the _Practical_
address@hidden CD is bad (remains to be confirmed).
address@hidden There is also a report of something which looks
address@hidden very similar on SGI, Irix 5.2, so I dunno.
+
address@hidden cvs [login aborted]: could not find out home directory
+This means that you need to set the environment
+variables that @sc{cvs} uses to locate your home directory.
+See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in
address@hidden variables}.
+
address@hidden cvs update: could not merge revision @var{rev} of @var{file}: No 
such file or directory
address@hidden 1.9 and older will print this message if there was
+a problem finding the @code{rcsmerge} program.  Make
+sure that it is in your @code{PATH}, or upgrade to a
+current version of @sc{cvs}, which does not require
+an external @code{rcsmerge} program.
+
address@hidden cvs [update aborted]: could not patch @var{file}: No such file 
or directory
+This means that there was a problem finding the
address@hidden program.  Make sure that it is in your
address@hidden  Note that despite appearances the message
+is @emph{not} referring to whether it can find @var{file}.
+If both the client and the server are running a current
+version of @sc{cvs}, then there is no need for an
+external patch program and you should not see this
+message.  But if either client or server is running
address@hidden 1.9, then you need @code{patch}.
+
address@hidden cvs update: could not patch @var{file}; will refetch
+This means that for whatever reason the client was
+unable to apply a patch that the server sent.  The
+message is nothing to be concerned about, because
+inability to apply the patch only slows things down and
+has no effect on what @sc{cvs} does.
address@hidden xref to update output.  Or File status?
address@hidden Or some place else that
address@hidden explains this whole "patch"/P/Needs Patch thing?
+
address@hidden dying gasps from @var{server} unexpected
+There is a known bug in the server for @sc{cvs} 1.9.18
+and older which can cause this.  For me, this was
+reproducible if I used the @samp{-t} global option.  It
+was fixed by Andy Piper's 14 Nov 1997 change to
+src/filesubr.c, if anyone is curious.
+If you see the message,
+you probably can just retry the operation which failed,
+or if you have discovered information concerning its
+cause, please let us know as described in @ref{BUGS}.
+
address@hidden end of file from server (consult above messages if any)
+The most common cause for this message is if you are
+using an external @code{rsh} program and it exited with
+an error.  In this case the @code{rsh} program should
+have printed a message, which will appear before the
+above message.  For more information on setting up a
address@hidden client and server, see @ref{Remote repositories}.
+
address@hidden cvs [update aborted]: EOF in key in RCS file @var{file},v
address@hidden cvs [checkout aborted]: EOF while looking for end of string in 
RCS file @var{file},v
+This means that there is a syntax error in the given
address@hidden file.  Note that this might be true even if @sc{rcs} can
+read the file OK; @sc{cvs} does more error checking of
+errors in the RCS file.  That is why you may see this
+message when upgrading from @sc{cvs} 1.9 to @sc{cvs}
+1.10.  The likely cause for the original corruption is
+hardware, the operating system, or the like.  Of
+course, if you find a case in which @sc{cvs} seems to
+corrupting the file, by all means report it,
+(@pxref{BUGS}).
+There are quite a few variations of this error message,
+depending on exactly where in the @sc{rcs} file @sc{cvs}
+finds the syntax error.
+
address@hidden mkmodules
address@hidden cvs commit: Executing 'mkmodules'
+This means that your repository is set up for a version
+of @sc{cvs} prior to @sc{cvs} 1.8.  When using @sc{cvs}
+1.8 or later, the above message will be preceded by
+
address@hidden
+cvs commit: Rebuilding administrative file database
address@hidden example
+
+If you see both messages, the database is being rebuilt
+twice, which is unnecessary but harmless.  If you wish
+to avoid the duplication, and you have no versions of
address@hidden 1.7 or earlier in use, remove @code{-i mkmodules}
+every place it appears in your @code{modules}
+file.  For more information on the @code{modules} file,
+see @ref{modules}.
+
address@hidden This message comes from "co", and I believe is
address@hidden possible only with older versions of CVS which call
address@hidden co.  The problem with being able to create the bogus
address@hidden RCS file still exists, though (and I think maybe
address@hidden there is a different symptom(s) now).
address@hidden FIXME: Would be nice to have a more exact wording
address@hidden for this message.
address@hidden missing author
+Typically this can happen if you created an RCS file
+with your username set to empty.  @sc{cvs} will, bogusly,
+create an illegal RCS file with no value for the author
+field.  The solution is to make sure your username is
+set to a non-empty value and re-create the RCS file.
address@hidden "make sure your username is set" is complicated in
address@hidden and of itself, as there are the environment
address@hidden variables the system login name, &c, and it depends
address@hidden on the version of CVS.
+
address@hidden cvs [checkout aborted]: no such tag @var{tag}
+This message means that @sc{cvs} isn't familiar with
+the tag @var{tag}.  Usually the root cause is that you have
+mistyped a tag name.  Ocassionally this can also occur because the
+users creating tags do not have permissions to write to the
address@hidden/val-tags} file (@pxref{File permissions}, for more).
+
+Prior to @sc{cvs} version 1.12.10, there were a few relatively
+obscure cases where a given tag could be created in an archive
+file in the repository but @sc{cvs} would require the user to
address@hidden Search sanity.sh for "no such tag" to see some of
address@hidden the relatively obscure cases.
+try a few other @sc{cvs} commands involving that tag
+until one was found whch caused @sc{cvs} to update
address@hidden CVSROOT/val-tags file, forcing tags into
address@hidden val-tags file, forcing tags into
+the @file{val-tags} file, at which point the originally failing command
+would begin to work.  This same method can be used to repair a @file{val-tags}
+file that becomes out of date due to the permissions problem mentioned above.
+This updating is only required once per tag - once a tag is listed in
address@hidden, it stays there.
+
+Note that using @samp{tag -f} to not require tag matches did not and
+does not override this check (@pxref{Common options}). 
+ 
address@hidden *PANIC* administration files missing
+This typically means that there is a directory named
address@hidden but it does not contain the administrative files
+which @sc{cvs} puts in a CVS directory.  If the problem is
+that you created a CVS directory via some mechanism
+other than @sc{cvs}, then the answer is simple, use a name
+other than @sc{cvs}.  If not, it indicates a @sc{cvs} bug
+(@pxref{BUGS}).
+
address@hidden rcs error: Unknown option: -x,v/
+This message will be followed by a usage message for
address@hidden  It means that you have an old version of
address@hidden (probably supplied with your operating
+system), as well as an old version of @sc{cvs}.
address@hidden 1.9.18 and earlier only work with @sc{rcs} version 5 and
+later; current versions of @sc{cvs} do not run @sc{rcs} programs.
address@hidden For more information on installing @sc{cvs}, see
address@hidden (FIXME: where?  it depends on whether you are
address@hidden getting binaries or sources or what).
address@hidden The message can also say "ci error" or something
address@hidden instead of "rcs error", I suspect.
+
address@hidden cvs [server aborted]: received broken pipe signal
+This message can be caused by a loginfo program that fails to
+read all of the log information from its standard input.
+If you find it happening in any other circumstances,
+please let us know as described in @ref{BUGS}.
+
address@hidden 'root' is not allowed to commit files
+When committing a permanent change, @sc{cvs} makes a log entry of
+who committed the change.  If you are committing the change logged
+in as "root" (not under "su" or other root-priv giving program),
address@hidden cannot determine who is actually making the change.
+As such, by default, @sc{cvs} disallows changes to be committed by users
+logged in as "root".  (You can disable this option by passing the
address@hidden option to @file{configure} and recompiling @sc{cvs}.
+On some systems this means editing the appropriate @file{config.h} file
+before building @sc{cvs}.)
+
address@hidden cvs [server aborted]: Secondary out of sync with primary!
+
+This usually means that the version of @sc{cvs} running on a secondary
+server is incompatible with the version running on the primary server
+(@pxref{Write proxies}).
+This will not occur if the client supports redirection.
+
+It is not the version number that is significant here, but the list of
+supported requests that the servers provide to the client.
+For example, even if both servers were the same version,
+if the secondary was compiled with GSSAPI support and the primary was not,
+the list of supported requests provided by the two servers
+would be different and the secondary would not work as a transparent
+proxy to the primary.
+Conversely, even if the two servers were radically different versions
+but both provided the same list of valid requests to the client,
+the transparent proxy would succeed.
+
address@hidden Terminated with fatal signal 11
+This message usually indicates that @sc{cvs} (the server, if you're
+using client/server mode) has run out of (virtual) memory.
+Although @sc{cvs} tries to catch the error and issue a more meaningful
+message, there are many circumstances where that is not possible.
+If you appear to have lots of memory available to the system,
+the problem is most likely that you're running into a system-wide
+limit on the amount of memory a single process can use or a
+similar process-specific limit.
+The mechanisms for displaying and setting such limits vary from
+system to system, so you'll have to consult an expert for your
+particular system if you don't know how to do that.
+
address@hidden Too many arguments!
+This message is typically printed by the @file{log.pl}
+script which is in the @file{contrib} directory in the
address@hidden source distribution.  In some versions of
address@hidden, @file{log.pl} has been part of the default
address@hidden installation.  The @file{log.pl} script gets
+called from the @file{loginfo} administrative file.
+Check that the arguments passed in @file{loginfo} match
+what your version of @file{log.pl} expects.  In
+particular, the @file{log.pl} from @sc{cvs} 1.3 and
+older expects the log file as an argument whereas the
address@hidden from @sc{cvs} 1.5 and newer expects the
+log file to be specified with a @samp{-f} option.  Of
+course, if you don't need @file{log.pl} you can just
+comment it out of @file{loginfo}.
+
address@hidden cvs [update aborted]: unexpected EOF reading @var{file},v
+See @samp{EOF in key in RCS file}.
+
address@hidden cvs [login aborted]: unrecognized auth response from @var{server}
+This message typically means that the server is not set
+up properly.  For example, if @file{inetd.conf} points
+to a nonexistent cvs executable.  To debug it further,
+find the log file which inetd writes
+(@file{/var/log/messages} or whatever inetd uses on
+your system).  For details, see @ref{Connection}, and
address@hidden authentication server}.
+
address@hidden cvs commit: Up-to-date check failed for address@hidden'
+This means that someone else has committed a change to
+that file since the last time that you did a @code{cvs
+update}.  So before proceeding with your @code{cvs
+commit} you need to @code{cvs update}.  @sc{cvs} will merge
+the changes that you made and the changes that the
+other person made.  If it does not detect any conflicts
+it will report @samp{M @var{file}} and you are ready
+to @code{cvs commit}.  If it detects conflicts it will
+print a message saying so, will report @samp{C @var{file}},
+and you need to manually resolve the
+conflict.  For more details on this process see
address@hidden example}.
+
address@hidden Usage:   diff3 [-exEX3 [-i | -m] [-L label1 -L label3]] file1 
file2 file3
address@hidden
+Only one of [exEX3] allowed
address@hidden example
+This indicates a problem with the installation of
address@hidden and @code{rcsmerge}.  Specifically
address@hidden was compiled to look for GNU diff3, but
+it is finding unix diff3 instead.  The exact text of
+the message will vary depending on the system.  The
+simplest solution is to upgrade to a current version of
address@hidden, which does not rely on external
address@hidden or @code{diff3} programs.
+
address@hidden warning: unrecognized response address@hidden' from cvs server
+If @var{text} contains a valid response (such as
address@hidden) followed by an extra carriage return
+character (on many systems this will cause the second
+part of the message to overwrite the first part), then
+it probably means that you are using the @samp{:ext:}
+access method with a version of rsh, such as most
+non-unix rsh versions, which does not by default
+provide a transparent data stream.  In such cases you
+probably want to try @samp{:server:} instead of
address@hidden:ext:}.  If @var{text} is something else, this
+may signify a problem with your @sc{cvs} server.
+Double-check your installation against the instructions
+for setting up the @sc{cvs} server.
address@hidden FIXCVS: should be printing CR as \r or \015 or some
address@hidden such, probably.
+
address@hidden cvs commit: address@hidden waiting for @var{user}'s lock in 
@var{directory}
+This is a normal message, not an error.  See
address@hidden, for more details.
+
address@hidden cvs commit: warning: editor session failed
address@hidden Exit status, of editor
+This means that the editor which @sc{cvs} is using exits with a nonzero
+exit status.  Some versions of vi will do this even when there was not
+a problem editing the file.  If so, point the
address@hidden environment variable to a small script
+such as:
+
address@hidden
+#!/bin/sh
+vi $*
+exit 0
address@hidden example
+
address@hidden cvs update: warning: @var{file} was lost
+This means that the working copy of @var{file} has been deleted
+but it has not been removed from @sc{cvs}.
+This is nothing to be concerned about,
+the update will just recreate the local file from the repository.
+(This is a convenient way to discard local changes to a file:
+just delete it and then run @code{cvs update}.)
+
address@hidden cvs update: warning: @var{file} is not (any longer) pertinent
+This means that the working copy of @var{file} has been deleted,
+it has not been removed from @sc{cvs} in the current working directory,
+but it has been removed from @sc{cvs} in some other working directory.
+This is nothing to be concerned about,
+the update would have removed the local file anyway.
+
address@hidden table
+
address@hidden Connection
address@hidden Trouble making a connection to a CVS server
+
+This section concerns what to do if you are having
+trouble making a connection to a @sc{cvs} server.  If
+you are running the @sc{cvs} command line client
+running on Windows, first upgrade the client to
address@hidden 1.9.12 or later.  The error reporting in
+earlier versions provided much less information about
+what the problem was.  If the client is non-Windows,
address@hidden 1.9 should be fine.
+
+If the error messages are not sufficient to track down
+the problem, the next steps depend largely on which
+access method you are using.
+
address@hidden @code
address@hidden :ext:, troubleshooting
address@hidden :ext:
+Try running the rsh program from the command line.  For
+example: "rsh servername cvs -v" should print @sc{cvs}
+version information.  If this doesn't work, you need to
+fix it before you can worry about @sc{cvs} problems.
+
address@hidden :server:, troubleshooting
address@hidden :server:
+You don't need a command line rsh program to use this
+access method, but if you have an rsh program around,
+it may be useful as a debugging tool.  Follow the
+directions given for :ext:.
+
address@hidden :pserver:, troubleshooting
address@hidden :pserver:
+Errors along the lines of "connection refused" typically indicate
+that inetd isn't even listening for connections on port 2401
+whereas errors like "connection reset by peer",
+"received broken pipe signal", "recv() from server: EOF",
+or "end of file from server"
+typically indicate that inetd is listening for
+connections but is unable to start @sc{cvs} (this is frequently
+caused by having an incorrect path in @file{inetd.conf}
+or by firewall software rejecting the connection).
+"unrecognized auth response" errors are caused by a bad command
+line in @file{inetd.conf}, typically an invalid option or forgetting
+to put the @samp{pserver} command at the end of the line.
+Another less common problem is invisible control characters that
+your editor "helpfully" added without you noticing.
+
+One good debugging tool is to "telnet servername
+2401".  After connecting, send any text (for example
+"foo" followed by return).  If @sc{cvs} is working
+correctly, it will respond with
+
address@hidden
+cvs [pserver aborted]: bad auth protocol start: foo
address@hidden example
+
+If instead you get:
+
address@hidden
+Usage: cvs [cvs-options] command [command-options-and-arguments]
+...
address@hidden example
+
address@hidden
+then you're missing the @samp{pserver} command at the end of the
+line in @file{inetd.conf}; check to make sure that the entire command
+is on one line and that it's complete.
+
+Likewise, if you get something like:
+
address@hidden
+Unknown command: `pserved'
+
+CVS commands are:
+        add          Add a new file/directory to the repository
+...
address@hidden example
+
address@hidden
+then you've misspelled @samp{pserver} in some way.  If it isn't
+obvious, check for invisible control characters (particularly
+carriage returns) in @file{inetd.conf}.
+
+If it fails to work at all, then make sure inetd is working
+right.  Change the invocation in @file{inetd.conf} to run the
+echo program instead of cvs.  For example:
+
address@hidden
+2401  stream  tcp  nowait  root /bin/echo echo hello
address@hidden example
+
+After making that change and instructing inetd to
+re-read its configuration file, "telnet servername
+2401" should show you the text hello and then the
+server should close the connection.  If this doesn't
+work, you need to fix it before you can worry about
address@hidden problems.
+
+On AIX systems, the system will often have its own
+program trying to use port 2401.  This is AIX's problem
+in the sense that port 2401 is registered for use with
address@hidden  I hear that there is an AIX patch available
+to address this problem.
+
+Another good debugging tool is the @samp{-d}
+(debugging) option to inetd.  Consult your system
+documentation for more information.
+
+If you seem to be connecting but get errors like:
+
address@hidden
+cvs server: cannot open /root/.cvsignore: Permission denied
+cvs [server aborted]: can't chdir(/root): Permission denied
address@hidden example
+
address@hidden
+then you probably haven't specified @samp{-f} in @file{inetd.conf}.
+(In releases prior to @sc{cvs} 1.11.1, this problem can be caused by
+your system setting the @code{$HOME} environment variable
+for programs being run by inetd.  In this case, you can either
+have inetd run a shell script that unsets @code{$HOME} and then runs
address@hidden, or you can use @code{env} to run @sc{cvs} with a pristine
+environment.)
+
+If you can connect successfully for a while but then can't,
+you've probably hit inetd's rate limit.
+(If inetd receives too many requests for the same service
+in a short period of time, it assumes that something is wrong
+and temporarily disables the service.)
+Check your inetd documentation to find out how to adjust the
+rate limit (some versions of inetd have a single rate limit,
+others allow you to set the limit for each service separately.)
address@hidden table
+
address@hidden Other problems
address@hidden Other common problems
+
+Here is a list of problems which do not fit into the
+above categories.  They are in no particular order.
+
address@hidden @bullet
address@hidden
+On Windows, if there is a 30 second or so delay when
+you run a @sc{cvs} command, it may mean that you have
+your home directory set to @file{C:/}, for example (see
address@hidden and @code{HOMEPATH} in
address@hidden variables}).  @sc{cvs} expects the home
+directory to not end in a slash, for example @file{C:}
+or @file{C:\cvs}.
address@hidden FIXCVS: CVS should at least detect this and print an
address@hidden error, presumably.
+
address@hidden
+If you are running @sc{cvs} 1.9.18 or older, and
address@hidden update} finds a conflict and tries to
+merge, as described in @ref{Conflicts example}, but
+doesn't tell you there were conflicts, then you may
+have an old version of @sc{rcs}.  The easiest solution
+probably is to upgrade to a current version of
address@hidden, which does not rely on external @sc{rcs}
+programs.
address@hidden itemize
+
address@hidden 
---------------------------------------------------------------------
address@hidden Credits
address@hidden Credits
+
address@hidden Contributors (manual)
address@hidden Credits (manual)
+Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}>
+wrote the manual pages which were distributed with
address@hidden 1.3.  Much of their text was copied into this
+manual.  He also read an early draft
+of this manual and contributed many ideas and
+corrections.
+
+The mailing-list @code{info-cvs} is sometimes
+informative. I have included information from postings
+made by the following persons:
+David G. Grubbs <@t{dgg@@think.com}>.
+
+Some text has been extracted from the man pages for
address@hidden
+
+The @sc{cvs} @sc{faq} by David G. Grubbs has provided
+useful material.  The @sc{faq} is no longer maintained,
+however, and this manual is about the closest thing there
+is to a successor (with respect to documenting how to
+use @sc{cvs}, at least).
+
+In addition, the following persons have helped by
+telling me about mistakes I've made:
+
address@hidden
+Roxanne Brunskill <@t{rbrunski@@datap.ca}>,
+Kathy Dyer <@t{dyer@@phoenix.ocf.llnl.gov}>,
+Karl Pingle <@t{pingle@@acuson.com}>,
+Thomas A Peterson <@t{tap@@src.honeywell.com}>,
+Inge Wallin <@t{ingwa@@signum.se}>,
+Dirk Koschuetzki <@t{koschuet@@fmi.uni-passau.de}>
+and Michael Brown <@t{brown@@wi.extrel.com}>.
address@hidden display
+
+The list of contributors here is not comprehensive; for a more
+complete list of who has contributed to this manual see
+the file @file{doc/ChangeLog} in the @sc{cvs} source
+distribution.
+
address@hidden 
---------------------------------------------------------------------
address@hidden BUGS
address@hidden Dealing with bugs in CVS or this manual
+
address@hidden Bugs in this manual or CVS
+Neither @sc{cvs} nor this manual is perfect, and they
+probably never will be.  If you are having trouble
+using @sc{cvs}, or think you have found a bug, there
+are a number of things you can do about it.  Note that
+if the manual is unclear, that can be considered a bug
+in the manual, so these problems are often worth doing
+something about as well as problems with @sc{cvs} itself.
+
address@hidden Reporting bugs
address@hidden Bugs, reporting
address@hidden Errors, reporting
address@hidden @bullet
address@hidden
+If you want someone to help you and fix bugs that you
+report, there are companies which will do that for a
+fee.  One such company is:
+
address@hidden Ximbiot
address@hidden Support, getting CVS support
address@hidden
+Ximbiot
+319 S. River St.
+Harrisburg, PA  17104-1657
+USA
+Email: info@@ximbiot.com
+Phone: (717) 579-6168
+Fax:   (717) 234-3125
address@hidden://ximbiot.com/}
+
address@hidden example
+
address@hidden
+If you got @sc{cvs} through a distributor, such as an
+operating system vendor or a vendor of freeware
address@hidden, you may wish to see whether the
+distributor provides support.  Often, they will provide
+no support or minimal support, but this may vary from
+distributor to distributor.
+
address@hidden
+If you have the skills and time to do so, you may wish
+to fix the bug yourself.  If you wish to submit your
+fix for inclusion in future releases of @sc{cvs}, see
+the file @sc{hacking} in the @sc{cvs} source
+distribution.  It contains much more information on the
+process of submitting fixes.
+
address@hidden
+There may be resources on the net which can help.  A
+good place to start is:
+
address@hidden
address@hidden://cvs.nongnu.org/}
address@hidden example
+
+If you are so inspired, increasing the information
+available on the net is likely to be appreciated.  For
+example, before the standard @sc{cvs} distribution
+worked on Windows 95, there was a web page with some
+explanation and patches for running @sc{cvs} on Windows
+95, and various people helped out by mentioning this
+page on mailing lists or newsgroups when the subject
+came up.
+
address@hidden
+It is also possible to report bugs to @email{bug-cvs@@nongnu.org}.
+Note that someone may or may not want to do anything
+with your bug report---if you need a solution consider
+one of the options mentioned above.  People probably do
+want to hear about bugs which are particularly severe
+in consequences and/or easy to fix, however.  You can
+also increase your odds by being as clear as possible
+about the exact nature of the bug and any other
+relevant information.  The way to report bugs is to
+send email to @email{bug-cvs@@nongnu.org}.  Note
+that submissions to @email{bug-cvs@@nongnu.org} may be distributed
+under the terms of the @sc{gnu} Public License, so if
+you don't like this, don't submit them.  There is
+usually no justification for sending mail directly to
+one of the @sc{cvs} maintainers rather than to
address@hidden@@nongnu.org}; those maintainers who want to hear
+about such bug reports read @email{bug-cvs@@nongnu.org}.  Also note
+that sending a bug report to other mailing lists or
+newsgroups is @emph{not} a substitute for sending it to
address@hidden@@nongnu.org}.  It is fine to discuss @sc{cvs} bugs on
+whatever forum you prefer, but there are not
+necessarily any maintainers reading bug reports sent
+anywhere except @email{bug-cvs@@nongnu.org}.
address@hidden itemize
+
address@hidden Known bugs in this manual or CVS
+People often ask if there is a list of known bugs or
+whether a particular bug is a known one.  The file
address@hidden in the @sc{cvs} source distribution is one
+list of known bugs, but it doesn't necessarily try to
+be comprehensive.  Perhaps there will never be a
+comprehensive, detailed list of known bugs.
+
address@hidden 
---------------------------------------------------------------------
address@hidden Index
address@hidden Index
address@hidden Index
+
address@hidden cp
+
address@hidden
+
+Local Variables:
+fill-column: 55
+End:
Index: ccvs/doc/cvsclient.texi
diff -u /dev/null ccvs/doc/cvsclient.texi:1.143.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/cvsclient.texi     Wed Dec 21 13:25:08 2005
@@ -0,0 +1,2253 @@
+\input texinfo @c -*- texinfo -*-
+
address@hidden cvsclient.info
address@hidden version-client.texi
+
address@hidden Programming
address@hidden
+* cvsclient: (cvsclient).      The CVS client/server protocol.
address@hidden direntry
+
address@hidden Top
address@hidden CVS Client/Server
+
+This document describes the client/server protocol used by CVS.  It does
+not describe how to use or administer client/server CVS; see the regular
+CVS manual for that.  This is version @value{VERSION} of the protocol
address@hidden, for more on what this version number
+means.
+
address@hidden
+* Introduction::      What is CVS and what is the client/server protocol for?
+* Goals::             Basic design decisions, requirements, scope, etc.
+* Connection and Authentication::  Various ways to connect to the server
+* Password scrambling::  Scrambling used by pserver
+* Protocol::          Complete description of the protocol
+* Protocol Notes::    Possible enhancements, limitations, etc. of the protocol
address@hidden menu
+
address@hidden Introduction
address@hidden Introduction
+
+CVS is a version control system (with some additional configuration
+management functionality).  It maintains a central @dfn{repository}
+which stores files (often source code), including past versions,
+information about who modified them and when, and so on.  People who
+wish to look at or modify those files, known as @dfn{developers}, use
+CVS to @dfn{check out} a @dfn{working directory} from the repository, to
address@hidden in} new versions of files to the repository, and other
+operations such as viewing the modification history of a file.  If
+developers are connected to the repository by a network, particularly a
+slow or flaky one, the most efficient way to use the network is with the
+CVS-specific protocol described in this document.
+
+Developers, using the machine on which they store their working
+directory, run the CVS @dfn{client} program.  To perform operations
+which cannot be done locally, it connects to the CVS @dfn{server}
+program, which maintains the repository.  For more information on how
+to connect see @ref{Connection and Authentication}.
+
+This document describes the CVS protocol.  Unfortunately, it does not
+yet completely document one aspect of the protocol---the detailed
+operation of each CVS command and option---and one must look at the CVS
+user documentation, @file{cvs.texinfo}, for that information.  The
+protocol is non-proprietary (anyone who wants to is encouraged to
+implement it) and an implementation, known as CVS, is available under
+the GNU Public License.  The CVS distribution, containing this
+implementation, @file{cvs.texinfo}, and a copy (possibly more or less up
+to date than what you are reading now) of this document,
address@hidden, can be found at the usual GNU FTP sites, with a
+filename such as @address@hidden
+
+This is version @value{VERSION} of the protocol specification.  This
+version number is intended only to aid in distinguishing different
+versions of this specification.  Although the specification is currently
+maintained in conjunction with the CVS implementation, and carries the
+same version number, it also intends to document what is involved with
+interoperating with other implementations (such as other versions of
+CVS); see @ref{Requirements}.  This version number should not be used
+by clients or servers to determine what variant of the protocol to
+speak; they should instead use the @code{valid-requests} and
address@hidden mechanism (@pxref{Protocol}), which is more
+flexible.
+
address@hidden Goals
address@hidden Goals
+
address@hidden @bullet
address@hidden
+Do not assume any access to the repository other than via this protocol.
+It does not depend on NFS, rdist, etc.
+
address@hidden
+Providing a reliable transport is outside this protocol.  The protocol
+expects a reliable transport that is transparent (that is, there is no
+translation of characters, including characters such as
+linefeeds or carriage returns), and can transmit all 256 octets (for
+example for proper handling of binary files, compression, and
+encryption).  The encoding of characters specified by the protocol (the
+names of requests and so on) is the invariant ISO 646 character set (a
+subset of most popular character sets including ASCII and others).  For
+more details on running the protocol over the TCP reliable transport,
+see @ref{Connection and Authentication}.
+
address@hidden
+Security and authentication are handled outside this protocol (but see
+below about @samp{cvs kserver} and @samp{cvs pserver}).
+
address@hidden
+The protocol makes it possible for updates to be atomic with respect to
+checkins; that is if someone commits changes to several files in one cvs
+command, then an update by someone else would either get all the
+changes, or none of them.  The current @sc{cvs} server can't do this,
+but that isn't the protocol's fault.
+
address@hidden
+The protocol is, with a few exceptions, transaction-based.  That is, the
+client sends all its requests (without waiting for server responses),
+and then waits for the server to send back all responses (without
+waiting for further client requests).  This has the advantage of
+minimizing network turnarounds and the disadvantage of sometimes
+transferring more data than would be necessary if there were a richer
+interaction.  Another, more subtle, advantage is that there is no need
+for the protocol to provide locking for features such as making checkins
+atomic with respect to updates.  Any such locking can be handled
+entirely by the server.  A good server implementation (such as the
+current @sc{cvs} server) will make sure that it does not have any such
+locks in place whenever it is waiting for communication with the client;
+this prevents one client on a slow or flaky network from interfering
+with the work of others.
+
address@hidden
+It is a general design goal to provide only one way to do a given
+operation (where possible).  For example, implementations have no choice
+about whether to terminate lines with linefeeds or some other
+character(s), and request and response names are case-sensitive.  This
+is to enhance interoperability.  If a protocol allows more than one way
+to do something, it is all too easy for some implementations to support
+only some of them (perhaps accidentally).
address@hidden I vaguely remember reading, probably in an RFC, about the 
problems
address@hidden that were caused when some people decided that SMTP should accept
address@hidden other line termination (in the message ("DATA")?) than CRLF.  
However, I
address@hidden can't seem to track down the reference.
address@hidden itemize
+
address@hidden Connection and Authentication
address@hidden How to Connect to and Authenticate Oneself to the CVS server
+
+Connection and authentication occurs before the CVS protocol itself is
+started.  There are several ways to connect.
+
address@hidden @asis
address@hidden server
+If the client has a way to execute commands on the server, and provide
+input to the commands and output from them, then it can connect that
+way.  This could be the usual rsh (port 514) protocol, Kerberos rsh,
+SSH, or any similar mechanism.  The client may allow the user to specify
+the name of the server program; the default is @code{cvs}.  It is
+invoked with one argument, @code{server}.  Once it invokes the server,
+the client proceeds to start the cvs protocol.
+
address@hidden kserver
+The kerberized server listens on a port (in the current implementation,
+by having inetd call "cvs kserver") which defaults to 1999.  The client
+connects, sends the usual kerberos authentication information, and then
+starts the cvs protocol.  Note: port 1999 is officially registered for
+another use, and in any event one cannot register more than one port for
+CVS, so GSS-API (see below) is recommended instead of kserver as a way
+to support kerberos.
+
address@hidden pserver
+The name @dfn{pserver} is somewhat confusing.  It refers to both a
+generic framework which allows the CVS protocol to support several
+authentication mechanisms, and a name for a specific mechanism which
+transfers a username and a cleartext password.  Servers need not support
+all mechanisms, and in fact servers will typically want to support only
+those mechanisms which meet the relevant security needs.
+
+The pserver server listens on a port (in the current
+implementation, by having inetd call "cvs pserver") which defaults to
+2401 (this port is officially registered).  The client
+connects, and sends the following:
+
address@hidden @bullet
address@hidden
+the string @samp{BEGIN AUTH REQUEST}, a linefeed, 
address@hidden
+the cvs root, a linefeed,
address@hidden
+the username, a linefeed,
address@hidden
+the password trivially encoded (see @ref{Password scrambling}), a
+linefeed,
address@hidden
+the string @samp{END AUTH REQUEST}, and a linefeed.
address@hidden itemize
+
+The client must send the
+identical string for cvs root both here and later in the
address@hidden request of the cvs
+protocol itself.  Servers are encouraged to enforce this restriction.
+The possible server responses (each of which is followed by a linefeed)
+are the following.  Note that although there is a small similarity
+between this authentication protocol and the cvs protocol, they are
+separate.
+
address@hidden @code
address@hidden I LOVE YOU
+The authentication is successful.  The client proceeds with the cvs
+protocol itself.
+
address@hidden I HATE YOU
+The authentication fails.  After sending this response, the server may
+close the connection.  It is up to the server to decide whether to give
+this response, which is generic, or a more specific response using
address@hidden and/or @samp{error}.
+
address@hidden E @var{text}
+Provide a message for the user.  After this reponse, the authentication
+protocol continues with another response.  Typically the server will
+provide a series of @samp{E} responses followed by @samp{error}.
+Compatibility note: @sc{cvs} 1.9.10 and older clients will print
address@hidden auth response} and @var{text}, and then exit, upon
+receiving this response.
+
address@hidden error @var{code} @var{text}
+The authentication fails.  After sending this response, the server may
+close the connection.  The @var{code} is a code describing why it
+failed, intended for computer consumption.  The only code currently
+defined is @samp{0} which is nonspecific, but clients must silently
+treat any unrecognized codes as nonspecific.
+The @var{text} should be supplied to the
+user.  Compatibility note: @sc{cvs} 1.9.10 and older clients will print
address@hidden auth response} and @var{text}, and then exit, upon
+receiving this response.
+Note that @var{text} for this response, or the @var{text} in an @code{E}
+response, is not designed for machine parsing.  More vigorous use of
address@hidden, or future extensions, will be needed to prove a cleaner
+machine-parseable indication of what the error was.
address@hidden table
+
address@hidden If you are thinking of putting samp or code around BEGIN AUTH 
REQUEST
address@hidden and friends, watch for overfull hboxes.
+If the client wishes to merely authenticate without starting the cvs
+protocol, the procedure is the same, except BEGIN AUTH REQUEST is
+replaced with BEGIN VERIFICATION REQUEST, END AUTH REQUEST
+is replaced with END VERIFICATION REQUEST, and upon receipt of
+I LOVE YOU the connection is closed rather than continuing.
+
+Another mechanism is GSSAPI authentication.  GSSAPI is a
+generic interface to security services such as kerberos.  GSSAPI is
+specified in RFC2078 (GSSAPI version 2) and RFC1508 (GSSAPI version 1);
+we are not aware of differences between the two which affect the
+protocol in incompatible ways, so we make no attempt to specify one
+version or the other.
+The procedure here is to start with @samp{BEGIN
+GSSAPI REQUEST}.  GSSAPI authentication information is then exchanged
+between the client and the server.  Each packet of information consists
+of a two byte big endian length, followed by that many bytes of data.
+After the GSSAPI authentication is complete, the server continues with
+the responses described above (@samp{I LOVE YOU}, etc.).
+
address@hidden future possibilities
+There are a nearly unlimited number of ways to connect and authenticate.
+One might want to allow access based on IP address (similar to the usual
+rsh protocol but with different/no restrictions on ports < 1024), to
+adopt mechanisms such as Pluggable Authentication Modules (PAM), to
+allow users to run their own servers under their own usernames without
+root access, or any number of other possibilities.  The way to add
+future mechanisms, for the most part, should be to continue to use port
+2401, but to use different strings in place of @samp{BEGIN AUTH
+REQUEST}.
address@hidden table
+
address@hidden Password scrambling
address@hidden Password scrambling algorithm
+
+The pserver authentication protocol, as described in @ref{Connection and
+Authentication}, trivially encodes the passwords.  This is only to
+prevent inadvertent compromise; it provides no protection against even a
+relatively unsophisticated attacker.  For comparison, HTTP Basic
+Authentication (as described in RFC2068) uses BASE64 for a similar
+purpose.  CVS uses its own algorithm, described here.
+
+The scrambled password starts with @samp{A}, which serves to identify
+the scrambling algorithm in use.  After that follows a single octet for
+each character in the password, according to a fixed encoding.  The
+values are shown here, with the encoded values in decimal.  Control
+characters, space, and characters outside the invariant ISO 646
+character set are not shown; such characters are not recommended for use
+in passwords.  There is a long discussion of character set issues in
address@hidden Notes}.
+
address@hidden
+        0 111           P 125           p  58
+! 120   1  52   A  57   Q  55   a 121   q 113
+"  53   2  75   B  83   R  54   b 117   r  32
+        3 119   C  43   S  66   c 104   s  90
+        4  49   D  46   T 124   d 101   t  44
+% 109   5  34   E 102   U 126   e 100   u  98
+&  72   6  82   F  40   V  59   f  69   v  60
+' 108   7  81   G  89   W  47   g  73   w  51
+(  70   8  95   H  38   X  92   h  99   x  33
+)  64   9  65   I 103   Y  71   i  63   y  97
+*  76   : 112   J  45   Z 115   j  94   z  62
++  67   ;  86   K  50           k  93
+, 116   < 118   L  42           l  39
+-  74   = 110   M 123           m  37
+.  68   > 122   N  91           n  61
+/  87   ? 105   O  35   _  56   o  48
address@hidden example
+
address@hidden Protocol
address@hidden The CVS client/server protocol
+
+In the following, @samp{\n} refers to a linefeed and @samp{\t} refers to
+a horizontal tab; @dfn{requests} are what the client sends and
address@hidden are what the server sends.  In general, the connection is
+governed by the client---the server does not send responses without
+first receiving requests to do so; see @ref{Response intro} for more
+details of this convention.
+
+It is typical, early in the connection, for the client to transmit a
address@hidden request, containing all the responses it
+supports, followed by a @code{valid-requests} request, which elicits
+from the server a @code{Valid-requests} response containing all the
+requests it understands.  In this way, the client and server each find
+out what the other supports before exchanging large amounts of data
+(such as file contents).
+
address@hidden Hmm, having 3 sections in this menu makes a certain amount of 
sense
address@hidden but that structure gets lost in the printed manual (not sure 
about
address@hidden HTML).  Perhaps there is a better way.
address@hidden
+
+General protocol conventions:
+
+* Entries Lines::                   Transmitting RCS data
+* File Modes::                      Read, write, execute, and possibly more...
+* Filenames::                       Conventions regarding filenames
+* File transmissions::              How file contents are transmitted
+* Strings::                         Strings in various requests and responses
+* Dates::                           Times and dates
+
+The protocol itself:
+
+* Request intro::                   General conventions relating to requests
+* Requests::                        List of requests
+* Response intro::                  General conventions relating to responses
+* Response pathnames::              The "pathname" in responses
+* Responses::                       List of responses
+* Text tags::                       More details about the MT response
+
+An example session, and some further observations:
+
+* Example::                         A conversation between client and server
+* Requirements::                    Things not to omit from an implementation
+* Obsolete::                        Former protocol features
address@hidden menu
+
address@hidden Entries Lines
address@hidden Entries Lines
+
+Entries lines are transmitted as:
+
address@hidden
+/ @var{name} / @var{version} / @var{conflict} / @var{options} / 
@var{tag_or_date}
address@hidden example
+
address@hidden is either @samp{T} @var{tag} or @samp{D} @var{date}
+or empty.  If it is followed by a slash, anything after the slash
+shall be silently ignored.
+
address@hidden can be empty, or start with @samp{0} or @samp{-}, for no
+user file, new user file, or user file to be removed, respectively.
+
address@hidden FIXME: should distinguish sender and receiver behavior here; the
address@hidden "anything else" and "does not start with" are intended for future
address@hidden expansion, and we should specify a sender behavior.
address@hidden, if it starts with @samp{+}, indicates that the file had
+conflicts in it.  The rest of @var{conflict} is @samp{=} if the
+timestamp matches the file, or anything else if it doesn't.  If
address@hidden does not start with a @samp{+}, it is silently ignored.
+
address@hidden signifies the keyword expansion options (for example
address@hidden).  In an @code{Entry} request, this indicates the options
+that were specified with the file from the previous file updating
+response (@pxref{Response intro}, for a list of file updating
+responses); if the client is specifying the @samp{-k} or @samp{-A}
+option to @code{update}, then it is the server which figures out what
+overrides what.
+
address@hidden File Modes
address@hidden File Modes
+
+A mode is any number of repetitions of
+
address@hidden
address@hidden = @var{data}
address@hidden example
+
+separated by @samp{,}.
+
address@hidden is an identifier composed of alphanumeric characters.
+Currently specified: @samp{u} for user, @samp{g} for group, @samp{o}
+for other (see below for discussion of whether these have their POSIX
+meaning or are more loose).  Unrecognized values of @var{mode-type}
+are silently ignored.
+
address@hidden consists of any data not containing @samp{,}, @samp{\0} or
address@hidden  For @samp{u}, @samp{g}, and @samp{o} mode types, data
+consists of alphanumeric characters, where @samp{r} means read, @samp{w}
+means write, @samp{x} means execute, and unrecognized letters are
+silently ignored.
+
+The two most obvious ways in which the mode matters are: (1) is it
+writeable?  This is used by the developer communication features, and
+is implemented even on OS/2 (and could be implemented on DOS), whose
+notion of mode is limited to a readonly bit. (2) is it executable?
+Unix CVS users need CVS to store this setting (for shell scripts and
+the like).  The current CVS implementation on unix does a little bit
+more than just maintain these two settings, but it doesn't really have
+a nice general facility to store or version control the mode, even on
+unix, much less across operating systems with diverse protection
+features.  So all the ins and outs of what the mode means across
+operating systems haven't really been worked out (e.g. should the VMS
+port use ACLs to get POSIX semantics for groups?).
+
address@hidden Filenames
address@hidden Conventions regarding transmission of file names
+
+In most contexts, @samp{/} is used to separate directory and file
+names in filenames, and any use of other conventions (for example,
+that the user might type on the command line) is converted to that
+form.  The only exceptions might be a few cases in which the server
+provides a magic cookie which the client then repeats verbatim, but as
+the server has not yet been ported beyond unix, the two rules provide
+the same answer (and what to do if future server ports are operating
+on a repository like e:/foo or CVS_ROOT:[FOO.BAR] has not been
+carefully thought out).
+
+Characters outside the invariant ISO 646 character set should be avoided
+in filenames.  This restriction may need to be relaxed to allow for
+characters such as @samp{[} and @samp{]} (see above about non-unix
+servers); this has not been carefully considered (and currently
+implementations probably use whatever character sets that the operating
+systems they are running on allow, and/or that users specify).  Of
+course the most portable practice is to restrict oneself further, to the
+POSIX portable filename character set as specified in POSIX.1.
+
address@hidden File transmissions
address@hidden File transmissions
+
+File contents (noted below as @var{file transmission}) can be sent in
+one of two forms.  The simpler form is a number of bytes, followed by a
+linefeed, followed by the specified number of bytes of file contents.
+These are the entire contents of the specified file.  Second, if both
+client and server support @samp{gzip-file-contents}, a @samp{z} may
+precede the length, and the `file contents' sent are actually compressed
+with @samp{gzip} (RFC1952/1951) compression.  The length specified is
+that of the compressed version of the file.
+
+In neither case are the file content followed by any additional data.
+The transmission of a file will end with a linefeed iff that file (or its
+compressed form) ends with a linefeed.
+
+The encoding of file contents depends on the value for the @samp{-k}
+option.  If the file is binary (as specified by the @samp{-kb} option in
+the appropriate place), then it is just a certain number of octets, and
+the protocol contributes nothing towards determining the encoding (using
+the file name is one widespread, if not universally popular, mechanism).
+If the file is text (not binary), then the file is sent as a series of
+lines, separated by linefeeds.  If the keyword expansion is set to
+something other than @samp{-ko}, then it is expected that the file
+conform to the RCS expectations regarding keyword expansion---in
+particular, that it is in a character set such as ASCII in which 0x24 is
+a dollar sign (@samp{$}).
+
address@hidden Strings
address@hidden Strings
+
+In various contexts, for example the @code{Argument} request and the
address@hidden response, one transmits what is essentially an arbitrary
+string.  Often this will have been supplied by the user (for example,
+the @samp{-m} option to the @code{ci} request).  The protocol has no
+mechanism to specify the character set of such strings; it would be
+fairly safe to stick to the invariant ISO 646 character set but the
+existing practice is probably to just transmit whatever the user
+specifies, and hope that everyone involved agrees which character set is
+in use, or sticks to a common subset.
+
address@hidden Dates
address@hidden Dates
+
+The protocol contains times and dates in various places.
+
+For the @samp{-D} option to the @code{annotate}, @code{co}, @code{diff},
address@hidden, @code{history}, @code{rannotate}, @code{rdiff},
address@hidden, @code{tag},
+and @code{update} requests, the server should support two formats:
+
address@hidden
+26 May 1997 13:01:40 -0000  ; @r{RFC 822 as modified by RFC 1123}
+5/26/1997 13:01:40 GMT    ; @r{traditional}
address@hidden example
+
+The former format is preferred; the latter however is sent by the CVS
+command line client (versions 1.5 through at least 1.9).
+
+For the @samp{-d} option to the @code{log} and @code{rlog} requests,
+servers should at
+least support RFC 822/1123 format.  Clients are encouraged to use this
+format too (the command line CVS client, version 1.10 and older, just passed
+along the date format specified by the user, however).
+
+The @code{Mod-time} response and @code{Checkin-time} request use RFC
+822/1123 format (see the descriptions of that response and request for
+details).
+
+For @code{Notify}, see the description of that request.
+
address@hidden Request intro
address@hidden Request intro
+
+By convention, requests which begin with a capital letter do not elicit
+a response from the server, while all others do -- save one.  The
+exception is @samp{gzip-file-contents}.  Unrecognized requests will
+always elicit a response from the server, even if that request begins
+with a capital letter.
+
+The term @dfn{command} means a request which expects a response (except
address@hidden).  The general model is that the client transmits
+a great number of requests, but nothing happens until the very end when
+the client transmits a command.  Although the intention is that
+transmitting several commands in one connection should be legal,
+existing servers probably have some bugs with some combinations of more
+than one command, and so clients may find it necessary to make several
+connections in some cases.  This should be thought of as a workaround
+rather than a desired attribute of the protocol.
+
address@hidden Requests
address@hidden Requests
+
+Here are the requests:
+
address@hidden @code
address@hidden Root @var{pathname} \n
+Response expected: no.  Tell the server which @code{CVSROOT} to use.
+Note that @var{pathname} is @emph{not} a fully qualified @code{CVSROOT}
+variable, but only the local directory part of it.  @var{pathname} must
+already exist on the server; if creating a new root, use the @code{init}
+request, not @code{Root}.  Again, @var{pathname} @emph{does not} include
+the hostname of the server, how to access the server, etc.; by the time
+the CVS protocol is in use, connection, authentication, etc., are
+already taken care of.
+
+The @code{Root} request must be sent only once, and it must be sent
+before any requests other than @code{Valid-responses},
address@hidden, @code{UseUnchanged}, @code{Set},
address@hidden, @code{init}, @code{noop}, or @code{version}.
+
address@hidden Valid-responses @var{request-list} \n
+Response expected: no.
+Tell the server what responses the client will accept.
+request-list is a space separated list of tokens.
+The @code{Root} request need not have been previously sent.
+
address@hidden valid-requests \n
+Response expected: yes.
+Ask the server to send back a @code{Valid-requests} response.
+The @code{Root} request need not have been previously sent.
+
address@hidden Command-prep @var{command} \n
+Response expected: yes.
+Notify the server of the command that we are leading up to.  Intended to allow
+the server to send a redirect for write operations.  Requires either an
address@hidden or @code{Redirect} respnose.
+
address@hidden Referrer @var{CVSROOT} \n
+Response expected: no.
+Notify a primary server of a server which referred us.  Intended to allow
+a primary (write) server to update the read-only mirror a client is using
+for reads to minimize races on any subsequent updates from the client.
+
address@hidden Directory @var{local-directory} \n
address@hidden Relative-directory @var{local-directory} \n
+Additional data: @var{repository} \n.  Response expected: no.
+Tell the server what directory to use.
+
+The @var{repository} should be a directory name from a previous server
+response and may be specified either relative to the @var{pathname} provided
+with the @code{Root} request or absolute.  Relative or absolute, it must
+specify a path within @var{pathname}.
+
+Prior to @sc{cvs} version @strong{FIXME - release number 1.12.10?},
address@hidden had to be absolute and @code{Relative-directory} was not a
+valid request.  The @code{Relative-directory} request is synonymous with
address@hidden and is provided to alert modern clients that a relative
address@hidden is acceptable.
+
+Note that this both gives a default for @code{Entry} and @code{Modified} and
+also for @code{ci} and the other commands; normal usage is to send 
address@hidden for each directory in which there will be an
address@hidden or @code{Modified}, and then a final @code{Directory}
+for the original directory, then the command.
+The @var{local-directory} is relative to
+the top level at which the command is occurring (i.e. the last
address@hidden which is sent before the command);
+to indicate that top level, @samp{.} should be sent for
address@hidden
+
+Here is an example of where a client gets @var{repository} and
address@hidden  Suppose that there is a module defined by
+
address@hidden
+moddir 1dir
address@hidden example
+
+That is, one can check out @code{moddir} and it will take @code{1dir} in
+the repository and check it out to @code{moddir} in the working
+directory.  Then an initial check out could proceed like this:
+
address@hidden
+C: Root /home/kingdon/zwork/cvsroot
+. . .
+C: Argument moddir
+C: Directory .
+C: .
+C: co
+S: Clear-sticky moddir/
+S: 1dir/
+. . .
+S: ok
address@hidden example
+
+In this example the response shown is @code{Clear-sticky}, but it could
+be another response instead.  Note that it returns two pathnames.
+The first one, @file{moddir/}, indicates the working
+directory to check out into.  The second one, ending in @file{1dir/},
+indicates the directory to pass back to the server in a subsequent
address@hidden request.  For example, a subsequent @code{update}
+request might look like:
+
address@hidden
+C: Directory moddir
+C: 1dir
+. . .
+C: update
address@hidden example
+
+For a given @var{local-directory}, the repository will be the same for
+each of the responses, so one can use the repository from whichever
+response is most convenient.  Typically a client will store the
+repository along with the sources for each @var{local-directory}, use
+that same setting whenever operating on that @var{local-directory}, and
+not update the setting as long as the @var{local-directory} exists.
+
+A client is free to rename a @var{local-directory} at any time (for
+example, in response to an explicit user request).  While it is true
+that the server supplies a @var{local-directory} to the client, as noted
+above, this is only the default place to put the directory.  Of course,
+the various @code{Directory} requests for a single command (for example,
address@hidden or @code{ci} request) should name a particular directory
+with the same @var{local-directory}.
+
+Each @code{Directory} request specifies a brand-new
address@hidden and @var{repository}; that is,
address@hidden and @var{repository} are never relative to paths
+specified in any previous @code{Directory} request.
+
+Here's a more complex example, in which we request an update of a
+working directory which has been checked out from multiple places in the
+repository.
+
address@hidden
+C: Argument dir1
+C: Directory dir1
+C: mod1
+. . .
+C: Argument dir2
+C: Directory dir2
+C: mod2
+. . .
+C: Argument dir3
+C: Directory dir3/subdir3
+C: mod3
+. . .
+C: update
address@hidden example
+
+While directories @code{dir1} and @code{dir2} will be handled in similar
+fashion to the other examples given above, @code{dir3} is slightly
+different from the server's standpoint.  Notice that module @code{mod3}
+is actually checked out into @code{dir3/subdir3}, meaning that directory
address@hidden is either empty or does not contain data checked out from
+this repository.  
+
+The above example will work correctly in @sc{cvs} 1.10.1 and later.  The
+server will descend the tree starting from all directories mentioned in
address@hidden requests and update those directories specifically
+mentioned in @code{Directory} requests.
+
+Previous versions of @sc{cvs} (1.10 and earlier) do not behave the same
+way.  While the descent of the tree begins at all directories mentioned
+in @code{Argument} requests, descent into subdirectories only occurs if
+a directory has been mentioned in a @code{Directory} request.
+Therefore, the above example would succeed in updating @code{dir1} and
address@hidden, but would skip @code{dir3} because that directory was not
+specifically mentioned in a @code{Directory} request.  A functional
+version of the above that would run on a 1.10 or earlier server is as
+follows:
+
address@hidden
+C: Argument dir1
+C: Directory dir1
+C: mod1
+. . .
+C: Argument dir2
+C: Directory dir2
+C: mod2
+. . .
+C: Argument dir3
+C: Directory dir3
+C: .
+. . .
+C: Directory dir3/subdir3
+C: mod3
+. . .
+C: update
address@hidden example
+
+Note the extra @code{Directory dir3} request.  It might be better to use
address@hidden as the repository for the @code{dir3} directory, but the
+above will certainly work.
+
+One more peculiarity of the 1.10 and earlier protocol is the ordering of
address@hidden arguments.  In order for a subdirectory to be
+registered correctly for descent by the recursion processor, its parent
+must be sent first.  For example, the following would not work to update
address@hidden/subdir3}:
+
address@hidden
+. . .
+C: Argument dir3
+C: Directory dir3/subdir3
+C: mod3
+. . .
+C: Directory dir3
+C: .
+. . .
+C: update
address@hidden example
+
+The implementation of the server in 1.10 and earlier writes the
+administration files for a given directory at the time of the
address@hidden request.  It also tries to register the directory with
+its parent to mark it for recursion.  In the above example, at the time
address@hidden/subdir3} is created, the physical directory for @code{dir3}
+will be created on disk, but the administration files will not have been
+created.  Therefore, when the server tries to register
address@hidden/subdir3} for recursion, the operation will silently fail
+because the administration files do not yet exist for @code{dir3}.
+
address@hidden Max-dotdot @var{level} \n
+Response expected: no.
+Tell the server that @var{level} levels of directories above the
+directory which @code{Directory} requests are relative to will be
+needed.  For example, if the client is planning to use a
address@hidden request for @file{../../foo}, it must send a
address@hidden request with a @var{level} of at least 2.
address@hidden must be sent before the first @code{Directory}
+request.
+
address@hidden Static-directory \n
+Response expected: no.  Tell the server that the directory most recently
+specified with @code{Directory} should not have
+additional files checked out unless explicitly requested.  The client
+sends this if the @code{Entries.Static} flag is set, which is controlled
+by the @code{Set-static-directory} and @code{Clear-static-directory}
+responses.
+
address@hidden Sticky @var{tagspec} \n
+Response expected: no.  Tell the server that the directory most recently
+specified with @code{Directory} has a sticky tag or date @var{tagspec}.
+The first character of @var{tagspec} is @samp{T} for a tag, @samp{D}
+for a date, or some other character supplied by a Set-sticky response
+from a previous request to the server.  The remainder of @var{tagspec}
+contains the actual tag or date, again as supplied by Set-sticky.
+
+The server should remember @code{Static-directory} and @code{Sticky}
+requests for a particular directory; the client need not resend them
+each time it sends a @code{Directory} request for a given directory.
+However, the server is not obliged to remember them beyond the context
+of a single command.
+
address@hidden Checkin-prog @var{program} \n
+Response expected: no.  Tell the server that the directory most recently
+specified with @code{Directory} has a checkin program @var{program}.
+Such a program would have been previously set with the
address@hidden response.
+
address@hidden Update-prog @var{program} \n
+Response expected: no.  Tell the server that the directory most recently
+specified with @code{Directory} has an update program @var{program}.
+Such a program would have been previously set with the
address@hidden response.
+
address@hidden Entry @var{entry-line} \n
+Response expected: no.  Tell the server what version of a file is on the
+local machine.  The name in @var{entry-line} is a name relative to the
+directory most recently specified with @code{Directory}.  If the user
+is operating on only some files in a directory, @code{Entry} requests
+for only those files need be included.  If an @code{Entry} request is
+sent without @code{Modified}, @code{Is-modified}, or @code{Unchanged},
+it means the file is
+lost (does not exist in the working directory).  If both @code{Entry}
+and one of @code{Modified}, @code{Is-modified}, or @code{Unchanged} are
+sent for the same file, @code{Entry} must be sent first.  For a
+given file, one can send @code{Modified}, @code{Is-modified}, or
address@hidden, but not more than one of these three.
+
address@hidden Kopt @var{option} \n
+This indicates to the server which keyword expansion options to use for
+the file specified by the next @code{Modified} or @code{Is-modified}
+request (for example @samp{-kb} for a binary file).  This is similar to
address@hidden, but is used for a file for which there is no entries line.
+Typically this will be a file being added via an @code{add} or
address@hidden request.  The client may not send both @code{Kopt} and
address@hidden for the same file.
+
address@hidden Checkin-time @var{time} \n
+For the file specified by the next @code{Modified} request, use
address@hidden as the time of the checkin.  The @var{time} is in the format
+specified by RFC822 as modified by RFC1123.  The client may specify any
+timezone it chooses; servers will want to convert that to their own
+timezone as appropriate.  An example of this format is:
+
address@hidden
+26 May 1997 13:01:40 -0400
address@hidden example
+
+There is no requirement that the client and server clocks be
+synchronized.  The client just sends its recommendation for a timestamp
+(based on file timestamps or whatever), and the server should just believe
+it (this means that the time might be in the future, for example).
+
+Note that this is not a general-purpose way to tell the server about the
+timestamp of a file; that would be a separate request (if there are
+servers which can maintain timestamp and time of checkin separately).
+
+This request should affect the @code{import} request, and may optionally
+affect the @code{ci} request or other relevant requests if any.
+
address@hidden Signature \n
+Response expect: no.  Additional data: signature transmission.
+Send the server the OpenPGP signature for the next Modified request.
+The OpenPGP signature should be
address@hidden://www.ietf.org/rfc/rfc2440.txt, RFC 2440} compliant.
+
address@hidden Modified @var{filename} \n
+Response expected: no.  Additional data: mode, \n, file transmission.
+Send the server a copy of one locally modified file.  @var{filename} is
+a file within the most recent directory sent with @code{Directory}; it
+must not contain @samp{/}.  If
+the user is operating on only some files in a directory, only those
+files need to be included.  This can also be sent without @code{Entry},
+if there is no entry for the file.
+
address@hidden Is-modified @var{filename} \n
+Response expected: no.  Additional data: none.  Like @code{Modified},
+but used if the server only needs
+to know whether the file is modified, not the contents.
+
+The commands which can take @code{Is-modified} instead of
address@hidden with no known change in behavior are: @code{admin},
address@hidden (if and only if two @samp{-r} or @samp{-D} options are
+specified), @code{watch-on}, @code{watch-off}, @code{watch-add},
address@hidden, @code{watchers}, @code{editors},
address@hidden, and @code{annotate}.
+
+For the @code{status} command, one can send @code{Is-modified} but if
+the client is using imperfect mechanisms such as timestamps to determine
+whether to consider a file modified, then the behavior will be
+different.  That is, if one sends @code{Modified}, then the server will
+actually compare the contents of the file sent and the one it derives
+from to determine whether the file is genuinely modified.  But if one
+sends @code{Is-modified}, then the server takes the client's word for
+it.  A similar situation exists for @code{tag}, if the @samp{-c} option
+is specified.
+
+Commands for which @code{Modified} is necessary are @code{co},
address@hidden, @code{update}, and @code{import}.
+
+Commands which do not need to inform the server about a working
+directory, and thus should not be sending either @code{Modified} or
address@hidden: @code{rdiff}, @code{rtag}, @code{history},
address@hidden, and @code{release}.
+
+Commands for which further investigation is warranted are:
address@hidden, @code{add}, and @code{export}.  Pending such
+investigation, the more conservative course of action is to stick to
address@hidden
+
address@hidden Unchanged @var{filename} \n
+Response expected: no.  Tell the server that @var{filename} has not been
+modified in the checked out directory.  The @var{filename} is
+a file within the most recent directory sent with @code{Directory}; it
+must not contain @samp{/}.
+
address@hidden UseUnchanged \n
+Response expected: no.  To specify the version of the protocol described
+in this document, servers must support this request (although it need
+not do anything) and clients must issue it.
+The @code{Root} request need not have been previously sent.
+
address@hidden Notify @var{filename} \n
+Response expected: no.
+Tell the server that an @code{edit} or @code{unedit} command has taken
+place.  The server needs to send a @code{Notified} response, but such
+response is deferred until the next time that the server is sending
+responses.
+The @var{filename} is a file within the most recent directory sent with
address@hidden; it must not contain @samp{/}.
+Additional data:
address@hidden
address@hidden \t @var{time} \t @var{clienthost} \t
address@hidden \t @var{watches} \n
address@hidden example
+where @var{notification-type} is @samp{E} for edit, @samp{U} for
+unedit, undefined behavior if @samp{C}, and all other letters should be
+silently ignored for future expansion.
address@hidden is the time at which the edit or unedit took place, in a
+user-readable format of the client's choice (the server should treat the
+time as an opaque string rather than interpreting it).
address@hidden Might be useful to specify a format, but I don't know if we want 
to
address@hidden specify the status quo (ISO C asctime() format plus timezone) 
without
address@hidden offering the option of ISO8601 and/or RFC822/1123 (see 
cvs.texinfo
address@hidden for much much more on date formats).
address@hidden is the name of the host on which the edit or unedit
+took place, and @var{working-dir} is the pathname of the working
+directory where the edit or unedit took place.  @var{watches} are the
+temporary watches, zero or more of the following characters in the
+following order: @samp{E} for edit, @samp{U} for unedit, @samp{C} for
+commit, and all other letters should be silently ignored for future
+expansion.  If @var{notification-type} is @samp{E} the temporary watches
+are set; if it is @samp{U} they are cleared.
+If @var{watches} is followed by \t then the
+\t and the rest of the line should be ignored, for future expansion.
+
+The @var{time}, @var{clienthost}, and @var{working-dir} fields may not
+contain the characters @samp{+}, @samp{,}, @samp{>}, @samp{;}, or @samp{=}.
+
+Note that a client may be capable of performing an @code{edit} or
address@hidden operation without connecting to the server at that time,
+and instead connecting to the server when it is convenient (for example,
+when a laptop is on the net again) to send the @code{Notify} requests.
+Even if a client is capable of deferring notifications, it should
+attempt to send them immediately (one can send @code{Notify} requests
+together with a @code{noop} request, for example), unless perhaps if
+it can know that a connection would be impossible.
+
address@hidden Questionable @var{filename} \n
+Response expected: no.  Additional data: no.  Tell the server to check
+whether @var{filename} should be ignored, and if not, next time the
+server sends responses, send (in a @code{M} response) @samp{?} followed
+by the directory and filename.  @var{filename} must not contain
address@hidden/}; it needs to be a file in the directory named by the most
+recent @code{Directory} request.
address@hidden FIXME: the bit about not containing / is true of most of the
address@hidden requests, but isn't documented and should be.
+
address@hidden Case \n
+Response expected: no.  Tell the server that filenames should be matched
+in a case-insensitive fashion.  Note that this is not the primary
+mechanism for achieving case-insensitivity; for the most part the client
+keeps track of the case which the server wants to use and takes care to
+always use that case regardless of what the user specifies.  For example
+the filenames given in @code{Entry} and @code{Modified} requests for the
+same file must match in case regardless of whether the @code{Case}
+request is sent.  The latter mechanism is more general (it could also be
+used for 8.3 filenames, VMS filenames with more than one @samp{.}, and
+any other situation in which there is a predictable mapping between
+filenames in the working directory and filenames in the protocol), but
+there are some situations it cannot handle (ignore patterns, or
+situations where the user specifies a filename and the client does not
+know about that file).
+
+Though this request will be supported into the forseeable future, it has been
+the source of numerous bug reports in the past due to the complexity of testing
+this functionality via the test suite and client developers are encouraged not
+to use it.  Instead, please consider munging conflicting names and maintaining
+a map for communicating with the server.  For example, suppose the server sends
+files @file{case}, @file{CASE}, and @file{CaSe}.  The client could write all
+three files to names such as, @file{case}, @file{case_prefix_case}, and
address@hidden and maintain a mapping between the file names in, for
+instance a new @file{CVS/Map} file.
+
address@hidden Argument @var{text} \n
+Response expected: no.
+Save argument for use in a subsequent command.  Arguments
+accumulate until an argument-using command is given, at which point
+they are forgotten.
+
address@hidden Argumentx @var{text} \n
+Response expected: no.  Append \n followed by text to the current
+argument being saved.
+
address@hidden Global_option @var{option} \n
+Response expected: no.
+Transmit one of the global options @samp{-q}, @samp{-Q}, @samp{-l},
address@hidden, @samp{-r}, or @samp{-n}.  @var{option} must be one of those
+strings, no variations (such as combining of options) are allowed.  For
+graceful handling of @code{valid-requests}, it is probably better to
+make new global options separate requests, rather than trying to add
+them to this request.
+The @code{Root} request need not have been previously sent.
+
address@hidden Gzip-stream @var{level} \n
+Response expected: no.
+Use zlib (RFC 1950/1951) compression to compress all further communication
+between the client and the server.  As of @sc{cvs} 1.12.13, this request needs
+to be sent as the first non-rootless request if the server is configured
+with compression level restrictions and @var{level} is outside the restricted
+range.  After this request is sent, all further communication must be
+compressed.  All further data received from the server will also be
+compressed.  The @var{level} argument suggests to the server the level of
+compression that it should apply; it should be an integer between 0 and 9,
+inclusive, where @samp{0} means no compression and higher numbers indicate more
+compression.
+
address@hidden Kerberos-encrypt \n
+Response expected: no.
+Use Kerberos encryption to encrypt all further communication between the
+client and the server.  This will only work if the connection was made
+over Kerberos in the first place.  If both the @code{Gzip-stream} and
+the @code{Kerberos-encrypt} requests are used, the
address@hidden request should be used first.  This will make
+the client and server encrypt the compressed data, as opposed to
+compressing the encrypted data.  Encrypted data is generally
+incompressible.
+
+Note that this request does not fully prevent an attacker from hijacking
+the connection, in the sense that it does not prevent hijacking the
+connection between the initial authentication and the
address@hidden request.
+
address@hidden Gssapi-encrypt \n
+Response expected: no.
+Use GSSAPI encryption to encrypt all further communication between the
+client and the server.  This will only work if the connection was made
+over GSSAPI in the first place.  See @code{Kerberos-encrypt}, above, for
+the relation between @code{Gssapi-encrypt} and @code{Gzip-stream}.
+
+Note that this request does not fully prevent an attacker from hijacking
+the connection, in the sense that it does not prevent hijacking the
+connection between the initial authentication and the
address@hidden request.
+
address@hidden Gssapi-authenticate \n
+Response expected: no.
+Use GSSAPI authentication to authenticate all further communication
+between the client and the server.  This will only work if the
+connection was made over GSSAPI in the first place.  Encrypted data is
+automatically authenticated, so using both @code{Gssapi-authenticate}
+and @code{Gssapi-encrypt} has no effect beyond that of
address@hidden  Unlike encrypted data, it is reasonable to
+compress authenticated data.
+
+Note that this request does not fully prevent an attacker from hijacking
+the connection, in the sense that it does not prevent hijacking the
+connection between the initial authentication and the
address@hidden request.
+
address@hidden Set @address@hidden \n
+Response expected: no.
+Set a user variable @var{variable} to @var{value}.
+The @code{Root} request need not have been previously sent.
+
address@hidden Hostname @var{hostname} \n
+Response expected: no.  Set the client hostname for an upcoming @code{edit}
+request.
+
address@hidden LocalDir @var{hostname} \n
+Response expected: no.  Set the local client directory name for an upcoming
address@hidden request.
+
address@hidden expand-modules \n
+Response expected: yes.  Expand the modules which are specified in the
+arguments.  Returns the data in @code{Module-expansion} responses.  Note
+that the server can assume that this is checkout or export, not rtag or
+rdiff; the latter do not access the working directory and thus have no
+need to expand modules on the client side.
+
+Expand may not be the best word for what this request does.  It does not
+necessarily tell you all the files contained in a module, for example.
+Basically it is a way of telling you which working directories the
+server needs to know about in order to handle a checkout of the
+specified modules.
+
+For example, suppose that the server has a module defined by
+
address@hidden
+aliasmodule -a 1dir
address@hidden example
+
+That is, one can check out @code{aliasmodule} and it will take
address@hidden in the repository and check it out to @code{1dir} in the
+working directory.  Now suppose the client already has this module
+checked out and is planning on using the @code{co} request to update it.
+Without using @code{expand-modules}, the client would have two bad
+choices: it could either send information about @emph{all} working
+directories under the current directory, which could be unnecessarily
+slow, or it could be ignorant of the fact that @code{aliasmodule} stands
+for @code{1dir}, and neglect to send information for @code{1dir}, which
+would lead to incorrect operation.
address@hidden Those don't really seem like the only two options.  I mean, what
address@hidden about keeping track of the correspondence from when we first 
checked
address@hidden out a fresh directory?  Not that the CVS client does this, or 
that
address@hidden I've really thought about whether it would be a good idea...
+
+With @code{expand-modules}, the client would first ask for the module to
+be expanded:
+
address@hidden
+C: Root /home/kingdon/zwork/cvsroot
+. . .
+C: Argument aliasmodule
+C: Directory .
+C: .
+C: expand-modules
+S: Module-expansion 1dir
+S: ok
address@hidden example
+
+and then it knows to check the @file{1dir} directory and send
+requests such as @code{Entry} and @code{Modified} for the files in that
+directory.
+
address@hidden ci \n
address@hidden diff \n
address@hidden list \n
address@hidden tag \n
address@hidden status \n
address@hidden admin \n
address@hidden history \n
address@hidden watchers \n
address@hidden editors \n
address@hidden annotate \n
+Response expected: yes.  Actually do a cvs command.  This uses any
+previous @code{Argument}, @code{Directory}, @code{Entry}, or
address@hidden requests, if they have been sent.  The
+last @code{Directory} sent specifies the working directory at the time
+of the operation.  No provision is made for any input from the user.
+This means that @code{ci} must use a @code{-m} argument if it wants to
+specify a log message.
+
address@hidden log \n
+Response expected: yes.  Show information for past revisions.  This uses
+any previous @code{Directory}, @code{Entry}, or @code{Modified}
+requests, if they have been sent.  The last @code{Directory} sent
+specifies the working directory at the time of the operation.  Also uses
+previous @code{Argument}'s of which the canonical forms are the
+following (@sc{cvs} 1.10 and older clients sent what the user specified,
+but clients are encouraged to use the canonical forms and other forms
+are deprecated):
+
address@hidden @code
address@hidden -b, -h, -l, -N, -R, -t
+These options go by themselves, one option per @code{Argument} request.
+
address@hidden -d @var{date1}<@var{date2}
+Select revisions between @var{date1} and @var{date2}.  Either date
+may be omitted in which case there is no date limit at that end of the
+range (clients may specify dates such as 1 Jan 1970 or 1 Jan 2038 for
+similar purposes but this is problematic as it makes assumptions about
+what dates the server supports).  Dates are in RFC822/1123 format.  The
address@hidden is one @code{Argument} request and the date range is a second
+one.
+
address@hidden -d @var{date1}<address@hidden
+Likewise but compare dates for equality.
+
address@hidden -d @var{singledate}
+Select the single, latest revision dated @var{singledate} or earlier.
+
+To include several date ranges and/or singledates, repeat the @samp{-d}
+option as many times as necessary.
+
address@hidden address@hidden:@var{rev2}
address@hidden address@hidden
address@hidden address@hidden
address@hidden -r
+Specify revisions (note that @var{rev1} or @var{rev2} can be omitted, or
+can refer to branches).  Send both the @samp{-r} and the revision
+information in a single @code{Argument} request.  To include several
+revision selections, repeat the @samp{-r} option.
+
address@hidden -s @var{state}
address@hidden -w
address@hidden address@hidden
+Select on states or users.  To include more than one state or user,
+repeat the option.  Send the @samp{-s} option as a separate argument
+from the state being selected.  Send the @samp{-w} option as part of the
+same argument as the user being selected.
address@hidden table
+
address@hidden co \n
+Response expected: yes.  Get files from the repository.  This uses any
+previous @code{Argument}, @code{Directory}, @code{Entry}, or
address@hidden requests, if they have been sent.  Arguments to this
+command are module names; the client cannot know what directories they
+correspond to except by (1) just sending the @code{co} request, and then
+seeing what directory names the server sends back in its responses, and
+(2) the @code{expand-modules} request.
+
address@hidden export \n
+Response expected: yes.  Get files from the repository.  This uses any
+previous @code{Argument}, @code{Directory}, @code{Entry}, or
address@hidden requests, if they have been sent.  Arguments to this
+command are module names, as described for the @code{co} request.  The
+intention behind this command is that a client can get sources from a
+server without storing CVS information about those sources.  That is, a
+client probably should not count on being able to take the entries line
+returned in the @code{Created} response from an @code{export} request
+and send it in a future @code{Entry} request.  Note that the entries
+line in the @code{Created} response must indicate whether the file is
+binary or text, so the client can create it correctly.
+
address@hidden ls \n
address@hidden rannotate \n
address@hidden rdiff \n
address@hidden rlist \n
address@hidden rlog \n
address@hidden rtag \n
+Response expected: yes.  Actually do a cvs command.  This uses any
+previous @code{Argument} requests, if they have been sent.  The client
+should not send @code{Directory}, @code{Entry}, or @code{Modified}
+requests for these commands; they are not used.  Arguments to these
+commands are module names, as described for @code{co}.  @code{ls} is a
+synonym for @code{rlist}, for compatibility with CVSNT.
+
address@hidden init @var{root-name} \n
+Response expected: yes.  If it doesn't already exist, create a @sc{cvs}
+repository @var{root-name}.  Note that @var{root-name} is a local
+directory and @emph{not} a fully qualified @code{CVSROOT} variable.
+The @code{Root} request need not have been previously sent.
+
address@hidden update \n
+Response expected: yes.  Actually do a @code{cvs update} command.  This
+uses any previous @code{Argument}, @code{Directory}, @code{Entry},
+or @code{Modified} requests, if they have been sent.  The
+last @code{Directory} sent specifies the working directory at the time
+of the operation.  The @code{-I} option is not used--files which the
+client can decide whether to ignore are not mentioned and the client
+sends the @code{Questionable} request for others.
+
address@hidden import \n
+Response expected: yes.  Actually do a @code{cvs import} command.  This
+uses any previous @code{Argument}, @code{Directory}, @code{Entry}, or
address@hidden requests, if they have been sent.  The
+last @code{Directory} sent specifies the working directory at the time
+of the operation - unlike most commands, the repository field of each
address@hidden request is ignored (it merely must point somewhere
+within the root).  The files to be imported are sent in @code{Modified}
+requests (files which the client knows should be ignored are not sent;
+the server must still process the CVSROOT/cvsignore file unless -I ! is
+sent).  A log message must have been specified with a @code{-m}
+argument.
+
address@hidden add \n
+Response expected: yes.  Add a file or directory.  This uses any
+previous @code{Argument}, @code{Directory}, @code{Entry}, or
address@hidden requests, if they have been sent.  The
+last @code{Directory} sent specifies the working directory at the time
+of the operation.
+
+To add a directory, send the directory to be added using
address@hidden and @code{Argument} requests.  For example:
+
address@hidden
+C: Root /u/cvsroot
+. . .
+C: Argument nsdir
+C: Directory nsdir
+C: 1dir/nsdir
+C: Directory .
+C: 1dir
+C: add
+S: M Directory /u/cvsroot/1dir/nsdir added to the repository
+S: ok
address@hidden example
+
+You will notice that the server does not signal to the client in any
+particular way that the directory has been successfully added.  The
+client is supposed to just assume that the directory has been added and
+update its records accordingly.  Note also that adding a directory is
+immediate; it does not wait until a @code{ci} request as files do.
+
+To add a file, send the file to be added using a @code{Modified}
+request.  For example:
+
address@hidden
+C: Argument nfile
+C: Directory .
+C: 1dir
+C: Modified nfile
+C: u=rw,g=r,o=r
+C: 6
+C: hello
+C: add
+S: E cvs server: scheduling file `nfile' for addition
+S: Mode u=rw,g=r,o=r
+S: Checked-in ./
+S: /u/cvsroot/1dir/nfile
+S: /nfile/0///
+S: E cvs server: use 'cvs commit' to add this file permanently
+S: ok
address@hidden example
+
+Note that the file has not been added to the repository; the only effect
+of a successful @code{add} request, for a file, is to supply the client
+with a new entries line containing @samp{0} to indicate an added file.
+In fact, the client probably could perform this operation without
+contacting the server, although using @code{add} does cause the server
+to perform a few more checks.
+
+The client sends a subsequent @code{ci} to actually add the file to the
+repository.
+
+Another quirk of the @code{add} request is that with CVS 1.9 and older,
+a pathname specified in
+an @code{Argument} request cannot contain @samp{/}.  There is no good
+reason for this restriction, and in fact more recent CVS servers don't
+have it.
+But the way to interoperate with the older servers is to ensure that
+all @code{Directory} requests for @code{add} (except those used to add
+directories, as described above), use @samp{.} for
address@hidden  Specifying another string for
address@hidden may not get an error, but it will get you strange
address@hidden responses from the buggy servers.
+
address@hidden remove \n
+Response expected: yes.  Remove a file.  This uses any
+previous @code{Argument}, @code{Directory}, @code{Entry}, or
address@hidden requests, if they have been sent.  The
+last @code{Directory} sent specifies the working directory at the time
+of the operation.
+
+Note that this request does not actually do anything to the repository;
+the only effect of a successful @code{remove} request is to supply the
+client with a new entries line containing @samp{-} to indicate a removed
+file.  In fact, the client probably could perform this operation without
+contacting the server, although using @code{remove} may cause the server
+to perform a few more checks.
+
+The client sends a subsequent @code{ci} request to actually record the
+removal in the repository.
+
address@hidden edit \n
+Response expected: yes.  Actually do the @code{cvs edit} command.  This uses
+any previous @code{Argument}, @code{Directory}, @code{Entry}, @code{LocalDir},
+or @code{Hostname} requests, if they have been sent.  Unless the user has
+requested that edits not be granted unless no one else is editing a file, a
+local edit followed by an attempt to send @code{Notify} requests to the
+server is preferred.
+
address@hidden watch-on \n
address@hidden watch-off \n
address@hidden watch-add \n
address@hidden watch-remove \n
+Response expected: yes.  Actually do the @code{cvs watch on}, @code{cvs
+watch off}, @code{cvs watch add}, and @code{cvs watch remove} commands,
+respectively.  This uses any previous @code{Argument},
address@hidden, @code{Entry}, or @code{Modified}
+requests, if they have been sent.  The last @code{Directory} sent
+specifies the working directory at the time of the operation.
+
address@hidden release \n
+Response expected: yes.  Note that a @code{cvs release} command has
+taken place and update the history file accordingly.
+
address@hidden global-list-quiet \n
+Response expected: yes.  This request is a synonym for noop, but its existance
+notifies the client that a @code{-q} option to @code{list} and @code{rlist}
+will be rejected.  This, in a reverse-logic sort of way, is here so that when
+it @emph{isn't} received, as for instance from CVSNT, the client will know that
+the quiet option has to be sent as a command option rather than a global
+option.
+
address@hidden noop \n
+Response expected: yes.  This request is a null command in the sense
+that it doesn't do anything, but merely (as with any other requests
+expecting a response) sends back any responses pertaining to pending
+errors, pending @code{Notified} responses, etc.
+The @code{Root} request need not have been previously sent.
+
address@hidden update-patches \n
+Response expected: yes.
+This request does not actually do anything.  It is used as a signal that
+the server is able to generate patches when given an @code{update}
+request.  The client must issue the @code{-u} argument to @code{update}
+in order to receive patches.
+
address@hidden gzip-file-contents @var{level} \n
+Response expected: no.  Note that this request does not follow the
+response convention stated above.  @code{Gzip-stream} is suggested
+instead of @code{gzip-file-contents} as it gives better compression; the
+only reason to implement the latter is to provide compression with
address@hidden 1.8 and earlier.  The @code{gzip-file-contents} request asks
+the server to compress files it sends to the client using @code{gzip}
+(RFC1952/1951) compression, using the specified level of compression.
+If this request is not made, the server must not compress files.
+
+This is only a hint to the server.  It may still decide (for example, in
+the case of very small files, or files that already appear to be
+compressed) not to do the compression.  Compression is indicated by a
address@hidden preceding the file length.
+
+Availability of this request in the server indicates to the client that
+it may compress files sent to the server, regardless of whether the
+client actually uses this request.
+
address@hidden wrapper-sendme-rcsOptions \n
+Response expected: yes.
+Request that the server transmit mappings from filenames to keyword
+expansion modes in @code{Wrapper-rcsOption} responses.
+
address@hidden version \n
+Response expected: yes.
+Request that the server transmit its version message.
+The @code{Root} request need not have been previously sent.
+
address@hidden @var{other-request} @var{text} \n
+Response expected: yes.
+Any unrecognized request expects a response, and does not
+contain any additional data.  The response will normally be something like
address@hidden  unrecognized request}, but it could be a different error if
+a previous request which doesn't expect a response produced an error.
address@hidden table
+
+When the client is done, it drops the connection.
+
address@hidden Response intro
address@hidden Introduction to Responses
+
+After a command which expects a response, the server sends however many
+of the following responses are appropriate.  The server should not send
+data at other times (the current implementation may violate this
+principle in a few minor places, where the server is printing an error
+message and exiting---this should be investigated further).
+
+Any set of responses always ends with @samp{error} or @samp{ok}.  This
+indicates that the response is over.
+
address@hidden "file updating response" and "file update modifying response" are
address@hidden lame terms (mostly because they are so awkward).  Any better 
ideas?
+The responses @code{Checked-in}, @code{New-entry}, @code{Updated},
address@hidden, @code{Update-existing}, @code{Merged}, and
address@hidden are refered to as @dfn{file updating} responses, because
+they change the status of a file in the working directory in some way.
+The responses @code{Mode}, @code{Mod-time}, and @code{Checksum} are
+referred to as @dfn{file update modifying} responses because they modify
+the next file updating response.  In no case shall a file update
+modifying response apply to a file updating response other than the next
+one.  Nor can the same file update modifying response occur twice for
+a given file updating response (if servers diagnose this problem, it may
+aid in detecting the case where clients send an update modifying
+response without following it by a file updating response).
+
address@hidden Response pathnames
address@hidden The "pathname" in responses
+
+Many of the responses contain something called @var{pathname}.
address@hidden FIXME: should better document when the specified repository 
needs to
address@hidden end in "/.".
+The name is somewhat misleading; it actually indicates a pair of
+pathnames.  First, a local directory name
+relative to the directory in which the command was given (i.e. the last
address@hidden before the command).  Then a linefeed and a repository
+name.  Then a slash and the filename (without a @samp{,v} ending).
+
+The repository name may be absolute or relative to the @var{pathname}
+sent with the @code{Root} request.  If absolute, the repository name must begin
+with the @var{pathname} sent with the @code{Root} request.  Relative or
+absolute, the repository name must specify a path underneath the @code{Root}
address@hidden
+
+For example, for a file @file{i386.mh}
+which is in the local directory @file{gas.clean/config} and for which
+the repository name is @file{devo/gas/config}:
+
address@hidden
+gas.clean/config/
+devo/gas/config/i386.mh
address@hidden example
+
+If the server wants to tell the client to create a directory, then it
+merely uses the directory in any response, as described above, and the
+client should create the directory if it does not exist.  Note that this
+should only be done one directory at a time, in order to permit the
+client to correctly store the repository for each directory.  Servers
+can use requests such as @code{Clear-sticky},
address@hidden, or any other requests, to create
+directories.
address@hidden FIXME: Need example here of how "repository" needs to be sent for
address@hidden each directory, and cannot be correctly deduced from, say, the 
most
address@hidden deeply nested directory.
+
+Some server
+implementations may poorly distinguish between a directory which should
+not exist and a directory which contains no files; in order to refrain
+from creating empty directories a client should both send the @samp{-P}
+option to @code{update} or @code{co}, and should also detect the case in
+which the server asks to create a directory but not any files within it
+(in that case the client should remove the directory or refrain from
+creating it in the first place).  Note that servers could clean this up
+greatly by only telling the client to create directories if the
+directory in question should exist, but until servers do this, clients
+will need to offer the @samp{-P} behavior described above.
+
address@hidden Responses
address@hidden Responses
+
+Here are the responses:
+
address@hidden @code
address@hidden Valid-requests @var{request-list} \n
+Indicate what requests the server will accept.  @var{request-list}
+is a space separated list of tokens.  If the server supports sending
+patches, it will include @samp{update-patches} in this list.  The
address@hidden request does not actually do anything.
+
address@hidden Force-gzip \n
+Response expected: no.
+Indicates that the server requires compression.  The client must send a
address@hidden request, though the requested @var{level} may be @samp{0}.
+
address@hidden Referrer @var{CVSROOT}
+Request that the client store @var{CVSROOT} as the name of this server and that
+this name be passed via a @code{Referrer} @emph{request} to any subsequent
+servers contacted as a result of a @code{Redirect} response.  This can be
+useful to allow the secondary administrator to configure the @code{CVSROOT} the
+primary should use to update the secondary in case the client uses a
+non-standard name or even a name that is unique to the client for some reason.
+
address@hidden Redirect @var{CVSROOT}
+Request that the client redirect its connection to @var{CVSROOT} and begin
+again.  This response is only valid in response to a @code{Command-prep}
+request.  If a client receives this response, it is expected to notify the
+write server it subsequently contacts of the CVSROOT of the server which
+redirected it using the @samp{Referrer} request.  This information makes it
+possible for primary servers to update the client's mirror first, hopefully
+minimizing race conditions on subsequent updates from the same client.
+
address@hidden Checked-in @var{pathname} \n
+Additional data: New Entries line, \n.  This means a file @var{pathname}
+has been successfully operated on (checked in, added, etc.).  name in
+the Entries line is the same as the last component of @var{pathname}.
+
address@hidden New-entry @var{pathname} \n
+Additional data: New Entries line, \n.  Like @code{Checked-in}, but the
+file is not up to date.
+
address@hidden Updated @var{pathname} \n
+Additional data: New Entries line, \n, mode, \n, file transmission.  A
+new copy of the file is enclosed.  This is used for a new revision of an
+existing file, or for a new file, or for any other case in which the
+local (client-side) copy of the file needs to be updated, and after
+being updated it will be up to date.  If any directory in pathname does
+not exist, create it.  This response is not used if @code{Created} and
address@hidden are supported.
+
address@hidden Created @var{pathname} \n
+This is just like @code{Updated} and takes the same additional data, but
+is used only if no @code{Entry}, @code{Modified}, or
address@hidden request has been sent for the file in question.  The
+distinction between @code{Created} and @code{Update-existing} is so
+that the client can give an error message in several cases: (1) there is
+a file in the working directory, but not one for which @code{Entry},
address@hidden, or @code{Unchanged} was sent (for example, a file which
+was ignored, or a file for which @code{Questionable} was sent), (2)
+there is a file in the working directory whose name differs from the one
+mentioned in @code{Created} in ways that the client is unable to use to
+distinguish files.  For example, the client is case-insensitive and the
+names differ only in case.
+
address@hidden Update-existing @var{pathname} \n
+This is just like @code{Updated} and takes the same additional data, but
+is used only if a @code{Entry}, @code{Modified}, or @code{Unchanged}
+request has been sent for the file in question.
+
+This response, or @code{Merged}, indicates that the server has
+determined that it is OK to overwrite the previous contents of the file
+specified by @var{pathname}.  Provided that the client has correctly
+sent @code{Modified} or @code{Is-modified} requests for a modified file,
+and the file was not modified while CVS was running, the server can
+ensure that a user's modifications are not lost.
+
address@hidden Merged @var{pathname} \n
+This is just like @code{Updated} and takes the same additional data,
+with the one difference that after the new copy of the file is enclosed,
+it will still not be up to date.  Used for the results of a merge, with
+or without conflicts.
+
+It is useful to preserve an copy of what the file looked like before the
+merge.  This is basically handled by the server; before sending
address@hidden it will send a @code{Copy-file} response.  For example, if
+the file is @file{aa} and it derives from revision 1.3, the
address@hidden response will tell the client to copy @file{aa} to
address@hidden  It is up to the client to decide how long to keep this
+file around; traditionally clients have left it around forever, thus
+letting the user clean it up as desired.  But another answer, such as
+until the next commit, might be preferable.
+
address@hidden Rcs-diff @var{pathname} \n
+This is just like @code{Updated} and takes the same additional data,
+with the one difference that instead of sending a new copy of the file,
+the server sends an RCS change text.  This change text is produced by
address@hidden -n} (the GNU diff @samp{-a} option may also be used).  The
+client must apply this change text to the existing file.  This will only
+be used when the client has an exact copy of an earlier revision of a
+file.  This response is only used if the @code{update} command is given
+the @samp{-u} argument.
+
address@hidden Patched @var{pathname} \n
+This is just like @code{Rcs-diff} and takes the same additional data,
+except that it sends a standard patch rather than an RCS change text.
+The patch is produced by @samp{diff -c} for @sc{cvs} 1.6 and later (see
+POSIX.2 for a description of this format), or @samp{diff -u} for
+previous versions of @sc{cvs}; clients are encouraged to accept either
+format.  Like @code{Rcs-diff}, this response is only used if the
address@hidden command is given the @samp{-u} argument.
+
+The @code{Patched} response is deprecated in favor of the
address@hidden response.  However, older clients (CVS 1.9 and earlier)
+only support @code{Patched}.
+
address@hidden Edit-file @var{pathname} \n
+Do the client-side portion of editing a file.
+
address@hidden Mode @var{mode} \n
+This @var{mode} applies to the next file mentioned in
address@hidden  @code{Mode} is a file update modifying response
+as described in @ref{Response intro}.
+
address@hidden Mod-time @var{time} \n
+Set the modification time of the next file sent to @var{time}.
address@hidden is a file update modifying response
+as described in @ref{Response intro}.
+The
address@hidden is in the format specified by RFC822 as modified by RFC1123.
+The server may specify any timezone it chooses; clients will want to
+convert that to their own timezone as appropriate.  An example of this
+format is:
+
address@hidden
+26 May 1997 13:01:40 -0400
address@hidden example
+
+There is no requirement that the client and server clocks be
+synchronized.  The server just sends its recommendation for a timestamp
+(based on its own clock, presumably), and the client should just believe
+it (this means that the time might be in the future, for example).
+
+If the server does not send @code{Mod-time} for a given file, the client
+should pick a modification time in the usual way (usually, just let the
+operating system set the modification time to the time that the CVS
+command is running).
+
address@hidden Checksum @var{checksum}\n
+The @var{checksum} applies to the next file sent (that is,
address@hidden is a file update modifying response
+as described in @ref{Response intro}).
+In the case of
address@hidden, the checksum applies to the file after being patched,
+not to the patch itself.  The client should compute the checksum itself,
+after receiving the file or patch, and signal an error if the checksums
+do not match.  The checksum is the 128 bit MD5 checksum represented as
+32 hex digits (MD5 is described in RFC1321).
+This response is optional, and is only used if the
+client supports it (as judged by the @code{Valid-responses} request).
+
address@hidden Copy-file @var{pathname} \n
+Additional data: @var{newname} \n.  Copy file @var{pathname} to
address@hidden in the same directory where it already is.  This does not
+affect @code{CVS/Entries}.
+
+This can optionally be implemented as a rename instead of a copy.  The
+only use for it which currently has been identified is prior to a
address@hidden response as described under @code{Merged}.  Clients can
+probably assume that is how it is being used, if they want to worry
+about things like how long to keep the @var{newname} file around.
+
address@hidden Removed @var{pathname} \n
+The file has been removed from the repository (this is the case where
+cvs prints @samp{file foobar.c is no longer pertinent}).
+
address@hidden Remove-entry @var{pathname} \n
+The file needs its entry removed from @code{CVS/Entries}, but the file
+itself is already gone (this happens in response to a @code{ci} request
+which involves committing the removal of a file).
+
address@hidden Set-static-directory @var{pathname} \n
+This instructs the client to set the @code{Entries.Static} flag, which
+it should then send back to the server in a @code{Static-directory}
+request whenever the directory is operated on.  @var{pathname} ends in a
+slash; its purpose is to specify a directory, not a file within a
+directory.
+
address@hidden Clear-static-directory @var{pathname} \n
+Like @code{Set-static-directory}, but clear, not set, the flag.
+
address@hidden Set-sticky @var{pathname} \n
+Additional data: @var{tagspec} \n.  Tell the client to set a sticky tag
+or date, which should be supplied with the @code{Sticky} request for
+future operations.  @var{pathname} ends in a slash; its purpose is to
+specify a directory, not a file within a directory.  The client should
+store @var{tagspec} and pass it back to the server as-is, to allow for
+future expansion.  The first character of @var{tagspec} is @samp{T} for
+a tag, @samp{D} for a date, or something else for future expansion.  The
+remainder of @var{tagspec} contains the actual tag or date.
+
address@hidden Clear-sticky @var{pathname} \n
+Clear any sticky tag or date set by @code{Set-sticky}.
+
address@hidden Template @var{pathname} \n
+Additional data: file transmission (note: compressed file transmissions
+are not supported).  @var{pathname} ends in a slash; its purpose is to
+specify a directory, not a file within a directory.  Tell the client to
+store the file transmission as the template log message, and then use
+that template in the future when prompting the user for a log message.
+
address@hidden Set-checkin-prog @var{dir} \n
+Additional data: @var{prog} \n.  Tell the client to set a checkin
+program, which should be supplied with the @code{Checkin-prog} request
+for future operations.
+
address@hidden Set-update-prog @var{dir} \n
+Additional data: @var{prog} \n.  Tell the client to set an update
+program, which should be supplied with the @code{Update-prog} request
+for future operations.
+
address@hidden Notified @var{pathname} \n
+Indicate to the client that the notification for @var{pathname} has been
+done.  There should be one such response for every @code{Notify}
+request; if there are several @code{Notify} requests for a single file,
+the requests should be processed in order; the first @code{Notified}
+response pertains to the first @code{Notify} request, etc.
+
address@hidden Module-expansion @var{pathname} \n
+Return a file or directory
+which is included in a particular module.  @var{pathname} is relative
+to cvsroot, unlike most pathnames in responses.  @var{pathname} should
+be used to look and see whether some or all of the module exists on
+the client side; it is not necessarily suitable for passing as an
+argument to a @code{co} request (for example, if the modules file
+contains the @samp{-d} option, it will be the directory specified with
address@hidden, not the name of the module).
+
address@hidden Wrapper-rcsOption @var{pattern} -k '@var{option}' \n
+Transmit to the client a filename pattern which implies a certain
+keyword expansion mode.  The @var{pattern} is a wildcard pattern (for
+example, @samp{*.exe}.  The @var{option} is @samp{b} for binary, and so
+on.  Note that although the syntax happens to resemble the syntax in
+certain CVS configuration files, it is more constrained; there must be
+exactly one space between @var{pattern} and @samp{-k} and exactly one
+space between @samp{-k} and @samp{'}, and no string is permitted in
+place of @samp{-k} (extensions should be done with new responses, not by
+extending this one, for graceful handling of @code{Valid-responses}).
+
address@hidden M @var{text} \n
+A one-line message for the user.
+Note that the format of @var{text} is not designed for machine parsing.
+Although sometimes scripts and clients will have little choice, the
+exact text which is output is subject to vary at the discretion of the
+server and the example output given in this document is just that,
+example output.  Servers are encouraged to use the @samp{MT} response,
+and future versions of this document will hopefully standardize more of
+the @samp{MT} tags; see @ref{Text tags}.
+
address@hidden Mbinary \n
+Additional data: file transmission (note: compressed file transmissions
+are not supported).  This is like @samp{M}, except the contents of the
+file transmission are binary and should be copied to standard output
+without translation to local text file conventions.  To transmit a text
+file to standard output, servers should use a series of @samp{M} requests.
+
address@hidden E @var{text} \n
+Same as @code{M} but send to stderr not stdout.
+
address@hidden F \n
address@hidden FIXME: The second sentence, defining "flush", is somewhat off 
the top
address@hidden of my head.  Is there some text we can steal from ANSI C or 
someplace
address@hidden which is more carefully thought out?
+Flush stderr.  That is, make it possible for the user to see what has
+been written to stderr (it is up to the implementation to decide exactly
+how far it should go to ensure this).
+
address@hidden MT @var{tagname} @var{data} \n
+
+This response provides for tagged text.  It is similar to
+SGML/HTML/XML in that the data is structured and a naive application
+can also make some sense of it without understanding the structure.
+The syntax is not SGML-like, however, in order to fit into the CVS
+protocol better and (more importantly) to make it easier to parse,
+especially in a language like perl or awk.
+
+The @var{tagname} can have several forms.  If it starts with @samp{a}
+to @samp{z} or @samp{A} to @samp{Z}, then it represents tagged text.
+If the implementation recognizes @var{tagname}, then it may interpret
address@hidden in some particular fashion.  If the implementation does not
+recognize @var{tagname}, then it should simply treat @var{data} as
+text to be sent to the user (similar to an @samp{M} response).  There
+are two tags which are general purpose.  The @samp{text} tag is
+similar to an unrecognized tag in that it provides text which will
+ordinarily be sent to the user.  The @samp{newline} tag is used
+without @var{data} and indicates that a newline will ordinarily be
+sent to the user (there is no provision for embedding newlines in the
address@hidden of other tagged text responses).
+
+If @var{tagname} starts with @samp{+} it indicates a start tag and if
+it starts with @samp{-} it indicates an end tag.  The remainder of
address@hidden should be the same for matching start and end tags, and
+tags should be nested (for example one could have tags in the
+following order @code{+bold} @code{+italic} @code{text} @code{-italic}
address@hidden but not @code{+bold} @code{+italic} @code{text}
address@hidden @code{-italic}).  A particular start and end tag may be
+documented to constrain the tagged text responses which are valid
+between them.
+
+Note that if @var{data} is present there will always be exactly one
+space between @var{tagname} and @var{data}; if there is more than one
+space, then the spaces beyond the first are part of @var{data}.
+
+Here is an example of some tagged text responses.  Note that there is
+a trailing space after @samp{Checking in} and @samp{initial revision:}
+and there are two trailing spaces after @samp{<--}.  Such trailing
+spaces are, of course, part of @var{data}.
+
address@hidden
+MT +checking-in
+MT text Checking in 
+MT fname gz.tst
+MT text ;
+MT newline
+MT rcsfile /home/kingdon/zwork/cvsroot/foo/gz.tst,v
+MT text   <--  
+MT fname gz.tst
+MT newline
+MT text initial revision: 
+MT init-rev 1.1
+MT newline
+MT text done
+MT newline
+MT -checking-in
address@hidden example
+
+If the client does not support the @samp{MT} response, the same
+responses might be sent as:
+
address@hidden
+M Checking in gz.tst;
+M /home/kingdon/zwork/cvsroot/foo/gz.tst,v  <--  gz.tst
+M initial revision: 1.1
+M done
address@hidden example
+
+For a list of specific tags, see @ref{Text tags}.
+
address@hidden error @var{errno-code} @samp{ } @var{text} \n
+The command completed with an error.  @var{errno-code} is a symbolic
+error code (e.g. @code{ENOENT}); if the server doesn't support this
+feature, or if it's not appropriate for this particular message, it just
+omits the errno-code (in that case there are two spaces after
address@hidden).  Text is an error message such as that provided by
+strerror(), or any other message the server wants to use.
+The @var{text} is like the @code{M} response, in the sense that it is
+not particularly intended to be machine-parsed; servers may wish to
+print an error message with @code{MT} responses, and then issue a
address@hidden response without @var{text} (although it should be noted
+that @code{MT} currently has no way of flagging the output as intended
+for standard error, the way that the @code{E} response does).
+
address@hidden ok \n
+The command completed successfully.
+
address@hidden table
+
+The following responses are all optional, but if one is implemented, then all
+should be.  Servers may make this assumption.
+
address@hidden @code
address@hidden Base-checkout @var{pathname} \n
+Additional data: @var{RCS keyword options}. \n, @var{previous revision}. \n
address@hidden revision}. \n @var{mode}, \n, file transmission.
+
+Checkout a base file preliminary to a @code{Base-copy} or @code{Base-merge}
+response.  If @var{previous revision} is not empty, it should specify the
+previous base revision of this file, as determined by the entry for the file
+sent to the server.  The file transmission will then be an RCS diff, as for the
address@hidden response, but against the previous base file.
+
address@hidden Temp-checkout @var{pathname} \n
+This response is identical to @code{Base-checkout}, except the new file should
+be checked out as a temp file rather than stored with the other base files,
+to avoid overwriting earlier base checkouts.
+
address@hidden Base-copy @var{pathname} \n
+Additional data: @var{revision}. \n @var{flags} \n
+
+Copy a previously transmitted base file for @var{revision}, or the previously
+transmitted temp file when @var{revision} is not specified, over the
+file specified by @var{pathname}.  @var{flags} is two characters.  The
+first, for error checking purposes, is @samp{y} if @var{pathname} is expected
+to exist, @samp{n} if @var{pathname} is not expected to exist, and
address@hidden if @var{pathname} might exist.  The second character must be 
@samp{y}
+if the new @var{pathanme} should be writable and @samp{n}, otherwise.  When
+a temp file is used, it may be deleted and forgotten afterwards.
+
address@hidden Base-merge @var{pathname} \n
+Additional data: @var{rev1} \n @var{rev2} \n
+
+Merge the differences between @var{rev1} & @var{rev2} of @var{pathname} into
address@hidden  If one temp file was received via @var{Temp-checkout}, then
+use it in place of the base file for @var{rev1}.  If two temp files were
+received, then use the first in place of the base file for @var{rev1} and the
+second in place of the base file for @var{rev2}.  Temp files may be deleted
+and forgotten after the merge is complete.
+
address@hidden Base-entry @var{pathname} \n
+Additional data: New Entries line, \n
+
+Use new entry for @var{pathname}.  Any base files for revisions of
address@hidden other than the one specified in the new entries line may now be
+deleted.
+
address@hidden Base-merged @var{pathname} \n
+Additional data: New Entries line, \n
+
+Use new entry for @var{pathname}.  Any base files for revisions of
address@hidden other than the one specified in the new entries line may now be
+deleted.
+
address@hidden table
+
address@hidden Text tags
address@hidden Tags for the MT tagged text response
+
+The @code{MT} response, as described in @ref{Responses}, offers a
+way for the server to send tagged text to the client.  This section
+describes specific tags.  The intention is to update this section as
+servers add new tags.
+
+In the following descriptions, @code{text} and @code{newline} tags are
+omitted.  Such tags contain information which is intended for users (or
+to be discarded), and are subject to change at the whim of the server.
+To avoid being vulnerable to such whim, clients should look for the tags
+listed here, not @code{text}, @code{newline}, or other tags.
+
+The following tag means to indicate to the user that a file has been
+updated.  It is more or less redundant with the @code{Created} and
address@hidden responses, but we don't try to specify here
+whether it occurs in exactly the same circumstances as @code{Created}
+and @code{Update-existing}.  The @var{name} is the pathname of the file
+being updated relative to the directory in which the command is
+occurring (that is, the last @code{Directory} request which is sent
+before the command).
+
address@hidden
+MT +updated
+MT fname @var{name}
+MT -updated
address@hidden example
+
+The @code{importmergecmd} tag is used when doing an import which has
+conflicts, or when doing an import with the @samp{-X} flag.
+The client can use it to report how to merge in the newly
+imported changes.  The @var{count} is the number of conflicts, or the
+string @code{No} if no conflicts occurred.  (The latter will only be
+sent for imports run with the @samp{-X} flag.)  The
+newly imported changes can be merged by running the following command:
address@hidden
+cvs checkout -j @var{tag1} -j @var{tag2} @var{repository}
address@hidden smallexample
+
address@hidden
+MT +importmergecmd
+MT conflicts @var{count}
+MT mergetag1 @var{tag1}
+MT mergetag2 @var{tag2}
+MT repository @var{repository}
+MT -importmergecmd
address@hidden example
+
address@hidden Example
address@hidden Example
+
address@hidden The C:/S: convention is in imitation of RFC1869 (and presumably
address@hidden other RFC's).  In other formatting concerns, we might want to 
think
address@hidden about whether there is an easy way to provide RFC1543 formatting
address@hidden (without negating the advantages of texinfo), and whether we 
should
address@hidden use RFC2234 BNF (I fear that would be less clear than
address@hidden what we do now, however).  Plus what about RFC2119 terminology 
(MUST,
address@hidden SHOULD, &c) or ISO terminology (shall, should, or whatever they 
are)?
+Here is an example; lines are prefixed by @samp{C: } to indicate the
+client sends them or @samp{S: } to indicate the server sends them.
+
+The client starts by connecting, sending the root, and completing the
+protocol negotiation.  In actual practice the lists of valid responses
+and requests would be longer.
address@hidden The reason that we artificially shorten the lists is to avoid 
phony
address@hidden line breaks.  Any better solutions?
address@hidden Other than that, this exchange is taken verbatim from the data
address@hidden exchanged by CVS (as of Nov 1996).  That is why some of the 
requests and
address@hidden reponses are not quite what you would pick for pedagogical 
purposes.
+
address@hidden
+C: Root /u/cvsroot
+C: Valid-responses ok error Checked-in M E
+C: valid-requests
+S: Valid-requests Root Directory Entry Modified Argument Argumentx ci co
+S: ok
+C: UseUnchanged
address@hidden example
+
+The client wants to check out the @code{supermunger} module into a fresh
+working directory.  Therefore it first expands the @code{supermunger}
+module; this step would be omitted if the client was operating on a
+directory rather than a module.
address@hidden Why does it send Directory here?  The description of 
expand-modules
address@hidden doesn't really say much of anything about what use, if any, it 
makes of
address@hidden Directory and similar requests sent previously.
+
address@hidden
+C: Argument supermunger
+C: Directory .
+C: .
+C: expand-modules
address@hidden example
+
+The server replies that the @code{supermunger} module expands to the
+directory @code{supermunger} (the simplest case):
+
address@hidden
+S: Module-expansion supermunger
+S: ok
address@hidden example
+
+The client then proceeds to check out the directory.  The fact that it
+sends only a single @code{Directory} request which specifies @samp{.}
+for the working directory means that there is not already a
address@hidden directory on the client.
address@hidden What is -N doing here?
+
address@hidden
+C: Argument -N
+C: Argument supermunger
+C: Directory .
+C: .
+C: co
address@hidden example
+
+The server replies with the requested files.  In this example, there is
+only one file, @file{mungeall.c}.  The @code{Clear-sticky} and
address@hidden requests are sent by the current
+implementation but they have no effect because the default is for those
+settings to be clear when a directory is newly created.
+
address@hidden
+S: Clear-sticky supermunger/
+S: /u/cvsroot/supermunger/
+S: Clear-static-directory supermunger/
+S: /u/cvsroot/supermunger/
+S: E cvs server: Updating supermunger
+S: M U supermunger/mungeall.c
+S: Created supermunger/
+S: /u/cvsroot/supermunger/mungeall.c
+S: /mungeall.c/1.1///
+S: u=rw,g=r,o=r
+S: 26
+S: int mein () @{ abort (); @}
+S: ok
address@hidden example
+
+The current client implementation would break the connection here and make a
+new connection for the next command.  However, the protocol allows it
+to keep the connection open and continue, which is what we show here.
+
+After the user modifies the file and instructs the client to check it
+back in.  The client sends arguments to specify the log message and file
+to check in:
+
address@hidden
+C: Argument -m
+C: Argument Well, you see, it took me hours and hours to find
+C: Argumentx this typo and I searched and searched and eventually
+C: Argumentx had to ask John for help.
+C: Argument mungeall.c
address@hidden example
+
+It also sends information about the contents of the working directory,
+including the new contents of the modified file.  Note that the user has
+changed into the @file{supermunger} directory before executing this
+command; the top level directory is a user-visible concept because the
+server should print filenames in @code{M} and @code{E} responses
+relative to that directory.
address@hidden We are waving our hands about the order of the requests.  
"Directory"
address@hidden and "Argument" can be in any order, but this probably isn't 
specified
address@hidden very well.
+
address@hidden
+C: Directory .
+C: supermunger
+C: Entry /mungeall.c/1.1///
+C: Modified mungeall.c
+C: u=rw,g=r,o=r
+C: 26
+C: int main () @{ abort (); @}
address@hidden example
+
+And finally, the client issues the checkin command (which makes use of
+the data just sent):
+
address@hidden
+C: ci
address@hidden example
+
+And the server tells the client that the checkin succeeded:
+
address@hidden
+S: M Checking in mungeall.c;
+S: E /u/cvsroot/supermunger/mungeall.c,v  <--  mungeall.c
+S: E new revision: 1.2; previous revision: 1.1
+S: E done
+S: Mode u=rw,g=r,o=r
+S: Checked-in ./
+S: /u/cvsroot/supermunger/mungeall.c
+S: /mungeall.c/1.2///
+S: ok
address@hidden example
+
address@hidden Requirements
address@hidden Required versus optional parts of the protocol
+
+The following are part of every known implementation of the CVS protocol
+(except obsolete, pre-1.5, versions of CVS) and it is considered
+reasonable behavior to completely fail to work if you are connected with
+an implementation which attempts to not support them.  Requests:
address@hidden, @code{Valid-responses}, @code{valid-requests},
address@hidden, @code{Entry}, @code{Modified}, @code{Unchanged},
address@hidden, @code{Argumentx}, @code{ci}, @code{co}, @code{update}.
+Responses: @code{ok}, @code{error}, @code{Valid-requests},
address@hidden, @code{Updated}, @code{Merged}, @code{Removed},
address@hidden, @code{E}.
+
+A server need not implement @code{Repository}, but in order to interoperate
+with CVS 1.5 through 1.9 it must claim to implement it (in
address@hidden).  The client will not actually send the request.
+
address@hidden Obsolete
address@hidden Obsolete protocol elements
+
+This section briefly describes protocol elements which are obsolete.
+There is no attempt to document them in full detail.
+
+There was a @code{Repository} request which was like @code{Directory}
+except it only provided @var{repository}, and the local directory was
+assumed to be similarly named.
+
+If the @code{UseUnchanged} request was not sent, there was a @code{Lost}
+request which was sent to indicate that a file did not exist in the
+working directory, and the meaning of sending @code{Entries} without
address@hidden or @code{Modified} was different.  All current clients (CVS
+1.5 and later) will send @code{UseUnchanged} if it is supported.
+
address@hidden Protocol Notes
address@hidden Notes on the Protocol
+
+A number of enhancements are possible.  Also see the file @sc{todo} in
+the @sc{cvs} source distribution, which has further ideas concerning
+various aspects of @sc{cvs}, some of which impact the protocol.
+Similarly, the @url{http://www.nongnu.org/cvs/} site, in particular the
address@hidden pages.
+
address@hidden @bullet
address@hidden
+The @code{Modified} request could be speeded up by sending diffs rather
+than entire files.  The client would need some way to keep the version
+of the file which was originally checked out; probably requiring the use
+of "cvs edit" in this case is the most sensible course (the "cvs edit"
+could be handled by a package like VC for emacs).  This would also allow
+local operation of @code{cvs diff} without arguments.
+
address@hidden
+The fact that @code{pserver} requires an extra network turnaround in
+order to perform authentication would be nice to avoid.  This relates to
+the issue of reporting errors; probably the clean solution is to defer
+the error until the client has issued a request which expects a
+response.  To some extent this might relate to the next item (in terms
+of how easy it is to skip a whole bunch of requests until we get to one
+that expects a response).  I know that the kerberos code doesn't wait in
+this fashion, but that probably can cause network deadlocks and perhaps
+future problems running over a transport which is more transaction
+oriented than TCP.  On the other hand I'm not sure it is wise to make
+the client conduct a lengthy upload only to find there is an
+authentication failure.
+
address@hidden
+The protocol uses an extra network turnaround for protocol negotiation
+(@code{valid-requests}).  It might be nice to avoid this by having the
+client be able to send requests and tell the server to ignore them if
+they are unrecognized (different requests could produce a fatal error if
+unrecognized).  To do this there should be a standard syntax for
+requests.  For example, perhaps all future requests should be a single
+line, with mechanisms analogous to @code{Argumentx}, or several requests
+working together, to provide greater amounts of information.  Or there
+might be a standard mechanism for counted data (analogous to that used
+by @code{Modified}) or continuation lines (like a generalized
address@hidden).  It would be useful to compare what HTTP is planning
+in this area; last I looked they were contemplating something called
+Protocol Extension Protocol but I haven't looked at the relevant IETF
+documents in any detail.  Obviously, we want something as simple as
+possible (but no simpler).
+
address@hidden
+The scrambling algorithm in the CVS client and server actually support
+more characters than those documented in @ref{Password scrambling}.
+Someday we are going to either have to document them all (but this is
+not as easy as it may look, see below), or (gradually and with adequate
+process) phase out the support for other characters in the CVS
+implementation.  This business of having the feature partly undocumented
+isn't a desirable state long-term.
+
+The problem with documenting other characters is that unless we know
+what character set is in use, there is no way to make a password
+portable from one system to another.  For example, a with a circle on
+top might have different encodings in different character sets.
+
+It @emph{almost} works to say that the client picks an arbitrary,
+unknown character set (indeed, having the CVS client know what character
+set the user has in mind is a hard problem otherwise), and scrambles
+according to a certain octet<->octet mapping.  There are two problems
+with this.  One is that the protocol has no way to transmit character 10
+decimal (linefeed), and the current server and clients have no way to
+handle 0 decimal (NUL).  This may cause problems with certain multibyte
+character sets, in which octets 10 and 0 will appear in the middle of
+other characters.  The other problem, which is more minor and possibly
+not worth worrying about, is that someone can type a password on one
+system and then go to another system which uses a different encoding for
+the same characters, and have their password not work.
+
+The restriction to the ISO646 invariant subset is the best approach for
+strings which are not particularly significant to users.  Passwords are
+visible enough that this is somewhat doubtful as applied here.  ISO646
+does, however, have the virtue (!?) of offending everyone.  It is easy
+to say "But the $ is right on people's keyboards!  Surely we can't
+forbid that".  From a human factors point of view, that makes quite a
+bit of sense.  The contrary argument, of course, is that a with a circle
+on top, or some of the characters poorly handled by Unicode, are on
address@hidden's keyboard.
+
address@hidden itemize
+
address@hidden
Index: ccvs/doc/i18n/Makefile.in
diff -u /dev/null ccvs/doc/i18n/Makefile.in:1.24.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/i18n/Makefile.in   Wed Dec 21 13:25:08 2005
@@ -0,0 +1,581 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU translated CVS documentation
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#               1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+#               2004
+#              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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc/i18n
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-exec-recursive install-info-recursive \
+       install-recursive installcheck-recursive installdirs-recursive \
+       pdf-recursive ps-recursive uninstall-info-recursive \
+       uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+
+# This program 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.
+SUBDIRS = pt_BR
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog \
+       README
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/i18n/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  doc/i18n/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
+       clean clean-generic clean-recursive ctags ctags-recursive \
+       distclean distclean-generic distclean-recursive distclean-tags \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       maintainer-clean-recursive mostlyclean mostlyclean-generic \
+       mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/doc/i18n/pt_BR/Makefile.in
diff -u /dev/null ccvs/doc/i18n/pt_BR/Makefile.in:1.25.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/i18n/pt_BR/Makefile.in     Wed Dec 21 13:25:08 2005
@@ -0,0 +1,424 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU translated CVS documentation
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#               1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+#               2004
+#              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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc/i18n/pt_BR
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+
+# This program 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.
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog \
+       cvs.texinfo
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/i18n/pt_BR/Makefile'; 
\
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  doc/i18n/pt_BR/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/doc/stamp-1
diff -u /dev/null ccvs/doc/stamp-1:1.76.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/stamp-1    Wed Dec 21 13:25:08 2005
@@ -0,0 +1,4 @@
address@hidden UPDATED 13 December 2005
address@hidden UPDATED-MONTH December 2005
address@hidden EDITION 1.12.13.1
address@hidden VERSION 1.12.13.1
Index: ccvs/doc/stamp-vti
diff -u /dev/null ccvs/doc/stamp-vti:1.170.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/stamp-vti  Wed Dec 21 13:25:08 2005
@@ -0,0 +1,4 @@
address@hidden UPDATED 13 December 2005
address@hidden UPDATED-MONTH December 2005
address@hidden EDITION 1.12.13.1
address@hidden VERSION 1.12.13.1
Index: ccvs/doc/version-client.texi
diff -u /dev/null ccvs/doc/version-client.texi:1.76.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/version-client.texi        Wed Dec 21 13:25:08 2005
@@ -0,0 +1,4 @@
address@hidden UPDATED 13 December 2005
address@hidden UPDATED-MONTH December 2005
address@hidden EDITION 1.12.13.1
address@hidden VERSION 1.12.13.1
Index: ccvs/doc/version.texi
diff -u /dev/null ccvs/doc/version.texi:1.171.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/doc/version.texi       Wed Dec 21 13:25:08 2005
@@ -0,0 +1,4 @@
address@hidden UPDATED 13 December 2005
address@hidden UPDATED-MONTH December 2005
address@hidden EDITION 1.12.13.1
address@hidden VERSION 1.12.13.1
Index: ccvs/lib/ChangeLog
diff -u /dev/null ccvs/lib/ChangeLog:1.489.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/lib/ChangeLog  Wed Dec 21 13:25:09 2005
@@ -0,0 +1,2779 @@
+2005-10-27  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_SOURCES): Add base64.[ch].
+       * base64.c, base64.h: New files from GNULIB.
+
+2005-10-19  Derek Price  <address@hidden>
+
+       * wait.h: #include "xtime.h" for FreeBSD 4.11.
+
+2005-12-07  Mark D. Baushke  <address@hidden>
+
+       * stdint_.h: Update from GNULIB.
+
+2005-11-27  Mark D. Baushke  <address@hidden>
+
+       * getaddrinfo.h, getcwd.c, md5.c, md5.h: Update from GNULIB.
+
+2005-11-14  Mark D. Baushke  <address@hidden>
+
+       * system.h (FOLD_FN_CHAR): Distinguish OSX_ and VMS_ variations
+       based on USE_VMS_FILENAME macro.
+
+2005-11-09  Mark D. Baushke  <address@hidden>
+
+       * system.h (FOLD_FN_CHAR): Create a VMS alternative of this macro
+       (patch suggested by Piet Schuermans <address@hidden>).
+       
+2005-10-20  Derek Price  <address@hidden>
+
+        * md5.c, md5.h, strcasecmp.c, strncasecmp.c: Update from GNULIB.
+
+2005-10-05  Derek Price  <address@hidden>
+
+       * getaddrinfo.h, getdelim.c, md5.h: Update from GNULIB.
+
+2005-10-04  Derek Price  <address@hidden>
+
+       * getaddrinfo.h, getdelim.c: Update from GNULIB.
+
+       * sunos57-select.c, system.h: Assume <unistd.h>.
+
+2005-10-03  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove xreadlink.  Add mbchar.
+       * Makefile.gnulib: Regenerated.
+       * creat-safer.c, fcntl--.h, fcntl-safer.h, open-safer.c, openat-die.c:
+       New files from GNULIB.
+       * canonicalize.c, dup2.c, ftruncate.c, getaddrinfo.c, getaddrinfo.h,
+       getcwd.c, getcwd.h, getdate.c, getdate.y, getdelim.c, getopt_.h,
+       getpagesize.h, nanosleep.c, openat.c, openat.h, pathmax.h, quotearg.c,
+       regex_internal.h, save-cwd.c, strftime.c, tempname.c, xgethostname.c,
+       xreadlink.c: Update from GNULIB.
+
+2005-09-29  Derek Price  <address@hidden>
+
+       * system.h: #define fd_select select when not already defined.
+
+2005-09-25  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add files (mkstemp.c tempname.c) to project.
+
+       * libcvs.dep, libcvs.mak: Regenerated for "libcvs.dsp" changes.
+
+2005-09-21  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dep: Regenerated for "../windows-NT/fix-msvc-mak.pl" change
+       to remove "basetsd" references.
+
+2005-09-20  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add files (canon-host.c gai_strerror.c getaddrinfo.c
+       getdelim.c mbchar.c strnlen1.c canon-host.h getaddrinfo.h getdelim.h
+       glob-libc.h mbchar.h mbuiter.h regex_internal.h strcase.h strnlen1.h
+       ..\windows-NT\netdb.h ..\windows-NT\sys\socket.h) to project.
+
+       * libcvs.dep libcvs.mak: Regenerated for "libcvs.dsp" changes.
+
+2005-09-20  Derek Price  <address@hidden>
+
+       * getaddrinfo.c: Update from GNULIB.
+
+2005-09-20  Derek Price  <address@hidden>
+           Paul Eggert  <address@hidden>
+
+       * regcomp.c, regex_internal.c, regex_internal.h, regexec.c: New,
+       simpler replacement fix for the previous.
+
+2005-09-19  Derek Price  <address@hidden>
+
+       * regcomp.c, regex_internal.c, regex_internal.h, regexec.c: Fix some
+       __attribute definition problems (submitted to GNULIB).
+
+       * __fpending.c, __fpending.h, atexit.c, basename.c, chdir-long.c,
+       closeout.c, cycle-check.c, dirname.c, dup-safer.c, dup2.c, exitfail.c,
+       fd-safer.c, filenamecat.c, fnmatch.c, ftruncate.c, getaddrinfo.c,
+       getcwd.c, getdate.h, getdelim.c, getline.c, getlogin_r.c, getndelim2.c,
+       getnline.c, getopt1.c, getpass.c, gettimeofday.c, lstat.c, malloc.c,
+       memmove.c, mkdir.c, mkstemp.c, nanosleep.c, openat.c, pipe-safer.c,
+       quotearg.c, readlink.c, realloc.c, regex.c, rename.c, rpmatch.c,
+       save-cwd.c, strerror.c, stripslash.c, strncasecmp.c, strnlen1.c,
+       strstr.c, strtol.c, tempname.c, time_r.c, timespec.h, xalloc-die.c,
+       xgetcwd.c, xmalloc.c, xreadlink.c, yesno.c: Update from GNULIB.
+
+       * canon-host.h, md5.c, md5.h, mktime.c, timespec.h: Update from GNULIB.
+
+2005-09-15  Derek Price  <address@hidden>
+
+       * regcomp.c, regex_internal.c, regex_internal.h, regexec.c: Update from
+       GNULIB, again.
+
+       * regcomp.c, regex_internal.c, regex_internal.h, regexec.c: Update from
+       GNULIB.
+
+       * strstr.h: Update from GNULIB.
+
+2005-09-13  Derek Price  <address@hidden>
+
+       * canon-host.c: Update from GNULIB.
+
+2005-09-12  Derek Price  <address@hidden>
+
+       * gai_strerror.c: Include config.h when available.  Include
+       getaddrinfo.h before other headers to test interface.
+
+2005-09-10  Larry Jones  <address@hidden>
+
+       * canon-host.c (canon_host_r): Designated initializers are C99 only.
+       * getaddrinfo.c (getaddrinfo): Can't do arithmetic on void *.  Fix
+       incorrect hints member name.  Fix const mismatch.
+
+2005-09-09  Derek Price  <address@hidden>
+
+       Install glibc porting changes.
+       * glob.c, glob_.h: Update with alpha-GNULIB.
+       * glob-libc.h: New file from same.
+
+2005-09-08  Derek Price  <address@hidden>
+
+       * getaddrinfo.h: Don't assume HAVE_GETADDRINFO will be defined when the
+       system does not haev getaddrinfo.
+
+2005-09-06  Derek Price  <address@hidden>
+
+       * regex_internal.h: Update from GNULIB.
+
+       * getpass.c, regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
+       Update from GNULIB.
+
+       Update from GNULIB with alpha-quality patch.
+       * Makefile.am: Add getaddrinfo cruft.
+       * canon-host.c: Updated to use getaddrinfo module.
+       * canon-host.h, gai_strerror.c, getaddrinfo.c, getaddrinfo.h: New
+       files.
+
+2005-09-05  Derek Price  <address@hidden>
+
+       * Makefile.am (mbchar): Remove obsolete module cruft.
+
+2005-09-04  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * glob.c, glob_.h: Updated.
+       * Makefile.am: Move glob targets into alpha order.  Add size_max
+       module.
+
+       Add canon-host module from GNULIB.
+       * canon-host.c: New file.
+
+       Update from GNULIB.
+       * Makefile.am: Import modifications from...
+       * Makefile.gnulib: ...here.
+       * dup-safer.c, fd-safer.c, getpass.c, regcomp.c, regex.c, regex.h,
+       regex_internal.c, regex_internal.h, regexec.c, strcase.h,
+       strcasecmp.c, strftime.c, strncasecmp.c, strstr.c, strstr.h,
+       unistd-safer.h: Updated.
+       * mbchar.c, mbchar.h, mbuiter.h, memchr.c, pipe-safer.c, strnlen1.c,
+       strnlen1.h, unistd--.h: New files.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * getdelim.c (getdelim): Return EOF on EOF, revisited.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * getdelim.c (getdelim): Return EOF on EOF.
+
+2005-08-12  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * Makefile.am: Update using Makefile.gnulib changes.
+       * Makefile.gnulib, dup-safer.c, dup2.c, fnmatch.c, getcwd.c, getcwd.h,
+       getline.c, getline.h, getlogin_r.h, mktime.c, openat.h,
+       pagealign_alloc.c, quotearg.c, regex.c, regex.h, save-cwd.c,
+       strftime.c, tempname.c, time_r.h, xmalloc.c: Updated.
+       * getdelim.c, getdelim.h, regcomp.c, regex_internal.c,
+       regex_internal.h, regexec.c, size_max.h: New files.
+
+2005-06-12  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add files "filenamecat.h" and "lstat.c" to project.
+       * libcvs.dep, libcvs.mak: Regenerate for "libcvs.dsp" changes.
+
+2005-06-10  Derek Price  <address@hidden>
+
+       Sync with GNULIB.
+       * basename.c, canonicalize.c, canonicalize.h, dirname.c, dirname.h,
+       fnmatch_.h, fnmatch_loop.c, getcwd.c, getlogin_r.c, mkstemp.c,
+       openat.c, openat.h, pathmax.h, rename.c, stripslash.c, tempname.c,
+       xreadlink.c: Update from GNULIB.
+       * path-concat.c, path-concat.h: Rename to...
+       * filenamecat.c, filenamecat.h: ...this.
+
+       Test new stat module.
+       * lstat.h: New file.
+       * stat.c: Remove this file and...
+       * lstat.c: ...move most functionality here.
+
+2005-05-30  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add file "windows-NT/woe32.h" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+
+2005-05-28  Derek Price  <address@hidden>
+
+       * glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/.  Add comment.
+
+2005-05-27  Derek Price  <address@hidden>
+
+       * getlogin_r.h: Import new version from GNULIB.
+
+2005-05-26  Derek Price  <address@hidden>
+
+       * glob_.h: Protect __THROW separately from __BEGIN_DECLS.
+
+2005-05-26  Derek Price  <address@hidden>
+
+       * system.h: Move non-system substitute GNULIB headers into cvs.h.
+       Remove stat macros in favor of GNULIB stat-macros module.  Assume
+       <sys/stat.h> and <stdlib.h> per HACKING.
+
+2004-05-26  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add files "getlogin_r.c" and "getlogin_r.h" to project.
+       * libcvs.dep, libcvs.mak: Regenerated for "libcvs.dsp" change.
+
+2004-05-26  Conrad T. Pino  <address@hidden>
+
+       * glob_.h: Windows build fakes "ndir.h" which defines "struct direct"
+       which differs from "dirent.h" which defines "struct dirent".
+
+2005-05-25  Derek Price  <address@hidden>
+
+       * glob.c (LOGIN_NAME_MAX): Wrap sysconf for Windows.
+
+2005-05-25  Derek Price  <address@hidden>
+
+       * glob_.h: Simplify <sys/cdefs.h> include and GLIBC macro use.  Replace
+       use of defined _LIBC with !defined GLOB_PREFIX.  Restore some GLIBC
+       stuff we don't care about anyhow.  Separate some #defines into their
+       own section for clarity.
+       (__glob_pattern_p): Move this definition...
+       * glob.c (__glob_pattern_p): ...here.
+       (HAVE_D_TYPE): Remove this macro for simplicity's sake.
+       (HAVE__POSIX_GETPWNAM_R): Ditto.
+       * getlogin_r.c, getlogin_r.h: Update from GNULIB.
+       
+2005-05-25  Derek Price  <address@hidden>
+
+       * glob.c: Remove HAVE_GETLOGIN_R complexity in favor of the GNULIB
+       getlogin_r module.  Redefine "struct_stat64" rather than "stat64" to
+       avoid macro collisions on Solaris.
+       * getlogin_r.c, getlogin_r.h: New files from GNULIB.
+
+2004-05-24  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add files "canonicalize.c", "cycle-check.c",
+       "canonicalize.h", "cycle-check.h", "dev-ino.h", "glob.h", "mempcpy.h",
+       "path-concat.h", "stat-macros.h" and "strdup.h" to project.
+       * libcvs.dep, libcvs.mak: Regenerated for "libcvs.dsp" change.
+
+2005-05-24  Conrad T. Pino  <address@hidden>
+
+       * glob_.h: Remove "struct stat;" forward declaration and update comment.
+
+2005-05-24  Conrad T. Pino  <address@hidden>
+
+       * glob_.h: "#include <sys/stat.h>" for Solaris "#define stat stat64"
+       case.
+
+2005-05-24  Derek Price  <address@hidden>
+
+       * stat.c: Use system stat & lstat functions in this file.
+       * system.h (CVS_STAT, CVS_LSTAT): Remove these macros.
+
+2005-05-24  Derek Price  <address@hidden>
+
+       * Makefile.am (BUILT_SOURCES, EXTRA_DIST, MAINTAINERCLEANFILES): Add
+       getdate.c due to automake bug.
+
+2005-05-24  Derek Price  <address@hidden>
+
+       * glob_.h, glob.c: Don't attempt to handle 64 bit file information
+       explicitly when not compiling as part of glibc.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * canonicalize.c, canonicalize.h, cycle-check.c, cycle-check.h,
+       dev-ino.h, path-concat.c, path-concat.h: New files from GNULIB.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * Makefile.am: Remove unnecessary comment.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * __fpending.c, alloca_.h, allocsa.c, allocsa.h, asnprintf.c,
+       asprintf.c, basename.c, chdir-long.c, chdir-long.h, closeout.c,
+       closeout.h, dirname.c, dirname.h, dup-safer.c, dup2.c, error.c,
+       error.h, exit.h, exitfail.c, exitfail.h, fd-safer.c, fnmatch.c,
+       fnmatch_.h, fnmatch_loop.c, getcwd.c, getcwd.h, getdate.c, getdate.h,
+       getdate.y, gethostname.c, getline.c, getline.h, getndelim2.c,
+       getndelim2.h, getnline.c, getnline.h, getopt.c, getopt1.c, getopt_.h,
+       getopt_int.h, getpagesize.h, getpass.c, getpass.h, gettext.h,
+       gettime.c, gettimeofday.c, lstat.c, malloc.c, md5.c, md5.h, mempcpy.c,
+       mempcpy.h, memrchr.c, memrchr.h, minmax.h, mkdir.c, mkstemp.c,
+       mktime.c, nanosleep.c, openat.c, openat.h, pagealign_alloc.c,
+       pagealign_alloc.h, pathmax.h, printf-args.c, printf-args.h,
+       printf-parse.c, printf-parse.h, quotearg.c, quotearg.h, readlink.c,
+       realloc.c, regex.c, regex.h, rename.c, rpmatch.c, save-cwd.c,
+       save-cwd.h, setenv.c, setenv.h, stat-macros.h, stat.c, stdbool_.h,
+       stdint_.h, strcase.h, strcasecmp.c, strdup.c, strdup.h, strerror.c,
+       strftime.c, strftime.h, stripslash.c, strstr.c, strstr.h, strtol.c,
+       strtoul.c, tempname.c, time_r.c, time_r.h, timespec.h, unistd-safer.h,
+       unlocked-io.h, unsetenv.c, vasnprintf.c, vasnprintf.h, vasprintf.c,
+       vasprintf.h, xalloc-die.c, xalloc.h, xgetcwd.c, xgetcwd.h,
+       xgethostname.c, xmalloc.c, xreadlink.c, xreadlink.h, xsize.h, yesno.c,
+       yesno.h: Update from GNULIB.
+
+2005-05-20  Derek Price  <address@hidden>
+
+       * glob.c (__stat64): Add args to macro definition for clarity.
+
+2005-05-19  Derek Price  <address@hidden>
+
+       * glob.c: Use POSIX getpwnam_r on Solaris.
+
+2005-05-19  Derek Price  <address@hidden>
+
+       * glob.c: Don't delcare protos for getlogin or getlogin_r if we got one
+       from <unistd.h>.
+
+2005-05-18  Derek Price  <address@hidden>
+
+       * glob.c (GETPW_R_SIZE_MAX): Remove `;' from macro definition.
+
+2005-05-18  Derek Price  <address@hidden>
+
+       More misc cleanup for compatibility with GNULIB & glibc, mostly
+       suggested by Paul Eggert <address@hidden>.
+       * glob.c: Improve comments.
+       (GETPW_R_SIZE_MAX): Add parens to definition.
+       (glob): Use GNU coding conventions (formatting change).
+       * glob_.h: Include <sys/cdefs.h> when possible.
+
+2005-05-17  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "glob.c", "glob_.h" and "mempcpy.c" to project.
+       * libcvs.dep, libcvs.mak: Regenerated for "libcvs.dsp" change.
+
+2005-05-17  Derek Price  <address@hidden>
+
+       More misc cleanup for compatibility with GNULIB & glibc, mostly
+       suggested by Paul Eggert <address@hidden>.
+       * glob.c: Improve comments.  
+       (GETPW_R_SIZE_MAX): New macro to avoid undefined sysconf macros.
+       (glob): Use new macro.
+       * glob_.h: Define __const, __restrict, and __USE_GNU when necessary.
+       Protect use of __BEGIN_DECLS & __END_DECLS.  Remove include of
+       <sys/types.h>.  Reorganize definitions for GNULIB.  Remove #undefs
+       which work around what is now probably a non-existant problem.
+
+2005-05-15  Derek Price  <address@hidden>
+
+       * glob_.h, glob.c: More misc cleanup for compatibility with GNULIB &
+       glibc, mostly suggested by Paul Eggert <address@hidden>.  Remove
+       casts to and from void * - they are not needed in C89.
+
+2005-05-13  Derek Price  <address@hidden>
+
+       * glob_.h: Enable GNU features by default.  Remove copy/pasted getopt
+       #define.
+       * glob.c: s/__strdup/strdup/ (Fixes BSD compilation issue).
+
+2005-05-13  Derek Price  <address@hidden>
+
+       * glob.c, glob_.h: Misc cleanup for compatibility with GNULIB & glibc,
+       mostly suggested by Paul Eggert <address@hidden>.
+
+2005-05-12  Derek Price  <address@hidden>
+
+       * glob.c, glob_.h: Misc improvements suggested by Paul Eggert, bringing
+       these files closer to their glibc sources.  Simplify & reorganize for
+       clarity.  Use protos.
+       (glob_in_dir): Fix GLOB_ONLYDIR bug/typo.
+
+2005-05-11  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore glob.h.
+       * Makefile.am (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Add glob
+       files.
+       (glob.h): New target.
+       * glob.c, glob_.h: New files.
+       * strdup.c, strdup.h: New files from GNULIB.
+
+2005-05-09  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dep, libcvs.mak: Regenerated after Windows full rebuild.
+
+2005-05-08  Mark D. Baushke  <address@hidden>
+
+       * libcvs.dsp: unistd-safer.h is in lib, not windows-NT.
+       * libcvs.dep: Regenerate.
+
+2005-05-07  Mark D. Baushke  <address@hidden>
+
+       * libcvs.dep: Use a relative path for unistd-safer.h.
+
+       * libcvs.dsp: Update from GNULIB.
+       Add files dup-safer.c, fd-safer.c, and unistd-safer.h.
+       * libcvs.dep, libcvs.mak: Regenerate.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * chdir-long.c, nanosleep.c, save-cwd.c, tempname.c: Updated.
+       * dup-safer.c, fd-safer.c, unistd-safer.h: New files.
+
+2005-05-01  Mark D. Baushke  <address@hidden>
+
+       * regex.c: Update from GNULIB.
+
+2005-04-25  Derek Price  <address@hidden>
+
+       * getdate.y: Update from GNULIB.
+
+2005-04-15  Derek Price  <address@hidden>
+
+       * Makefile.am (DISTCLEANFILES): Add getdate.log.
+       * .cvsignore: Ditto.
+       * test-getdate.sh: Add new tests.
+       (verify, skip, valid_timezone): New functions.
+
+2005-04-12  Derek Price  <address@hidden>
+
+       * getdate.y: Update from GNULIB.
+
+2005-04-06  Derek Price  <address@hidden>
+
+       * getdate.y: Update from GNULIB.
+
+2005-04-03  Mark D. Baushke  <address@hidden>
+
+       * strtol.c: Update from GNULIB.
+
+2005-03-29  Mark D. Baushke  <address@hidden>
+
+       * mktime.c, strftime.c: Update from GNULIB.
+
+2005-03-23  Derek Price  <address@hidden>
+
+       * Makefile.am (getdate_SOURCES): Remove sources that are now included
+       via $(noinst_LIBRARIES).
+
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * mktime.c, regex.c, stdint_.h, strftime.c, strtol.c: Update from
+       GNULIB.
+
+2005-03-10  Mark D. Baushke  <address@hidden>
+
+       * mktime.c, save-cwd.c, strftime.c, strtol.c: Update from GNULIB.
+
+2005-03-08  Conrad T. Pino  <address@hidden>
+
+       * .cvsignore: Add stdint.h entry.
+
+2005-03-07  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Synchronize with GNULIB updates.
+       Remove valloc.c file. Add files __fpending.c, __fpending.h,
+       chdir-long.h, closeout.c, closeout.h, getcwd.h,
+       pagealign_alloc.c, pagealign_alloc.h, quotearg.c, quotearg.h.
+       * libcvs.dep, libcvs.mak: Regenerate for libcvs.dsp change.
+
+2005-03-07  Mark D. Baushke  <address@hidden>
+
+       * pagealign_alloc.c: Update from GNULIB.
+
+2005-03-04  Jim Hyslop  <address@hidden>
+
+       * xtime.h: added include guards to fix compile errors on IRIX 5.3
+       (Patch from Georg Schwarz <address@hidden>.)
+
+2005-03-03  Derek Price  <address@hidden>
+
+       * pagealign_alloc.c, pagealign_alloc.h: New files from GNULIB.
+       * valloc.c: Remove this obsolete file.
+
+2005-03-02  Jim Meyering  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add the following to support
+       the GNULIB closeout module: closeout.c, closeout.h, quotearg.c,
+       quotearg.h, __fpending.h.
+       * closeout.c, closeout.h: New files.
+       * quotearg.c, quotearg.h: New files.
+       * __fpending.c, __fpending.h: New files.
+       * Makefile.gnulib: Regenerate.
+
+2005-03-02  Derek Price  <address@hidden>
+
+       * gettext.h, setenv.c, vasnprintf.c, vasprintf.c: Update from GNULIB.
+
+2005-03-01  Derek Price  <address@hidden>
+
+       Update installed GNULIB modules.
+       * Makefile.am: Tweak for new GNULIB updates.
+       * alloca_.h, dup2.c, error.c, ftruncate.c, getdate.c, getdate.y,
+       getopt_.h, gettext.h, gettime.c, malloc.c, mkdir.c, mktime.c,
+       realloc.c, rename.c, save-cwd.c, strstr.c, strtoul.c, timespec.h,
+       xgetcwd.c: Update these files.
+       * chdir-long.c, chdir-long.h, getcwd.c, getcwd.h, mempcpy.c, mempcpy.h,
+       memrchr.c, memrchr.h, openat.c, openat.h, strstr.h, strtol.c: New files
+       from GNULIB.
+
+2005-03-01  Derek Price  <address@hidden>
+
+       * xtime.h: Remove obsolete timeb stuff.
+
+2005-02-20  Mark D. Baushke  <address@hidden>
+
+       * xgethostname.c (xgethostname): Check for ENOMEM, which is
+       returned by OSX/Darwin if the specified buffer is not large
+       enough for the hostname.
+       (Problem reported by Neil Conway <address@hidden>.)
+
+2005-02-08  Derek Price  <address@hidden>
+
+       * fncase.c (OSX_filename_classes): Mac OSX doesn't need \ mapped to /.
+       * system.h (FOLD_FN_CASE): Clarify comment.
+
+2005-01-31  Derek Price  <address@hidden>
+
+       * Makefile.am: Update copyright notices.
+
+2004-12-14  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add Makefile.gnulib.
+
+2004-11-30  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dep: Regenerated for "../cvsnt.dsp" change.
+       * libcvs.mak: Regenerated for "../cvsnt.dsp" change.
+
+2004-11-21  Mark D. Baushke  <address@hidden>
+
+       * libcvs.dep, libcvs.dsp, libcvs.mak: Add "xgethostname.c" to
+       project.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * xgethostname.h, xgethostname.c: New files from GNULIB.
+       * Makefile.am (libcvs_a_SOURCES): Add new files.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * getdate.y, getopt.c, getopt1.c, getopt_.h, getopt_int.h, xgetcwd.c:
+       Update from GNULIB.
+
+2004-11-15  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_LIBADD): Add @address@hidden
+
+2004-11-11  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add test-getdate.sh.
+
+2004-11-11  Mark D. Baushke  <address@hidden>
+
+       * alloca_.h, allocsa.h, mktime.c: Update from GNULIB.
+
+2004-11-11  Mark D. Baushke  <address@hidden>
+
+       * strftime.c, getdate.y: Update from GNULIB.
+       * getdate.c: Regenerated.
+
+2004-11-10  Mark D. Baushke  <address@hidden>
+
+       * test-getdate.sh: Remove non-portable 'Feb 29, 2096 8 years'
+       test case. Add comments about portable dates.
+
+2004-11-10  Mark D. Baushke  <address@hidden>
+
+       * test-getdate.sh (TZ): Set to UTC0 instead of UTC to fix MacOS X
+       problem.
+
+2004-11-10  Mark D. Baushke  <address@hidden>
+
+       * mktime.c (SHR): New macro, which is a portable substitute for >>
+       that should work even on Crays.
+       Problem reported by Mark D. Baushke.
+       (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
+       (Patch from Paul Eggert of GNULIB.)
+
+       * Makefile.am (getdate_LDADD): Add @address@hidden
+       * Makefile.in: Regenerated.
+
+2004-11-09  Mark D. Baushke  <address@hidden>
+
+       * strftime.c: Update from GNULIB.
+
+2004-11-05  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "readlink.c" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+       * libcvs.mak: Regenerate for "libcvs.dsp" change.
+
+2004-11-05  Mark D. Baushke  <address@hidden>
+
+       * readlink.c: Update from GNULIB.
+
+2004-11-04  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "xreadlink.c" and "xreadlink.h" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+       * libcvs.mak: Regenerate for "libcvs.dsp" change.
+
+2004-11-04  Mark D. Baushke  <address@hidden>
+
+       * allocsa.h, allocsa.valgrind: Update from GNULIB.
+       * Makefile.in: Regenerated.
+
+2004-11-04  Mark D. Baushke  <address@hidden>
+
+       * sunos57-select.c: Move '#undef select' before system #include
+       statements to avoid conflicting declarations on BSDI BSD/OS 4.2.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am: Update from GNULIB.
+       * readlink.c, xreadlink.c, xreadlink.h: Add from GNULIB.
+       * Makefile.gnulib, Makefile.in: Regenerated.
+
+2004-11-03  Derek Price  <address@hidden>
+
+       * getdate.y: Update from GNULIB.
+
+2004-11-02  Mark D. Baushke  <address@hidden>
+
+       * getpass.c, setenv.h: Update from GNULIB.
+
+2004-11-02  Mark D. Baushke  <address@hidden>
+
+       * test-getdate.sh (getdate): Do not assume 'diff -u' is
+       universally available.
+       * Makefile.am (getdate_SOURCES): Add allocsa.c sources needed by
+       getdate on Solaris.
+       * Makefile.in: Regenerated.
+
+2004-11-01  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "setenv.c", "unsetenv.c", "allocsa.h" and "setenv.h" 
to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+       * libcvs.mak: Regenerate for "libcvs.dsp" change.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * test-getdate.sh: Test a date relative to a specified date and one of
+       the failing dates from the rcs2-7 test in src/sanity.sh.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * Makefile.am (TESTS): Add test-getdate.sh.
+       (check_PROGRAMS): Add getdate.
+       (getdate_*): Add info to build getdate.
+       (MOSTLYCLEANFILES): Add files that might be generated by
+       test-getdate.sh.
+       * allocsa.c, allocsa.h, setenv.c setenv.h, unsetenv.c: New files from
+       GNULIB.
+       * test-getdate.sh: Add some new dates and expect correct output.
+
+2004-10-27  Mark D. Baushke  <address@hidden>
+
+       * mktime.c (not_equal_tm): New patch from GNULIB.
+
+2004-10-26  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "rpmatch.c" and "yesno.h" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+       * libcvs.mak: Regenerate for "libcvs.dsp" change.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move error.h to its own section.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add yesno.h.
+       * rpmatch.c, yesno.h: New files from GNULIB.
+       * yesno.c: Update from GNULIB.
+
+2004-10-23  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "../windows-NT/stdint.h" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am (libcvs_a_OBJECTS): Fix typo for $(ALLOCA_H) and
+       ($STDBOOL_H). Also update rules for stdint GNULIB module.
+       * Makefile.in: Regenerated.
+
+2004-10-22  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Remove "argmatch.c" from project.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add stdint GNULIB module.
+       Fix typos in alloca and stdbool sections.
+       * stdint_.h: New file from GNULIB.
+       * getpagesize.h: Update from GNULIB.
+       * mktime.c: Update from GNULIB.
+
+2004-10-22  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move md5 to its own section.
+       * md5.c, md5.h: Update from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am, rpmatch.c, yesno.h, yesno.c: Back out recent changes.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * error.c, error.h: Update from GNULIB.
+
+2004-10-21  Mark Baushke  <address@hidden>
+
+       * libcvs.dep, libcvs.mak: Remove argmatch references.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move yesno to its own section.
+       * rpmatch.c, yesno.h: New files from GNULIB.
+       * yesno.c: Update from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move getpagesize to its own section.
+       * getpagesize.h: Update from GNULIB.
+
+2004-10-21  Mark Baushke  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove argmatch.c.
+       * argmatch.c: Remove this unused file.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move strftime to its own section.
+       * strftime.h: New file.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * malloc.c: Update from GNULIB.
+
+2004-10-21  Mark Baushke  <address@hidden>
+
+       * Makefile.am (all-local): Fix typo.
+       * Makefile.in: Regenerated.
+
+2004-10-21  Conrad T. Pino  <address@hidden>
+
+       * libcvs.mak: Regenerated for "../zlib/lib.dsp" change.
+
+2004-10-20  Mark D. Baushke  <address@hidden>
+
+       * sunos57-select.c: New file. Work around Solaris 7 select()
+       hang.
+       * Makefile.in: Regenerate for new configure.in.
+
+2004-10-18  Derek Price  <address@hidden>
+
+       * system.h: Define DEVNULL here when necessary.  Don't include
+       unistd.h twice.
+
+2004-10-16  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "vasprintf.c" and "vasprintf.h" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" change.
+       * libcvs.mak: Regenerate for "libcvs.dsp" change.
+
+2004-10-15  Derek Price  <address@hidden>
+
+       * asprintf.c, vasprintf.c, vasprintf.h: New files from GNULIB.
+
+2004-10-15  Derek Price  <address@hidden>
+
+       * getpass.c: Update from GNULIB.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add stat-macros.h.
+       * stat.c: Update from GNULIB.
+       * stat-macros.c: New file from GNULIB.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * nanosleep.c: Update from GNULIB.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * memmove.c: Update from GNULIB.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move minmax.h to its own section.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * system.h: Reorganize slightly.
+
+2004-10-07  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Remove "xstrdup.c" from project.
+       Add "strcasecmp.c", "getopt_.h" and "getopt_int.h" to project.
+       * libcvs.dep: Regenerate for "libcvs.dsp" changes.
+       * libcvs.mak: Regenerate for "libcvs.dsp" changes.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * system.h: Include getopt.h.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add getpass.h.
+       * getpass.h: New file from GNULIB.
+       * getpass.c: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add strcase.h.
+       * strcase.h, strcasecmp.c, strncasecmp.c: New files from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * gethostname.c: Update from gnulib.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move getline, getnline, & getndelim2
+       sources to their own sections.
+       * getline.c, getndelim2.c, getndelim2.h, getnline.c, getnline.h: Update
+       from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * .cvsignore: Add getopt.h.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * Makefile.am: Add new configuration for getopt.
+       * getopt.h: Remove file.
+       * getopt_.h, getopt_int.h: New files from GNULIB.
+       * getopt.c, getopt1.c: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * mkstemp.c, tempname.c: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove xstrdup.c.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * xstrdup.c: Remove this obsolete file.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (fnmatch, fnmatch-posix): Improve comment.
+       * fnmatch.c, fnmatch_loop.c: Update from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move exit.h to its own section.
+
+2004-10-05  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Remove "savecwd.c", "savecwd.h", "xgetwd.c" from project.
+       Add "save-cwd.c", "save-cwd.h", "xgetcwd.c", "xgetcwd.h" to project.
+       * libcvs.dep: Regenerated for "libcvs.dsp" change.
+       * libcvs.mak: Regenerated for "libcvs.dsp" change.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * basename.c, dirname.c, dirname.h, stripslash.c: Updated from GNULIB.
+       * system.h: s/FILESYSTEM_PREFIX_LEN/FILE_SYSTEM_PREFIX_LEN/.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.gnulib: New file.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add xalloc-die.c.
+       * xalloc-die.c: New file from GNULIB.
+       * xalloc.h, xmalloc.c: Update from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move gettext.h to its own section.
+       * gettext.h, vasnprintf.c, vasnprintf.h: Update from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * savecwd.c: Rename to...
+       * save-cwd.c: ...this and replace with the newest version from GNULIB.
+       * savecwd.h: Ditto, but to...
+       * save-cwd.h: ...this name.
+       * Makefile.am (libcvs_a_SOURCES): Remove savecwd.[ch].  Add save-cwd.h
+       & save-cwd.c in their own section.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove xgetwd.c, add xgetcwd.h &
+       xgetcwd.c in their own section.
+       * xgetwd.c: Removed.
+       * xgetcwd.h, xgetcwd.c: New files imported from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * alloca_.h, alloca.c: Import latest versions from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move pathmax.h to its own section.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move unlocked-io.h to its own
+       section.
+       * unlocked-io.h: Import most recent version from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Move regex.h to its own section.
+       * regex.c: Import most recent version from GNULIB.
+
+2004-10-05  Conrad T. Pino  <address@hidden>
+
+       * libcvs.dsp: Add "dirname.c" to project to resolve link error.
+       * libcvs.dep: Regenerated for "libcvs.dsp" change.
+       * libcvs.mak: Regenerated for "libcvs.dsp" change.
+
+2004-10-05  Mark D. Baushke  <address@hidden>
+
+       * regex.c (re_comp): Cast gettext return value to char * to
+       avoid warning in !ENABLE_NLS case. Patch imported from GNULIB.
+       (Problem report from Martin Neitzel <address@hidden>.)
+
+2004-09-09  Conrad T. Pino  <address@hidden>
+
+       * libcvs.mak: Regenerated for "../cvsnt.dsp" changes made 2004-09-08.
+
+2004-08-27  Derek Price  <address@hidden>
+
+       Import minmax module from GNULIB.
+
+       * Makefile.am (libcvs_A_SOURCES): Add minmax.h.
+       * minmax.h: New file.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore GCC profiling data.
+
+2004-06-24  Derek Price  <address@hidden>
+
+       * libcvs.dsp: Add "./xsize.h" to Header file list.  Add "./strftime.c"
+       & "./time_r.c" to Source file list.
+       * libcvs.dep, libcvs.mak: Regenerated for "./libcvs.dsp" change.
+       (Patch submitted by Conrad T. Pino <address@hidden>.)
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * Makefile.am (xsize): Move GNULIB xsize module into its own section.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add strftime.c.
+       * strftime.c: New file.
+
+2004-05-17  Derek Price  <address@hidden>
+
+       * libcvs.dsp: Add "lib/xtime.h" to project header files.
+       * libcvs.dep: Regnerated for "libcvs.dsp" file change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-05-15  Derek Price  <address@hidden>
+
+       Back out GNULIB getdate update until date parsing problem is fixed.
+       * Makefile.am: Temporarily comment out getdate.y test targets.
+       * getdate.y: Restored from version 1.19.
+       * xtime.h: Readded from version 1.1.
+       * Makefile.in, getdate.c: Regenerated.
+
+2004-05-15  Derek Price  <address@hidden>
+
+       * libcvs.dsp: Move all "../lib/*.c" files to this project.  Header file
+       list updated for GNULIB updates.
+       * libcvs.dep: Regenerated for "libcvs.dsp" changes.
+       * libcvs.mak: Regenerated for "libcvs.dsp" changes.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-05-14  Derek Price  <address@hidden>
+
+       * libcvs.dsp: Add basename.c & gettime.c for Windows build.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-05-14  Derek Price  <address@hidden>
+
+       * gettime.c, nanosleep.c: Updated from GNULIB.
+
+2004-05-03  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in (check-TESTS): Correct the script to deal with some
+       make (BSD) that use 'sh -e' which will terminate whenever a
+       command (such as test -n "") fails.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * Makefile.am (getdate_LDADD): Add $(LIBINTL), needed on some systems.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * Makefile.am (BUILT_SOURCES, MAINTAINERCLEANFILES): Remove getdate.c,
+       Automake determines this automatically.
+       * Makefile.in: Regenerated.
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * progname.c (progname): Assume = "getdate" for now.
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * Makefile.am (getdate_SOURCES): Add xmalloc, xstrdup, error, exitfail,
+       and progname for getdate test program on some systems.
+       * error.c, progname.c: New file.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+2004-04-29  Derek Price  <address@hidden>
+
+       * getdate.y: Restore unforked version from GNULIB.
+       * unlocked-io.h: Update to most recent version from GNULIB.
+       * getdate.y: Regenerated.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * .cvsignore: Add getdate executable.
+       * Makefile.am: Remove out-of-date comment about regex.  Use Automake
+       comments where the comments won't look good in the Makefile.
+       (AM_CPPFLAGS): Remove obsolescent include.
+       (TESTS, MOSTLYCLEANFILES, check_PROGRAMS, getdate_*): Add support for
+       testing getdate.
+       * test-getdate.sh: New file.
+       * getdate.y: Move include to compile in test mode.
+       * Makefile.in, getdate.c: Regenerated.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * system.h: Include timespec.h instead of xtime.h.
+       * xtime.h: Removed.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add getdate.h, getdate.y in their own
+       section.
+       (BUILT_SOURCES, MAINTAINERCLEANFILES): Add getdate.c.
+       * getdate.h, getdate.y: Import updated versions from GNULIB.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * mktime.c: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add time_r.h.
+       * time_r.h: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * nanosleep.c: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add gettime.c.
+       * gettime.c: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * gettimeofday.c: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add timespec.h.
+       * timespec.h: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * system.h: Move definition of FILENAMES_CASE_INSENSITIVE to
+       windows-NT/config.h.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       Add dirname module from GNULIB.
+
+       * Makefile.am (libcvs_SOURCES): Add new files.
+       * basename.c, dirname.c, dirname.h: New files.
+       * stripslash.c: Update from GNULIB.
+       * system.h (ISDIRSEP): Remove.
+       (ISABSOLUTE): s/ISDIRSEP/ISSLASH/.  Use FILESYSTEM_PREFIX_LEN to search
+       for DOS drive spec rather than reimplementing.
+       * Makefile.in: Regenerated.
+
+2004-04-26  Derek Price  <address@hidden>
+
+       * libcvs.dsp: Add stdbool.h from windows-NT as source dependency.
+       * libcvs.mak: Regenerated.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * libcvs.dsp, libcvs.dep, libcvs.mak: Back out recent stdbool.h change.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * .cvsignore: Add stdbool.h.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * libcvs.dsp: Create stdbool.h.
+       * libcvs.dep, libcvs.mak: Regenerated.
+
+2004-04-22  Derek Price  <address@hidden>
+
+       * system.h: #include <fnmatch.h>.
+
+2004-04-22  Derek Price  <address@hidden>
+
+       * system.h: #include <stdbool.h>.
+
+2004-04-21  Derek Price  <address@hidden>
+
+       Add stdbool module from GNULIB.
+
+       * stdbool_.h: New file.
+       * Makefile.am (stdbool.h, BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
+       Add stdbool cruft.
+       * Makefile.in: Regenerated.
+
+2004-04-20  Derek Price  <address@hidden>
+
+       * system.h: Correct comments.
+
+2004-04-19  Derek Price  <address@hidden>
+
+       * system.h: Gratuitous reformatting.
+
+2004-04-19  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): s/lib\.\w+/libcvs.*/i.
+       * Makefile.in: Regenerated.
+
+2004-04-19  Derek Price  <address@hidden>
+
+       * libcvs.mak: Regenerated for "zlib/libz.dsp" change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-17  Derek Price  <address@hidden>
+
+       * libcvs.dsp, libcvs.dep, libcvs.mak: Move...
+       * lib.dsp, lib.dep, lib.mak: ...here.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-17  Derek Price  <address@hidden>
+
+       * LIB.dsp: Rename to...
+       * lib.dsp: ...this.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * lib.dsp: Set PROP BASE directories to projet standard
+       has "Reset" function use project defaults.
+       Change "..\lib\" paths to ".\" for consistency.
+       * lib.mak: Regenerated for lib.dsp change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * lib.dsp: Dropped "alloca.c" from project.
+       * lib.dep: Regenerated for "lib.dsp" change.
+       * lib.mak: Regenerated for "lib.dsp" change.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add LIB.dep.
+       * Makefile.in: Regenerated.
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * lib.dsp: Update to compile fnmatch.
+       * LIB.dep: New generated file.
+       * lib.mak: Regenerated.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-14  Derek Price  <address@hidden>
+
+       Update to current fnmatch module from GNULIB.
+
+       * Makefile.am (BUILT_SOURCES, EXTRA_DIST): Add fnmatch sources.
+       (MOSTLYCLEANFILES): Initialize & add fnmatch & alloca headers.
+       (libcvs_a_OBJECTS): Make dependent on $(FNMATCH_H).
+       (fnmatch.h): New target.
+       * fnmatch.h.in: Rename to...
+       * fnmatch_.h: ...this.
+       * fnmatch.c: New version from GNULIB.
+       * fnmatch_loop.c: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Remove lib.dep.
+       * Makefile.in: Regenerated.
+
+2004-04-07  Derek Price  <address@hidden>
+
+       * regex.c: Revise "FREE_VAR" macro to eliminate C4090/C4022 warnings
+       in Windows build with Visual C++ 6.0 compiler.
+       (Original patch from Conrad T. Pino <address@hidden>.)
+
+2004-04-07  Derek Price  <address@hidden>
+
+       Update regex module from GNULIB.
+
+       * Makefile.am (libcvs_a_SOURCES): Remove regex.c.
+       * regex.c, regex.h: Import new versions from GNULIB.
+       * Makefile.in: Regenerated.
+
+2004-04-04  Derek Price  <address@hidden>
+
+       * system.h: Correct comment.
+
+2004-04-04  Derek Price  <address@hidden>
+
+       * system.h: Restore complete path folding for Cygwin under Windows.
+       Add ISABSOLUTE macro for determining whether a path is absolute to
+       handle X:\ style paths under Windows (& Cygwin).
+
+2004-03-29  Derek Price  <address@hidden>
+
+       * lib.mak: Regenerated with VC++ 5.0.
+       (Sent by Dennis Jones <address@hidden>.)
+       * LIB.dep: Removed.
+
+2004-03-28  Derek Price  <address@hidden>
+
+       * lib.mak: Regenerated.
+
+2004-03-27  Derek Price  <address@hidden>
+
+       * LIB.dep, lib.mak: Regenerated.
+
+2004-03-26  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2004-03-26  Derek Price  <address@hidden>
+
+       * LIB.dep, lib.dsp, lib.mak: New files.
+       * Makefile.am (EXTRA_DIST): Add new files.
+       * .cvsignore: Ignore MSVC build cruft.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * system.h: No longer fold back slashes in paths into slashes.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * realloc.c: Update to more recent version from GNULIB to fix a WOE32
+       compilation problem.
+
+2004-03-20  Derek Price  <address@hidden>
+
+       * mkdir.c (mkdir): Declare string args const.
+
+2004-03-13  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add error.h.
+       * Makefile.in: Regenerated.
+
+2004-03-11  Derek Price  <address@hidden>
+
+       * xsize.h: Move the default definition of SIZE_MAX into
+       windows-NT/config.h.in.
+
+2004-03-07  Derek Price  <address@hidden>
+
+       * xsize.h: Provide a default definition of SIZE_MAX for Windows.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       Import xalloc module from GNULIB, as well as its remaining unimported
+       dependency, the exitfail module.
+
+       * Makefile.am (libcvs_a_SOURCES): Add new sources.
+       * exitfail.c, exitfail.h, xalloc.h, xmalloc.c, xstrdup.c: New files.
+       * Makefile.in: Regenerated.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import vasnprintf module from GNULIB.
+       * asnprintf.c, printf-args.c, printf-args.h, printf-parse.c,
+       printf-parse.h, vasnprintf.c, vasnprintf.h: New files.
+       * Makefile.am (libcvs_a_SOURCES): Add header files.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import xsize module from GNULIB for vasnprintf().
+       * xsize.h: New file.
+       * Makefile.am (libcvs_a_SOURCES): Add xsize.h.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import alloca module from GNULIB for vasnprintf().
+       * alloca_.h, alloca.c: New files.
+       * .cvsignore: Ignore alloca.h.
+       * Makefile.am: Compile alloca() when necessary.
+       * Makefile.in: Regenerated.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Make error() accessible to the GNULIB functions.
+
+       * error.h: Move in from ../src.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       * strerror.c: Update to latest version from gnulib.
+
+2003-12-14  Mark D. Baushke  <address@hidden>
+
+       * fseeko.c: Remove unnecessary #ifdef code.
+       * ftello.c: Ditto.
+       * system.h: Ditto.
+
+2003-12-10  Mark D. Baushke  <address@hidden>
+
+       * ftello.c: Rework for AC_FUNC_FSEEKO.
+       * system.h: Rework fseeko and ftello prototypes.
+
+2003-12-10  Mark D. Baushke  <address@hidden>
+
+       * xgetwd.c (pathmax.h): Add new include.
+       (Patch from Rob Clevenger <address@hidden>.)
+
+2003-12-09  Derek Price  <address@hidden>
+
+       * system.h: Correct spelling in comment.
+
+2003-12-09  Mark D. Baushke  <address@hidden>
+
+       * fseeko.c (fseeko): New file and function to help with largefile
+       support.
+       * ftello.c (ftello): Ditto.
+       * system.h (ftello): Add prototype if !defined(HAVE_FTELLO).
+       * Makefile.in: Regenerated.
+
+2003-12-09  Larry Jones  <address@hidden>
+
+       * getdate.c: Regenerated.
+
+2003-12-08  Mark D. Baushke  <address@hidden>
+
+       * getdate.y: Remove #include <stdio.h> to avoid problems compiling
+       AIX with '#define _LARGE_FILES 1' with Redeclaration of fgetpos64
+       and ftello64. This may be an autoconf problem with
+       AC_SYS_LARGEFILE.
+       * getdate.c: Regenerated.
+
+2003-12-03  Derek Price  <address@hidden>
+
+       * fncase.c (OSX_filename_classes): New array.
+       (fncmp): Use FOLD_FN_CASE rather relying on the fact that it will be
+       #defined to use WNT_filename_classes.
+       * system.h: Define FOLD_FN_CASE, fncmp, and fnfold for all case
+       insensitive filesystems.  Share some code between the new generic case
+       insensitive section and the old WOE32 section.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerate for new configure.in.
+
+2003-10-27  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove obsolete PROTO.h.
+       * Makefile.in: Regenerated.
+
+2003-10-22  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_LIBADD): Undo the previous change and move it
+       into the program linking step in `../src'.
+       * Makefile.in: Regenerated.
+
+2003-10-21  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_LIBADD): Add $(LIBINTL) for gettext.
+       * Makefile.in: Regenerated.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * sighandle.c (SIG_handle): With the last commit, avoid allowing a
+       second interrupt while this interrupt handler runs.
+       (SIG_beginCrSect, SIG_endCrSect): With the last change, move these two
+       functions to the top of this file to avoid prototyping them for
+       SIG_handle().
+       (*): C89ify some prototypes.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * system.h (EXIT_FAILURE): Don't define here since it's defined in
+       exit.h.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * getpass.c: Update to new version from GNULIB with Larry's fix
+       incorporated.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * getopt.h, getopt.c, getopt1.c: Update from GNULIB.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * getline.c, getndelim2.c: Merge changes from GNULIB.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * system.h: Assume <string.h> and <sys/types.h> per the notes in
+       HACKING.
+
+2003-09-30  Larry Jones  <address@hidden>
+
+       * getpass.c: Fix bug that caused password to be echoed on many
+       systems (input may not be followed by output on the same stream
+       without an intervening call to a file positioning function).
+       (Reported by David Everly <address@hidden>.)
+
+2003-09-30  Derek Price  <address@hidden>
+
+       Provide an atexit() function on systems which provide on_exit() but not
+       atexit().
+
+       * atexit.c: New file.
+       * Makefile.in: Regenerated.
+
+2003-08-19  Derek Price  <address@hidden>
+
+       * system.h: Assume more headers, re C89 & GNULIB.
+
+2003-08-12  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove getndelim2 - it is now in
+       LIBOBJ.
+
+2003-07-31  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Remove getpass.c per new getpass-gnu
+       API from GNULIB.
+       * Makefile: Regenerated.
+
+2003-07-29  Derek Price  <address@hidden>
+
+       * getpass.c: New file, almost identical to GNULIB's currect version.
+       * Makefile.am (libcvs_a_SOURCES): Add getpass.c.
+       * Makefile.in: Regenerated.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * lstat.c: Sync with GNULIB.
+       * stat.c: Almost sync'd with GNULIB.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * getline.h: Sync this file with GNULIB.
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * getline.c, getline.h, getndelim2.c, getndelim2.h, getnline.c,
+       getnline.h: Merge some more changes from GNULIB.
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * gethostname.c: Update from GNULIB.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * system.h: Move some includes from src/cvs.h.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * system.h: Assume <stddef.h> per C89.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * strerror.c: Import current version from GNULIB.
+       * Makefile.in: Regenerated.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * Makefile.am: Make a comment more specific about LIBOBJ, while
+       removing a list of LIBOBJ'd file maintained elsewhere.
+       * memmove.c: Import current version from GNULIB.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * exit.h: Really add this file this time.
+       * Makefile.in: Regenerated.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * exit.h: New file from GNULIB.
+       * Makefile.am (lib_SOURCES): Add exit.h.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * stat.c: Sync us with GNULIB, except for the xalloc.h requirement.
+       xalloc.h is waiting on $GNULIB/modules/error for import.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * Makefile.am: Add getndelim.c & getnline.c as part of the new API.
+       * getline.c: Merge more of Bruno Habile's GNULIB changes to this file
+       so our fork is less divergent.
+       * getline.h: Ditto.
+       * getndelim2.c: Ditto.
+       * getndelim2.h: Ditto.
+       * getnline.c: Ditto.
+       * getnline.h: Ditto.
+
+       * Makefile.in: Regenerated.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * savecwd.c: Move the MD5 stuff that shifted here a few commits back...
+       * md5.c: ...back to here.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * getndelim2.c: Make limit an ssize_t rather than int, as per the
+       return type.
+       * getndelim2.h: Ditto.
+       * getnline.c: Ditto.
+       * getnline.h: Ditto.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * getline.c (getdelim): Return ssize_t, as per getline.h.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * getline.c: Merge some of Bruno Habile's changes from GNULIB including
+       some he didn't quite finish, like renaming of n => linesize.
+       * getline.h: Ditto.
+       * getndelim2.c: Ditto.
+       * getndelim2.h: Ditto.
+       * getnline.c: Ditto.
+       * getnline.h: Ditto.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * getndelim2.c: New file.
+       * getndelim2.h: Ditto.
+
+       * Makefile.am (libcvs_a_SOURCES): Add getndelim2.h.
+       * getline.h: Return ssize_t.
+       * getnline.h: Ditto.
+       * getline.c: Ditto and depend on getndelim2.
+       * getnline.c: Ditto.
+
+       * Makefile.in: Regenerated.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * getline.c: Don't include the unneeded unlocked-io.h.
+       * getnline.c: Remove extra blank line.  Use GETNDELIM_NO_LIMIT rather
+       than GETNLINE_NO_LIMIT.
+       * getnline.h: Define GETNDELIM_NO_LIMIT rather than GETNLINE_NO_LIMIT.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * PROTO.h: Remove this file since some of our GNULIB sources no longer
+       support compilers that can't handle prototypes.
+
+       * md5.c: s/PROTO//.
+       * md5.h: Ditto.
+       * savecwd.c: Ditto.
+       * savecwd.h: Ditto.
+       * sighandle.c: Ditto.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * getline.h: Include config.h so to use the macros it defines.
+       (Thanks to Steve McIntyre <address@hidden> for the report.)
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * pathmax.h: New file.
+
+       * Makefile.am (libcvs_a_SOURCES): Add pathmax.h.
+       * system.h: Remove PATH_MAX stuff.
+
+       * Makefile.in: Regenerated.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * getnline.c: New file based on GNULIB and resubmitted to GNULIB.
+       * getnline.h: Ditto.
+
+       * Makefile.am (libcvs_a_SOURCES): Add new getnline.h.
+       * getline.c: Import and hack version from GNULIB to prevent double
+       prototype problem on 64-bit machines.  Resubmitted to GNULIB.
+       * getline.h: Ditto.
+       (Thanks to Steve McIntyre <address@hidden> for the report.)
+
+       * Makefile.in: Regenerated.
+
+2003-07-15  Derek Price  <address@hidden>
+
+       * unlocked-io.h: s/LGPL/GPL/g, imported from GNULIB.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * mkstemp.c: New file.
+       * tempname.c: Ditto.
+
+       * Makefile.in: Regenerated.
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add gettext.h.
+       * system.h: Include gettext.h.
+
+       * gettext.h: New file from GNULIB.
+
+       * Makefile.in: Regenerated.
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * system.h: Reference the WIN32 macro only in order to define WOE32,
+       in accordance with the GNU convention to avoid implying that we
+       consider the Microsoft Windows Operating Environment any sort of "win".
+
+2003-05-29  Derek Price  <address@hidden>
+
+       * Makefile.am: xgssapi.h is no more.
+       * xgssapi.h: Move its contents to src/gssapi-client.h
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-28  Derek Price  <address@hidden>
+
+       * getline.h, md5.c, sighandle.c, savecwd.h: Use PROTO.h.
+       * savecwd.c: Use standard PROTO macro.
+       * Makefile.am: Add PROTO.h
+       * PROTO.h: PROTO macro definition is finally here, as specified in
+       Autoconf documentation.
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-28  Derek Price  <address@hidden>
+
+       * Makefile.am: get rid of $(includeopt); -Isrc/ is ok, so remove
+       lengthy explanation.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-27  Derek Price  <address@hidden>
+
+       * README: New file explaining the GNULIB origin of many of the lib
+       files.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerate with Automake version 1.7.5.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * unlocked-io.h: New file from GNULIB.
+       * system.h: Include unlocked-io.h.
+       * Makefile.am (libcvs_a_SOURCES): Add unlocked-io.h.
+
+       * Makefile.in: Regenerated.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * realloc.c: New file from GNULIB.
+       * system.h (HAVE_REALLOC, CVS_REALLOC): Add support for realloc.c.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * stat.c: Don't compile LSTAT code unless configure detected that we
+       need to be trailing-slash-safe.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * system.h: Move in the standard includes from cvs.h.  Define
+       CVS_MALLOC & CVS_REALLOC.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * malloc.c: New file from <https://savannah.gnu.org/projects/gnulib>.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * lstat.c: New file from <https://savannah.gnu.org/projects/gnulib>.
+       * stat.c: Ditto.
+       * system.h: Define CVS_STAT and CVS_LSTAT properly when the system
+       versions of stat and lstat are broken.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * .cvsignore: Add fnmatch.h for Windows.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * xgssapi.h: #include config.h.
+       (Reported by Boyd Lynn Gerber <address@hidden>.)
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * system.h: Define S_ISSOCK on SCO OpenServer.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-04-10  Larry Jones  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-04-03  Derek Price  <address@hidden>
+
+       * Makefile.am (distclean-local): New target to remove fnmatch.h when
+       necessary.  This should be handled by Automake, but until then...
+       (Resolves issue #100
+       <http://ccvs.cvshome.org/issues/show_bug.cgi?id=100> from
+       Serguei E. Leontiev <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-03-24  Derek Price  <address@hidden>
+
+       * Makefile.am: Update copyright notice.
+
+       * Makefile.in: Regenerated.
+
+2003-03-19  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-03-19  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-01-23  Larry Jones  <address@hidden>
+
+       * getdate.y: Add RCS/CVS timestamp format (Y.mm.dd.hh.mm.ss).
+       * getdate.c: Regenerated.
+
+       * wait.h (WCOREDUMP): New macro.
+
+2002-12-27  Derek Price  <address@hidden>
+
+       * getdate.c: Regenerated with Bison 1.35.
+
+2002-11-04  Derek Price  <address@hidden>
+
+       * getdate.y (Convert): Add comment as to the effectiveness of
+       descriptive error messages.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated using Automake 1.6.3.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2002-09-15  Larry Jones  <address@hidden>
+
+       * system.h: Add FOPEN_BINARY_READWRITE.
+       (Patch submitted by Josh Lehan <address@hidden>.)
+
+2002-08-12  Derek Price  <address@hidden>
+
+       * Makefile.am: Remove obsolete reference to `ftruncate.c'.
+       (Symptoms reported by
+       Andrey Aristarkhov <address@hidden>.)
+       * Makefile.in: Regenerated.
+
+2002-08-08  Derek Price  <address@hidden>
+
+       * regex.c: Removed unused `compile_range' declaration.
+       (Patch from John Tytgat <address@hidden>.)
+
+2002-05-09  Larry Jones  <address@hidden>
+
+       * getline.c (getstr): Make terminator int instead of char to avoid
+       promotion problems.
+       * getline.h (getstr): Change to match.
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+       * fnmatch.h: Move this file...
+       * fnmatch.h.in: here.
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * strerror.c: Use HAVE_CONFIG_H and put config.h in brackets rather
+       than quotes.
+
+2002-05-02  Derek Price  <address@hidden>
+
+       * fnmatch.h: More #defines to avoid Mac OS X namespace conflicts.
+
+2002-04-30  Derek Price  <address@hidden>
+
+       * hostname.c: Rename to...
+       * gethostname.c: this.
+       * Makefile.am: Change comment to reflect above.
+
+       * Makefile.in: Regenerated with automake 1.6.
+
+2002-04-28  Derek Price  <address@hidden>
+
+       * getopt.h: #define new names for functions and variables when they
+       might conflict with system definitions (namely on Mac OS X 10.1 with
+       the most recent dev packages - This should be removable after the Mac
+       dev packages are fixed.).
+       * regex.h: Ditto.
+       * Makefile.am (libcvs_a_SOURCES): Remove fnmatch.h.
+
+2002-04-20  Larry Jones  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add getpagesize.h.
+       * Makefile.in: Regenerated.
+
+2001-09-18  Derek Price  <address@hidden>
+
+       * fnmatch.c: The header file for a system function we're replacing with
+       our own should be #included using double quotes.
+       (Patch from Corey Minyard  <address@hidden> via
+       Alexey Mahotkin <address@hidden>.)
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with automake 1.5.
+
+2001-08-09  Derek Price  <address@hidden>
+
+       * getpagesize.h: Only include sys/param.h when HAVE_SYS_PARAM_H has
+       been defined by configure.
+
+2001-08-07  Derek Price  <address@hidden>
+
+       * build_lib.com: Verify.
+       * getdate.y: Move the include of xtime.h out from underneath the ifdef
+       so that it is always included.
+       (Patch from Mike Marciniszyn <address@hidden>.)
+
+       * getdate.c: Regenerated.
+
+2001-08-06  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2001-07-05  Larry Jones  <address@hidden>
+
+       * getpagesize.h: New file to define getpagesize() for systems that
+       don't already have it.
+       * valloc.c (valloc): Use it.
+
+2001-07-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new Automake release candidate 1.4h.
+
+2001-06-28  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new version of Automake.
+
+2001-06-15  Derek Price  <address@hidden>
+
+       * xselect.h: Don't include xtime.h.
+       (Thanks to Martin Neitzel <address@hidden>.)
+
+2001-04-25  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+
+2001-04-02  Derek Price  <address@hidden>
+           for Alon Ziv  <address@hidden>
+
+       * getdate.y: Add a declaration for yyparse().
+
+       * getdate.c: Regenerated.
+
+2001-03-14  Derek Price  <address@hidden>
+
+        * Makefile.in: Regenerated
+
+2001-02-20  Derek Price  <address@hidden>
+
+       * xgssapi.h: New file to perform GSSAPI include magic.
+       * Makefile.am (EXTRA_DIST): Add xgssapi.h.
+
+       * Makefile.in: Regenerated.
+
+2001-02-14  Derek Price  <address@hidden>
+
+       * Makefile.am (libcvs_a_SOURCES): Add xtime.h & xselect.h.
+       * Makefile.in: Regenerated.
+       * getdate.y: Include xtime.h.
+       * getdate.c: Regenerated.
+       * system.h: Include xtime.h.
+       * xtime.h: New file to do include magic for time functions.
+       * xselect.h: New file to do select include magic.
+
+2001-02-06  Derek Price  <address@hidden>
+           Rex Jolliff  <address@hidden>
+           Shawn Smith  <address@hidden>
+
+       * system.h: definitions of CVS_OPENDIR, CVS_READDIR, & CVS_CLOSEDIR
+       provided here in support of changes to handle VMS DEC C 5.7
+       {open,read,close}dir problems.  Check today's entry in the vms subdir
+       for more.
+
+2001-01-10  Derek Price  <address@hidden>
+           Rex Jolliff  <address@hidden>
+
+       * rename.c: replace calls to unlink() with CVS_UNLINK() for VMS
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * Makefile.am (INCLUDES): Fixed typo
+        * Makefile.in: Regenerated
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * Makefile.am (INCLUDES): Added $(top_srcdir)/src
+        * Makefile.in: Regenerated
+
+2000-12-21  Derek Price  <address@hidden>
+
+       * .cvsignore: Added .deps directory and alphabetized
+       * Makefile.am: New file needed by Automake
+       * Makefile.in: Regenerated
+
+2000-11-15  Derek Price  <address@hidden>
+
+       * system.h:  Added CVS_FDOPEN to conform to CVS_FOPEN precedent
+
+2000-07-10  Larry Jones  <address@hidden>
+
+       * savecwd.c: #include <sys/types.h> before <fcntl.h>.
+
+2000-07-04  Karl Fogel  <address@hidden>
+
+       * getline.h, getline.c (getstr): take new limit arg.
+       (GETLINE_NO_LIMIT): new #define.
+       (getline_safe): new function, takes limit arg and passes it on.
+       (getline): pass GETLINE_NO_LIMIT to getstr().
+
+       See related change of same date in ../src/ChangeLog.
+
+2000-06-19  Larry Jones  <address@hidden>
+
+       * regex.c, regex.h: Version from emacs 20.7 to plug memory leaks
+       and avoid potential portability problems.
+
+2000-03-22  Larry Jones  <address@hidden>
+
+       * getdate.y: Add logic to allow yyyy/mm/dd in addition to mm/dd/yy
+       (since that is the format CVS frequently uses).
+       * getdate.c: Regenerated.
+
+2000-02-16  Jim Meyering  <address@hidden>
+
+       * sighandle.c (SIG_inCrSect): New function.
+
+2000-01-03  Larry Jones  <address@hidden>
+
+       * getdate.y (Convert): Add window to determine whether 2-digit dates
+       are 19xx (69-99) or 20xx (00-68).
+       (get_date): Fix y2k bug: initialize yyYear to tm_year + 1900,
+       not just tm_year.
+       * getdate.c: Regenerated.
+
+1999-12-29  Jim Kingdon  <http://developer.redhat.com/>
+
+       * Makefile.in: There was a comment here which referred to a long
+       comment in configure.in about regex.o (the configure.in comment
+       isn't there any more).  Replace our comment with a conciser
+       version of the former configure.in comment.
+
+1999-03-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * getopt.h: Don't declare the arguments to getopt.
+
+1999-02-09  Jim Kingdon  <http://www.cyclic.com>
+
+       * vasprintf.c: Removed; there is apparently no clean, portable
+       solution to the VA_LIST_IS_ARRAY problem (C9X drafts have va_copy,
+       but we aren't even assuming C90 yet!).
+       * Makefile.in (SOURCES): Remove vasprintf.c.
+       * build_lib.com: Remove vasprintf.c and vasprintf.obj.
+
+1999-01-26  Jim Kingdon  <http://www.cyclic.com>
+       and Joerg Bullmann  <http://www.glink.net.hk/~jb/MacCVSClient/>
+
+       * fnmatch.c: Use FOLD_FN_CHAR in two cases where it had been
+       omitted.
+
+1999-01-22  Jim Kingdon  <http://www.cyclic.com>
+
+       * fnmatch.c: Include system.h; FOLD_FN_CHAR has moved there from
+       config.h (from Alexey Milov).  Don't define our own FOLD_FN_CHAR;
+       that just masks cases in which we got the includes tangled up.
+
+1999-01-12  Jim Kingdon  <http://www.cyclic.com>
+
+       * memmove.c: Remove paragraph which contained the FSF's old
+       snail mail address; it has changed.
+
+1999-01-05  Jim Kingdon  <http://www.cyclic.com>
+
+       * md5.c, md5.h: Rename all the external interfaces to start with
+       cvs_* to avoid namespace pollution problems.  Include string.h
+       unconditionally, to avoid gcc -Wall warnings on memset.
+
+1998-12-29  Jim Kingdon  <http://www.cyclic.com>
+
+       * getdate.y (RelativeMonth): Add 1900 to tm_year, so that in 2000,
+       we pass 2000, not 100, to Convert.
+       (Convert): Add comment about Year argument.
+       * getdate.c: Regenerated using byacc.
+
+Tue Mar 24 16:08:00 1998  Ian Lance Taylor  <address@hidden>
+
+       * Makefile.in (CFLAGS): Set to @CFLAGS@, not -g.
+
+1998-02-20  Jim Kingdon  <address@hidden>
+
+       * regex.c: Partial merge with version from emacs 20.2.  Brings
+       over some trivial changes (whitespace and so on) (most such
+       changes I didn't bother with, for this time).  Don't cast to int
+       before comparing old_regend[r] to regstart[r] (this is the point
+       of bothering; the old code was broken for 64 bit machines.
+       Reported by Paul Vixie).
+
+Tue Feb 17 18:33:26 1998  Ian Lance Taylor  <address@hidden>
+
+       * memmove.c: New file, resurrecting the old one.
+       * Makefile.in (SOURCES): Add memmove.c.
+
+1998-02-03  Tim Pierce  <address@hidden>
+
+       * system.h (CVS_LSTAT): New macro.
+
+Sat Feb  7 17:33:39 1998  Ian Lance Taylor  <address@hidden>
+
+       * getline.h (getstr): Declare.
+
+13 Jan 1998  Jim Kingdon
+
+       * fncase.c: Include config.h before system.h.
+
+       * system.h: Just include string.h unconditionally.  We already
+       include it unconditionally elsewhere.
+
+Tue Jan 13 16:51:59 1998  Ian Lance Taylor  <address@hidden>
+
+       * fncase.c: New file, taken from windows-NT/filesubr.c.
+       * system.h: If __CYGWIN32__ or WIN32 are defined, define
+       FOLD_FN_CHAR, FILENAMES_CASE_INSENSITIVE, and ISDIRSEP, and
+       declare fncmp and fnfold.  Taken from windows-NT/config.h.
+       * Makefile.in (SOURCES): Add fncase.c.
+
+Sat Jan 10 10:51:26 1998  Jim Kingdon  <address@hidden>
+
+       * getline.c (getstr): Make sure to set errno when appropriate.  I
+       didn't test the error case for the new code but inspection shows
+       the old code was rather broken.
+
+Sat Nov 29 22:03:39 1997  Jim Kingdon  <address@hidden>
+
+       getwd and getcwd were a big big mess.  Although Jim's fix might
+       indeed be fixing a typo, the code is so tangled that I would guess
+       it probably breaks some system.  So clean this up:
+       * xgetwd.c: Always assume we have getcwd (we had been anyway,
+       before Jim's change).
+       * getwd.c: Removed.
+       * Makefile.in: Remove getwd.c
+       * system.h: Remove declarations of getwd and getcwd.  Move getcwd
+       declaration to the !HAVE_UNISTD_H section.
+
+1997-11-29  Jim Meyering  <address@hidden>
+
+       * xgetwd.c: Fix typo s/ifndef/ifdef/ in test of HAVE_GETWD.
+
+Wed Nov 26 10:12:33 1997  Jim Kingdon  <address@hidden>
+
+       * system.h: Always use "rb" and "wb".  Check for O_BINARY with an
+       #ifdef, not the error-prone LINES_CRLF_TERMINATED.
+
+Thu Sep 25 10:57:39 1997  Jim Kingdon  <address@hidden>
+
+       * getdate.y (get_date): If gmtime returns NULL, try to cope.
+       * getdate.c: Regenerated using byacc.
+
+       * getdate.y: Remove comment about sending email concerning this file
+       to Rich Salz.
+       * getdate.c: Regenerated using byacc.
+
+Wed Sep 24 10:35:38 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (OBJECTS): Add regex.o.
+
+Wed Sep 17 16:37:17 1997  Jim Kingdon  <address@hidden>
+
+       * getdate.y (ToSeconds): For am or pm, a hour of "12" really means 0.
+       * getdate.c: Regenerated using byacc (not bison per comment).
+
+Tue Sep  9 20:51:45 1997  Jim Kingdon  <address@hidden>
+
+       * build_lib.com: Add vasprintf.c and vasprintf.obj.
+
+       * build_lib.com: Remove strippath.obj from library/create command.
+
+Sun Sep  7 17:35:27 1997  Jim Kingdon  <address@hidden>
+
+       * system.h: Replace comment referring to ChangeLog with a
+       comment based on the ChangeLog entries.
+
+       * strdup.c: Removed, per change to ../configure.in
+       * Makefile.in (SOURCES): Remove strdup.c.
+
+Mon Jun 16 18:59:50 1997  Jim Kingdon  <address@hidden>
+
+       * system.h: Add CVS_FNMATCH.
+
+Sun Jun  8 23:41:11 1997  Jim Kingdon  <address@hidden>
+
+       * system.h (mkfifo): Remove; not used anywhere.
+
+Thu Mar  6 17:14:49 1997  Jim Kingdon  <address@hidden>
+
+       * regex.c: Partial merge with version from emacs 19.34.  I brought
+       over most trivial changes (whitespace and so on).  Most of the
+       changes to portability cruft I did not bring over, on the theory
+       of sticking to the devil that we know.  I did bring over the
+       change to undef MAX and MIN (this is a better solution to a
+       problem we had been handling a different way).  There were a
+       variety of changes I probably could/should have brought over, but
+       elected not to try to understand them and whether they would cause
+       trouble (printchar -> putchar, changes to output format in
+       print_partial_compiled_pattern, internationalization,
+       FREE_STACK_RETURN and friends which would appear to be fixing
+       memory leaks in error cases, RE_TRANSLATE_TYPE, and others).  I
+       did merge the changes (union fail_stack_elt, PUSH_FAILURE_POINTER,
+       etc.) to use a union for the failure stack rather than playing
+       games with pointers and integers (that was my reason for
+       bothering; the code had been broken on the Alpha).
+
+Mon Feb 10 18:52:18 1997  Ullrich von Bassewitz <address@hidden>
+
+       * md5.c: Make the parameter to getu32 const since the function will
+        only read the values and this will avoid compiler warnings in other
+        places.
+
+Mon Feb 10 18:29:04 1997  Ullrich von Bassewitz <address@hidden>
+
+       * vasprintf.c: Added a #define for systems where a va_list is
+       defined as an array, not as a pointer.
+
+Mon Feb 10 09:31:38 1997  Ken Raeburn  <address@hidden>
+
+       * md5.c (MD5STEP): Truncate to 32 bits before shifting right.
+
+Thu Jan 30 11:35:26 1997  Jim Kingdon  <address@hidden>
+
+       * regex.h: Don't prototype re_comp and re_exec.
+
+Tue Jan 28 17:45:46 1997  Jim Kingdon  <address@hidden>
+
+       * md5.c, md5.h: Changes so these work without having an integer
+       type which is exactly 32 bits.  Modeled after changes by Tatu Ylonen
+       <address@hidden> as part of SSH but rewritten.
+
+Wed Jan  8 14:50:47 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in, getopt.h, sighandle.c, system.h: Remove CVSid; we
+       decided to get rid of these some time ago.
+
+Thu Jan  2 13:30:56 1997  Jim Kingdon  <address@hidden>
+
+       * Makefile.in, argmatch.c, fnmatch.c, fnmatch.h, getline.c,
+       getopt.c, getopt.h, getopt1.c, getwd.c, hostname.c, mkdir.c,
+       regex.c, regex.h, rename.c, sighandle.c, strdup.c, strerror.c,
+       stripslash.c, system.h, vasprintf.c, wait.h, xgetwd.c, yesno.c:
+       Remove "675" paragraph; see ../ChangeLog for rationale.
+
+Sun Nov 24 13:34:25 1996  Jim Kingdon  <address@hidden>
+
+       * getdate.y (Convert): Change last acceptable year from 1999 to
+       2038.
+       * getdate.c: Regenerated using byacc 1.9.
+
+Tue Nov 19 17:11:17 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (OBJECTS): Remove strippath.o; we don't use
+       strip_path anymore.
+       (SOURCES): Remove strippath.c.
+       * strippath.c: Removed.
+       * build_lib.com: Remove strippath.c.
+
+Wed Oct  2 10:43:35 1996  Norbert Kiesel  <address@hidden>
+
+       * getdate.y: removed CVSid variable
+
+       * getdate.c: regenerated (using byacc 1.9)
+
+Wed Sep 25 10:25:00 1996  Larry Jones  <address@hidden>
+
+       * vasprintf.c: Fix type clashes in calls to strtoul.
+
+Wed Sep 11 15:55:31 1996  Jim Kingdon  <address@hidden>
+
+       * build_lib.com: Add valloc.c.
+
+Tue Sep 10 23:04:34 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (DISTFILES): Add build_lib.com.
+
+Fri Aug 16 16:01:57 1996  Norbert Kiesel  <address@hidden>
+
+       * Makefile.in (installdirs): new (empty) target
+
+Mon Aug 12 11:03:43 1996  Jim Kingdon  <address@hidden>
+
+       * system.h: Don't use #elif.  It is said to cause problems with
+       one of the HP compilers on HPUX 9.01.
+
+Sun Jul  7 23:25:46 1996  Jim Kingdon  <address@hidden>
+
+       * memmove.c: Removed.  The memove function was used by a very old
+       version of the CVS server for nefarious purposes and it has been
+       long gone.
+       * Makefile.in (SOURCES): Remove memmove.c.
+
+Thu Jun  6 15:12:59 1996  Jim Kingdon  <address@hidden>
+
+       * vasprintf.c: If STDC_HEADERS, include stdlib.h rather than
+       declaring its functions ourself.
+
+Wed Jun 05 10:14:29 1996  Mike Ladwig  <address@hidden>
+                         and Jim Kingdon  <address@hidden>
+
+       * system.h: If ERRNO_H_MISSING is defined, don't include errno.h.
+
+Wed Jun 05 10:14:29 1996  Mike Ladwig  <address@hidden>
+
+       * regex.c: Don't define MAX and MIN if already defined.
+
+Sun May 12 09:40:08 1996  Jim Kingdon  <address@hidden>
+
+       * getdate.y: Replace alloca.h include with a comment explaining
+       why we avoid alloca and the consequences of that.
+       * getdate.c: Regenerated.
+
+Wed May  8 09:31:03 1996  Jim Kingdon  <address@hidden>
+
+       * getdate.c: Regenerate with the version of byacc in Red Hat 3.0.3
+       (which I believe is byacc 1.9).  byacc, unlike bison, does not
+       require alloca in the generated parser.
+
+Thu Apr 25 18:26:34 1996  Jim Kingdon  <address@hidden>
+
+       * getdate.y (get_date): Set Start from nowtime, not now->time,
+       which may not be set.
+       * getdate.c: Regenerated.
+
+Wed Apr 10 17:55:02 1996  Jim Kingdon  <address@hidden>
+
+       * getdate.y (get_date): Use a time_t variable rather than a field
+       in a struct timeb.  Works around Solaris compiler bug.  Sure, it
+       is a compiler bug, but the workaround is completely painless.
+       * getdate.c: Regenerated.
+
+Fri Mar 22 11:17:05 1996  Jim Kingdon  <address@hidden>
+
+       * system.h: If EXIT_FAILURE is not defined by stdlib.h, define it
+       ourself.
+
+Thu Mar 14 16:27:53 1996  Jim Kingdon  <address@hidden>
+
+       * system.h: Remove alloca cruft.
+
+Wed Feb 28 03:16:48 1996  Benjamin J. Lee  <address@hidden>
+
+       * build_lib.com: Changed definition of symbol CC to search
+       for include files in [-.VMS] so VMS config.h can be picked
+       up without copying.
+
+Tue Feb 27 21:26:34 1996  Benjamin J. Lee  <address@hidden>
+
+       * build_lib.com: Added.  DCL File to build contents of [.lib]
+
+Tue Feb 27 21:18:38 1996  Benjamin J. Lee  <address@hidden>
+
+       * system.h: added an existence_error macro check for EVMSERR
+       necessary for happiness under VMS
+
+Thu Feb 22 22:30:04 1996  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (OBJECTS): Remove @ALLOCA@
+       (SOURCES): Remove alloca.c
+       * alloca.c: Removed.
+       * regex.c (REGEX_MALLOC): Define.
+
+Thu Feb 15 14:00:00  Jim Kingdon  <address@hidden>
+
+       * vasprintf.c: Declare abs().
+
+Wed Feb 14 14:48:31 1996  Jim Kingdon  <address@hidden>
+
+       * vasprintf.c (int_vasprintf): Don't cast arguments to memcpy.
+       * vasprintf.c, strtoul.c: Don't include ansidecl.h.  Do include
+       config.h if HAVE_CONFIG_H (for const).
+       * strtoul.c: Change CONST to const.
+
+Tue Feb 13 20:04:39 1996  Jim Kingdon  <address@hidden>
+
+       * strtoul.c: Added (needed by vasprintf.c, and missing on SunOS4).
+       * Makefile.in (SOURCES): Add strtoul.c.
+
+Mon Feb 12 10:04:46 1996  Jim Kingdon  <address@hidden>
+
+       * vasprintf.c: Added (same contents as before).
+       * Makefile.in (SOURCES): Add vasprintf.c.
+
+Thu Feb  1 14:33:17 1996  Karl Fogel  <address@hidden>
+
+        * Makefile.in (xlint): new rule; does nothing, as I'm not sure
+        running lint is actually advisable in here, but the top-level
+        Makefile thinks it can `make xlint' here.
+
+Thu Feb  1 15:07:42 1996  Jim Kingdon  <address@hidden>
+
+       * getopt.c: Remove rcsid.
+
+Tue Jan 30 18:20:27 1996  Jim Kingdon  <address@hidden>
+
+       * getline.c: Don't define NDEBUG.
+       (getstr): Rewrite assertions in a way which should stay clear of
+       signed/unsigned problems and compiler warnings thereof.
+
+Thu Jan 25 00:14:06 1996  Jim Kingdon  <address@hidden>
+
+       * yesno.c (yesno): fflush stdout as well as stderr.
+
+Wed Jan  3 18:16:50 1996  Jim Kingdon  <address@hidden>
+
+       * sighandle.c (SIG_register): Use memset not bzero.
+       * system.h: Remove defines for index, rindex, bcmp, and bzero.
+       All the calls to those functions are gone from CVS.
+
+Tue Jan  2 13:00:00 1996  Jim Kingdon  <address@hidden>
+
+       Visual C++ lint:
+       * sighandle.c: Prototype SIG_handle and SIG_defaults.
+       Use SIG_ERR where appropriate.
+
+Mon Dec 18 10:15:05 1995  Jim Kingdon  <address@hidden>
+
+       * rename.c: Check ENOENT rather than existence_error.  The latter
+       is undefined in this file, and including system.h is said to cause
+       (unspecified) problems.
+
+Sun Dec 17 23:58:06 1995  Jim Kingdon  <address@hidden>
+
+       * vasprintf.c: Removed (it is no longer used).
+       * Makefile.in (SOURCES): Remove vasprintf.c.
+
+Sat Dec 16 17:18:33 1995  Jim Kingdon  <address@hidden>
+
+       * vasprintf.c: Added.
+       * Makefile.in (SOURCES): Add vasprintf.c
+
+Mon Dec  4 10:54:04 1995  Jim Kingdon  <address@hidden>
+
+       * getdate.c: Remove #line directives.  I know, this is a kludge,
+       but Visual C++ 2.1 seems to require it (why, I have no idea.  It
+       has no trouble with the #line directives in getdate in CVS 1.6).
+
+Sat Nov 18 16:20:37 1995  Karl Fogel  <address@hidden>
+
+        * rename.c: same.
+
+        * mkdir.c: Use new macro `existence_error', instead of comparing
+        errno to ENOENT directly.
+
+        * system.h (existence_error): new macro, tries to portably ask if
+        errno represents a file-not-exist error.
+
+Fri Nov 17 20:08:58 1995  Karl Fogel  <address@hidden>
+
+        * system.h (NEED_DECOY_PERMISSIONS): moved this section to where
+        it belongs, duh.
+
+        * getdate.c: if STDC_HEADERS, then just include <stdlib.h> instead
+        of declaring malloc() and realloc() to be char *.
+
+        * system.h: ifdef NEED_DECOY_PERMISSIONS, then define the S_I*
+        permission masks for USR, GRP, and OTH in terms of the simpler
+        OS/2 masks.
+
+Wed Nov 15 15:36:03 1995  Karl Fogel  <address@hidden>
+
+        * system.h: ifdef USE_OWN_TCPIP_H, then include "tcpip.h".  Only
+        OS/2 does this right now.
+
+Tue Nov 14 18:44:57 1995  Greg A. Woods  <address@hidden>
+
+       * getdate.c: OK, this one is from SunOS-4.1 yacc and may be more
+       portable -- at least it compiles silently here!  ;-)
+
+Mon Nov 13 03:53:45 1995  Karl Fogel  <address@hidden>
+
+        * fnmatch.c: conform to 80 column standard (yes, I'm a pedant).
+
+Wed Nov  8 11:10:59 1995  Karl Fogel  <address@hidden>
+
+        * system.h (STAT_MACROS): ifdef S_IFMT, then use it as before; but
+        if it's not defined, then just do a single mask and assume
+        acceptance any of non-zero result.  Norbert, I trust you'll let me
+        know if this is unsatisfactory. :-)
+        Ifdef HAVE_SYS_UTIME_H, then include <sys/utime.h>.  Only OS/2
+        defines this right now.
+
+Wed Nov  8 13:18:51 1995  Norbert Kiesel  <address@hidden>
+
+       * valloc.c: omit malloc declaration (it's already in system.h
+         which is included and conflicts with <stdlib.h> on some
+         systems).
+
+Tue Nov  7 19:38:48 1995  Norbert Kiesel  <address@hidden>
+
+       * system.h (STAT_MACROS_BROKEN): undo previous change, because
+         else all regular files will be identified as links (the mask for
+         links is S_IFREG|S_IFCHR).
+
+Mon Nov  6 19:20:56 1995  Karl Fogel  <address@hidden>
+
+        * system.h (STAT_MACROS_BROKEN): in defining the S_IF* macros,
+        don't fold to 1 or 0 by first masking with S_IFMT; not all
+        systems have that macro, and anyway it's only necessary that we
+        return non-zero.
+
+Fri Oct 27 13:43:35 1995  Karl Fogel  <address@hidden>
+
+        * save-cwd.c: use __PROTO instead of __P (see below).
+
+        * getline.h (__PROTO): same as below.
+
+        * save-cwd.h (__PROTO): replaces __P.  New name, so don't ask if
+        already defined.  The conflict was that OS/2 w/ IBM C/C++ uses
+        `__P' for something else, in <ctype.h> of all places.
+
+        * system.h: do nothing about alloca ifdef ALLOCA_IN_STDLIB (see
+        ../src/ChangeLog).
+
+Tue Oct 24 13:01:25 1995  Norbert Kiesel  <address@hidden>
+
+       * wait.h: include sys/resource.h if available. This is needed at
+         least under AIX-3.2 where <sys/wait.h> doesn't include it.
+
+Mon Oct 23 17:39:11 1995  Norbert Kiesel  <address@hidden>
+
+       * valloc.c (valloc): change parameter definition
+
+Sun Oct 22 14:15:44 1995  Jim Meyering  (address@hidden)
+
+       * getline.c, getline.h: New files.
+       * Makefile.in (SOURCES, OBJECTS, HEADERS): Add getline.c, getline.o,
+       and getline.h, respectively.
+
+Tue Oct 10 18:01:50 1995  Karl Fogel  <address@hidden>
+
+        * Makefile.in (cvs_srcdir): define cvs_srcdir to be ../src, then
+        include it with -I so save_cwd.c can find error.h (for example).
+
+Sun Oct  8 12:27:57 1995  Peter Wemm  <address@hidden>
+
+       * system.h: define POSIX_SIGNALS or BSD_SIGNALS if configure has
+       located all the necessary functions for each "type".
+       * sighandle.c: detect/use POSIX/BSD reliable signals (especially
+       for blocking signals in critical sections).  Helps prevent stray
+       locks on interruption.
+
+Mon Oct  2 18:11:23 1995  Jim Blandy  <address@hidden>
+
+       * system.h: Doc fix.
+
+Mon Oct  2 18:10:35 1995  Larry Jones  <address@hidden>
+
+       * regex.c: compile 4.2 BSD compatible functions even when
+       _POSIX_SOURCE is defined since we need them and we wouldn't be
+       compiling this file unless they don't exist.
+
+Mon Oct  2 10:32:20 1995  Michael Finken  <address@hidden>
+
+        * strstr.c (strstr): new file and func.
+
+        * Makefile.in (SOURCES): added strstr.c.
+
+Sun Oct  1 21:03:40 1995  Karl Fogel  <address@hidden>
+
+        * regex.c: reverted below change.
+
+Thu Sep 28 13:37:04 1995  Larry Jones <address@hidden>
+
+        * regexp.c: check for ISC.
+
+Thu Sep 7  19:18:00 1995  Jim Blandy  <address@hidden>
+
+       * save-cwd.c: #include <direct.h> and <io.h>, on systems that
+       have them.
+
+       * getopt.c (_getopt_internal): Cast the return value of strlen,
+       which is unsigned, before comparing it with the difference between
+       two pointers, which is unsigned.
+
+Thu Aug 31 11:31:42 1995  Jim Blandy  <address@hidden>
+
+       * getdate.y [STDC_HEADERS]: #include <stdlib.h>, for abort.
+       [HAVE_ALLOCA_H]: #include <alloca.h>, for alloca on Windows NT.
+
+Wed Aug 30 18:48:44 1995  Jim Blandy  <address@hidden>
+
+       * system.h [HAVE_IO_H]: #include <io.h>, for Windows NT.
+       [HAVE_DIRECT_H]: #include <direct.h>, for Windows NT.
+       (CVS_MKDIR, FOLD_FN_CHAR, fnfold, fncmp, ISDIRSEP, OPEN_BINARY,
+       FOPEN_BINARY_READ, FOPEN_BINARY_WRITE): New macros/functions, for
+       use in system-sensitive code.
+
+       * regex.c (re_set_registers): start and end are pointers, not
+       integers.  Cast the initializing value appropriately.
+
+       * getopt.c [HAVE_STRING_H]: #include <string.h>, to avoid
+       warnings.
+
+       * fnmatch.c (FOLD_FN_CHAR): Give this a dummy #definition if
+       config.h didn't #define it.
+        (fnmatch): Pass filename characters through FOLD_FN_CHAR before
+       comparing them.
+
+       * argmatch.c: #include <sys/types.h>.
+       (argmatch): Declare arglen to be a size_t, rather than an int,
+       to avoid signed/unsigned comparison "problems".
+
+       * .cvsignore: Remove getdate.c from this file.  We want to
+       distribute it, for systems that don't have a Yacc-equivalent
+       installed (like Windows NT).
+
+Sat Aug 19 22:00:51 1995  Jim Blandy  <address@hidden>
+
+       * error.c: Don't #define CVS_SUPPORT here.  config.h takes care of
+       that for us.
+       [CVS_SUPPORT] (error_use_protocol): New variable, with apology.
+       (error): If error_use_protocol is set, report errors using the
+       client/server protocol.
+       * error.h [CVS_SUPPORT]: Extern decl for error_use_protocol.
+
+Fri Aug  4 00:01:24 1995  Jim Meyering  (address@hidden)
+
+       * xgetwd.c: Don't declare free.  A K&R style declaration gets
+       a conflict on some Sun systems when compiling with acc.
+
+       * save-cwd.c: New file.
+       * save-cwd.h: New file.
+       * Makefile.in (SOURCES): Add save-cwd.c
+       (OBJECTS): Add save-cwd.o.
+       (HEADERS): Add save-cwd.h.
+
+Thu Aug  3 00:55:54 1995  Jim Meyering  (address@hidden)
+
+       * error.h: New file.
+       * Makefile.in (HEADERS): Add error.h.
+
+Sat Jul 29 15:53:55 1995  James Kingdon  <address@hidden>
+
+       * Makefile.in (SOURCES): Add getdate.c.
+
+Thu Jul 27 09:11:41 1995  Robert Lipe <address@hidden>
+
+       * system.h: Check for PATHSIZE before falling back to _POSIX_PATH_MAX.
+
+Thu Jul 20 12:38:03 1995  James Kingdon  <address@hidden>
+
+       * error.c: Instead of calling cvs functions to clean up, allow cvs
+       to register a callback via error_set_cleanup.  Avoids hassles with
+       include files and SERVER_SUPPORT and so on.
+
+Tue Jul 18 21:18:00 1995  Jim Blandy <address@hidden>
+
+       * system.h: Include <sys/param.h> only if HAVE_SYS_PARAM_H
+       is #defined.  We've added a test to configure.in to #define this
+       on most systems.
+
+Thu Jul 13 11:22:21 1995  Jim Meyering  (address@hidden)
+
+       * xgetwd.c: New file.
+       * Makefile.in (SOURCES): Add xgetwd.c
+       (OBJECTS): Add xgetwd.o.
+
+Wed Jul 12 09:18:49 1995  Jim Meyering  (address@hidden)
+
+       * Makefile.in (OBJECTS): Remove fnmatch.o.  Now configure adds it
+       to LIBOBJS when necessary.
+
+Fri Jun 30 16:27:18 1995  James Kingdon  <address@hidden>
+
+       * rename.c (rename): If MVDIR is not defined, just give an error
+       on attempt to rename a directory.
+
+Thu Jun 29 00:46:31 1995  James Kingdon  <address@hidden>
+
+       * system.h: Check HAVE_SYS_TIMEB_H not non-existent HAVE_TIMEB_H.
+
+       * system.h: Don't define alloca if it is already defined.
+
+Wed Jun 28 15:24:51 1995  James Kingdon  <address@hidden>
+
+       * system.h: If NeXT, define utimbuf ourself.
+
+Mon May 29 22:32:40 1995  J.T. Conklin  <address@hidden>
+
+       * system.h: Handle time and directory headers as recommended in
+       the autoconf manual.
+       Undefine the S_FOO() macros if STAT_MACROS_BROKEN is set.
+       Don't define mode_t, as it is handled by config.h.
+
+Sat May 27 08:46:00 1995  Jim Meyering  (address@hidden)
+
+       * Makefile.in (Makefile): Regenerate only Makefile in current
+       directory when Makefile.in is out of date.  Depend on ../config.status.
+
+Fri Apr 28 22:49:25 1995  Jim Blandy  <address@hidden>
+
+       * Makefile.in (SOURCES, OBJECTS): Updated.
+       (HEADERS): New variable.
+       (DISTFILES): Updated.
+       (dist-dir): Renamed from dist; changed to work with DISTDIR
+       variable passed from parent.
+
+Wed Feb  8 06:37:53 1995  Roland McGrath  <address@hidden>
+
+       * system.h (S_IRUSR et al): Define if not already defined.
+
+       * waitpid.c [HAVE_CONFIG_H]: Include "config.h".
+       (ualloc): Return OLDPTR rather than running off the end.
+
+Mon Aug 22 22:48:19 1994  Ken Raeburn  (address@hidden)
+
+       * error.c (strerror): Replaced conditional static definition
+       (always used, since the condition variable was never set) with an
+       extern declaration, since it's provided by libc or strerror.c.
+
+Wed Aug 10 14:54:25 1994  Ken Raeburn  (address@hidden)
+
+       * Makefile.in (SOURCES): Add waitpid.c.
+       * waitpid.c: New file.
+
+Tue Aug  9 16:00:12 1994  Ken Raeburn  (address@hidden)
+
+       * md5.h (uint32): If SIZEOF_LONG isn't 4, don't define this to be
+       "unsigned long"; try SIZEOF_INT and "unsigned int", otherwise
+       complain.
+
+       * md5.c: Include config.h.
+       (const): Don't bother defining here, config.h should take care of
+       it.
+
+       * valloc.c (malloc): Declare.
+
+Fri Jul 15 12:57:20 1994  Ian Lance Taylor  (address@hidden)
+
+       * getopt.c: Do not include <stdlib.h> unless __GNU_LIBRARY__ is
+       defined.  On Irix 5.2, <stdlib.h> includes <getopt.h>, which
+       causes a multiple definition of struct option.
+
+Fri Jul  8 10:04:59 1994  Jim Kingdon  (address@hidden)
+
+       * md5.h, md5.c: Remove ANSI-isms.
+
+Thu Jul  7 20:24:18 1994  Ian Lance Taylor  (address@hidden)
+
+       * md5.h, md5.c: New files.
+       * Makefile.in (SOURCES): Add md5.c.
+       (OBJECTS): Add md5.o.
+       (DISTFILES): Add md5.h.
+       (md5.o): New target; depend upon md5.h.
+
+Fri May 27 18:15:34 1994  Ian Lance Taylor  (address@hidden)
+
+       * valloc.c: New file.
+
+Tue May 17 08:18:26 1994  Jim Kingdon  (address@hidden)
+
+       * error.c (error, fperror): If server_active, call server_cleanup
+       as well as Lock_Cleanup.
+
+Thu Jan  6 13:45:04 1994  Ken Raeburn  (address@hidden)
+
+       * system.h: Fix Dec 27 change to work correctly.  Makes Sep 9
+       change unnecessary, so backed that one out.  Never define PATH_MAX
+       in terms of pathconf, because that doesn't produce a constant, and
+       PATH_MAX is used to set array sizes.
+
+Mon Dec 27 14:22:07 1993  Mark Eichin  (address@hidden)
+
+       * system.h: don't touch PATH_MAX or MAXPATHLEN if *both* of them
+       are already defined, as one may be defined in terms of the other.
Index: ccvs/lib/Makefile.am
diff -u /dev/null ccvs/lib/Makefile.am:1.106.6.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/lib/Makefile.am        Wed Dec 21 13:25:09 2005
@@ -0,0 +1,327 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for library files used by GNU CVS.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+
+noinst_LIBRARIES = libcvs.a
+
+# Should look into unifying regular expression matching in CVS
+# with the diff library (perhaps to have the caller, CVS, do the
+# matching?)
+libcvs_a_SOURCES = \
+       sighandle.c \
+       system.h \
+       wait.h \
+       xselect.h \
+       xtime.h
+## Because @LIBOBJS@ is included below and AC_LIBOBJ is sometimes called on
+## these files from configure.in, automake automatically knows about many of
+## the *.c files in this directory.
+libcvs_a_LIBADD = \
+       @LIBOBJS@
+
+
+
+## Zero some variables so Automake will allow us to use += on them.
+BUILT_SOURCES =
+MOSTLYCLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+TESTS =
+check_PROGRAMS =
+
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog.fsf \
+       Makefile.gnulib \
+       build_lib.com \
+       libcvs.dep \
+       libcvs.dsp \
+       libcvs.mak \
+       test-getdate.sh
+
+## begin gnulib module alloca
+
+
+libcvs_a_LIBADD += @ALLOCA@
+## end   gnulib module alloca
+
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+EXTRA_DIST += alloca_.h
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca_.h
+       cp $(srcdir)/alloca_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+## end   gnulib module alloca-opt
+
+## begin gnulib module allocsa
+
+libcvs_a_SOURCES += allocsa.h allocsa.c
+EXTRA_DIST += allocsa.valgrind
+
+## end   gnulib module allocsa
+
+## begin gnulib module base64
+
+libcvs_a_SOURCES += base64.h base64.c
+
+## end   gnulib module base64
+
+## begin gnulib module cycle-check
+
+libcvs_a_SOURCES += cycle-check.c cycle-check.h dev-ino.h
+
+## end   gnulib module cycle-check
+
+## begin gnulib module dirname
+
+libcvs_a_SOURCES += basename.c stripslash.c
+
+## end   gnulib module dirname
+
+## For GNULIB's error module.
+##
+## This module isn't fully imported since GNULIB's error.c would conflict with
+## src/error.c (which knows how to send error messages over the network).  We
+## don't compile error.c into libcvs on purpose.  It can get compiled later as
+## part of the getdate test program,
+libcvs_a_SOURCES += error.h
+
+## begin gnulib module exit
+
+libcvs_a_SOURCES += exit.h
+
+## end   gnulib module exit
+
+## begin gnulib module fnmatch
+
+BUILT_SOURCES += $(FNMATCH_H)
+EXTRA_DIST += fnmatch_.h fnmatch_loop.c
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch_.h
+       cp $(srcdir)/fnmatch_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
+
+## end   gnulib module fnmatch
+
+## begin gnulib module getaddrinfo
+
+libcvs_a_SOURCES += getaddrinfo.h
+
+## end   gnulib module getaddrinfo
+
+## begin gnulib module getdate
+
+## CVS test scripts for getdate.
+TESTS += test-getdate.sh
+MOSTLYCLEANFILES += getdate-expected getdate-got getdate.diff
+DISTCLEANFILES += getdate.log
+# Program required by test-getdate.sh for testing getdate.y.
+check_PROGRAMS += getdate
+getdate_SOURCES = \
+       error.c \
+       getdate.y
+## This source file was added only for the getdate test program when compiled
+## with GNULIB's error.c.
+getdate_SOURCES += \
+       progname.c
+getdate_CPPFLAGS = -DTEST
+getdate_LDADD = \
+       $(noinst_LIBRARIES) \
+       $(LIB_CLOCK_GETTIME) \
+       $(LIBINTL)
+
+BUILT_SOURCES += getdate.c
+MAINTAINERCLEANFILES += getdate.c
+EXTRA_DIST += getdate.c
+
+## end   gnulib module getdate
+
+## begin gnulib module getndelim2
+
+EXTRA_DIST += getndelim2.h getndelim2.c
+
+## end   gnulib module getndelim2
+
+## begin gnulib module getnline
+
+libcvs_a_SOURCES += getnline.h getnline.c
+
+## end   gnulib module getnline
+
+## begin gnulib module getopt
+
+BUILT_SOURCES += $(GETOPT_H)
+EXTRA_DIST += getopt_.h getopt_int.h
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt_.h
+       cp $(srcdir)/getopt_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += getopt.h getopt.h-t
+
+## end   gnulib module getopt
+
+## begin gnulib module gettext-h
+
+libcvs_a_SOURCES += gettext.h
+
+## end   gnulib module gettext-h
+
+## begin gnulib module glob
+
+BUILT_SOURCES += $(GLOB_H)
+
+# We need the following in order to create an <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(libcvs_a_OBJECTS): $(GLOB_H)
+glob.h: glob_.h
+       cp $(srcdir)/glob_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += glob.h glob.h-t
+
+## end   gnulib module glob.c
+
+## begin gnulib module mbchar
+
+libcvs_a_SOURCES += mbchar.h
+
+## end   gnulib module mbchar
+
+## begin gnulib module mbuiter
+
+libcvs_a_SOURCES += mbuiter.h
+
+## end   gnulib module mbuiter
+
+## begin gnulib module minmax
+
+libcvs_a_SOURCES += minmax.h
+
+## end   gnulib module minmax
+
+## begin gnulib module setenv
+
+libcvs_a_SOURCES += setenv.h
+
+## end   gnulib module setenv
+
+## begin gnulib module size_max
+
+libcvs_a_SOURCES += size_max.h
+
+## end   gnulib module size_max
+
+## begin gnulib module stdbool
+
+BUILT_SOURCES += $(STDBOOL_H)
+EXTRA_DIST += stdbool_.h
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool_.h
+       sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
+               < $(srcdir)/stdbool_.h > address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+## end   gnulib module stdbool
+
+## begin gnulib module stdint
+
+BUILT_SOURCES += $(STDINT_H)
+EXTRA_DIST += stdint_.h
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint_.h
+       sed -e 
's/@''HAVE_LONG_64BIT''@/$(HAVE_LONG_64BIT)/g;s/@''HAVE_LONG_LONG_64BIT@/$(HAVE_LONG_LONG_64BIT)/g'
 < $(srcdir)/stdint_.h > address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += stdint.h stdint.h-t
+
+## end   gnulib module stdint
+
+## begin gnulib module strcase
+
+libcvs_a_SOURCES += strcase.h
+
+## end   gnulib module strcase
+
+## begin gnulib module strnlen1
+
+libcvs_a_SOURCES += strnlen1.h strnlen1.c
+
+## end   gnulib module strnlen1
+
+## begin gnulib module strstr
+
+libcvs_a_SOURCES += strstr.h
+
+## end   gnulib module strstr
+
+## begin gnulib module time_r
+
+libcvs_a_SOURCES += time_r.h
+
+## end   gnulib module time_r
+
+## begin gnulib module vasnprintf
+
+libcvs_a_SOURCES += printf-args.h printf-parse.h vasnprintf.h
+
+## end   gnulib module vasnprintf
+
+## begin gnulib module vasprintf
+
+libcvs_a_SOURCES += vasprintf.h
+
+## end   gnulib module vasprintf
+
+## begin gnulib module xalloc-die
+
+libcvs_a_SOURCES += xalloc-die.c
+
+## end   gnulib module xalloc-die
+
+## begin gnulib module xgethostname
+
+libcvs_a_SOURCES += xgethostname.h xgethostname.c
+
+## end   gnulib module xgethostname
+
+## begin gnulib module xsize
+
+libcvs_a_SOURCES += xsize.h
+
+## end   gnulib module xsize
+
+# Until Automake gets its act together
+distclean-local:
+       rm -f fnmatch.h
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
Index: ccvs/lib/Makefile.gnulib
diff -u /dev/null ccvs/lib/Makefile.gnulib:1.65.6.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/lib/Makefile.gnulib    Wed Dec 21 13:25:09 2005
@@ -0,0 +1,264 @@
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Automake, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib 
--m4-base=m4 --aux-dir=build-aux --macro-prefix=gl allocsa atexit base64 
canon-host canonicalize closeout dirname dup2 error exit exitfail extensions 
fnmatch fnmatch-posix ftruncate getdate gethostname getline getlogin_r 
getndelim2 getnline getopt getpagesize getpass-gnu gettext gettime gettimeofday 
glob lstat malloc md5 memmove minmax mkdir mkstemp mktime nanosleep 
pagealign_alloc pathmax quotearg readlink realloc regex rename restrict 
save-cwd setenv stat-macros stdbool stdint strcase strdup strerror strftime 
strstr strtoul time_r timespec tzset unlocked-io vasnprintf vasprintf 
xalloc-die xgethostname xreadlink xsize yesno
+
+AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
+
+noinst_LIBRARIES = libgnu.a
+
+libgnu_a_SOURCES =
+libgnu_a_LIBADD = @LIBOBJS@
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+## begin gnulib module alloca
+
+
+libgnu_a_LIBADD += @ALLOCA@
+## end   gnulib module alloca
+
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+EXTRA_DIST += alloca_.h
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca_.h
+       cp $(srcdir)/alloca_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+## end   gnulib module alloca-opt
+
+## begin gnulib module allocsa
+
+libgnu_a_SOURCES += allocsa.h allocsa.c
+EXTRA_DIST += allocsa.valgrind
+
+## end   gnulib module allocsa
+
+## begin gnulib module base64
+
+libgnu_a_SOURCES += base64.h base64.c
+
+## end   gnulib module base64
+
+## begin gnulib module cycle-check
+
+libgnu_a_SOURCES += cycle-check.c cycle-check.h dev-ino.h
+
+## end   gnulib module cycle-check
+
+## begin gnulib module dirname
+
+libgnu_a_SOURCES += basename.c stripslash.c
+
+## end   gnulib module dirname
+
+## begin gnulib module exit
+
+libgnu_a_SOURCES += exit.h
+
+## end   gnulib module exit
+
+## begin gnulib module fnmatch
+
+BUILT_SOURCES += $(FNMATCH_H)
+EXTRA_DIST += fnmatch_.h fnmatch_loop.c
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch_.h
+       cp $(srcdir)/fnmatch_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
+
+## end   gnulib module fnmatch
+
+## begin gnulib module getaddrinfo
+
+libgnu_a_SOURCES += getaddrinfo.h
+
+## end   gnulib module getaddrinfo
+
+## begin gnulib module getdate
+
+BUILT_SOURCES += getdate.c
+MAINTAINERCLEANFILES += getdate.c
+EXTRA_DIST += getdate.c
+
+## end   gnulib module getdate
+
+## begin gnulib module getndelim2
+
+EXTRA_DIST += getndelim2.h getndelim2.c
+
+## end   gnulib module getndelim2
+
+## begin gnulib module getnline
+
+libgnu_a_SOURCES += getnline.h getnline.c
+
+## end   gnulib module getnline
+
+## begin gnulib module getopt
+
+BUILT_SOURCES += $(GETOPT_H)
+EXTRA_DIST += getopt_.h getopt_int.h
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt_.h
+       cp $(srcdir)/getopt_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += getopt.h getopt.h-t
+
+## end   gnulib module getopt
+
+## begin gnulib module gettext-h
+
+libgnu_a_SOURCES += gettext.h
+
+## end   gnulib module gettext-h
+
+## begin gnulib module glob
+
+BUILT_SOURCES += $(GLOB_H)
+
+# We need the following in order to create <glob.h> when the system
+# doesn't have one that works with the given compiler.
+glob.h: glob_.h
+       cp $(srcdir)/glob_.h address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += glob.h glob.h-t
+
+## end   gnulib module glob
+
+## begin gnulib module mbchar
+
+libgnu_a_SOURCES += mbchar.h
+
+## end   gnulib module mbchar
+
+## begin gnulib module mbuiter
+
+libgnu_a_SOURCES += mbuiter.h
+
+## end   gnulib module mbuiter
+
+## begin gnulib module minmax
+
+libgnu_a_SOURCES += minmax.h
+
+## end   gnulib module minmax
+
+## begin gnulib module setenv
+
+libgnu_a_SOURCES += setenv.h
+
+## end   gnulib module setenv
+
+## begin gnulib module size_max
+
+libgnu_a_SOURCES += size_max.h
+
+## end   gnulib module size_max
+
+## begin gnulib module stdbool
+
+BUILT_SOURCES += $(STDBOOL_H)
+EXTRA_DIST += stdbool_.h
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool_.h
+       sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > 
address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+## end   gnulib module stdbool
+
+## begin gnulib module stdint
+
+BUILT_SOURCES += $(STDINT_H)
+EXTRA_DIST += stdint_.h
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint_.h
+       sed -e 
's/@''HAVE_LONG_64BIT''@/$(HAVE_LONG_64BIT)/g;s/@''HAVE_LONG_LONG_64BIT@/$(HAVE_LONG_LONG_64BIT)/g'
 < $(srcdir)/stdint_.h > address@hidden
+       mv address@hidden $@
+MOSTLYCLEANFILES += stdint.h stdint.h-t
+
+## end   gnulib module stdint
+
+## begin gnulib module strcase
+
+libgnu_a_SOURCES += strcase.h
+
+## end   gnulib module strcase
+
+## begin gnulib module strnlen1
+
+libgnu_a_SOURCES += strnlen1.h strnlen1.c
+
+## end   gnulib module strnlen1
+
+## begin gnulib module strstr
+
+libgnu_a_SOURCES += strstr.h
+
+## end   gnulib module strstr
+
+## begin gnulib module time_r
+
+libgnu_a_SOURCES += time_r.h
+
+## end   gnulib module time_r
+
+## begin gnulib module vasnprintf
+
+libgnu_a_SOURCES += printf-args.h printf-parse.h vasnprintf.h
+
+## end   gnulib module vasnprintf
+
+## begin gnulib module vasprintf
+
+libgnu_a_SOURCES += vasprintf.h
+
+## end   gnulib module vasprintf
+
+## begin gnulib module xalloc-die
+
+libgnu_a_SOURCES += xalloc-die.c
+
+## end   gnulib module xalloc-die
+
+## begin gnulib module xgethostname
+
+libgnu_a_SOURCES += xgethostname.h xgethostname.c
+
+## end   gnulib module xgethostname
+
+## begin gnulib module xsize
+
+libgnu_a_SOURCES += xsize.h
+
+## end   gnulib module xsize
+
+
+# Makefile.am ends here
Index: ccvs/lib/Makefile.in
diff -u /dev/null ccvs/lib/Makefile.in:1.200.2.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/lib/Makefile.in        Wed Dec 21 13:25:09 2005
@@ -0,0 +1,864 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for library files used by GNU CVS.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = getdate$(EXEEXT)
+subdir = lib
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       ChangeLog __fpending.c __fpending.h alloca.c asnprintf.c \
+       asprintf.c atexit.c canon-host.c canon-host.h canonicalize.c \
+       canonicalize.h chdir-long.c chdir-long.h closeout.c closeout.h \
+       creat-safer.c dirname.c dirname.h dup-safer.c dup2.c \
+       exitfail.c exitfail.h fcntl--.h fcntl-safer.h fd-safer.c \
+       filenamecat.c filenamecat.h fncase.c fnmatch.c fseeko.c \
+       ftello.c ftruncate.c gai_strerror.c getaddrinfo.c getcwd.c \
+       getcwd.h getdate.c getdate.h getdate.y getdelim.c getdelim.h \
+       gethostname.c getline.c getline.h getlogin_r.c getlogin_r.h \
+       getndelim2.c getopt.c getopt1.c getpagesize.h getpass.c \
+       getpass.h gettime.c gettimeofday.c glob-libc.h glob.c glob_.h \
+       lstat.c lstat.h malloc.c mbchar.c md5.c md5.h memchr.c \
+       memmove.c mempcpy.c mempcpy.h memrchr.c memrchr.h mkdir.c \
+       mkstemp.c mktime.c nanosleep.c open-safer.c openat-die.c \
+       openat.c openat.h pagealign_alloc.c pagealign_alloc.h \
+       pathmax.h pipe-safer.c printf-args.c printf-parse.c quotearg.c \
+       quotearg.h readlink.c realloc.c regcomp.c regex.c regex.h \
+       regex_internal.c regex_internal.h regexec.c rename.c rpmatch.c \
+       save-cwd.c save-cwd.h setenv.c stat-macros.h strcasecmp.c \
+       strdup.c strdup.h strerror.c strftime.c strftime.h \
+       strncasecmp.c strstr.c strtol.c strtoul.c sunos57-select.c \
+       tempname.c time_r.c timespec.h unistd--.h unistd-safer.h \
+       unlocked-io.h unsetenv.c vasnprintf.c vasprintf.c waitpid.c \
+       xalloc.h xgetcwd.c xgetcwd.h xmalloc.c xreadlink.c xreadlink.h \
+       yesno.c yesno.h
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libcvs_a_AR = $(AR) $(ARFLAGS)
+libcvs_a_DEPENDENCIES = @LIBOBJS@ @ALLOCA@
+am_libcvs_a_OBJECTS = sighandle.$(OBJEXT) allocsa.$(OBJEXT) \
+       base64.$(OBJEXT) cycle-check.$(OBJEXT) basename.$(OBJEXT) \
+       stripslash.$(OBJEXT) getnline.$(OBJEXT) strnlen1.$(OBJEXT) \
+       xalloc-die.$(OBJEXT) xgethostname.$(OBJEXT)
+libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS)
+am_getdate_OBJECTS = getdate-error.$(OBJEXT) getdate-getdate.$(OBJEXT) \
+       getdate-progname.$(OBJEXT)
+getdate_OBJECTS = $(am_getdate_OBJECTS)
+am__DEPENDENCIES_1 = libcvs.a
+am__DEPENDENCIES_2 =
+getdate_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
+       $(am__DEPENDENCIES_2)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
+YLWRAP = $(top_srcdir)/build-aux/ylwrap
+SOURCES = $(libcvs_a_SOURCES) $(getdate_SOURCES)
+DIST_SOURCES = $(libcvs_a_SOURCES) $(getdate_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+noinst_LIBRARIES = libcvs.a
+
+# Should look into unifying regular expression matching in CVS
+# with the diff library (perhaps to have the caller, CVS, do the
+# matching?)
+libcvs_a_SOURCES = sighandle.c system.h wait.h xselect.h xtime.h \
+       allocsa.h allocsa.c base64.h base64.c cycle-check.c \
+       cycle-check.h dev-ino.h basename.c stripslash.c error.h exit.h \
+       getaddrinfo.h getnline.h getnline.c gettext.h mbchar.h \
+       mbuiter.h minmax.h setenv.h size_max.h strcase.h strnlen1.h \
+       strnlen1.c strstr.h time_r.h printf-args.h printf-parse.h \
+       vasnprintf.h vasprintf.h xalloc-die.c xgethostname.h \
+       xgethostname.c xsize.h
+libcvs_a_LIBADD = @LIBOBJS@ @ALLOCA@
+BUILT_SOURCES = $(ALLOCA_H) $(FNMATCH_H) getdate.c $(GETOPT_H) \
+       $(GLOB_H) $(STDBOOL_H) $(STDINT_H)
+MOSTLYCLEANFILES = alloca.h alloca.h-t fnmatch.h fnmatch.h-t \
+       getdate-expected getdate-got getdate.diff getopt.h getopt.h-t \
+       glob.h glob.h-t stdbool.h stdbool.h-t stdint.h stdint.h-t
+DISTCLEANFILES = getdate.log
+MAINTAINERCLEANFILES = getdate.c
+TESTS = test-getdate.sh
+EXTRA_DIST = .cvsignore ChangeLog.fsf Makefile.gnulib build_lib.com \
+       libcvs.dep libcvs.dsp libcvs.mak test-getdate.sh alloca_.h \
+       allocsa.valgrind fnmatch_.h fnmatch_loop.c getdate.c \
+       getndelim2.h getndelim2.c getopt_.h getopt_int.h stdbool_.h \
+       stdint_.h
+getdate_SOURCES = error.c getdate.y progname.c
+getdate_CPPFLAGS = -DTEST
+getdate_LDADD = \
+       $(noinst_LIBRARIES) \
+       $(LIB_CLOCK_GETTIME) \
+       $(LIBINTL)
+
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj .y
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  lib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+       -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libcvs.a: $(libcvs_a_OBJECTS) $(libcvs_a_DEPENDENCIES) 
+       -rm -f libcvs.a
+       $(libcvs_a_AR) libcvs.a $(libcvs_a_OBJECTS) $(libcvs_a_LIBADD)
+       $(RANLIB) libcvs.a
+
+clean-checkPROGRAMS:
+       -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+getdate$(EXEEXT): $(getdate_OBJECTS) $(getdate_DEPENDENCIES) 
+       @rm -f getdate$(EXEEXT)
+       $(LINK) $(getdate_LDFLAGS) $(getdate_OBJECTS) $(getdate_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
+
+.c.o:
address@hidden@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ 
$<; \
address@hidden@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f 
"$(DEPDIR)/$*.Tpo"; exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(COMPILE) -c $<
+
+.c.obj:
address@hidden@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ 
`$(CYGPATH_W) '$<'`; \
address@hidden@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f 
"$(DEPDIR)/$*.Tpo"; exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+getdate-error.o: error.c
address@hidden@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-error.o -MD 
-MP -MF "$(DEPDIR)/getdate-error.Tpo" -c -o getdate-error.o `test -f 'error.c' 
|| echo '$(srcdir)/'`error.c; \
address@hidden@ then mv -f "$(DEPDIR)/getdate-error.Tpo" 
"$(DEPDIR)/getdate-error.Po"; else rm -f "$(DEPDIR)/getdate-error.Tpo"; exit 1; 
fi
address@hidden@@am__fastdepCC_FALSE@    source='error.c' 
object='getdate-error.o' libtool=no @AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getdate-error.o 
`test -f 'error.c' || echo '$(srcdir)/'`error.c
+
+getdate-error.obj: error.c
address@hidden@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-error.obj 
-MD -MP -MF "$(DEPDIR)/getdate-error.Tpo" -c -o getdate-error.obj `if test -f 
'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) '$(srcdir)/error.c'; 
fi`; \
address@hidden@ then mv -f "$(DEPDIR)/getdate-error.Tpo" 
"$(DEPDIR)/getdate-error.Po"; else rm -f "$(DEPDIR)/getdate-error.Tpo"; exit 1; 
fi
address@hidden@@am__fastdepCC_FALSE@    source='error.c' 
object='getdate-error.obj' libtool=no @AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getdate-error.obj 
`if test -f 'error.c'; then $(CYGPATH_W) 'error.c'; else $(CYGPATH_W) 
'$(srcdir)/error.c'; fi`
+
+getdate-getdate.o: getdate.c
address@hidden@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-getdate.o 
-MD -MP -MF "$(DEPDIR)/getdate-getdate.Tpo" -c -o getdate-getdate.o `test -f 
'getdate.c' || echo '$(srcdir)/'`getdate.c; \
address@hidden@ then mv -f "$(DEPDIR)/getdate-getdate.Tpo" 
"$(DEPDIR)/getdate-getdate.Po"; else rm -f "$(DEPDIR)/getdate-getdate.Tpo"; 
exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='getdate.c' 
object='getdate-getdate.o' libtool=no @AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getdate-getdate.o 
`test -f 'getdate.c' || echo '$(srcdir)/'`getdate.c
+
+getdate-getdate.obj: getdate.c
address@hidden@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-getdate.obj 
-MD -MP -MF "$(DEPDIR)/getdate-getdate.Tpo" -c -o getdate-getdate.obj `if test 
-f 'getdate.c'; then $(CYGPATH_W) 'getdate.c'; else $(CYGPATH_W) 
'$(srcdir)/getdate.c'; fi`; \
address@hidden@ then mv -f "$(DEPDIR)/getdate-getdate.Tpo" 
"$(DEPDIR)/getdate-getdate.Po"; else rm -f "$(DEPDIR)/getdate-getdate.Tpo"; 
exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='getdate.c' 
object='getdate-getdate.obj' libtool=no @AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
getdate-getdate.obj `if test -f 'getdate.c'; then $(CYGPATH_W) 'getdate.c'; 
else $(CYGPATH_W) '$(srcdir)/getdate.c'; fi`
+
+getdate-progname.o: progname.c
address@hidden@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-progname.o 
-MD -MP -MF "$(DEPDIR)/getdate-progname.Tpo" -c -o getdate-progname.o `test -f 
'progname.c' || echo '$(srcdir)/'`progname.c; \
address@hidden@ then mv -f "$(DEPDIR)/getdate-progname.Tpo" 
"$(DEPDIR)/getdate-progname.Po"; else rm -f "$(DEPDIR)/getdate-progname.Tpo"; 
exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='progname.c' 
object='getdate-progname.o' libtool=no @AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getdate-progname.o 
`test -f 'progname.c' || echo '$(srcdir)/'`progname.c
+
+getdate-progname.obj: progname.c
address@hidden@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT getdate-progname.obj 
-MD -MP -MF "$(DEPDIR)/getdate-progname.Tpo" -c -o getdate-progname.obj `if 
test -f 'progname.c'; then $(CYGPATH_W) 'progname.c'; else $(CYGPATH_W) 
'$(srcdir)/progname.c'; fi`; \
address@hidden@ then mv -f "$(DEPDIR)/getdate-progname.Tpo" 
"$(DEPDIR)/getdate-progname.Po"; else rm -f "$(DEPDIR)/getdate-progname.Tpo"; 
exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='progname.c' 
object='getdate-progname.obj' libtool=no @AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(getdate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
getdate-progname.obj `if test -f 'progname.c'; then $(CYGPATH_W) 'progname.c'; 
else $(CYGPATH_W) '$(srcdir)/progname.c'; fi`
+
+.y.c:
+       $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- 
$(YACCCOMPILE)
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+check-TESTS: $(TESTS)
+       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+       srcdir=$(srcdir); export srcdir; \
+       list='$(TESTS)'; \
+       if test -n "$$list"; then \
+         for tst in $$list; do \
+           if test -f ./$$tst; then dir=./; \
+           elif test -f $$tst; then dir=; \
+           else dir="$(srcdir)/"; fi; \
+           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *" $$tst "*) \
+               xpass=`expr $$xpass + 1`; \
+               failed=`expr $$failed + 1`; \
+               echo "XPASS: $$tst"; \
+             ;; \
+             *) \
+               echo "PASS: $$tst"; \
+             ;; \
+             esac; \
+           elif test $$? -ne 77; then \
+             all=`expr $$all + 1`; \
+             case " $(XFAIL_TESTS) " in \
+             *" $$tst "*) \
+               xfail=`expr $$xfail + 1`; \
+               echo "XFAIL: $$tst"; \
+             ;; \
+             *) \
+               failed=`expr $$failed + 1`; \
+               echo "FAIL: $$tst"; \
+             ;; \
+             esac; \
+           else \
+             skip=`expr $$skip + 1`; \
+             echo "SKIP: $$tst"; \
+           fi; \
+         done; \
+         if test "$$failed" -eq 0; then \
+           if test "$$xfail" -eq 0; then \
+             banner="All $$all tests passed"; \
+           else \
+             banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
+           fi; \
+         else \
+           if test "$$xpass" -eq 0; then \
+             banner="$$failed of $$all tests failed"; \
+           else \
+             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
+           fi; \
+         fi; \
+         dashes="$$banner"; \
+         skipped=""; \
+         if test "$$skip" -ne 0; then \
+           skipped="($$skip tests were not run)"; \
+           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$skipped"; \
+         fi; \
+         report=""; \
+         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+           report="Please report to $(PACKAGE_BUGREPORT)"; \
+           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+             dashes="$$report"; \
+         fi; \
+         dashes=`echo "$$dashes" | sed s/./=/g`; \
+         echo "$$dashes"; \
+         echo "$$banner"; \
+         test -z "$$skipped" || echo "$$skipped"; \
+         test -z "$$report" || echo "$$report"; \
+         echo "$$dashes"; \
+         test "$$failed" -eq 0; \
+       else :; fi
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -rm -f getdate.c
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf $(DEPDIR) ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf $(DEPDIR) ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+       clean-checkPROGRAMS clean-generic clean-noinstLIBRARIES ctags \
+       distclean distclean-compile distclean-generic distclean-local \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-info-am
+
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca_.h
+       cp $(srcdir)/alloca_.h address@hidden
+       mv address@hidden $@
+
+# We need the following in order to create <fnmatch.h> when the system
+# doesn't have one that supports the required API.
+fnmatch.h: fnmatch_.h
+       cp $(srcdir)/fnmatch_.h address@hidden
+       mv address@hidden $@
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt_.h
+       cp $(srcdir)/getopt_.h address@hidden
+       mv address@hidden $@
+
+# We need the following in order to create an <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(libcvs_a_OBJECTS): $(GLOB_H)
+glob.h: glob_.h
+       cp $(srcdir)/glob_.h address@hidden
+       mv address@hidden $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool_.h
+       sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
+               < $(srcdir)/stdbool_.h > address@hidden
+       mv address@hidden $@
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint_.h
+       sed -e 
's/@''HAVE_LONG_64BIT''@/$(HAVE_LONG_64BIT)/g;s/@''HAVE_LONG_LONG_64BIT@/$(HAVE_LONG_LONG_64BIT)/g'
 < $(srcdir)/stdint_.h > address@hidden
+       mv address@hidden $@
+
+# Until Automake gets its act together
+distclean-local:
+       rm -f fnmatch.h
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/lib/base64.c
diff -u /dev/null ccvs/lib/base64.c:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:11 2005
+++ ccvs/lib/base64.c   Wed Dec 21 13:25:09 2005
@@ -0,0 +1,407 @@
+/* base64.c -- Encode binary data using printable characters.
+   Copyright (C) 1999, 2000, 2001, 2004, 2005 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
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Simon Josefsson.  Partially adapted from GNU MailUtils
+ * (mailbox/filter_trans.c, as of 2004-11-28).  Improved by review
+ * from Paul Eggert, Bruno Haible, and Stepan Kasal.
+ *
+ * See also RFC 3548 <http://www.ietf.org/rfc/rfc3548.txt>.
+ *
+ * Be careful with error checking.  Here is how you would typically
+ * use these functions:
+ *
+ * bool ok = base64_decode_alloc (in, inlen, &out, &outlen);
+ * if (!ok)
+ *   FAIL: input was not valid base64
+ * if (out == NULL)
+ *   FAIL: memory allocation error
+ * OK: data in OUT/OUTLEN
+ *
+ * size_t outlen = base64_encode_alloc (in, inlen, &out);
+ * if (out == NULL && outlen == 0 && inlen != 0)
+ *   FAIL: input too long
+ * if (out == NULL)
+ *   FAIL: memory allocation error
+ * OK: data in OUT/OUTLEN.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Get prototype. */
+#include "base64.h"
+
+/* Get malloc. */
+#include <stdlib.h>
+
+/* C89 compliant way to cast 'char' to 'unsigned char'. */
+static inline unsigned char
+to_uchar (char ch)
+{
+  return ch;
+}
+
+/* Base64 encode IN array of size INLEN into OUT array of size OUTLEN.
+   If OUTLEN is less than BASE64_LENGTH(INLEN), write as many bytes as
+   possible.  If OUTLEN is larger than BASE64_LENGTH(INLEN), also zero
+   terminate the output buffer. */
+void
+base64_encode (const char *restrict in, size_t inlen,
+              char *restrict out, size_t outlen)
+{
+  static const char b64str[64] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+  while (inlen && outlen)
+    {
+      *out++ = b64str[to_uchar (in[0]) >> 2];
+      if (!--outlen)
+       break;
+      *out++ = b64str[((to_uchar (in[0]) << 4)
+                      + (--inlen ? to_uchar (in[1]) >> 4 : 0))
+                     & 0x3f];
+      if (!--outlen)
+       break;
+      *out++ =
+       (inlen
+        ? b64str[((to_uchar (in[1]) << 2)
+                  + (--inlen ? to_uchar (in[2]) >> 6 : 0))
+                 & 0x3f]
+        : '=');
+      if (!--outlen)
+       break;
+      *out++ = inlen ? b64str[to_uchar (in[2]) & 0x3f] : '=';
+      if (!--outlen)
+       break;
+      if (inlen)
+       inlen--;
+      if (inlen)
+       in += 3;
+    }
+
+  if (outlen)
+    *out = '\0';
+}
+
+/* Allocate a buffer and store zero terminated base64 encoded data
+   from array IN of size INLEN, returning BASE64_LENGTH(INLEN), i.e.,
+   the length of the encoded data, excluding the terminating zero.  On
+   return, the OUT variable will hold a pointer to newly allocated
+   memory that must be deallocated by the caller.  If output string
+   length would overflow, 0 is returned and OUT is set to NULL.  If
+   memory allocation fail, OUT is set to NULL, and the return value
+   indicate length of the requested memory block, i.e.,
+   BASE64_LENGTH(inlen) + 1. */
+size_t
+base64_encode_alloc (const char *in, size_t inlen, char **out)
+{
+  size_t outlen = 1 + BASE64_LENGTH (inlen);
+
+  /* Check for overflow in outlen computation.
+   *
+   * If there is no overflow, outlen >= inlen.
+   *
+   * If the operation (inlen + 2) overflows then it yields at most +1, so
+   * outlen is 0.
+   *
+   * If the multiplication overflows, we lose at least half of the
+   * correct value, so the result is < ((inlen + 2) / 3) * 2, which is
+   * less than (inlen + 2) * 0.66667, which is less than inlen as soon as
+   * (inlen > 4).
+   */
+  if (inlen > outlen)
+    {
+      *out = NULL;
+      return 0;
+    }
+
+  *out = malloc (outlen);
+  if (*out)
+    base64_encode (in, inlen, *out, outlen);
+
+  return outlen - 1;
+}
+
+/* With this approach this file works independent of the charset used
+   (think EBCDIC).  However, it does assume that the characters in the
+   Base64 alphabet (A-Za-z0-9+/) are encoded in 0..255.  POSIX
+   1003.1-2001 require that char and unsigned char are 8-bit
+   quantities, though, taking care of that problem.  But this may be a
+   potential problem on non-POSIX C99 platforms.  */
+#define B64(x)                                 \
+  ((x) == 'A' ? 0                              \
+   : (x) == 'B' ? 1                            \
+   : (x) == 'C' ? 2                            \
+   : (x) == 'D' ? 3                            \
+   : (x) == 'E' ? 4                            \
+   : (x) == 'F' ? 5                            \
+   : (x) == 'G' ? 6                            \
+   : (x) == 'H' ? 7                            \
+   : (x) == 'I' ? 8                            \
+   : (x) == 'J' ? 9                            \
+   : (x) == 'K' ? 10                           \
+   : (x) == 'L' ? 11                           \
+   : (x) == 'M' ? 12                           \
+   : (x) == 'N' ? 13                           \
+   : (x) == 'O' ? 14                           \
+   : (x) == 'P' ? 15                           \
+   : (x) == 'Q' ? 16                           \
+   : (x) == 'R' ? 17                           \
+   : (x) == 'S' ? 18                           \
+   : (x) == 'T' ? 19                           \
+   : (x) == 'U' ? 20                           \
+   : (x) == 'V' ? 21                           \
+   : (x) == 'W' ? 22                           \
+   : (x) == 'X' ? 23                           \
+   : (x) == 'Y' ? 24                           \
+   : (x) == 'Z' ? 25                           \
+   : (x) == 'a' ? 26                           \
+   : (x) == 'b' ? 27                           \
+   : (x) == 'c' ? 28                           \
+   : (x) == 'd' ? 29                           \
+   : (x) == 'e' ? 30                           \
+   : (x) == 'f' ? 31                           \
+   : (x) == 'g' ? 32                           \
+   : (x) == 'h' ? 33                           \
+   : (x) == 'i' ? 34                           \
+   : (x) == 'j' ? 35                           \
+   : (x) == 'k' ? 36                           \
+   : (x) == 'l' ? 37                           \
+   : (x) == 'm' ? 38                           \
+   : (x) == 'n' ? 39                           \
+   : (x) == 'o' ? 40                           \
+   : (x) == 'p' ? 41                           \
+   : (x) == 'q' ? 42                           \
+   : (x) == 'r' ? 43                           \
+   : (x) == 's' ? 44                           \
+   : (x) == 't' ? 45                           \
+   : (x) == 'u' ? 46                           \
+   : (x) == 'v' ? 47                           \
+   : (x) == 'w' ? 48                           \
+   : (x) == 'x' ? 49                           \
+   : (x) == 'y' ? 50                           \
+   : (x) == 'z' ? 51                           \
+   : (x) == '0' ? 52                           \
+   : (x) == '1' ? 53                           \
+   : (x) == '2' ? 54                           \
+   : (x) == '3' ? 55                           \
+   : (x) == '4' ? 56                           \
+   : (x) == '5' ? 57                           \
+   : (x) == '6' ? 58                           \
+   : (x) == '7' ? 59                           \
+   : (x) == '8' ? 60                           \
+   : (x) == '9' ? 61                           \
+   : (x) == '+' ? 62                           \
+   : (x) == '/' ? 63                           \
+   : -1)
+
+static const signed char b64[0x100] = {
+  B64 (0), B64 (1), B64 (2), B64 (3),
+  B64 (4), B64 (5), B64 (6), B64 (7),
+  B64 (8), B64 (9), B64 (10), B64 (11),
+  B64 (12), B64 (13), B64 (14), B64 (15),
+  B64 (16), B64 (17), B64 (18), B64 (19),
+  B64 (20), B64 (21), B64 (22), B64 (23),
+  B64 (24), B64 (25), B64 (26), B64 (27),
+  B64 (28), B64 (29), B64 (30), B64 (31),
+  B64 (32), B64 (33), B64 (34), B64 (35),
+  B64 (36), B64 (37), B64 (38), B64 (39),
+  B64 (40), B64 (41), B64 (42), B64 (43),
+  B64 (44), B64 (45), B64 (46), B64 (47),
+  B64 (48), B64 (49), B64 (50), B64 (51),
+  B64 (52), B64 (53), B64 (54), B64 (55),
+  B64 (56), B64 (57), B64 (58), B64 (59),
+  B64 (60), B64 (61), B64 (62), B64 (63),
+  B64 (64), B64 (65), B64 (66), B64 (67),
+  B64 (68), B64 (69), B64 (70), B64 (71),
+  B64 (72), B64 (73), B64 (74), B64 (75),
+  B64 (76), B64 (77), B64 (78), B64 (79),
+  B64 (80), B64 (81), B64 (82), B64 (83),
+  B64 (84), B64 (85), B64 (86), B64 (87),
+  B64 (88), B64 (89), B64 (90), B64 (91),
+  B64 (92), B64 (93), B64 (94), B64 (95),
+  B64 (96), B64 (97), B64 (98), B64 (99),
+  B64 (100), B64 (101), B64 (102), B64 (103),
+  B64 (104), B64 (105), B64 (106), B64 (107),
+  B64 (108), B64 (109), B64 (110), B64 (111),
+  B64 (112), B64 (113), B64 (114), B64 (115),
+  B64 (116), B64 (117), B64 (118), B64 (119),
+  B64 (120), B64 (121), B64 (122), B64 (123),
+  B64 (124), B64 (125), B64 (126), B64 (127),
+  B64 (128), B64 (129), B64 (130), B64 (131),
+  B64 (132), B64 (133), B64 (134), B64 (135),
+  B64 (136), B64 (137), B64 (138), B64 (139),
+  B64 (140), B64 (141), B64 (142), B64 (143),
+  B64 (144), B64 (145), B64 (146), B64 (147),
+  B64 (148), B64 (149), B64 (150), B64 (151),
+  B64 (152), B64 (153), B64 (154), B64 (155),
+  B64 (156), B64 (157), B64 (158), B64 (159),
+  B64 (160), B64 (161), B64 (162), B64 (163),
+  B64 (164), B64 (165), B64 (166), B64 (167),
+  B64 (168), B64 (169), B64 (170), B64 (171),
+  B64 (172), B64 (173), B64 (174), B64 (175),
+  B64 (176), B64 (177), B64 (178), B64 (179),
+  B64 (180), B64 (181), B64 (182), B64 (183),
+  B64 (184), B64 (185), B64 (186), B64 (187),
+  B64 (188), B64 (189), B64 (190), B64 (191),
+  B64 (192), B64 (193), B64 (194), B64 (195),
+  B64 (196), B64 (197), B64 (198), B64 (199),
+  B64 (200), B64 (201), B64 (202), B64 (203),
+  B64 (204), B64 (205), B64 (206), B64 (207),
+  B64 (208), B64 (209), B64 (210), B64 (211),
+  B64 (212), B64 (213), B64 (214), B64 (215),
+  B64 (216), B64 (217), B64 (218), B64 (219),
+  B64 (220), B64 (221), B64 (222), B64 (223),
+  B64 (224), B64 (225), B64 (226), B64 (227),
+  B64 (228), B64 (229), B64 (230), B64 (231),
+  B64 (232), B64 (233), B64 (234), B64 (235),
+  B64 (236), B64 (237), B64 (238), B64 (239),
+  B64 (240), B64 (241), B64 (242), B64 (243),
+  B64 (244), B64 (245), B64 (246), B64 (247),
+  B64 (248), B64 (249), B64 (250), B64 (251),
+  B64 (252), B64 (253), B64 (254), B64 (255)
+};
+
+bool
+isbase64 (char ch)
+{
+  return to_uchar (ch) <= 255 && 0 <= b64[to_uchar (ch)];
+}
+
+/* Decode base64 encoded input array IN of length INLEN to output
+   array OUT that can hold *OUTLEN bytes.  Return true if decoding was
+   successful, i.e. if the input was valid base64 data, false
+   otherwise.  If *OUTLEN is too small, as many bytes as possible will
+   be written to OUT.  On return, *OUTLEN holds the length of decoded
+   bytes in OUT.  Note that as soon as any non-alphabet characters are
+   encountered, decoding is stopped and false is returned. */
+bool
+base64_decode (const char *restrict in, size_t inlen,
+              char *restrict out, size_t *outlen)
+{
+  size_t outleft = *outlen;
+
+  while (inlen >= 2)
+    {
+      if (!isbase64 (in[0]) || !isbase64 (in[1]))
+       break;
+
+      if (outleft)
+       {
+         *out++ = ((b64[to_uchar (in[0])] << 2)
+                   | (b64[to_uchar (in[1])] >> 4));
+         outleft--;
+       }
+
+      if (inlen == 2)
+       break;
+
+      if (in[2] == '=')
+       {
+         if (inlen != 4)
+           break;
+
+         if (in[3] != '=')
+           break;
+
+       }
+      else
+       {
+         if (!isbase64 (in[2]))
+           break;
+
+         if (outleft)
+           {
+             *out++ = (((b64[to_uchar (in[1])] << 4) & 0xf0)
+                       | (b64[to_uchar (in[2])] >> 2));
+             outleft--;
+           }
+
+         if (inlen == 3)
+           break;
+
+         if (in[3] == '=')
+           {
+             if (inlen != 4)
+               break;
+           }
+         else
+           {
+             if (!isbase64 (in[3]))
+               break;
+
+             if (outleft)
+               {
+                 *out++ = (((b64[to_uchar (in[2])] << 6) & 0xc0)
+                           | b64[to_uchar (in[3])]);
+                 outleft--;
+               }
+           }
+       }
+
+      in += 4;
+      inlen -= 4;
+    }
+
+  *outlen -= outleft;
+
+  if (inlen != 0)
+    return false;
+
+  return true;
+}
+
+/* Allocate an output buffer in *OUT, and decode the base64 encoded
+   data stored in IN of size INLEN to the *OUT buffer.  On return, the
+   size of the decoded data is stored in *OUTLEN.  OUTLEN may be NULL,
+   if the caller is not interested in the decoded length.  *OUT may be
+   NULL to indicate an out of memory error, in which case *OUTLEN
+   contain the size of the memory block needed.  The function return
+   true on successful decoding and memory allocation errors.  (Use the
+   *OUT and *OUTLEN parameters to differentiate between successful
+   decoding and memory error.)  The function return false if the input
+   was invalid, in which case *OUT is NULL and *OUTLEN is
+   undefined. */
+bool
+base64_decode_alloc (const char *in, size_t inlen, char **out,
+                    size_t *outlen)
+{
+  /* This may allocate a few bytes too much, depending on input,
+     but it's not worth the extra CPU time to compute the exact amount.
+     The exact amount is 3 * inlen / 4, minus 1 if the input ends
+     with "=" and minus another 1 if the input ends with "==".
+     Dividing before multiplying avoids the possibility of overflow.  */
+  size_t needlen = 3 * (inlen / 4) + 2;
+
+  *out = malloc (needlen);
+  if (!*out)
+    return true;
+
+  if (!base64_decode (in, inlen, *out, &needlen))
+    {
+      free (*out);
+      *out = NULL;
+      return false;
+    }
+
+  if (outlen)
+    *outlen = needlen;
+
+  return true;
+}
Index: ccvs/lib/base64.h
diff -u /dev/null ccvs/lib/base64.h:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/lib/base64.h   Wed Dec 21 13:25:09 2005
@@ -0,0 +1,45 @@
+/* base64.h -- Encode binary data using printable characters.
+   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Written by Simon Josefsson.
+
+   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
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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 this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef BASE64_H
+# define BASE64_H
+
+/* Get size_t. */
+#include <stddef.h>
+
+/* Get bool. */
+#include <stdbool.h>
+
+/* This uses that the expression (n+(k-1))/k means the smallest
+   integer >= n/k, i.e., the ceiling of n/k.  */
+#define BASE64_LENGTH(inlen) ((((inlen) + 2) / 3) * 4)
+
+extern bool isbase64 (char ch);
+
+extern void base64_encode (const char *restrict in, size_t inlen,
+                          char *restrict out, size_t outlen);
+
+extern size_t base64_encode_alloc (const char *in, size_t inlen, char **out);
+
+extern bool base64_decode (const char *restrict in, size_t inlen,
+                          char *restrict out, size_t *outlen);
+
+extern bool base64_decode_alloc (const char *in, size_t inlen,
+                                char **out, size_t *outlen);
+
+#endif /* BASE64_H */
Index: ccvs/lib/wait.h
diff -u /dev/null ccvs/lib/wait.h:1.5.22.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/lib/wait.h     Wed Dec 21 13:25:09 2005
@@ -0,0 +1,46 @@
+/* wait.h -- POSIX macros for evaluating exit statuses
+   Copyright (C) 1990 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
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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.  */
+
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/types.h>                /* For pid_t. */
+# ifdef HAVE_SYS_RESOURCE_H
+#  include "xtime.h"           /* FreeBSD 4.11, at least, needs struct timeval
+                                * defined before including <sys/resource.h>
+                                */
+#  include <sys/resource.h>    /* for rusage */
+# endif
+# include <sys/wait.h>
+#endif
+
+#ifndef WIFSTOPPED
+#define WIFSTOPPED(w) (((w) & 0xff) == 0x7f)
+#endif
+#ifndef WIFSIGNALED
+#define WIFSIGNALED(w) (((w) & 0xff) != 0x7f && ((w) & 0xff) != 0)
+#endif
+#ifndef WIFEXITED
+#define WIFEXITED(w) (((w) & 0xff) == 0)
+#endif
+#ifndef WCOREDUMP      /* not POSIX, but common and useful */
+#define WCOREDUMP(w) (((w) & 0x80) != 0)
+#endif
+
+#ifndef WSTOPSIG
+#define WSTOPSIG(w) (((w) >> 8) & 0xff)
+#endif
+#ifndef WTERMSIG
+#define WTERMSIG(w) ((w) & 0x7f)
+#endif
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(w) (((w) >> 8) & 0xff)
+#endif
Index: ccvs/m4/ChangeLog
diff -u /dev/null ccvs/m4/ChangeLog:1.153.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/m4/ChangeLog   Wed Dec 21 13:25:09 2005
@@ -0,0 +1,833 @@
+2005-10-27  Derek Price  <address@hidden>
+
+       * base64.m4: New file from GNULIB.
+
+2005-12-07  Mark D. Baushke  <address@hidden>
+
+       * regex.m4, socklen.m4: Update from GNULIB.
+
+2005-11-27  Mark D. Baushke  <address@hidden>
+
+       * chdir-long.m4, fpending.m4, gnulib-comp.m4, mbiter.m4: Update
+       from GNULIB.
+
+2005-10-20  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * getaddrinfo.m4, md5.m4, stdbool.m4: Updated.
+       * uint32_t.m4: Removed.
+
+2005-10-03  Derek Price  <address@hidden>
+
+       * fcntl-safer.m4, socklen.m4: New files from GNULIB.
+       * canonicalize.m4, chdir-long.m4, dup2.m4, fnmatch.m4, ftruncate.m4,
+       getaddrinfo.m4, getcwd.m4, getdate.m4, getpagesize.m4, gnulib-comp.m4,
+       mbchar.m4, mbiter.m4, mkstemp.m4, mktime.m4, nanosleep.m4, openat.m4,
+       pathmax.m4, regex.m4, save-cwd.m4, strcase.m4, strstr.m4,
+       unistd-safer.m4, xgetcwd.m4, xreadlink.m4: Update from GNULIB.
+
+2005-09-26  Derek Price  <address@hidden>
+
+       [bug #14639]
+       * acx_with_gssapi.m4: Find the crypto library on FreeBSD 5.x.
+       Patch from Serguei E. Leontiev <address@hidden>.
+
+2005-09-25  Derek Price  <address@hidden>
+
+       * lstat.m4: Update from GNULIB.
+
+2005-09-19  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * st_mtim.m4: Remove this file.
+       * timespec.m4, gnulib-cache.m4, gnulib-comp.m4: Updated.
+
+2005-09-15  Derek Price  <address@hidden>
+
+       * strstr.m4: Update from GNULIB.
+
+2005-09-09  Derek Price  <address@hidden>
+
+       * glob.m4: Update from GNULIB with alpha-quality glibc porting changes.
+
+2005-09-06  Derek Price  <address@hidden>
+
+       Update from GNULIB with alpha-quality patch.
+       * canon-host.m4, gnulib-comp.m4: Updated.
+       * getaddrinfo.m4, sockpfaf.m4: New files.
+
+2005-09-05  Derek Price  <address@hidden>
+
+       * mbchar.m4 (gl_MBCHAR): Only enable when wchar.h is found.
+       (Patch from Yoann Vandoorselaere <address@hidden>.)
+
+2005-09-04  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * glob.m4, gnulib-cache.m4, gnulib-comp.m4: Updated.
+
+       Add canon-host module from GNULIB.
+       * canon-host.m4: New file.
+       * gnulib-cache.m4, gnulib-comp.m4: Updated.
+       * gnulib.m4: Removed.
+
+       Update from GNULIB.
+       * getopt.m4, getpass.m4, lib-link.m4, lib-prefix.m4, minmax.m4,
+       regex.m4, strcase.m4, strstr.m4, unistd-safer.m4, xgetcwd.m4:
+       Updated.
+       * gnulib-cache.m4, gnulib-comp.m4, gnulib-tool.m4, mbchar.m4,
+       mbiter.m4, memchr.m4: New files.
+
+2005-09-03  Larry Jones  <lawrence.jones.ugs.com>
+
+       * getlogin_r.m4: Fix cut & paste error.
+
+2005-08-12  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * bison.m4, dup2.m4, getcwd-path-max.m4, getcwd.m4, getline.m4,
+       getopt.m4, gnulib.m4, mbrtowc.m4, mkstemp.m4, onceonly_2_57.m4,
+       pagealign_alloc.m4, regex.m4, save-cwd.m4, size_max.m4, strftime.m4,
+       unistd-safer.m4: Updated from GNULIB.
+       * getdelim.m4: New file.
+
+2005-07-15  Derek Price  <address@hidden>
+
+       * glob.m4: Import new version from GNULIB.
+
+2005-06-15  Derek Price  <address@hidden>
+
+       * bison.m4 (gl_BISON): Use new build-aux/bison-missing script.
+
+2005-06-10  Derek Price  <address@hidden>
+
+       Sync with GNULIB.
+       * getcwd-path-max.m4, rename.m4: Update from GNULIB.
+       * path-concat.m4: Rename to...
+       * filenamecat: ...this.
+
+       Test new stat module.
+       * stat.m4: Remove this file.
+       * lstat.m4: Don't check for empty string bug.
+
+2005-05-28  Derek Price  <address@hidden>
+
+       * glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/.  Add comment.
+
+2005-05-25  Derek Price  <address@hidden>
+
+       * glob.m4: Don't cater to Solaris here...
+       * extensions.m4: ...do it here instead.
+
+2005-05-25  Derek Price  <address@hidden>
+
+       * getlogin_r.m4: New module from GNULIB.
+
+2005-05-24  Derek Price  <address@hidden>
+
+       * lstat.m4, stat.m4: Define rpl_stat & rpl_lstat when needed.
+
+2005-05-24  Derek Price  <address@hidden>
+
+       * glob.m4 (gl_PREREQ_GLOB): Don't look for struct dirent64 or stat64.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * canonicalize.m4, path-concat.m4: Import from GNULIB.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * minmax.m4: New file from GNULIB.
+
+2005-05-19  Derek Price  <address@hidden>
+
+       * glob.m4 (gl_PREREQ_GLOB): Check for __posix_getpwnam_r for Solaris.
+
+2005-05-19  Derek Price  <address@hidden>
+
+       * glob.m4 (gl_PREREQ_GLOB): Check for <unistd.h>.
+
+2005-05-18  Derek Price  <address@hidden>
+
+       * glob.m4 (gl_GLOB): Don't check for <gnu-versions.h> explicitly.
+       (gl_PREREQ_GLOB): Check for <sys/cdefs.h>.
+
+2005-05-17  Derek Price  <address@hidden>
+
+       * glob.m4 (gl_GLOB): Prefer AC_COMPILE_IFELSE to AC_EGREP_CPP.
+       (Suggested by Paul Eggert <address@hidden>.)
+
+2005-05-15  Derek Price  <address@hidden>
+
+       * glob.m4 (gl_GLOB): Don't call gl_PREREQ_GLOB.
+       (gl_PREREQ_GLOB): Replace search for lots of headers by requiring
+       AC_HEADER_DIRENT.  dirent64 is a type, not a function.
+
+2005-05-12  Derek Price  <address@hidden>
+
+       * d-type.m4: New file from GNULIB.
+       * glob.m4 (gl_GLOB): Remove indirection.  Check gnu-versions.h instead
+       of looking for glob_pattern_p().  Use new d-type macro.
+       (gl_PREREQ_GLOB): Reformat to remove blanks line in the generated
+       configure script.
+
+2005-05-11  Derek Price  <address@hidden>
+
+       * glob.m4: New file.
+       * strdup.m4: New file from GNULIB.
+
+2005-05-10  Derek Price  <address@hidden>
+
+       * getopt.m4, stat-macros.m4: Update from GNULIB.
+
+2005-05-06  Derek Price  <address@hidden>
+
+       * getopt.m4: Update from GNULIB.  Closes cvshome.org issue #248.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       Update from GNULIB.
+       * clock_time.m4, gnulib.m4, lstat.m4, mkstemp.m4, nanosleep.m4,
+       stat-macros.m4: Updated.
+       * unistd-safer.m4: New file.
+
+2005-05-01  Mark D. Baushke  <address@hidden>
+
+       * mmap-anon.m4: Update from GNULIB.
+
+2005-04-25  Derek Price  <address@hidden>
+
+       * getpass.m4, gettext.m4: Update from GNULIB.
+
+2005-03-29  Mark D. Baushke  <address@hidden>
+
+       * getcwd-path-max.m4: Update from GNULIB.
+
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * chdir-long.m4, closeout.m4, dirname.m4, exitfail.m4,
+       fpending.m4, getcwd.m4, getdate.m4, getline.m4, getpagesize.m4,
+       getpass.m4, gettext.m4, gnulib.m4, lib-link.m4, md5.m4,
+       memrchr.m4, nanosleep.m4, nls.m4, pathmax.m4, po.m4, quotearg.m4,
+       stat-macros.m4, stdint.m4, strftime.m4, timespec.m4,
+       unlocked-io.m4, xalloc.m4, yesno.m4: Update from GNULIB.
+
+2005-03-10  Mark D. Baushke  <address@hidden>
+
+       * save-cwd.m4: Update from GNULIB.
+
+2005-03-07  Mark D. Baushke  <address@hidden>
+
+       * mmap-anon.m4: Update from GNULIB.
+
+2005-03-03  Derek Price  <address@hidden>
+
+       * mmap-anon.m4, pagealign_alloc.m4: New files from GNULIB.
+
+2005-03-02  Jim Meyering  <address@hidden>
+
+       * closeout.m4, fpending.m4, mbrtowc.m4, quotearg.m4: New from gnulib.
+       * gnulib.m4: Regenerated.
+
+2005-03-01  Derek Price  <address@hidden>
+
+       Update installed GNULIB modules.
+       * alloca.m4, allocsa.m4, atexit.m4, bison.m4, clock_time.m4,
+       codeset.m4, dirname.m4, dos.m4, eealloc.m4, eoverflow.m4, exitfail.m4,
+       extensions.m4, fnmatch.m4, getcwd.m4, getdate.m4, gethostname.m4,
+       getline.m4, getndelim2.m4, getnline.m4, getopt.m4, getpagesize.m4,
+       getpass.m4, gettext.m4, gettime.m4, gettimeofday.m4, glibc21.m4,
+       gnulib.m4, iconv.m4, intdiv0.m4, intmax.m4, intmax_t.m4,
+       inttypes-pri.m4, inttypes_h.m4, lcmessage.m4, lib-ld.m4, lib-link.m4,
+       lib-prefix.m4, longdouble.m4, longlong.m4, lstat.m4, mbstate_t.m4,
+       md5.m4, memmove.m4, mkstemp.m4, mktime.m4, nanosleep.m4, nls.m4,
+       pathmax.m4, po.m4, printf-posix.m4, progtest.m4, readlink.m4, regex.m4,
+       restrict.m4, rpmatch.m4, save-cwd.m4, setenv.m4, signed.m4,
+       size_max.m4, ssize_t.m4, st_mtim.m4, stat.m4, stdbool.m4, stdint.m4,
+       stdint_h.m4, strcase.m4, strerror.m4, strerror_r.m4, strftime.m4,
+       time_r.m4, timespec.m4, tm_gmtoff.m4, tzset.m4, uint32_t.m4,
+       uintmax_t.m4, ulonglong.m4, unlocked-io.m4, vasnprintf.m4,
+       vasprintf.m4, wchar_t.m4, wint_t.m4, xalloc.m4, xgetcwd.m4,
+       xreadlink.m4, xsize.m4, yesno.m4: Updated from GNULIB.
+       * chdir-long.m4, d-ino.m4, dup2.m4, error.m4, ftruncate.m4,
+       getcwd-path-max.m4, glibc2.m4, mempcpy.m4, memrchr.m4, mkdir-slash.m4,
+       openat.m4, rename.m4, strstr.m4, strtol.m4, strtoul.m4: New files from
+       GNULIB.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * getopt.m4: Update from GNULIB.
+
+2004-11-11  Mark D. Baushke  <address@hidden>
+
+       * getopt.m4: Update from GNULIB.
+
+2004-11-09  Mark D. Baushke  <address@hidden>
+
+       * strftime.m4: Update from GNULIB.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * uint32_t.m4: Update from GNULIB.
+
+2004-11-03  Derek Price  <address@hidden>
+
+       * bison.m4 (gl_BISON): Update comment to specify the correct Automake
+       version number.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * readlink.m4, xreadlink.m4: New from GNULIB.
+       * uint32_t.m4: Update from GNULIB.
+       * gnulib.m4: Regenerated.
+
+2004-11-02  Mark D. Baushke  <address@hidden>
+
+       * getpass.m4, setenv.m4: Update from GNULIB.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * allocsa.m4, eealloc.m4, setenv.m4: New files from GNULIB.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * bison.m4 (gl_BISON): Update comment to eliminate new spaces from
+       generated configure script.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * bison.m4 (gl_BISON): Update comment to specify an Automake version
+       number, rather than Autoconf.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * bison.m4 (gl_BISON): Comment reasons for forking form GNULIB.
+
+2004-10-25  Derek Price  <address@hidden>
+
+       * rpmatch.m4, yesno.m4: New files from GNULIB.
+
+2004-10-22  Derek Price  <address@hidden>
+
+       * md5.m4, uint32_t.m4: New files from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * rpmatch.m4, yesno.m4: Back out addition.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * rpmatch.m4, yesno.m4: New files from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * getpagesize.m4: New file from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * realloc.m4: Remove this file.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * malloc.m4: Remove this file.
+
+2004-10-20  Mark D. Baushke  <address@hidden>
+
+       * sunos57-select.m4: New file. Work around Solaris 7 select()
+       hang.
+
+2004-10-18  Derek Price  <address@hidden>
+
+       * getopt.m4: Update file from GNULIB.
+
+2004-10-15  Derek Price  <address@hidden>
+
+       * vasprintf.m4: New file from GNULIB.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * lstat.m4: Update from GNULIB.
+
+2004-10-09  Derek Price  <address@hidden>
+
+       * stat.m4: Update from GNULIB.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * .cvsignore, Makefile.am, Makefile.in: Remove.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * getpass.m4: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * strcase.m4: New file from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * ssize_t.m4: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * stdbool.m4: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * getopt.m4: Update from GNULIB.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * mkstemp.m4: Update from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * fnmatch.m4: Update from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * dirname.m4, dos.m4: Updated from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add gnulib.m4.
+       * gnulib.m4: New file.
+       * xalloc.m4: Update from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new and previously missing files.
+       * eoverflow.m4, intmax.m4, printf-posix.m4: New files from GNULIB.
+       * gettext.m4, glibc21.m4, intmax_t.m4, inttypes_h.m4, lib-ld.m4,
+       lib-link.m4, lib-prefix.m4, longlong.m4, po.m4, stdint_h.m4,
+       uintmax_t.m4, ulonglong.m4, vasnprintf.m4: Import most recent versions
+       from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * save-cwd.m4: New file from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * alloca.m4: Import latest version from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * unlocked-io.m4: Import most recent version from GNULIB.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * regex.m4: Import most recent version from GNULIB.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add strftime.m4.
+       * strftime.m4: New file.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add tzset.m4.
+
+2004-05-14  Derek Price  <address@hidden>
+
+       * gettime.m4: Updated from GNULIB.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * bison.m4: Declare YACC & YFLAGS as precious vars.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * bison.m4: Use AM_MISSING_PROG rather than a set/subst combination.
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add strerror.m4 & strerror_r.m4.
+       * strerror_r.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * unlocked-io.m4: Update to most recent version from GNULIB.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new files.
+       * bison.m4, tm_gmtoff.m4, getdate.m4: New files.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * mktime.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * time_r.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * nanosleep.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new files.
+       * clock_time.m4, gettime.m4: New files.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * gettimeofday.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * st_mtim.m4, timespec.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * extensions.m4: New file.
+       * Makefile.in: Regenerated.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * dos.m4: Update from GNULIB.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       Add dirname module from GNULIB.
+
+       * Makefile.am (EXTRA_DIST): Add new files.
+       * dirname.m4, dos.m4: New files.
+       * Makefile.in: Regenerated.
+
+2004-04-21  Derek Price  <address@hidden>
+
+       Add stdbool module from GNULIB.
+
+       * Makefile.am (EXTRA_DIST): Add stdbool.m4.
+       * stdbool.m4: New files.
+       * Makefile.in: Regenerated.
+
+2004-04-14  Derek Price  <address@hidden>
+
+       Update to current fnmatch module from GNULIB.
+
+       * Makefile.am (EXTRA_DIST): Add fnmatch.m4 * mbstate_t.m4.
+       * fnmatch.m4, mbstate_t.m4: New files.
+       * Makefile.in: Regenerated.
+
+2004-04-07  Derek Price  <address@hidden>
+
+       Update regex module from GNULIB.
+
+       * Makefile.am (EXTRA_DIST): Add regex.m4.
+       * regex.m4: New file.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       Import xalloc module from GNULIB, as well as its remaining unimported
+       dependency, the exitfail module.
+
+       * Makefile.am (EXTRA_DIST): Add exitfail.m4 & xalloc.m4.
+       * exitfail.m4, xalloc.m4: New files.
+       * Makefile.in: Regenerated.
+
+2004-02-18  Derek Price  <address@hidden>
+
+       * xsize.m4: Update to a more recent version which AC_REQUIREs
+       AC_C_INLINE.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add alloca.m4.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import vasnprintf module from GNULIB.
+       * intmax_t.m4, longdouble.m4, longlong.m4, signed.m4, vasnprintf.m4,
+       wchar_t.m4, wint_t.m4: New files.
+       * Makefile.am (EXTRA_DIST): Add new files.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import xsize module from GNULIB for vasnprintf().
+       * size_max.m4, xsize.m4: New files.
+       * Makefile.am (EXTRA_DIST): Add new files.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Import alloca module from GNULIB for vasnprintf().
+       * alloca.m4: New file.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerate for new configure.in.
+
+2003-11-19  Derek Price  <address@hidden>
+
+       * getline.m4, getndelim2.m4: Import new, synchronized, versions from
+       GNULIB.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * acx_extract_cpp_defn.m4 (ACX_EXTRACT_CPP_DEFN): Remove leading and
+       trailing white space around extracted definitions.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+2003-10-23  Derek Price  <address@hidden>
+
+       Avoid including getndelim.o in $(LIBOBJ) twice.
+
+       * getndelim2.m4 (gl_GETNDELIM2): Only allow AC_LIBOBJ(getndelim2) to be
+       called once.
+       * getline.m4 (gl_GETLINE): Use gl_GETNDELIM2 rather than calling
+       AC_LIBOBJ(getndelim2) directly.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       Add the GNULIB restrict module.
+
+       * Makefile.am (EXTRA_DIST): Add restrict.m4.
+       * restrict.m4: New file.
+       * Makefile.in: Regenerated.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add getopt.m4.
+       * getopt.m4: New file from GNULIB.
+       * Makefile.in: Regenerated.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * gettext.m4: Don't check for headers we assume per the notes in
+       HACKING.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       Provide an atexit() function on systems which provide on_exit() but not
+       atexit().
+
+       * Makefile.am (EXTRA_DIST): Add atexit.m4.
+       * atexit.m4: New file.
+       * Makefile.in: Regenerated.
+
+2003-08-11  Derek Price  <address@hidden>
+
+       * getndelim2: Update from GNULIB to eliminate warning.
+
+2003-07-31  Derek Price  <address@hidden>
+
+       * getpass.m4: Update from GNULIB.
+
+2003-07-29  Derek Price  <address@hidden>
+
+       * getpass.m4: New file from GNULIB.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * getline.m4: Sync this file with GNULIB.
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * gethostname.m4: New file from GNULIB.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * gettext.m4: Assume the existance of <limits.h> & <stddef.h> per C89.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * strerror.m4: New file from GNULIB.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * memmove.m4: New file from GNULIB.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * lstat.m4: Call the *_ONCE functions.  This almost syncs us with
+       GNULIB.
+
+2003-07-19  Derek Price  <address@hidden>
+
+       * getline.m4: Merge more of Bruno Habile's GNULIB changes to this file
+       so our fork is less divergent.
+       * getndelim2.m4: Ditto.
+       * getnline.m4: Ditto.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * getline.m4 (gl_PREREQ_GETLINE): s/gl_FUNC_GETNDELIM2/gl_GETNDELIM2/.
+       * getnline.m4 (gl_FUNC_GETNLINE): Rename to...
+       (gl_GETNLINE): ...this and s/gl_FUNC_GETNDELIM2/gl_GETNDELIM2/.
+       * getndelim2.m4 (gl_FUNC_GETNDELIM2): Rename to...
+       (gl_GETNDELIM2): ...this.
+       (Merging some of Bruno Habile's changes from GNULIB.)
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * getndelim2.m4: New file.
+       * ssize_t.m4: Ditto.
+
+       * getline.m4: Depend on getndelim2 rather than getnline.
+       * getnline.m4: Depend on getndelim2.
+
+2003-07-17  Derek Price  <address@hidden>
+
+       * getline.m4 (AM_FUNC_GETLINE): Define HAVE_GETDELIM when a working
+       GNU getline() is found.
+       (Thanks again to Steve McIntyre <address@hidden> for the report.)
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * pathmax.m4: New file.
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * Makefile.in: Regenerated.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * getline.m4: New file based on GNULIB and resubmitted to GNULIB.
+       * getnline.m4: Ditto.
+
+       * Makefile.am (EXTRA_DIST): Add new files.
+
+       * Makefile.in: Regenerated.
+
+2003-07-15  Derek Price  <address@hidden>
+
+       * unlocked-io.m4: Use the onceonly_2_57.m4 functions.  This syncs us
+       with GNULIB.
+
+2003-06-16  Derek Price  <address@hidden>
+
+       * acx_with_external_zlib.m4: Fix minor typo that was preventing
+       --with-external-zlib from linking.
+       (Patch from Rainer Orth <address@hidden>.)
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * onceonly_2_57.m4: New file.
+       * Makefile.am (EXTRA_DIST): Add new file.
+
+       * Makefile.in: Regenerated.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * mkstemp.m4: New file.
+       * Makefile.am (EXTRA_DIST): Add new file.
+
+       * Makefile.in: Regenerated.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * asx_version_compare.c: Check for empty strings in version subparts.
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): Add new files and a few forgotten files.
+
+       * codeset.m4: New gettext support macros.
+       * gettext.m4: Ditto.
+       * glibc21.m4: Ditto.
+       * iconv.m4: Ditto.
+       * intdiv0.m4: Ditto.
+       * inttypes-pri.m4: Ditto.
+       * inttypes.m4: Ditto.
+       * inttypes_h.m4: Ditto.
+       * isc-posix.m4: Ditto.
+       * lcmessage.m4: Ditto.
+       * lib-ld.m4: Ditto.
+       * lib-link.m4: Ditto.
+       * lib-prefix.m4: Ditto.
+       * nls.m4: Ditto.
+       * po.m4: Ditto.
+       * progtest.m4: Ditto.
+       * stdint_h.m4: Ditto.
+       * uintmax_t.m4: Ditto.
+       * ulonglong.m4: Ditto.
+
+       * Makefile.in: Regenerated.
+
+2003-05-28  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with README included in DIST_COMMON.
+
+2003-05-27  Derek Price  <address@hidden>
+
+       * README: New file explaining the GNULIB origin of many of the m4
+       files.
+
+2003-05-22  Derek Price  <address@hidden>
+
+       * acx_with_external_zlib.m4: Check version of unused ZLIBs and warn
+       when they are newer than the selected version.
+       * acx_extract_cpp_defn.m4: New file.
+       * asx_version_compare.m4: Ditto.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerate with Autoconf version 1.7.5.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * unlocked-io.m4: New file from GNULIB.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * realloc.m4: New file from GNULIB.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * lstat.m4 (jm_FUNC_LSTAT): Add check for the lstat directory with a
+       trailing slash bug.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * acx_with_external_zlib.m4 (--with-external-zlib): New file with new
+       ACX_WITH_SYSTEM_VLIB function to use the system's installed version of
+       zlib library.
+       (Original patch from Anthon Pang <address@hidden>.)
+
+       * Makefile.am (EXTRA_DIST): Add new file.
+       * Makefile.in: Regenerated.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * Makefile.am (EXTRA_DIST): s/acx_have_gssapi.m4/acx_with_gssapi.m4/.
+
+       * Makefile.in: Regenerated.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * .cvsignore: New file.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * Makefile.in (EXTRA_DIST): Add stat.m4, lstat.m4, malloc.m4.
+       * malloc.m4: New file from <https://savannah.gnu.org/projects/gnulib>.
+
+       * Makefile.in: Regenerated.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * lstat.m4: New file from
+       <https://savannah.gnu.org/projects/gnulib>.
+       * stat.m4: Ditto.
+
+       * Makefile.in: Regenerated.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * Makefile.am: New file.
+       * acx_have_gssapi.m4: Ditto.
+       * cvs_func_printf_ptr.m4: Ditto.
Index: ccvs/m4/base64.m4
diff -u /dev/null ccvs/m4/base64.m4:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/m4/base64.m4   Wed Dec 21 13:25:09 2005
@@ -0,0 +1,16 @@
+# base64.m4 serial 2
+dnl Copyright (C) 2004 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_BASE64],
+[
+  gl_PREREQ_BASE64
+])
+
+# Prerequisites of lib/base64.c.
+AC_DEFUN([gl_PREREQ_BASE64], [
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([gl_C_RESTRICT])
+])
Index: ccvs/m4/gnulib-cache.m4
diff -u /dev/null ccvs/m4/gnulib-cache.m4:1.4.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/m4/gnulib-cache.m4     Wed Dec 21 13:25:09 2005
@@ -0,0 +1,26 @@
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the specification of how gnulib-tool is used.
+# It acts as a cache: It is written and read by gnulib-tool.
+# In projects using CVS, this file is meant to be stored in CVS,
+# like the configure.ac and various Makefile.am files.
+
+
+# Specification in the form of a command-line invocation:
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 
--aux-dir=build-aux --macro-prefix=gl allocsa atexit base64 canon-host 
canonicalize closeout dirname dup2 error exit exitfail extensions fnmatch 
fnmatch-posix ftruncate getdate gethostname getline getlogin_r getndelim2 
getnline getopt getpagesize getpass-gnu gettext gettime gettimeofday glob lstat 
malloc md5 memmove minmax mkdir mkstemp mktime nanosleep pagealign_alloc 
pathmax quotearg readlink realloc regex rename restrict save-cwd setenv 
stat-macros stdbool stdint strcase strdup strerror strftime strstr strtoul 
time_r timespec tzset unlocked-io vasnprintf vasprintf xalloc-die xgethostname 
xreadlink xsize yesno
+
+# Specification in the form of a few gnulib-tool.m4 macro invocations:
+gl_MODULES([allocsa atexit base64 canon-host canonicalize closeout dirname 
dup2 error exit exitfail extensions fnmatch fnmatch-posix ftruncate getdate 
gethostname getline getlogin_r getndelim2 getnline getopt getpagesize 
getpass-gnu gettext gettime gettimeofday glob lstat malloc md5 memmove minmax 
mkdir mkstemp mktime nanosleep pagealign_alloc pathmax quotearg readlink 
realloc regex rename restrict save-cwd setenv stat-macros stdbool stdint 
strcase strdup strerror strftime strstr strtoul time_r timespec tzset 
unlocked-io vasnprintf vasprintf xalloc-die xgethostname xreadlink xsize yesno])
+gl_AVOID([])
+gl_SOURCE_BASE([lib])
+gl_M4_BASE([m4])
+gl_TESTS_BASE([tests])
+gl_LIB([libgnu])
+gl_MACRO_PREFIX([gl])
Index: ccvs/m4/gnulib-comp.m4
diff -u /dev/null ccvs/m4/gnulib-comp.m4:1.9.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/m4/gnulib-comp.m4      Wed Dec 21 13:25:09 2005
@@ -0,0 +1,412 @@
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the compiled summary of the specification in
+# gnulib-cache.m4. It lists the computed macro invocations that need
+# to be invoked from configure.ac.
+# In projects using CVS, this file can be treated like other built files.
+
+
+# This macro should be invoked from ./configure.in, in the section
+# "Checks for programs", right after AC_PROG_CC, and certainly before
+# any checks for libraries, header files, types and library functions.
+AC_DEFUN([gl_EARLY],
+[
+  AC_REQUIRE([AC_GNU_SOURCE])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+])
+
+# This macro should be invoked from ./configure.in, in the section
+# "Check for header files, types and library functions".
+AC_DEFUN([gl_INIT],
+[
+AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
+  gl_FUNC_ALLOCA
+  gl_ALLOCSA
+  gl_FUNC_ATEXIT
+  gl_FUNC_BASE64
+  gl_CANON_HOST
+  AC_FUNC_CANONICALIZE_FILE_NAME
+  gl_FUNC_CHDIR_LONG
+  gl_CLOSEOUT
+  gl_DIRNAME
+  gl_FUNC_DUP2
+  gl_ERROR
+  gl_EXITFAIL
+  dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
+  gl_FCNTL_SAFER
+  gl_FILE_NAME_CONCAT
+  # No macro. You should also use one of fnmatch-posix or fnmatch-gnu.
+  gl_FUNC_FNMATCH_POSIX
+  gl_FUNC_FPENDING
+  gl_FUNC_FTRUNCATE
+  gl_GETADDRINFO
+  gl_FUNC_GETCWD
+  gl_GETDATE
+  gl_FUNC_GETDELIM
+  gl_FUNC_GETHOSTNAME
+  gl_FUNC_GETLINE
+  gl_GETLOGIN_R
+  gl_GETNDELIM2
+  gl_GETNLINE
+  gl_GETOPT
+  gl_GETPAGESIZE
+  gl_FUNC_GETPASS_GNU
+  dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+  gl_GETTIME
+  AC_FUNC_GETTIMEOFDAY_CLOBBER
+  gl_GLOB
+  gl_FUNC_LSTAT
+  AC_FUNC_MALLOC
+  gl_MBCHAR
+  gl_MBITER
+  gl_MD5
+  gl_FUNC_MEMCHR
+  gl_FUNC_MEMMOVE
+  gl_FUNC_MEMPCPY
+  gl_FUNC_MEMRCHR
+  gl_MINMAX
+  gl_FUNC_MKDIR_TRAILING_SLASH
+  gl_FUNC_MKSTEMP
+  gl_FUNC_MKTIME
+  gl_FUNC_NANOSLEEP
+  gl_FUNC_OPENAT
+  gl_PAGEALIGN_ALLOC
+  gl_PATHMAX
+  gl_QUOTEARG
+  gl_FUNC_READLINK
+  AC_FUNC_REALLOC
+  gl_REGEX
+  vb_FUNC_RENAME
+  gl_C_RESTRICT
+  gl_FUNC_RPMATCH
+  gl_SAVE_CWD
+  gt_FUNC_SETENV
+  gl_SIZE_MAX
+  gl_SOCKLEN_T
+  gt_TYPE_SSIZE_T
+  gl_STAT_MACROS
+  AM_STDBOOL_H
+  gl_STDINT_H
+  gl_STRCASE
+  gl_FUNC_STRDUP
+  gl_FUNC_STRERROR
+  gl_FUNC_GNU_STRFTIME
+  gl_FUNC_STRSTR
+  gl_FUNC_STRTOL
+  gl_FUNC_STRTOUL
+  gl_TIME_R
+  gl_TIMESPEC
+  gl_FUNC_TZSET_CLOBBER
+  gl_UNISTD_SAFER
+  gl_FUNC_GLIBC_UNLOCKED_IO
+  gl_FUNC_VASNPRINTF
+  gl_FUNC_VASPRINTF
+  gl_XALLOC
+  gl_XGETCWD
+  gl_XREADLINK
+  gl_XSIZE
+  gl_YESNO
+])
+
+# This macro records the list of files which have been installed by
+# gnulib-tool and may be removed by future gnulib-tool invocations.
+AC_DEFUN([gl_FILE_LIST], [
+  build-aux/config.rpath
+  doc/getdate.texi
+  lib/__fpending.c
+  lib/__fpending.h
+  lib/alloca.c
+  lib/alloca_.h
+  lib/allocsa.c
+  lib/allocsa.h
+  lib/allocsa.valgrind
+  lib/asnprintf.c
+  lib/asprintf.c
+  lib/atexit.c
+  lib/base64.c
+  lib/base64.h
+  lib/basename.c
+  lib/canon-host.c
+  lib/canon-host.h
+  lib/canonicalize.c
+  lib/canonicalize.h
+  lib/chdir-long.c
+  lib/chdir-long.h
+  lib/closeout.c
+  lib/closeout.h
+  lib/creat-safer.c
+  lib/cycle-check.c
+  lib/cycle-check.h
+  lib/dev-ino.h
+  lib/dirname.c
+  lib/dirname.h
+  lib/dup-safer.c
+  lib/dup2.c
+  lib/error.c
+  lib/error.h
+  lib/exit.h
+  lib/exitfail.c
+  lib/exitfail.h
+  lib/fcntl--.h
+  lib/fcntl-safer.h
+  lib/fd-safer.c
+  lib/filenamecat.c
+  lib/filenamecat.h
+  lib/fnmatch.c
+  lib/fnmatch_.h
+  lib/fnmatch_loop.c
+  lib/ftruncate.c
+  lib/gai_strerror.c
+  lib/getaddrinfo.c
+  lib/getaddrinfo.h
+  lib/getcwd.c
+  lib/getcwd.h
+  lib/getdate.h
+  lib/getdate.y
+  lib/getdelim.c
+  lib/getdelim.h
+  lib/gethostname.c
+  lib/getline.c
+  lib/getline.h
+  lib/getlogin_r.c
+  lib/getlogin_r.h
+  lib/getndelim2.c
+  lib/getndelim2.h
+  lib/getnline.c
+  lib/getnline.h
+  lib/getopt.c
+  lib/getopt1.c
+  lib/getopt_.h
+  lib/getopt_int.h
+  lib/getpagesize.h
+  lib/getpass.c
+  lib/getpass.h
+  lib/gettext.h
+  lib/gettime.c
+  lib/gettimeofday.c
+  lib/glob-libc.h
+  lib/glob.c
+  lib/glob_.h
+  lib/lstat.c
+  lib/lstat.h
+  lib/malloc.c
+  lib/mbchar.c
+  lib/mbchar.h
+  lib/mbuiter.h
+  lib/md5.c
+  lib/md5.h
+  lib/memchr.c
+  lib/memmove.c
+  lib/mempcpy.c
+  lib/mempcpy.h
+  lib/memrchr.c
+  lib/memrchr.h
+  lib/minmax.h
+  lib/mkdir.c
+  lib/mkstemp.c
+  lib/mktime.c
+  lib/nanosleep.c
+  lib/open-safer.c
+  lib/openat-die.c
+  lib/openat.c
+  lib/openat.h
+  lib/pagealign_alloc.c
+  lib/pagealign_alloc.h
+  lib/pathmax.h
+  lib/pipe-safer.c
+  lib/printf-args.c
+  lib/printf-args.h
+  lib/printf-parse.c
+  lib/printf-parse.h
+  lib/quotearg.c
+  lib/quotearg.h
+  lib/readlink.c
+  lib/realloc.c
+  lib/regcomp.c
+  lib/regex.c
+  lib/regex.h
+  lib/regex_internal.c
+  lib/regex_internal.h
+  lib/regexec.c
+  lib/rename.c
+  lib/rpmatch.c
+  lib/save-cwd.c
+  lib/save-cwd.h
+  lib/setenv.c
+  lib/setenv.h
+  lib/size_max.h
+  lib/stat-macros.h
+  lib/stdbool_.h
+  lib/stdint_.h
+  lib/strcase.h
+  lib/strcasecmp.c
+  lib/strdup.c
+  lib/strdup.h
+  lib/strerror.c
+  lib/strftime.c
+  lib/strftime.h
+  lib/stripslash.c
+  lib/strncasecmp.c
+  lib/strnlen1.c
+  lib/strnlen1.h
+  lib/strstr.c
+  lib/strstr.h
+  lib/strtol.c
+  lib/strtoul.c
+  lib/tempname.c
+  lib/time_r.c
+  lib/time_r.h
+  lib/timespec.h
+  lib/unistd--.h
+  lib/unistd-safer.h
+  lib/unlocked-io.h
+  lib/unsetenv.c
+  lib/vasnprintf.c
+  lib/vasnprintf.h
+  lib/vasprintf.c
+  lib/vasprintf.h
+  lib/xalloc-die.c
+  lib/xalloc.h
+  lib/xgetcwd.c
+  lib/xgetcwd.h
+  lib/xgethostname.c
+  lib/xgethostname.h
+  lib/xmalloc.c
+  lib/xreadlink.c
+  lib/xreadlink.h
+  lib/xsize.h
+  lib/yesno.c
+  lib/yesno.h
+  m4/alloca.m4
+  m4/allocsa.m4
+  m4/atexit.m4
+  m4/base64.m4
+  m4/bison.m4
+  m4/canon-host.m4
+  m4/canonicalize.m4
+  m4/chdir-long.m4
+  m4/clock_time.m4
+  m4/closeout.m4
+  m4/codeset.m4
+  m4/d-ino.m4
+  m4/d-type.m4
+  m4/dirname.m4
+  m4/dos.m4
+  m4/dup2.m4
+  m4/eealloc.m4
+  m4/eoverflow.m4
+  m4/error.m4
+  m4/exitfail.m4
+  m4/extensions.m4
+  m4/fcntl-safer.m4
+  m4/filenamecat.m4
+  m4/fnmatch.m4
+  m4/fpending.m4
+  m4/ftruncate.m4
+  m4/getaddrinfo.m4
+  m4/getcwd-path-max.m4
+  m4/getcwd.m4
+  m4/getdate.m4
+  m4/getdelim.m4
+  m4/gethostname.m4
+  m4/getline.m4
+  m4/getlogin_r.m4
+  m4/getndelim2.m4
+  m4/getnline.m4
+  m4/getopt.m4
+  m4/getpagesize.m4
+  m4/getpass.m4
+  m4/gettext.m4
+  m4/gettime.m4
+  m4/gettimeofday.m4
+  m4/glibc2.m4
+  m4/glibc21.m4
+  m4/glob.m4
+  m4/iconv.m4
+  m4/intdiv0.m4
+  m4/intmax.m4
+  m4/intmax_t.m4
+  m4/inttypes-pri.m4
+  m4/inttypes.m4
+  m4/inttypes_h.m4
+  m4/isc-posix.m4
+  m4/lcmessage.m4
+  m4/lib-ld.m4
+  m4/lib-link.m4
+  m4/lib-prefix.m4
+  m4/longdouble.m4
+  m4/longlong.m4
+  m4/lstat.m4
+  m4/mbchar.m4
+  m4/mbiter.m4
+  m4/mbrtowc.m4
+  m4/mbstate_t.m4
+  m4/md5.m4
+  m4/memchr.m4
+  m4/memmove.m4
+  m4/mempcpy.m4
+  m4/memrchr.m4
+  m4/minmax.m4
+  m4/mkdir-slash.m4
+  m4/mkstemp.m4
+  m4/mktime.m4
+  m4/mmap-anon.m4
+  m4/nanosleep.m4
+  m4/nls.m4
+  m4/onceonly_2_57.m4
+  m4/openat.m4
+  m4/pagealign_alloc.m4
+  m4/pathmax.m4
+  m4/po.m4
+  m4/printf-posix.m4
+  m4/progtest.m4
+  m4/quotearg.m4
+  m4/readlink.m4
+  m4/regex.m4
+  m4/rename.m4
+  m4/restrict.m4
+  m4/rpmatch.m4
+  m4/save-cwd.m4
+  m4/setenv.m4
+  m4/signed.m4
+  m4/size_max.m4
+  m4/socklen.m4
+  m4/sockpfaf.m4
+  m4/ssize_t.m4
+  m4/stat-macros.m4
+  m4/stdbool.m4
+  m4/stdint.m4
+  m4/stdint_h.m4
+  m4/strcase.m4
+  m4/strdup.m4
+  m4/strerror.m4
+  m4/strerror_r.m4
+  m4/strftime.m4
+  m4/strstr.m4
+  m4/strtol.m4
+  m4/strtoul.m4
+  m4/time_r.m4
+  m4/timespec.m4
+  m4/tm_gmtoff.m4
+  m4/tzset.m4
+  m4/uintmax_t.m4
+  m4/ulonglong.m4
+  m4/unistd-safer.m4
+  m4/unlocked-io.m4
+  m4/vasnprintf.m4
+  m4/vasprintf.m4
+  m4/wchar_t.m4
+  m4/wint_t.m4
+  m4/xalloc.m4
+  m4/xgetcwd.m4
+  m4/xreadlink.m4
+  m4/xsize.m4
+  m4/yesno.m4
+])
Index: ccvs/m4/uint32_t.m4
diff -u /dev/null ccvs/m4/uint32_t.m4:1.5.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/m4/uint32_t.m4 Wed Dec 21 13:25:09 2005
@@ -0,0 +1,53 @@
+# uint32_t.m4 serial 4
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_AC_TYPE_UINT32_T],
+[
+  AC_CACHE_CHECK([for uint32_t], gl_cv_c_uint32_t,
+    [gl_cv_c_uint32_t=no
+     for ac_type in "uint32_t" "unsigned int" \
+        "unsigned long int" "unsigned short int"; do
+       AC_COMPILE_IFELSE(
+        [AC_LANG_BOOL_COMPILE_TRY(
+           [AC_INCLUDES_DEFAULT],
+           [[($ac_type) -1 == 4294967295U]])],
+        [gl_cv_c_uint32_t=$ac_type])
+       test "$gl_cv_c_uint32_t" != no && break
+     done])
+  case "$gl_cv_c_uint32_t" in
+  no|uint32_t) ;;
+  *)
+    AC_DEFINE(_UINT32_T, 1,
+      [Define for Solaris 2.5.1 so uint32_t typedef from <sys/synch.h>,
+       <pthread.h>, or <semaphore.h> is not used. If the typedef was
+       allowed, the #define below would cause a syntax error.])
+    AC_DEFINE_UNQUOTED(uint32_t, $gl_cv_c_uint32_t,
+      [Define to the type of a unsigned integer type of width exactly 32 bits
+       if such a type exists and the standard includes do not define it.])
+    ;;
+  esac
+
+  AC_CACHE_CHECK([for UINT32_MAX], gl_cv_c_uint32_max,
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_BOOL_COMPILE_TRY(
+         [AC_INCLUDES_DEFAULT],
+         [[UINT32_MAX == 4294967295U]])],
+       [gl_cv_c_uint32_max=yes],
+       [gl_cv_c_uint32_max=no])])
+  case $gl_cv_c_uint32_max,$gl_cv_c_uint32_t in
+  yes,*) ;;
+  *,no) ;;
+  *)
+    AC_DEFINE(UINT32_MAX, 4294967295U,
+      [Define to its maximum value if an unsigned integer type of width
+       exactly 32 bits exists and the standard includes do not define
+       UINT32_MAX.])
+    ;;
+  esac
+])
Index: ccvs/maint-aux/Makefile.in
diff -u /dev/null ccvs/maint-aux/Makefile.in:1.19.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/maint-aux/Makefile.in  Wed Dec 21 13:25:09 2005
@@ -0,0 +1,427 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for the maint-aux directory of the GNU Concurrent Versions System.
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#               1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+#               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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = maint-aux
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+EXTRA_DIST = \
+       gnulib-filelist.txt \
+       gnulib-modules \
+       gnulib-update \
+       srclist.txt
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  maint-aux/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  maint-aux/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-info-am
+
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/man/Makefile.in
diff -u /dev/null ccvs/man/Makefile.in:1.91.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/man/Makefile.in        Wed Dec 21 13:25:09 2005
@@ -0,0 +1,529 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile.am for GNU CVS man pages.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = man
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+man5dir = $(mandir)/man5
+am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+man_MANS = cvs.5 cvsbug.8
+EXTRA_DIST = \
+       .cvsignore \
+       $(man_MANS)
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  man/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  man/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+install-man5: $(man5_MANS) $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)"
+       @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
+       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+       for i in $$l2; do \
+         case "$$i" in \
+           *.5*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+         else file=$$i; fi; \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         case "$$ext" in \
+           5*) ;; \
+           *) ext='5' ;; \
+         esac; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed -e 's/^.*\///'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
+       done
+uninstall-man5:
+       @$(NORMAL_UNINSTALL)
+       @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
+       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+       for i in $$l2; do \
+         case "$$i" in \
+           *.5*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         case "$$ext" in \
+           5*) ;; \
+           *) ext='5' ;; \
+         esac; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed -e 's/^.*\///'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
+         rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
+       done
+install-man8: $(man8_MANS) $(man_MANS)
+       @$(NORMAL_INSTALL)
+       test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
+       @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
+       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+       for i in $$l2; do \
+         case "$$i" in \
+           *.8*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+         else file=$$i; fi; \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         case "$$ext" in \
+           8*) ;; \
+           *) ext='8' ;; \
+         esac; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed -e 's/^.*\///'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
+       done
+uninstall-man8:
+       @$(NORMAL_UNINSTALL)
+       @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
+       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+       for i in $$l2; do \
+         case "$$i" in \
+           *.8*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         case "$$ext" in \
+           8*) ;; \
+           *) ext='8' ;; \
+         esac; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+         inst=`echo $$inst | sed -e 's/^.*\///'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
+         rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
+       done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
+installdirs:
+       for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man: install-man5 install-man8
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-man
+
+uninstall-man: uninstall-man5 uninstall-man8
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-man5 install-man8 install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
+       uninstall-man uninstall-man5 uninstall-man8
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/src/ChangeLog
diff -u /dev/null ccvs/src/ChangeLog:1.3328.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/ChangeLog  Wed Dec 21 13:25:09 2005
@@ -0,0 +1,14769 @@
+2005-12-13  Derek Price  <address@hidden>
+
+       * base.c (ibase_copy, base_merge): Remove signature files when using
+       temp files or SUPPRESS_BASES.
+
+       Send signature files to client with base files.
+       * base.c (base_checkout): Comment where the signature verification
+       will take place.
+       (ibase_copy): Suppress warning.
+       (base_remove): Add header comment.  Remove signature files with bases.
+       * client.c: Include base64.h.
+       (handle_openpgp_signatures): New function.
+       (client_base_checkout): Remove ugly comment.  Save stored signatures to
+       a file.
+       (responses): Add OpenPGP-signatures.
+       * rcs.c (RCS_get_openpgp_signatures): New function.
+       * rcs.h: Add proto for same.
+       * sanity.sh (basica): Force remove directory when done.
+       * server.c: Reorder headers for consistency.
+       (server_send_signatures): New function.
+       (ibase_server_checkout): Use new function to send signatures.
+
+2005-12-12  Derek Price  <address@hidden>
+
+       Simplify protocol slightly.
+       * add.c (add), update.c (join_file): Use temp files rather than base
+       files for resurrection and additions via join.
+       * base.c (temp_checkout): Export function.
+       (ibase_copy): Factor from...
+       (base_copy): ...here.
+       (temp_copy): New function.
+       * base.h (temp_checkout, temp_copy): New functions.
+       * client.c (client_base_copy): Work with temp files when necessary.
+       
+2005-12-10  Derek Price  <address@hidden>
+
+       * sanity.sh: Minor corrections for nobase testing.
+
+2005-12-09  Derek Price  <address@hidden>
+
+       * sanity.sh: Minor corrections for nobase testing.
+       (modes): Unset CVSUMASK when done.
+
+2005-12-08  Derek Price  <address@hidden>
+
+       * Makefile.am (maintainercheck-local, nobaseremotecheck,
+       nobaselocalcheck, nobaseproxycheck): New targets.
+       (check-local): Add nobaseremotecheck.
+       * base.c (base_copy, base_merge): Remove files when bases are
+       suppressed.
+       * checkin.c (Checkin): Don't create bases when suppressed.
+       * client.c (handle_base_checkout, handle_temp_checkout,
+       handle_base_copy, handle_base_merge, handle_base_entry,
+       handle_base_merged): Abort if these responses are received when the
+       client has requested the server not send them.
+       (client_base_copy): Force removal of temp files in noexec mode.
+       (start_server): Avoid sending Base-* and Temp-checkout as part of
+       valid_responses when the user has suppressed these.
+       * cvs.h (NOBASES_ENV): New macro.
+       (suppress_bases): New global.
+       * main.c (bases): Ditto.
+       (opt_usage, short_options, main): Add & process -B.
+       * update.c (join_file): Prefer Register to the potentially ambiguous
+       RegisterMerge when the merge actually only added a file.  Use
+       RCS_cmp_file to test if the file == its base when a base file is not
+       available.
+
+       * sanity.sh: Add processing for -B and -q options.
+       (unedit-without-baserev): Remove accidental commit.
+       
+       * base.c (base_checkout): Don't checkout base files when NOEXEC.
+       (temp_checkout): New function.
+       (base_copy): This function can't rely on the client to validate changes
+       in local mode.  Avoid copying when NOEXEC.
+       (base_merge): Use temp files when joining and in noexec mode to avoid
+       overwriting base files.  Suppress merging messages when REALLY_QUIET.
+       (translate_exists, validate_change): Move from...
+       * client.c: ...here.
+       (handle_redirect): Avoid double-free.
+       (update_entries): Move error handling from validate_change.  Sync
+       messages between local & client/server.
+       (client_base_checkout): Handle temp checkouts.
+       (handle_temp_checkout): New function.
+       (client_base_merge): Move error handling from validate_change.  Use
+       temp checkouts.  Sync messages.  Fix bugs in xcmp tests.
+       * base.h (update_existing, translate_exists, validate_change): Move
+       structs and protos from...
+       * client.h: ...here.
+       * checkin.c (Checkin): Update base file in local mode.
+       * difflib.h (merge), difflib.c (merge): Reorder args for clarity.
+       * server.c (server_updated): Expand traces.
+       (iserver_base_checkout): New function factored from...
+       (server_base_checkout): ...here.
+       (server_temp_checkout): New function.
+       * server.h (server_temp_checkout): New proto.
+       * update.c (checkout_file): Copy backup for error checks.
+       (RegisterMerge): Add traces.
+       (merge_file): Update base files when done.
+       (join_file): Sync messages.
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Other minor corrections.
+       (mcopy): Disable this test.
+
+2005-12-06  Derek Price  <address@hidden>
+
+       * client.c (client_base_checkout): Make base checkouts work when in
+       noexec mode.
+       * server.c (server_base_checkout): Unlink temp file in noexec mode.
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Other minor corrections.
+
+2005-12-05  Derek Price  <address@hidden>
+
+       * client.c (update_entries): Create timestamp when LAST_MERGE_CONFLICT.
+
+       * server.c (server_updated): Don't dereference NULL.  Don't send diffs
+       when revisions are identical.
+
+       * cvs.h (Register): Move proto to...
+       * entries.h: ...here.  Include hash.h.
+       * entries.c (Entnode_Destroy): Add traces.
+       * hash.c: Verify interface.
+       * hash.h: Include <stddef.h> for size_t.
+       * update.c (update_fileproc): Fix vers_ts->entdata after a merge.
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Other minor corrections.
+
+2005-12-02  Derek Price  <address@hidden>
+
+       * base.c (base_remove), rcs,c (RCS_checkin), server.c (server_updated):
+        Add traces.
+       * client.c (update_entries): Don't assume UPDATE_ENTRIES_CHECKIN
+       actually means this was a checkin.
+       * server.c (server_base_checkout): Name (tag) changes could also create
+       a diff.
+
+       * checkin.c (Checkin): Actually pass the previous options.
+
+       * server.c (server_base_checkout), server.h: Accept new previous tag
+       and options arguments and use them when checking out the previous
+       revision to build a diff.
+       * base.c (base_checkout, base_merge): Accept new previous tag and
+       previous options arguments and pass them through to
+       server_base_checkout.
+       * add.c, base.c, base.h, checkin.c, update.c: Update all references.
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Other minor corrections.
+
+2005-12-01  Derek Price  <address@hidden>
+
+       * client.c (client_base_merge): Print `Merging differences' message
+       only when !REALLY_QUIET.
+       (handle_base_merged): New function.
+       (responses): Add Base-merged.
+       * server.c (server_updated): Send Base-merged for merges.
+       * update.c (join_file): Handle replacing files and binaries correctly.
+
+       * client.c (base_merge_rev1, base_merge_rev2, last_merge_no_change):
+       New globals.
+       (update_entries): Delete merge temp files when not needed.  Don't
+       ignore merges (only joins), since rev changes.
+       (merge): Skip deleting temp files since this function cannot know which
+       is needed.
+       * edit.c (edit_file): Deal with read-only edit base files.
+
+       * filesubr.c (force_xchmod, ixchmod, force_copy_file): New functions.
+       (copy_file, xchmod): Wrap the force_* functions.
+       * cvs.h (xchmod): Move proto...
+       * filesubr.h (xchmod): ...here.
+       (force_xchmod, force_copy_file): New protos.
+       * client.c (client_base_merge), difflib.c (merge): Use new force_* API
+       rather than saving NOEXEC.
+
+       * base.c (base_walk): Invert fopen error detection.
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Other minor corrections.
+
+2005-11-30  Derek Price  <address@hidden>
+
+       * client.c (discard_file): Move code which discards stored metadata...
+       (validate_change): ...here.
+
+       * update.c (join_file): Don't preserve keyword modes when adding files
+       via join.
+
+       * commit.c (checkaddfile): Provide more information when changing
+       keyword expansion mode.
+
+       * client.c (update_entries): Honor noexec.
+       (client_base_merge): Ignore noexec when working with temp files.
+       * difflib.c (merge): Ditto.
+       * filesubr.c (unlink_file): Expand header comment block.
+       * server.c (server_base_checkout): Keep temp files in tmp.  Ignore
+       noexec when removing temp files.
+
+       * client.c (update_entries): Avoid removing base files when they are
+       still needed.
+
+       * update.c (join_file): Avoid dereferencing NULL.
+
+       * client.c (update_entries): Don't output update status lines when
+       REALLY_QUIET.
+
+       * update.c (update, do_update): Set bases separately from -u.
+       (merge_file, join_file): Consistently output "already contains the
+       differences" messages when !QUIET.
+
+       * server.c (server_base_checkout): Accept poptions argument & resend
+       Base files when options have changed.
+       * base.c, server.h: Change all references.
+       * base.c (base_checkout): Accept poptions argument.
+       * add.c, base.c, base.h, checkin.c, update.c: Change all references.
+       * client.c (call_in_directory): Remove leading "./" from short_pathname
+       when present.
+       (update_entries): Output "C" & "M" lines when needed.
+       (client_base_checkout): Allow Base files to be replaced.
+       (client_base_merge): Try to pretend merges never happened when they
+       have no effect.
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Other minor corrections.
+
+       * difflib.c (merge): Add label argument.
+       * base.c, client.c, difflib.h: Update all references.
+       * client.c (update_entries, client_base_copy): Handle existance
+       errors.
+       * update.c (checkout_file): Set correct existance flags.
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.
+
+2005-11-29  Derek Price  <address@hidden>
+
+       * sanity.sh: Compensate for new read-only Base files by forcing some
+       directory removals.  Compensate for new output.
+
+       * Makefile.am (cvs_SOURCES): Add difflib.[ch].
+       * difflib.c, difflib.h: New files with content from...
+       * rcscmds.c: ...here.
+       * base.c (base_checkout): Move writable processing...
+       (base_copy): ...here.
+       (base_merge): New function.
+       * add.c, base.h, checkin.c, update.c: Update all references.
+       * client.c (last_merge, last_merge_conflict): Keep track of whether
+       merges for update_entries.
+       (update_entries): Use merge result.
+       (client_base_copy): Handle new flags.
+       (client_base_merge, handle_base_merge): New functions.
+       (responses): Add "Base-merge" response.
+       * server.h: Move some protos in from...
+       * cvs.h: ...here and move some run.c stuff...
+       * run.h: ...here.
+       * filesubr.c: Reorg headers.
+       * filesubr.h: Give standalone API.  Move copy_file proto from cvs.h.
+       * server.c (server_base_checkout, server_base_copy): Push data to
+       client when done.
+       (server_base_merge): New function.
+       (server_updated): Assume base handling.
+       * update.c (RegisterMerge, merge_file, join_file): Offload merging to
+       client.
+       * add.c, checkin.c, commit.c, update.c: Update all references.
+       * sanity.sh: Misc accomodations.
+
+2005-11-28  Derek Price  <address@hidden>
+
+       * sanity.sh (errmsg4): Protect keyword.
+
+2005-11-22  Derek Price  <address@hidden>
+
+       * base.c (base_checkout): Add trace.  Avoid using bases with export.
+       (base_copy): Likewise.  Replace read-only files.
+       (base_remove): Deal with leading '-' in revision number.
+       * checkin.c (Checkin): Copy correct base revision when keywords are
+       present.
+       * checkout.c (checkout_proc): Bury sacrificial chicken.
+       * classify.c (Classify_File): Add trace.
+       * client.c (update_entries): Don't remove base files when noexec.
+       Print UPDATED_FNAME for base updates.
+       (client_base_checkout): Make CVS/BAse dir when needed.
+       (client_base_copy): Add trace.
+       * entries.c (Scratch_Entry): Remove base files.
+       (Register): Make trace first call.
+       * server.c (do_cvs_command): Set protocol buf to NULL after closing.
+       (server_updated): Avoid using base commands with export.
+       (server_cleanup): Set error_use_protocol to 0 while setting buf_to_net
+       to NULL.
+       (server_base_checkout): Expand header block comment.  Add trace.  Avoid
+       sending diffs when PREV is 0.  Compute diff in correct order.  Check
+       that diff will really be sent before telling the client that it will
+       be.
+       (cvs_trace): Use cvs_outerr instead of fprintf.
+       * update.c (update_fileproc): Add trace.
+       (checkout_file): Prefer bool to int.  Add trace.
+       * vers_ts.c (Version_TS): Add traces.
+       * sanity.sh (basicb): Remove old debugging cruft.
+       (basic2): Handle s/P/U/.
+       
+       * base.c (base_checkout): Assume this function is not called from the
+       client.
+       (base_remove): New function.
+       * base.h (base_remove): New proto.
+       * checkin.c (Checkin): Use base files when possible.
+       * client.c (validate_change): Expand header comment block.
+       (update_entries): Create base files on checkin.  Remove old base files
+       when creating new ones.
+       (client_base_checkout): Handle diffs.
+       * server.c (server_use_bases): New function.
+       (server_base_checkout): Send diffs when possible.
+       * server.h (server_base_checkout): Update proto.
+       * update.c (checkout_to_buffer): Remove obsolete function.
+       (bases): New global.
+       (update): Set BASES.
+       (update_fileproc): Use base functions for T_NEED_PATCH && T_CHECKOUT.
+       (checkout_file): Expand header comment block.  Use bases when possible.
+       
+2005-11-18  Derek Price  <address@hidden>
+
+       * add.c (add): Begin using new base functions.
+       * base.c (base_checkout, base_copy): New functions.
+       * base.h: Ditto for the protos.
+       * client.c (enum update_existing): Extract decl from...
+       (struct update_entries_data): ...this struct.  Add UPDATE_ENTRIES_BASE.
+       (read_file_from_server): Drop filename arg.
+       (validate_change): New function factored from...
+       (update_entries): ...here.  Add support for UPDATE_ENTRIES_BASE.
+       (client_base_checkout, handle_base_checkout, translates_exists,
+       client_base_copy, handle_base_copy, handle_base_entry): New functions.
+       (responses): Add Base-checkout, Base-copy, & Base-entry.
+       * server.c (server_base_checkout): Send data for non-diffs.
+       (server_base_copy): New function.
+       (server_updated): Send Base-entry when possible.  Accept temporary
+       USE_BASE arg.
+       * add.c, checkin.c, commit.c, update.c, server.h: Update all callers.
+
+2005-11-17  Derek Price  <address@hidden>
+
+       * client.c (read_file_from_sever, discard_file): New functions...
+       (update_entries): ...factored from here.
+       * server.h (gunzip_to_mem): New function proto.
+       * zlib.c (gunzip_to_mem): New function factored from...
+       (gunzip_and_write): ...here.
+
+2005-11-15  Derek Price  <address@hidden>
+
+       * cvs.h (struct entnode, Entnode, struct vers_ts, Vers_TS): Move to...
+       * entries.h: ...this new file and...
+       * vers_ts.h: ...this new file.
+       * entries.c: Include config.h directly.  Validate API.
+       * server.c: Ditto.
+       (server_send_checksum, output_mode_string, server_send_buffer_as_file,
+       server_send_file): New functions factored from...
+       (server_updated): ...here.
+       (server_base_checkout): New stub.
+       * server.h: Include root.h & vers_ts.h in order to add...
+       (server_base_checkout): This new proto.
+
+2005-11-09  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add base.c & base.h.
+       * cvs.h (base_get, base_register, base_deregister): Move protos to...
+       * base.h: ...this new file.
+       * entries.c (base_get, base_register, base_deregister): Move to...
+       * base.c: ...this new file.  Split update_dir & file name out of finfo
+       arg into two args.
+       * edit.c: Update all callers.
+       (edit_file): Try to copy upcoming update-base file as edit
+       base before falling back to the 1.11 way.
+
+2005-11-07  Derek Price  <address@hidden>
+       
+       * sanity.sh (errmsg4): New test for keyword-when-signed warning.
+
+2005-10-31  Derek Price  <address@hidden>
+
+       * rcs.c (contains_keyword): Convert return type to bool.
+
+2005-10-29  Derek Price  <address@hidden>
+
+       * commit.c (check_fileproc): Warn when a signed file contains keywords.
+       * rcs.c (next_keyword): New function factored from...
+       (expand_keyword): ...here.
+       (contains_keyword): New function.
+       * rcs.h (contains_keyword): Prototype new function.
+       * subr.c (file_contains_keyword): New function.
+       * subr.h (file_contains_keyword): Proto for same.
+       * sanity.sh: Compensate for the new warning.
+
+2005-10-28  Derek Price  <address@hidden>
+
+       * sanity.sh: Print a warning when GPG is not being used.
+
+       * sanity.sh (OPENPGP_PHRASE): Only add the trailing EOL when there is
+       content.
+
+2005-10-27  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_checkin): Base64 encode GPG signatures to avoid having
+       tools like grep and diff decide signed files are binary.
+       * sanity.sh: Compensate for new signatures in RCS archive content.
+
+2005-10-19  Derek Price  <address@hidden>
+
+       * sanity.sh: $GPG == `gpg' now when no gpg was found.
+
+       * sanity.sh: Cause GPG to create its option file with a noop command.
+       Allow secret key import during setup.
+
+2005-10-18  Derek Price  <address@hidden>
+
+       * sign.c: #include "wait.h" from GNULIB.
+
+       * filesubr.h: #include <sys/types.h> for ssize_t.
+       * filesubr.c (islink): Add FIXME.
+
+2005-10-16  Derek Price  <address@hidden>
+
+       * sign.c (sign_commits): Base defaults on new HAVE_OPENPGP macro rather
+       than obsolete GPG_PROGRAM.
+
+       * client.c (send_signature, send_fileproc, client_process_import_file):
+       Use new APIs.
+       * cvs.h: Move function prototypes into...
+       * filesubr.h: ...this new header.
+       * hash.c (nodetypestring): Add RCSSTRING.
+       * hash.h (Ntype): Add RCSSTRING.
+       (Node): Add data len field.
+       * rcs.c: Verify interface.
+       (rcsbuf_get_node_type): New function.
+       (RCS_reparsercsfile, RCS_fully_parse, getdelta, RCS_getdeltatext):
+       Handle new RCSSTRING newphrase node type.
+       (RCS_checkin): Generate and save OpenPGP signature when needed.
+       (putrcsfield_proc): Remove FIXME.  Handle new Node type.  Use Node len
+       when available.
+       * server.c (serve_modified): Get sig file name via new API.
+       * sign.c (get_sign_commits): Return false in serve_mode.
+       (get_sigfile_name, have_sigfile, read_signature): New functions.
+       (gen_signature): New function with content originally from...
+       (get_signature): ...this function, which now also handles loading from
+       a sigfile when required.
+       * sign.h (get_sign_commits, get_signature): Add server_active arg.
+       (gen_signature, have_sigfile): New function protos.
+
+       * sign.h (DEFAULT_SIGN_PROGRAM, DEFAULT_SIGN_TEXTMODE): Move to
+       configure.in.
+
+       * cvs.h (BAKPREFIX): Move to...
+       * subr.h (BAKPREFIX): ...this more appropriate location.
+
+       * sanity.sh (crerepos): Remove CVS_CLIENT_LOG set while debugging.
+
+2005-10-14  Derek Price  <address@hidden>
+
+       * sign.h: Protos for new signature API.
+       * sign.c (init_signatures, set_sign_commits, set_sign_template,
+       set_sign_textmode, add_sign_arg, get_sign_commits, get_signature): New
+       signing API.
+       (sign_args_list_to_args_proc, get_signature): Move from...
+       * client.c (sign_args_list_to_args_proc): ...here...
+       (send_signature): ...and here.
+       (send_files): Only accept SEND_SIGNATURES flag to differentiate commit
+       from other callers.
+       (send_signature): Use new signing interface.
+       (client_send_import_file): Send signatures.
+       * client.h (send_files): Update proto.
+       * add.c, admin.c, annotate.c, client.c, diff.c, edit.c, log.c, ls.c,
+       remove.c, status.c, tag.c, update.c, watch.c: Change all callers.
+       * commit.c (commit): Move sign arg handling to...
+       * main.c (main): ...here.
+       * server.c (serve_modified): Save signatures to a temp file.
+       (serve_signature): Send error message on receipt of multiple sigs.
+
+       * rcs.c: Test interface.
+       * rcs.h: Protect against double-inclusion.
+       (struct file_info): Move from...
+       * cvs.h: ...here.  #include "run.h".
+       * subr.c, subr.h: Include "rcs.h" to imporve interface.
+       * run.c: #include "run.h".
+       * run.h: New file.
+
+       * gpg.c: Remove unsightly comments.
+
+       * Makefile.am (cvs_SOURCES): Add gpg.c & gpg.h.
+       * gpg.c, gpg.h: New files.
+       * server.c (sig_buf): New global.
+       (serve_signature): Extract signature correctly & store it.
+       * buffer.c, root.c: #include buffer.h first, to test interface.
+       * buffer.c (buf_read_data): Handle input from nonio (memory) buffers.
+       * buffer.h, root.h: Protect against double inclusion.  #include enough
+       headers to make interface standalone.
+
+2005-10-11  Derek Price  <address@hidden>
+
+       * commit.c (commit_usage), main.c (opt_usage): Describe OpenPGP related
+       options.
+
+       * Makefile.am (cvs_SOURCES): Add sign.c & sign.h.
+       * client.c (sign_args_list_to_args_proc, send_signature): New
+       functions.
+       (struct send_data): Add sign mode and template.
+       (send_fileproc): Send signature.
+       (send_files): Accept sign mode and sign template.
+       * client.h (send_files): Update proto.
+       * add.c, admin.c, annotate.c, client.c, diff.c, edit.c, log.c, ls.c,
+       remove.c, status.c, tag.c, update.c, watch.c: Change all callers.
+       * commit.c (commit): Accept and handle new sign options.
+       * hash.h: Avoid double-inclusion.
+       * main.c (main): Handle new sign options.
+       * root.c (new_cvsroot_t, free_cvsroot_t, parse_cvsroot_t), sign.h
+       (cvsroot_t): Handle new sign method options.
+       * server.c (serve_signature): New stub function.
+       (requests): Add `Signature' request.
+       * sign.c, sign.h: New files.
+       * subr.c (format_cmdline): Handle NULL data.
+       * sanity.config.sh: Set $GPG.
+       * sanity.sh: Set up gpg keys for tests when $GPG is set.
+       (writeproxy*): Compensate for new server requests.
+
+2005-12-07  Derek Price  <address@hidden>
+
+       * client.c (handle_redirect): Give stack control of string key.
+
+       * client.c (start_server), root.c (method_names), root.h (CVSmethod):
+       Handle :extssh: as a kindness to Eclipse users.
+       (Suggestion from Joseph P. Skudlarek <address@hidden>.)
+
+2005-12-07  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (fd_buffer_shutdown): Use error (0, ...) instead of
+       error (1, ...) to avoid infinite loops. (patch #4678)
+       Patch adapted from "Allan L. Bazinet" <address@hidden>
+
+2005-11-30  Mark D. Baushke  <address@hidden>
+
+       [bug #14900] Add 'cvs server' handling for --allow-root
+       * root.c (root_allow_used): New function.
+       * root.h (root_allow_used): Ditto.
+       * server.c (serve_root): Call new function in server mode.
+       * sanity.sh (server2-3): Fix typo in test name.
+       (server2-5, server2-6): New tests for --allow-root feature.
+       (proxy-init): Fix --allow-root instances for primary-wrapper
+       to include the primary and the secondary in the list.
+       (writeproxy-noredirect): Ditto.
+       (writeproxy-ssh-noredirect): Ditto.
+
+2005-11-22  Derek Price  <address@hidden>
+
+       * checkout.c (checkout_proc): Bury sacrificial chicken.
+       * sanity.sh: Update to compensate.
+
+2005-11-18  Derek Price  <address@hidden>
+
+       * update.c (checkout_file): Add FIXME.
+
+2005-11-17  Derek Price  <address@hidden>
+
+       * client.c (update_entries), update.c (update): Restore refetch
+       notices and add two new ones.
+       * sanity.sh: Update to compensate.
+
+2005-11-15  Derek Price  <address@hidden>
+
+       * client.c (update_entries): Only print "U ..." when patches are
+       applied successfully.  Only print patch failed messages for traces.
+       * update.c (update): Share flags with refetch pass.  Never send
+       contents when refetching.  Only print refetching message for traces.
+       Use "U" instead of "P", except for traces.
+       * sanity.sh: Update to compensate.
+
+2005-11-14  Mark D. Baushke  <address@hidden>
+
+       * admin.c (opt_values): New enum for long option values.
+       (short_options): Now in file scope for validation of
+       UserAdminOptions.
+       (long_options): Use opt_value enums for option.value entries.
+       (make_UserAdminOptions): Rewrite.
+       (admin): Use opt_value enumes for long_option cases.
+       Quote the name of the restricted admin group.
+       * mkmodules.c (UserAdminOptions): Add defaults for execute and
+       no-execute.
+
+2005-11-13  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (modes-execute-*): Use $CVSROOT_DIRNAME rather than
+       default text for expected data.
+
+       * admin.c (admin_usage): Fix spelling in help string.
+       Alphabetize long options.
+       (Patch from Alexandros Manoussakis.)
+
+2005-11-12  Mark D. Baushke  <address@hidden>
+
+       * admin.c: Add long option processing.
+       (make_UserAdminOptions): New option for administrative permission
+       of long options.
+       (admin): Use long option processing. Add support for --execute and
+       --no-execute options.   
+       * parseinfo.c (parse_config): Use new make_UserAdminOptions
+       function to process the UserAdminOptions= configuration line.
+       * sanity.sh (modes): Added tests for admin --execute/--no-execute
+       options.
+       (Based on CVS patch #4446 from Alex Manoussakis.)
+
+2005-11-10  Larry Jones  <address@hidden>
+
+       * commit.c (commit): Complain about obsolete -n option if not in
+       server mode.
+
+2005-11-10  Derek Price  <address@hidden>
+
+       * edit.c (mark_up_to_date): Accept update_dir for error messages.
+       Print correct, quoted file name in error message.
+       * edit.h (mark_up_to_date): Update proto to match.
+       * checkin.c, client.c: Update all callers.
+
+2005-11-09  Derek Price  <address@hidden>
+
+       * edit.h: Remove unneeded `extern' from function decls.
+
+       * sanity.sh (pserver-4.2): Accept a "no such sytem user" message when
+       a root attempt is made.
+
+2005-11-07  Derek Price  <address@hidden>
+
+       * edit.c (watch_onoff): Remove unneeded proto.
+
+2005-11-03  Derek Price  <address@hidden>
+
+       * sanity.sh (compression): Elucidate.
+
+2005-10-28  Derek Price  <address@hidden>
+
+       * commit.c (check_fileproc): Don't print conflict marker warning in
+       really quiet mode.
+
+       * sanity.sh (rcslib): Rename some misnamed tests.
+
+       [bug #14840]
+       * sanity.sh (compression): New test for problem fixed below.
+
+       [bug #14840]
+       * zlib.c (compress_bufer_input): Don't assume the number of bytes the
+       caller requested will be available from the stream underlying the
+       compression buffer - the data is compressed and should be shorter by
+       definition.  Improve comment.
+       (Original report from Rahul Bhargava <address@hidden>.)
+
+2005-10-18  Derek Price  <address@hidden>
+
+       Include "wait.h" only as needed.
+       * cvs.h: Remove #include of "wait.h".
+       * run.c, server.c: Add #include "wait.h".
+
+2005-10-16  Brian Murphy  <address@hidden>
+
+       * server.c (check_pam_password): set PAM_RHOST to remote host ip.
+
+2005-10-11  Derek Price  <address@hidden>
+
+       * client.h (SEND_BUILD_DIRS, SEND_FORCE, SEND_NO_CONTENTS,
+       BACKUP_MODIFIED_FILES): Tidy.
+
+2005-10-04  Derek Price  <address@hidden>
+
+       * sanity.sh (diff_u_test, diff_recursive_test): New functions.
+       (directory_cmp): Use GNU diff -ur when possible.
+       (find_tool): Catch stderr output from tests.  Count MARGINAL test
+       results and prefer tools with more PASSes.
+       (*): Replace use of cmp to $diff_u where possbile.
+
+2005-10-04  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (watch6-0): Avoid use of GNU grep -qE extensions for
+       anchored search.
+
+2005-10-04  Derek Price  <address@hidden>
+
+       * sanity.sh (find_tool): Accept tool name for error messages.  Change
+       all callers.
+
+       * run.c: Assume unistd.h.
+
+2005-10-03  Derek Price  <address@hidden>
+
+       * sanity.sh (sshstdio-6): Use diff -u instead of cmp so that errors
+       show up in the automated nightly testing emails.
+
+       * run.c (piped_child): Close original dup'd descriptors.  Add comments.
+
+       * server.c: #include "setenv.h" to eliminate a Solaris warning.
+
+2005-09-30  Larry Jones  <address@hidden>
+
+       * expand_path.c (expand_path): Fix memory leaks.
+
+2005-09-29  Mark D. Baushke  <address@hidden>
+
+       * main.c (main): Simplify commitid creation.
+
+       * main.c (main): Not all hosts support O_NOCTTY for open.
+       Try to use more random data when time() returns -1.
+       
+2005-09-29  Derek Price  <address@hidden>
+
+       * main.c (main): Check for error return from time().
+
+2005-09-29  Paul Eggert  <address@hidden>
+           Derek Price  <address@hidden>
+
+       * client.c (handle_m, handle_e): Remove incomplete workaround for
+       O_NONBLOCK problem; no longer needed because of the fix below.
+       * cvs.h (piped_child): New bool argument saying whether O_NONBLOCK
+       fix is needed.  All uses changed.
+       * rsh-client.c (start_rsh_server): We need the O_NONBLOCK fix,
+       so pass 'true' to piped_child to enable the workaround.
+       * run.c (work_around_openssh_glitch): New function.
+       (piped_child): Use it if the fix is requested.  Avoid call call to
+       vfork with undefined behavior.
+
+2005-09-29  Mark D. Baushke  <address@hidden>
+
+       * main.c (main): Rename N as COMMITID_RAW_SIZE.
+       Use base62 encoding for non-urandom case.
+
+2005-09-29  Derek Price  <address@hidden>
+
+       * buffer.c (fd_buffer_input), client.c (handle_m, handle_e): Use new
+       fd_select in place of select.
+
+       * subr.c: Remove select includes - the sleep functions are now in
+       lib.
+
+2005-09-28  Mark D. Baushke  <address@hidden>
+
+       * main.c (N, RANDOM_BYTES): New constants for base62 conversion.
+       (divide_by): Used in base62 conversion.
+       (convert): Ditto.
+       (main): Set global_session_id using more random data and the
+       current time in base62 if possible, otherwise fallback to the old
+       method.
+
+2005-09-25  Conrad T. Pino  <address@hidden>
+
+       * rcs.c: Use "#ifdef HAVE_FSYNC" just like every where else.
+
+2005-09-25  Conrad T. Pino  <address@hidden>
+
+       * buffer.c client.h socket-client.h:  Remove HAVE_WINSOCK_H macro &
+       change <winsock.h> to <sys/socket.h> include.
+
+       * server.c:  Remove HAVE_WINSOCK_H and <winsock.h> include.
+
+2005-09-25  Derek Price  <address@hidden>
+
+       * rcs.c (rcs_internal_unlockfile): Fsync files before renaming them.
+       Patch from Rahul Bhargava <address@hidden>.
+
+       * cvs.h, filesubr.c, main.c, server.c:
+       s/push_cvs_tmp_dir/push_cvs_temp_dir/.
+
+       * main.c (get_cvs_temp_dir): Use new get_system_temp_dir function.
+       (push_env_temp_dir): Move to...
+       * filesubr.c (push_env_temp_dir): ...here to split from Windows.
+       (get_system_temp_dir): New function.
+       * cvs.h (get_cvs_temp_dir, push_env_temp_dir): Add protos.
+
+       * buffer.c (fd_buffer_input): Fix spelling in header comment block.
+
+2005-09-24  Derek Price  <address@hidden>
+
+       * socket-client.c: Check HAVE_CONFIG_H, not HAVE_CONFIG.
+
+       * socket-client.c, socket-client.h: Minor cleanup.
+
+       * Makefile.am (cvs_SOURCES): Move socket-client.[ch] to...
+       (EXTRA_cvs_SOURCES): ...here to avoid compiling them.
+       * socket-client.c (init_sockaddr), socket-client.h (init_sockaddr):
+       Move to...
+       * client.c (init_sockaddr), client.c (init_sockaddr): ...here.
+
+       * socket-client.c (socket_buffer_input): Avoid overflow problems.
+
+       * socket-client.c: General cleanup.
+
+2005-09-23  Larry Jones  <address@hidden>
+
+       * checkout.c (export_usage): Note that -r requires a tag.
+
+2005-09-22  Derek Price  <address@hidden>
+
+       * classify.c (Classify_File): Correct comment.
+
+2005-09-22  Larry Jones  <address@hidden>
+
+       * patch.c (patch_usage): Document -k option.
+
+2005-09-22  Derek Price  <address@hidden>
+
+       * classify.c (Classify_File): If a file had a conflict and the
+       timestamp hasn't changed, it still has a conflict.  Add comment about
+       how T_MODIFIED could later turn out to have conflict markers and why
+       it should not be checked in this function.
+       * client.c (send_fileproc): Don't send contents for files known to have
+       conflicts unless this is for `cvs diff'.
+       * commit.c (check_fileproc): T_CONFLICT should be handled like
+       T_MODIFIED, since force could be requested.  Simplify logic since
+       T_CONFLICT can now be trusted.
+       * rcs.c (RCS_Checkout): Comment noexec behavior in header block.
+       * server.c (serve_unchanged, serve_is_modified): Handle conflicts.
+       * status.c (status_fileproc): Trust T_CONFLICT to simplify.
+       * subr.c (file_has_conflict): Removed.
+       * subr.h (file_has_conflict): Remove proto.
+       * update.c (update_fileproc): Trust T_CONFLICT.
+       (RegisterMerge): New function factored from...
+       (merge_file, join_file): ...these two functions.
+       * vers_ts.c (time_stamp_server): Handle = conflict timestamps in server
+       entdata.
+       * sanity.sh (files-12): Account for slight behavior improvement.
+       (status, conflicts, mwrap): Account for corrected behavior.
+       (join-readonly-conflict-10): Correct comment.
+       (binfiles-con1b): New test for correct behavior.
+
+       * classify.c (Classify_File): Consolidate redundant conditionals.
+
+2005-09-21  Derek Price  <address@hidden>
+
+       * entries.c: Remove obsolete comment.
+
+2005-09-20  Derek Price  <address@hidden>
+
+       * myndbm.c: #include getdelim.h for Windows.
+
+       * main.c: #include setenv.h for Windows.
+
+2005-09-19  Derek Price  <address@hidden>
+
+       * sanity.sh (modules5-8): Rename...
+       (modules5-8r): ...to this and comment Mac OS X failure.
+       Comment Solaris 9 failure below with a `FIXME?' tag.
+
+       * sanity.sh: Remove previous hack in favor of setting TESTDIR on
+       Solaris (and Mac OS X) until problem is solved correctly.
+
+2005-09-15  Derek Price  <address@hidden>
+
+       * sanity.sh: Use /bin/pwd to verify current dir since Solaris 9 is
+       sometimes resolving symlinked paths.
+
+2005-09-14  Derek Price  <address@hidden>
+
+       * edit.c (edit_usage, unedit_usage, editors_usage), watch.c
+       (watch_usage, watchers_usage): Add quotes and reword for clarity and
+       consistency.
+
+       * edit.c (edit_usage): Add missing syntax.  Reword description for
+       clarity.  Mention default behavior.
+
+2005-09-13  Derek Price  <address@hidden>
+
+       * sanity.sh ($anyusername): Reduce charset to that allowed on Linux.
+
+       * sanity.sh ($anyusername): Make more robust and expand comments.
+       Reported by Mark D. Baushke <address@hidden>.
+
+       * sanity.sh: Split $username into $username & $username8.  Rename
+       $author as $anyusername.
+
+2005-09-12  Derek Price  <address@hidden>
+
+       * sanity.sh (username): Cut $username down to 8 characters when longer,
+       since that is all that appears in output.
+
+2005-09-11  Derek Price  <address@hidden>
+
+       [bug #14504]
+       * main.c (main): Set server_hostname before it is used by
+       gserver_authenticate_connection.
+       (Report from Serguei E. Leontiev <address@hidden>.)
+
+2005-09-08  Larry Jones  <address@hidden>
+
+       * server.c (parseServerOptions): getopt() returns int, not char.
+
+2005-09-07  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_parse): Minor reformatting.
+
+       Close <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14462>.
+       * rcs.c (RCS_parse): Free variable *after* using it for the last time.
+
+2005-09-06  Derek Price  <address@hidden>
+
+       * sanity.sh (tempfile): All CVS temp files start with "cvs".
+
+       * sanity.sh (tempfile): New var.
+       (tempname): Set to $TMPDIR/$tempfile after $TMPDIR is set.
+       (info): s#$TMPDIR/##.
+
+       * rcs.c (RCS_putdtree): Remove unused variable.
+
+2005-09-06  Mark D. Baushke  <address@hidden>
+
+       Close <https://savannah.nongnu.org/bugs/?func=detailitem&item_id=14435>.
+       * rcs.c (RCS_putdtree): Avoid stack overflow which may be
+       possible with excessive recursive calls to RCS_putdtree().
+       (Patch from Serg Masyutin.)
+
+2005-09-06  Derek Price  <address@hidden>
+
+       Close <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14448>.
+       * kerberos-client.c (start_kerberos4_server): Pass new root arg to
+       make_bufs_from_fds.
+       (Patch from <Manuel.Guijarro.AT.cern.ch>.)
+
+       * server.c: Reorganize includes slightly and alphabetize sections.
+
+       * server.c: #include canon-host.h.
+       (gserver_authenticate_connection): Print out canon-host errors.
+       * subr.c: #include canon-host.h.
+       (isThisHost): Print out canon-host errors.
+
+       * parseinfo.c (parse_config): Don't check hostname without client
+       or server support.
+
+       * main.c (main): Set cvs_cmd_name before calling parseServerOptions.
+
+2005-09-05  Derek Price  <address@hidden>
+
+       * cvs.h (Tmpdir): Remove global decl.
+       (get_cvs_tmp_dir, push_env_tmp_dir): New protos.
+       * filesubr.c (cvs_temp_file): Use get_cvs_tmp_dir.
+       * main.c (Tmpdir): Remove global.
+       (tmpdir_cmdline, tmpdir_env): New globals.
+       (get_cvs_tmp_dir, push_env_tmp_dir): New functions.
+       (main): Discard most tmpdir overhead in favor of new globals and
+       functions.
+       * parseinfo.c (parse_config): Parse TmpDir.
+       * sanity.sh (config4): New tests.
+       * server.c (serve_root): Set env TMPDIR after parsing config.  Create
+       tmpdir here instead of...
+       (serve_co, server): ...either of thse locations.
+       (server_cleanup): Use new function in favor of obsolete Tmpdir.
+
+       * sanity.sh (config2): Don't overwrite potentially significant config.
+
+       * sanity.sh (info): Use $tempfile instead of reproducing the regex.
+
+       * sanity.sh (info): Accept `.' in temp file names.
+
+       * main (main): Set the actual PID, not a pointer to a string.
+
+2005-09-04  Derek Price  <address@hidden>
+
+       * sanity.sh (config3): Generalize.
+
+       * main.c (main), server.c (serve_root, switch_to_user): Replace putenv
+       with GNULIB setenv.
+       * sanity.config.sh.in (HAVE_PUTENV): Remove.
+       * sanity.sh (env): Remove reference to $HAVE_PUTENV.
+
+       * sanity.sh (tests): Add config2 & config3.
+
+       * server.c (isSamePath, isThisHost): Move to...
+       * subr.c (isSamePath, isThisHost): ...here.
+       * subr.h (isSamePath, isThisHost): Add protos.
+       * parseinfo.c (parse_config): Handle [rootspec] syntax.
+       * main.c (main): Always set server_hostname.
+       * sanity.sh (config3): New tests for same.
+
+       * server.c (gserver_authenticate_connection): Output hostname in
+       error message.
+
+       * server.c (isThisHost): Fix typo.
+
+       * server.c (isThisHost, gserver_authenticate_connection): Simplify
+       using canon_host().
+
+       * root.c (free_cvsroot_t): Update header comment.
+
+       * root.c (new_cvsroot_t): directory is not client-specific.
+       (free_cvsroot_t): Declare static.
+       * root.h (free_cvsroot_t): Remove proto.
+       * server.c (server_init): Don't free cvsroot_t when finished with it.
+
+2005-09-03  Derek Price  <address@hidden>
+
+       * root.h (cvsroot_t->isremote): Update comment.
+
+       * history.c (read_hrecs_file): Suppress signed/unsigned char warning.
+
+       * root.h (cvsroot_t->isremote): Declare bool.
+       * root.c (new_cvsroot_t): Initialize isremote to false instead of 0.
+
+       * add.c (add_usage): Standardize usage message somewhat.
+
+2005-09-02  Larry Jones  <address@hidden>
+
+       * commit.c (checkaddfile): Improve error messages for lock_RCS failure.
+       * release.c (release): Improve error message for pclose failure.
+
+       * root.h (struct cvsroot_s): Always declare isremote to simplify
+       other code.  Simplify referencing code.
+       * root.c (new_cvsroot_t): Always initialize isremote.
+       * server.h: Always declare server_active to simplify other code.
+       Simplify referencing code.
+       * server.c: Always define server_active.
+
+2005-09-02  Larry Jones  <address@hidden>
+
+       * parseinfo.c (parse_config): Variable declarations must precede
+       executable code for pre-C99 compilers.  Pass correct line number
+       variable to expand_path.
+
+2005-09-01  Derek Price  <address@hidden>
+
+       * recurse.c: Update bug report email address.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * cvs.h (expand_path): Update proto.
+       * expand_path.c (expand_variable): Accept and use cvsroot arg inplace
+       of global.
+       (expand_path): Accept and pass through cvsroot arg.
+       * main.c (main): Prescan args for config path before config options are
+       used.  Pass config path on as needed.  Update comment. 
+       * modules.c (do_module): Update expand_path call.
+       * parseinfo.ci (Parse_Info): Ditto.
+       (allowed_config_prefixes): New global.
+       (parse_config): Accept configPath arg, update expand_path calls, and
+       expand LockDir path.
+       * parseinfo.h (parse_config): Update proto.
+       * root.c (root_allow_add, get_root_allow_config): Accept new configPath
+       arg and pass through to parse_config.
+       * root.h (root_allow_add, get_root_allow_config): Update protos.
+       * server.c (gConfigPath, server_usage): New globals.
+       (parseServerOptions): New function.
+       (server): Use new usage var.
+       (pserver_authenticate_connection): Update get_root_allow_config call.
+       * server.h (parseServerOptions): New proto.
+       * wrapper.c (wrap_add): Update expand_path calls.
+       * sanity.sh (server): New tests for setting config file path.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * sanity.sh (close-stdout): Remove archive dir when done.
+
+2005-08-31  Larry Jones  <address@hidden>
+
+       * import.c (import_descend): Lock repository directory during import.
+
+2005-08-31  Derek Price  <address@hidden>
+
+       * server.c (isSamePath): Compare args rather than assuming values.
+
+2005-08-29  Derek Price  <address@hidden>
+
+       Add %{sV} format string to verifymsg script.
+       * logmsg.c (do_verify): Accept change list arg, pass through to...
+       (verifymsg_proc): ...here, to pass through to format_cmdline.
+       * commit.c (commit_fileproc, commit_direntproc), import.c (update):
+       Update all callers of do_verify.
+       * cvs.h (do_verify): Update proto.
+       * sanity.sh (info): Test new verifymsg format strings.
+
+2005-08-09  Derek Price  <address@hidden>
+
+       * sanity.sh: Remove debugging echo.
+       (watch6, watch6-0): Clean up properly.
+
+2005-08-03  Jim Hyslop <address@hidden>
+
+       * edit.c, watch.c, watch.h, sanity.sh: fixed problems with watch not
+       setting default attributes, when directory specified.
+
+2005-07-20  Derek Price  <address@hidden>
+
+       * main.c: s/cvshome.org/nongnu.org.etc.../.
+
+2005-07-12  Derek Price  <address@hidden>
+
+       * buffer.c, buffer.h, client.h, expand_path.c, history.c, myndbm.h,
+       release.c: Add copyright notices.
+
+2005-07-12  Derek Price  <address@hidden>
+
+       * client.c: Update fwrite usage to use size & count in the standard
+       order.
+
+2005-07-11  Derek Price  <address@hidden>
+
+       * buffer.c, buffer.h, client.h, expand_path.c, history.c, myndbm.h,
+       release.c: Update license notices.
+
+2005-06-28  Derek Price  <address@hidden>
+
+       * server.c (serve_co): Remove obsolete support for Repository request.
+
+2005-06-10  Derek Price  <address@hidden>
+
+       * filesubr.c, ignore.c, import.c, vers_ts.c: Include "lstat.h".
+
+2005-06-10  Derek Price  <address@hidden>
+
+       * logmsg.c (logmsg_list_to_args_proc): Add format character for
+       destination tag.
+       (Original patch from Todd Vierling <address@hidden>).
+
+       * tag.c (pretag_list_to_args_proc): Likewise.
+       (check_fileproc): Set destination tag name.
+       (tag_delproc): Delete destination tag name.
+       * sanity.sh (info, taginfo): Test new format strings.
+
+2005-06-08  Derek Price  <address@hidden>
+
+       * parseinfo.c: Restore comparison to NULL in assignment within
+       conditional to placate non-GNU compilers.  Eliminate assignments in
+       conditionals where possible by GNU coding standards.  Eliminate other
+       comparisons to NULL where possible.
+       (Parse_Info): Make int a true bool.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * client.c (force_gzip): New static global.
+       (handle_force_gzip): New function.
+       (responses): Add `Force-gzip'.
+       (start_server): Turn on encryption and compression before potentially
+       sending other rooted requests.  Turn on compression when requested by
+       the user or the server.
+       * main.c (opt_usage):  Note that -z<level> *requests* compression
+       <level> from the server.
+       * parseinfo.c (new_config):  Initialize MaxCompressionLevel.
+       (parse_config): Parse MinCompressionLevel & MaxCompressionLevel.
+       * parseinfo.h (struct config): Add MinCompressionLevel &
+       MaxCompressionLevel.
+       * server.c (pending_warning_text):  New static global.
+       (print_pending_error): Print pending warnings too.
+       (warning_pending): New macro.
+       (alloc_pending_internal): New function with much content...
+       (alloc_pending): ...previously from here.
+       (alloc_pending_warning): New function.
+       (server_root, serve_gzip_contents, gzip_stream): Force gzip_level into
+       configured restrictions.
+       (serve_command_prep): Print pending errors.
+       (requests): Make `Gzip-stream', `gzip-file-contents',
+       `Kerberos-encrypt', `Gssapi-encrypt', & `Gssapi-authenticate' requests
+       rootless to allow them before compression starts.
+       (serve_valid_requests): Send `Force-gzip' response when needed.
+       (server): Abort if a rootless compression request forced compression
+       outside restricted levels.
+       * zlib.c (struct compress_buffer, compress_buffer_initialize): Store
+       compression level.
+       (compress_buffer_output): Reset compression level when global
+       gzip_level has changed.
+       * sanity.sh (config2): New tests for compression restrictions.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * zlib.c (compress_buffer_input): Update comment.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * error.c (error): Correct spelling and grammar in comment.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * modules.c (my_module), wrappers.c (wrap_add): Use new expand_path
+       API.
+
+2005-06-03  Derek Price  <address@hidden>
+
+       * cvs.h (expand_path): Rearrange args and use bool for formatsafe flag.
+       * expand_path.c: Globally: Remove init of globals to NULL by C89,
+       reformat to CVS conventions, remove unnecessary comparisons to NULL and
+       0, & remove unnecessary typecasts.
+       (expand_variable): Remove proto and move function above first use.
+       Make return value const.
+       (expand_path): Don't refer to var when contents are known.  Rearrange
+       args per cvs.h changes.  Improve header comment block.
+       * parseinfo.c (Parse_Info): Use new expand_path API.
+
+2005-06-02  Derek Price  <address@hidden>
+
+       * client.c: Don't set NULL for globals by C89.  Globally remove
+       comparisons to NULL or replace with !.  Similarly remove or replace
+       comparisons of strcmp and strncmp return value to 0.  Remove some
+       unneeded braces around single-element blocks.
+       (handle_*): Remove unecessary protos.
+       (handle_notified, notified_a_file): Move up before first use.
+
+2005-06-02  Derek Price  <address@hidden>
+
+       * sanity.sh (config): Simplify cleanup.
+
+2005-06-02  Derek Price  <address@hidden>
+
+       * zlib.c (compress_buffer_input): Don't request more bytes from the
+       underlying buffer than asked for.
+       (compress_buffer_shutdown_input): Don't attempt to read EOF from the
+       client during shutdown.  It might never be sent.
+       * sanity.sh (abspath2): Test for this.
+
+2005-05-31  Derek Price  <address@hidden>
+
+       * rcscmds.c (call_diff_argc_allocated): Rename to...
+       (call_diff_arg_allocated): ...to match similar usage in other files.
+
+2005-05-31  Derek Price  <address@hidden>
+       for Alexander Taler <address@hidden>
+
+       * rcscmds.c: Change type of call_diff_argc_allocated from int to
+       size_t, to match the prototype of run_add_arg_p().  This fixes a
+       bus error in OpenBSD 3.6 sparc64.
+
+2005-05-27  Derek Price  <address@hidden>
+
+       * client.c (send_arg): Make arg const.  Remove unnecessary copy to
+       buffer.
+       (send_option_string): Rename to...
+       (send_options): ...this and accept argc/argv in place of string.
+       * client.h: Update protos to match the changes to client.c.
+       * cvs.h (RCS_exec_rcsdiff, diff_exec): Update protos.
+       (run_add_arg_p, run_arg_free_p): New protos.
+       * diff.c (opts, opts_allocated): Replace with...
+       (diff_argv, diff_argc, diff_arg_allocated): ...these.
+       (add_diff_args): New convenience function.
+       (diff): Use new constructs and APIs.
+       * patch.c (patch_fileproc, RCS_checkin, RCS_delete_revs), rcscmds.c
+       (call_diff_add_arg, call_diff_setup, RCS_merge, RCS_exec_rcsdiff,
+       diff_exec, RCS_output_diff_options), update.c (patch_file): Use new
+       APIs.
+       * run.c (run_add_arg_p, run_arg_free_p): New functions.
+       (run_argc_allocated): Make size_t.
+       (run_setup, run_add_arg): Use new functions.
+       * sanity.sh: Accomodate above changes.
+       (rcslib-diffrgx-3): Slip in test for space splitting.
+
+2005-05-26  Derek Price  <address@hidden>
+
+       * subr.c (isabsolute), subr.h (isabsolute): Remove this function.
+       * root.c: Likewise, plus some reformatting.
+       * checkout.c, client.c, find_names.c, import.c, modules.c, parseinfo.c,
+       repos.c, root.c, server.c, subr.c: s/isabsolute/ISABSOLUTE/.
+
+2005-05-26  Derek Price  <address@hidden>
+
+       * cvs.h: Move "system.h" include before GNULIB includes.  Move some
+       GNULIB includes from "system.h".
+
+2005-05-26  Conrad T. Pino <address@hidden>
+
+       * buffer.c, buffer.h: Add & use typedefs for function pointer arguments
+       and struct buffer function pointers.  New typedefs are useful in casts.
+       * socket-client.c: Function pointers passed to buf_initialize use size_t
+       not int arguments.  buf_initialize warnings are gone from Windows build.
+
+2005-05-24  Derek Price  <address@hidden>
+
+       * client.c, entries.c, filesubr.c, hardlink.c, ignore.c, import.c,
+       lock.c, logmsg.c, mkmodules.c, rcs.c, rcscmds.c, server.c, subr.c,
+       update.c, vers_ts.c: s/CVS_STAT/stat/ & s/CVS_LSTAT/lstat/.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * filesubr.c (xresolvepath): Move to...
+       * subr.c (xcanonicalize_file_name): ...here and rename.  Use new
+       GNULIB canonicalize module.
+       * cvs.h (xresolvepath): Move proto...
+       * subr.h (xcanonicalize_file_name): ...here.
+       * checkout.c (safe_location), server.c (isSamePath): Use new function
+       name.
+
+2005-05-23  Derek Price  <address@hidden>
+
+       * sanity.sh (rcslib-symlink-10): Accept empty result due to broken glob
+       in glibc 2.3.5.
+
+2005-05-18  Derek Price  <address@hidden>
+
+       * sanity.sh (config-9): Split to local/remote tests to avoid unportable
+       expr characters.
+
+2005-05-17  Derek Price  <address@hidden>
+
+       * sanity.sh: Use a predictable umask.
+
+2005-05-13  Derek Price  <address@hidden>
+
+       * login.c (password_entry_parseline): Placate gcc -Wall.
+
+2005-05-11  Derek Price  <address@hidden>
+
+       * cvs.h (find_files): New proto.
+       * find_names.c (find_files, strip_rcsext): New functions.
+       (find_rcs): Make arg const.  Use new find_files.  Improve header
+       comment block.
+       * history.c (histfile): Remove global.
+       (get_history_log_name): New function.
+       (history, history_write): Use new functions.
+       (read_hrecs_file): New function containing most content from...
+       (read_hrecs): ...this function, which now accepts a file list and calls
+       read_hrecs_file once for each file.
+       * parseinfo.c (parse_config): Parse HistoryLogPath & HistorySearchPath.
+       * parseinfo.h (struct config): Add HistoryLogPath & HistorySearchPath.
+       * sanity.sh (basic2-64): Remove obsolete comment.
+       (config): Test new history options.
+       (crerepos): Cleanup.
+
+2005-05-09  Derek Price  <address@hidden>
+
+       * error.c (error): Avoid unportable calls to vsyslog.
+
+2005-05-09  Derek Price  <address@hidden>
+
+       * history.c (history_write): Add FIXME.
+
+2005-05-09  Derek Price  <address@hidden>
+
+       * hash.c (removenode, mergelists): New function.
+       (delnode): Use removenode.
+       * hash.h (mergelists): New proto.
+
+2005-05-04  Derek Price  <address@hidden>
+
+       * error.c (error): Avoid recursion and syslog the problem.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * tag.c (is_in_val_tags): Remove unnecessary existance checking for the
+       val-tags file and just rely on open() to create it when necessary.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * tag.c (tag_check_valid): Don't verify the_val_args.found when it is
+       not initialized.
+
+2005-05-03  Derek Price  <address@hidden>
+
+       * add.c: Update comment to include the -k option.  This resolves issue
+       #226 on cvshome.org.
+
+2005-05-02  Derek Price  <address@hidden>
+
+       Remove unnecessary level of indirection.
+       * lock.c (L_HISTORY_LOCK, L_VAL_TAGS_LOCK): Remove macros.
+       (internal_lock, internal_clear_lock): Accept lock as argument.
+       (history_lock, clear_history_lock, val_tags_lock, clear_val_tags_lock):
+       Replace old macro arg with an actual lock pointer.
+
+2005-05-02  Derek Price  <address@hidden>
+
+       * lock.c (internal_lock, internal_clear_lock): Add protos.
+       (history_lock, val_tags_lock): Return the chartered true/false status.
+
+2005-05-02  Derek Price  <address@hidden>
+
+       * cvs.h (CVSHISTLCK): Rename macro to...
+       (CVSHISTORYLCK): ...this.
+       (CVSVALTAGSLCK): New macro.
+       (val_tags_lock, clear_val_tags_lock): New functions.
+       * lock.c (global_val_tags_lock): New global.
+       (Lock_Cleanup): Clean up after val-tags lock if necessary.
+       (L_HISTORY_LOCK, L_VAL_TAGS_LOCK): New local macros.
+       (internal_lock, val_tags_lock, clear_val_tags_lock): New functions.
+       (history_lock): Use new internal function.
+       * tag.c (is_in_val_tags, add_to_val_tags): New functions using the
+       write lock for val-tags and factored from...
+       (tag_check_valid): ...this function.
+       * sanity.sh (lockfiles-22): Add val-tags lock test.
+
+2005-04-30  Mark D. Baushke  <address@hidden>
+
+       * lock.c (global_readlock, global_writelock, global_history_lock):
+       Add missing alternatives for non-LOCK_COMPATIBILITY initialization.
+
+2005-04-28  Derek Price  <address@hidden>
+
+       * cvs.h (history_lock, clear_history_lock): New protos.
+       * lock.c (struct lock): Add lockdirname.
+       (global_history_lock): New global.
+       (global_read_lock): Initialize.
+       (lock_name): Handle const args.
+       (lock_simple_remove): Factor out code in favor of clear_lock call.
+       (set_lock): Handle variable lockdirname.
+       (lock_filesdoneproc): Set new lockdirname.
+       (history_lock, clear_history_lock): New functions.
+       (clear_lock): Avoid segfault on missing lock.
+       (Lock_Cleanup): Clean up history locks when necessary.
+       * history.c (history_write): Use new lock.
+       * sanity.sh (lockfiles-20): Test new lock.
+
+2005-04-28  Derek Price  <address@hidden>
+
+       * sanity.sh (lockfiles): Port some locking tests over from 1.12.x.
+
+2005-04-28  Derek Price  <address@hidden>
+
+       * lock.c (clear_lock): Improve comment.
+
+2005-04-28  Derek Price  <address@hidden>
+
+       * lock.c (struct lock): Store lockdir name.
+       (masterlock): Remove global.
+       (remove_lock_files, clear_lock, set_lock): Update to compensate.
+
+2005-04-25  Mark D. Baushke  <address@hidden>
+
+       * server.c: Add support for <pam/pam_appl.h> to allow
+       --enable-pam to work on MacOSX 10.2 and newer.
+       (Pach from Moriyoshi Koizumi <address@hidden>.)
+
+2005-04-25  Derek Price  <address@hidden>
+
+       * mkmodules.c (mkmodules): Remove `#if 0' and reformat comment.
+
+2005-04-22  Mark D. Baushke  <address@hidden>
+
+       * expand_path.c (expand_variable): Add SESSIONID and COMMITID
+       internal variables. Both return the unique global session id of
+       the CVS process. Passing this information to administrative
+       triggers seems reasonable. (The same feature exists in CVSNT and
+       the names were chosen to be the same as the CVSNT names.)
+
+       * sanity.sh (info): Add a test for $COMMITID and $SESSIONID.
+
+2005-04-20  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (rcs4): Fix a typo.
+
+2005-04-20  Derek Price  <address@hidden>
+
+       * sanity.sh (rcs5): Minor cosmetic change.
+
+2005-04-20  Derek Price  <address@hidden>
+
+       * sanity.sh (tests): Add rcs4.
+       (rcs5): Add comments.
+
+2005-04-20  Derek Price  <address@hidden>
+
+       * rcs.c (expand_keywords): Avoid buffer overflow.
+       (Original patch from Stewart Brodie <address@hidden>.)
+
+       * sanity.sh (rcs5): New tests for the above.
+
+2005-04-08  Derek Price  <address@hidden>
+
+       * edit.c (edit_fileproc, unedit_fileproc): s/GMT/-0000/.
+       * rcs.c (RCS_getrevtime): Ditto, & replace a sprintf into a static
+       buffer with an Xasprintf which creates a dynamic one.
+       * sanity.sh: Update tests to compensate.
+       (Original bug report from Ian Abbott <address@hidden>.)
+
+2005-03-26  Mark D. Baushke  <address@hidden>
+
+       * checkout.c (checkout_proc): Use Xasprintf/xstrdup instead of
+       xmalloc/strcpy+strcat.
+
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (linevector_add): Use xnrealloc.
+       * server.c (serve_argument): Ditto.
+
+2005-03-22  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (linevector_copy): Use xtimes in argument.
+
+       * patch.c (patch): Remove dead code.
+
+       * lock.c (set_readlock_name): Use Xasprintf instead of
+       xmalloc/sprintf.
+       (lock_exists, set_promotable_lock, lock_wait): Ditto.
+       (lock_obtained, lock_dir_for_write): Ditto.
+       * log.c (rlog_proc): Ditto.
+
+       * ignore.c (ign_dir_add): Use xnrealloc.
+       * modules.c (save_d): Ditto.
+       * rcs.c (linevector_copy): Ditto.
+
+       * add.c (add): Use xstrdup instead of xmalloc/strcpy.
+       * client.c (client_process_import_file): Ditto.
+       * kerberos4-client.c (start_kerberos4_server): Ditto.
+       * logmsg.c (verifymsg_proc): Ditto.
+       * log.c (log_expand_revlist): Ditto.
+       * patch.c (patch_fileproc): Ditto.
+       * rcs.c (RCS_tag2rev, RCS_nodeisbranch, RCS_getbranch): Ditto.
+       (RCS_getdatebranch, expand_keywords, RCS_addbranch): Ditto.
+       (RCS_checkin): Ditto.
+       * remove.c (remove_fileproc): Ditto.
+
+2005-03-18  Derek Price  <address@hidden>
+
+       * server.c: Reindent pragmas.
+       (become_proxy): Add parentheses for -Wall.
+
+2005-03-18  Derek Price  <address@hidden>
+
+       * error.c (error): Simplify using vasnprintf.
+
+2005-03-17  Mark D. Baushke  <address@hidden>
+
+       * admin.c (postadmin_proc): Cast NULL when it is an argument to
+       stdarg function to ensure it is the correct type.
+       * commit.c (precommit_proc): Ditto.
+       * edit.c (notify_proc): Ditto.
+       * fileattr.c (postwatch_proc): Ditto.
+       * logmsg.c (logfile_write, verifymsg_proc): Ditto.
+       * server.c (prepost_proxy_proc): Ditto.
+       * subr.c (cmdlineescape): Ditto.
+       * tag.c (posttag_proc): Ditto.
+       (Thanks to a report from Derek Price <address@hidden>.)
+       
+2005-03-17  Derek Price  <address@hidden>
+
+       * rcs.h (RCSNode): Improve comment.
+       * rcs.c (RCS_head): Ditto, plus gratuitous reformatting.
+
+2005-03-17  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_deltas): Use rcs->print_path.
+
+2005-03-17  Derek Price  <address@hidden>
+
+       * login.c (password_entry_parseline): Avoid using uninitialized
+       variable.
+       * rcs.c (RCS_deltas): Avoid buffer overflow.
+       (RCS_checkout): Avoid using uninitialized loglen.
+       * patch.c (patch_fileproc): Free original pointer, not one that may
+       have been incremented.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+2005-03-17  Derek Price  <address@hidden>
+
+       * commit.c (checkaddfile): Avoid dereferencing a NULL pointer in
+       response to a rare error.
+       * admin.c (admin_fileproc), log.c (log_expand_revlist), mkmodules.c
+       (checkout_file), rcs.c (RCS_getdate, RCS_deltas, RCS_findlock_or_tip,
+       RCS_tag2rev): Avoid dereferencing NULL pointer.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+2005-03-17  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_reparsercsfile): Avoid memory leak.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+2005-03-17  Derek Price  <address@hidden>
+
+       * log.c (log_expand_revlist): Suppress message and not error handling
+       when really_quiet.
+
+2005-03-16  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (fd_buffer_shutdown): Replace (int *) 0 with NULL.
+       * server.c (do_cvs_command): Ditto.
+
+       * client.c (update_entries): Use xnmalloc.
+
+       * checkin.c (Checkin): Replace (char *) 0 with NULL.
+       * patch.c (patch_fileproc): Ditto.
+       * update.c (update_fileproc): Ditto.
+       * no_diff.c (No_Difference): Ditto.
+       * patch.c (patch_fileproc): Ditto.
+       * rcscmds.c (call_diff_setup, call_diff_add_arg): Ditto.
+
+       * update.c (join_file): Replace (RCSCHECKOUTPROC)0 with NULL.
+       * rcs.c (RCS_checkin, RCS_cmp_file, RCS_delete_revs) 
+       (RCS_delete_revs): Ditto.
+       * rcscmds.c (RCS_merge, RCS_exec_rcsdiff): Ditto.
+       
+       * annotate.c, checkin.c, classify.c, fileattr.c, find_names.c,
+       hash.c, lock.c, login.c, logmsg.c, main.c, modules.c, myndbm.c,
+       no_diff.c, patch.c, rcs.c, rcscmds.c, remove.c, server.c,
+       status.c, subr.c, tag.c, update.c, vers_ts.c: Avoid casting NULL.
+
+2005-03-17  Derek Price  <address@hidden>
+
+       * client.c (call_in_directory): Put function call after var decls.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * client.c (call_in_directory), commit.c (commit_filesdoneproc), log.c
+       (log_expand_revlist, log_version), logmsg.c (logfile_write), modules
+       (my_module), no_diff.c (No_Difference), parseinfo.c (Parse_Info), rcs.c
+       (RCS_deltas, RCS_checkin, RCS_addbranch, do_locks, do_symbols),
+       rcscmds.c (RCS_merge), root.c (parse_cvsroot, normalize_cvsroot),
+       update.c (merge_file): Verify assumptions via assertions.
+       (Thanks to (probably) incorrect reports from Alen Zukich
+       <address@hidden>.)
+
+2005-03-16  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (RCS_check_kflag): Use Xasprintf instead of
+       sprintf/xstrdup.
+
+       * mkmodules.c (checkout_file): Use Xasprintf instead of
+       xmalloc/strcpy+strcat.
+       * wrapper.c (wrap_unparse_rcs_options): Ditto.
+       (wrap_rcsoption): Ditto.
+
+       * subr.c (getcaller): Use Xasprintf instead of sprintf/xstrdup.
+
+       * history.c (history): Use Xasprintf instead of xmalloc/sprintf.
+       * lock.c (lock_name, set_lockers_name): Ditto.
+       * main.c (cmd_synonyms, main): Ditto.
+       * mkmodules.c (rename_rcsfile, init): Ditto
+       * modules.c (cat_module): Ditto.
+       * parseinfo.c (Parse_Info): Ditto.
+       * rcscmds.c (diff_exec, RCS_output_diff_options): Ditto.
+       * recurse.c (start_recursion, do_dir_proc): Ditto.
+       * remove.c (remove_fileproc): Ditto.
+       * repos.c (Name_Repository): Ditto.
+       * root.c (Name_Root, Create_Root): Ditto.
+       * status.c (status_fileproc, tag_list_proc): Ditto. 
+       * wrapper.c (wrap_setup, wrap_tocvs_process_file): Ditto.
+
+       * hash.c (sortlist): Use xnmalloc.
+       * main.c (cmd_synonyms): Ditto.
+       * server.c (cvs_pam_conv): Ditto.
+
+       * create_adm.c (Create_Admin): Clean up use of Xasprintf/xstrdup.
+       * entries.c (WriteTag, base_walk): Ditto.
+       * modules.c (my_module): Ditto.
+
+       * wrapper.c (wrap_fromcvs_process_file): Use Xasprintf instead of
+       xmalloc/sprintf and clean up control flow.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * history.c (history_write): Remove test that always evaluates to
+       false.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * server.c (become_proxy): Close pipe to primary when pipe from it
+       closes.
+
+2005-03-16  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (debug-log-nonfatal): Only set CVS_CLIENT_LOG to the
+       old value if it was previously set.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * server.c (create_adm_p, serve_entry), tag.c (rtag_proc): Avoid memory
+       leaks.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * logmsg.c (do_verify): Don't check for NULL return from xfopen().
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * sanity.sh (debug-log-nonfatal): New test.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * sanity.sh (writeproxy-ssh-noredirect): Don't unconditionally create
+       a primary debug log.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * cvs.h (open_file): Move proto...
+       * subr.h (xfopen): ...here and rename.
+       * filesubr.c (open_file): Move function...
+       * subr.c (xfopen): ...here, with additional commenting and minor
+       cosmetic changes.
+       * add.c, checkout.c, client.c, cvsrc.c, edit.c, entries.c, filesubr.c,
+       logmsg.c, mkmodules.c, modules,c, patch.c, root.c, subr.c:
+       s/open_file/xfopen/.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * log-buffer.c (setup_logfiles): Failure to open a debug log file
+       should be non-fatal.
+
+2005-03-16  Derek Price  <address@hidden>
+
+       * server.c (cvs_outerr): Quote error text in syslog messages.
+
+2005-03-15  Mark D. Baushke  <address@hidden>
+
+       * history.c (select_hrec): Avoid possible memory leak.
+
+2005-03-15  Derek Price  <address@hidden>
+
+       * patch.c (patch_proc): Avoid memory leak.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+2005-03-12  Mark D. Baushke  <address@hidden>
+
+       * server.c (receive_partial_file): Use ssize_t to deal with < 0
+       return value from write().
+
+2005-03-12  Mark D. Baushke  <address@hidden>
+
+       * history.c (save_file): Bug fix from last change.
+
+2005-03-11  Mark D. Baushke  <address@hidden>
+
+       * update.c (get_linkinfo_proc): Use Xasprintf instead of
+       xmalloc/sprintf.  Gratuitous reformatting.
+       (update_ignproc, update_dirent_proc, checkout_file): Ditto.
+       (patch_file, merge_file, join_file): Ditto.
+       * modules.c (open_module): Ditto.
+
+       * modules (my_module): Use Xasprintf instead of xmalloc/sprintf
+       and avoid possibility of trying to free(NULL).
+
+       * subr.c (backup_file): Use Xasprintf instead of xmalloc/sprintf.
+       (cmdlinequote): Use Xasprintf instead of xmalloc/strcat+strlen.
+       * modules.c (my_module): Ditto.
+
+       * client.c (handle_module_expansion): Use xnmalloc, xnrealloc,
+       and xstrdup in place of xmalloc, xrealloc, and xmalloc/strcpy.
+       (start_server): Do not assume gzip_level precision encoding.
+       (send_modified): Do not assume 1024 bytes is sufficient for
+       a temporary filename.
+
+       * modules.c (my_module): Use xnmalloc and xnrealloc. Gratuitous
+       reformatting.
+       * subr.c (line2argv): Ditto.
+
+2005-03-11  Mark D. Baushke  <address@hidden>
+
+       * modules.c (my_module): Protect against free (NULL) code path.
+
+2005-03-11  Derek Price  <address@hidden>
+
+       * annotate.c (rannotate_proc), fileattr.c (fileattr_write), rcs.c
+       (RCS_deltas), server.c (check_repository_password), update.c (update):
+       Avoid memory leaks.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+2005-03-10  Derek Price  <address@hidden>
+
+       * diff.c (diff_fileproc): Remove unnecessary check for NULL.
+
+2005-03-10  Mark D. Baushke  <address@hidden>
+
+       * commit.c: Gratuitous reformatting.
+       * entries.c: Ditto.
+       * import.c (import, import_descend): Ditto.
+
+       * commit.c (commit): Use xnmalloc. Gratuitous reformatting.
+       * history.c (save_user, save_file, save_module, read_hrecs): Ditto.
+       * ignore.c (ign_add): Ditto.
+
+       * hardlink.c (lookup_file_by_inode): Use Xasprintf instead of
+       xmalloc/sprintf.  Gratuitous reformatting.
+       (update_hardlink_info, list_linked_files_on_disk): Ditto.
+       (find_checkedout_proc): Ditto.
+       * history.c (history, history_write, save_file): Ditto.
+       (select_hrec): Ditto. 
+       * ignore.c (ign_setup, ignore_files): Ditto.
+       * import.c (process_import_file, import_descend_dir): Ditto.
+
+       * import.c (import_descend_dir): Use Xasprintf instead of
+       xmalloc/strcpy+strcat+strcat.
+
+       * history.c (read_hrecs): Make function argument a const.
+       
+2005-03-10  Derek Price  <address@hidden>
+
+       * fileattr.c (fileattr_read): Only eat a newline when it really is a
+       newline.
+
+2005-03-10  Mark D. Baushke  <address@hidden>
+
+       * zlib.c: Include "pagealign_alloc.h".
+
+2005-03-09  Derek Price  <address@hidden>
+
+       * add.c (add, add_directory), buffer.c (allocate_buffer_datas),
+       client.c (update_entries), commit.c (checkaddfile), entries.c
+       (Entries_Open), fileattr.c (fileattr_read), ignore.c (ign_add),
+       import.c (import), main.c (main), parseinfo.c (parse_config), rcs.c
+       (RCS_reparsercsfile, RCS_getbranchpoint, RCS_checkout,
+       RCS_delete_revs, apply_rcs_changes): Avoid memory leaks.
+       (Thanks to report from Alen Zukich <address@hidden>.)
+
+       * hardlink.c, hardlink.h: Avoid compiling entire contents of these
+       files w/o preserve permissions support.
+
+2005-03-09  Mark D. Baushke  <address@hidden>
+
+       * history.c (history, save_file): Cleanup the API to match the
+       comments.
+
+2005-03-08  Derek Price  <address@hidden>
+
+       * rcs.c: Define MAP_FILE & MAP_FAILED when necessary.
+
+2005-03-08  Derek Price  <address@hidden>
+
+       * zlib.c (compress_buffer_input): Use pagealign_xalloc when allocating
+       buffer datas.
+       (compress_buffer_output, compress_buffer_flush,
+       compress_buffer_shutdown_output): Don't assume that BUFFER_DATA_SIZE is
+       a constant.
+       (Thanks to report from Larry Jones <address@hidden>.)
+
+2005-03-08  Larry Jones  <address@hidden>
+
+       * release.c (release): Remove unneeded code.
+
+2005-03-07  Conrad T. Pino  <address@hidden>
+
+       * buffer.h (buf_free_data): Compile with proxy disabled.
+       (Thanks to report from Larry Jones <address@hidden>.)
+
+2005-03-07  Mark D. Baushke  <address@hidden>
+
+       * add.c (add_directory): Xasprintf instead of xmalloc/sprintf+strcat.
+       * admin.c (arg_add): Ditto.
+       (admin_fileproc, postadmin_proc, admin_fileproc): Gratuitous
+       reformatting.
+
+       * client.c (mode_to_string): Use Xasprintf.
+       
+       * checkout.c (checkout): Xasprintf instead of xmalloc/sprintf.
+       Gratuitous reformatting.
+       * entries.c (WriteTag): Ditto
+       (subdir_record, base_walk): Ditto.
+       * fileattr.c (fileattr_read, fileattr_set, fileattr_write): Ditto.
+       * filesubr.c (deep_remove_dir, cvs_temp_file): Ditto.
+       (strcat_filename_onto_homedir): Ditto.
+       * find_names.c (Find_Names): Ditto.
+
+       * filesubr.c (expand_wild): Use xnmalloc instead of xmalloc.
+
+2005-03-07  Derek Price  <address@hidden>
+
+       * buffer.c (buf_free_data): Compile with proxy disabled.
+       (Thanks to report from Larry Jones <address@hidden>.)
+
+2005-03-07  Derek Price  <address@hidden>
+
+       * buffer.c (packetizing_buffer_input, packetizing_buffer_output): Don't
+       assume BUFFER_DATA_SIZE is a constant.
+       (Thanks to report from Larry Jones <address@hidden>.)
+
+2005-03-03  Derek Price  <address@hidden>
+
+       Use new pagealign_alloc() and pagealign_free() functions in
+       lieu of maintaining pointers for reuse.  On most systems this should be
+       faster.
+       * buffer.c: Include "pagealign_alloc.h".
+       (free_buffer_data): Remove this global.
+       (allocate_buffer_datas): Remove this function.
+       (buf_free, buf_send_output): Call buf_free_data().
+       (get_buffer_data): Use pagealign_alloc().
+       (buf_free_datas): New function.
+       (buf_send_output, buf_free_data, buf_read_file, buf_read_file_to_eof,
+       buf_read_short_line, buf_read_data, buf_copy_counted): Call
+       buf_free_datas().
+       * buffer.h: Include "getpagesize.h".
+       (BUFFER_DATA_SIZE): Default to getpagesize ();
+       * rcs.c: Lean on m4/mmap-anon.m4 to simplify mmap setup.
+
+2005-03-02  Jim Meyering  <address@hidden>
+
+       Detect and report write failure for e.g., cvs up -p FILE > /dev/full
+       * main.c: Include "closeout.h".
+       (main): Arrange to close standard output upon exit.
+       * sanity.sh (close-stdout): New test for this fix.
+
+2005-03-01  Mark D. Baushke  <address@hidden>
+
+       * checkout.c (emptydir_name): Xasprintf instead of
+       xmalloc/sprintf.
+
+       * add.c (add): Xasprintf instead of xmalloc/sprintf.
+       Gratuitous reformatting.
+       (add_directory, build_entry): Ditto.
+       * annotate.c (rannotate_proc): Ditto.
+       * checkout.c (checkout_proc): Ditto.
+       * client.c (call_in_directory): Ditto.
+       (template, send_dirent_proc): Ditto.
+       (client_process_import_file): Ditto.
+       * commit.c (check_fileproc, precommit_proc): Ditto.
+       (commit_fileproc, finaladd): Ditto.
+       (checkaddfile): Ditto.
+       * create_adm.c (Create_Admin): Ditto.
+       * edit.c (notify_do): Ditto.
+
+2005-03-01  Derek Price  <address@hidden>
+
+       * subr.c (get_date): Minor reformatting.
+
+2005-03-01  Derek Price  <address@hidden>
+
+       * subr.c (get_date): Replace obsolete timeb cruft in this stub.
+
+2005-02-28  Mark D. Baushke  <address@hidden>
+
+       * admin.c (arg_add): Use xnmalloc and xnrealloc.
+       (admin): Use xnmalloc. Minor reformatting.
+       Xasprintf instead of xmalloc/strcpy+strcat.
+       * client.c (client_expand_modules): Use xnmalloc.
+       Minor reformatting.
+       * cvsrc.c (read_cvsrc): Use xnmalloc and xnrealloc.
+       Minor reformatting.
+       * history.c (read_hrecs): Use xnrealloc. Minor reformatting.
+       * ignore.c (ign_add): Use xnrealloc. Minor reformatting.
+       * rcscmds.c (call_diff_add_arg): Use xnrealloc.
+       * wrapper.c (wrap_add_entry): Use xnrealloc. Gratuitous
+       reformatting.
+
+2005-02-28  Derek Price  <address@hidden>
+
+       * edit.c (notify_proc), logmsg.c (logfile_write): Minor reformatting.
+
+2005-02-28  Derek Price  <address@hidden>
+
+       * root.c (parse_root): Trigger a later error message rather than
+       maintaining two copies.
+
+2005-02-27  Mark D. Baushke  <address@hidden>
+
+       * client.c (connect_to_pserver): Use TRACE_FUNCTION, not 1 in
+       TRACE() calls.
+       (connect_to_pserver,send_modified): Ditto.
+       * create_adm.c (Create_Admin): Ditto.
+       * entries.c (Register, Scratch_Entry, WriteTemplate): Ditto.
+       * filesubr.c (copy_file, xchmod, rename_file): Ditto.
+       * history.c (history_write): Ditto.
+       * kerberos4-client.c (start_kerberos4_server): Ditto.
+       * no_diff.c (No_Difference): Ditto.
+       * parseinfo.c (Parse_Info): Ditto.
+       * rcs.c (RCS_checkout): Ditto.
+       * server.c (server_register): Ditto.
+       * update.c (join_file): Ditto.
+
+       * no_diff.c (No_Difference): Gratuitous reformatting.
+       * kerberos4-client.c (start_kerberos4_server): Ditto.
+
+2005-02-27  Jim Meyering  <address@hidden>
+
+       * login.c (password_entry_operation): Exit nonzero when
+       failing to close a just-appended-to .cvspass file.
+
+2005-02-26  Derek Price  <address@hidden>
+
+       * root.c: Gratuitous reformatting.
+
+2005-02-26  Mark D. Baushke  <address@hidden>
+
+       * root.c (parse_cvsroot): Handle another Bad CVSROOT.
+       * sanity.sh (parseroot-8r): Test for it.
+       (Problem report from Hiroyuki Ikezoe <address@hidden>.)
+
+2005-02-26  Derek Price  <address@hidden>
+
+       * server.c: Include netdb.h with server support.  Other reformatting.
+
+2005-02-25  Derek Price  <address@hidden>
+
+       * sanity.sh (multiroot2-9a): Correct for new TRACE message.
+
+2005-02-25  Derek Price  <address@hidden>
+
+       * cvs.h (tag_check_valid): Declare NAME arg const.
+       * tag.c (tag_check_valid): Ditto, update to account for this.
+       Xasprintf instead of xmalloc/sprintf.
+
+2005-02-25  Derek Price  <address@hidden>
+
+       * client.c (send_modified): Suppress a -Wall warning.
+
+2005-02-25  Derek Price  <address@hidden>
+
+       * cvs.h (global_session_id): New global declaration.
+       * import.c (add_rcs_file), rcs.c (RCS_checkin): Save commitid.
+       * log.c (log_version), status.c (status_fileproc): Output commitid.
+       * main.c (global_session_id): Define new global.
+       (main): Create session ID.
+       * sanity.sh: Update to compensate.
+       (Original patch from Frank Hemer <address@hidden>.)
+
+2005-02-24 Derek Price <address@hidden>
+
+       * subr.h (cvs_trace, TRACE*): Move to...
+       * server.h: ...here.
+       * subr.c: Ditto, but to...
+       * server.c: ...here, and print out 'P' instead of 'S' for traces from
+       secondary (proxy) servers.
+
+2005-02-24 Derek Price <address@hidden>
+
+       * admin.c (admin): Suppress warning with -Wall and --disable-client.
+       * server.c: Don't declare functions that won't be defined when
+       --disable-server.
+
+2005-02-24 Derek Price <address@hidden>
+
+       * sanity.sh (primary-wrapper): Rename CVS_SERVER_LOG for the primary in
+       writeproxy mode to avoid overwriting.
+
+2005-02-24 Derek Price <address@hidden>
+
+       * client.c (open_connection_to_server): Fail with an expressive error
+       message when connection is attempted via an unsupported protocol since
+       this is no longer caught in parse_root().
+       * edit.c (edit_fileproc), import.c (import): Don't verify
+       current_parsed_root->isremote without client support.
+       * parseinfo.c (parse_config): Parse PrimaryServer without proxy
+       support.  Postpone method verification until the connect phase.
+       * parseinfo.h (struct config): Always include PrimaryServer.
+       * root.c (primary_root_translate, primary_root_inverse_translate):
+       Don't declare vars without PROXY_SUPPORT when they won't be used.
+       (parse_cvsroot): Parse remote connection methods with server support
+       for PrimaryServer/Redirects.  Delay method support verification until
+       the connect phase.
+       * root.h (cvsroot_t): Include remote elements with SERVER_SUPPORT.
+       * server.c (isProxyServer): Delay method verification until the connect
+       phase.
+
+2005-02-23 Derek Price <address@hidden>
+
+       * tag.c (tag): Handle -r<tag>:<date>.
+       * sanity.sh (tagdate-13.*): New tests.
+
+2005-02-23 Derek Price <address@hidden>
+
+       * annotate.c (annotate), ls.c (ls): Handle -r<tag>:<date>.
+
+2005-02-23 Derek Price <address@hidden>
+
+       * diff.c: Some reformatting.
+       (diff): Handle -r<tag>:<date>.
+       * sanity.sh (tagdate-13b): New test.
+
+2005-02-23 Derek Price <address@hidden>
+
+       * checkout.c (checkout): Use parse_tagdate.
+       * tag.c (tag_check_valid_join): Remove this function.
+       * cvs.h (tag_check_valid_join): Ditto for the proto.
+       (parse_tagdate): New proto.
+       (Make_Date): Make arg const.
+       * main.c (Make_Date): Ditto.
+       (parse_tagdate): New function.
+       * update.c (date_rev1, date_rev2): Rename these globals...
+       (join_date1, join_date2): ...to this.
+       (update): Use parse_tagdate.
+       (do_update): Use new API.
+       * update.h (do_update): Update proto.
+       * sanity.sh: Misc reformatting.
+       (tagdate-12): This test now passes.
+       (tagdate-12b): New test.
+       (multiroot-9a): Handle new TRACE.
+
+2005-02-23 Derek Price <address@hidden>
+
+       * rsh-client.c (start_rsh_server): Update comment.  Replace
+       malloc/sprintf combo with a call to Xasprintf.
+
+2005-02-22 Derek Price <address@hidden>
+
+       * error.c (error): Handle unsigned int format char.
+       * parseinfo.c (parse_error): New function.
+       (parse_config): Keep track of line number and output it in error
+       messages.
+       * rcs.c (RCS_setlocalid): Accept file path and line number for error
+       messages.  Add header comment block.
+       * rcs.h (RCS_setlocalid): Update prototype to match.
+       * parseinfo.h (parse_error): Declare new function.
+       * sanity.sh: Accept new --noredirect argument.
+       (checklongoptarg): Accept longoptmode as an argument
+       rather than via an environment variable.
+       (notnoredirect): New function.
+       (newroot): Handle root options.
+       (keywordexpand, config): Skip in noredirect mode.  Update for new
+       config error messages.
+       (multiroot): Some reformatting.
+       (writeproxy, writeproxy-noredirect): Skip in noredirect mode.
+       (commit, writeproxy-noredirect): Quote CVSROOT arguments since they
+       might contain semicolons.
+
+2005-02-21  Mark D. Baushke  <address@hidden>
+
+       * import.c (import): Avoid using assert with side effects it may
+       be configured away using NDEBUG.
+       (Patch from Frank Hemer <address@hidden>.)
+
+2005-02-20  Mark D. Baushke  <address@hidden>
+
+       * main.c (main): Check the results from xgethostname(). Print a
+       message with the errno and use "localhost" if NULL is returned.
+
+2005-02-20 Derek Price <address@hidden>
+
+       * cvs.h (run_arg): Rename to...
+       (run_add_arg): New function.
+       * run.c (run_arg): Remove.
+       (run_add_arg): Remove static declaration.
+       (run_piped): New function.
+       * logmsg.c, modules.c: s/run_arg/run_add_arg/.
+       * release.c (release): Replace use of piped_child with a call
+       to run_piped to avoid quoting issues.
+       * sanity.sh (info-cleanup-0): Expect success.
+
+2005-02-19 Derek Price <address@hidden>
+
+       * edit.c (unedit_fileproc, mark_up_to_date): Replace xmallc/strcat
+       sequence with single call to Xasprintf.
+
+2005-02-08 Derek Price <address@hidden>
+
+       * rsh-client.c: Some reformatting.
+
+2005-02-04 Derek Price <address@hidden>
+
+       * zlib.c (compress_buffer_input): Don't return EOF when there is data
+       pending.
+
+2005-02-01 Derek Price <address@hidden>
+
+       * main.c: Update year in copyright notice to match GNU standards.
+       * sanity.sh (version-1): Update to match.
+
+2005-02-01  Larry Jones  <address@hidden>
+
+       * log.c (log_fileproc, log_expand_revlist): Add support for BASE tag.
+       * sanity.sh (log): New tests for above.
+
+2005-01-31 Derek Price <address@hidden>
+
+       * main.c: Rephrase --version message.
+       * sanity.sh (version-1): Update to match.
+
+2005-01-31 Derek Price <address@hidden>
+
+       * Makefile.am, add.c, admin.c, annotate.c, checkin.c, checkout.c,
+       classify.c, commit.c, create_adm.c, cvs.h, cvsrc.c, diff.c, entries.c,
+       find_names.c, hash.c, hash.h, history.h, import.c, lock.c, log.c,
+       login.c, logmsg.c, main.c, mkmodules.c, modules.c, myndbm.c, no_diff.c,
+       parseinfo.c, patch.c, rcs.c, rcs.h, rcscmds.c, recurse.c, remove.c,
+       repos.c, root.c, root.h, server.h, stack.c, stack.h, status.c, subr.c,
+       tag.c, update.c, vers_ts.c, version.c: Update copyright notices.
+
+2005-01-29 Derek Price <address@hidden>
+
+       * log.c (log_usage): Add note about using -S with revision info
+       supression and selection.
+       (Suggestion from Dan Peterson <address@hidden>.)
+
+2005-01-29 Derek Price <address@hidden>
+
+       * sanity.sh (writeproxy-ssh-noredirect): Remove some commented out
+       code.
+
+2005-01-25  Larry Jones  <address@hidden>
+
+       * expand_path.c (expand_path): Rewrite using offsets instead of
+       pointers to simplify and avoid reallocation bugs.
+       (Inspired by Jeremy Bopp <address@hidden>.)
+
+2005-01-20 Brian Murphy <address@hidden>
+
+       * server.c fixing the style of the pam function calls and if
+       statements
+
+2005-01-19 Brian Murphy <address@hidden>
+
+       * server.c (pam_username, pam_password) new global static
+       variables to hold the username and pasword for cvs_pam_conv.
+       (cvs_pam_conv) using pam_username and pam_password.
+       (check_pam_password) set pam_username, pam_password before
+       authentication and clear them when authentication is finished.
+       (server, switch_to_user) Check for pamh being set before using
+       pam functionality, NULL indicating that this user was authenticated
+       using the repository password file.
+
+2004-12-09 Derek Price <address@hidden>
+
+       * log-buffer.c (buf_count_mem): Compile this for PROXY_SUPPORT.
+       (Report from Brad L. Chisholm <address@hidden>.)
+
+2004-12-09 Derek Price <address@hidden>
+
+       * sanity.sh (modules7): New test group.
+       (Based on a patch from Mark D. Baushke <address@hidden>, based on a
+       report from Richard Verhoeven <address@hidden>.)
+
+2004-12-09  Derek Price  <address@hidden>
+
+       * client.c (start_server): Avoid advertising the Redirect response when
+       the user asked us not to.
+       * root.h (cvsroot_t): Add redirect field.
+       * root.c (new_cvsroot_t): Init redirect field.
+       (parse_cvsroot_t): Parse Redirect method option.
+       * server.c (serve_command_prep): Don't throw proxy_log away when
+       Redirect isn't supported and it might be needed later.
+       * sanity.sh (parseroot): Improve comment, add a few new tests.
+       (writeproxy-ssh): Specify Redirect=yes explicitly.
+       (writeproxy-ssh-noredirect): New test group.
+
+2004-12-09  Mark D. Baushke  <address@hidden>
+
+       * main.c (usg): Remove Dr. Pascal Molli's CVS URL from the
+       documentation.
+
+2004-12-08  Derek Price  <address@hidden>
+
+       * root.c (Name_Root): s/TRACE_FUNCTION/TRACE_FLOW/.
+
+2004-12-08  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): Suppress -Wall warning.
+
+2004-12-08  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): findnode() compares LIST to NULL w/o help.
+
+2004-12-08  Derek Price  <address@hidden>
+
+       * root.c (Name_root), server.c (serve_referrer): Don't free cvsroot_t.
+       * server.sh (reposmv): Reaccount for multiple potential warnings and
+       comment.
+
+2004-12-07  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): Cache parsed values for efficiency and to
+       avoid printing warnings about non-fatal parsing errors multiple times.
+       * client.c,, login.c, main.c, recurse.c: Don't dispose of parsed roots,
+       parse_cvsroot() has control.
+       * sanity.sh (reposmv): Stop accounting for multiple warnings.
+
+2004-12-03  Mark D. Baushke  <address@hidden>
+
+       * root.h (cvsroot_t): Add cvs_rsh and cvs_server for bookkeeping
+       purposes.
+       * root.c (new_cvsroot_t, free_cvsroot_t): Add support for case
+       insensitive options CVS_RSH and CVS_SERVER.
+       (parse_cvsroot): Ditto and make all keywords case insensitive.
+       * client.c (connect_to_forked_server): Add support for the new
+       "CVS_SERVER" option to CVSROOT.
+       * rsh-client.c (connect_to_forked_server): Ditto
+       (start_rsh_server): Ditto and add support for the new "CVS_RSH"
+       option to CVSROOT.
+       * sanity.sh (parseroot3): New tests for the new options to
+       CVSROOT.
+
+2004-11-30  Larry Jones  <address@hidden>
+
+       * mkmodules.c (config_contents): Add LocalKeyword and KeywordExpand,
+       misc. cleanup.
+
+2004-11-30  Derek Price  <address@hidden>
+
+       * parseinfo.c (readBool): Update quotes in error message for
+       consistency.  Move function to...
+       * subr.c (readBool): ...here.
+       (*): Gratuitous reformatting.
+       * cvs.h: Move all subr.c function prototypes to...
+       * subr.h: ...this new file.
+       * Makefile.am (cvs_SOURCES): Add subr.h.
+
+2004-11-30  Derek Price  <address@hidden>
+
+       * parseinfo.c (readBool): Reorder arguments to error() and improve
+       header comment.
+
+2004-11-30  Derek Price  <address@hidden>
+
+       * client.c (handle_referrer): New function.
+       (handle_redirect): Handle possibility that CLIENT_REFERRER was set via
+       a response.
+       * server.c (serve_command_prep): Send a normalized Referrer response
+       before a Redirect when the client supports it.
+
+2004-11-29  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (RCS_setlocalid): Do more configuration validation.
+       Include some gratuitous reformatting.
+       * sanity.sh (keywordexpand): Add tests for new validation code.
+
+2004-11-24  Derek Price  <address@hidden>
+
+       * server.c (become_proxy): Note assumptions about syncronized primary
+       and secondary versions with `FIXME?' note.
+
+2004-11-22  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (info): Ignore comments in verifymsg test.
+
+2004-11-22  Mark D. Baushke  <address@hidden>
+
+       * mkmodules.c (loginfo_contents, verifymsg_contents,
+       commitinfo_contents, taginfo_contents, preproxy_contents,
+       postadmin_contents, postproxy_contents, posttag_contents,
+       postwatch_contents, notify_contents): Add comments regarding the
+       additional format strings that are available. Include some
+       gratuitous reformatting.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * subr.c (Xasnprintf): Improve header comment block.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * root.c (normalize_cvsroot): Improve header comment block.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * server.c: Misc reformatting and comment corrections.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * cvs.h (hostname): Redeclare as pointer rather than array.
+       * main.c: Include xgethostname.h.  Declare server_hostname.
+       (main): Use xgethostname().  Set server_hostname.
+       * server.c (MAXHOSTNAMELEN): Remove this macro.
+       (isThisHost): Reference global HOSTNAME rather than looking it up.
+       Improve header comment block.
+       (gserver_authenticate_connection): Likewise.
+       (serve_command_prep): Correct comment.
+       (serve_hostname): Don't bother to validate hostname length.
+
+2004-11-19  Derek Price  <address@hidden>
+
+       * server.c (isThisHost): strcasecmp before consulting the DNS as an
+       optimization.
+
+2004-11-18  Mark D. Baushke  <address@hidden>
+
+       * checkout.c (checkout_proc): Passing the repository to
+       tag_check_valid seems to stop the assertion failure in recurse.c
+       do_recursion.
+       * sanity.sh (basic2-21a): Removed.
+       (basic2-21c): Fixed.
+
+2004-11-18  Derek Price  <address@hidden>
+
+       * sanity.sh (skip_always, notproxy): New functions.
+       (skip, remoteonly, sshstdio, client): Use new functions.
+
+2004-11-17  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (basic2-21a): The val-tags file should have
+       at least 'rtagged-by-head y' in it. Test from cvs 1.11.18 that
+       shows fixed result.
+       (basic2-21b, basic2-21c): New tests showing a cvs bug when
+       val-tags is not present.
+       (Report from "John Elgin" <address@hidden>.)
+
+       * sanity.sh (basicb-21): POSIX 1003.2 specifies 'illegal option'
+       while lots of getopt implementations still use 'invalid option'.
+       Allow either form for this test.
+
+2004-11-17  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (fd_buffer_block): Deal with BSD and BSDI problems to
+       set block/nonblock on /dev/null.
+
+2004-11-17  Derek Price  <address@hidden>
+
+       * Makefile.am (distclean-local): Clean check.plog~.
+
+2004-11-11  Derek Price  <address@hidden>
+
+       * sanity.sh: s/cp -r/cp -R/ to meet POSIX specification.
+       (Thanks to report from Paul Eggert <address@hidden>.)
+
+2004-11-10  Mark D. Baushke  <address@hidden>
+
+       * ms-buffer.c (ms_buffer_input): Avoid UNICOS cc error where
+       'Both sides of the assignment operator are not compatible.'
+
+       * sanity.sh (importc, rcs, rcs4, tagdate): Use TZ=UTC0 not TZ=UTC
+       to get proper POSIX behavior on MacOS X.
+
+2004-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh: Actually parse -e option like we claim to.
+
+2004-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh: Maintain pass/skip/warn status and output at end.
+       (usage): Note new functionality of -e.
+       (warn): New function.
+       (verify_tmp_empty): Warn instead of failing.  Delete turds if warn()
+       doesn't exit.
+
+2004-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh (verify_tmp_empty): New function.
+       (dotest_internal_*): Call verify_tmp_empty as needed.
+
+2004-11-09  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (expr_tooltest3): Bugfix. Use $expr rather than $EXPR.
+
+2004-11-08  Derek Price  <address@hidden>
+
+       * sanity.sh (version_test): Echo good version data to the log, even
+       when it went to stderr.  Don't echo bad version data.
+
+2004-11-08  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (tool_find): Rewrite. API changed to allow a list of
+       tests to be used against a list of possible command names found on
+       the SEARCHPATH.
+       (version_test): Obtain the version of tools under test if
+       possible.
+       (id_tool_test): Check that 'id -u' and 'id -un' work.
+       (expr_tooltest1): Check for NextStep 3.3 expr bug.
+       (expr_tooltest2): Check for SunOS expr multi-line pattern bug.
+       (expr_create_bar): Create a test file for expr testing.
+       (expr_tooltest3): Use it and test for big multi-line identity
+       matches.
+       (expr_set_ENDANCHOR): Find and set the right value for ENDANCHOR.
+       (expr_set_DOTSTAR): Find and set the right value for DOTSTAR.
+       (expr_tooltest_DOTSTAR): Ensure that DOTSTAR works with big
+       matches.
+       (tr_tooltest1): Verify that tr handles NUL bytes.
+       (ls_tooltest): See if /bin/ls returns true even if wildcard does
+       not match any files.
+       (awk_tooltest1): Verify that awk the BEGIN clause works properly.
+       (awk_tooltest2): Verify that print %c format item works properly.
+
+2004-11-08  Derek Price  <address@hidden>
+
+       * sanity.sh (verify_tmp_empty): New function.
+       (dotest_internal_*): Call verify_tmp_empty as needed.
+
+2004-11-08  Derek Price  <address@hidden>
+
+       * sanity.sh (run_filter): Add function header comment block.
+
+2004-11-07  Larry Jones  <address@hidden>
+
+       * sanity.sh: Remove trailing / from cp -r commands.
+
+2004-11-04  Derek Price  <address@hidden>
+
+       * gssapi-client.c (connect_to_gserver): Silence gcc -Wall.
+
+2004-11-04  Derek Price  <address@hidden>
+
+       * sanity.sh (set_bad_tool): Remove unnecessary quotes.
+
+2004-11-04  Derek Price  <address@hidden>
+
+       * sanity.sh: s/depends_on_/require/.
+
+2004-11-04  Derek Price  <address@hidden>
+
+       * sanity.sh (find_tool): Eliminate variable with single reference.
+
+2004-11-04  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (SEARCHPATH): Unify the PATHs that are to be searched.
+       (Which,find_tool): Use SEARCHPATH.
+       (LS): Use default $SEARCHPATH for Which.
+       (depend_on_rsync): Use default $SEARCHPATH for Which.
+
+2004-11-04  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): Do not echo rsync information to
+       stdout. Look for rsync in more directories.
+
+2004-11-04  Derek Price  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): Minor simplifications.  Make sure that
+       an rsync that doesn't understand `--version' sends its error message to
+       the log file too.
+
+2004-11-04  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (set_bad_tool, is_bad_tool): Avoid printing errors
+       about the same tool multiple times.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): Deal with missing rsync.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): Include rsync version information
+       in output.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): More rigorous tests for rsync
+       2.3.1 problems with --delete --include dir --exclude '*/.
+
+2004-11-03  Derek Price  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): Verify that `rsync --delete' actually
+       does what it is supposed ot do.
+
+2004-11-03  Derek Price  <address@hidden>
+
+       * subr.c (Xreadlink): Remove MAXSIZE macro.  Minor reformatting.
+
+2004-11-03  Mark D. Baushke  <address@hidden>
+
+       * filesubr.c (xreadlink): Remove and use GNULIB version.
+       (islink): Return ssize_t instead of bool.
+       (copy_file): Use Xreadlink().
+       * cvs.h: Add include "xreadlink.h"
+       (islink): Return ssize_t instead of bool.
+       * import.c (preserve_initial_permissions): Use Xreadlink.
+       * rcs.c (RCS_checkin): Ditto.
+       * update.c (special_file_mismatch): Ditto.
+       * subr.c (get_file): Ditto.
+       (resolve_symlink): Ditto.
+       (Xreadlink): New interface to xreadlink(), never return NULL.
+
+2004-11-02  Mark D. Baushke  <address@hidden>
+
+       * filesubr.c (MAXSIZE): New macro.
+       (xreadlink): Ensure initial buffer size does not exceed MAXSIZE.
+       Avoid cast. If readlink fails with buffer size just under MAXSIZE,
+       try again with MAXSIZE.
+
+2004-11-02  Mark D. Baushke  <address@hidden>
+
+       * filesubr.c (xreadlink): AIX and HP-UX readlink() returns ERANGE
+       when there is not enough room in the buffer.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * cvs.h: Remove getdate proto in favor of including getdate.h.
+       * client.c (handle_mod_time), history.c (history), main.c (Make_Date,
+       format_date_alloc), rcs.c (RCS_getrevtime), server.c
+       (serve_checkin_time): Use new get_date API.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * sanity.sh (rcslib): Fix typo in path.
+
+2004-11-01  Derek Price  <address@hidden>
+
+       * sanity.sh (rcslib): Test a link to a path longer than 128
+       characters.
+
+2004-10-30  Mark D. Baushke  <address@hidden>
+
+       * patch.c (patch_cleanup): Add signal argument and use it.
+
+2004-10-30  Mark D. Baushke  <address@hidden>
+
+       * client.c: Adjust include files to avoid problems with incomplete
+       types under --disable-client.
+       * msg-buffer.c: Deal with --disable-client --disable-server
+       implicitly meaning --disable-proxy.
+       * server.c: Adjust include files to avoid problems with incomplete
+       types under --disable-server.
+
+2004-10-30  Mark D. Baushke  <address@hidden>
+
+       * server.c (isThisHost): Deal with possibility of a missing
+       hstrerror() function.
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * server.c (server_root, move_file_offset, replace_file_offset):
+       Remove dead code.
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * filesubr.c (xreadlink): Make sure allocation is tried once at the
+       maximum buffer size.  Protect against overflow.
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * server.c (isSameHost): Handle gethostname & gethostbyname errors.
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * server.c (isSameHost): Use strcasecmp to compare host names.
+
+2004-10-29  Mark D. Baushke  <address@hidden>
+
+       * server.c: Need to #include <netdb.h> for either PROXY_SUPPORT or
+       HAVE_GSSAPI to get gethostbyname() declarations for
+
+2004-10-29  Mark D. Baushke  <address@hidden>
+
+       * filesubr.c (SIZE_MAX, SSIZE_MAX): Use #include "xsize.h" instead.
+       (xreadlink): Use xrealloc instead of xmalloc/free.
+
+2004-10-29  Mark D. Baushke  <address@hidden>
+
+       * filesubr.c (SIZE_MAX, SSIZE_MAX): New constants.
+       (xreadlink): Deal with symlinks longer than 127 bytes.
+       (Problem reported as issue 190 by Gottfried Ganssauge
+       <address@hidden>.)
+
+2004-10-29  Derek Price  <address@hidden>
+
+       * server.c (isSameHost): New fuction.
+       (same_path): Rename to...
+       (isSamePath): ...this.
+       (isProxyServer): Use new functions/names.
+
+2004-10-29  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (writeproxy): Use DOTSTAR to avoid problems with
+       a missing Gssapi-authenticate in Valid-requests.
+
+2004-10-28  Derek Price  <address@hidden>
+
+       * server.c (same_path): New function.
+       (isProxyServer): Use new function.
+       * sanity.sh (writeproxy): Test that server resolves symlinks when
+       deciding whether it is a primary server.
+
+2004-10-28  Derek Price  <address@hidden>
+
+       * cvs.h (isdir, isfile, islink, isdevice, isreadable, iswritable,
+       isaccessible, isabsolute): Return boolean rather than int.
+       * filesubr.c (isdir, isfile, islink, isdevice, isreadable, iswritable,
+       isaccessible), subr.c (isabsolute): Ditto.  Some reformatting.
+       * filesubr.c (xresolvepath): Use save_cwd in place of xgetwd.  Some
+       reformatting.
+
+2004-10-28  Derek Price  <address@hidden>
+
+       * client.c (handle_redirect): Detect redirect loops.
+       * sanity.sh (client-20): Test that client detects redirect loops.
+
+2004-10-28  Mark D. Baushke  <address@hidden>
+
+       * release.c (release): Allow builds of cvs with --disable-server
+       --disable-client both used for local installation configuration.
+       * root.c (Name_Root): Ditto.
+       * update.c (checkout_file): Ditto.
+       * edit.c (edit_fileproc): Ditto.
+       * import.c (import): Ditto.
+       (Problem reported by Jean Olivier Caron <address@hidden>.)
+
+2004-10-27  Mark D. Baushke  <address@hidden>
+
+       * cvs.h (RCS_FLAGS_USETIME): New flag.
+       * rcs.c (RCS_checkin): Add citime argument.
+       * rcs.h (RCS_checkin): Ditto.
+       * checkin.c (Checkin): Pass new RCS_checkin argument.
+       * commit.c (remove_file, checkaddfile): Ditto.
+       * import.c (add_rev): Ditto.
+
+       * sanity.sh (tagdate): Delete tagdate-19b as an incorrect test.
+
+2004-10-27  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (tagdate): Provide more output.
+
+2004-10-26  Mark D. Baushke  <address@hidden>
+
+       * commit.c (checkaddfile): Create a dead version for a new file
+       added to a branch. Fixes FIXCVS for tagdate tests.
+       * sanity.sh (tagdate): Update to expect correct results.
+       (death2, branch-after-import, join, ignore-on-branch): Ditto.
+
+2004-10-26  Mark D. Baushke  <address@hidden>
+
+       * server.c (isProxyServer): Fix hostname setup.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       Call all exit handlers via atexit() & exit().  Signal handlers exit().
+       Eliminates a compiler warning.
+
+       * exithandle.c (cleanup_register): Don't register a signal handler.
+       Register a function to block signals before the exit handler is called.
+       * lock.c (Lock_Cleanup): Remove never_run_again cruft and assoc. cmts.
+       * rcs.c (rcs_cleanup), server.c (server_cleanup): Ditto, plus assume
+       signals are blocked.
+       * main.c (main_cleanup): Declare noreturn attribute.
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * gssapi-client.c (connect_to_gserver): Avoid truncating error messages
+       from the GSSAPI server.
+       (Report from Dan Peterson <address@hidden>.)
+
+2004-10-26  Derek Price  <address@hidden>
+
+       * sanity.sh (import-quirks): Test an even branch number.
+
+2004-10-25  Derek Price  <address@hidden>
+
+       * import.c (import): Repair regex for regressions introduced in last
+       commit.
+       * sanity.sh (import-quirks): Test a few branch numbers import shouldn't
+       have a problem with.
+
+2004-10-25  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (modes3): Quiet rsync messages in proxy mode when
+       permissions are removed. They are expected and not a problem here.
+
+2004-10-25  Derek Price  <address@hidden>
+
+       * import.c (import): Anchor and simplify branch verification regex.
+       * sanity.sh (import-quirks): Test another pattern that should fail.
+
+2004-10-25  Derek Price  <address@hidden>
+
+       * cvs.h (yesno): Remove prototype.
+       * edit.c, release.c: Include yesno.h.  Flush output before calling
+       yesno().
+
+2004-10-25  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (tagdate): Added some additional tests and FIXCVS
+       comments for dealing properly with a 'cvs add' of a file to
+       a branch that already exists on the mainline.
+       (Problem reported by Renny Barrett <address@hidden>.)
+
+       * sanity.sh (getrlogdate): New shell function.
+       (tagdate-{13,14,16}): Use it to avoid 'sleep 60' by using
+       the exact 1.1.4.1 timestamp for tagdate-14 and tagdate-16.
+
+2004-10-25  Derek Price  <address@hidden>
+
+       * sanity.sh (depends_on_rsync): Redirect rsync output to /dev/null when
+       just testing.
+
+2004-10-23  Mark D. Baushke  <address@hidden>
+
+       * socket-client.c (socket_buffer_initialize): Drop obsolete
+       arguments to buf_initialize().
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * client.c (handle_m, handle_e): Winsock is returning
+       SOCK_ERRNO == WSAENOTSOCK for select() problems and not
+       setting errno. Do not bother with printing an error from a
+       select() that is not returning an non-zero errno.
+       (Report from Conrad T. Pino <address@hidden>.)
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (proxy): proxycheck depends on rsync, but skip all if
+       no rsync is found rather than generate an error return.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am (proxycheck): New test target.
+       * sanity.sh: Keep one more level of check.log backup.
+       * Makefile.in: Regenerated.
+
+2004-10-22  Derek Price  <address@hidden>
+
+       * client.c, update.c: Use new MD5 interface.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (find_tool): Search /usr/pkg/bin for NetBSD tools
+       like rsync.
+
+2004-10-22  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (tagdate): Fix typo.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * subr.c: #include vasnprintf.h to avoid compiler warning.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * cvs.h (error_use_protocol): Move decl here from lib/error.h so that
+       we may use an unforked error.h from GNULIB.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * main.c: #include strftime.h.
+       (format_time_t, gmformat_time_t): Supply missing args to my_strftime.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * buffer.c: Don't maintain last_index & last_count for buffers.
+       * buffer.h (struct buffer): Update struct.
+       (buf_initialize): Update proto.
+       * log-buffer.c, ms-buffer.c, zlib.c: Update all callers.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * sanity.sh: Fail gracefully in proxy mode when rsync is defective.
+       (depends_on_rsync): New function.
+       (writeproxy, writeproxy-noredirect, writeproxy-ssh): Skip these tests
+       gracefully when rsync is missing.
+
+2004-10-21  Mark D. Baushke  <address@hidden>
+
+       * add.c (add): Pay attention to cvswrite mode when resurrecting a
+       file that was not yet committed.
+       (Report from Frank Hemer <address@hidden>.)
+       * sanity.sh (resurrection): Add new tests to deal with read-only
+       mode on a cvs add durring a resurrection. Verify that -r is not
+       honored when the resurrected file must be committed to be seen.
+
+2004-10-21  Derek Price  <address@hidden>
+
+       * ls.c (ls_fileproc): Deal with files specified on the command line.
+       (ls_delproc): Move to a more accessible location.
+
+2004-10-20  Derek Price  <address@hidden>
+
+       * add.c (add): Avoid unnecessary typecast.
+
+2004-10-20  Mark D. Baushke  <address@hidden>
+
+       * Makefile.in: Regenerate for new configure.in.
+
+2004-10-19  Mark D. Baushke  <address@hidden>
+
+       * add.c (add): Backout last typecasts cleanup.
+
+2004-10-19  Derek Price  <address@hidden>
+
+       * add.c (add): Avoid attempting to resurrect a dead rev 1.1.
+       * sanity.sh (resurrection): Add test for the above.
+       (Report from Dan Peterson <address@hidden>.)
+
+2004-10-19  Derek Price  <address@hidden>
+
+       * add.c (add): Avoid unnecessary typecasts.
+
+2004-10-19  Derek Price  <address@hidden>
+
+       * cvs.h: Prototype new function.
+       * subr.c (Xasnprintf): New function.
+       * root.c (primary_root_translate, primary_root_inverse_translate):
+       s/asnprintf/Xasnprintf/.
+       * client.c (connect_to_pserver): Store line length for efficiency.
+
+2004-10-19  Derek Price  <address@hidden>
+
+       * history.c: Remove unecessary typecasts.  Some reformatting.
+
+2004-10-18  Derek Price  <address@hidden>
+
+       * server.c (serve_modified): Eliminate >= 0 check since size_t may not
+       be negative.
+       (Originally reported by Martin Neitzel <address@hidden>.)
+
+2004-10-18  Derek Price  <address@hidden>
+
+       * cvs.h (DEVNULL): This is system dependant.  Move it to lib/system.h.
+       * client.c (copy_a_file): Consolidate USE_VMS_FILENAMES stuff under a
+       single #ifdef.
+
+2004-10-15  Derek Price  <address@hidden>
+
+       * cvs.h: Don't include vasnprintf.h.
+       (Xasprintf): New prototype.
+       * client.c, edit.c, history.c, import.c, ls.c, main.c, parseinfo.c,
+       recurse.c, release.c, repos.c, root.c, server.c, status.c, subr.c,
+       vers_ts.c: s/asnprintf/Xasprintf/.
+       * root.c: Include vasnprintf.h.
+       (primary_root_translate, primary_root_inverse_translate): Use
+       asnprintf() properly.
+       * subr.c: Include vasprintf.h.
+       (Xasprintf): New function.
+
+2004-10-14  Derek Price  <address@hidden>
+
+       * import.c (import): Remove an unecessary level of nesting.  Simplify
+       xmalloc/sprintf with asnprintf.  Remove useless comment.
+
+2004-10-14  Derek Price  <address@hidden>
+
+       * import.c (import): Verify branch specifications more thoroughly.
+       * sanity.sh (importb): Adapt to new error message.
+       (import-quirks): New test.
+
+2004-10-14  Mark D. Baushke  <address@hidden>
+
+       * server.c (server_pause_check, do_cvs_command, server_cleanup):
+       Avoid typecasts.
+
+2004-10-14  Derek Price  <address@hidden>
+
+       * gssapi-client.c: Use new size_t buffer APIs.
+
+2004-10-11  Mark D. Baushke  <address@hidden>
+
+       * buffer.h, buffer.c (buf_output, buf_input_data, buf_read_line,
+       buf_read_data, struct packetizing_buffer,
+       packetizing_buffer_initialize) Use size_t instead of int.
+       Silences warnings in buffer.c, server.c, and zlib.c on OpenBSD
+       sparc64 where sizeof(int) is not the same as sizeof(size_t).
+       * client.c (read_line_via, read_line, try_read_from_server,
+       get_server_response, handle_ok, handle_error,
+       handle_valid_requests, handle_checked_in, handle_new_entry,
+       handle_checksum, handle_copy_file, handle_updated, handle_merged,
+       handle_patched, handle_rcs_diff, handle_removed,
+       handle_remove_entry, handle_set_static_directory,
+       handle_clear_static_directory, handle_set_sticky,
+       handle_clear_sticky, handle_clear_template,
+       handle_module_expansion, handle_wrapper_rcs_option, handle_m,
+       handle_e, handle_f, handle_notified): Ditto
+       * client.h (struct response): Ditto.
+       * server.c (receive_partial_file, receive_file, serve_modified,
+       do_cvs_command): Ditto.
+       * zlib.c (compress_buffer_input, compress_buffer_shutdown_input):
+       Ditto.
+       (Patch from Alexander Taler <address@hidden>.)
+
+2004-10-08  Derek Price  <address@hidden>
+
+       * client.c (send_args): Carry through a const to silence gcc -Wall.
+       * hardlink.c (delhardlist): New function.
+       (lookup_file_by_inode): Use new function as delproc since it should
+       work.  Carry through a const to silence gcc -Wall.
+       * ms-buffer.c (ms_buffer_initialize): Use a working delproc.
+
+2004-10-08  Derek Price  <address@hidden>
+
+       * client.c (open_connection_to_server, close_connection_to_server,
+       handle_redirect): Add traces.
+
+2004-10-07  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add parseinfo.h.
+
+2004-10-07  Mark D. Baushke  <address@hidden>
+
+       * vers_ts.c (entries_time): Use size_t pointers. sizeof(int)
+       may not be the same as sizeof(size_t) on OpenBSD sparc64.
+       (Patch from Alexander Taler <address@hidden>.)
+
+       * wrapper.c (wrap_clean_fmt_str): Make static.
+
+2004-10-07  Mark D. Baushke  <address@hidden>
+
+       * client.h (struct response): Make name a const.
+       * cvs.h (RETSIGTYPE): Use a full prototype.
+       * hash.h (struct node): Use a full prototype for delproc.
+
+       * client.c (send_arg, send_option_string, option_with_arg): Make
+       args of function const.
+       * client.h (send_arg, send_option_string, option_with_arg): Ditto.
+
+       * checkout.c (checkout): Make valid_options const.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * release.h: Silence gcc -Wall.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * cvs.h: Move include of getopt.h to system.h with similar headers.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * login.c: Include getpass.h.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * cvs.h: Include strcase.h.
+       (cvs_casecmp): remove proto.
+       * subr.c (cvs_casecmp): Remove function.
+       * parseinfo.c: s/cvs_casecmp/strcasecmp/.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * cvs.h: Move getopt.h and regex.h into the GNULIB include section.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * main.c (cmds): Release calls unedit, to it modifies the repository.
+       (struct cmd): Add const and full prototype where needed.
+       * sanity.sh (edit-check): Use modify_repo where needed.
+       (release): No more special case for release in proxy mode.
+       (Patch from Mark D. Baushke  <address@hidden>.)
+
+       * release.c (release): Simplify login in if statement.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * client.c (send_file_names): Back out broken portion of previous
+       change.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * client.c (call_in_directory): Make args of function arg const.
+       * client.h, client.c, edit.h, edit.c, server.h, zlib.c: Carry change
+       through to called functions and functions passed in as args.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * checkout.c, commit.c, edit.c, rcs.c: Avoid typecasts.  Some
+       reformatting.
+
+2004-10-06  Derek Price  <address@hidden>
+
+       * client.c: Avoid more typecasts.  Some reformatting.
+
+2004-10-06  Mark D. Baushke  <address@hidden>
+
+       * client.c (send_file_names): Use new save-cwd API.
+       (connect_to_pserver): Use a union to avoid incompatible pointer
+       type warnings.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * cvs.h (Xstrdup): New proto mapped via define to xstrdup.
+       * subr.c (Xstrdup): New function.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * add.c, client.c, history.c, import.c, mkmodules.c, modules.c,
+       recurse.c, release.c, tag.c, update.c: Use new save-cwd API.
+
+2004-10-05  Derek Price  <address@hidden>
+
+       * checkout.c, client.c, commit.c, create_adm.c, cvs.h, filesubr.c,
+       hardlink.c, history.c, logmsg.c, main.c, recurse.c, update.c:
+       s/xgetwd/xgetcwd/.
+
+2004-10-04  Derek Price  <address@hidden>
+
+       * client.c (responses): Add "Edit-file".
+       (handle_edit_file): New function.
+       * commit.c (usage): Add -c option.
+       (check_fileproc): Check for edit when requested.
+       (commit_fileproc): Use new notify_do API.
+       * edit.c (check_edited): New global.
+       (setting_tedit, setting_tunedit, setting_tcommit): s/int/bool/.
+       (ncheck_fileproc): Use new notify_do API.
+       (send_notifications): Remove redundant proto.  Remove unnecessary
+       repository lock.
+       (editors_output, find_editors_and_output, edit_file): New functions.
+       edit_file() factored from...
+       (edit_fileproc): ...here.  Skip files with existing editors when
+       requested.
+       (usage): Add -c and -f.
+       (edit): Handle new -c and -f options.
+       (notify_do): Accept update_dir as an argument for user messages.
+       (editors_fileproc): Factor most content to find_editors_and_output()
+       and edit_file().
+       * edit.h (notify_do): Proto new API.
+       (editors_output, edit_file): New functions.
+       * rcs.c (RCS_unlock): Use new notify_do() API.
+       * sanity.sh: Update assorted tests to compensate for new output.
+       (edit-check): New tests.
+       * server.c (gupdate_dir): New global.
+       (struct notify_note): Keep track of update_dir.
+       (serve_notify): Use update_dir.
+       (serve_hostname, serve_localdir, serve_edit, server_edit_file): New
+       functions.
+       (server_notify): Use new notify_do() API.
+       (requests): Add Hostname, LocalDir, and edit.
+       * server.h (server_edit_file): New proto.
+       (Note: Original design of new advisory lock behavior came from Noel Yap
+       <address@hidden>'s original advisory locks patch, originally ported
+       forward and enhanced by Matthew Ogilvie <address@hidden>.)
+
+2004-10-04 Derek Price <address@hidden>
+
+       * admin.c (postadmin_proc), edit.c (notify_proc), fileattr.c
+       (postwatch_proc), logmsg.c (logfile_write, verifymsg_proc), server.c
+       (prepost_proxy_proc), tag.c (pretag_proc, posttag_proc): Pass referrer
+       to called scripts when possible.
+       * client.c (handle_redirect): Save the original server.
+       (start_server): Send referrer to the new server if possible.
+       * sever.c (referrer): New global.
+       (serve_referrer): Save referrer.
+       (requests): Add "Referrer" response.
+       * server.h (referrer): Add extern decl.
+       * sanity.sh (ssh-wrapper): Use in remote mode too.
+       (writeproxy-ssh): New tests.
+
+2004-10-04 Derek Price <address@hidden>
+
+       * cvs.h (CVSROOT_DFLT): Undef rather than defining to NULL.
+       * main.c (main): Untangle parsing of CVSROOT, eliminating several
+       variables in the process.  Simplify xmalloc/sprintf with asnprintf.
+
+2004-10-04 Derek Price <address@hidden>
+
+       * root.c (primary_root_translate, primary_root_inverse_translate,
+       get_local_root_dir, local_cvsroot): Simplify logic without proxy
+       support.
+
+2004-10-02  Mark D. Baushke  <address@hidden>
+
+       * root.c (primary_root_translate, primary_root_inverse_translate,
+       get_local_root_dir): Protect PrimaryServer with #ifdef
+       PROXY_SUPPORT
+
+2004-10-01  Mark D. Baushke  <address@hidden>
+
+       * main.c (main): Initialize CVSroot before it is used.
+       (Report and patch by Martin Neitzel <address@hidden>.)
+       * sanity.sh (status): Test it.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * checkout.c (checkout_proc), fileattr.c (fileattr_read), find_names.c
+       (Find_Names), myndbm.c (mydbm_open, mydbm_load_file), parseinfo.c
+       (Parse_Info), rcs.c (RCS_parsercsfile_i, rcsbuf_getkey,
+       rcsbuf_getrevnum, rcsbuf_valword): Root translation functions no longer
+       allocate.
+       * commit.c (commit): Use send_a_repository rather than reimplementing.
+       * main.c (main): Remove --primary-root option.
+       * root.c (primary_root_add): Remove this function.
+       (primary_root_in, primary_root_out): Remove globals.
+       (primary_root_translate, primary_root_inverse_translate): Return const.
+       Don't allocate return value.  Rely on parsed root and confg's
+       PrimarServer rather than separately maintained globals.
+       (get_local_root_dir): New function.
+       (local_cvsroot): Translate requests for primary roots when necessary.
+       * root.h (primary_root_add, primary_root_translate,
+       primary_root_inverse_translate): Update protos to match.
+       * sanity.sh (top level, writeproxy): Simplify $proxy setup.
+       (client): Don't execute $proxy.  Simplify skips and reindent.
+       (writeproxy-noredirect): Use --allow-root in place of --primary-root.
+       Save and restore $PRIMARY_CVSROOT*.
+       * server.c (serve_root): Rely on local_cvsroot() to do any necessary
+       root translation.
+       (serve_directory): Root translation functions no longer allocate.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * client.c (arg_should_not_be_sent_to_server), create_adm.c
+       (Create_Admin), recurse.c (start_recursion, do_recursion, do_dir_proc),
+       release.c (release), repos.c (Name_Repository, Short_Repository),
+       update.c (update_filesdone_proc):
+       s/original_root/original_parsed_root->MEMBER/.
+       * main.c (set_root_directory): Set original_parsed_root when setting
+       current_parsed_root.
+       (main): s/original_root/original_parsed_root->MEMBER/.
+       * root.c (original_root): Make cvsroot_t and rename to...
+       (original_parsed_root): ...this.
+       * root.h: Update extern decl to match.
+       * server.c (serve_root): Set original_parsed_root.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * server.c (serve_questionable): Use pending errors per API.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * repos.c (Name_Repository): asnprintf, not sprintf.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * sanity.sh (ignore-11r): Rename second occurance to...
+       (ignore-11ar): ...this.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * sanity.sh (1): Rename to...
+       (init-1): ...this.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * repos.c (Name_Repository): Simplify string construction with
+       asnprintf().  Improve comment.  Some reformatting.
+
+2004-10-01  Derek Price <address@hidden>
+
+       * release.c (release): Simplify string construction with asnprintf().
+
+2004-10-01  Derek Price <address@hidden>
+
+       * recurse.c (do_file_proc): Improve header comment.  Replace
+       xmalloc()/strcat() combination with asnprintf().
+
+2004-09-29  Derek Price <address@hidden>
+
+       * sanity.sh (config): Handle $SECONDRY_ROOT_DIRNAME output in $proxy
+       mode.
+
+2004-09-29  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh: Workaround MacOS X '/bin/ls' is not returning false
+       when no files are listed.  Label some old tests.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * cvs.h: Include parseinfo.h.
+       (top_level_admin, UseNewInfoFmtStrings,
+       ImportNewFilesToVendorBranchOnly, PrimaryServer, MaxProxyBufferSize,
+       MaxCommentLeaderLength, UseArchiveCommentLeader, RereadLogAfterVerify,
+       lock_dir, UserAdminOptions):  Move extern decls for global config opts
+       to config struct in parseinfo.h.
+       (config): New global.
+       (parse_config): Move proto to...
+       * parseinfo.h: This new file.
+       * parseinfo.c (parse_config): Return struct config.
+       (new_config): New function.
+       * admin.c: Remove global UserAdminOptions.
+       (admin): Don't check config on client.
+       * checkin.c (Checkin), checkout.c (checkout_proc), filesubr.c (xchmod),
+       import.c (import, add_rcs_file, expand_and_copy_contents):
+       Use config instead
+       of globals.  Some reformatting.
+       * history.c (logHistory): Move to struct config.
+       (history_write): Use config instead of globals.
+       * lock.c (lock_dir): Move global to struct config.
+       (lock_name): Use config instead of globals.
+       * logmsg.c (RereadLogAfterVerify): Move global to struct config.
+       (do_verify, logfile_write, verifymsg_proc): Prefer config to globals.
+       * main.c (top_level_admin, UseNewInfoFmtStrings, PrimaryServer,
+       MaxProxyBufferSize, MaxCommentLeaderLength, UseArchiveCommentLeader,
+       ImportNewFilesToVendorBranchOnly): Move globals to struct config.
+       (config): New global.
+       (main): Use new parse_config API.
+       * rcs.c (preserve_perms, keywords): Move globals to struct config.
+       (keyword_local): Move to struct rcs_keyword.
+       (new_keywords, free_keywords): New functions.
+       (expand_keywords, RCS_setlocalid, RCS_setincexc): Prefer config to
+       globals.
+       * rcs.h (free_keywords): New proto.
+       (RCS_setincexc, RCS_setlocalid): Accept opaque keywords element.
+       * root.c (delconfig, get_root_allow_config): New functions.
+       * root.h (get_root_allow_config): New proto.
+       * server.c (system_auth): Move global to struct config.
+       (isProxyServer, become_proxy, serve_command_prep): Prefer config to
+       globals.
+       (serve_root): Ditto.  Set config.
+       * server.h (system_auth): Move extern decl for global moved to config.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * history.h: Protect against multiple include.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * root.c (root_allow_count, root_allow_vector, root_allow_size):
+       Replace with...
+       (root_allow): ...this single List *.
+       (root_allow_add, root_allow_free, root_allow_ok): Use new List API.
+       Make args const.  Return bool rather than int when necessary.
+       * root.h (root_allow_add, root_allow_ok): Update protos to match.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * admin.c (admin): s/int/bool/ as appropriate.  Some reformatting.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * history.c (history_write): Use asnprintf().  Some reformatting.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * import.c (killnew): s/int/bool/.
+       (add_rcs_file): Ditto for do_killnew.
+       * rcs.h (add_rcs_file): Change proto to match.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * client.c (start_server): Use bool in place of int.
+
+2004-09-29  Derek Price <address@hidden>
+
+       * subr.c (cvs_trace): Correct header comment.  Some reformatting.
+
+2004-09-28  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (ssh-wrapper-env): New script to avoid the assumption
+       that the remote end of a $CVS_RSH is running a bourne shell.
+       (ssh-wrapper): Use it.
+
+2004-09-28  Derek Price <address@hidden>
+
+       * sanity.sh (writeproxy): Remove some setup obsoleted by redirects.
+
+2004-09-27  Derek Price <address@hidden>
+
+       Use original_root for client comparisons with CVS/Root since
+       current_parsed_root may be the product of a redirect.
+
+       * client.c (handle_redirect): Don't free current_parsed_root.  Validate
+       new roots.
+       (args_should_not_be_sent_to_server):
+       s/current_parsed_root->original/original_root/.
+       * create_adm.c (Create_Admin): Likewise.
+       * cvs.h (current_parsed_root): Move extern decl...
+       * root.h: ...here.  Decl original_root extern.
+       * main.c (set_root_directory): Store original_root.
+       (main): s/current_parsed_root->original/original_root/.
+       * recurse.c, release.c, update.c: Likewise.
+       * root.c: Declare original_root.
+
+2004-09-24  Derek Price <address@hidden>
+
+       * sanity.sh (parseroot2): Correct two test names.  Restore CVSROOT.
+
+2004-09-24  Derek Price <address@hidden>
+
+       * root.c (parse_cvsroot): Use TRACE_FLOW, not TRACE_FUNCTION since this
+       routine is called repeatedly by the recursion routines.
+       * sanity.sh (multiroot2): Adjust to compensate.
+
+2004-09-24  Derek Price <address@hidden>
+
+       * sanity.sh (parseroot2): Use remoteonly.
+
+2004-09-24  Derek Price <address@hidden>
+
+       * sanity.sh (tests): Add parseroot2.
+
+2004-09-24  Derek Price <address@hidden>
+
+       * recurse.c (do_recursion, do_dir_proc): Make process_this_directory a
+       boolean.
+
+2004-09-24  Derek Price <address@hidden>
+
+       * sanity.sh (parseroot2): New test for root parsing consistency.
+       (Original patch from Alexander Taler <address@hidden>.)
+
+       * cvs.h (Name_Root, free_cvsroot_t, parse_cvsroot, local_cvsroot,
+       Create_Root, root_allow_add, root_allow_free, root_allow_ok): Move
+       these protos to...
+       * root.h: ...here.
+       * client.c (arg_should_not_be_sent_to_server), recurse.c
+       (start_recusrion, do_recursion): Use new Name_Root API.
+       * main.c (current_root): Remove global.
+       (set_root_directory): Set current_parsed_root directly.
+       (main): Use new Name_Root API.  Restore deletion of root directories
+       list.
+       * root.c (Name_Root): Return a parsed cvsroot_t rather than a string.
+
+2004-09-24  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (buf_append_buffer): Fix typo in comment.
+
+2004-09-23  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (buf_read_file): Fix typo in comment.
+       (buf_read_file_to_eof): Ditto.
+       * server.c (serve_command_prep): Ditto.
+
+2004-09-23  Derek Price <address@hidden>
+
+       * sanity.sh (depends_on_ssh, sshstdio): Don't use skip() to skip
+       remote-only tests.
+
+2004-09-23  Derek Price <address@hidden>
+
+       * sanity.sh (crerepos, sshstdio): Minor modifications to make use of
+       the new depends_on_?sh API.
+
+2004-09-23  Derek Price <address@hidden>
+
+       * sanity.sh: Accept new -e option to interpret non-fatal calls to skip
+       as errors.
+       (skip, depends_on_rsh, depends_on_ssh): New functions.
+
+2004-09-23  Mark D. Baushke  <address@hidden>
+
+       * server.c (cvs_output, cvs_output_binary): fflush (stderr)
+       here to avoid problems with 'cvs status 2>&1'.
+       (Report by Frank Hemer <address@hidden>.)
+
+2004-09-17  Derek Price  <address@hidden>
+
+       * buffer.c, buffer.h, log-buffer.c, log-buffer.h, main.c, mkmodules.c,
+       parseinfo.c, server.c: Remove TRUST_OS_FILE_CACHE.
+
+2004-09-17  Derek Price  <address@hidden>
+
+       * buffer.c (fd_set_block): Ignore FreeBSD /dev/null problem.
+
+2004-09-17  Derek Price  <address@hidden>
+
+       * cvs.h (strip_trailing_slashes): Remove proto in favor of including
+       dirname.h from GNULIB.
+       * sever.c (dir_name): Rename to...
+       (gDirname): ...this to avoid conflicts with the GNULIB function.
+
+2004-09-16  Derek Price  <address@hidden>
+
+       * expand_path.c (expand_path): Silence `gcc -Wall'.  Reformat some
+       comments to fit in 80 characters.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * sanity.sh (sync-secondary, writeproxy, writeproxy-noredirect): Remove
+       redundant checks for $RSYNC readability.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * sanity.sh: Only find $RSYNC once.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * sanity.sh (writeproxy, writeproxy-noredirect): Find $RSYNC in a
+       portable manner.
+
+2004-09-15  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh: Find $RSYNC in a portable manner.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * parseinfo.c (parse_config): Complete parsing of the remainder of the
+       config file when errors are encountered.  Accept and ignore
+       UseNewInfoFmtStrings=yes when !SUPPORT_OLD_INFO_FMT_STRINGS.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * buffer.c (buf_copy_data): Pass args to buf_append_data correctly.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * sanity.sh: Set $RSYNC in proxy mode.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * main.c: Fix typo in comment.
+
+2004-09-15  Derek Price  <address@hidden>
+
+       * rcs.c: s/abort/assert/.  Reformat function headers.  Remove
+       unnecessary typecasts & prototypes.
+
+2004-09-14  Mark D. Baushke  <address@hidden>
+
+       * parseinfo.c (readBool): Remove dead code.
+
+       * filesubr.c (cvs_casecmp): Move to...
+       * subr.c (cvs_casecmp): ...here.
+       * cvs.h (cvs_casecmp): No longer ifdef under SERVER_SUPPORT
+
+       * parseinfo.c (readBool): Return false when there was no boolean
+       found.
+
+2004-09-14  Derek Price  <address@hidden>
+
+       * cvs.h (top_level_admin, ImportNewFilesToVendorBranchOnly):
+       s/int/bool/.
+       (MaxCommentLeaderLength, UseArchiveCommentLeader): New vars.
+       * main.c: Ditto, for all four vars above.
+       * mkmodules.c (config_contents): Add default info for
+       MaxCommentLeaderLength & UseArchiveCommentLeader.
+       * parseinfo.c (readBool, readSizeT): New functions.
+       (parse_info): Use new functions.  Parse MaxCommentLeaderLength &
+       UseArchiveCommentLeader.
+       * rcs.c (expand_keywords): Limit the size of the comment leader to
+       MaxCommentLeaderLength & fall back to the comment leader specified in
+       the RCS archive when requested.
+       (preserve_perms): s/int/bool/.
+       * rcs.h (preserve_perms), server.c (system_auth), server.h
+       (system_auth): Likewise.
+       * sanity.sh (keywordlog): Add new tests for the above.
+
+2004-09-12  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (RCS_checkout): Allow noexec to do checkouts when
+       server_active is true.
+       * sanity.sh (join7): Test above change (fixes a FIXCVS).
+
+2004-09-09  Derek Price  <address@hidden>
+
+       * buffer.c (stuct packetizing_buffer): Use size_t & bool as appropriate
+       in preference to int.
+       (packetizing_buffer_output): s/int/size_t/ as appropriate.
+
+2004-09-09  Derek Price  <address@hidden>
+
+       * buffer.c (packetizing_buffer_input): s/int/size_t/ as appropriate.
+
+2004-09-09  Mark D. Baushke  <address@hidden>
+
+       * root.c (primary_root_inverse_translate): No longer inline.
+
+2004-09-09  Conrad T. Pino  <address@hidden>
+
+       * server.c: Add comment before #if at line 5580 to move it further
+       into the file which seems to work around an apparent buffer managment
+       bug in Microsoft Visual C++ 6.0 compiler.
+
+2004-09-08  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (join7): Fix if-then-else conditional.
+
+       * sanity.sh (join7): Re-order join7-5 and join7-6 tests.
+
+2004-09-08  Conrad T. Pino  <address@hidden>
+
+       * server.c: Remove extra token in conditional compile line 5580
+       causing error in Windows Visual C++ 6.0 compile.
+
+2004-09-08  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (fd_buffer_block): Protect fcntl calls when F_GETFL,
+       O_NONBLOCK and F_SETFL are not available.
+       * server.c (move_file_offset): Ditto.
+       (set_nonblock_fd): Ditto.
+
+       * buffer.c (packetizing_buffer_input): Use size_t rather than int.
+       (struct packetizing_buffer): Ditto.
+
+2004-09-07  Mark D. Baushke  <address@hidden>
+
+       * server.c (server_updated): Deal with cvs -n update -jt1 -jt2
+       "protocol error: uncounted data discarded" problem.
+       * sanity.sh (join7): New test for this case.
+
+2004-09-04  Derek Price  <address@hidden>
+
+       * socket-client.c (socket_client_initialize): Pass new args to
+       buf_initialize.
+
+2004-09-04  Derek Price  <address@hidden>
+
+       Silence `gcc -Wall'.
+
+       * buffer.c (buf_initialize): Remove unnecessary typecasts by using
+       size_t instead of int or bool as args.
+       * buffer.c, import.c, log-buffer.c, ms-buffer.c, zlib.c: Change all
+       callers.
+       * buffer.h, cvs.h: Update protos.
+       * client.c, ls.c, main.c, rcs.c, root.c, server.c: Remove unused vars,
+       add parens, as requested by `gcc -Wall'.
+
+2004-09-04  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (writeproxy-noredirect): Between "Set" and
+       "expand-modules" are the optional Kerberos-encrypt, Gssapi-encrypt
+       and Gssapi-authenticate entries. Use ${DOTSTAR} to deal with
+       these optionally configured requests.
+
+2004-09-04  Mark D. Baushke  <address@hidden>
+
+       * import.c (expand_at_signs): Typecasting for fwrite results.
+       * log-buffer.c (log_buffer_input, log_buffer_output,
+       log_buffer_initialize): Ditto.
+
+       * log-buffer.c (log_buffer_initialize): Protect reference to
+       fatal_errors.
+
+       * parseinfo.c (parse_config): Protect reference to PrimaryServer
+       using #ifdef PROXY_SUPPORT.
+
+       * ls.c (ls_fileproc): Remove unused variables.
+       * subr.c (increment_revnum): Ditto.
+       * vers_ts.c (time_stamp): Ditto.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_checkin), commit.c (remove_file): Accept UPDATE_DIR
+       argument and use it to output full relative path on commit.
+       * rcs.h (RCS_checkin): Update prototype.
+       * checkin.c, commit.c, import.c: Change all callers.
+       * sanity.sh: Adjust to compensate.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * client.c (call_in_directory): Change passed in function to accept
+       void * to avoid typecasting.  Change all functions using this API.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * sanity.sh (secondary-wrapper, writeproxy-secondary-wrapper): Improve
+       comments.  Use exec to launch server.
+       (writeproxy-noredirect): New tests for writeproxy functionality in
+       conjunction with clients that cannot handle the `Redirect' response.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * log-buffer.c, rsh-client.c, client.c: Reformat function headers.
+       Remove unnecessary typecasts and prototypes.
+       * client.h: Remove unnecessary extern declarations on protos.
+
+2004-09-03  Derek Price  <address@hidden>
+
+       * sanity.sh (skip): New function.
+       (sshstdio): Use new function.
+       (writeproxy): Skip test when rsync isn't found.
+
+2004-09-02  Mark D. Baushke  <address@hidden>
+
+       * server.c (serve_directory): C89 compilers do not like mixed
+       declarations and code.
+
+2004-08-19  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (sync-secondary): 'dirname -b' fails during the
+       spacefiles-5 test on FreeBSD, so use 'dirname -- "\$dir"' for now
+       and look to AS_DIRNAME at some future date.
+
+2004-08-19  Derek Price  <address@hidden>
+
+       * sanity.sh (ssh-wrapper): Create for $proxy mode too & forward CVS_PID
+       for crerepos.
+
+2004-08-18  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (writeproxy): Use CVS_PID instead of PPID as the
+       former environment variable is set by cvs and the latter is
+       NOT set by all bourne shells.
+
+2004-08-18  Mark D. Baushke  <address@hidden>
+
+       * log-buffer.c (log_buffer_rewind): Avoid FreeBSD compilation
+       error for dereferencing a void * pointer tmp as well as using it
+       as a buffer pointer under some conditions.
+
+2004-08-17  Derek Price  <address@hidden>
+
+       * server.c (isProxyServer): Always compile.  Cache hostname lookup.
+       (serve_notify): Ignore notifications in conjunction with redirects.
+       (do_cvs_command): Send an error when !PROXY_SUPPORT and a client does
+       not support redirects.  Only close proxy logs when they exist.
+       (serve_command_prep): New function.
+       * sanity.sh (secondary-wrapper, writeproxy): Dynamically switch the
+       servers proxy/primary status for testing.
+       (basica): Gratuitous reformatting.
+       (devcom3, config, release): Handle some new proxy/redirect error
+       messages.
+
+2004-08-17  Derek Price  <address@hidden>
+
+       * main.c (PrimaryServer): Include without PROXY_SUPPORT to support
+       redirects.
+       (main): Handle --primary-root without PROXY_SUPPORT.
+       * mkmodules.c (PrimaryServer), parseinfo.c (parse_config), root.c
+       (primary_root_add, primary_root_translate,
+       primary_root_inverse_translate): Likewise.
+
+2004-08-17  Derek Price  <address@hidden>
+
+       * client.c: Misc reformatting.
+       (handle_redirect, close_connection_to_server): New functions.
+       (failure_exit,*): s/int/bool/.
+       (responses): Add `Redirect'.
+       (get_server_responses): Handle response_type_redirect.
+       (get_responses_and_close): Use close_connection_to_server().
+       (supported_request): Change API to use bool & const.
+       (start_server): Handle response_type_redirect.
+       * client.h (supported_request): Update proto.
+       (type): Add response_type_redirect.
+       * main.c (lookup_command_attribute): Declare arg const.
+       * cvs.h (lookup_command_attribute): Ditto.
+       * sever.c (requests): Create dummy `Command-prep' request.
+
+2004-08-12  Derek Price  <address@hidden>
+
+       * main.c (main): Don't process --primary-root without PROXY_SUPPORT.
+       * root.c (primary_root_translate, primary_root_inverse_translate):
+       Declare inline.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * ms-buffer.h, ms-buffer.c: Disable contents without PROXY_SUPPORT.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * server.c (isProxyServer): Declare inline.
+       (reprocess_proxy_log): Rename to...
+       (rewind_buf_from_net): ...this and change all callers.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * sanity.sh (sync-secondary): Don't bother to log sync activity.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * buffer.c (buf_copy_data), buffer.h (buf_copy_data), log-buffer.c
+       (log_buffer_initialize, log_buffer_input, log_buffer_output,
+       log_buffer_rewind, log_buffer_closelog), log-buffer.h
+       (log_buffer_initialize), main.c (MaxProxyBufferSize), mkmodules.c
+       (config_contents), parseinfo.c (parse_config), server.c (server):
+       Switch eariler support for logs in memory buffers on
+       TRUST_OS_FILE_CACHE.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * buffer.c (buf_free_data, buf_copy_data): Only compile with proxy
+       support.
+       * buffer.h: Ditto for including the protos.
+
+2004-08-11  Derek Price  <address@hidden>
+
+       * buffer.c (fd_buffer_input): Bracket misguided attempt at improved
+       I/O efficiency with TRUST_OS_FILE_CACHE pragmas.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * cvs.h, main.c, mkmodules.c, parseinfo.c, server.c:
+       s/MaxSecondaryBufferSize/MaxProxyBufferSize/.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * sever.c (secondary_log, secondary_log_out): Rename globals everywhere
+       to...
+       (proxy_log, proxy_log_out): ...these.
+       (isSecondaryServer): Rename function...
+       (isProxyServer): ...to this.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * log-buffer.c: #ifdef PROXY_SUPPORT in appropriate places.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * cvs.h, log-buffer.h, main.c, mkmodules.c, parseinfo.c, server.c:
+       s/SECONDARY_SUPPORT/PROXY_SUPPORT/.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * server.c (isSecondaryServer): Declare static.
+       * server.h (isSecondaryServer): Remove proto.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * log-buffer.h (log_buffer_rewind, log_buffer_closelog): Don't define
+       protos without SECONDARY_SUPPORT.
+       * server.c (*): #ifdef correctly for !SECONDARY_SUPPORT.
+       * version.c (version): Remove unused code.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * server.c (server_cleanup): Remove unused variable.
+
+2004-08-10  Derek Price  <address@hidden>
+
+       * server.c (buf_from_net_save): Remove obsolete variable.
+       (server_cleanup): Don't close BUF_FROM_NET_SAVE.
+
+2004-08-09  Derek Price  <address@hidden>
+
+       * sanity.sh (sync-secondary, *info): Sync only the updated directories
+       rather than the entire repository after a write for a minor efficiency
+       improvement.
+       (info, taginfo): Hack *info to sync all dirs for these tests rather
+       than rewriting the sync-secondary script to handle old-style *info
+       format strings.
+
+2004-08-05  Derek Price  <address@hidden>
+
+       Beginnings of support for turning off writeproxy support (still broke.)
+       * cvs.h (PrimaryServer, MaxSecondaryBufferSize), main.c (PrimaryServer,
+       MaxSecondaryBufferSize), mkmodules.c (config_contents), parseinfo.c
+       (parse_config): Switch off when writeproxy support disabled.
+       * server.c (replace_file_offset, move_file_offset): Comment out
+       temporarily.
+
+2004-08-05  Derek Price  <address@hidden>
+
+       * filesubr.c (copy_file): Don't fsync.  It's slow.
+
+2004-08-05  Derek Price  <address@hidden>
+
+       * buffer.c (buf_copy_data): New function.
+       * buffer.h: Proto new function.
+       * cvs.h (MaxSecondaryBufferSize): Declare new config global.
+       * log-buffer.c: Allow file-backed memory buffers for "speed".
+       (struct log_buffer): Add new fields.
+       (log_buffer_force_file): New function.
+       (log_buffer_initialize): Initialize new fields.
+       (log_buffer_input, log_buffer_output): Handle logging to memory when
+       asked.
+       (log_buffer_disable): Remove function, moving much functionality...
+       (log_buffer_rewind): ...to this new function and expanding.
+       (log_buffer_closelog): Handle new fields and structs.
+       (log_buffer_get_fd): Remove function.
+       (setup_logfiles): Use new _initialize API.
+       * log-buffer.h: Update protos to match.
+       * main.c (MaxSecondaryBufferSize): Init new config global.
+       * mkmodules.c (config_contents): Add comments 4 MaxSecondaryBufferSize.
+       * parseinfo.c (parse_config): Parse MaxSecondaryBufferSize..
+       * server.c (secondary_log_name, secondary_log_out_name): Remove unused
+       globals.
+       (read_secondary_log): Remove function.
+       (reprocess_secondary_log): Use log_buffer_rewind() instead of the above.
+       (become_proxy): Ditto.
+       (server_cleanup): No need to clean up logfiles any longer.
+       (server): Use new log_buffer_initialize API.
+
+2004-08-04  Derek Price  <address@hidden>
+
+       * buffer.c (buf_read_data): s/abort/assert/.
+
+2004-08-04  Derek Price  <address@hidden>
+
+       * server.c (loop_over_inputs): Remove function, moving contents back...
+       (server): ...to here.
+
+2004-08-03  Derek Price  <address@hidden>
+
+       Checking in IO changes intended to improve speed for posterity since
+       they actually increase CPU usage by about .2% in remote mode and 5% in
+       writeproxy mode.
+       * Makefile.am (cvs_SOURCES): Add ms-buffer.c & ms-buffer.h.
+       * buffer.c (buf_free_data): New function.
+       (buf_read_data): s/abort/assert/.
+       (fd_buffer_input): Try to improve efficiency of blocking read.
+       * buffer.h (buf_free_data): New proto.
+       * server.c (reprocess_secondary_log): Only reopen log and attach to
+       BUF_FROM_NET - don't actually loop over inputs.
+       (become_proxy, serve_co, do_cvs_command): Use new log from above.
+       * ms-buffer.c, ms-buffer.h: New files.
+
+2004-08-03  Derek Price  <address@hidden>
+
+       * sanity.sh (TIMING): Make this work when not in $remotehost mode.
+       (reserved-13b): Use sorted output.
+
+2004-08-03  Derek Price  <address@hidden>
+
+       * log-buffer.c: Improve comments.
+
+2004-08-02  Derek Price  <address@hidden>
+
+       * sanity.sh (ssh-wrapper): Export CVSUMASK to remote host.
+       (*): Remove some hacks that were needed because CVSUMASK was not
+       exported to the remote host.  Misc cleanup.
+
+2004-07-28  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (pserver-auth-no-dos): ENOMEM on Solaris 7, 8, 9, and
+       AIX 4.3 all use the text "Not enough space" instead of the text
+       "Cannot allocate memory" as is printed on GNU/Linux, NetBSD, and
+       FreeBSD systems.
+
+2004-07-28  Derek Price  <address@hidden>
+
+       * sanity.sh (ssh-wrapper): Export CVS_RSH on remote host.
+
+2004-07-28  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (secondary-wrapper): Not all $TESTSHELL shells
+       are able to set a variable and export it at the same time.
+       Separate the value assignment from the export statement.
+       (writeproxy-secondary-wrapper): Ditto.
+
+2004-07-28  Derek Price  <address@hidden>
+
+       * server.c (isSecondaryServer): Fix array out of bounds problem.
+       * sanity.sh (ssh-wrapper): Wrap any rsh implementation we are handed to
+       forward variables relevant to testing.  Add new $TIMING variable to
+       allow timing of processes on a remote host.
+       (*): Gratuitous reformatting.
+
+2004-07-26  Derek Price  <address@hidden>
+
+       * server.c (read_secondary_log): Minor comment corrections.
+
+2004-07-23  Derek Price  <address@hidden>
+
+       * buffer.c (fd_buffer_output): Don't fsync.  It is unneeded and slow.
+       * server.c (move_file_offset, replace_file_offset): Ditto.
+       * log-buffer.c (log_buffer_flush_log): Remove function.
+
+2004-07-19  Derek Price  <address@hidden>
+
+       * log-buffer.c (log_buffer_disable): Return log FILE *.  Don't close
+       log.  Fix header comment.
+       (log_buffer_closelog): New function.
+       * log-buffer.h: Update protos to match.
+       * server.c (read_secondary_log): Rewind file pointer rather than
+       closing and reopening file for speed.
+       (serve_root): Close secondary log rather than just disabling when not
+       running in secondary mode.
+
+2004-07-19  Derek Price  <address@hidden>
+
+       * buffer.c (buf_flush): Replace abort w/assert.
+       * log-buffer.c (log_buffer_flush_log): New function for syncing a log.
+       (log_buffer_flush, log_buffer_flush): Don't sync log for speed.
+       * log-buffer.h (log_buffer_flush_log): New proto.
+       * sanity.sh: Tidy.
+       (run_filter): Accept file name to filter as argument.
+       (dotest_*): pass new arg to run_filter.
+       * server.c (read_secondary_log): Sync log before reopening.
+
+2004-07-16  Derek Price  <address@hidden>
+
+       * buffer.c (fd_buffer_input): Back out previous two changes due to
+       incompatibility with current state of write proxies.
+       * log-buffer.c (log_buffer_initialize): Handle new buffers which
+       already have some data in them.
+       (log_buffer_input): Don't fsync here.  It is slow.
+       * server.c (serve_root): Disable the secondary output log too.
+       (serve_noop, pserver_authenticate_connection): Misc cleanup.
+       * sanity.sh: Misc gratuitous cleanup.
+
+2004-07-16  Derek Price  <address@hidden>
+
+       * buffer.c (fd_buffer_input): Don't overwrite the input buffer the
+       second time through the blocking read loop.
+
+2004-07-15  Derek Price  <address@hidden>
+
+       * buffer.c (fd_buffer_input): Improve efficiency.
+       * sanity.sh (modify_repo): Move timestamp race avoidance to...
+       (sync-secondary): This script.
+       (big): Misc cleanup.
+
+2004-07-15  Derek Price  <address@hidden>
+
+       * sanity.sh: Misc gratuitous cleanup.
+       (modify_repo): Sleep 1 before rsync to avoid timestamp comparison
+       issues.
+
+2004-07-15  Derek Price  <address@hidden>
+
+       * log-buffer.c (log_buffer_output): Remove extremely slow fsync call.
+       (log_buffer_disable): Move to here so log files are sync'd before
+       close.
+       * sanity.sh (run_filter): New function to allow for filtering of cruft
+       output by Rational Quantify or other profilers.
+       (dotest_*): Call new function.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * server.c (prepost_proxy_proc): Add the CVSROOT string for the primary
+       server, as documented.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * tag.c (tag_filesdoneproc): Don't track posttag errors.
+       (cvstag): Move addition of successful tags to val-tags to...
+       (tag_fileproc): ...here and...
+       (rtag_fileproc): ...here.  Consolidate returns at single location.
+       (*): Misc reformatting.
+       * sanity.sh (sync-secondary): Include more data in the update-log.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore coverage data generated by GCC.
+
+2004-07-12  Derek Price  <address@hidden>
+
+       * sanity.sh: Watch $servercvs and other minor fixes.
+
+2004-07-12  Derek Price  <address@hidden>
+
+       * server.c: Gratuitous reformatting.
+       * sanity.sh: Misc write proxy accommodations.
+
+2004-07-11  Derek Price  <address@hidden>
+
+       * log.c (log_fileproc, log_expand_revlist, log_fix_singledate,
+       log_count_print, log_tree, log_abranch, log_version), parseinfo.c
+       (Parse_Info, parse_config), rcs.c (RCS_fully_parse, rcsbuf_getkey,
+       rcsbuf_getrevnum, rcsbuf_valword, RCS_getbranchpoint, RCS_getdate,
+       RCS_getrevtime, RCS_checkout, RCS_findlock_or_tip, RCS_addbranch,
+       RCS_cmp_file, RCS_lock, RCS_unlock, RCS_delete_revs, RCS_deltas,
+       RCS_getdeltatext, RCS_putdtree): Print primary path.
+       * server.c (serve_kopt): Handle secondary log.
+       * sanity.sh: Misc accommodations.
+
+2004-07-11  Derek Price  <address@hidden>
+
+       * checkin.c (checkout_proc): Correct vi induced typo.
+
+2004-07-11  Derek Price  <address@hidden>
+
+       * admin.c (postadmin_proc), commit.c (precommit_proc), edit.c
+       (notify_proc), fileattr.c (postwatch_proc), logmsg.c (logfile_write),
+       server.c (prepost_proxy_proc), tag.c (posttag_proc, pretag_proc): Add
+       default %c format string.
+       * client.c, edit.c, lock.c, fileattr.c, mkmodules.c, myndbm.c,
+       parseinfo.c, recurse.c: Misc gratuitous cleanup.
+       * commit.c (commit_filesdoneproc): Move loginfo call to after CVSROOT
+       sync.
+       * checkout.c (checkout_proc), fileattr.c (fileattr_read), myndbm.c
+       (mydbm_open, mydbm_load_file): Print primary path.
+       * server.c (serve_checkin_time): Handle secondary log.
+       (prepost_proxy_proc): Move before first call.
+       (become_proxy): Move before first call.
+       (serve_notify): Become proxy for this request.
+       * sanity.sh: Misc accommodations.
+
+2004-07-10  Derek Price  <address@hidden>
+
+       * server.c (serve_notify): Handle secondary_log.
+
+2004-07-08  Derek Price  <address@hidden>
+
+       Intermediate checkin.  Adds some new server requests and test fixes.
+       * sanity.sh: Update tests to handle proxies and new hooks.
+       * cvs.h (CVSROOTADM_PREPROXY): Alphebetize & sub correct name.
+       * mkmodules.c (filelist): Alphabetize.
+       * server.c (serve_max_dotdot, serve_static_directory, serve_argumentx):
+       Handle secondary_log.
+       * tag.c (*): Misc gratuitous cleanup.
+
+2004-07-08  Derek Price  <address@hidden>
+
+       Intermediate checkin.  Adds preproxy, & postproxy hooks and some test
+       cruft to test everything.
+
+       * cvs.h (CVSROOTADM_*): Add new hook config files.
+       * log.c (log_fileproc): Print primary path.
+       * mkmodules.c (*_content): Add init content for new files.
+       (filelist): Add new files.
+       * rcs.c (RCS_parsercsfile_i): Set print_path.  Misc gratuitous cleanup.
+       (freercsnode): Free print_path.
+       * rcs.h (struct rcsnode): Add print_path.
+       * rcscmds.c (RCS_merge, RCS_exec_rcsdiff): Print primary path.
+       * server.c (isSecondaryServer): No longer static.
+       (serve_sticky, serve_argumentx): Handle secondary logging.
+       (prepost_proxy_proc): New function.
+       (become_proxy): Call pre & post proxy hooks.  Handle IO closing better.
+       * server.h (isSecondaryServer): No longer static.
+       * status.c (status_fileproc): Print primary path.
+       * sanity.sh: Accept --proxy argument and run in write proxy mode when
+       seen.  Misc fixes to account for other changes.  Misc gratuitous
+       cleanup.
+
+2004-07-02  Derek Price  <address@hidden>
+
+       Woo-hoo!  Write proxies work!
+       * client.c (open_connection_to_server): Set up log files...
+       (start_server): ...here.
+       * server.c (secondary_log_out_name, secondary_log_out): New globals.
+       (argument_cound, argument_vector, argument_vector_size): Move before...
+       (reprocess_secondary_log): ...referencing here.  Assume secondary_log.
+       (read_secondary_log): Accept buf & name args.
+       (serve_modified, serve_unchanged, serve_is_modified, serve_entry):
+       Handle logging pass.
+       (become_proxy): Use new output-to-client-log.  Verify buffers still
+       exist before using.
+       (output_dir): Translate paths to the client on the secondary.
+       (serve_co): Only reprocess the secondary log when one exists.
+       (server_cleanup): Free buf after shutdown.  Dispose of client output
+       log.
+       (server): Create client output log.
+       (*): Misc reformatting & detypecasting.
+       * log-buffer.c (log_buffer_output): Handle fatal_errors.
+       (log_buffer_flush): Don't operate on NULL streams.
+       (log_buffer_disable): Reformat so as not to confuse the optimizer.
+       * root.c (primary_root_translate): Remove unused variable and redundant
+       slash.
+       (primary_root_inverse_translate): New function.
+       * root.h: Add new proto.
+       * sanity.sh (writeproxy): Wrap server executables to set args and
+       server variables properly.  Fill in some test gaps.  Correct `cd' args.
+       Clean up wrappers.
+
+2004-06-30  Derek Price  <address@hidden>
+
+       * root.h (primary_root_add, primary_root_translate): New protos.
+       * root.c (primary_root_add, primary_root_translate): New functions.
+       * main.c (long_options): Add --primary-root.  Handle --primary-root
+       and --allow-root only with SERVER_SUPPORT.
+       (main): Ditto.
+       * server.c (move_file_offset): Set block before fsync.  Report
+       ftruncate errors.  Force sync after rearranging data.
+       (replace_file_offset): Force sync after replacing data.
+       (serve_directory): Translate roots based on --primary-root arg.
+       (serve_root): Likewise & don't rewrite the log file.
+       (become_proxy): Increment select's N arg because it is required.
+       (do_cvs_command): Use MAX macro appropriately.
+       * sanity.sh (writeproxy): Wrap the secondary server in such a way that
+       it gets the --primary-root option and the primary does not.  Move the
+       primary root out of the way for the read operations to prove only the
+       secondary was accessed.
+
+2004-06-30  Derek Price  <address@hidden>
+
+       * log-buffer.c (log_buffer_input, log_buffer_output): Flush logs as
+       soon as they are written to better diagnose hangs.
+
+2004-06-30  Derek Price  <address@hidden>
+
+       * client.c (connect_to_forked_server): Compile for SERVER_SUPPORT.
+
+2004-06-30  Derek Price  <address@hidden>
+
+       * buffer.c (buf_append_buffer): Handle NULL from->data.
+
+2004-06-28  Derek Price  <address@hidden>
+
+       * log-buffer.c (log_buffer_flush): Sync all, not just data.
+       * buffer.c (fd_buffer_flush): Ditto.  Ignore problems synchronizing
+       unsynchronizable descriptors.
+
+2004-06-28  Derek Price  <address@hidden>
+
+       Intermediate checkin on the way to enabling the write proxy.
+
+       * server.c (isSecondaryServer): Handle forked primary.
+       (read_secondary_log, move_file_offset, replace_file_offset,
+       become_proxy): New functions.
+       (reprocess_secondary_log): Use new read_secondary_log().
+       (serve_root): Replace `Root' request with new version for primary.
+       (do_cvs_command): Use new become_proxy() function.
+       (*): Gratuitous reformatting.
+       (server): Open new logs and avoid opening pipes to pserver twice.
+       * buffer.c (buf_initialize): Handle new LAST_INDEX & LAST_COUNT
+       initializers.
+       (*): Remove unnecessary typecasts.  Gratuitous reformatting.  Use
+       assert() rather than if()/abort().
+       (buf_append_buffer, buf_read_data, buf_copy_lines, buf_copy_counted):
+       Track LAST_INDEX & LAST_COUNT.
+       (buf_read_short_line): Track LAST_INDEX & LAST_COUNT.
+       * buffer.h (struct buffer): Add LAST_INDEX & LAST_COUNT.
+       * cvs.h: Include minmax.h.
+       * root.h (enum CVSmethod): Force null_method to 0.
+       * zlib.c: Remove unnecessary typecasts.  Gratuitous reformatting.  Use
+       assert() rather than if()/abort().
+
+2004-06-23  Derek Price  <address@hidden>
+
+       Checkout and probably other read-only commands now work.
+
+       * server.c (serve_expand_modules): Discard arguments even when
+       reprocessing.
+       (serve_argument): Always process arguments.
+       (serve_wrapper_sendme_rcs_options): Process in first pass.
+
+2004-06-23  Derek Price  <address@hidden>
+
+       Operate correctly in non-write proxy mode, delaying processing of most
+       commands until after the `Root' request is received.
+
+       * server.c (buf_from_net_save): New global variable to store the input
+       buffer from the client while the secondary log is being reprocessed.
+       (reprocessing): Global to track whether we are reprocessing.
+       (various redundant prototypes): Removed.
+       (fd_buffer_*): Remove unneeded typecasts.
+       (serve_valid_responses, serve_global_option, serve_set,
+       serve_valid_requests): Avoid processing twice.
+       (command_pid, outbuf_memory_error, input_memory_error): Moved above new
+       references.
+       (server): Factor loop over the client inputs to...
+       (loop_over_inputs): ...this new function.
+       (serve_root): Loop over secondary log of client inputs when we
+       discover we are not the secondary.
+       (*): Add !secondary_log assertions to verify that certain code paths
+       are not yet taken.
+       (do_cvs_command, serve_init): Add switch and pseudo-code comments about
+       what will need to be done on secondary servers.
+       (seve_noop): Print errors & "ok" in the first pass, skip "ok" but
+       restore handling of entries and notification in the second.
+       (serve_co): Note what will need to be done on secondaries.
+       (server_cleanup): Deal with buf_from_net_save when necessary.
+
+2004-06-22  Derek Price  <address@hidden>
+
+       * server.c (server): Move previously fatal error on failure to open a
+       secondary log to...
+       (serve_root): ...here, and only when we discover we are actually a
+       secondary server.
+       (server): Ensure an interrupt cannot dump core.
+
+2004-06-22  Derek Price  <address@hidden>
+
+       Enable the writeproxy log and turn it off when we determine we are not
+       running as a secondary server.
+
+       * log-buffer.c: Compile log buffer routines in server mode for write
+       proxy.
+       (struct log_buffer): Add fatal_error member.
+       (log_buffer_initialize, log_buffer_input): Allow for fatal write errors
+       for writeproxy.
+       (log_buffer_disable): Turn off the log when asked.
+       (log_buffer_shutdown): Close log via log_buffer_disable.
+       (log_buffer_input, log_buffer_output, log_buffer_flush): Don't operate
+       on the log when it doesn't exist.
+       (*): Misc gratuitous cleanup.
+       (setup_logfiles): Use new log_buffer_initialize API.
+       * log-buffer.h (log_buffer_initialize, log_buffer_disable): New
+       prototypes.
+       (log_buffer_initialize): Update prototype.
+       * server.c: Include log-buffer.h.  Gratuitous reformatting of pragmas.
+       (secondary_log_name, secondary_log): New globals.
+       (server): Set up recording for writeproxy.
+       (serve_root): Turn off recording when we determine that we are not a
+       secondary.
+
+2004-06-21  Derek Price  <address@hidden>
+
+       * sanity.sh (writeproxy): Verify that secondary is updated after a
+       commit.  Comment test that verifies that commit took place on primary.
+
+2004-06-10  Derek Price  <address@hidden>
+
+       * sanity.sh (writeproxy): Test response to a failing rsync.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * server.c (isSecondaryServer): New function.
+       (MAXHOSTNAMELEN): Move to top of file and improve comment.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * parseinfo.c (parse_config): Get my enum references correct.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * parseinfo.c (parse_config): Verify that the ProxyServer connection
+       method is valid.
+
+2004-09-02  Derek Price <address@hidden>
+
+       * server.c (do_cvs_command): Pass new args to fd_buffer_initialize().
+       (server): Don't initialize BUF_TO_NET & BUF_FROM_NET when
+       pserver_authenticate already did.
+       (pserver_read_line): New function to access pserver auth dialogue via
+       buffers.
+       (pserver_authenticate_connection): Init buffers to/from net and access
+       via pserver_read_line() and the buffer output functions.
+       (fd_buffer_*): Move to...
+       * buffer.c (fd_buffer_*): ...here.  Handle blocking input more
+       efficiently.
+       (buf_initialize): Handle get_fd() argument.
+       (buf_nonio_initialize, packetizing_buffer_initialize): Pass new
+       get_fd() argument.
+       (buf_copy_data, buf_free_data, buf_read_short_line, buf_get_fd,
+       packetizing_buffer_get_fd): New functions.
+       (bufread_line): Wrap buf_read_short_line().
+       (stdio_buffer_*): Remove these functions.
+       (*): Some reformatting of function headers.
+       * buffer.h (struct buffer, buf_initialize): Add get_fd().
+       (buf_read_short_line, buf_get_fd, buf_copy_data, buf_free_data,
+       fd_buffer_initialize): New prototypes.
+       * client.c (get_port_number, get_cvs_port_number,
+       get_proxy_port_number): Compile with SERVER_SUPPORT.
+       (make_bufs_from_fds): Likewise, and accept new ROOT arg and pass on to
+       fd_buffer_initialize().
+       (connect_to_pserver, connect_to_forked_server): Pass ROOT to
+       make_bufs_from_fds().
+       (start_server): Factor much functionality into...
+       (open_connection_to_server): ...this new function.
+       * client.h (make_bufs_from_fds): Update proto.
+       (open_connection_to_server): New proto.
+       * log-buffer.c (log_buffer_initialize): Handle get_gd().
+       (log_buffer_get_fd): New function.
+       * zlib.c (compress_buffer_initialize, compress_buffer_get_fd): Ditto
+       twice.
+       * rsh-client.c (start_rsh_server): Pass ROOT to make_bufs_from_fds().
+       * sanity.sh (pserver): Expect new error messages.
+
+2004-09-01  Derek Price <address@hidden>
+
+       * run.c: Remove unneeded typecasts.  Reformat function headers.  Fix
+       trace.
+
+2004-08-31  Derek Price <address@hidden>
+
+       * subr.c (format_cmdline), cvs.h (format_cmdline): Accept bool rather
+       than int.
+       * admin.c, commit.c, edit.c, fileattr.c, logmsg.c, tag.c: Change all
+       callers.
+       * main.c (UseNewInfoFmtStrings), cvs.h (UseNewInfoFmtStrings):
+       s/int/bool/.
+       * parseinfo.c: Change all references.
+
+2004-08-31  Derek Price <address@hidden>
+
+       * checkout.c: Reformat function headers.  Remove unnecessary typecasts
+       and prototypes.  Some other reformatting for legibility.
+
+2004-08-31  Derek Price <address@hidden>
+
+       * buffer.c: Gratuitous reformatting of header comments.
+       s/abort/assert/.  Remove unnecessary typecasts.
+       * buffer.h: Remove unnecessary "extern" decls.  Some reformatting.
+
+2004-08-24  Derek Price <address@hidden>
+
+       * recurse.c (start_recursion): Don't shorten //. to / (use //).
+
+2004-08-24  Derek Price <address@hidden>
+
+       * recurse.c (start_recursion): Strip trailing CWD indirections on
+       repository.
+       * sanity.sh (rstar-toplevel): Update to account for new behavior.
+       (Report from Dan Peterson <address@hidden>.)
+
+2004-08-24  Mark D. Baushke  <address@hidden>
+
+       * recurse.c (do_recursion): Correct test for calling
+       server_pause_check to occur when locktype != CVS_LOCK_WRITE.
+       (Patch suggested by Ian Lance Taylor <address@hidden>
+       in bug#198).
+
+2004-08-24  Derek Price <address@hidden>
+
+       * sanity.sh: Update a few tests to account for the recent error message
+       changes.
+
+2004-08-24  Derek Price <address@hidden>
+
+       * rcs.c (RCS_valid_rev): Declare arg const.
+       * rcs.h: Likewise.
+
+2004-08-24  Derek Price <address@hidden>
+
+       * rcs.c (translate_symtag): Prevent infinite loop.
+       * tag.c (tag_check_valid): Check tag syntax before searching for tags.
+       * sanity.sh (tag-space): Some tests for the above.
+       (Report from Dan Peterson <address@hidden>.)
+
+2004-08-24  Derek Price <address@hidden>
+
+       * tag.c (tag_check_valid): Use RCS_valid_rev() rather than duplicating
+       code.  Misc error message improvements.
+
+2004-08-24  Mark D. Baushke  <address@hidden>
+
+       * ignore.c (ignore_directory): Include the terminating NUL
+       character in the directory name comparison to avoid matching
+       substrings of directories by accident.
+       (Report and suggested fix from James E Wilson
+       <address@hidden>.)
+       * sanity.sh (modules4): Add some more tests testing the above
+       change.
+
+2004-08-20  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (binfiles): Cleanup the 2a temporary directory.
+
+2004-08-20  Derek Price <address@hidden>
+
+       Cache tags in val-tags on successful creation to avoid problems with
+       write proxies.  Merged from `writeproxy2' branch.
+
+       * tag.c (tag_filesdoneproc): Don't track posttag errors.
+       (cvstag): Move addition of successful tags to val-tags to...
+       (tag_fileproc): ...here and...
+       (rtag_fileproc): ...here.  Consolidate returns at single location.
+       (*): Misc reformatting.
+
+       * tag.c (add_val_tag): New function with content factored from...
+       (tag_check_valid): ...here.
+       (cvstag): Call add_val_tag() when needed.
+       * annotate.c, checkout.c, commit.c, diff.c, ls.c, patch.c, recurse.c,
+       tag.c, update.c: Pass new args to tag_check_valid.
+
+       Merge of postadmin, posttag, and postwatch functionality from
+       `writeproxy2' branch.
+
+       * admin.c (postadmin_proc), commit.c (precommit_proc), edit.c
+       (notify_proc), fileattr.c (postwatch_proc), logmsg.c (logfile_write),
+       server.c (prepost_proxy_proc), tag.c (posttag_proc, pretag_proc): Add
+       default %c format string.
+
+       * cvs.h (CVSROOTADM_POSTWATCH): New macro.
+       * fileattr.c (*): Misc cleanup.
+       (postwatch_proc): New function.
+       (fileattr_write): Call watch proc when done writing fileattr.
+       * mkmodules.c (postwatch_contents): New var.
+       (filelist): Add postwatch.
+       * watch.c (addremove_filesdoneproc): Remove function.
+       (watch_addremove): Don't call above function.
+       (*): Misc cleanup.
+       * watch.h: Remove some unnecessary "extern" decls.
+
+       * admin.c (postadmin_proc, admin_filesdoneproc): New functions.
+       (admin): Pass admin_filesdoneproc() to start_recursion().
+       (*): Misc gratuitous cleanup.
+       * cvs.h (CVSROOTADM_*): Alphabetize, add new hook config files.
+       (format_cmdline): Fix proto to match change below.
+       * mkmodules.c (*_content): Add init content for new files.  Misc
+       cleanup.
+       (filelist): Add new files.
+       * tag.c (struct pretag_proc_data): Move before first use.
+       (posttag_proc, tag_filesdoneproc): New functions.
+       (rtag_proc): Pass new procs to start_recursion().
+       (*): Misc gratuitous cleanup.
+       * sanity.sh: Misc accommodations.
+
+2004-08-19  Mark D. Baushke  <address@hidden>
+
+       * log-buffer.c (log_buffer_output): Protect call to fsync()
+       with #ifdef HAVE_FSYNC.
+
+2004-08-18  Mark D. Baushke  <address@hidden>
+
+       * log-buffer.c (log_buffer_input): Protect call to fsync()
+       with #ifdef HAVE_FSYNC.
+
+2004-08-17  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (sshstdio): Fix comment typo plus gratuitous
+       reformatting.
+
+       * client.c (handle_m): Workaround to deal with stdio getting put
+       into non-blocking via redirection of stderr and interaction with
+       ssh on some platforms. On those boxes, stdio can put stdout
+       unexpectedly into non-blocking mode which may lead to fwrite() or
+       fflush() failing with EAGAIN, but cvs not checking for the error.
+       (Patch suggested by Frank Hemer <address@hidden>.)
+
+       * client.c (handle_e): Similar fix for stderr.
+       * sanity.sh (sshstdio): New test for non-blocking stdio via ssh.
+
+2004-08-11  Derek Price <address@hidden>
+
+       * sanity.sh (basicc): Work around a problem in Linux 2.2 & Bash 2.05b
+       which prevents a `cd ..' from a deleted directory from working.
+       (Original patch from Matthew Ogilvie <address@hidden>.)
+
+2004-07-18  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (newb-123j0): Use DOTSTAR at end of response.
+
+2004-07-17  Mark D. Baushke  <address@hidden>
+
+       * main.c (ImportNewFilesToVendorBranchOnly): New variable.
+       * cvs.h (ImportNewFilesToVendorBranchOnly): Declare new variable.
+       * import.c (import): Respect setting of
+       ImportNewFilesToVendorBranchOnly.
+       * mkmodules.c (config_contents): Document the default
+       ImportNewFilesToVendorBranchOnly=no option in newly generated
+       config files.
+       * parseinfo.c (parse_config): Parse
+       ImportNewFilesToVendorBranchOnly option.
+       * sanity.sh (importX2): New test, to test
+       ImportNewFilesToVendorBranchOnly config file option.
+       (New feature from Chris Demetriou <address@hidden>.)
+
+2004-07-17  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (basic2-14): Use DOTSTAR to be more portable.
+
+       * status.c (status_fileproc): Print datetimes using output_cvs_tagged.
+       * sanity.sh (basic2-14): Allow for an extra blank line at the end.
+
+2004-07-16  Derek Price  <address@hidden>
+
+       * server.c (pamh): New global static to hold the PAM handle.
+       (server): Close the PAM session so that logging works properly.
+       (switch_to_user): Opens a PAM session and gets credentials from PAM so
+       that PAM modules can change group permissions.  Get the username from
+       PAM so that PAM modules can modify the final local username.
+       (cvs_pam_conv): Changed the assertions to allow PAM to output text to
+       the user.
+       (check_system_password): Renamed to...
+       (check_pam_password): ...this.  Changed argument type for username so
+       that PAM modules can modify the username under authentication.  Setting
+       a terminal so some PAM modules which expect it to be set work, it is
+       set to the pam servicename which defaults to the binary name.  Set the
+       username from PAM after authentication if a module has changed it.
+       (check_password): Calls check_pam_password if PAM is enabled otherwiseu
+       calls check_system_password.
+       (Patch from Brian Murphy <address@hidden>.)
+
+2004-07-15  Derek Price  <address@hidden>
+
+       * sanity.sh (run_filter): New function to allow for filtering of cruft
+       output by Rational Quantify or other profilers.
+       (dotest_*): Call new function.
+
+2004-07-13  Derek Price  <address@hidden>
+
+       * .cvsignore: Ignore GCC profiling data.
+
+2004-07-12  Derek Price  <address@hidden>
+
+       * client.c: Misc reformatting.
+
+2004-07-12  Derek Price  <address@hidden>
+
+       * main.c: fix format_time_t to call localtime
+       (Patch from Bart Robinson  <address@hidden>.)
+
+2004-07-02  Derek Price  <address@hidden>
+
+       * vers_ts.c: Gratuitous reformatting & detypecasting.
+
+2004-06-30  Derek Price  <address@hidden>
+
+       * log-buffer.c (log_buffer_input, log_buffer_output): Flush logs as
+       soon as they are written to better diagnose hangs.
+
+2004-06-29  Derek R. Price  <address@hidden>
+
+       * sanity.sh (toplevel-12): Handle new error output.
+
+2004-06-29  Derek R. Price  <address@hidden>
+
+       * subr.c (xrealloc_and_strcat): Use bool in place of short.
+
+2004-06-29  Derek R. Price  <address@hidden>
+
+       * client.c: Gratuitous reformatting.
+       (send_repository): Send relative Directory when server reports it is
+       able to handle it.
+       * server.c (serve_directory): Handle relative directories.
+       (output_dir): Send relative directories.
+       (requests): Add `Relative-directory' request.
+
+2004-06-26  Mark D. Baushke  <address@hidden>
+
+       * import.c (import_usage): Add new -X flag.
+       (import): Handle new -X flag.
+       (process_import_file): Handle new -X flag.
+       (killnew): New static flag variable to indicate use of -X flag.
+       (preserve_initial_permissions): New function, extracted from
+       add_rcs_file().
+       (expand_and_copy_contents): Likewise.
+       (add_rcs_file): New argument, do_killnew, to cause "import -X" flag
+       processing.  Implement -X flag, and use newly abstracted functions.
+       * rcs.h (add_rcs_file): Update prototype for do_killnew argument.
+       * commit.c (checkaddfile): Update for add_rcs_file function change.
+       * mkmodules.c (init): Likewise.
+       * client.c (handle_mt): Handle an importmergecmd tag without
+       any conflicts (for 'import -X' support).
+       * sanity.sh (importX): New test.
+       (New feature from Chris Demetriou <address@hidden>.)
+
+2004-06-22  Derek Price  <address@hidden>
+
+       * wrapper.c: Add explicit "void" return type to "wrap_clean_fmt_str"
+       definition.
+       (Patch from Conrad T. Pino <address@hidden>.)
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * server.c (entries, serve_is_modified): Reorder to remove prototypes.
+       (supported_response): Remove prototype.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * commit.c, filesubr.c, history.c, server.c, wrapper.c: Various
+       security fixes.
+       (Original patch from Stefan Essler <address@hidden> & Sebastian
+       Krahmer <address@hidden>.)
+
+       * cvs.h: Include xsize.h.
+
+2004-06-09  Derek Price  <address@hidden>
+
+       * server.c (serve_entry, serve_is_modified, serve_unchanged): Protect
+       against malformed entries.
+       * sanity.sh (server): Tests for same.
+
+2004-06-07  Larry Jones  <address@hidden>
+
+       * sanity.sh (basica): More tests for string-based revision inc.
+
+2004-06-04  Larry Jones  <address@hidden>
+
+       * subr.c (increment_revnum): Rewrite ala RCS to work directly on
+       the string rather than converting to int to avoid overflow.
+       * sanity.sh (basica): New tests for above, update others to match.
+
+2004-06-04  Derek Price  <address@hidden>
+
+       Preliminary writeproxy functionality.
+       * main.c: Declare PrimaryServer.
+       * cvs.h: Likewise, but extern.
+       * mkmodules.c: Add PrimaryServer to default CVSROOT/config content.
+       * parseinfo.c: Handle PrimaryServer line.
+       * sanity.sh: (Failing) tests for writeproxy functionality.
+
+2004-05-28  Derek Price  <address@hidden>
+
+       * main.c (format_time_t, gm_format_time_t): Use my_strftime from
+       GNULIB rather than the system-dependant strftime.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * sanity.sh: s/GMT/UTC/ where appropriate.
+
+2004-05-20  Derek Price  <address@hidden>
+
+       * server.c (cvs_output_tagged): Move new server code inside a
+       SERVER_SUPPORT block.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * cvs.h (gmformat_time_t, entries_time, unix_time_stamp): New protos.
+       * ls.c (struct long_format_data): New structure.
+       (ls_print): Print datetimes using cvs_output_tagged.
+       (long_format_data_delproc): New function.
+       (ls_fileproc, ls_direntproc): Keep track of long_format_data.
+       * main.c (Make_Date): Use standard quotes.
+       (format_time_t, gmformat_time_t): New functions.
+       (format_date_alloc): Use new functions.  Improve comments.
+       * server.c (cvs_output_tagged): Only output in localtime in local mode.
+       * vers_ts.c (entries_time, unix_time_stamp): New functions.
+       (time_stamp): Use new functions.
+       * sanity.sh (ls, branches2): Use $ISO8601DATE where applicable.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       Output `cvs log' times in the local timezone.
+
+       * client.c (handle_mt): Handle the new "date" MT response
+       * server.c (cvs_output_tagged): Likewise
+       * cvs.h: Proto for format_date_alloc
+       * main.c (format_date_alloc, tm_diff): Added.
+       * log.c (log_version): Use MT response to tag date output.
+       (Original patch from Bart Robinson <address@hidden>.)
+
+       * sanity.sh (importc, rcs, rcs4): Use TZ=GMT for the duration of these
+       tests to obtain consistent times in output.
+       (ISO8601DATE, ISO8601DATE1971, ISO8601DATE2034): Use more precise
+       regex.
+
+2004-05-19  Derek Price  <address@hidden>
+
+       * server.c (serve_unchanged, serve_is_modified): Overwrite existing
+       data in timefields.  Fixes CAN-2004-0396.
+
+2004-05-15  Derek Price  <address@hidden>
+
+       * lock.c (Lock_Cleanup), rcs.c (rcs_cleanup), server.c
+       (server_cleanup):  Clean up inchoherent comment.
+
+2004-05-15  Derek Price  <address@hidden>
+
+       * cvs.h, client.c, history.c, main.c, rcs.c, sanity.sh, server.c:
+       Back out get_date() changes from 2004-04-28.
+
+2004-05-14  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (trailingslashes): During cleanup remove topfile,v to
+       avoid problems in later tests (editor-1).
+
+2004-05-13  Derek Price  <address@hidden>
+
+       * sanity.sh (trailingslashes): Note TODO item #205 in the comment.
+
+2004-05-13  Derek Price  <address@hidden>
+
+       * sanity.sh (trailingslashes): New tests to expose a bug in CVS when
+       paths are specified with trailing slashes.  This relates to TODO #205.
+
+2004-05-13  Mark D. Baushke  <address@hidden>
+
+       * ls.c (ls): Use client_senddate() so the server is able to parse
+       the date/time.
+
+2004-05-12  Derek Price  <address@hidden>
+
+       * entries.c, subr.c: Gratuitous reformatting.
+
+2004-05-12  Derek Price  <address@hidden>
+
+       * subr.c (file_has_conflict), vers_ts.c (time_stamp_server): Only
+       special case "=" when it is the only character in a timestamp field.
+       Gratuitous reformatting.
+       * vers_ts.c (time_stamp_server): Check for NULL in a consistent manner.
+       Gratuitous reformatting.
+
+2004-05-12  Derek Price  <address@hidden>
+
+       * sanity.sh (ls): Add some new tests of the ls command with dates
+       specified and show an assertion error when an existing file is
+       specifically requested.
+       (Original patch from Alexander Taler <address@hidden>.)
+
+2004-05-11  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (RCSKEYDATE): New regular expression to match the rcs
+       keyword date format.
+       (keyword,keywordlog): Use it.
+       (RCSDELTADATE): New regular expression to match the internal rcs
+       file format delta.
+       (admin): Use it.
+       (RCSDATE): Deleted.
+       (ISO8601DATE}: A more exact regular expression for cvs log date
+       output than the previous RCSDATE variable.
+       (basica,basic2,branches,branches3,multibranch,import,importb,importc,
+       join,modules,editor,binfiles,log,log2,keyword,multibranch2,admin,
+       reserved,recase,multiroot,trace):
+       Use ${ISO8601DATE} for cvs log output date patterns.
+       (TOUCH1971,ISO8601DATE1971): New variables for test importc.
+       (TOUCH2034,ISO8601DATE2034): Ditto.
+       (importc): Use them. Isolate the touch commands in a sub-shell
+       with TZ=GMT to make the time more predictable.
+       (RAWRCSDATE2000A,RAWRCSDATE1996A,RAWRCSDATE1996B): New date variables.
+       (ISO8601DATE2000A,ISO8601DATE1996A,ISO8601DATE1996B): Regexps to match.
+       (rcs): Use them.
+       (rcs4): Put the touch commands into sub-shells for temporary
+       TZ=GMT use.
+
+2004-05-11  Derek Price  <address@hidden>
+
+       * checkin.c (Checkin), commit.c (commit_filesdoneproc, remove_file,
+       checkaddfile), rcs.c (RCS_checkin): Remove redundant commit messages.
+       Suppress output when really_quiet.
+       * sanity.sh: Update to match.
+
+2004-05-10  Derek Price  <address@hidden>
+
+       * sanity.sh (top-level): Rename to...
+       (rstar-toplevel): ...this for clarity.
+
+2004-05-10  Derek Price  <address@hidden>
+
+       * sanity.sh (dirs2-10ar): Remove unnecessary empty argument.
+
+2004-05-08  Larry Jones  <address@hidden>
+
+       * log.c (log_expand_revlist): Suppress warnings if really_quiet.
+
+2004-05-08  Derek Price  <address@hidden>
+
+       * server.c: Gratuitous reformatting.  Remove unnecessary prototype &
+       unnecessary type cast.
+
+2004-05-07  Derek Price  <address@hidden>
+
+       * sanity.sh (basica): Remove unnecessary empty arguments.
+
+2004-05-07  Derek Price  <address@hidden>
+
+       * cvs.h (fopen_case): Remove obsolescent prototype.
+
+2004-05-05  Derek Price  <address@hidden>
+
+       * sanity.sh: Wait a second and retry if cvs-serv* directories are
+       discovered to avoid race conditions on some systems.
+       (Patch from Pavel Roskin <address@hidden>.)
+
+2004-05-05  Derek Price  <address@hidden>
+
+       * commit.c: Some gratuitous reformatting.
+
+2004-05-04  Derek Price  <address@hidden>
+
+       * update.c: Some gratuitous reformatting.
+
+2004-05-04  Derek Price  <address@hidden>
+
+       * add.c (add): Remove obsolete FIXME comment.
+       (*): Some gratuitous reformatting.
+
+2004-05-03  Derek Price  <address@hidden>
+
+       * src/sanity.sh (branches2-14-ls-4): Change expectations due to new -d
+       flag.
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * sanity.sh (ls): Add some new tests of ls -d flag.
+       (Original patch from Alexander Taler <address@hidden>.)
+
+       * ls.c (ls): Accept -d to show dead files.
+       (ls_proc): Add W_ATTIC to start_recursion flags when user requests dead
+       files.
+       (ls_fileproc): Don't show dead files with -d.  Print "dead" in long
+       listings for dead files.
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * ls.c (ls_dirleaveproc): Return err.
+       (Original patch from Mark D. Baushke <address@hidden>.)
+
+2004-05-02  Derek Price  <address@hidden>
+
+       * ls.c (ls_print): Return 0.
+       (Patch from Mark D. Baushke <address@hidden>.)
+
+2004-04-30  Derek Price  <address@hidden>
+
+       * tag.c (tag_check_valid): Treat a NULL repository the same as an empty
+       one.
+       * sanity.sh (branches2-ls-7): Verify absence of assertion failure.
+
+2004-04-29  Derek Price  <address@hidden>
+
+       * sanity.sh (branches2-rls-1): Reformat comment.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * sanity.sh (rcs2-5): Update to cope with new getdate.y.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_LIBADD): Use libs for nanosleep & clock_gettime when
+       necessary.
+       * cvs.h: Remove get_date() proto and #include getdate.h.
+       * client.c, history.c, main.c, rcs.c, server.c: Use new form of
+       get_date().
+       * Makefile.in: Regenerated.
+
+2004-04-28  Derek Price  <address@hidden>
+
+       * lock.c (set_lock), subr.c (sleep_past): Assume we have nanosleep.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * root.c (normalize_cvsroot): Use asnprintf in preference to other
+       indirections.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       Add dirname module from GNULIB.
+
+       * add.c, client.c, commit.c, find_names.c, import.c, lock.c, ls.c,
+       repos.c, server.c, subr.c: s/ISDIRSEP/ISSLASH/.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * commit.c, create_adm.c, entries.c, filesubr.c, hash.c, update.c:
+       Gratuitious reformatting.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * ls.c (ls_direntproc): Remove unneeded assertion.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * ls.c (ls): Set client_prune_dirs in order to delete any directories
+       created by the server.
+       (ls_dirleaveproc): Always delete directories created by
+       ls_direntproc().
+       * sanity.sh (ls): Update to match.
+
+2004-04-27  Derek Price  <address@hidden>
+
+       * ls.c: Remove unneeded prototypes.  Add `prune' option.
+       (dircount): Remove static global.
+       (set_tag, created_dir, ls_prune_dirs): New static globals.
+       (ls): Handle new prune option.
+       (ls_print_dir): Don't count directories, just remember not to print a
+       blank line in front of the first one.  Don't list empty directories
+       when prune is specified.
+       (ls_delproc): New function to dispose of dirlist.
+       (ls_direntproc): Reorganize to assume a directory without a parent must
+       be listed.  Create missing directories a la update and checkout so that
+       they may be processed.  Use new delproc when creating new list nodes.
+       (ls_dirleave_proc): New function to remove directories created by
+       ls_direntproc.
+       (ls_proc): Call start_recursion() once for each argument so that
+       ls_direntproc() may assume that any directory without a parent in the
+       dirlist must be listed and others must not unless recursing.
+       * sanity.sh (ls): New tests.
+       (Thanks to a report from Mark D. Baushke <address@hidden>.)
+
+2004-04-26  Derek Price  <address@hidden>
+
+       * rsh-client.c (start_rsh_server): Don't rely on GNU argument
+       processing capabilities in the RSH command.
+       (Report from Mark Andrews <address@hidden>.)
+
+2004-04-26  Derek Price  <address@hidden>
+
+       * ls.c (dircount): s/long long/long/ for Windows.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * ls.c (usage): Sync with manual.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add ls.c.
+       * client.c, subr.c: Move #include vasnprintf.h to...
+       * cvs.h: ...here.
+       (ls): Add prototype.
+       * ls.c: New file.
+       * main.c (cmds): Add ls & rls entries.
+       * server.c (serve_ls, serve_rls): New functions.
+       (requests): Add list, ls, rlist, & global-list-quiet.
+       * sanity.sh (branches2): Test new cvs ls & rls commands.
+       * Makefile.in: Regenerated.
+       (Thanks for patches from Alexander Taler <address@hidden>
+       and Mark D. Baushke <address@hidden>.)
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * Makefile.am (AM_CPPFLAGS): No, really, $(top_builddir)/lib.
+       * Makefile.in: Regenerated.
+
+2004-04-23  Derek Price  <address@hidden>
+
+       * Makefile.am (AM_CPPFLAGS): Add the builddir/lib directory for
+       generated header files.
+       * Makefile.in: Regenerated.
+
+2004-04-22  Derek Price  <address@hidden>
+
+       * cvs.h: Move include of fnmatch.h into lib/system.h with the other
+        GNULIB headers.
+
+2004-04-22  Derek Price  <address@hidden>
+
+       * tag.c: Use bool where appropriate.  Some gratuitous reformatting.
+
+2004-04-19  Derek Price  <address@hidden>
+
+       * ignore.c: Gratuitous reformatting.
+
+2004-04-16  Derek Price  <address@hidden>
+
+       * tag.c: Gratuitous reformatting.
+
+2004-04-16  Derek Price  <address@hidden>
+
+       * client.c (connect_to_pserver): Use size_t instead of int as argument
+       to asnprintf.  Some gratuitous reformatting.
+       (Report from Mark <address@hidden>.)
+
+2004-04-15  Derek Price  <address@hidden>
+
+       * client.c, commit.c, server.c: Gratuitous reformatting.
+
+2004-04-11  Derek Price  <address@hidden>
+
+       * client.c (call_in_directory): Check paths the server sends us to make
+       sure they are within a sandbox the user requested be updated.
+       (is_valid_client_path, path_list_prefixed): New functions.
+
+2004-04-11  Derek Price  <address@hidden>
+
+       * modules.c (do_module): Don't allow up-level references in paths to
+       step out of the repository.
+       * sanity.sh (multiroot3): Update tests and add a few more.
+
+2004-04-11  Derek Price  <address@hidden>
+
+       * client.c (get_proxy_port_number): Use CVS_PROXY_PORT as the default
+       proxy port rather than CVS_AUTH_PORT.
+
+2004-04-10  Mark D. Baushke  <address@hidden>
+
+       * client.c (get_cvs_port_number): Use CVS_AUTH_PORT as the default
+       for "cvspserver" rather than the CVS_PROXY_PORT.
+       (Fixes parseroot-3r on machines without "cvspserver" in
+       their /etc/services file.)
+
+2004-04-07  Derek Price  <address@hidden>
+
+       * sanity.sh (parseroot): s/oberon/$username/.
+
+2004-04-06  Derek Price  <address@hidden>
+
+       Import Jim Kingdon's old, old patch which allows CVS to work via a
+       web proxy server.
+       * client.c (*): Some gratuitous restyling.
+       (get_proxy_port_number): New function.
+       (connect_to_pserver): Connect via proxy.
+       * client.h (CVS_PROXY_PORT): Define.
+       * root.c (parse_cvsroot): Parse method options.
+       * sanity.sh (parseroot): Add new tests.
+
+2004-04-06  Derek Price  <address@hidden>
+
+       * root.h (cvsroot_t): Move username, password, hostname, port inside
+       CLIENT_SUPPORT ifdefs.
+       * buffer.c, gssapi-client.c, root.c, sever.c: Add #ifdefs as necessary
+       so that this will compile without client support and the root.h change.
+       Some gratuitous restyling.
+
+2004-04-06  Derek Price  <address@hidden>
+
+       * log.c, tag.c: Gratuitous restyling.
+
+2004-04-04  Derek Price  <address@hidden>
+
+       * filesubr.c (isabsolute): Move...
+       * subr.c: ...here and use new ISABSOLUTE macro.
+
+2004-04-04  Derek Price  <address@hidden>
+
+       * client.c (send_file_names): Cast out an unneeded const to avoid a
+       warning.
+
+2004-04-03  Larry Jones  <address@hidden>
+
+       * cvsrc.c: Remove unused declarations.
+       * run.c: Ditto.
+       * server.h (gunzip_and_write): Declare.
+
+       * client.c (send_file_names): Remove unused variables.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh (client): Honor $keep.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * log.c, patch.c, rcs.c: Gratuitous restyling.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * import.c (import): Use ISDIRSEP rather than testing paths against `/'
+       directly.  Some gratuitos reformatting.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Note the effectiveness of `tail -f check.log' in providing
+       running status.
+
+2004-04-02  Derek Price  <address@hidden>
+
+       * client.c (send_file_names): Move code which calculates and sends
+       Max-dotdot...
+       (send_max_dotdot): ...to this new function.
+       (send_files): Call send_max_dotdot.
+       * sanity.sh (files-14): Expect .. in paths to work now.
+       (status): Add a few new tests using `..'.
+
+2004-04-01  Derek Price  <address@hidden>
+
+       * lock.c: Gratuitous restyling.
+
+2004-04-01  Derek Price  <address@hidden>
+
+       * commit.c, cvs.h, server.c: Gratuitous restyling.
+       * run.c (run_exec): Ditto, plus call cvs_flush{out,err}() instead of
+       flushing stderr & stdout directly.
+
+2004-03-29  Derek Price  <address@hidden>
+
+       * login.c, server.c: Gratuitous restyling.
+
+2004-03-25  Derek Price  <address@hidden>
+
+       * client.c (send_file_names): Initialize string to NULL rather than to
+       a single byte string containing only a null byte.
+       * subr.c (xrealloc_and_strcat): If the destination string is NULL,
+       simply allocate a new string.
+       (Original report from Chris Bohn <address@hidden>.)
+
+2004-03-24  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (ISODATE): Fix ISO 8601 format comment.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * sanity.sh (toplevel): Remove FIXME type comment and unneeded
+       Emtptydir removal.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * update.c: Some minor style cleanup.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * update.c: Some minor style cleanup.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * sanity.sh (top-level): Don't match most of the assertion since this
+       string is often system dependent.
+       (Thanks to Larry Jones <address@hidden>.)
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * sanity.sh (top-level): Don't match the assertion's line number.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * sanity.sh (top-level): New test to confirm assertion failure.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * sanity.sh: Only verify argument to -f when -f was passed.  Check for
+       $TMPDIR/cvsXXXXXX temp files after each test.
+
+2004-03-22  Derek Price  <address@hidden>
+
+       * sanity.sh: Verify that the argument to -f is really a test.
+
+2004-03-20  Larry Jones  <address@hidden>
+
+       * cvs.h: Change command_name to cvs_command_name to avoid conflict
+       on HP-UX (incredibly, it declares a global command_name in prot.h,
+       which is included from shadow.h, which we include in server.c).
+       Change all references.
+
+       * subr.c (previous_rev): Fix == vs = typo.
+
+       * buffer.h: Add prototype for buf_empty.
+
+       * add.c (add): Remove unused variable.
+
+2004-03-20  Derek Price  <address@hidden>
+
+       * add.c (add, add_directory, build_entry), admin.c (admin_dirproc),
+       checkin.c (Checkin), checkout.c (safe_location, build_dirs_and_chdir),
+       client.c (add_prune_candidate, send_repository, send_a_repository,
+       send_to_server, start_rsh_server, send_arg, send_modified,
+       send_ignproc, send_filesdone_proc, send_dirent_proc,
+       send_dirleave_proc, client_notify), commit.c (check_direntproc,
+       check_filesdoneproc, checkaddfile, commit_direntproc,
+       commit_dirleaveproc, lock_RCS, precommit_proc, find_data,
+       find_dirent_proc, find_ignproc, find_filesdoneproc), create_adm.c
+       (Create_Admin), cvsrc.c (read_cvsrc), diff.c (diff_dirproc,
+       diff_filesdoneproc, diff_dirleaveproc), edit.c (onoff_filesdoneproc,
+       mark_up_to_date, editor_set, notify_proc_args, notify_proc, notify_do,
+       notify_check), entries.c (Scratch_Entry, Register, WriteTag),
+       expand_path.c (expand_variable, expand_path), fileattr.c
+       (fileattr_startdir), filesubr.c (mkdir_if_needed, xchmod,
+       last_component), history.c (history_write), ignore.c (ignore_directory,
+       ignore_files), import.c (get_comment, add_rcs_file, expand_at_signs),xi
+       lock.c (lock_filesdoneproc), log.c (log_dirproc), logmsg.c
+       (logfile_write, rcsinfo_proc, update_logfile_proc, editinfo_proc,
+       verifymsg_proc, do_editor, do_verify, Update_Logfile), main.c (main
+       program_name, program_path, command_name), parseinfo.c (Parse_Info),
+       patch.c (patch_dirproc), rcs.c (RCS_getdatebranch, rcs_lockfilename,
+       RCS_parse, RCS_setattic, RCS_getversion, RCS_gettag, RCS_getbranch,
+       RCS_getdate, RCS_datecmp, RCS_getrevtime, RCS_setexpand,
+       expand_keywords, RCS_checkout, RCS_addbranch, RCS_checkin, RCS_lock,
+       RCS_cmp_file, RCS_deltas, rcs_lockfilename, make_file_label),
+       rcscmds.c (RCS_output_diff_options, call_diff, RCS_merge,
+       RCS_exec_rcsdiff, diff_exec), recurse.c (start_recursion, do_recursion,
+       do_file_proc), remove.c (remove_dirproc), repos.c (Name_Repository,
+       Short_Repository), root.c (Name_Root, Create_Root), run.c
+       (piped_child), server.c (output_dir, server_register,
+       server_checked_in, server_update_entries, server_copy_file,
+       server_set_entstat, server_clear_entstat, server_set_sticky,
+       server_template, cvs_output_tagged), status.c (status_dirproc), subr.c
+       (make_message_rcslegal), tag.c (pretag_proc, tag_dirproc,
+       check_fileproc, check_filesdoneproc, tag_fileproc, val_direntproc),
+       update.c (update_dirent_proc, update_dirleave_proc, update_ignproc,
+       update_filesdone_proc, isemptydir), vers_ts.c (time_stamp_server,
+       time_stamp), watch.c (watch_modify_watchers, addremove_filesdoneproc),
+       zlib.c (read_and_gzip): Make most string args const, mainly in the
+       interest of preserving repository & updatedir but including some
+       collateral damage.  Update a few functions to comply with new
+       requirement.  Some style fixes.
+       * client.h, cvs.h, edit.h, fileattr.h, rcs.h, server.h, update.h,
+       watch.h: Update prototypes to match.
+
+2004-03-20  Derek Price  <address@hidden>
+
+       * sanity.sh (conflicts2): s/cvs/$testcvs/.
+
+2004-03-20  Derek Price  <address@hidden>
+
+       * add.c (add): Correct longstanding resurrection bugs.  Remove FIXME
+       comment to this effect.  Set mode and Entries timestamps of resurrected
+       files correctly.
+       * sanity.sh (basica, binfiles, conflicts2, recase, resurrection,
+       update-p): Update tests to compensate.  Remove FIXCVS comments.
+
+2004-03-19  Mark D. Baushke  <address@hidden>
+
+       * server.c (gserver_authenticate_connection): Handle large
+       GSSAPI packets dynamically.
+       (Bug report from Douglas Engert <address@hidden>)
+
+2004-03-19  Derek Price  <address@hidden>
+
+       * cvs.h (pathname_levels, previous_rev): Remove leading underscore from
+       prototype arguments to avoid potential conflicts with implementations.
+
+2004-03-18  Derek Price  <address@hidden>
+
+       * cvs.h (pathname_levels): Make string argument const.
+       * subr.c (pathname_levels): Simplify function.
+
+2004-03-17  Derek Price  <address@hidden>
+
+       * commit.c (precommit_list_to_args_proc), logmsg.c (do_editor), subr.c
+       (format_cmdline), tag.c (pretag_list_to_args_proc):
+       s/atribute/attribute/.
+       (Report from Matthew Doar <address@hidden>.)
+
+2004-03-17  Derek Price  <address@hidden>
+
+       * subr.c (pathname_levels): Get it right this time.
+
+2004-03-17  Derek Price  <address@hidden>
+
+       * subr.c (pathname_levels): Remove incorrect assertion and just
+       return 0 when pathname is NULL.
+
+2004-03-17  Derek Price  <address@hidden>
+
+       * subr.c (pathname_levels): Use ISDIRSEP() instead of strchr('/')
+       and remove FIXME comment to that effect.
+
+2004-03-16  Derek Price  <address@hidden>
+
+       * main.c (main): Update the --version Copyright (c) string to
+       include 2004.
+
+2004-03-15  Mark D. Baushke  <address@hidden>
+
+       * release.c (release): Add missing xmalloc of update_cmd.
+
+2004-03-15  Derek Price  <address@hidden>
+
+       * release.c (release): Enable authentication and encryption for a child
+       update process when necessary.
+       (Original patch from Dan Russell <address@hidden> via Hal Mahaffey
+       <address@hidden>.)
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * add.c (add): Only call server_updated() when we actual have a new
+       resurrected file for the client.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * cvs.h (previous_rev, write_letter): New prototypes.
+       (struct file_info): Move to before the write_letter prototype.
+       * add.c (add): Allow resurrection of files which used to exist on a
+       branch.
+       * subr.c (previous_rev): New function.
+       * update.c: Consolidate like pragmas.
+        (write_letter): Remove prototype.  Remove static declaration.
+       * sanity.sh (resurrection): New tests.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * commit.c (remove_file): Print the actual previous revision instead of
+       a branch number.
+       * sanity.sh: Update to match.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_cmp_file): Print the actual name of the file we failed to
+       open in the error message.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * diff.c (diff_fileproc): Allow diffing of new files against arbitrary
+       revisions instead of assuming that there is no RCS archive file.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * sanity.sh: Update serveral tests to use $CPROG & $SPROG correctly.
+
+2004-03-14  Derek Price  <address@hidden>
+
+       * add.c (add): Update file resurrection messages for consistency.
+       * sanity.sh: Update to match.
+
+2004-03-13  Derek Price  <address@hidden>
+
+       * server.c (server_updated): Fix header comment.
+
+2004-03-13  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Remove error.h since it is now included in
+       lib.
+       * Makefile.in: Regenerated.
+
+2004-03-09  Larry Jones  <address@hidden>
+
+       * run.c: Move #includes required for cmdline_escape and friends...
+       * subr.c: ...to here.
+
+2004-03-07  Derek Price  <address@hidden>
+
+       * run.c (struct cmdline_bindings, cmdline_bindings_hash_node_delete,
+       cmdline_escape, cmdline_quote, format_cmdline): Move...
+       * subr.c: ...here so they will compile under Windows.
+
+2004-03-03  Derek Price  <address@hidden>
+
+       * import.c (import): Check that the module name specified by the user
+       does not contain `CVS' as a directory name.
+       * ignore.c (ign_add): Never cease ignoring "CVS" - it is a reserved
+       name.
+       (Original patch from Dan Peterson <address@hidden>.)
+
+       * sanity.sh (import-CVS): New tests for the above.
+
+2004-02-29  Larry Jones  <address@hidden>
+
+       * import.c (expand_at_signs): Change type of len to size_t.
+       * subr.c (resolve_symlink): Move declaration of newname inside
+       #ifdef, clean up coding style.
+       * zlib.c (gunzip_and_write): Fix up potential overlow problems.
+       (read_and_gzip): Add explicit casts to placate paranoid compilers.
+
+2004-02-28  Larry Jones  <address@hidden>
+
+       * sanity.sh (join6): New tests for previous fix.
+
+       * update.c (join_file): One more fix to avoid dereferencing NULL.
+       (Reported by Steve McIntyre <address@hidden>.)
+       * sanity.sh (join6): New tests for above.
+
+2004-02-25  Larry Jones  <address@hidden>
+
+       * update.c (join_file): Fix optimization to avoid dereferencing NULL.
+       (Reported by Steve McIntyre <address@hidden>.)
+
+2004-02-25  Derek Price  <address@hidden>
+
+       No longer require directories specified to `checkout -d' to exist.
+
+       * checkout.c (safe_location): Only confirm that destination is a safe
+       location for directories that already exist since we can assume that
+       creating directories under such a safe directory is acceptable.
+       (dir_to_build): Remove just_chdir member.
+       (checkout_proc): Add trace.  No longer set dir_to_build->just_chdir.
+       Minor reformatting.
+       (build_dirs_and_chdir): Don't create or register directories that are
+       not created.
+       * sanity.sh (*): Update tests to account for new behavior.
+
+2004-02-25  Derek Price  <address@hidden>
+
+       * buffer.c (buf_empty): New function.
+       * server.c (server): Check for unread data in buffer before closing.
+
+2004-02-25  Derek Price  <address@hidden>
+
+       * release.c (release): Restore the initial directory before and after
+       calling various sections of code that expect it to prevent corruption
+       of CVS/Entries files on release of a subdir and tell unedit() what to
+       release.
+       * sanity.sh: Add test case for release.c fix.
+       (Original patch from Matthew Ogilvie  <address@hidden>.)
+
+       * client.c (last_entries): Move global variable...
+       (call_in_directory): ...here (now a local variable).  Remove test that
+       always evaluates to true.
+       (last_dir_name): Remove unused global variable.
+
+2004-02-24  Larry Jones  <address@hidden>
+
+       * filesubr.c (xresolvepath): Fix crash in error case.
+       (Reported by Reinhard Zierke <address@hidden>.)
+
+2004-02-24  Derek Price  <address@hidden>
+
+       * sanity.sh (crerepos): Fix it so that it ignores the user's
+       .cvsrc file (.cvsrc "checkout -r" used to cause the "rm -r 1"
+       command to print warnings and wait for input).
+       (Original patch from Matthew Ogilvie  <address@hidden>.)
+
+       * sanity.sh (reposmv, parseroot, devcom3, binwrap3):
+       s/_SAVED\>/_save/ for consistency.
+
+2004-02-24  Derek Price  <address@hidden>
+
+       * sanity.sh (taginfo-newfmt-examine-2): Correct expected results.
+
+2004-02-23  Larry Jones  <address@hidden>
+
+       * sanity.sh (taginfo-examine-1): Correct expected results.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       * subr.c (expand_string): Use x2realloc() from GNULIB for core
+       functionality.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       * subr.c (set_nonblock_fd): Move back to...
+       * server.c: ...here.
+       * cvs.h: Remove protos for the above two functions.
+       * buffer.c (stdio_buffer_shutdown): Remove unexessary and possibly
+       dangerous check for unread data on a pipe with a nonblock read.
+
+2004-02-20  Larry Jones  <address@hidden>
+
+       * tag.c (check_fileproc): Remove unused variable.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       * ChangeLog, commit.c, filesubr.c, rcs.c, root.c, sanity.sh, subr.c,
+       update.c: Remove VIM editor commands.
+
+2004-02-20  Derek Price  <address@hidden>
+
+       Import xalloc module from GNULIB, as well as its remaining unimported
+       dependency, the exitfail module.
+
+       * cvs.h: #include "xalloc.h".
+       * subr.c (xmalloc, xrealloc, xstrdup): Remove these functions.
+
+2004-02-20  Larry Jones  <address@hidden>
+
+       * hash.h (struct node): Change data from char * to void *, change
+       all callers.
+
+       * run.c (cmdlinequote, cmdlineescape): Use prototype in definition
+       to match cvs.h.
+       (format_cmdline): UNIQUE_*_TYPE_* macros imply HAVE_*, so no need
+       to check for both.  Remove duplicate code for size_t and ptrdiff_t.
+
+       * tag.c (check_fileproc): Remove spurious invalid cast, clean up
+       coding style.
+
+       * commit.c (precommit_list_proc): Remove vestigial prototype.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * run.c (format_cmdline): Don't accept printf `L' modifier at all when
+       long doubles are not available.  Allow UNIQUE_FLOAT_TYPE_LONG_DOUBLE to
+       imply HAVE_LONG_DOUBLE.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * run.c: Remove include of stddef.h - it is already included via
+       lib/system.h.
+
+2004-02-19  Larry Jones  <address@hidden>
+
+       * run.c: Include the appropriate headers for wchar_t and wint_t,
+       create a typedef for convproc and use it (required for va_arg),
+       add explicit comparisons to keep gcc -Wall happy, remove unused
+       variables.
+       (format_cmdline): Fix bugs and portability problems.
+       * tag.c: Remove unused global variable.
+       (pretag_proc): Correct call to format_cmdline: %hhc is not a valid
+       printf format (should just be %c) and NULL must be cast to the correct
+       type in a varargs call.
+       (pretag_list_to_args_proc): Initialize arg to keep gcc -Wall happy,
+       remove unused variable, add auxiliary variable to simplify code,
+       clean up coding style.
+
+       * commit.c (precommit_list_to_args_proc): Initialize arg to keep
+       gcc -Wall happy, remove unused variable, clean up coding style.
+       (precommit_proc): Cast NULL to the correct type in varargs call.
+       * edit.c (notify_proc): Remove unused variables.
+       * expand_path.c (expand_path): Initialize inquotes, add explicit
+       comparison to keep gcc -Wall happy.
+       * logmsg.c: Remove unused global variables and function decl.
+       (do_verify): Add explicit comparison to keep gcc -Wall happy,
+       clean up coding style.
+       (logmsg_list_to_args_proc): Initialize arg to keep gcc -Wall happy,
+       remove unused variable.
+       (logfile_write): Cast NULL to the correct type in varargs call.
+       (verifymsg_proc): Cast NULL to the correct type in varargs call.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * run.c (format_cmdline): Correct some typos and cut/paste errors.
+       Switch on HAVE_WINT_T for Solaris.  Switch on HAVE_INTMAX_T for other
+       pre-C99 platforms.
+
+2004-02-19  Derek Price <address@hidden>
+
+       * sanity.sh (crerepos): Correct comment.
+
+2004-02-19  Derek Price <address@hidden>
+
+       * logmsg.c (verifymsg_proc), run.c (format_cmdline): Plug memory leak.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+       * run.c (format_cmdline): Simplify two expressions.
+
+2004-02-19  Larry Jones  <address@hidden>
+
+       * login.c (password_entry_operation): Initialize line.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * sanity.sh (tests): Add errmsg3.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * sanity.sh (errmsg3): Don't create directories named `tmp' in
+       $TESTDIR to avoid conflicts with the default value of $TMPDIR.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * sanity.sh (crerepos): Don't create directories named `tmp' in
+       $TESTDIR to avoid conflicts with the default value of $TMPDIR.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * sanity.sh (directory_cmp): Use $TESTDIR for temporary files, like the
+       dotest functions.
+
+2004-02-19  Derek Price  <address@hidden>
+
+       * sanity.sh: No longer allow user override of $tmp.  Set $TMPDIR to a
+       directory under $TESTDIR, as for $HOME, but still allowing for user
+       override.  Check for cvs-serv* directories under $TMPDIR rather than
+       $tmp at the end of the script.
+
+2004-02-19  Derek Price <address@hidden>
+
+       * run.c (cmdline_quote): Plug memory leak.
+       (format_cmdline): Don't bother with freeing memory before a call to
+       error() which will exit.  Plug memory leak.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+2004-02-18  Derek Price <address@hidden>
+
+       * run.c (format_cmdline): Move variable declaration to a position more
+       acceptable to the ANSI C standards.
+
+2004-02-17  Derek Price <address@hidden>
+
+       * commit.c (precommit_proc): Installed new format_cmdline() instead
+       of the old, nonuniform info file interpreter.  Support for new user
+       data field in Parse_Info() callbacks.  Use cmdlinequote() instead of c.
+       10 lines of quote processing.
+       * cvs.h (expand_path):  Update proto.
+       (UseNewInfoFmtStrings): New global variable to keep track of the config
+       option of the same name.
+       (format_cmdline): Added function prototypes and type definitions to
+       support this new function.
+       * edit.c (notify_proc):  Added the formatsafe flag to an
+       expand_path() call.  Installed new format_cmdline() instead of the old,
+       nonuniform info file interpreter.  Support for new user data field in
+       Parse_Info() callbacks.
+       * expand_path.c (expand_path):  Added the formatsafe flag to and some
+       code to double up '%'s in variable subs if formatsafe is set on the
+       presumption that the variables that expand_path() subs into the string
+       are already working paths to files or whatever.  It should be quoting
+       too but I haven't done that yet.
+       * logmsg.c (title_proc, logmsg_list_to_args_proc, update_logfile_proc,
+       rcsinfo_proc, editinfo_proc, verifymsg_proc, logfile_write): Installed
+       new format_cmdline() instead of the old, nonuniform info file
+       interpreter.  Support for new user data field in Parse_Info()
+       callbacks.
+       * main.c:  Added global UseNewInfoFmtStrings variable to keep track
+       of the config file option of the same name (see above).
+       * mkmodules.c (commitinfo_contents, editinfo_contents,
+       taginfo_contents, verifymsg_contents, loginfo_contents: Document new
+       format string features.
+       (config_contents): Added new UseNewInfoFmtStrings option with default
+       of yes.
+       * modules.c (do_module):  Added the formatsafe flag to an
+       expand_path call.
+       * parseinfo.c (Parse_Info, parse_config):  Added the formatsafe flag
+       to an expand_path() call.  Added handling for UseNewInfoFmtStrings
+       option in the config file.  Set to no, modifications needed to set to
+       yes are harmless.  Set to yes, modifications needed for full
+       compatibility cause deprecation warnings.  Eliminating deprecation
+       warnings should allow executable to be compile with
+       --disable-old-info-format-support passed into configure.  Added user
+       data field (closure) which is passed through into callproc to
+       Parse_Info().
+       * run.c (format_cmdline): New function to provide uniform handling of
+       *info file scripting hook lines.
+       (cmdline_bindings_hash_node_delete,
+       (cmdlineescape, cmdlinequote): New functions to "quote" and "escape"
+       strings like you would to get them past a command line parser as an
+       argument.
+       (run_setup): Made quote aware
+       * sanity.sh (info, taginfo, config, pserver, lockfiles, reserved):
+       New tests for the new format string functionality as well as the
+       support of backwards compatibility.  Had to alter a few of the tests to
+       not care which version of some of the (shared) config files they'd just
+       checked in so that the tests can be run in any order.
+       (taginfo): Add tests for file names with spaces in them.
+       * server.c (template_proc): Support for new user data field in
+       Parse_Info() callbacks.
+       * tag.c (pretag_proc): Installed new format_cmdline() instead of the
+       old, nonuniform info file interpreter.  Add support for new user data
+       field in Parse_Info() callbacks.
+       (check_fileproc): Add proper tag_info struct as node data rather than a
+       single revision number in a string and pass tlist properly rather than
+       in a global variable.
+       (check_filesdone_proc): Altered to use non-global tlist.
+       (tag_delproc): Handle new tag_info struct data members.
+       (pretag_list_to_args_proc): Ditto.
+       (pretag_list_proc): Deleted.
+       * wrapper.c (Parse_Info): Added the formatsafe flag to an expand_path()
+       call.
+
+2004-02-17  Derek Price  <address@hidden>
+
+       * sanity.sh: Check for $PWD != $TESTDIR after each set of tests rather
+       than once at the end.  Check that there are no cvs-serv* directories in
+       $tmp after each set of remote tests.
+
+2004-02-17  Derek Price  <address@hidden>
+
+       * sanity.sh: Don't check for an empty $TESTDIR - if $TESTDIR was empty
+       then the preceding call to mkdir would have failed anyhow.
+
+2004-02-17  Larry Jones  <address@hidden>
+
+       * log.c (rlog_proc): Fix (harmless) uninitialized variable.
+
+       * sanity.sh (basicc): Add tests pointing out defective handling
+       of the Entries file.
+
+2004-02-17  Derek Price  <address@hidden>
+
+       * checkout.c (build_dir_and_chdir): Expand header comment.
+
+2004-02-15  Mark D. Baushke  <address@hidden>
+
+       * annotate.c (rannotate_proc): Plug a memory leak.
+       * log.c (log_fileproc): Ditto.
+       * tag.c (tag_fileproc): Ditto.
+       * update.c (checkout_file): Ditto.
+       * server.c (server_updated): Do not buf_free (filebuf) here.
+
+2004-02-15  Derek Price  <address@hidden>
+
+       Make error() accessible to the GNULIB functions.
+
+       * error.h: Move into the ../lib directory.
+
+2004-02-13  Derek Price  <address@hidden>
+
+       * lock.c (Reader_Lock, lock_dir_for_write): Plug memory leaks.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+2004-02-13  Derek Price  <address@hidden>
+
+       * lock.c (remove_lock_files): Minor refactoring.
+
+2004-02-12  Mark D. Baushke  <address@hidden>
+
+       * lock.c (lock_exists): Plug a memory leak.
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * modules.c: Reformat comment and line to fit in 80 chars.
+
+2004-02-12  Mark D. Baushke  <address@hidden>
+
+       * server.c (do_cvs_command): Plug a memory leak.
+       (Use buf_free() rather than free().)
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * sanity.sh (lockfiles): Reformat a comment for 80 characters.  Fix a
+       few minor issues that caused tests to fail in remote mode.  Clean up
+       after test.
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * lock.c (unlock_proc): Don't expect an int in closure as it is not
+       condoned in the C standard.  For now, just assume zero since this
+       function is currently only called from one location.
+       (remove_locks): Pass NULL for the closure argument to unlock_proc().
+
+2004-02-12  Derek Price  <address@hidden>
+
+       * lock.c (unlock_proc): Use closure as true/false free_repository
+       free_repository argument to remove_lock_files.  Move to a position
+       above remove_locks and delete prototype.
+       (remove_locks): Don't free storage, as specified in our header comment,
+       in order to avoid a seg fault that could otherwise occur after waiting
+       on a lock.
+       * sanity.sh (lockfiles): Add tests for all operation (read, read
+       promotably, or write) and lock combinations.
+       (Original report from Mark <address@hidden>.)
+
+2004-02-12  Larry Jones  <address@hidden>
+
+       * modules.c (_do_module): Rename to my_module to avoid reserved name.
+       * stack.c (_push, _pop, _unshift, _shift): Rename to do_*.
+
+2004-02-12  Mark D. Baushke  <address@hidden>
+
+       * commit.c (find_fileproc): Plug a memory leak.
+
+2004-02-12  Larry Jones  <address@hidden>
+
+       * lock.c (_lock_simple_remove): Rename to remove_lock_files to avoid
+       reserved name.  Fix typo (free => free_repository).
+       (lock_simple_remove): Delete; use remove_lock_files directly.
+       (lock_simple_remove_and_free): Ditto.
+       (_lock_exists): Rename to lock_exists.
+
+2004-02-11  Larry Jones  <address@hidden>
+
+       * root.c (parse_cvsroot): Set hostname in fork mode for error messages.
+       * buffer.c (stdio_buffer_shutdown): Undo previous change.
+
+2004-02-11  Mark D. Baushke  <address@hidden>
+
+       * buffer.c (buf_free): Plug a memory leak.
+       * commit.c (checkaddfile): Ditto.
+
+       * server.c (fd_buffer_shutdown): Avoid a double free().
+
+       * parseinfo.c (parse_config): Fix comments.
+
+2004-02-11  Derek Price  <address@hidden>
+
+       * buffer.c (stdio_buffer_shutdown): Add logic to avoid attempting to
+       print current_parsed_root->hostname when using the fork method.
+
+2004-02-11  Derek Price  <address@hidden>
+
+       * server.c (do_cvs_command): Simplify stream & pipe closing.
+       (Suggestion from Eric Siegerman <address@hidden>.)
+
+       * cvs.h, subr.c (set_block_fd): Remove this unnecessary function.
+
+2004-02-11  Derek Price  <address@hidden>
+
+       * checkout.c (checkout_proc): Remove unneeded variable and enclosing
+       block.
+       * modules.c (_do_modules): Minor whitespace change.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * lock.c (lock_simple_remove): Move core functionality...
+       (_lock_simple_remove): ...here.
+       (lock_simple_remove_and_free): New function.
+       (set_promotable_lock): Use new function to avoid freeing data that will 
be
+       reused.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * server.c (do_cvs_command): s/FIXCVS/FIXME/ in comment.
+       (set_block_fd, set_nonblock_fd): Move to...
+       * subr.c: ...here.
+       * cvs.h: Add protos for the above two functions.
+       * buffer.c (stdio_buffer_shutdown): Replace fgetc() which checked for
+       unread data on a pipe with a nonblock read.
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * server.c (do_cvs_command): Have the server child close all the pipes
+       but the flow control pipe and wait on an EOF on the flow control pipe
+       from the parent when done to avoid a race condition that could
+       otherwise generate a SIGPIPE for the parent before the SIGCHILD when
+       the other pipes were so full after a child exited that the parent
+       attempted to write a stop byte to the flow control pipe.
+       (Original report from <address@hidden>.)
+
+2004-02-10  Derek Price  <address@hidden>
+
+       * buffer.c (stdio_buffer_shutdown): Add a helpful comment.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       * lock.c (lock_simple_remove): Add comments.  Use critical sections to
+       set some variables that might otherwise cause trouble.
+       (struct lock): Correct comment.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       Attempt to improve readability of code.
+
+       * lock.c (promotable_lock): Rename to...
+       (set_promotable_lock): ...this.
+       (set_promotablelock_proc): Expand header comment.
+       (Promotable_Lock): Rename to...
+       (lock_tree_promotably): ...this.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       * lock.c (set_writelock_proc): Remove unused prototype.
+       (promotable_lock): Remove unneded whitespace.
+       (Promotable_Lock): Correct comments.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       * sanity.sh (co-d): Update comments and tests to reflect the current
+       state of my side of my discussion with Larry Jones on how these
+       commands should behave.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       * sanity.sh (emptydir): Add two new tests for how modules -d behaves
+       when a directory already exists in the user's workspace.
+       (emptydir): Add --keep functionality.
+
+2004-02-09  Derek Price  <address@hidden>
+
+       * sanity.sh (co-d): New test to prove `co -d' failure case.
+
+2004-02-05  Derek Price  <address@hidden>
+
+       * sanity.sh (recase): Fix typo that creeped in somehow between my last
+       test run and my commit.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * modules.c (do_modules): Move content to and make this function a
+       wrapper for...
+       (_do_modules): ...this new function which can watch for infinite loops
+       in alias modules.
+       * stack.c (_push, _pop, _unshift, _shift, push_string, pop_string,
+       unshift_string, shift_string): New
+       functions.
+       * stack.h (push_string, pop_string, unshift_string, shift_string: New
+       prototypes.
+       * sanity.sh (modules): Add check for nested alias loops.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * sanity.sh (recase): Update test names and comments for clarity and
+       consistency.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * sanity.sh (recase): Restore some cruft necessary when clients know
+       they are on case insensitive systems.
+
+2004-02-03  Derek Price  <address@hidden>
+
+       Preserve the case of checked out directories in a path as well as file
+       names for client communication with the server.
+
+       * Makefile.am (cvs_SOURCES): Add stack.c & stack.h.
+       * stack.c, stack.h: New files.
+       * cvs.h: Include stack.h.
+       * client.c (send_file_names): Preserve the case of directories in a
+       path as well as file names for communication with the server.
+
+       * Makefile.in: Regenerated.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * checkout.c (find_fileproc): Update error message for consistency.
+       * sanity.sh (basica): Update to compensate.
+
+2004-02-04  Derek Price  <address@hidden>
+
+       * classify.c (Classify_File): Update header comment block and reformat
+       prototype for readability in 80 character widths.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * sanity.sh (*): Update tests for the new status message from update.c.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * sanity.sh (join-rm): New test for issue #104 & #159.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * update.c (join_file): Correct status message for consistency.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       Continue removal from server of handling of case insensitive clients.
+
+       * cvs.h: Remove extern declaration of ign_case.
+       * ignore.c (ign_case): Remove declaration.
+       (ign_name): Remove support for ign_case.
+       * server.c (serve_case): Ditto.
+       (requests): No longer support the "Case" request.
+       * rcs.c (locate_rcs): Remove reference to GLOBAL in function header
+       comment.
+
+2004-02-02  Derek Price  <address@hidden>
+
+       * client.c (send_file_names): Restore prescribed client handling of the
+       FILENAMES_CASE_INSENSITIVE switch.
+
+2004-01-25  Derek Price  <address@hidden>
+
+       * server.c (kserver_authenticate_connection): Fix call to
+       switch_to_user().
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+2004-01-22  Derek Price  <address@hidden>
+
+       * modules.c (do_module): Strip trailing slashes before checking for
+       infinite alias loops.
+       * sanity.sh (modules): Tests for response to infinite alias loops.
+
+2004-01-17  Mark D. Baushke  <address@hidden>
+
+       * logmsg.c (do_verify): Eliminate double-free bug.
+       (Original patch from Gerald Combs.)
+
+2004-01-12  Mark D. Baushke  <address@hidden>
+
+       * lock.c (lock_name): Deal with potentially NULL string pointers
+       in calls to TRACE.
+       (promotable_lock): Ditto.
+       (set_lock): Ditto.
+       * sanity.sh (trace): Update to latest patterns.
+
+2004-01-07  Larry Jones  <address@hidden>
+
+       * checkout.c (safe_location): Remove unused variable(s).
+       * lock.c (lock_tree_for_write): Ditto.
+       * rcs.c (RCS_checkin): Ditto.
+       * subr.c (compare_revnums): Ditto.
+       * tag.c (tag_check_valid): Ditto.
+       * mkmodules.c (init): Initialize err and return it rather than 0.
+       * server.c (do_cvs_command): Only define and set max_command_fd if
+       we're actually going to use it.
+
+2004-01-06  Mark D. Baushke  <address@hidden>
+
+       * socket-client.c (socket_buffer_initialize): Fix argument
+       declaration for VMS compiler.
+       (Patch submitted from Michael Lemke
+       <address@hidden>.)
+
+2004-01-01  Larry Jones  <address@hidden>
+
+       * zlib.c (read_and_gzip, gunzip_and_write): Fix potential buffer
+       overruns, use names for magic numbers.
+       (Original patch from Jeff Downs <address@hidden>.)
+
+2003-12-17  Larry Jones  <address@hidden>
+
+       * main.c (main): Don't reference isremote without CLIENT_SUPPORT.
+       (Patch from Jim Salter <address@hidden>.)
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * server.c (switch_to_user): SysLog attempts to root from pserver.
+
+2003-12-18  Derek Price  <address@hidden>
+
+       * server.c (switch_to_user): Don't allow CVS to run as root in pserver
+       mode.
+       (Original patch from Wichert Akkerman via Bradley M Kuhn
+         <address@hidden>.)
+       * sanity.sh (pserver): Check for bad root error message.
+
+2003-12-17  Larry Jones  <address@hidden>
+
+       * run.c (close_on_exec): fcntl is not documented to return 0 for
+       success (and QNX doesn't), only -1 for error.
+       (Patch from George Refseth <address@hidden>.)
+
+2003-12-10  Larry Jones  <address@hidden>
+
+       * rcs.c: Cleanup HAVE_MMAP code in preparation for falling back to
+       stdio if mmap fails on large files.
+
+2003-12-10  Mark D. Baushke  <address@hidden>
+
+       * tag.c (tag_check_valid): Fix typo.
+       (Patch from Rob Clevenger <address@hidden>.)
+
+2003-12-09  Derek Price  <address@hidden>
+
+       Rewrite code to use promotable write locks to avoid locking more than a
+       directory at a time for a full write.
+
+       * cvs.h (lock_tree_for_write): Rename to...
+       (lock_tree_promotably): ...this.
+       (Simple_Lock_Cleanup): New prototype.
+       * lock.c: Remove some unneeded prototypes.  Some function
+       reorganization.
+        (struct lock): Make repository const.  Add file1 & file2 to
+       track lock names.  Keep track of when repository needs to be freed.
+       (promotablelock, global_writelock): New globals.
+       (locked_dir, locked_list): Remove unneeded globals.
+       (lock_name): Take const args.
+       (remove_locks): Update comment.  Move readlock cleanup...
+       (Simple_Lock_Cleanup): ...to this new function which also cleans up
+       writelocks.
+       (Lock_Cleanup): No need to clean up after the obsolete locked_dir &
+       locked_list.
+       (lock_simple_remove): Use new lock name cache.  Set lock->repository to
+       NULL to show locks are removed.  Free repository name when necessary.
+       (Reader_Lock): Copy xrepository argument so we do not need to trust the
+       caller not to dispose of it.  Use lock name cache.  Factor code to set
+       the global readlock variable...
+       (set_readlock_name): ...to this new function so it can be used by
+       promotable_lock too.
+       (readers_exist): Factor common code and make wrapper for...
+       (_lock_exists): ...this new function.
+       (promotable_exists): Wrapper for _lock_exists().
+       (write_lock): Rename to...
+       (promotable_lock): ...this and tweak for new behavior.
+       (set_writelock_proc): Rename to...
+       (set_promotablelock_proc): ...this and tweak for new functionality.
+       (Write_Lock): Rename to...
+       (Promotable_Lock): ...this and tweak for new functionality.
+       (set_lock): Add trace.
+       (lock_tree_for_write): Rename to...
+       (lock_tree_promotably): ...this and tweak for new functionality.
+       (lock_dir_for_write): Lock only one directory at a time in a promotable
+       lock aware fashion using new interfaces.
+       * admin.c, commit.c, edit.c, watch.c:
+       s/lock_tree_for_write/lock_tree_promotably/.
+       s/CVS_LOCK_NONE/CVS_LOCK_WRITE/ in calls to start_recursion that used
+       to rely on lock_tree_for_write() to obtain their write locks.  Remove
+       some unnecessary typecasting.
+       * recurse.c (do_recursion): Use Simple_Lock_Cleanup() rather than
+       Lock_Cleanup to avoid removing promotable locks.
+       * server.c (do_cvs_command): Add traces.
+       (server): Add new way to sleep the parent server process for connecting
+       a debugger.
+       * sanity.sh (lockfiles, multiroot2): Update tests to accomodate minor
+       trace inconsistencies.
+
+2003-12-09  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (trace): Remove trace from the set of tests to run.
+       The regexps used take an excessive amount of time and need to
+       be simplified.
+
+2003-12-08  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (rcsbuf_ftell): Rename to...
+       (rcsbuf_ftello): this.
+       (rcsbuf_cache_open): Use off_t rather than long as the pos
+       argument. Use fseeko rather than fseek and ftello rather than
+       ftell.
+       * rcs.h (struct rcsnode): delta_pos is now an off_t type.
+
+2003-12-03  Derek Price  <address@hidden>
+
+       * sanity.sh (recase): Add some clarifying comments.
+
+2003-12-03  Larry Jones  <address@hidden>
+
+       * expand_path.c (expand_variable): Expand ${CVSROOT} to just the
+       directory like it's supposed to be.
+       (Reported by Michael S. Tsirkin <address@hidden>.)
+
+2003-11-26  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (recase-17sscs): Use ${CVSROOT_DIRNAME} in pattern.
+
+2003-11-26  Derek Price  <address@hidden>
+
+       Remove server support for case insensitive clients.  Includes some
+       merges from 1.11.x.
+
+       * add.c, client.c, cvs.h, rcs.c, subr.c: Remove unnecessary support for
+       case insensitive clients.
+       * sanity.sh (tests): Add recase.
+       (recase): New test of cases that might be expected to cause problems
+       with a heterogeneous mix of case sensitive and case insensitive clients
+       and servers.
+
+2003-11-26  Derek Price  <address@hidden>
+
+       * sanity.sh (modules3-2): Simplify syntax that may have given Cygwin
+       intermittent conniptions.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (binfiles2): Correct yet another Cygwin difficulty.
+
+2003-11-25  Derek Price  <address@hidden>
+
+       * sanity.sh (release): Perform forgotten cleanup.
+
+2003-11-25  Derek Price  <address@hidden>
+
+       * sanity.sh (env): Enable to work with $remotehost.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (trace-19): Separate stdout and stderr to workaround
+       problems on SGI IRIX.
+       (crecrepos): Use 'unset DISPLAY' to avoid problems with ssh
+       X11Forwarding configurations.
+
+2003-11-25  Derek Price  <address@hidden>
+
+       * sanity.sh (pserver, server, server2): Save $servercvs and use the
+       local $testcvs for these tests.
+
+2003-11-25  Derek Price  <address@hidden>
+
+       * commit.c (commit_fileproc): Reword comment.
+
+2003-11-25  Derek Price  <address@hidden>
+
+       * sanity.sh (devcom3-9ar): Ignore the stderr output since it varies
+       considerably between platforms.
+
+2003-11-25  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (CVS_RSH): Read config file sooner to pickup RSH_DFLT
+       for use in setting CVS_RSH variable.
+       * sanity.config.sh.in (RSH_DFLT): Use new substitution variable.
+       * Makefile.am (localcheck, remotecheck): Depend on sanity.config.sh.
+       * Makefile.in: Regenerate for new Makefile.am.
+
+       * update.c (join_file): Deal with rev1 == NULL due to rev1 merge tag
+       being missing from the current file.
+       * sanity.sh (join6): New tests for this case.
+       (trace): Renumber test cases.
+
+2003-11-24  Larry Jones  <address@hidden>
+
+       * diff.c (diff_file_nodiff): use_rev1 does *not* imply that diff_rev1
+       is not null, diff_date1 could be set instead (ditto for use_rev2).
+       (Reported by <address@hidden>.)
+
+2003-11-24  Mark D. Baushke  <address@hidden>
+
+       * client.c (connect_to_forked_server): Avoid passing NULL strings
+       to TRACE. Calling printf("%s",NULL) is not defined and may
+       segfault on some systems.
+       * diff.c (diff_file_nodiff): Ditto.
+       * main.c (main): Ditto.
+       * modules.c (do_module): Ditto.
+       * patch.c (patch_proc): Ditto.
+       * rcs.c (RCS_cmp_file): Ditto.
+       * recurse.c (start_recursion): Ditto.
+       * root.c (parse_cvsroot): Ditto.
+       * server.c (dirswitch, server_pathname_check, dirswitch,
+       serve_directory):  Ditto.
+       * tag.c (rtag_proc, check_fileproc, tag_check_valid): Ditto.
+       * sanity.sh (trace): New testcase to test the -t option.
+       (RCSDATE, ISODATE, PFMT): New variables in aid of the trace tests.
+       (dotest_fail_sort): New function in aid of the trace tests.
+       (template): Fix cleanup.
+
+2003-11-24  Derek Price  <address@hidden>
+
+       * sanity.sh (modes3): Skip modes3-5 entirely under Cygwin since
+       permisions are broken there.  This change removes most of the earlier
+       Cygwin differentiation in this test ($cygwin_hack & $cygwin_hack2) in
+       favor of skipping the test entirely.
+
+2003-11-24  Derek Price  <address@hidden>
+
+       * sanity.sh: Add `-h <hostname>' option to enable testing across a
+       :ext: connection to another host.  Warn when `-h' is specified without
+       $TESTDIR.  Leave $TESTDIR intact when it looks absolute since it may
+       contain symlinks.  Allow $CVS_SERVER to be overridden via the
+       environment for `-h'.  Default $CVS_RSH to `ssh'.
+       (*): Use $CVS_RSH to perform certain commands on the remote host (esp.
+       `ln -s' and `chmod') when `-h' is specified to work around
+       incompatibilities with CygWin & Samba.  Add a few other minor
+       workarounds for Cygwin bugs.
+
+       (newroot): New function.
+       (*): Use newroot when appropriate.
+
+2003-11-21  Larry Jones  <address@hidden>
+
+       * hash.c (printnode, printlist): Cast %p arguments to void * as
+       required by the C standard.
+
+2003-11-21  Larry Jones  <address@hidden>
+
+       * recurse.c (start_recursion, do_recursion): Cast %p arguments to
+       void * as required by the C standard.
+
+2003-11-19  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_getrevtime): Add error checking; cleanup.
+
+2003-11-18  Derek Price  <address@hidden>
+
+       * socket-client.c (socket_buffer_initialize): Rename poorly named `n'
+       to a slightly more descriptive `sbuf'.
+       (Suggestion from Larry Jones  <address@hidden>.)
+
+2003-11-18  Derek Price  <address@hidden>
+
+       * socket-client.c (socket_buffer_initialize): Pass in the socket
+       closure we allocate.
+       (Report from Larry Jones  <address@hidden>.)
+
+2003-11-18  Derek Price  <address@hidden>
+
+       * modules.c (do_module): Reject absolute paths.
+       (Report and suggested fix from Tony Hoyle <address@hidden>.)
+
+       * sanity.sh (abspath2): Check for the above.
+       (spacefiles): Remove tests that expect absolute paths to files in the
+       top level repository directory to work.
+       (tests): Add abspath2.
+
+2003-11-18  Derek Price  <address@hidden>
+
+       * socket-client.c (socket_buffer_initialize): Correct a typo that
+       happened to compile.
+       (Report and suggested fix from Patrick Brown <address@hidden>.)
+
+2003-11-13  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_delete_revs): It's `&&', not `and'.
+
+2003-11-13  Derek Price  <address@hidden>
+
+       * sanity.sh: Create the empty log to make it easier to tail immediately
+       after the script is started.
+
+2003-11-13  Derek Price  <address@hidden>
+
+       * sanity.sh (exit_help): Correct help to specify `-H' and not `-h' as
+       the help option.
+
+2003-11-13  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_delete_revs): Don't use the WOE32 kludge which refuses to
+       delete revisions from bvinary files on Cygwin.  I'm not sure what the
+       kludge was trying to avoid, but commenting it out causes the test suite
+       to pass.
+
+2003-11-12  Derek Price  <address@hidden>
+
+       * main.c (main): Remove a trailing newline from the version string.
+       Replace multiple calls to fputs to a single call reformated to C89
+       specifications.  Remove some typecasts unecessary under C89.
+       * sanity.sh (version): Remove trailing newline from the version string.
+
+2003-11-12  Derek Price  <address@hidden>
+
+       * add.c (add): Allocate more space for the string I added characters
+       to.
+       (Report from Mark D. Baushke <address@hidden>.)
+
+2003-11-11  Derek Price  <address@hidden>
+
+       * add.c (add), classify.c (Classify_File), client.c (update_entries),
+       repos.c (Name_Repository): Use consistent quoting in error messages.
+       Misc reformatting.
+       * sanity.sh: Update to match.
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * commit.c (find_fileproc, check_fileproc):  Refuse to remove files
+       when the file exists in the sandbox.  This used to cause data loss.
+       (Report from Andreas Reifschneider <address@hidden>.)
+
+       * sanity.sh (rmadd3): Update to match.  Expand comments.
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh (rmadd3): Test the behavior of commit after the
+       add/replace.
+       (Report from Andreas Reifschneider <address@hidden>.)
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh (rmadd3): Fix another typo.
+
+2003-11-10  Mark D. Baushke  <address@hidden>
+
+       * recurse.c (do_dir_proc): Set xframe.repository to NULL after a
+       call to free().
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh (rmadd3): Fix typo.
+
+2003-11-10  Derek Price  <address@hidden>
+
+       * sanity.sh (rmadd3): New tests that confirms that CVS refuses to
+       delete a file it thinks was already removed.
+       (Report and test from Andreas Reifschneider
+       <address@hidden>.)
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * sanity.sh (server): Test that the global `-l' option is ignored
+       nonfatally.
+
+2003-11-03  Derek Price  <address@hidden>
+
+       * server.c (serve_global_option): Warn that -l is being ignored rather
+       than exiting fatally due to backwards compatibility complaints from
+       administrators.
+
+2003-11-01  Larry Jones  <address@hidden>
+
+       * filesubr.c (xcmp): Make sure S_ISLNK exists before calling it.
+       (Reported by Paul Edwards <address@hidden>.)
+
+2003-10-31  Derek Price  <address@hidden>
+
+       * sanity.sh: s/${TESTDIR}/cvsroot/${CVSROOT_DIRNAME}/.
+
+2003-10-28  Derek Price  <address@hidden>
+
+       * sanity.sh (devcom): Renumber tests and use dotest function.
+
+2003-10-28  Derek Price  <address@hidden>
+
+       * sever.h: Add the standard copyright notice.
+
+2003-10-28  Derek Price  <address@hidden>
+
+       * lock.c: Remove some suggestions which have already been implemented
+       or which have become obsolete from the header comment.
+
+2003-10-26  Derek Price  <address@hidden>
+
+       * sanity.sh (join6): Fix a few typos in the last test and remove a
+       misplaced test.
+
+2003-10-25  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (parseroot): Use dokeep function.
+
+       * sanity.sh (parseroot): Perform this test in a subdirectory.
+       It should avoid problems on case-insensitive systems where
+       CVSROOT and cvsroot are the same directory (eg, MacOS X).
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * update.c (join_file): Restore the optimization Mark recently removed,
+       but fix it.  Move one other optimization up since it needs to be
+       checked for first.  Add bew status messages like merge_file produces
+       when the requested diff has already been applied to the destination.
+       Expand header comment.
+       * sanity.sh (join6): Add tests for the new error messages.
+       (import-113, join-admin-2, diffmerge1): Fix collateral damage.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * update.c (merge_file): Optimize & eliminate code.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * recurse.c (do_recursion): Assert that ignoring the return value of
+       Name_Repository is not a memory leak.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * repos.c (Name_Repository): Replace a FIXME with the improved error
+       message it requested.
+       * sanity.sh (errmsg3): New test for the above.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * patch.c (patch_proc): Avoid memory leak.
+       (Patch from Mark D. Baushke  <address@hidden>.)
+       (patch_proc): Reformat a few long lines for readability.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * vers_ts.c (Version_TS): Move variable declaration inside the only
+       block where it is used and remove uneeded reinitialization.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * server.h: s/^extern// off of function declarations per HACKING.
+       Reformat protos for readability.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * vers_ts.c (Version_TS): Reformat declaration and expand header
+       comment.
+
+2003-10-24  Derek Price  <address@hidden>
+
+       * update.c (merge_file): Remove code that hasn't been used since CVS
+       used an external RCS (1.9.something).
+
+2003-10-23  Mark D. Baushke  <address@hidden>
+
+       * update.c (join_file): Do the -jrev1 -jrev2 merge even when
+       the file is already at rev2.
+       * sanity.sh (join6): New testcase for above.
+       (Suggested by Paul Edwards, from somewhere in Australia.)
+       (import): Fix collateral damage.
+
+2003-10-23  Derek Price  <address@hidden>
+
+       * sanity.sh (fail): Refer the user to the `TESTS' and `check.log' files
+       on failure.
+
+2003-10-22  Derek Price  <address@hidden>
+
+       * recurse.c (start_recursion): Reformat function declaration and
+       expand comments.
+       (Original patch from Terrence Enger <address@hidden>.)
+
+2003-10-22  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_LDADD): Add $(LIBINTL) for gettext.
+       * Makefile.in: Regenerated.
+
+2003-10-19  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (admin-31): Fix more typos.
+
+2003-10-18  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (admin): Fix a typo.
+
+       * admin.c (admin_fileproc): Restore the ':' character in the
+       -mtag:message admin argument even if the tag does not exist so
+       that other files with the tag will be found. Also, be more
+       paranoid that a symbolic tag actually points to a version that
+       exists.
+       (Reported by Rodolfo Schulz de Lima <address@hidden>.)
+       * sanity.sh (admin): Test these changes.
+
+2003-10-17  Mark D. Baushke  <address@hidden>
+
+       * admin.c (admin_fileproc): Force tag match on admin
+       -mversion:message rather than altering the wrong log message.
+       (Patch from "Rodolfo Schulz de Lima" <address@hidden>.)
+       * sanity.sh (admin): Test case for it.
+
+2003-10-15  Larry Jones  <address@hidden>
+
+       * commit.c (commit_fileproc, finaladd): Don't call fixaddfile()
+       if the RCS file didn't get created at all.
+       (Reported by David Wood <address@hidden>.)
+
+2003-10-14  Derek Price  <address@hidden>
+
+       Port to pedantic POSIX 1003.1-2001 hosts, such as Debian GNU/Linux
+       testing with _POSIX2_VERSION=200112 in the environment.
+
+       * sanity.sh: Use 'sed 1q', not 'head -1'.
+       (Patch from Paul Eggert <address@hidden>.)
+
+2003-10-10  Derek Price  <address@hidden>
+
+       * lock.c (set_lock): Clarify comment.
+
+2003-10-11  Larry Jones  <address@hidden>
+
+       * server.c (server_cleanup): Replace CVS_CHDIR call: some systems
+       won't allow you to delete a directory tree containg your working
+       directory.
+
+2003-10-10  Derek Price  <address@hidden>
+
+       * server.c (cvs_output, cvs_outerr): Protect calls to syslog()
+       with the usual preprocessor condition: HAVE_SYSLOG_H.
+       (Original patch from Terrence Enger <address@hidden>.)
+
+2003-10-09  Derek Price  <address@hidden>
+
+       * cvs.h: s/^extern// off of function declarations per HACKING.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add history.h.
+       * history.c: Include history.h.  Add the `P' record types to more
+       comments. s/ALL_REC_TYPES/ALL_HISTORY_REC_TYPES/.
+       (usage): Reference ALL_HISTORY_REC_TYPES rather than using a separate
+       string literal.
+       (report_hrecs): Handle `P' record type.
+       (ALL_REC_TYPES): Rename and move...
+       * history.h (ALL_HISTORY_REC_TYPES): ...here.
+       * mkmodules.c: Include history.h.
+       (config_contents): Update contents of and references to LogHistory
+       records to use ALL_HISTORY_REC_TYPES.
+       * sanity.sh (basic2-64): Update to include history records of type `P'.
+
+       * Makefile.in: Regenerated.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * update.c (patch_file): Correct spelling and punctuation in comment.
+       Update some lines to fit in 80 characters.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * lock.c (remove_locks): Copy global struct and set status variable to
+       NULL before calling disposal functions that might try to access it
+       during calls to error(1,...).
+
+2003-10-08  Larry Jones  <address@hidden>
+
+       * history.c (history): Don't conflate -e with -x since the client's
+       idea of what -e means may not match the server's.
+       (Reported by Frank Hemer <address@hidden>.)
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * lock.c (Lock_Cleanup), rcs.c (rcs_cleanup), server.c
+       (server_cleanup): Expand comments about the never_run_again variable
+       and its interoperation with critical sections, exit, and interrupts.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * lock.c (remove_locks): Reduce TRACE level since this function is
+       rarely called and we can usually rely on tracing higher level
+       functions.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * lock.c (lock_name, lock_simple_remove),
+       server.c (server_pathname_check, dirswitch): Add TRACE.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * main.c: Reformat header comment to fit in 80 chars.
+
+2003-10-08  Larry Jones  <address@hidden>
+
+       * sanity.sh: Use dotest_fail instead of dotest_status for diff tests
+       since CVS only returns success/fail rather than 0/1/2 like diff does.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       Fix a client/server bug introduced via the data loss fix of 2003-03-17.
+       Basically, the server was reporting ambiguous filename requests when it
+       should have been trusting the user to type the intended case or using
+       the case the client preserved in CVS/Entries before it tried to look
+       anything up in case insensitive mode.
+
+       * rcs.c (locate_rcs): Use the filename exactly as cased before
+       investigating a case insensitive lookup, per the client/server protocol
+       specification.  Expand comments.
+       * subr.c (locate_file_in_dir): This function only needs to locate files
+       case insensitively.  Expand comments.
+       * cvs.h (locate_file_in_dir): Only prototype when servers which need to
+       handle case insensitivity are being compiled.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * rcs.c (locate_rcs): Declare static.  Move to an earlier location in
+       file to avoid prototyping.
+       * rcs.h (locate_rcs): Remove proto.
+
+2003-10-08  Derek Price  <address@hidden>
+
+       * lock.c (lock_filesdoneproc): Reformat long function prototype.
+
+2003-10-07  Larry Jones  <address@hidden>
+
+       * server.c (server_cleanup): Remove old code that was commented out
+       with //, which isn't valid in C.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * exithandle.c: New file.
+       * Makefile.am (cvs_SOURCES): Add exithandle.c.
+       * cvs.h (cleanup_register, signals_register): New prototypes.
+       * lock.c (Lock_Cleanup, remove_locks), rcs.c (rcs_cleanup),
+       server.c (server_cleanup): Avoid calling twice when called from a
+       signal handler and then exit.  Avoid being interrupted while globals
+       that the signal handler might touch are in inconsistent states.  Expand
+       comments.
+       * rcs.c (rcs_internal_lockfile): Ditto. Use cleanup_register rather
+       than calling atexit() directly.
+       * main.c (main): Consolidate signal stuff into a call to
+       signals_register().  Call cleanup_register to register cleanup
+       functions rather than calling atexit() directly.
+
+       * Makefile.in: Regenerated.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * error.c, error.h: Remove error_exit() function.
+       * add.c, client.c, history.c, import.c, main.c, mkmodules.c, modules.c,
+       rcscmds.c, recurse.c, release.c, root.c, server.c, socket-client.c,
+       tag.c, update.c: s/\<error_exit *();$/exit (EXIT_FAILURE);/.  Remove
+       related comments.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * buffer.c: Reformat a few long function prototypes and lines.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * hash.c (dellist): Immediately set input pointers to NULL in case they
+       are references to global variables which might be accessed by interrupt
+       handlers.
+
+2003-10-04  Derek Price  <address@hidden>
+
+       * rcs.c (rcs_cleanup): Declare static.
+       * rcs.h (rcs_cleanup): Remove prototype.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       Move calls to Lock_Cleanup to the atexit handler.
+
+       * commit.c (commit): Don't call Lock_Cleanup on error exit.
+       * error.c (error_exit): Don't call Lock_Cleanup.
+       * lock.c (Lock_Cleanup): Don't worry about recursive calls now that we
+       are using atexit for calls on exit.  Dispose locklist storage after the
+       locks are removed.  Expand comments.
+       * main.c (main): Move Lock_Cleanup call into atexit(Lock_Cleanup).
+       * server.c (server_notify): Add TRACE.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * recurse.c (start_recursion): Remove unnecessary typecasts.
+       (do_recursion): Ditto.  Add TRACE.  Expand comments.  Remove unneeded
+       parens.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * main.c (main): Dispose of old Tmpdir and Editor when specified
+       multiple times between the command line & the ~/.cvsrc file.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * lock.c (remove_locks): Eliminate unecessary typecasting.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       Move calls to rcs_cleanup to the atexit handler.
+
+       * error.c (error_exit): Don't call rcs_cleanup.
+       * rcs.c: Initialize global RCS_LOCKFILE to NULL.
+       (rcs_internal_lockfile): Use atexit (rcs_cleanup) rather than
+       setting up signal handlers.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * modules.c (do_module): Format prototype.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * server.c (server_cleanup): Skip BUF_TO_NET checks as an optimization
+       when ERROR_USE_PROTOCOL is set.
+
+2003-10-03  Derek Price  <address@hidden>
+
+       * modules.c (do_module): Use TRACE.
+
+2003-10-02  Derek Price  <address@hidden>
+
+       * main.c (main): Don't free globals that might be needed by the cleanup
+       functions.
+       * server.c (server_cleanup): Only clean up when called in the parent
+       process.  Set buffers to NULL before shutting down and freeing in case
+       we are interrupted.  Improve comments.  Add TRACE.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * main.c (main): Use symbolic name for trace level.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * client.c (connect_to_forked_server): Use TRACE macro rather than the
+       old style.
+
+2003-10-01  Derek Price  <address@hidden>
+
+       * server.c (protocol): Initialize the protocol buffer to NULL so that
+       use before initialization may be detected.
+       (cvs_output, cvs_outerr): Syslog messages when the appropriate buffers
+       are not available.
+       (server_cleanup): Reorganize for a single exit point and to eliminate
+       duplicated code.  Set buf_to_net to NULL before calling the buffer
+       shutdown functions in order to force error messages into the syslog.
+       * buffer.c (stdio_buffer_close): Remove FIXME comment re syslog since
+       the calls to error should go through the cvs_outerr function anyhow.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * entries.c (WriteTemplate): TRACE on entrance to a function, not exit.
+       Don't worry about checking noexec without server support since this
+       function will then do nothing.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * update.c (do_update): Reformat function decl.  Move and merge
+       comment.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * client.h (buf_output, buf_outerr): Check that our buffers exist
+       before sending them data.
+       (buf_output_binary): Assert that the output buffer is not NULL.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * client.h, rcs.c, rcs.h, server.h: Assume __STDC__ since it is
+       defined as part of the C89 spec.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * commit.c (commit): Optimize function towards a single exit point.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * error.c (error_exit): Remove call to SYSTEM_CLEANUP.
+       * main.c (main): Set up atexit(SYSTEM_CLEANUP) rather than calling it
+       explicitly before exit.
+       * server.c (pserver_authenticate_connection): Don't call SYSTEM_CLEANUP
+       before exiting.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * error.c (exit_error): Remove call to server_cleanup.
+       * main.c (main): Call atexit(server_cleanup).  Let server_cleanup turn
+       server_active off.
+       * server.c (server_cleanup): Don't require an argument.  Fill out
+       header comment.  Unset server_active when done.
+       (server): Don't call server_cleanup - let it be called via the atexit
+       handler.
+       * server.h (server_cleanup): Update proto.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * server.c (buf_output): Don't check that the buffers exist before
+       using them since cvs_outerr does this without problems.
+
+2003-09-30  Derek Price  <address@hidden>
+
+       * server.c: Remove some unecessary function prototypes.
+
+2003-09-29  Derek Price  <address@hidden>
+
+       * rcs.c (make_file_label): Make a failure to stat a file a fatal error
+       since it signals that a later read will also fail.
+
+2003-09-29  Derek Price  <address@hidden>
+
+       * diff.c (diff_fileproc): Optimize the check for labels set by the
+       user.
+
+2003-09-26  Derek Price  <address@hidden>
+
+       * diff.c (diff): Add a FIXME re spaces in diff arguments.
+
+2003-09-25  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (make_file_label): Do not return an uninitialized label.
+       (Reported by "Todd C. Miller" <address@hidden>)
+
+2003-09-24  Derek Price  <address@hidden>
+
+       * lock.c (lock_name): Remove useless prototype.
+
+2003-09-12  Derek Price  <address@hidden>
+
+       * sanity.sh (mkmodules): Correct comments.
+
+2003-09-12  Derek Price  <address@hidden>
+
+       * mkmodules.c (mkmodules): Do not pass a string which came from the
+       checkoutlist file directly to error as a format string since we don't
+       want to trust any user with access to checkoutlist with creating printf
+       format strings.  I already claimed I did this in the NEWS file.
+       (Thanks to Larry Jones for spotting my mistake.)
+       * sanity.sh (mkmodules): Test for the above.
+
+2003-09-12  Derek Price  <address@hidden>
+
+       * mkmodules.c (checkoutlist_contents): Document the optional portions
+       of this file format more accurately.
+       (mkmodules): Ditto, in comments.  Fix bug that always failed to ignore
+       whitespace before error messages.
+       * sanity.sh (mkmodules-temp-file-removal): Rename to...
+       (mkmodules): ...this and add a test of the checkoutlist error message.
+       Add cleanup step to restore checkoutlist.
+
+2003-09-08  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): Replace a chmod 0600, which shouldn't
+       really be necessary and which provided a false sense of security, with
+       an informative comment.
+       (Thanks to Paul Eggert <address@hidden> for his educational
+       advice.)
+
+2003-08-29  Derek Price  <address@hidden>
+
+       * cvs.h: Delete reference to CVSADMROOT_EDITINFO.
+       * logmsg.c (editinfo_proc): Delete function and proto.
+       (do_editor): Don't look for editinfo script.
+       * mkmodules.c (editinfo_contents): Delete.
+       * sanity.sh (*): Remove references to editinfo in updates of the
+       CVSROOT module.
+
+2003-08-29  Derek Price  <address@hidden>
+
+       * remove.c (cvsremove): Update quotes for consistency.
+
+2003-08-27  Larry Jones  <address@hidden>
+
+       * history.c: 'P' is a valid record type and has been for a long time.
+       Add it to the comments, usage message, and, most important,
+       ALL_REC_TYPES so it gets recorded by default.
+       * server.c (do_cvs_command): Set global command_name to the real
+       command name rather than leaving it set to "server".
+       * sanity.sh: Update to match.
+       (Reported by Dmitry Ryzhkov <address@hidden>.)
+
+2003-08-19  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): Expand comments.  Check for glibc version
+       before compiling chmod command.  Remove FIXME to this effect.
+
+2003-08-19  Derek Price  <address@hidden>
+
+       * logmsg.c (do_editor): Use cvs_temp_file rather than cvs_temp_name to
+       create and open the temporary file.  Remove FIXME to this effect.
+
+2003-08-19  Derek Price  <address@hidden>
+
+       * logmsg.c (do_editor): Move editinfo processing to before creation of
+       the temp file so that it may be skipped when no editor is defined.
+       Remove related FIXME.  Add comments.  Remove some processing of
+       editinfo_editor rendered obsolete when editinfo_editor ceased to be a
+       global.
+
+2003-08-19  Derek Price  <address@hidden>
+
+       * (*.c): Move some includes to lib/system.h.
+
+2003-08-18  Derek Price  <address@hidden>
+
+       * add.c (add): Use consistent quoting style in user messages.
+       * sanity.sh (*): Ditto.
+
+2003-08-13  Larry Jones  <address@hidden>
+
+       * server.c (server_cleanup): Don't shutdown buf_from_net if it's
+       null.
+       (Reported by Scott Mitchell <address@hidden>.)
+
+2003-08-03  Mark D. Baushke  <address@hidden>
+
+       * lock.c: Do not include xtime.h (already included via system.h).
+       * subr.c: Ditto.
+       (Original patch from Rainer Orth <address@hidden>
+       to fix IRIX 5.3 problem.)
+
+2003-08-01  Derek Price  <address@hidden>
+
+       * sanity.sh (join5): Use $SPROG rather than $PROG.
+
+2003-08-01  Derek Price  <address@hidden>
+
+       * sanity.sh (join5): Use $PROG consistently and escape a `.'.
+
+2003-08-01  Derek Price  <address@hidden>
+
+       * sanity.sh (join5): Use `[a-z]*' as opposed to `update'.
+
+2003-07-31  Derek Price  <address@hidden>
+
+       * rcscmds.c (RCS_merge): Pass `--' before the filename arguments to
+       diff so that filenames starting with `-' can be merged.
+       * sanity.sh (join5): New test for same.
+
+2003-07-31  Derek Price  <address@hidden>
+
+       * add.c (add_directory): Don't print status information in really_quiet
+       mode.
+
+2003-07-29  Derek Price  <address@hidden>
+
+       * commit.c (checkaddfile): Simplify the logic here, using assumptions
+       already made later in the function to remove calls to locate_rcs and
+       some conditionals.  Use same assumptions to remove some variables.
+
+2003-07-29  Derek Price  <address@hidden>
+
+       * login.c: Remove GETPASS & HAVE_GETPASSPHRASE cruft in favor of always
+       using the GNULIB getpass since the system getpass was removed from the
+       POSIX.2 specification.
+
+2003-07-28  Derek Price  <address@hidden>
+
+       * subr.c (strip_trailiing_newlines): Use size_t rather than int to
+       count string length.
+       (Suggestion from Paul Edwards, who provides a broken return email
+       address in Tonga.  I believe he is actually from Australia.)
+
+2003-07-28  Derek Price  <address@hidden>
+
+       * checkout.c (checkout): Remove out-of-date comment about Checkin.prog
+       and Update.prog.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_parsercsfile): Declare rcsfile argument as const.
+       * rcs.h (RCS_parsercsfile): Update prototype to match.
+       * commit.c (fixaddfile): Accept a single path to an rcs file as an
+       argument rather than trying to look it up again when it is not
+       necessary.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * commit.c (finaladd): But don't free variables we no longer allocate.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * checkin.c (Checkin): The rcs argument is unecessary since we know
+       that the parsed RCS data always exists as part of finfo by the time
+       this function gets called.
+       * commit.c (commit_fileproc, finaladd):  Use new Checkin() API.
+       * cvs.h (Checkin): Update prototype.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * subr.c (strip_trailing_newlines): Check len b4 str[len] to avoid
+       exceeding the array bounds when the string length == 0.
+       (Report from John Tytgat <address@hidden>.)
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * subr.c (strip_trailing_newlines): Generalize this function to watch
+       len so that it cannot walk past the beginning of the string passed in.
+       (Report from John Tytgat <address@hidden>.)
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * subr.c (strip_trailing_newlines): Leave the K&R function decl on this
+       branch.
+
+2003-07-25  Derek Price  <address@hidden>
+
+       * cvs.h (strip_trailing_newlines): Update prototype.
+       * subr.c (strip_trailing_newlines): Return true when newlines are
+       removed.
+       * server.c (pserver_authenticate_connection): Don't give a DOS attack a
+       chance to authenticate accidentally because I like to be paranoid.
+       * sanity.sh (pserver): New test for same.
+
+2003-07-24  Mark D. Baushke  <address@hidden>
+
+       * server.c (check_system_password): Cleanup pam_* return code
+       checking. (Original patch from Brian Murphy <address@hidden>.)
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * main.c: But the GNULIB gethostname accepts an int not ssize_t.
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * main.c: Don't declare gethostname when we already have it to avoid
+       decl conflicts.
+
+2003-07-24  Derek Price  <address@hidden>
+
+       * server.c (server_directory): Add a TRACE for OS X debugging.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * client.c: Avoid some warning from gcc -Wall.
+       * lock.c: Ditto.
+       * login.c: Ditto.
+       * modules.c: Ditto.
+       * server.c: Ditto.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * filesubr.c (isaccessible): Correct some double const warnings from
+       protoize.
+       * login.c (password_entry_parseline): Ditto.
+       * server.c (kserver_authenticate_connection): Remove a multi-line
+       string along with the warning from GCC.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * *.{c,h}: Back out the indent run.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * cvs.h: Move some includes into lib/system.h.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * *.{c,h}: Run these through GNU indent as per the NEWS file to fix
+       some of the long function decls which came out of protoize.
+
+2003-07-23  Derek Price  <address@hidden>
+
+       * *.c: Run these through GCC's protoize to convert the pre-ANSI C
+       function decls to C89 compliance.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * cvs.h: Remove support for the PTR macro, since we can assume void *
+       under C89.  It also was not being made use of in very many places so
+       even most K&R compilers must have supported it, or nobody was using
+       K&R compilers.  We can also assume <stdarg.h> under C89, but move the
+       include...
+       * error.c: ...here, de-macro VA_START, and...
+       * subr.c: ...put a copy here too, as well as de-macroing VA_START.
+       * history.c: s/PTR /void */g;
+       * modules.c: Ditto.
+
+2003-07-22  Derek Price  <address@hidden>
+
+       * cvs.h: Include GNULIB exit.h.
+
+2003-07-20  Derek Price  <address@hidden>
+
+       * server.c: Add PAM support.
+       (cvs_pam_userinfo): New data type for PAM conversations.
+       (cvs_pam_conv): New function.
+       (check_password): Add PAM support.
+       (Original patch from Brian Murphy <address@hidden>.)
+
+2003-07-20  Derek Price  <address@hidden>
+
+       * wrapper.c: Remove mention of obsolete -f and -t wrapper options from
+       a comment.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * sanity.sh (release): Add new tests for release with unrecognized
+       recognized directories.
+
+2003-07-18  Derek Price  <address@hidden>
+
+       * vers_ts (Version_TS): Don't allow command line keyword expansion
+       modes to override binary mode.
+       * sanity.sh (): Tests for the above.
+       (Original patch from Dieter Maurer <address@hidden>.)
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * add.c: s/PROTO//.
+       * admin.c: Ditto.
+       * annotate.c: Ditto.
+       * buffer.c: Ditto.
+       * buffer.h: Ditto.
+       * checkout.c: Ditto.
+       * classify.c: Ditto.
+       * client.c: Ditto.
+       * client.h: Ditto.
+       * commit.c: Ditto.
+       * cvs.h: Ditto.
+       * diff.c: Ditto.
+       * edit.c: Ditto.
+       * edit.h: Ditto.
+       * entries.c: Ditto.
+       * error.c: Ditto.
+       * error.h: Ditto.
+       * expand_path.c: Ditto.
+       * fileattr.c: Ditto.
+       * fileattr.h: Ditto.
+       * filesubr.c: Ditto.
+       * find_names.c: Ditto.
+       * gssapi-client.c: Ditto.
+       * gssapi-client.h: Ditto.
+       * hardlink.h: Ditto.
+       * hash.c: Ditto.
+       * hash.h: Ditto.
+       * history.c: Ditto.
+       * import.c: Ditto.
+       * kerberos4-client.h: Ditto.
+       * lock.c: Ditto.
+       * log-buffer.c: Ditto.
+       * log-buffer.h: Ditto.
+       * log.c: Ditto.
+       * login.c: Ditto.
+       * logmsg.c: Ditto.
+       * mkmodules.c: Ditto.
+       * modules.c: Ditto.
+       * myndbm.c: Ditto.
+       * myndbm.h: Ditto.
+       * patch.c: Ditto.
+       * rcs.c: Ditto.
+       * rcs.h: Ditto.
+       * rcscmds.c: Ditto.
+       * recurse.c: Ditto.
+       * release.c: Ditto.
+       * remove.c: Ditto.
+       * root.c: Ditto.
+       * rsh-client.h: Ditto.
+       * run.c: Ditto.
+       * server.c: Ditto.
+       * server.h: Ditto.
+       * socket-client.c: Ditto.
+       * socket-client.h: Ditto.
+       * status.c: Ditto.
+       * subr.c: Ditto.
+       * tag.c: Ditto.
+       * update.c: Ditto.
+       * update.h: Ditto.
+       * vers_ts.c: Ditto.
+       * watch.c: Ditto.
+       * watch.h: Ditto.
+       * wrapper.c: Ditto.
+       * zlib.c: Ditto.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * cvs.h: Include pathmax.h.
+
+2003-07-16  Derek Price  <address@hidden>
+
+       * myndbm.c: Use the GNU getdelim function rather than our package
+       getstr.
+       * server.c: Use the (hopefully) GNULIB and more appropriately named
+       getnline function rather than our getline_safe function.
+
+2003-07-12  Larry Jones  <address@hidden>
+
+       * sanity.sh (diffnl): New tests for diff on files with no newline
+       at end.
+       (Patch from Andrew Moise <address@hidden>.)
+
+2003-07-11  Larry Jones  <address@hidden>
+
+       * Makefile.am (cvs_DEPENDENCIES): Include the libraries.
+       * Makefile.in: Regenerated.
+
+       * diff.c (diff_file_nodiff): Fix -Wall complaints.
+       * log.c (rlog_proc): Ditto.
+       * rcs.c (RCS_setlocalid): Ditto.
+       * recurse.c (start_recursion): Handle null repository_in in TRACE.
+
+2003-07-09  Larry Jones  <address@hidden>
+
+       * sanity.sh: Use ${CPROG} instead of ${PROG} so that changes merged
+       from cvs1-11-x-branch without updating won't appear to work.
+
+       * sanity.sh (keywordexpand): Use ${SPROG} instead of ${PROG} as
+       required.
+
+       * add.c (add): Update "re-adding" message to have quotes around
+       the file name like all the other similar messages.
+       * sanity.sh: Update to match.
+
+       * update.c (join_file): Handle locally removed but not yet committed
+       files.
+       (Reported by Larry Lords <address@hidden>.)
+       * sanity.sh (join, join4): New tests for above.
+
+2003-06-28  Larry Jones  <address@hidden>
+
+       * commit.c (fixaddfile): Bail out if locate_rcs() fails.  Make
+       parameters const.
+
+       * add.c (add): Fix -Wall complaints.
+       * diff.c (diff_file_nodiff): Ditto.
+       * filesubr.c (cvs_casecmp): Ditto.
+       * patch.c (patch_fileproc): Ditto.
+       * rcs.c (RCS_cmp_file): Ditto.
+       * root.c (parse_cvsroot): Ditto.
+       * subr.c (locate_file_in_dir): Ditto.
+       * cvs.h (cvs_casecmp, locate_file_in_dir): Update prototypes.
+
+2003-06-27  Larry Jones  <address@hidden>
+
+       * lock.c (readers_exist): Use LockDir rather than always looking
+       in the repository.
+       (Original patch from Robert Ambalu <address@hidden>.)
+       Remove vestigial lock promotion code.
+
+2003-06-27  Derek Price  <address@hidden>
+
+       * checkout.c (safe_location): Don't try and print from a NULL pointer.
+       (Report and original patch from Sampo Kellomaki <address@hidden>.)
+
+2003-06-26  Larry Jones  <address@hidden>
+
+       * hash.c (sortlist): Avoid crash when list is null.
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * patch.c (patch_fileproc): Output revision number of the original
+       revision in the removed case.
+       (Idea from Paul Edwards <address@hidden>.)
+
+       * sanity.sh (rdiff-add-remove-nodiff): Rename to...
+       (rdiff-short): ...this.  Test for the above changes.  Add some tests
+       for when rev2 defaults to the trunk.  Expand comments.
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * client.c: Reapply Alexey's changes to client.c from three commits
+       back they were left out of the diff.
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * add.c (add): Fix xmalloc's strlen() of wrong variable.
+       * checkout.c (safe_location): leak: reused where_location without free.
+       * log.c (rlog_proc): leak: free where before exit.
+       * logmsg.c (do_verify): leak: free verifymsg_script before exit.
+       (Original patch from Kenneth Lorber <address@hidden>.)
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * client.c: Remove silly comment.
+       (Patch from Alexey Mahotkin  <address@hidden>.)
+
+2003-06-23  Derek Price  <address@hidden>
+
+       * kerberos4-client.h, kerberos4-client.c, client.c: Rename
+       start_tcp_server() to start_kerberos4_server().
+       (Patch from Alexey Mahotkin  <address@hidden>.)
+
+2003-06-20  Derek Price  <address@hidden>
+
+       * kerberos-client.c, kerberos-client.h, client.c: Split out
+       Kerberos 4 code to separate files.
+
+       * Makefile.am: Mention new files.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-06-16  Derek Price  <address@hidden>
+
+       * cvs.h: Comment an #endif.
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_name): Remove portability cruft obsoleted by the
+       import of GNULIB's mkstemp().
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * subr.c (file_has_conflict): Fix comment.
+       (Patch from Paul Edwards <address@hidden>.)
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * subr.c (xrealloc): Trivial comment fix.
+       (Patch from Kenneth Lorber <address@hidden>.)
+
+2003-06-13  Derek Price  <address@hidden>
+
+       * diff.c (diff_fileproc): Fix memory leak.
+       (Patch from Kenneth Lorber <address@hidden>.)
+
+2003-06-12  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot, local_cvsroot): Parse trailing '/'s off the
+       end of cvsroots.  Make arguments const.
+       * cvs.h: Update prototypes to match.
+       (Idea from Miles Zarathustra <address@hidden>.)
+
+2003-06-12  Derek Price  <address@hidden>
+
+       * checkout.c (safe_location): Fix memory leak.
+       (Patch from Kenneth Lorber <address@hidden>.)
+
+2003-06-11  Larry Jones  <address@hidden>
+
+       * filesubr.c (xresolvepath): Fix memory leak.
+       (Original patch from Kenneth Lorber <address@hidden>.)
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * commit.c: Change Parse_Info calling convention to include void *
+       suggested in HACKING file and generalize all argument to opt.
+       * cvs.h: update defs for Parse_Info and its callproc.
+       * edit.c: Change Parse_Info calls for new calling convention.
+       * logmsg.c: Ditto.
+       * parseinfo.c: Change Parse_Info for new calling convention.
+       * server.c: Change Parse_Info calls for new calling convention.
+       * tag.c: Ditto.
+       (Original patch from Ken Lorber <address@hidden>.)
+
+2003-06-11  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerate for new configure.in.
+
+2003-06-11  Larry Jones  <address@hidden>
+
+       * sanity.sh: Change warning messages to note that defective tools
+       can result in defective results, both pass and fail.  Also change
+       "which" to "that" for errant grammar pedants.
+
+2003-06-10  Derek Price  <address@hidden>
+
+       * recurse.c (start_recursion): Avoid unneeded allocation.
+
+2003-06-10  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (RCS_setlocalid,RCS_setincexc): New functions to support
+       LocalKeyword and KeywordExpand config keywords.
+
+       * rcs.h (RCS_setlocalid,RCS_setincexc): New prototypes.
+
+       * parseinfo.c (parse_config): Added LocalKeyword
+       and KeywordExpand keywords.
+
+       * sanity.sh (keywordexpand): New CVSROOT/config tests for
+       LocalKeyword and KeywordExpand options.
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_delete_revs): Reference WOE32 rather than WIN32 in
+       accordance with the GNU convention to avoid implying that we consider
+       the Microsoft Windows Operating Environment any sort of "win".
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): Tidy a comment.
+
+2003-06-09  Derek Price  <address@hidden>
+
+       * patch.c (patch_fileproc): Don't assume the content of files is
+       different just because the revision number is different.
+       * sanity.sh (rdiff-add-remove-nodiff): New tests for the above.
+       (Report & original patches from Paul Edwards <address@hidden>.)
+
+2003-06-04  Derek Price  <address@hidden>
+
+       * cvs.h (locate_file_in_dir): New proto.
+       (locate_rcs): Move proto...
+       * rcs.h: ...here.
+       * filesubr.c (locate_rcs): Move function...
+       * rcs.c: ...here for Windows.
+       * filesubr.c (locate_file_in_dir): Move function...
+       * subr.c: ...here for Windows.
+
+2003-06-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Add comments re portability of test -x & test -e.  Don't
+       bother with quotes in arguments to test when we have laready checked
+       the variables for empty content.
+
+2003-06-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Don't use `test -x' since BSD 4.3 doesn't like it.  Minor
+       reorganization for clarity.  Don't check for $server = false after we
+       set its default.  Use </dev/null with calls to $prog --version when we
+       don't know what $prog does for sure.
+
+2003-06-02  Derek Price  <address@hidden>
+
+       * diff.c (diff_file_nodiff): Don't assume that because two specified
+       revision numbers are different, the contents are different.
+       (Original report & patch from Paul Edwards <address@hidden>.)
+
+       * diff.c (diff_file_nodiff): Pass through rev1_cache to be filled in
+       by RCS_cmp_file when it needs to check out revision 1 into a file.  Add
+       some more informative error messages.  Cleanup for efficiency &
+       readability.
+       (diff_fileproc): Pass the cached revision to RCS_exec_diff().  Clean up
+       the error exit code.  Remove code killed by the changes to
+       diff_file_nodiff().
+       * rcscmds.c (RCS_exec_rcsdiff): Accept and use new cached revision text
+       if present.
+       * rcs.c (RCS_cmp_file): Accept a second revision number and cache the
+       first revision if it needs to be checked out.
+
+       * checkin.c (Checkin): Use new RCS_cmp_file().
+       * import.c (update_rcs_file): Ditto.
+       * no_diff.c (No_Difference): Ditto.
+
+       * cvs.h (RCS_exec_rcsdiff): New proto to match above changes.
+       * rcs.h (RCS_cmp_file): Ditto.
+
+       * sanity.sh: Minor corrections to handle the above changes.
+
+2003-05-31  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): Refuse :fork: only in client mode, not
+       server.
+       * client.c (connect_to_forked_server): Die without SERVER_SUPPORT when
+       CVSSERVER isn't supplied in the environment.
+       * sanity.sh: Default $servercvs to $testcvs.  Add SPROG so that testing
+       a client and server with different names works in order to test the
+       above changes.  s/PROG/SPROG/ almost everywhere.  Misc corrections to
+       tests when ${PROG} is required not to use [a-z]*.  Misc uniqifications
+       of test names.  Misc replacement of CVS_SERVER=${testcvs} with
+       CVS_SERVER=${servercvs}.  Confirm ${testcvs} & ${servercvs} exist and
+       are executable.  Set testcvs_server_support=true if the ${testcvs}
+       executable has server support.  Misc comment corrections.
+       (pserver): s/\$\{testcvs\}/${servercvs}/ for invocations of pserver.
+       (server): Ditto for invocations of `cvs server'.
+       (fork): Accept the `was not compiled with server support' error
+       message.
+
+2003-05-29  Derek Price  <address@hidden>
+
+       * client.c (start_server): Don't send -l to server.
+       * history.c (history_write): Fix comment.
+       * main.c (main): Don't process -l.
+       * server.c (serve_global_option): Ditto.
+       (Suggestion from Rob Lanphier <address@hidden>.)
+
+2003-05-29  Derek Price  <address@hidden>
+
+       * log-buffer.c, rsh-client.c, socket-client.c: Allow compilation
+       with --disable-client.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-05-29  Derek Price  <address@hidden>
+
+       * gssapi-client.h: Move contents of lib/xgssapi.h here.
+       * server.c: xgssapi.h is no more.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-05-28  Derek Price  <address@hidden>
+
+       * server.c: Use standard PROTOTYPES symbol instead of non-standard
+       USE_PROTOTYPES.
+       * error.h, cvs.h: Use PROTO.h.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-05-23  Larry Jones  <address@hidden>
+
+       * sanity.sh (info-cleanup-verifymsg): Avoid race in output.
+
+       * sanity.sh (template): Fix unintended duplicate DEFAULT lines,
+       duplicate test names.
+
+2003-05-22  Larry Jones  <address@hidden>
+
+       * commit.c (commit): Fix leading zero stripping code to not strip
+       unless there's a following digit.
+
+       * parseinfo.c (Parse_Info): Warn if multiple DEFAULT lines found.
+       * sanity.sh (info): New test for above.
+
+2003-05-21  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerate with Automake version 1.7.5.
+
+2003-05-20  Larry Jones  <address@hidden>
+
+       * parseinfo.c (Parse_Info): Fix stupid memory management error.
+
+       * logmsg.c (do_verify): Treate Parse_Info errors as failure.
+       * parseinfo.c (Parse_Info): Don't call expand_path until executing
+       the command so that errors in unexecuted commands aren't reported.
+       * sanity.sh (info): New tests for above.
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * mkmodules.c (config_contents): Add missing newline.
+       (Patch from Kenneth Lorber <address@hidden>.)
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * Makefile.am: Macro subsitution for zlib include path and library
+       location
+       * zlib.c: #ifdef inclusion of <zlib.h> versus "zlib.h"
+       (Original patch from Anthon Pang <address@hidden>.)
+
+       * Makefile.in: Regenerated
+
+2003-05-20  Derek Price  <address@hidden>
+
+       * cvs.h: Move the standard includes into lib/system.h.
+       * subr.c: s/malloc/CVS_MALLOC/;s/realloc/CVS_REALLOC/.
+
+2003-05-19  Derek Price  <address@hidden>
+
+       * filesubr.c: s/\bstat\b/CVS_STAT/g;s/\blstat\b/CVS_LSTAT/g
+       * hardlink.c: Ditto.
+       * ignore.c: Ditto.
+       * rcs.c: Ditto.
+       * update.c: Ditto.
+
+2003-05-18  Larry Jones  <address@hidden>
+
+       * checkout.c (safe_location): Remove unused variable.
+       * hash.c (walklist, printnode, printlist): Use %p to print pointers
+       if available, convert to unsigned long if not.
+       * recurse.c (start_recursion, do_recursion): Ditto.
+       * tag.c (rtag_proc, tag_check_valid): Ditto.
+
+2003-05-18  Mark D. Baushke  <address@hidden>
+
+       * Makefile.am (localcheck,remotecheck): Use cvs$(EXEEXT) not cvs.
+       * Makefile.in: Regenerated.
+       * sanity.sh (status-init-7): Use ${PROG} not cvs in tests.
+       (branch-after-import-5): Ditto.
+       (keywordname-update-11): Ditto.
+
+2003-05-18  Larry Jones  <address@hidden>
+
+       * server.h (kserver_authenticate_connection,
+       pserver_authenticate_connection): Add prototypes.
+
+       * client.c (update_entries): Set file's access time to the current
+       time rather than the same as the modification time.
+       * vers_ts.c (Version_TS): Ditto.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * client.c: #ifdef inclusion of gssapi-client.h.
+       * server.c: Ditto.
+       (Reported by Boyd Lynn Gerber <address@hidden>.)
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * client.h: Move some of the GSSAPI stuff...
+       * gssapi-client.h: ...to this new file.
+       * client.c (start_server): Use new initialize_gssapi_buffers().
+       (*): Move most of the GSSAPI stuff from here and...
+       * server.c (*): ...here...
+       * gssapi-client.c: ...to this new file.
+       * Makefile.am (EXTRA_cvs_SOURCES, cvs_DEPENDENCIES, cvs_LDADD): Support
+       $(cvs_client_objects).
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-09  Derek Price  <address@hidden>
+
+       * buffer.c: Reindent some compiler directives in order to make nesting
+       clearer.
+
+2003-05-08  Derek Price  <address@hidden>
+
+       * client.c (log_buffer*): Move...
+       * log-buffer.c (log_buffer*): ...to this new file.
+       * log-buffer.h (setup_logfiles): New file to share prototype.
+       * Makefile.am: Add log-buffer.c & log-buffer.h.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-08  Derek Price  <address@hidden>
+
+       * client.c (init_sockaddr): Move...
+       * socket-client.c (init_sockaddr): ...here.
+       * socket-client.h (init_sockaddr): Prototype.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-05-08  Derek Price  <address@hidden>
+
+       * client.c (send_to_server): Move most of the functionality to and
+       wrap...
+       (send_to_server_via): ...this new function which accepts the buffer
+       pointer as an argument.
+       (read_line): Ditto, but to...
+       (read_line_via): ...here.
+       (auth_server): Rename lto_server & lfrom_server to s/^l//.  Remove
+       ugly code which sets the global versions of these variables
+       temporarily for function calls.
+       s/send_to_server(/send_to_server_via(to_server,/g,
+       s/read_line(/read_line(from_server,/g,
+       Remove emotional FIXME comment to the effect that all this is
+       necessary.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-05-07  Derek Price  <address@hidden>
+
+       * client.c (from_server, to_server): Rename these global buffer
+       pointers to...
+       (global_from_server, global_to_server): ...this in order to avoid
+       confusion.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-05-07  Derek Price  <address@hidden>
+
+       * client.c (make_bufs_from_fds, connect_to_forked_server,
+       start_tcp_server): Rename struct buffer ** arguments to s/$/_p/ in an
+       attempt to denote their pointerness more clearly.
+       * rsh-client.c (start_rsh_client): Ditto.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * client.h (make_bufs_from_fds): Sanitize prototype so that the
+       argument name change doesn't clash.
+
+2003-05-07  Derek Price  <address@hidden>
+
+       * client.h (make_bufs_from_fd): Prototype in order to make available to
+       rsh-client.c.
+       * client.c (start_rsh_server): Moved most of the RSH (:ext:) client
+       stuff to...
+       * rsh-client.h: ...here...
+       * rsh-client.c: ...and here.
+       * Makefile.am (cvs_SOURCES): Add new source files.
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-06  Derek Price  <address@hidden>
+
+       * client.c (socket_buffer_*): Moved most of the socket stuff to...
+       * socket-client.h: ...here...
+       * socket-client.c: ...and here.
+       * Makefile.am (cvs_SOURCES): Add new source files.
+       (Patch from Alexey Mahotkin  <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-05-05  Derek Price  <address@hidden>
+
+       * hash.c (findnode): Document behavior of this function when its list
+       argument is NULL and document this behavior.  Remove FIXME comment to
+       the effect that this is necessary.
+
+2003-05-01  Derek Price  <address@hidden>
+
+       * main.c (main): Ignore -z when CLIENT_SUPPORT is not defined.
+       (Report from Jim Salter <address@hidden>.)
+
+2003-05-01  Derek Price  <address@hidden>
+
+       * repos.c (Sanitize_Repository_Name): Remove some old comments about
+       the defunct RELATIVE_REPOS macro.
+       * server.c (outside_root): Ditto.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * vers_ts.c (Version_TS): Minor optimization.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * add.c (add): Fix a possible, if unlikely, memory out of bounds error.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * commit.c: Free vers in single place
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * Makefile.am: Get rid of $includeopt, using $CPPFLAGS as intended by
+       the Autoconf folk.
+       (Patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.in: Regenerated.
+
+2003-04-30  Derek Price  <address@hidden>
+
+       * add.c (add): Fix a possible, if unlikely, memory out of bounds error.
+
+2003-04-28  Derek Price  <address@hidden>
+
+       * client.c (save_prog): Remove unneeded struct.
+       (checkin_progs, update_progs): Remove these unneeded globals.
+       (handle_set_checkin_prog, handle_set_update_prog, do_deferred_progs):
+       Remove these functions.
+       (send_repository): Remove checkin and update prog support.
+       (responses): Remove Set-checkin-prog and Set-update-prog.
+       (get_responses_and_close): Don't call do_deferred_prog().
+       * commit.c (commit_usage): Remove reference to -n.
+       (commit): Don't set and send run_module_prog via -n.  Don't run
+       Checkin.prog or Checkout.prog in local mode.
+       * modules.c (CVSMODULE_OPTS): Remove -i and -u.
+       (do_module): Don't process -i and -u options to set checkin and update
+       progs, respectively.
+       * server.c (server_prog, serve_checkin_prog, server_update_prog):
+       Remove unused functions.
+       (requests): Remove Checkin-prog and Update-prog.
+       * update.c (update_dirleave_proc): Remove update prog functionality.
+
+       * cvs.h (CVSADM_CIPROG, CVSADM_UPROG): Remove unneeded defines.
+       * server.h (server_prog): Remove proto.
+       (progs): Remove enum.
+
+       * sanity.sh (modules5): Remove tests for checkin and update programs.
+
+2003-04-15  Derek Price  <address@hidden>
+
+       * sanity.sh (*): Shrink the yucky case statement using sed's transform
+       functionality.
+       (getlongoptarg): Convert this function to only confirm the arg and move
+       it...
+       (checklongoptarg): ...here.
+
+2003-04-10  Larry Jones  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2003-04-04  Larry Jones  <address@hidden>
+
+       * sanity.sh (branches4-15): New test.
+
+       * error.h: Avoid __pure__ for GCC versions < 2.96 & __malloc__ for GCC
+       versions < 3.0.
+
+2003-04-03  Derek Price  <address@hidden>
+
+       * Makefile.am (DISTCLEAN_FILES): Move the contents of this variable...
+       (distclean-local): ...to this target now that Automake supports it.
+
+2003-04-03  Derek Price  <address@hidden>
+
+       * cvs.h: Avoid __pure__ for GCC versions < 2.96 & __malloc__ for GCC
+       versions < 3.0.
+
+2003-04-02  Larry Jones  <address@hidden>
+
+       * update.c (update, update_fileproc, update_filesdone_proc,
+       update_dirent_proc, update_dirleave_proc): Keep track of whether
+       a tag is both a revision tag and a branch tag and warn the user.
+       * sanity.sh (branches4): New tests for above.
+
+2003-04-02  Derek Price  <address@hidden>
+
+       * recurse.c (do_recursion): Use strstr("/./") rather than strchr('.')
+       to catch only indirections in paths and not directory names with dots
+       in them.
+       (Report from Pavel Roskin <address@hidden>.)
+
+       * sanity.sh (multiroot): Put a dot in the CVSROOT_DIRNAMEs.
+       (dottedroot): New test.
+       (Based on a script from Pavel Roskin <address@hidden>.)
+
+2003-04-01  Derek Price  <address@hidden>
+
+       * sanity.sh (multiroot2-9): Add newly TRACEd parse_cvsroot() to
+       expected output.
+
+2003-03-31  Derek Price  <address@hidden>
+
+       * rcs.c (freercsnode): Revert an accidental change from the previous
+       commit.
+
+2003-03-31  Derek Price  <address@hidden>
+
+       * recurse.c (start_recursion): Accept new repository argument so that
+       the working directory may be tracked by do_recursion without using
+       xgetwd(), which returned a value different from the one the user
+       requested when symlinks were in use.  Add TRACE.  Pass repository_in
+       to do_recursion() as part of the recursion frame.
+       (do_recursion): Default srepository to NULL and only set when we set
+       repository.  Keep track of repository using xframe.repository for the
+       r* commands rather than xgetwd(), which used to break when CVSROOT was
+       a symlink to a real root.
+
+       * cvs.h (xreadlink): #ifdef HAVE_READLINK proto.
+       (xresolvepath): New proto.
+       (start_recursion): Add repository to proto.
+       (*): Define some more abstract TRACE levels.
+       * update.h (do_update): Add repository argument to proto.
+
+       * checkout.c (safe_location): Add more complete header comment.  Add
+       TRACE.  Use new xresolvepath() function.  Always return true in
+       client mode since checking our destination path against the CVSROOT
+       path is usually meaningless in client/server mode.
+       (checkout_proc): Pass repository to do_update() for later use with
+       start_recursion().
+       (*): s/<chdir>/CVS_CHDIR/.
+       * filesubr.c (xreadlink): #ifdef HAVE_READLINK this function.  Add more
+       complete header comment.
+       (xresolvepath): New function.
+       * hash.c (walklist): Add TRACE.
+       * main.c (main): Don't copy and dispose of CVSRoot_cmdline twice.
+       * patch.c (patch_proc): Add TRACE.  Pass repository to
+       tag_check_valid() for r* commands.
+       * root.c (parse_cvsroot): Add TRACE.
+       * tag.c (rtag_proc): Add TRACE.
+       (check_fileproc): Ditto.
+       (tag_check_valid): Ditto.
+       * update.c (do_update): Accept new repository argument for co.
+       (update): Pass NULL repository to do_update().
+
+       * admin.c (*): Use new definition of start_recursion().
+       * annotate.c (*): Ditto.
+       * client.c (*): Ditto.
+       * commit.c (*): Ditto.
+       * diff.c (*): Ditto.
+       * edit.c (*): Ditto.
+       * lock.c (*): Ditto.
+       * log.c (*): Ditto.
+       * patch.c (*): Ditto.
+       * remove.c (*): Ditto.
+       * status.c (*): Ditto.
+       * tag.c (*): Ditto.
+       * update.c (*): Ditto.
+       * watch.c (*): Ditto.
+
+       * sanity.sh: Add new -l option to test symlinked roots.
+       (abspath-3.2): Use [a-z]* rather than "checkout".
+       (check_repository-1): Add server error messages about absolute paths
+       since the client now skips destination validity checks.
+       (check_repository-2): Process client error messages about CVSROOT
+       files being in the way since the client skips destination validity
+       checks since it should be rare that a client is running in
+       client/server mode on the server and CVS has no current way to check if
+       it is runnning on the server.
+
+2003-03-27  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (rdiff2): Add new test case for SEGV problem reported
+       against cvs 1.11.5.
+       (Report from James Cribb)
+
+2003-03-26  Derek Price  <address@hidden>
+
+       * client.c: Fix, reorganize, and comment ifdefs for AUTH_CLIENT_SUPPORT
+       and HAVE_GSSAPI.
+       * client.h: Ditto.  Remove some unecessary server function prototypes.
+
+2003-03-26  Derek Price  <address@hidden>
+
+       * client.c: Include the net headers for HAVE_GSSAPI.
+       (Report from Jim Salter <address@hidden>.)
+
+2003-03-26  Derek Price  <address@hidden>
+
+       * main.c (main): Verify the argument to -z when running without
+       CLIENT_SUPPORT since Eric Siegerman complained about being bit
+       by a run of `cvs -z -n up' which parsed the -n as the argument to
+       -z.
+       * sanity.sh (opterrmsg): New tests for -z argument checking.
+
+2003-03-26  Larry Jones  <address@hidden>
+
+       * main.c (main): Use strtol() instead of atoi() when parsing -z
+       to detect errors.
+       (Reported by Eric Siegerman <address@hidden>.)
+
+2003-03-25  Derek Price  <address@hidden>
+
+       * cvs.h: Disable GNU attributes as part of PROTO behavior.
+       * error.h: Mirror GNU attribute definitions from cvs.h.
+
+2003-03-25  Derek Price  <address@hidden>
+
+       * subr.c (cvs_trace): #ifdef use of server_active.
+       (Report from Jim Salter <address@hidden>.)
+
+       * cvs.h (xmalloc, xrealloc, xstrdup, parse_cvsroot,
+       local_cvsroot, normalize_cvsroot): Use GNU attributes.
+       * error.h (error_exit): Fix PROTO/__attribute__ specification.
+       * root.c (new_cvsroot_t): Add GNU attribute.
+
+2003-03-24  Derek Price  <address@hidden>
+
+       * Makefile.am: Update copyright notice.
+
+       * Makefile.in: Regenerated.
+
+2003-03-24  Larry Jones  <address@hidden>
+
+       * server.h (server_clear_template): Add declaration.
+       (server_template): Add parameter names to prototype.
+
+2003-03-20  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (env): Try more than one ps command if the first one
+       fails. This may let the test succeed on more platforms. Also,
+       keep the ps output that was processed for the error report.
+
+2003-03-19  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh (env): Use 'ps -el' rather than 'ps -l' so that
+       crontab jobs that might be running these tests without a
+       controlling terminal work properly.
+
+       * client.c (start_rsh_server): Use new definition of RSH_DFLT to
+       allow "rsh" to be configured to default to "ssh" or some other
+       local remote transport program.
+
+       * Makefile.in: Regenerated.
+
+2003-03-19  Larry Jones  <address@hidden>
+
+       * filesubr.c (mkdir_if_needed): Save errno since isdir() can clobber.
+       (Patch from Brian Poole <address@hidden>.)
+       * sanity.sh (abspath-4): Update to match.
+
+       * filesubr.c (locate_rcs): Fix gcc warning.
+
+2003-03-19  Derek Price  <address@hidden>
+
+       * add.c (add_directory): Only call WriteTemplate when the server is
+       active.
+       * create_adm.c (Create_Admin): Don't call WriteTemplate here since
+       Create_Admin is only called from the client.
+       * commit.c (commit_dirleaveproc): Don't call WriteTemplate here.  I'm
+       a little confused as to why since update_direntproc works for update.c,
+       but I can't come up with a test case that fails when this call is
+       missing.  Nor can I come up with a test case that passes when this call
+       is present and the one in commit_filesdoneproc is removed.
+       * sanity.sh (template): Tidy, minimize, and add some extra tests.
+
+2003-03-19  Mark D. Baushke  <address@hidden>
+
+       * .cvsignore: Added sanity.config.sh, a new auto-generated file.
+
+       * cvs.h (CVS_PID_ENV): New environment variable CVS_PID has the
+       pid of the parent cvs process.
+       * main.c (main): Initialize it.
+       * sanity.sh (env): Test it.
+
+2003-03-19  Derek Price  <address@hidden>
+
+       * sanity.config.sh.in: New file.
+       * sanity.sh: Source new config file when available.  Accept alternate
+       config file as an argument to a -c option.  Accept long options with
+       arguments.
+       (getlongoptarg): New function.
+
+       * Makefile.in: Regenerated.
+
+2003-03-18  Derek Price  <address@hidden>
+
+       * root.c (parse_root): Add some more comments and expand
+       #ifdef CLIENT_SUPPORT pragmas.  Rearrange sanity checks slightly.
+
+2003-03-18  Derek Price  <address@hidden>
+
+       * main.c (main): Output -R warning in quiet mode and correct spelling
+       in this warning message.
+       * sanity.sh (commit-readonlyfs-2r4): Correct cascaded spelling mistake
+       in test.
+
+2003-03-17  Derek Price  <address@hidden>
+
+       * add.c: Correct comment.
+       * client.c: Ditto.
+       * checkin.c (Checkin): Pass work file name to RCS_checkin so that this
+       function works properly in the case insensitive mode.
+       * commit.c (checkaddfile): Fix and factor add logic so that the
+       correct files and directories are created in the case insensitive mode.
+       Reuse code in RCS_parse() below.  This avoids a problem that could
+       cause corrupted RCS files to be created on an add from a case
+       insensitive system.  Corrupted RCS files could cause later assertion
+       failures for everyone.
+       (locate_rcs): Move this function...
+       * filesubr.c (locate_rcs): ...here and rewrite it.
+       (fopen_case): Remove this function.
+       (locate_file_in_dir): New function.
+       * cvs.h (locate_rcs): Prototype new function.
+       * rcs.c (RCS_parse): Factor out file location into locate_rcs.
+
+2003-03-17  Mark D. Baushke  <address@hidden>
+
+       * main.c (main): Issue a warning about readonlyfs options unless
+       quiet or really_quiet is set.
+       * lock.c (Writer_Lock): Modify readonlyfs error message text.
+       * sanity.sh (commit-readonlyfs): Adjust test for new messages.
+
+2003-03-17  Larry Jones  <address@hidden>
+
+       * server.c (switch_to_user): Add syslog calls for setgid/setuid
+       failure.
+
+2003-03-16  Mark D. Baushke  <address@hidden>
+
+       * cvs.h (CVSREADONLYFS_ENV): New macro to support new environment
+       variable "CVSREADONLYFS" for read-only file-system repository mode.
+       * lock.c (Reader_Lock, Writer_Lock): Add support for new read-only
+       file-system repository mode.
+       * main.c (main, opt_usage): Ditto.
+       * root.c (parse_cvsroot): Ditto.
+       * sanity.sh (commit-readonlyfs): Test new read-only file-system
+       repository mode.
+
+2003-03-14  Mark D. Baushke  <address@hidden>
+
+       * server.c (template_proc): Fix broken Template protocol code.
+       Must call send buf_send_counted() for Template files to avoid
+       "Protocol error: uncounted data discarded" messages in some
+       circumstances.
+       * sanity.sh (template): Test case to verify fix this fix.
+
+2003-03-10  Mark D. Baushke  <address@hidden>
+
+       * cvs.h (WriteTemplate): Add missing prototype.
+
+2003-03-07  Mark D Baushke <address@hidden>
+
+       * sanity.sh: Fix broken setting of the servercvs variable.
+
+2003-03-07  Derek Price  <address@hidden>
+
+       * sanity.sh (help): Add explanation of CVS-TO-TEST and edit for
+       consistency.
+
+2003-03-07  Derek Price  <address@hidden>
+
+       * sanity.sh (usage): Show users long --help rather than less
+       informative -h.
+
+2003-03-07  Derek Price  <address@hidden>
+
+       * sanity.sh: Add support for long options.
+       (exit_usage): Move the actual generation of usage text to...
+       (usage): ...this new function and improve the usage message.
+       (exit_help): New function.
+
+2003-03-07  Mark D. Baushke  <address@hidden>
+
+       * sanity.sh: Drop the clientcvs option. Add usage info for
+       the -s servercvs option.
+
+2003-03-07  Larry Jones  <address@hidden>
+
+       * commit.c (check_fileproc): Remove unused variables.
+
+       * patch.c (patch): Pass local to do_module so that -l actually works.
+       (Reported by John Coers <address@hidden>.)
+       (patch_fileproc): Fix uninitialized variables.
+       * sanity.sh: Define a DATE pattern for rdiff and use it.
+       (basic2-24a): New test for above.
+
+2003-03-07  Mark D. Baushke  <address@hidden>
+
+       * entries.c (WriteTemplate): New function to control updates to
+       the CVS/Template file or its removal.
+       * create_adm.c (Create_Admin): Use the new WriteTemplate function.
+       * add.c (add_directory): Add a WriteTemplate() call
+       when a new directory is added to the repository.
+       * commit.c (commit_filesdoneproc): Ensure that the CVS/Template is
+       updated at the end of a commit -- mostly to remove it if it is not
+       relevant.
+       (commit_dirleaveproc): Ensure that the CVS/Template gets updated
+       when the directory is left.
+       * update.c (update_dirent_proc): Update CVS/Template file.
+       * server.c (server_clear_template): New protocol response to
+       remove existing CVS/Template files.
+       * client.c (clear_template): New function to remove or truncate a
+       CVS/Template file.
+       (handle_clear_template): New function. Handle Clear-template
+       protocol response message.
+       (save_prog): Add new Clear-template response line.
+       * sanity.sh (template): Test the CVS/Template creation with
+       the remote protocol. Nothing gets created locally.
+       (multiroot2): Fix for minor changes to trace output.
+       (getopts): Allow tests to be run with specified client and server
+       cvs commands to allow for interoperatbility testing.
+       (check_keep): New shell function for --keep processing.
+
+2003-03-06  Derek Price  <address@hidden>
+
+       * subr.c (file_has_conflict): New file.
+       * commit.c (check_fileproc): Factor code into new file_has_conflict()
+       function.
+       * update.c (update_fileproc): Ditto.
+       * status.c (status_fileproc): Use new file_has_conflict() function.
+       (Report from Bernd Kuemmerlen <address@hidden>.)
+
+       * sanity.sh (status): New test for same.
+
+2003-03-06  Larry Jones  <address@hidden>
+
+       * sanity.sh (branches3-4): Set and export CVS_LOCAL_BRANCH_NUM
+       to be sure it really gets into the environment, then unset it
+       when finished (ala CVSWRAPPERS et al).
+
+2003-03-03  Mark D. Baushke  <address@hidden>
+
+       * sanith.sh (branches3): Localize the setting of
+       the CVS_LOCAL_BRANCH_NUM environment variable.
+
+       * rcs.c (RCS_magicrev): CVS_LOCAL_BRANCH_NUM feature.
+       Port of the FreeBSD hack for setting the next magic branch number
+       to be used. The original patch was written by Peter Wemm
+       <address@hidden> and may be found by visiting the URL:
+       
http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/cvs/src/rcs.c.diff?r1=1.1&r2=1.2
+       Implement a horrible (but simple) hack to allow some control over the
+       branch number that is assigned. This is specifically to support the
+       local commit feature of cvsup. If one sets $CVS_LOCAL_BRANCH_NUM to
+       (say) 1000 then branches the local repository, the revision numbers
+       will look like 1.66.1000.xx. This is almost a dead-set certainty that
+       there will be no conflicts with version numbers.
+       (This needs to be something more than an option to 'cvs tag' or 'cvs
+       rtag' as various parts of cvs "know" how to automatically branch files
+       (eg: cvs add). Trying to remember state is getting "Too Hard (TM)")
+       * sanity.sh (branches3): Test the CVS_LOCAL_BRANCH_NUM feature.
+
+2003-03-04  Derek Price  <address@hidden>
+
+       * history.c (history_write): Remove unneeded O_CREAT in the call to
+       open() since we abort a few lines earlier if the file doesn't exist.
+       Add a comment to the effect that this is not the optimal method of
+       doing things and needs fixed.
+
+2003-02-28  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): Set no_password for :gserver: and :kserver:
+       as tokens should already be obtained via external sources.
+       * update.c (update_fileproc): Remove redundant code.
+
+2003-02-28  Larry Jones  <address@hidden>
+
+       * lock.c (set_lock): If possible, try a short wait with no message
+       before calling lock_wait() to optimize master lock contention.
+
+2003-02-26  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout): Send "--" before file names.
+       * sanity.sh (spacefiles): Remote now works just like local.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * sanity.sh (rcs4): Use UTC to work across timezones.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_getdate): Fix a bug that shows up when checking out
+       files by date with the "-D date" command line option. There is
+       code in the original to handle a special case. If the date search
+       finds revision 1.1 it is supposed to check whether revision
+       1.1.1.1 has the same date stamp, which would indicate that the
+       file was originally brought in with "cvs import". In that case it
+       is supposed to return the vendor branch version 1.1.1.1.
+
+       However, there was a bug in the code. It actually compares the date
+       of revision 1.1 for equality with the date given on the command
+       line -- clearly wrong. This commit fixes the coding bug.
+
+       Note: There is an additional bug which is _not_ fixed in this
+       commit. The date comparison should not be a strict equality test.
+       It should allow a fudge factor of, say, 2-3 seconds. Old versions
+       of CVS created the two revisions with two separate invocations of
+       the RCS "ci" command. We have many old files in the tree in which
+       the dates of revisions 1.1 and 1.1.1.1 differ by 1 second.
+
+       This bug was discovered and fixed for FreeBSD cvs. See v 1.21 of
+       <http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/cvs/src/rcs.c.diff>
+        for more information.
+
+       * sanity.sh (rcs4): Tests for same.
+       (Patch from Mark D. Baushke <address@hidden>.)
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * logmsg.c (logfile_write): Do not pass a NULL pointer to
+       fprintf() when we have an empty log message.
+       * sanity.sh (editor): Add new tests to verify correct behavior of
+       empty log messages.
+       (Patch from Mark D. Baushke <address@hidden>, original report from
+       Piotr KUCHARSKI <address@hidden>.)
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * cvs.h (user_admin_options): Rename to...
+       (UserAdminOptions): ...this to match the convention set by
+       of RereadLogAfterVerify.
+       * admin.c (admin): Ditto.
+       * parseinfo.c (parse_config): Ditto.
+
+       * mkmodules.c (config_contents): Update with UserAdminOptions
+       information.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * cvsbug.in: Import use of mktemp function from RedHat 8.0's
+       CVS 1.11.2 RPM.  Use new MKTEMP configure variable.  Use new
+       SENDMAIL from configure.
+
+       * Makefile.in: Regenerated.
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * cvs.h (user_admin_options): New global config option.
+       * admin.c (admin): Handle user_admin_options.
+       * parseinfo.c (parse_config): Handle UserAdminOptions.
+       (Original patch from Dan Peterson <address@hidden>.)
+
+2003-02-25  Derek Price  <address@hidden>
+
+       * watch.c (watch_usage): Use {} rather than () for literals.
+
+2003-02-21  Larry Jones  <address@hidden>
+
+       * server.c (switch_to_user): Update comment, change error message
+       so it's not an exact duplicate of the one in check_password.
+       (check_repository_password): Add syslog call for password mismatches.
+       (check_password): Add syslog call for password mismatches, rearrange
+       code to simplify and eliminate redundancy.
+       (pserver_authenticate_connection): Remove syslog call, now done by
+       lower-level routines.
+
+2003-02-19  Larry Jones  <address@hidden>
+
+       * sanity.sh (admin-10): Add test for repository files not in
+       working directory.
+
+       * admin.c (admin_fileproc): Fix crash when no rcs file, return
+       failure status for bogus files.
+       * sanity.sh (admin-4a): Test for above.
+       (Original patch submitted by Mark D. Baushke <address@hidden>).
+
+2003-02-14  Larry Jones  <address@hidden>
+
+       * log.c (log_expand_revlist): Fix crashes in error cases.
+       (Reported by Bart Santy <address@hidden>.)
+       * sanity.sh (log): New tests for above.
+
+2003-02-14  Derek Price  <address@hidden>
+
+       * rcs.h (RCSNode): Add a field for the original path to print with
+       error messages.
+       * rcs.c (RCS_parsercsfile_i): Keep track of the original path for error
+       messages.
+       (freercsnode): Free the origpath.
+
+2003-02-14  Derek Price  <address@hidden>
+
+       * watch.c (watch_usage): Make the repeatability of -a part of the
+       usage spec.
+
+2003-02-14  Derek Price  <address@hidden>
+
+       * watch.c (watch_usage): Mention default for -a.  Mention multiple
+       invocations of -a.  Mention -R as default.  Use required () rather than
+       optional [] around watch subcommand list in invocation spec.  Use
+       `path' instead of `file'.  Put variable <> around `action' and `path'.
+
+2003-02-12  Derek Price  <address@hidden>
+
+       * main.c (main): Update copyright message to 2003.
+
+2003-02-08  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_checkout): Supply the full function name in the TRACE
+       output.
+       * update.c (checkout_file, join_file): Supply tag properly to
+       RCS_checkout more often.
+       (patch_file): Ditto.  Fill out comments.
+       * sanity.sh (keyword, keywordname): Some changes to accomodate the fact
+       that the above changes cause patches generated by patch_file to fail
+       occassionally.
+
+2003-02-07  Derek Price  <address@hidden>
+
+       * sanity.sh (*): Don't keep running after a test when --keep has been
+       supplied.  That was kind of silly, wasn't it?
+
+2003-02-07  Derek Price  <address@hidden>
+
+       * rcscmds.c (RCS_merge): Add a FIXME.
+
+2003-02-07  Derek Price  <address@hidden>
+
+       * commit.c (checkaddfile): Do not lose the vendor branch when
+       adding files to a new branch. Avoids extranious conflicts for
+       future vendor imports. This was found and fixed in FreeBSD cvs.
+       See http://www.freebsd.org/cgi/query-pr.cgi?pr=4033 for details.
+       * sanity.sh (branch-after-import): New test.
+       (Thanks to Mark D Baushke <address@hidden> for forwarding the
+       patch and writing the test cases!)
+
+       * sanity.sh (branch-after-import): Misc portablility and standard
+       changes.
+
+2003-02-07  Derek Price  <address@hidden>
+
+       * add.c: Exercise the pet peeve Karl Fogel, I think, infected me with
+       about using the word invalid rather than illegal and reserving illegal
+       for use when actually discussing laws and governmentally enforced
+       restrictions:
+       s/illegal/invalid/g;s/legality/validity/g;s/legal/valid/g;
+       * admin.c: Ditto.
+       * cvs.h: Ditto.
+       * expand_path.c: Ditto.
+       * log.c: Ditto.
+       * modules.c: Ditto.
+       * rcs.c: Ditto.
+       * rcs.h: Ditto.
+       * repos.c: Ditto.
+       * root.c: Ditto.
+       * sanity.sh: Ditto.
+       * scramble.c: Ditto.
+       * server.c: Ditto.
+       * subr.c: Ditto.
+
+2003-02-06  Derek Price  <address@hidden>
+
+       * rcs.c (RCS_getdatebranch): Update header comment to reflect the state
+       of the docs and the code's operation.
+
+2003-02-06  Derek Price  <address@hidden>
+
+       * client.c: Use the complete path to the CVSADM_TEMPLATE file in
+       error messages.  Remove related FIXME.
+
+2003-02-04  Derek Price  <address@hidden>
+
+       * status.c (status_fileproc): Add a FIXME comment.
+
+2003-02-04  Derek Price  <address@hidden>
+
+       * sanity.sh (conflicts2- c. 142d): New test for double add and two
+       attempted commits of files with the same name.  Fill out some comments
+       and change one FIXME to a FIXCVS THEN FIXME.
+
+2003-02-03  Derek Price  <address@hidden>
+
+       * client.c (start_Server): Send multiple trace options when
+       necessary.
+       * server.c (server): Update trace option processing to accept multiple
+       -t arguments.
+       * *: Use new TRACE macro.
+
+2003-02-02  Larry Jones  <address@hidden>
+
+       * error.c: Update to match error.h.
+
+       * cvs.h (cvs_trace): Add attribute for GNU printf format checking.
+       * error.h: Use same check for prototypes as cvs.h.  Use PROTO
+       macro rather than #ifdef for error and error_exit.
+
+2003-02-01  Larry Jones  <address@hidden>
+
+       * buffer.c (stdio_buffer_shutdown): Handle EINTR from waitpid.
+       (Patch from Johannes Grødem <address@hidden>.)
+
+2003-02-01  Derek Price  <address@hidden>
+
+       * lock.c: Remove extra line feed on TRACE output.
+
+2003-01-31  Derek Price  <address@hidden>
+
+       * cvs.h: Move header includes in from...
+       * error.c: ...here.  Remove checks for definition of vprintf().
+       Since our error() function was making assumptions about the definition
+       of VA_START, we must not have been compiling on platforms without
+       vprintf for quite awhile and I've heard no complaints.
+       (fperrmsg): Assume vprintf().
+       * subr.c (cvs_trace): Don't assume ANSI C function declarations.
+
+2003-01-31  Derek Price  <address@hidden>
+
+       * main.c (main): Allow multiple -t options.
+       (opt_usage): Correct usage.
+       * cvs.h (TRACE): New macro.
+       * subr.c (cvs_trace): New function.
+       (Thanks to the team at the CVSNT project.)
+
+       * lock.c (*): Use new TRACE macro.
+
+2003-01-31  Derek Price  <address@hidden>
+
+       * sanity.sh (keywordname): Change a "FIXME" comment to "FIXCVS".
+
+2003-01-30  Derek Price  <address@hidden>
+
+       * sanity.sh (keywordname): New test.
+
+2003-01-23  Larry Jones  <address@hidden>
+
+       * diff.c (diff_fileproc): Restructure code to simplify and eliminate
+       redundant tests.
+
+       * server.c (do_cvs_command): Use WCOREDUMP macro rather than hard
+       coding test for core file.
+
+2003-01-21  Larry Jones  <address@hidden>
+
+       * root.c (method_name): Redefine as a 2D array.
+       * root.h (method_name): Ditto.
+
+2003-01-21  Jim Meyering  <address@hidden>
+
+       * add.c (add): Rename local-shadowing `i' to `j'.
+
+       * root.c (method_names): Declare to be a const array of const strings.
+       (Name_Root): Save errno so it doesn't get clobbered
+       by the intervening error call.
+       Use getline's return value, mainly to save a call to strrchr.
+
+2003-01-20  Larry Jones  <address@hidden>
+
+       * myndbm.c (O_ACCMODE): Parenthesize the replacement string so that
+       it parses correctly.
+       (Reported by Andres Bertens <address@hidden>.)
+
+2003-01-15  Karl Fogel  <address@hidden>
+
+       * server.c (dirswitch): Don't free dir_name until right before
+       allocating it again.  This removes a potential double-free
+       problem, whereby this function could free dir_name and then
+       immediately return due to invalid directory syntax (without ever
+       reassigning dir_name), then reenter and free dir_name again.
+
+        Thanks to Stefan Esser <address@hidden> for the fix.
+
+2003-01-08  Larry Jones  <address@hidden>
+
+       * client.c (update_entries): Only "0" is a special version number;
+       other numbers starting with 0 (like 0.1) are normal version numbers.
+       * commit.c (find_fileproc): Ditto.  Also reorganize the code to
+       simplify the conditions.
+       (Reported by Michele Zamparelli <address@hidden>.)
+
+2003-01-02  Larry Jones  <address@hidden>
+
+       * rcs.c (getdelta): Use RCSDEAD rather than literal "dead".
+
+2002-12-27  Derek Price  <address@hidden>
+
+       * admin.c: s/LOCK_(NONE|WRITE|READ)/CVS_$&/g; since the definition of
+       LOCK_WRITE clashes with a definition in objidl.h on Windoze platforms.
+       * annotate.c: Ditto.
+       * client.c: Ditto.
+       * commit.c: Ditto.
+       * cvs.h: Ditto.
+       * diff.c: Ditto.
+       * edit.c: Ditto.
+       * lock.c: Ditto.
+       * log.c: Ditto.
+       * patch.c: Ditto.
+       * recurse.c: Ditto.
+       * remove.c: Ditto.
+       * status.c: Ditto.
+       * tag.c: Ditto.
+       * update.c: Ditto.
+       * watch.c: Ditto.
+       * myndbm.c: Ditto & define O_ACCMODE when it isn't defined, as under
+       Windoze.
+       (Thanks to Stephane Rouleau <address@hidden>,
+        Cristopher Seawood <address@hidden>, and
+        Frederico Costa <address@hidden> for all their hints,
+        tips, and patches for this problem.)
+
+2002-12-20  Derek Price  <address@hidden>
+
+       * client.c (send_a_repository): Suppress a warning under Windoze.
+
+2002-12-19  Derek Price  <address@hidden>
+
+       * Makefile.am: Remove reference to options.h.
+       * cvs.h: Ditto.
+       * options.h: Remove this obsolete file.
+       * sanity.sh: Remove comment about external diffs causing tests to fail
+       since CVS hasn't used external diffs in years.
+
+       * Makefile.in: Regenerated.
+
+2002-12-16  Derek Price  <address@hidden>
+
+       * admin.c: Disable cvsadmin group checking on the client.
+       (Reported by Dan Peterson <address@hidden>.)
+
+2002-12-06  Derek Price  <address@hidden>
+
+       * buffer.c: Replace calls to malloc with calls to xmalloc and calls to
+       realloc with calls to xrealloc.
+       * parseinfo.c: Ditto.
+       * root.c: Ditto.
+       * server.c: Ditto.
+       * zlib.c: Ditto.
+       * scramble.c: Change some comments to refer to xmalloc rather than
+       malloc.
+       (Reported by Dan Peterson <address@hidden>.)
+
+2002-12-04  Derek Price  <address@hidden>
+
+       * options.h: Remove CVS_ADMIN_GROUP.
+
+2002-12-02  Larry Jones  <address@hidden>
+
+       * commit.c (commit): Strip leading zeros from numeric revision
+       in addition to trailing dots.
+       (Reported by Peter Meszaros <address@hidden>.)
+
+2002-11-22  Larry Jones  <address@hidden>
+
+       * sanity.sh: Note that the tests run for a long time.
+
+       * checkout.c (safe_location): Use xstrdup, not strdup.
+       (Reported by Terrence Enger <address@hidden>.)
+
+2002-11-19  Larry Jones  <address@hidden>
+
+       * log.c (log_expand_revlist): Fix cross-branch correction code.
+
+       * sanity.sh: Set $LANG for systems that ignore $LC_ALL.
+       (rcs2-7): Change date offset from 100 months to 96 months to reduce
+       periodic problems with invalid dates.
+
+2002-11-12  Derek Price  <address@hidden>
+
+       * sanity.sh (rcslib-symlink): Use rm -f rather than a simple rm when
+       removing links because under some configurations of RH Linux 8.0 the
+       script pauses to ask for removal approval.
+
+2002-11-08  Derek Price  <address@hidden>
+
+       * sanity.sh (importc): Update the use of the touch command to be
+       compliant with POSIX 1003.1-2001, SUS2, and SUS3 now that GNU touch
+       supports this.  If this breaks any test platforms we should test
+       the behavior of touch like we do for other tools.
+
+2002-11-03  Derek Price  <address@hidden>
+
+       * sanity.sh (rcs2-7): Notate with a wild untested hypothesis.
+
+2002-11-03  Derek Price  <address@hidden>
+
+       * sanity.sh (rcs2-7): Notate with three more failure dates.
+
+2002-10-25  Derek Price  <address@hidden>
+
+       * root.c: Change some calls to SYSTEM_CLEANUP() and then exit() to
+       more appropriate calls to error_exit().
+       * server.c: Ditto.
+       * tag.c: Ditto.
+
+2002-10-24  Derek Price  <address@hidden>
+
+       * buffer.c (stdio_buffer_shutdown): Remove the getc() call used to
+       detect spurious output from clients since getc() would sometimes
+       block and hang indefinately if the client kept the conection open but
+       sent no data.  Bug reports state that this hapened frequently with
+       older clients connecting to 1.11.2 servers, especially when
+       compression is enabled.
+       (Original report from Mark D. Baushke <address@hidden>.
+        Original patch from Ralf S. Engelschall <address@hidden>
+        via Peter Wemm <address@hidden>.)
+
+2002-10-05  Larry Jones  <address@hidden>
+
+       * recurse.c (start_recursion, do_recursion): Allow write locking
+       in addition to read locking.  Change all callers.
+       * cvs.h: Change prototype to match, add lock types.
+       * tag.c (rtag_proc, rtag_fileproc, tag_fileproc): Have start_recursion
+       use write locks rather than calling lock_dir_for_write to avoid deadly
+       embrace.
+
+2002-10-04  Larry Jones  <address@hidden>
+
+       * client.c (get_responses_and_close, connect_to_pserver): Set
+       to_server and from_server to NULL after freeing.
+       * main.c (main): Clear server_active when finished.  Also neaten
+       up the SERVER_SUPPORT ifdef's.
+       * server.c (do_cvs_command): Set protocol_inbuf, stderrbuf, and
+       stdoutbuf to NULL after freeing.
+       (server_cleanup): Free buf_from_net and buf_to_set and set to NULL.
+       Also reset error_use_protocol.
+       (server): Don't SIG_register server_cleanup.  main_cleanup (which
+       is already registered) outputs a fatal error which causes it to
+       be called; registering it directly results in it being called twice.
+       (cvs_output): Don't try to use buf_to_net or protocol if they're NULL.
+
+2002-10-03  Larry Jones  <address@hidden>
+
+       * lock.c (readers_exist): Ignore our own read lock, if any, to
+       allow upgrading an existing read lock to a write lock.
+       * tag.c (rtag_proc, rtag_fileproc, tag_fileproc): Rather than
+       locking the entire tree, have start_recursion establish read
+       locks and then upgrade the read lock to a write lock (so only
+       one directory is locked at a time).
+
+2002-09-27  Larry Jones  <address@hidden>
+
+       * add.c (add): Send "--" before file names.
+       * admin.c (admin): Ditto.
+       * annotate.c (annotate): Ditto.
+       * commit.c (commit): Ditto.
+       * diff.c (diff): Ditto.
+       * edit.c (watch_onoff, editors): Ditto.
+       * log.c (cvslog): Ditto.
+       * remove.c (cvsremove): Ditto.
+       * status.c (cvsstatus): Ditto.
+       * tag.c (cvstag): Ditto.
+       * update.c (update): Ditto.
+       * watch.c (watch_addremove, watchers): Ditto.
+
+       * sanity.sh (client-9): Update to match.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * options.h: Remove prototype of STDC exit() function.  If this breaks
+       a build, this should be detected in configure.in somehow rather than
+       restoring the line to this file.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * options.h: Move definition of AUTH_CLIENT_SUPPORT into configure.in.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * options.h: Move definition of FORCE_USE_EDITOR into configure.in.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * options.h: Move definition of UMASK_DFLT into configure.in.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated using Automake 1.6.3.
+
+2002-09-24  Larry Jones  <address@hidden>
+
+       * filesubr.c, history.c, import.c, rcs.c, update.c: Use
+       HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV instead of
+       the obsolete HAVE_ST_BLKSIZE and HAVE_ST_RDEV.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * options.h: Move definition of TMPDIR_DFLT into configure.in.
+
+2002-09-24  Derek Price  <address@hidden>
+
+       * options.h: Move defininition of EDITOR_DFLT into configure.in.
+
+       * Makefile.in: Regenerated.
+
+2002-09-23  Jim Meyering  <address@hidden>
+
+       If `cvs -d REPO commit ...' was used to override CVS/Root,
+       then modified files in the directory from which cvs is invoked
+       would not be committed.
+       * client.c (arg_should_not_be_sent_to_server): The above would happen
+       because this function would throw out a file name when CVS/Root
+       did not match the current server.  Fix by allowing the command-line-
+       specified repository to take precedence over the value returned
+       by Name_Root.  Patch by Simon Walton <address@hidden>.
+       * sanity.sh (commit-d): New tests for the above.
+       Patch by Simon Walton <address@hidden>.
+
+2002-09-20  Derek Price  <address@hidden>
+
+       * options.h: Move definition of SERVER_FLOWCONTROL, SERVER_HI_WATER,
+       and SERVER_LO_WATER into configure.in.
+
+2002-09-20  Derek Price  <address@hidden>
+
+       * options.h: Move definition of PATCH_PROGRAM to configure.in.
+
+2002-09-18  Larry Jones  <address@hidden>
+
+       * client.c (call_in_directory): Don't create admin directory when
+       exporting into an existing directory.
+       (Reported by Jens Engel <address@hidden>.)
+       * sanity.sh (basic2): New tests for above.
+
+2002-09-16  Jim Meyering  <address@hidden>
+
+       * server.c (do_cvs_command): Move declarations of locals, timeout and
+       timeout_ptr, `up', out of enclosing `#ifdef SERVER_FLOWCONTROL' block.
+       Otherwise, this file would not compile with SERVER_FLOWCONTROL
+       turned off.  Patch by Ed Santiago <address@hidden>.
+
+2002-09-15  Larry Jones  <address@hidden>
+
+       * myndbm.c (mydbm_open): Open the file read/write rather than read-
+       only if that's what the user asked for to ensure that the later open
+       for write will succeed.
+       (Patch submitted by Josh Lehan <address@hidden>.)
+
+2002-08-28  Larry Jones  <address@hidden>
+
+       * logmsg.c (do_editor): Fix bug which prevented reusing log messages.
+       (Reported by Eric Siegerman <address@hidden>.)
+
+2002-08-16  Derek Price  <address@hidden>
+
+       * create_adm.c (Create_Admin): Assume RELATIVE_REPOS is set.
+       * server.c (outside_root): Add comment.
+       * options.h: Remove RELATIVE_REPOS & CVS_BADROOT.
+       * sanity.sh: Remove a lot of !RELATIVE_REPOS cruft from tests.
+
+2002-08-14  Derek Price  <address@hidden>
+
+       * server.c (server): Dispose of the correct pointer.  Tidy comment.
+
+2002-08-13  Derek Price  <address@hidden>
+
+       * client.c (get_cvs_port_number): Fix typo in comment.  Add comments.
+       * server.c (server): Fix a FIXME.  Remove an errant "const" directive.
+       Remove some redundant memory allocation and error handling code.
+
+2002-08-08  Derek Price  <address@hidden>
+
+       * import.c (import): Surrounded `server_active' with
+       #ifdef SERVER_SUPPORT/#endif.
+       * commit.c (commit_fileproc, commit_direntproc): Likewise.
+       (Patch from John Tytgat  <address@hidden>.)
+
+2002-07-31  Derek Price  <address@hidden>
+
+       * filesubr.c: Add a line so VIM can determine tab stops and shift 
widths.
+       * root.c: Ditto.
+       * (parse_cvsroot): Add comments and tidy slightly.
+
+2002-07-31  Derek Price  <address@hidden>
+
+       * sanity.sh: Add another date to the comment about rcs2-7 failing.
+
+2002-07-26  Jim Meyering  <address@hidden>
+
+       * commit.c (find_fileproc): When committing in client mode,
+       arrange to fail if a `cvs add'ed file no longer exists in the
+       working directory.
+       * sanity.sh (commit-add-missing): New test for above.
+
+2002-07-25  Larry Jones  <address@hidden>
+
+       * sanity.sh: Set $TMPDIR if it's not already set and use it rather
+       than /tmp for the expected server temp directory path.
+
+2002-07-09  Larry Jones  <address@hidden>
+
+       * vers_ts.c (time_stamp_server, time_stamp): Eliminate unneeded
+       struct_tm copying.
+
+       * lock.c (lock_wait, lock_obtained): Display time in UTC if possible
+       to reduce confusion in client/server mode.
+       (Original patch from Eduardo Perez Ureta <address@hidden>.)
+
+2002-06-26  Larry Jones  <address@hidden>
+
+       * tag.c (check_fileproc): When checking up-to-date, T_REMOVE_ENTRY
+       is also a valid status.
+       (Reported by David Everly <address@hidden>.)
+       * sanity.sh (tagc): New tests for above.
+
+2002-06-18  Larry Jones  <address@hidden>
+
+       * update.c (patch_file): Don't patch if diff bigger than file.
+       Don't bother adjusting the permission on the diff output if
+       we're not going to use it.
+
+
+2002-06-18  Derek Price  <address@hidden>
+
+       * server.c: Handle HPUX password expiration fields in the passwd
+       string in case we are set up on a server with NIS passwords served
+       from HPUX.
+       (Original patch from John Cavanaugh <address@hidden>.)
+
+2002-06-17  Larry Jones  <address@hidden>
+           and Jonathan Kamens  <address@hidden>
+
+       * commit.c (commit_fileproc, commit_direntproc): Don't try to call
+       an editor to get the log message if running as a server.  Instead,
+       just use an empty log message.
+       * import.c (import): Ditto.
+
+       * import.c (import): In client mode, always send a message to the
+       server, even if it's empty (this parallels a change made by Larry
+       Jones to commit.c on May 7).
+
+2002-05-31  Larry Jones  <address@hidden>
+
+       * rcs.c: Conditionally define MAP_FAILED for old systems that don't
+       have it in <mman.h>.
+       (Reported by jeremy brand <address@hidden>.)
+
+2002-05-24  Larry Jones  <address@hidden>
+
+       * rcscmds.c (diff_exec): Add a -- before the first file name just
+       in case it looks like an option.
+       (Reported by Zooko <address@hidden>.)
+
+       * rcscmds.c (diff_execv): Remove -- same as diff_exec.  Change
+       only caller.
+       * cvs.h: Ditto.
+
+2002-05-23  Larry Jones  <address@hidden>
+
+       * cvs.h (strcat_filename_onto_homedir): Make arguments const.
+       * filesubr.c (strcat_filename_onto_homedir): Make arguments const,
+       move more code here from callers, change all callers.
+
+2002-05-22  Derek Price  <address@hidden>
+
+       * cvs.h: Add prototype for this...
+       * filesubr.c (strcat_filename_onto_homedir): new function.
+       * login.c (): Use new function.
+
+       * cvsrc.c (read_cvsrc): Use new function due to problems on VMS.
+       * ignore.c (ign_setup): Ditto.
+       * wrapper.c (wrap_setup): Ditto.
+       (Original patch from Karsten Spang <address@hidden>.)
+
+2002-05-21  Larry Jones  <address@hidden>
+
+       * rcs.c (rcsbuf_getkey): Correct off-by-one error in ptr assertion
+       and add a similar assertion for ptrend.
+       (Reported by Rebecca Young <address@hidden>.)
+       (rcsbuf_fill): Remove redundant code.
+
+2002-05-20  Derek Price  <address@hidden>
+
+       * buffer.h: New prototype for...
+       * buffer.c (stdio_buffer_get_file): this new function to abstract
+       access to a buffer's file descriptor.
+       * client.c (auth_server): Use the new function.
+       (Original patch from Jonathan Kamens <address@hidden>.)
+
+2002-05-20  Derek Price  <address@hidden>
+
+       * main.c (main): Add 2002 to the copyright years output with the
+       version string.
+
+2002-05-15  Larry Jones  <address@hidden>
+
+       * log.c (log_parse_list): Fix off-by-one error which caused
+       incorrect handling of 'cvs log -wuser1,user2 foo.c' command.
+       (Patch from Alexey Mahotkin <address@hidden>,
+       reported by Alex Morozov <address@hidden>.)
+
+2002-05-09  Larry Jones  <address@hidden>
+
+       * login.c (password_entry_operation): Get cvsroot_canonical before
+       trying to read the user's password file so we have it even if the
+       file doesn't exist.
+       (Reported by Sarah Thompson <address@hidden>.)
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add options.h explicitly - since we
+       stopped generating it dynamically, Automake stopped noticing it and
+       including it in dists.  See TODO item #214 for notes.
+
+2002-05-08  Derek Price  <address@hidden>
+
+       * cvs.h: Use the HAVE_CONFIG_H define.
+
+2002-05-07  Larry Jones  <address@hidden>
+
+       * filesubr.c (isaccessible): Set errno before returning failure
+       in the SETXID_SUPPORT code.
+
+       * logmsg (do_verify): Avoid even more work if there's no verifymsg
+       script to run.
+
+       * logmsg: Use fputs/putc rather than fprintf where appropriate.
+       (do_verify): Run the verifymsg script even if there's no log
+       message.  (Reported by Andy Baker <address@hidden>.)
+       Don't reread the log message unless a verifymsg script was run.
+
+       * commit.c (commit): Always send -m to the server, even if there's
+       no message.
+
+       * create_adm.c (Create_Admin): Add dotemplate parameter to trace.
+       Remove unreachable code.
+
+2002-05-03  Larry Jones  <address@hidden>
+
+       * server.c (serve_watch_on, serve_watch_off, serve_watch_add,
+        serve_watch_remove): Just pass "watch" as the command name
+        to do_cvs_command to avoid unknown command errors.
+        (Reported by Gary Hennigan <address@hidden>.)
+
+       * rcs.c (RCS_checkin): Fix bad call to error () in buggy
+       PRESERVE_PERMISSIONS code.
+       (rcs_internal_unlockfile): Include current value of errno in error
+       message even though it may well be irrelevant (it's still better
+       than nothing).
+
+2002-05-02  Derek Price  <address@hidden>
+
+       * .cvsignore: Remove lines for files obsoleted by new autotools.
+
+2002-05-02  Derek Price  <address@hidden>
+
+       * stamp-h2.in: Remove this uneeded file.
+
+2002-05-01  Derek Price  <address@hidden>
+
+       * options.h.in: Move to...
+       * options.h: here.
+
+2002-04-30  Derek Price  <address@hidden>
+
+       * version.h.in: Remove this file.
+       * version.h: Ditto.
+
+       * Makefile.am: Remove references to version.h.
+       * cvs.h: Use <> rather than "" around the config.h #include.  I didn't
+       quite bother to understand why, but autoconf recommends it.
+       * cvsbug.in: Use PACKAGE_BUGREPORT defined by configure for the bug
+       report email address.
+       * version.c (version): Use PACKAGE_STRING defined in config.h instead
+       of the version_string that used to be defined in version.h.
+
+       * Makefile.in: Regenerated with automake 1.6.
+
+2002-04-28  Derek Price  <address@hidden>
+
+       * cvs.h: Use `"'s around includes when we mean a local file.
+
+2002-04-28  Derek Price  <address@hidden>
+
+       * cvs.h: #define new names for functions and variables when they
+       might conflict with system definitions (namely on Mac OS X 10.1 with
+       the most recent dev packages - This should be removable after the Mac
+       dev packages are fixed.).
+
+2002-04-26  Larry Jones  <address@hidden>
+
+       * logmsg.c (do_editor): Fix assertion when CLIENT_SUPPORT not defined.
+       (Reported by Matthias Andree <address@hidden>.)
+
+2002-04-19  Larry Jones  <address@hidden>
+
+       * log.c (log_expand_revlist): First cut at code to allow logging
+       between a revision and *any* ancestor, not just one explicitly on
+       the same branch (e.g., from 1.1 to 4.1.2.3.6.1).
+
+       * subr.c (gca): Simplify and optimize.
+
+2002-04-19  Jim Meyering  <address@hidden>
+       and Ed Santiago <address@hidden>
+
+       * classify.c (Classify_File): Fix it so that `cvs update -p -r...'
+       works, even under some slightly unusual (though perfectly legitimate)
+       circumstances.
+       * sanity.sh (update-p): New tests for this.
+
+2002-04-18  Derek Price  <address@hidden>
+
+       * sanity.sh: Move test for regex metacharacters in username until
+       after we're sure we found the version of expr that we're going to use.
+
+2002-04-18  Larry Jones  <address@hidden>
+
+       * admin.c (admin_fileproc): Allow admin to be used on RCS files with
+       no local version (e.g., removed files) like most other subcommands.
+
+       * wrapper.c (wrap_add): Update URL of -t/-f wrapper discussion.
+
+2002-04-18  Derek Price  <address@hidden>
+
+       * version.h: Regenerated for 1.11.2.1 version update.
+
+2002-04-17  Derek Price  <address@hidden>
+
+       * version.h: Regenerated for 1.11.2.
+
+2002-04-03  Derek Price  <address@hidden>
+
+       * stamp-h2.in: Regenerate with recent version of Autoconf.
+
+2002-04-03  Derek Price  <address@hidden>
+
+       * sanity.sh (TR): Send the stderr of one of the tool setup (tr) tests
+       to /dev/null to avoid spurious output on some operating systems
+       (notably Mac OS X).
+
+2002-03-22  Larry Jones  <address@hidden>
+
+       * sanity.sh (rcslib): Correct new tests to use ${testcvs} instead
+       of cvs.
+
+2002-03-21  Derek Price  <address@hidden>
+
+       * vers_ts.c (time_stamp): Return the timestamp for the newer of the
+       link and the link's source when the file is a link.
+       (Patch from RedHat cvs-1.11.1p1-7 SRPM.)
+
+       * sanity.sh (rcslib): Test for same.
+
+2002-03-17  Larry Jones  <address@hidden>
+
+       * log.c (cvslog, log_fileproc): Add -S option to suppress head or
+       file name if no revisions selected.
+       * sanity.sh (log): New tests for above.
+
+2002-03-13  Derek Price  <address@hidden>
+
+       * main.c (usg): Correct a spelling mistake in a comment.
+       (Thanks to Matt Kraai <address@hidden>.)
+
+2002-03-09  Larry Jones  <address@hidden>
+
+       * import.c (import): Change the suggested merge message to use
+       rev tags instead of the branch tag with a date.
+       * sanity.sh (import, importb): Change to match.
+
+       * remove.c (remove_fileproc): Disallow removing files with sticky
+       dates for the same reason we already disallow sticky numeric tags.
+       * sanity.sh (sticky): New test for above.
+
+2002-02-27  Larry Jones  <address@hidden>
+
+       * diff.c (diff_fileproc): Treat dead revisions as nonexistent.
+
+2002-02-26  Larry Jones  <address@hidden>
+
+       * diff.c (diff): Remove -V and --paginate options: they aren't valid.
+       (diff_usage): Document all the diff options.
+
+2002-02-13  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_gettag): Do not interpret an empty tag as HEAD (nothing
+       else does and I don't see any documentation that says it should).
+       (translate_symtag): Break out of loop at end of symbols to prevent
+       looping forever when tag is "".
+       (Reported by Alain ENOUT <address@hidden>
+       via Eric Gillespie <address@hidden>.)
+
+2002-02-11  Larry Jones  <address@hidden>
+
+       * server.c (server_cleanup): Set buf_to_net back to blocking mode
+       and flush it (in case there are any error messages pending) before
+       shutting down buf_from_net and again right before shutting it down.
+
+2002-02-08  Larry Jones  <address@hidden>
+
+       * main.c (lookup_command_attribute): Throw a fatal error if the
+       command is not found.
+       * server.c (server_tag): Use the correct command name.
+
+2002-01-30  Larry Jones  <address@hidden>
+
+       * error.h (error_exit): Remove unintended prototype.
+
+       * server.c (serve_root): Remove check for impossible condition.
+       (serve_init): Save and restore current_parsed_root.
+
+2002-01-29  Larry Jones  <address@hidden>
+
+       * error.h (error_exit): Declare __noreturn__ to avoid spurious
+       warnings.
+
+       * server.c (serve_root): If the specified root doesn't match the
+       pserver root, return before changing current_parsed_root to prevent
+       subsequent commands from accessing an unchecked root directory.
+       (server_init): Check specified root against the pserver root and
+       complain if they don't match.  Also, if there are pending errors,
+       print them and return before changing current_parsed_root to prevent
+       subsequent commands from accessing an unchecked root directory.
+       * sanity.sh (pserver): New tests for above.
+
+2002-01-10  Larry Jones  <address@hidden>
+
+       * log.c (log_version_requested): Change :: in revision spec to be
+       exclusive just on the low end (so -r tag1::tag2 gives revisions
+       after tag1 but up to and including tag2), which is much more useful
+       than the previous (exclusive at both ends) behavior.
+       (log_usage): Update to match.
+       * sanity.sh (log): Update to match.
+
+2002-01-02  Larry Jones  <address@hidden>
+
+       * server.c (LOG_DAEMON): Define if needed.
+       (Patch from John David Anglin <address@hidden>.)
+
+       * server.c (pserver_authenticate_connection): Add a specific error
+       message for EOF at protocol start and syslog if available.
+       * sanity.sh (pserver-bufinit): Update to match.
+
+2001-12-10  Larry Jones  <address@hidden>
+
+       * log.c (log_usage): Note that -r and -d take lists, not just a
+       single specification.
+       (log_expand_revlist): Don't dereference null pointers when one end
+       of a revision range is a non-existent tag.
+
+2001-12-03  Larry Jones  <address@hidden>
+
+       * annotate.c (annotate, annotate_fileproc): Don't annotate binary
+       files unless new -F option given.
+       * sanity.sh (basica, ann, ann-id, rcs, keywordlog, tagdate): Update
+       to match.
+
+2001-11-30  Larry Jones  <address@hidden>
+
+       * admin.c (admin): Allow unrestricted usage of -q in addition to -k.
+
+2001-10-25  Larry Jones  <address@hidden>
+
+       * log.c (log_expand_revlist): Make erroneous or inconsistent revision
+       specs select no revisions rather than all revisions.
+
+2001-10-23  Larry Jones  <address@hidden>
+
+       * import.c (add_rcs_file): Don't put an expand entry into the file
+       for the default expansion mode (kv).
+       * wrapper.c (wrap_send, wrap_unparse_rcs_options): Process entries
+       with default expansion mode since they may be needed to avoid matching
+       a more general entry later.
+       (wrap_add): Set rcsOption to NULL for default (kv).
+       (wrap_add_entry): Use structure assignment to copy entries rather
+       that copying members by hand.
+       * sanity.sh (binwrap3): Revise to test wrapper entries that don't
+       specify any non-default options but just prevent matching later,
+       more general entries.
+
+2001-10-02  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_fully_parse): Add revision number to more error messages.
+
+2001-09-27  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_fully_parse, RCS_getdeltatext): Add the missing revision
+       number to the "mismatch" error message.
+
+       * sanity.sh (multiroot2-9a): Update to match changes to lock.c.
+
+2001-09-26  Larry Jones  <address@hidden>
+
+       * lock.c (Lock_Cleanup, Reader_Lock, write_lock): Add trace messages.
+
+2001-09-24  Derek Price  <address@hidden>
+
+        * find_names.c (add_entries_proc): Leave closure specified as such in 
the
+       function definition for clarity.
+
+        * find_names.c (Find_Names): Use 'closure' feature of walklist()
+        to eliminate the static variable.
+       (add_entries_proc): Expect closure to be the file list.
+       (Patch from Alexey Mahotkin  <address@hidden>.)
+
+2001-09-19  Derek Price  <address@hidden>
+
+       * rcs.c (rcsbuf_valpolish_internal): Restore one of the
+       "if ( ... ) abort();" sequences since it seems to check the validity of
+       the RCS file rather than for a programming error.  Also added a FIXME
+       comment to the effect that we should explain the RCS file error to the
+       user as such if it is such.
+       (Thanks to Larry Jones  <address@hidden>.)
+
+2001-09-19  Derek Price  <address@hidden>
+
+       * rcs.c (rcsbuf_getkey, rcsbuf_valpolish_internal): Replace some code
+       of the form "if ( ... ) abort();" with equivalent calls to assert().
+
+2001-09-17  Derek Price  <address@hidden>
+
+       * myndbm.c (mydbm_load_file): Fix buffer overflow error and make error
+       messages more informative.
+       * sanity.sh (modules6): New test.
+       (Original report from Taska <address@hidden> and others.)
+
+2001-09-14  Derek Price  <address@hidden>
+
+       * logmsg.c (do_verify): Dispose memory when finished with it.
+
+2001-09-07  Larry Jones  <address@hidden>
+
+       * mkmodules.c (notify_contents): In the example, move the %s to
+       the end since many, if not most, versions of mail insist on
+       options coming before addresses.
+
+2001-09-06  Derek Price  <address@hidden>
+
+       * login.c (login): Deal with NULL return value from getpass.
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with automake 1.5.
+       * stamp-h2.in: Ditto.
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * main.c (main): Fix empty CVSROOT message to specify `valid' instead
+       of `legal'.
+
+2001-09-04  Derek Price  <address@hidden>
+
+       * server.c (pserver_authenticate_connection): Back out changes from the
+       30th and...
+       * getline.c (getstr): init the buffer instead.
+
+2001-08-31  Derek Price  <address@hidden>
+
+       * Makefile.in: Backed out accidental commit from yesterday.
+
+2001-08-30  Derek Price  <address@hidden>
+
+       * server.c (pserver_authenticate_connection): Don't print from the
+       NULL pointer in the error message string in the case where the client
+       didn't send any data.
+       * sanity.sh (pserver): Test for this case.
+       (Report from Mark Welch <address@hidden>).
+
+2001-08-24  Derek Price  <address@hidden>
+
+       * logmsg.c (do_editor): Add comment and assertion.
+       * import.c (import): Don't call do_editor with a repository argument
+       in client mode.
+       (Report and original patch from darkness <address@hidden>.)
+
+2001-08-24  Larry Jones  <address@hidden>
+
+       * log.c (log_expand_revlist): Arrange for nil revision specs to
+       select nothing instead of everything.
+       * sanity.sh (log): New tests for above.
+
+2001-08-24  Derek Price  <address@hidden>
+
+       * parseinfo.c (Parse_Info): Change the function name in the trace
+       and add the client/server string.
+
+2001-08-24  Derek Price  <address@hidden>
+
+       * Implement RereadLogAfterVerify CVSROOT/config option to control
+       FreeBSD read-write of log messages in the verification script.
+       * logmsg.c: RereadLogAfterVerify defaults to LOGMSG_REREAD_NEVER
+       to preserve the status quo.
+       * parseinfo.c (parse_config): Add parsing for RereadLogAfterVerify
+       option. Possible values are: no | never | yes | always | stat
+       * cvs.h: Add extern for RereadLogAfterVerify and new value macros
+       LOGMSG_REREAD_NEVER, LOGMSG_REREAD_ALWAYS, LOGMSG_REREAD_STAT for
+       its values.
+       (Patch from Mark D. Baushke  <address@hidden>.)
+
+       * Apply changes from FreeBSD cvs sources to implement a read-write
+       user-defined verification script.
+       * logmsg.c (do_verify): Update do_verify to expect a pointer
+       to the saved message. The log file passed to the verifymsg_script
+       should be re-read after the user-defined verification script has
+       been run. The user-defined verification script is allowed to
+       modify the message.  This allows the script to add extra
+       information to the log message or to remove template lines that
+       are not needed.
+       * cvs.h: Update prototype for do_verify prototype to expect a
+       pointer to the saved_message.
+       * commit.c (commit, commit_fileproc, commit_direntproc): Update
+       calls to do_verify as the saved_message arg is now read-write.
+       * import.c (import):  Update calls to do_verify as the
+       saved_message arg is now read-write.
+       * sanity.sh (info-v4-[12]): Rename the old info-v4 test to info-v5
+       and add a new info-v4 test case have the verification script
+       modify the log message to test the above changes.
+       (Patch from Mark D. Baushke  <address@hidden>.)
+
+       * logmsg.c: Change RereadLogAfterVerify default to always.
+       (do_verify): Reformat and make minor fixes to Mark's patch.
+       * mkmodules.c (config_constants): Add comment about
+       RereadLogAfterVerify.
+       * sanity.sh (info-rereadlog): Rename the tests from Mark's patch and
+       reformat them a bit.
+
+2001-08-23  Derek Price  <address@hidden>
+
+       * sanity.sh (info): Demonstrate that the verifymsg scripts can
+       sometimes, but not always, retreive information on which directory is
+       being committed to.
+
+2001-08-22  Derek Price  <address@hidden>
+
+       * logmsg.c: Back out the last change - the repository which is passed
+       in is actually the directory and changes with each call to do_verify.
+       If a verifymsg script is using `pwd`, this could change the operation.
+       * cvs.h: Ditto.
+       * commit.c: Ditto.
+       * import.c: Ditto.
+
+2001-08-22  Derek Price  <address@hidden>
+
+       * logmsg.c (do_editor): Return reused_message.
+       (do_verify): Don't verify the same log message more than once.
+       * cvs.h: Update prototypes for do_verify and do_editor.
+       * commit.c (commit_fileproc, commit_direntproc): Use the new 
functionality.
+       * import.c (import): Ditto.
+
+2001-08-22  Derek Price  <address@hidden>
+
+       * logmsg.c (do_verify): Remove an unecessary "else" clause following an
+       exit and unindent the former contents.
+
+2001-08-22  Derek Price  <address@hidden>
+
+       * commit.c (commit): Don't call do_verify in client mode since we know
+       do_verify will just return anyhow.
+
+2001-08-20  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add version.c and version.h.
+       (BUILT_SOURCES): Add version.h.
+       (Maintainer Targets): Remove version.h.
+       * version.c: Remove @VERSION@ dependant bits.
+       * version.c.in: Removed.
+       * version.h.in: New file.
+       (Original patch from Alexey Mahotkin <address@hidden>.)
+
+       * Makefile.am: Various modifications to make Automake, make dist, and
+       windows targets work like they are supposed to.
+       * version.h: New (generated) file.
+
+       * Makefile.in: Regenerated.
+
+2001-08-09  Derek Price  <address@hidden>
+
+       * client.c (socket_buffer_shutdown): Use recv instead of read and
+       return 0 on success.
+       (Patch from "Manfred Klug" <address@hidden>.)
+
+2001-08-09  Derek Price  <address@hidden>
+
+       * buffer.c (stdio_buffer_shutdown): Assume the buffer is not a socket
+       when NO_SOCKET_TO_FD is defined.
+       * client.c (make_bufs_from_fds): Add is_sock argument and remove fstat
+       call and reference to S_ISSOCK since these functions aren't available
+       under Windows.
+       (connect_to_forked_server, connect_to_pserver, start_tcp_server,
+       start_server, start_rsh_server): Use new argument.
+       (Patch from "Manfred Klug" <address@hidden>.)
+
+       * buffer.c (stdio_buffer_shutdown): Various reformattings, fix bug
+       where rsh pipes weren't being closed.
+
+2001-08-09  Derek Price  <address@hidden>
+
+       * sanity.sh (rmadd, rm-update-message, join-two-branch,
+       ignore-on-branch): Change a few references to `cvs' to `$PROG'.
+
+2001-08-07  Derek Price  <address@hidden>
+
+       * build_src.com: Add annotate.c/annotate.obj,verify, correct zlib name.
+       * patch.c: VMS time_t appears to be unsigned.   Add a cast when testing
+       for (time_t)-1.
+       * subr.c: #else,#endif for no symlinks should be moved.
+       (Patch from Mike Marciniszyn <address@hidden>.)
+
+2001-08-06  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+
+2001-08-01  Derek Price  <address@hidden>
+
+       * diff.c (diff): Send long option for side-by-side diffs to the server
+       rather than '-y', for backwards compatibility with old servers.
+       (Original patch from Peter Mathiasson <address@hidden>.)
+
+2001-07-19  Larry Jones  <address@hidden>
+
+       * mkmodules.c (cvswrappers_contents): Remove -t/-f since they're
+       disabled in wrapper.c.
+
+       * checkout.c (checkout): Don't complain about checking out into the
+       repository when piping output.
+       (Reported by der Mouse <address@hidden>.)
+       * sanity.sh (checkout_repository): New tests for above.
+
+2001-07-10  Larry Jones  <address@hidden>
+
+       * sanity.sh (importc-7): Now works correctly in local mode.
+
+       * commit.c (commit_dirleaveproc): We're still in the directory when
+       this is called, so the first argument to Name_Repository needs to
+       be NULL, not dir.
+       * sanity.sh (rmadd): New tests for above.
+
+       * commit.c (commit): Reword error messages for committing as root.
+
+2001-07-08  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_checkout): Correct scanf format to allow for trailing
+       NUL terminator.
+       * update.c (special_file_mismatch): Ditto.
+       (Reported by Pekka Savola <address@hidden>.)
+
+2001-07-05  Larry Jones  <address@hidden>
+
+       * client.c, root.c: Fix -Wall warnings.
+
+       * buffer.c: #include socket header to declare shutdown().
+
+       * rcs.c (rcsbuf_open): Use getpagesize() instead of sysconf() for
+       portability.
+       (RCS_copydeltas, rcsbuf_fill): Fix -Wall warnings.
+
+2001-07-04  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new Automake release candidate 1.4h.
+
+2001-07-03  Derek Price  <address@hidden>
+
+       * rcs.c (rcsbuf_open): Reduce memory consumption still further by not
+       mmapping the entire file when pos is specified.
+       (rcsbuf_cache_open): Add FIXME comment wrt read-only mmaps and rcsbuf
+       caching.
+
+2001-07-03  Derek Price  <address@hidden>
+
+       * rcs.c (rcsbuf_open): Use mmap when possible to reduce memory
+       consumption, especially with large (e.g. binary) files.
+       (rcsbuf_close): Call munmap.
+       (rcsbuf_getkey): Remove the buffer fill code when using mmap.
+       (rcsbuf_getrevnum): Ditto.
+       (rcsbuf_fill): Remove this function when using mmap.
+       (rcsbuf_cache_open): Mostly don't use this function with mmap.
+       (RCS_copydeltas): Don't depend on the file pointer with mmap.
+
+       * stamp-h2.in: Regenerated.
+
+2001-07-03  Derek Price  <address@hidden>
+
+       * update.c: Indent compiler directives.
+
+2001-07-02  Larry Jones  <address@hidden>
+
+       * import.c (update_rcs_file): Use -kb instead of -ko when comparing
+       binary files.
+       (Reported by Gyula Faller <address@hidden>.)
+
+2001-06-28  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout): Explicitly initialize all the static options
+       so that multiple calls work right.  Also fix potential memory leaks.
+       (Reported by Dr. Dieter Maurer <address@hidden>.)
+
+2001-06-28  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated with new version of Automake.
+
+2001-06-28  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout): Set history_name for export as well as
+       checkout.
+       (checkout_proc): Use it.
+
+       * checkout.c (safe_location): Add missing argument in error message.
+
+2001-06-26  Larry Jones  <address@hidden>
+
+       * recurse.c (start_recursion): Use strip_trailing_slashes instead
+       of doing it by hand.
+
+       * server.c (pserver_authenticate_connection): Don't clear out
+       descrambled_password until *after* it's (potentially) logged.
+       (Reported by Eric Hanchrow <address@hidden>.)
+
+2001-06-25  Larry Jones  <address@hidden>
+
+       * recurse.c (start_recursion): Deal with at least some of the cases
+       where trailing slashes cause confusion.
+       (Reported by Malcolm Fernandes <address@hidden>.)
+       * sanity.sh (basica, basicb): Tweak existing tests to check this.
+
+2001-06-22  Larry Jones  <address@hidden>
+
+       * sanity.sh (modules5): New tests with -d on command line.
+
+2001-06-21  Larry Jones  <address@hidden>
+
+       * modules.c (do_module): Use run_module_prog and server_active to
+       determine when to call server_prog instead of using server_expanding
+       so that we get the right paths in the replies as long as we take
+       mwhere into account in addition to where.
+       (Reported by Pascal Bourguignon <address@hidden>.)
+       * server.c (server_prog): Use protocol pipe instead of buf_to_net.
+       * sanity.sh (modules5): Remove FIXCVS comment and update to match.
+       * server.c, server.h: Remove server_expanding since now unused.
+
+2001-06-21  Larry Jones  <address@hidden>
+        for Stephen Rasku  <address@hidden>
+
+       * admin.c: Corrected spelling mistakes in help.
+
+2001-06-20  Derek Price  <address@hidden>
+
+       * client.c (socket_buffer_shutdown): Fix untested typos.
+       (Reported by "Jerzy Kaczorowski" <address@hidden>.)
+
+       * buffer.c (stdio_buffer_shutdown): Put the call to SHUTDOWN_SERVER in
+       the correct place.
+
+2001-06-20  Derek Price  <address@hidden>
+
+       * logmsg.c (do_editor): Abort in the case that the file has only
+       comment lines.
+       (Original patch from Mark Valentine <address@hidden>.)
+
+       * logmsg.c (do_editor): Fix rare memory leak.
+       * sanity.sh (editor): Add tests for aborted log messages.
+
+2001-06-20  Larry Jones  <address@hidden>
+
+       * server.c (switch_to_user): Only set $CVS_USER if
+       AUTH_SERVER_SUPPORT is defined.
+       (Reported by Nalin Dahyabhai <address@hidden>.)
+
+2001-06-13  Derek Price  <address@hidden>
+
+        * client.c: Fix incorrect fixed-size buffer usage in
+        connect_to_gserver().
+       (Minor changes to a patch from Alexey Mahotkin  <address@hidden>.)
+
+2001-06-11  Derek Price  <address@hidden>
+
+       * main.c (main): Always print $CVSROOT when parse_cvsroot fails.
+       * root.c (parse_cvsroot): Tidy error messages and provide more
+       consistent behavior.
+       * sanity.sh (crerepos): Adapt to new error messages.
+       (Suggested by  Alexey Mahotkin <address@hidden>.)
+
+2001-06-08  Derek Price  <address@hidden>
+
+       * sanity.sh (tagf-28): Use $CVSROOT_DIRNAME.
+
+2001-06-07  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_unlock): Reverse kj's change of 1999-10-18: a bare -u
+       should never break locks, you have to specify a specific revision
+       to do that.  Also add an informative message for a bare -u when
+       the user doesn't hold any locks.
+       * commit.c (unlockrcs): Make RCS_unlock quiet, like RCS_lock.
+       * sanity.sh (rmadd-24): Update to match.
+
+       * sanity.sh (crerepos-6a): Set CVS_RSH for ${testcvs}, not for
+       dotest_fail.  Allow for "broken pipe" rather than "end of file".
+
+2001-06-07  Derek Price  <address@hidden>
+
+       * sanity.sh (tagf): Use $CVSROOT_DIRNAME rather than
+       /tmp/cvs-sanity/cvsroot.
+
+2001-06-06  Derek Price  <address@hidden>
+
+       (Reformatting, bug fixes, tests, and comments to a
+       patch from Stephen Cameron <address@hidden>.)
+
+       * tag.c: (rtag_fileproc, rtag_delete, tag_fileproc)
+         Changed behavior of "cvs tag -F", "cvs tag -d", "cvs rtag -F"
+         and "cvs rtag -d" so that they will not disturb existing
+         branch tags unless a new "-B" option is given.
+       * sanity.sh (tagf-16 - tagf-33): Added tests for new -B option
+         to "cvs tag" and "cvs rtag"
+
+2001-06-06  Derek Price  <address@hidden>
+
+       * sanity.sh (crerepos-6a): Set CVS_RSH=false and only for the actual
+       test call at Larry's suggestion.  Also, test the error message since
+       it's fixed now.
+
+2001-06-05  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_unlock): Note when breaking someone else's lock.
+       (Reported by MURVAI-BUZOGANY Laszlo
+       <address@hidden>.)
+       * sanity.sh (reserved-14): Update to match.
+
+2001-06-05  Derek Price  <address@hidden>
+
+       * sanity.sh (crerepos-6a): Set CVS_RSH=/bin/false...  this is a local
+       mode only test anyhow.
+       (Thanks to Larry Jones and Morgan Burke <address@hidden>.)
+
+2001-05-31  Derek Price  <address@hidden>
+
+       * sanity.sh (rcs2-7): Add today to the list of failure dates for rcs2-7
+       in the hopes that the data will eventually prove useful to someone
+       motivated enough to fix the problem.
+
+2001-05-30  Derek Price  <address@hidden>
+
+       * stamp-h2.in: Regenerated.
+
+2001-05-30  Derek Price  <address@hidden>
+
+       * *: Various bug fixes and comments for the following
+       patch from Donald Sharp <address@hidden>:
+
+       * checkout.c (safe_location): cvs co -d <directory> still had
+       failure modes from the way the -d option works.
+       * sanity.sh: Misc error message resynching.
+
+2001-05-29  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Add root.h.
+
+       * Makefile.in: Regenerated.
+       * stamp-h2.in: Regenerated.
+
+2001-05-29  Derek Price  <address@hidden>
+
+       * checkout.c (safe_location): Correct formatting.
+
+2001-05-29  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): Fix a comment.
+
+2001-05-26  Larry Jones  <address@hidden>
+
+       * checkout.c (safe_location): Use old-style definition to keep
+       non-ANSI compilers happy.
+
+       * sanity.sh (check_respository): Use ${CVSROOT_DIRNAME} instead
+       of /tmp/cvs-sanity/cvsroot.
+
+2001-05-25  Larry Jones  <address@hidden>
+
+       * sanity.sh (modules5): Add sleep to script to help avoid out of
+       order messages.
+
+       * filesubr.c (mkdir_if_needed): Return 1 if the directory exists
+       reguardless of what errno is set to.
+       (Reported by "Robinson, Greg" <address@hidden>.)
+
+2001-05-25  Derek Price  <address@hidden>
+       for Donald Sharp  <address@hidden>
+
+       * checkout.c:  Modified safe_location() to refuse checkout if
+       the -d option to co specifies inside of the repository.
+       * import.c:  New parameter to safe_location needed to be added.
+       * cvs.h:  New parameter to safe_location needed to be added.
+       * sanity.sh:  Test case to test for failure mode.
+
+2001-05-23  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout_proc): Don't build top_level_admin directory
+       when exporting.
+       (Reported by Tony Byrne <address@hidden>.)
+
+2001-05-21  Derek Price  <address@hidden>
+
+       * client.c: Fix a mispelling in a comment.
+       (Patch from Alexey Mahotkin <address@hidden>).
+
+2001-05-05  Larry Jones  <address@hidden>
+
+       * login.c (password_entry_operation): Only warn if unable to open
+       .cvspass for reading: may be initial login and it doesn't exist yet.
+
+2001-05-15  Derek Price  <address@hidden>
+
+       * client.c (start_tcp_server): Use the struct sockaddr_in declared in
+       the function.
+       (Reported by Emil Isberg <address@hidden>.)
+
+2001-05-05  Larry Jones  <address@hidden>
+
+       * annotate.c (annotate): Pass local to do_module and rannotate_proc
+       so that -l actually works.
+       * log.c (cvslog): Ditto.
+       * patch.c (patch): Ditto; make local local instead of global.
+       (patch_proc): Use local_specified parameter instead of global.
+       * tag.c (cvstag, rtag_proc): Ditto.
+
+2001-05-05  Larry Jones  <address@hidden>
+
+       * client.h: Declare "struct buffer" outside prototype for __STDC__
+       compilers.
+
+2001-05-04  Derek Price  <address@hidden>
+
+       * client.c:  General refactoring.  Removed several global variables in
+       favor of passing locals and/or dynamic evaluation.
+       (recv_line): Removed this function.
+       (make_bufs_from_fds): New function with factored code.
+       (connect_to_forked_server): New prototype.  Use new functions.
+       (connect_to_pserver): New prototype.  Use new functions.
+       (connect_to_gserver): New prototype.  Use new API.
+       (auth_server): Factored this portion of the pserver code so it can be
+       shared.  Rewrote to use buffers rather than depending on a socket.
+       (start_rsh_server): New prototype.  Use new API.
+       (start_tcp_server): New prototype.  Use new API.
+       (start_server): Factor some code.  Use new API.
+       * client.h: New prototypes.
+       * cvs.h: Gratuitous reformatting.  Use new root.h.
+       * login.c (login): Use new connect_to_pserver API.
+       * root.h: New file.  Contains some code that used to be in cvs.h.
+
+2001-05-04  Derek Price  <address@hidden>
+
+       * client.c: Gratuitous reformatting.
+       * client.h: Ditto.
+
+2001-05-04  Derek Price  <address@hidden>
+
+       * zlib.c (compress_buffer_shutdown_input): Use new buffer shutdown
+       prototype.
+       (compress_buffer_shutdown_output): Ditto.
+       (Thanks to Pavel Roskin <address@hidden>.)
+
+2001-05-03  Derek Price  <address@hidden>
+
+       * buffer.c (struct stdio_buffer_closure): New structure to hold a
+       FILE * and the child's PID when necessary.
+       (stdio_buffer_initialize): Change proto to accept PID.  Set up new
+       closure.  Pass new stdio_buffer_shutdown to buf_initialize.
+       (stdio_buffer_input): Use new closure.
+       (stdio_buffer_output): Ditto.
+       (stdio_buffer_flush): Ditto.
+       (stdio_buffer_shutdown): New function.  Teach buffer to close itself.
+       (packetizing_buffer_shutdown): Use new buffer shutdown proto.
+       * buffer.h (struct buffer): New buffer shutdown proto.
+       (stdio_buffer_initialize): New proto.
+       * client.c (log_buffer_shutdown): Use new proto.
+       (socket_buffer_initialize): Pass shutdown func.
+       (socket_buffer_shutdown): New function.
+       * server.c (get_responses_and_close): Remove most of the guts.  Rely
+       on the buffer shutdown function from now on.
+       (start_rsh_server): Return child PID.
+
+2001-05-03  Larry Jones  <address@hidden>
+
+       * history.c (history_write): Handle the case where the user's home
+       directory doesn't exist gracefully instead of erroring out.
+       (Reported by David Hoover <address@hidden>.)
+
+2001-05-03  Derek Price  <address@hidden>
+
+       * cvs.h: s/allocate_and_strcat/xrealloc_and_strcat/ since that is what
+       I wrote in the ChangeLog, oh, so long ago.
+       * diff.c (diff): Ditto.
+       * subr.c (allocate_and_strcat, xrealloc_and_strcat): Ditto.
+
+2001-05-02  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_getdate): Handle the (unusual!) case where we
+       can't find any revisions at all.
+       (Reported by Ryan Grow <address@hidden>.)
+
+2001-04-30  Larry Jones  <address@hidden>
+
+       * sanity.sh (multiroot2-9a): Rename (from multiroot2-9) to avoid
+       duplicate names; fix to work without SERVER_SUPPORT defined.
+       (Reported by Pavel Roskin <address@hidden>.)
+
+2001-04-29  Derek Price  <address@hidden>
+
+       * Makefile.am (check-local): Make dependent on localcheck and
+       remotecheck and move old check target...
+       (localcheck): here.
+
+       * Makefile.in: Regenerated.
+
+2001-04-27  Larry Jones  <address@hidden>
+
+       * sanity.sh (pserver): Add tests for readers and writers.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * sanity.sh (version-2r): Update to handle patch releases in version
+       numbers.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * version.c: Regenerated.
+
+2001-04-27  Derek Price  <address@hidden>
+
+       * version.c: Regenerated.
+
+2001-04-27  Larry Jones  <address@hidden>
+
+       * main.c (lookup_command_attribute): Lookup specified command, not
+       whatever's in the global command_name.
+
+2001-04-25  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+       * version.c: Regenerated.
+
+2001-04-22  Larry Jones  <address@hidden>
+
+       * tag.c (tag_check_valid): Make an unwritable val-tags file a
+       warning instead of a fatal error.
+
+2001-04-20  Larry Jones  <address@hidden>
+
+       * annotate.c (annotate_usage): -r and -D are not mutually exclusive.
+       * main.c (cmd_usage): Add missing version subcommand.
+       * update.c (update_usage): Add missing -C option.
+
+       * sanity.sh (death2): New tests for previous change.
+
+       * classify.c (Classify_File): Treat a dead revision like the RCS
+       file doesn't exist.
+       * sanity.sh: Update to match.
+
+2001-04-16  Larry Jones  <address@hidden>
+
+       * checkout.c, update.c: Fix usage messages: -r and -D are not
+       mutually exclusive.
+       (Suggested by David L. Martin <address@hidden>.)
+
+       * logmsg.c (do_editor): Don't add a blank line to the message.
+       * sanity.sh (editor-log-file*): Update to match.
+
+       * checkout.c, update.c: Note in usage message that -k is sticky.
+
+       * server.c: (server_cleanup, wait_sig): Remove ancient SunOS kludge.
+       (Suggested by Rob Saccoccio <address@hidden>.)
+
+2001-04-04  Larry Jones  <address@hidden>
+
+       * sanity.sh (dotest, dotest_lit, dotest_fail, dotest_status,
+       dotest_sort): Don't count on $? being set in then or else clauses.
+
+       * ignore.c (ignore_files): Collect unignored files into a list and
+       sort it before calling PROC to avoid order dependencies.  Rewrite
+       the while loop to allow normal continues instead of goto.
+
+2001-04-04  Derek Price  <address@hidden>
+
+       * sanity.sh (ignore-on-branch-3): Fix in the remote case.
+
+2001-04-03  Larry Jones  <address@hidden>
+
+       * update.c (update_fileproc): Remove unused variable (resurrecting).
+
+2001-04-03  Derek Price  <address@hidden>
+           Larry Jones  <address@hidden>
+           reported by Jakob Bøhm  <address@hidden>
+
+       * update.c (update_fileproc): Don't store a file with T_UNKNOWN status
+       in ignlist if present in the sandbox.
+       * sanity.sh (ignore-on-branch): New test.
+       (ignore): Tidy this test.
+
+2001-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Make sure the test for `id' fails when a nonstandard `id'
+       is used and the user is root.  Fix some quoting in error messages.
+       (fork): Take `cvs' out of the PATH.
+       (TODO): Add note about the test suite not working with user names over
+       eight characters in length.
+
+2001-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh (fork): New test for CVS_SERVER default.
+       (TODO): Note about eventually removing most of the references to
+       CVS_SERVER.
+
+2001-04-02  Larry Jones  <address@hidden>
+
+       * client.c (connect_to_forked_server): Use program_path as the default
+       server instead of "cvs".
+
+2001-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Use less obfuscated English in my comment about sanity
+       checking sanity.sh.
+
+2001-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh (rm-update-message): Create a test directory again but
+       change back to the correct directory upon completion this time.
+
+2001-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Change last two '[.*]'s to 'test's for
+       consistency and remove...
+       (TODO): the note from the TODO list.
+
+2001-04-02  Derek Price  <address@hidden>
+
+       * sanity.sh: Add test for PWD before successful exit.
+
+2001-03-30  Larry Jones  <address@hidden>
+
+       * sanity.sh (rm-update-message): Remove duplicate code.
+
+2001-03-30  Derek Price  <address@hidden>
+
+       * sanity.sh (rm-update-message): New test for local/client-server
+       warning message discrepency.
+
+2001-03-30  Larry Jones  <address@hidden>
+
+       * annotate.c: Move annotate() here from rcs.c, support rannotate.
+       * Makefile.am, Makefile.in: Add annotate.c.
+       * main.c (cmds[], cmd_usage[]): Add rannotate.
+       * rcs.c: Move declarations of rcs_delta_op and RCS_deltas to...
+       * rcs.h:    ... here.
+       * server.c (serve_rannotate): New.
+       (requests[]): Add rannotate.
+       * sanity.sh (ann): New tests for rannotate.
+
+       * log.c (rlog_proc): Remove dead code.
+
+2001-03-30  Derek Price  <address@hidden>
+
+       * sanity.sh (join-readonly-conflict): Run more of this through dotest.
+
+2001-03-30  Larry Jones  <address@hidden>
+
+       * log.c (log_fileproc): Don't output working file for rlog.
+       * sanity.sh (log): New tests for rlog.
+
+       * cvs.h (mtype): Add MISC type.
+       * log.c (cvslog): Support rlog as well as log.
+       (rlog_proc): New.
+       * main.c (cmds[], cmd_usage[]): Add rlog.
+       (main): Remove old rlog warning message.
+       * server.c (serve_rlog): New.
+       (requests[]): Add rlog.
+
+2001-03-29  Derek Price  <address@hidden>
+
+       * sanity.sh: cd to $TESTDIR once after it is normalized.  Make TODO
+       on history and symlinks more specific.  Tested properly this time.
+
+2001-03-29  Larry Jones  <address@hidden>
+
+       * main.c (cmds[], lookup_command_attribute, main): Include the
+       command attributes in the global command table instead of inferring
+       them from the command names.  Change the sense of the
+       CVS_CMD_IGNORE_ADMROOT attribute to match its name.
+
+2001-03-29  Derek Price  <address@hidden>
+
+       * sanity.sh (*, basic2-64): Remove references to TMPPWD.  Fix FIXME
+       at end of script now that $TESTDIR can't be relative.
+
+2001-03-29  Derek Price  <address@hidden>
+
+       * sanity.sh: Normalize TESTDIR even when the user set it.
+
+2001-03-29  Larry Jones  <address@hidden>
+
+       * client.c (connect_to_pserver, start_tcp_server): Add IP address
+       to connect failed message.
+       (connect_to_forked_server, connect_to_pserver, start_tcp_server): Add
+       trace messages ala start_rsh_server.
+       (start_rsh_server): Include entire command in trace message for
+       START_RSH_WITH_POPEN_RW like ! START_RSH_WITH_POPEN_RW does.
+
+2001-03-29  Derek Price  <address@hidden>
+
+       * sanity.sh: Global search & replace ${TESTDIR}/cvsroot with
+       ${CVSROOT_DIRNAME} for consistency.
+
+2001-03-29  Derek Price  <address@hidden>
+
+       * sanity.sh (conflicts-12[68].5): Remove sanity hack which has allowed
+       for a CVS bug since May 96/97.  Not sure when the bug went bye-bye, but
+       the tests broke when $TESTDIR != $TMPPWD.
+
+2001-03-26  Larry Jones  <address@hidden>
+
+       * classify.c (Classify_File): Don't report a conflict for a removed
+       file when piping.  Also simplify the code structure.
+       (Reported by Milos Kleint <address@hidden>.)
+       * sanity.sh (rmadd2-14[abc]): New tests for above.
+
+2001-03-24  Noel Cragg  <address@hidden>
+
+       * diff.c: mods to allow `-T' and `-y' options to be passed through
+       to the diff library.  This wasn't allowed earlier because of a
+       similarly named options that got passed through to the old rcs
+       programs.  We've long since stopped sending `-T' to any rcs
+       utility and have never used `-y'.  Any users of moldly CVS
+       versions which used to support `-T' have (hopefully) upgraded to
+       one where that option isn't supported.  It seems reasonable to
+       enable them again and pass them through.  (sanity.sh still works
+       anyways...)
+       (longopts): add short option equivalents for --initial-tab and
+       --side-by-side.
+       (diff): add new short options to getopt string and switch
+       statement.
+
+2001-03-22  Larry Jones  <address@hidden>
+
+       * sanity.sh: Add check for ${DOTSTAR} with large matches.
+
+2001-03-23  Derek Price  <address@hidden>
+
+       * sanity.sh: Do the same as below for $keep.
+
+2001-03-23  Derek Price  <address@hidden>
+
+       * sanity.sh: Replace 'remote=(yes|no)' with 'remote=(:|false)' since
+       often 'false' and more often ':' are shell builtins.  This makes the
+       succinct, 'if $remote; then' faster than 'if test $remote = yes; then'.
+       Alter tests in the rest of the script to match the new usage.  Added
+       a suffix of 'r' to remote test names when it was appropriate and I
+       remembered.  Some reformatting.
+
+2001-03-22  Larry Jones  <address@hidden>
+
+       * sanity.sh (diffmerge1_yours, diffmerge1_mine): Check for exact
+       output instead of using wildcards to avoid buffer overflows in some
+       versions of expr.
+
+2001-03-21  Derek Price  <address@hidden>
+
+       * sanity.sh: cd to '/tmp' again rather than $HOME since HOME was set to
+       a value inside ${TESTDIR} by the script.
+
+2001-03-20  Derek Price  <address@hidden>
+
+       * sanity.sh (diffmerge1): Minor formatting and syntax changes.
+
+           for Jacob Burckhardt  <address@hidden>
+
+       * sanity.sh (diffmerge1): More merging behavior tests.  Specifically,
+       test some cases which broke before in Karl Tomlinson's diff fix was
+       checked in today.
+
+2001-03-20  Derek Price  <address@hidden>
+
+       * sanity.sh: Don't use unescaped parens in sh outside of quotes.
+
+2001-03-20  Derek Price  <address@hidden>
+
+       * sanity.sh: Don't remove ${TESTDIR} when -k (keep) set.
+
+2001-03-20  Derek Price  <address@hidden>
+
+       * sanity.sh: Change usage to match the new getopts format and comment.
+
+2001-03-16  Derek Price  <address@hidden>
+
+       * sanity.sh (modules2-nestedrename): New test.  Verifies behavior of
+       renames nested under an ampersand module.
+       (modules2-ampertag): New test.  Verifies an error condition which
+       prevents some ampersand modules from being checked out when a tag
+       is specified.
+
+2001-03-16  Derek Price  <address@hidden>
+
+       * sanity.sh (modules2): Additional test for ampersand module behavior
+       with '-d'.
+
+           for Greg Klanderman  <address@hidden>
+
+       * checkout.c (build_one_dir): Fix typo where clauses of two
+       conditionals were reversed in call to Create_Admin.  This caused
+       the CVS/Tag file to be removed in cases where it should have been
+       set, and vice-versa.  It only surfaced in rare cases as this code
+       is only invoked when using the -d option to build the path to
+       check out in.  Further, the bug would only matter when checking
+       out a module containing ampersand modules within it, via
+       client/server CVS.
+
+2001-03-16  Derek Price  <address@hidden>
+
+       * sanity.sh (admin-28-5): Confirm that a missing tag during an
+       'admin -n' operation is not a fatal error.
+
+2001-03-16  Derek Price  <address@hidden>
+
+       * admin.c (admin_data): Remove 'quiet' member.
+       (admin_fileproc): Use global 'really_quiet' rather than
+       admin_data->quiet.
+
+2001-03-16  Derek Price  <address@hidden>
+
+       * sanity.sh (admin): Replace hardcoded testdir path with the variable.
+
+2001-03-15  Derek Price  <address@hidden>
+
+       * sanity.sh (basica, binfiles, head, admin): Adjust for new messages.
+       * admin.c (admin_fileproc): Only print messages when not in
+       really_quiet mode.
+
+           for Stephen Rasku  <address@hidden>
+
+       * rcs.c (RCS_tag2rev): Make a missing tag a survivable error.
+
+2001-03-15  Larry Jones  <address@hidden>
+
+       * subr.c (sleep_past): Fix various bugs that would result in a
+       negative sleep time if it weren't unsigned; since it is, it would
+       result in a very large sleep time.  Ensure that us is always less
+       than 1000000.  Don't try to sleep for more 1 sec with usleep.
+       Cast NULL select arguments to correct type just in case.
+
+2001-03-14  Derek Price  <address@hidden>
+
+       * subr.c (sleep_past): New function.
+       * client.c (get_responses_and_close): Use new function.
+       * commit.c (commit): Ditto.
+       * update.c (do_update): Ditto.
+       * cvs.h: Prototype new function.
+
+       * stamp-h2.in: Regenerated.
+
+2001-03-14  Derek Price  <address@hidden>
+
+       * Makefile.in: Regenerated.
+       * stamp-h2.in: Ditto.
+
+2001-03-14  Larry Jones  <address@hidden>
+
+       * commit.c (check_fileproc): Allow adding on the trunk when there's
+       an existing non-Attic RCS file as long as the head revision is dead.
+       This can happen due to an aborted resurrection.
+       (commit_fileproc): When resurrecting, consider the dead revision
+       along with the other files' revisions.
+       (findmaxrev): Avoid unnecessary work.
+       (checkaddfile): Only warn if file isn't in Attic as expected.
+       (Reported by Ross Burton <address@hidden>.)
+       * sanity.sh (basica-r*): New tests for above.
+       (basica-o4): Update to match.
+
+2001-03-09  Larry Jones  <address@hidden>
+
+       * edit.c (edit_fileproc, unedit_fileproc): Some implementations of
+       asctime/ctime apparently use a leading zero on the date instead
+       of the space required by the C Standard.  Correct for this so that
+       shared working directories work without hassle.
+       (Reported by David L. Martin <address@hidden>.)
+       * entries.c (fgetentent): Ditto.
+       * vers_ts.c (time_stamp_server, time_stamp) Ditto.
+
+2001-03-07  Larry Jones  <address@hidden>
+
+       * sanity.sh (basica, binfiles2, head, admin): Update to match
+       change to admin.c.
+
+2001-03-06  Larry Jones  <address@hidden>
+
+       * client.c (recv_bytes): Handle EOF as in recv_line().
+       (Reported by Pavel Roskin <address@hidden>.)
+
+       * admin.c (admin_fileproc): Change final error message to clarify
+       that CVS refused to modify the RCS file rather than being unable to.
+
+2001-02-28  Jim Meyering  <address@hidden>
+
+       * commit.c (commit_usage): Use `-F logfile' (rather than -F file') in
+       the description of that option, to be consistent with the `-F logfile'
+       in the Usage: line.  Use spaces instead of TAB characters, and realign.
+
+2001-03-02  Derek Price  <address@hidden>
+
+       * sanity.sh (crerepos): Make failed ${CVS_RSH-rsh} attempt print the
+       name of the command it actually used rather than 'rsh'.
+
+2001-02-27  Derek Price  <address@hidden>
+
+       * sanity.sh (modules2-ampermod-*): Added these tests to make sure the
+       top level directory is created in an ampermodule when '-n' is passed to
+       checkout.
+
+       original bug report from
+           Wolfgang Haefelinger <address@hidden>
+
+2001-02-27  Derek Price  <address@hidden>
+
+       * sanity.sh (version-[12]): replace ' (client/server)' with .* in these
+       two tests so that 'make check' works with whatever client/server
+       options the executable was compiled with.
+
+2001-02-23  Derek Price  <address@hidden>
+
+       * main.c (main): Only check a cvsroot_t's isremote member when client
+       support is enabled.
+       * server.c: Include GSSAPI headers with client support as well as
+       server support.
+
+2001-02-21  Larry Jones  <address@hidden>
+
+       * modules.c, cvs.h (do_module): Add build_dirs argument and use it
+       instead of run_module_prog.  Change all callers.
+       * tag.c (cvstag): For rtag, don't build directories.
+       * sanity.sh (modules3): Update to match.
+
+2001-02-20  Derek Price  <address@hidden>
+
+       * client.c: Use xgssapi.h.
+       * server.c: Ditto.
+
+2001-02-15  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Correct error from yesterday.
+       * Makefile.in: Regenerated.
+
+2001-02-14  Derek Price  <address@hidden>
+
+       * server.c: Include xselect.h.
+       * update.c (do_update): Use best available sleep function.
+
+2001-02-14  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Alphabetize and split to one/line.
+       (cvs_LDADD): Alphabetize and split to one/line.
+       * Makefile.in: Regenerated.
+
+2001-02-14  Larry Jones  <address@hidden>
+
+       * build_src.com: Remove references to rtag.c & rtag.obj.
+
+2001-02-13  Derek Price  <address@hidden>
+
+       * main.c (date_to_tm): New function to convert an RCS date string to a
+       struct tm.
+       (tm_to_internet): New function to convert a struct tm to a date string
+       as specified by RFC822 and amended by RFC 1123.
+       (date_to_internet): Use the above two functions and a struct tm
+       intermediary for conversion.
+       * patch.c (patch_fileproc): Answer somebody's comment and use the new
+       diff_exec API.
+       * rcs.c (RCS_checkin): Use new diff_exec API.
+       (RCS_delete_revs): Use new diff_exec API.
+       (make_file_label): If the file name is DEVNULL, date it the Epoch for
+       compatibility with the POSIX.2 spec and Larry Wall's patch
+       implementation.
+       * rcscmds.c (diff_exec): Accept new label arguments.
+       * sanity.sh (death2): Update some diff tests to accept the new format.
+       * update.c (patch_file): Use new diff_exec API.
+       * diff.c (diff_fileproc): Create header labels appropriate for
+       compatibility with the Larry Wall version of patch.
+       (diff): Rename calls to strcat_and_allocate.
+       (strcat_and_allocate): Rename and move...
+       * subr.c (xrealloc_and_strcat): here.
+       * cvs.h: Update prototypes to match.
+
+2001-02-13  Derek Price  <address@hidden>
+
+       * Makefile.am (cvs_SOURCES): Remove rtag.c.
+
+2001-02-07  Larry Jones  <address@hidden>
+
+       * sanity.sh (directory_cmp): Return status rather than setting ISDIFF.
+       (basic2): Rewrite using dotest.
+
+2001-02-06  Larry Jones  <address@hidden>
+
+       * tag.c, rtag.c: Merge with tag.c being the surviving file.
+       * Makefile.in: Update to match.
+       * main.c (cmds): rtag() => cvstag().
+       * server.c (serve_rtag): Ditto, and set command name.
+
+2001-02-06  Derek Price  <address@hidden>
+           Rex Jolliff  <address@hidden>
+           Shawn Smith  <address@hidden>
+
+       * add.c: Replace opendir, closedir, & readdir calls with CVS_OPENDIR,
+       CVS_CLOSEDIR, & CVS_READDIR in support of changes to handle VMS DEC C
+       5.7 {open,read,close}dir problems.  Check today's entry in the vms
+       subdir for more.
+       * filesubr.c: ditto
+       * find_names.c: ditto
+       * ignore.c: ditto
+       * import.c: ditto
+       * lock.c: ditto
+       * update.c: ditto
+
+2001-02-02  Larry Jones  <address@hidden>
+
+       * error.h: Changed include guard macro from _error_h_ to ERROR_H;
+       names beginning with underscore are reserved.
+       * login.c (password_entry_parseline, password_entry_operation,
+       password_entry_operation_e, password_entry_operation_t): Removed
+       leading underscore(s).
+       (password_entry_parseline): Corrected error messages.
+       (password_entry_operation): Fixed uninitialized variable (password).
+       (login): Removed unused variable (found_password).
+
+       * rtag.c (rtag_proc): Call lock_tree_for_write() before calling
+       start_recursion.  This fixes a serious problem where do_recursion
+       was reading and caching RCS files without any locks in place and
+       that information was subsequently being used to rewrite the file
+       causing any intermediate changes to be lost.
+       (rtag_filesdoneproc): Defunct.
+       (Reported by Karl Tomlinson <address@hidden>.)
+       * tag.c (cvstag, tag_filesdoneproc): Ditto.
+       * lock.c (lock_tree_for_write): Add which argument, change all
+       callers to pass W_LOCAL.
+       * rcs.h: Ditto.
+
+2001-01-29  Derek Price  <address@hidden>
+
+       * client.c (get_cvs_port_number): change the prototype to accept a
+       const cvsroot_t * as input and add a FIXME comment
+       * cvs.h: new prototypes for get_cvs_port_number & normalize_cvsroot
+       * login.c (_password_entry_operation): consolidate all the ~/.cvspass
+       access into a single new function which reads ~/.cvspass in a backwards
+       compatible manner
+       (logout): use the new _password_entry_operation function
+       (login): ditto
+       (get_cvs_password): ditto
+       * root.c (normalize_cvsroot): move knowledge of default port & username
+       values inside
+
+2001-01-29  Larry Jones  <address@hidden>
+
+       * subr.c (shell_escape): New function.
+       * cvs.h: Declare it.
+       * logmsg.c (logfile_write): Use it to avoid problems with filenames
+       containing "'".
+       (Reported by Gerhard Ahuis <address@hidden>.)
+
+       * server.c (outbuf_memory_error, pserver_authenticate_connection,
+       kserver_authenticate_connection): If available, use syslog() to
+       record some errors.
+
+2001-01-25  Larry Jones  <address@hidden>
+
+       * server.c (do_cvs_command): If there's a partial output line left
+       over and the client doesn't support MT, go ahead and send it in an
+       M response instead of just dropping it.
+       (Reported by Milos Kleint <address@hidden>.)
+
+       * update.c (update_fileproc): Handle toss_local_changes in the
+       T_NEEDS_MERGE case.
+       (Inspired by Noel L Yap <address@hidden>.)
+       * sanity.sh (clean): New tests for above.
+
+2001-01-23  Derek Price  <address@hidden>
+
+       * run.c (run_exec): flush, if used, stderr and stdout before exit
+       * server.c (cvs_flusherr): flush stderr & send a stderr flush command
+       on the protocol pipe
+       (cvs_flushout): like above, for stdout
+       (do_cvs_command): handle flushes properly
+       * sanity.sh (reserved): make the commitinfo script echo errors to
+       stderr rather than stdin
+
+2001-01-18  Larry Jones  <address@hidden>
+
+       * log.c (option_revlist, revlist, log_usage, cvslog,
+       log_parse_revlist, log_expand_revlist, log_version_requested): Add
+       support for :: for exclusive ranges.
+       * admin.c (admin_usage): Reorder -o to be parallel to log -r.
+       * sanity.sh (log): New tests for above.
+
+2001-01-18  Derek Price  <address@hidden>
+
+       * main.c: Add '2001' to the range of copyright years listed by the
+       --version option
+       * version.c.in (version): check current_parsed_root before its isremote
+       member to avoid a core dump
+       * sanity.sh (version): add a test for the version command
+
+       * version.c: regenerated
+
+2001-01-12  Larry Jones  <address@hidden>
+
+       * rcs.c, rcs.h (RCS_lock, RCS_unlock): Use RCS_gettag to find the
+       correct revision so that symbolic tags work correctly.  (This
+       requires removing the "const" from the rev parameter since it's
+       passed to RCS_gettag which might modify it.)
+       (Reported by irina sturm <address@hidden>.)
+
+2001-01-11  Larry Jones  <address@hidden>
+
+       * run.c (close_on_exec): Remove check for FD_CLOEXEC.  As far as I
+       can see, it's *never* been defined, which defeats the whole point.
+       If F_SETFD is defined, it's probably safe to use it.
+
+       * server.c (do_cvs_command): Call close_on_exec on the protocol and
+       flow control pipes in the child process so they don't get inherited
+       by any subsidiary processes.
+       (Reported by Tristan Gingold <address@hidden>.)
+
+       * cvs.h (free_cvsroot_t): Spell correctly (was free_CVSroot_t).
+
+2001-01-10  Derek Price  <address@hidden>
+           Rex Jolliff  <address@hidden>
+
+       * build_src.com: VMS changes
+       * filesubr.c: replace calls to unlink() with CVS_UNLINK() for VMS
+       * rcs.c: ditto
+
+2001-01-10  Derek Price  <address@hidden>
+
+       * main.c (current_root): explicitly list this as a static global
+
+2001-01-10  Derek Price  <address@hidden>
+
+       * cvs.h (get_cvs_port_number): change name & prototype from
+       get_port_number
+       * client.c (get_cvs_port_number): new function which returns a port
+       number based on a cvsroot_t rather than requiring all possible sources
+       passed in
+       (connect_to_pserver): use new get_cvs_port_number function
+       (connect_to_server): ditto
+       * login.c (get_password): use new get_cvs_port_number function
+       (login): ditto
+       (logout): ditto
+
+2001-01-10  Derek Price  <address@hidden>
+
+       * Makefile.am ($(srcdir)/version.c): specify $(srcdir) for all subparts
+       of the build since some systems don't allow mv's across partitions
+       * Makefile.in: regenerated
+
+2001-01-10  Derek Price  <address@hidden>
+
+       * Makefile.am (version.c): specify $(srcdir) explicitly in target rule
+       so version.c gets built properly for all makes.
+       (version.o): specify $(srcdir)/version.c explicitly so dependency is
+       found and built properly
+       * Makefile.in: regenerated
+
+2001-01-09  Derek Price  <address@hidden>
+
+       * version.c: updated timestamp
+
+2001-01-09  Larry Jones  <address@hidden>
+
+       * server.c (server): Change to server_temp_dir immediately after
+       creating it so that any stray files that happen to be created go
+       there instead of in the server's initial directory, wherever that
+       may be.
+       * sanity.sh (modules5-15): Update to match.
+
+       * version.c.in: Update to match Derek's change to version.c.
+
+2001-01-09  Derek Price  <address@hidden>
+
+       * cvs.h: Remove the various CVSroot_* bits and replace them with a
+       single structure of type cvsroot_t (current_parsed_root)
+
+       * root.c (parse_cvsroot): return pointer to a new cvsroot_t rather than
+       altering global variables
+       (local_cvsroot): return a pointer to a new cvsroot_t rather than
+       setting globals.  changed the name of this function from
+       set_local_cvsroot to better explain new functionality
+       (new_cvsroot_t): new initializer function
+       (free_cvsroot_t): new function
+       (others): use current_parsed_root rather than the old CVSroot_* globals
+
+       * add.c: use current_parsed_root rather than the old CVSroot_* globals
+       * admin.c: ditto
+       * checkout.c: ditto
+       * client.c: ditto
+       * commit.c: ditto
+       * create_adm.c: ditto
+       * diff.c: ditto
+       * edit.c: ditto
+       * expand_path.c: ditto
+       * find_names.c: ditto
+       * history.c: ditto
+       * ignore.c: ditto
+       * import.c: ditto
+       * lock.c: ditto
+       * log.c: ditto
+       * login.c: ditto
+       * logmsg.c: ditto
+       * main.c: ditto
+       * mkmodules.c: ditto
+       * modules.c: ditto
+       * parseinfo.c: ditto
+       * patch.c: ditto
+       * rcs.c: ditto
+       * recurse.c: ditto
+       * release.c: ditto
+       * remove.c: ditto
+       * repos.c: ditto
+       * rtag.c: ditto
+       * server.c: ditto
+       * status.c: ditto
+       * tag.c: ditto
+       * update.c: ditto
+       * version.c: ditto
+       * watch.c: ditto
+       * wrapper.c: ditto
+
+2001-01-05  Derek Price  <address@hidden>
+
+       * cvs.h (enum CVSmethod): add null_method
+       * root.c (method_names): correlate null_method & "undefined"
+       (parse_cvsroot): make two error cases non fatal
+       * sanity.sh (crerepos-6b): account for new error message, re above
+
+2001-01-05  Derek Price  <address@hidden>
+
+       * src/Makefile.am (cvsbug, cvsbug_EXTRA_DIST, EXTRA_DIST): move cvsbug
+       target to configure.in - see ../ChangeLog for more
+       * src/cvsbug.in: Rename from cvsbug.sh
+       * src/cvsbug.sh: Rename to cvsbug.in
+
+2001-01-04  Larry Jones  <address@hidden>
+
+       * Makefile.am (cvsbug): Explicitly list input file ($< is only
+       valid in inference rules).
+       * Makefile.in: Ditto.
+
+2001-01-04  Derek Price  <address@hidden>
+
+       * sanity.sh: use getopts rather than getopt for portability reasons
+
+2001-01-03  Derek Price  <address@hidden>
+
+       * Makefile.am (remotecheck): depend on 'all'
+       * Makefile.in: regenerated
+
+2000-12-29  Derek Price  <address@hidden>
+
+       * sanity.sh: remove explicit "$@" from last checkin and move the 'do'
+       to the line following the 'for'.  Apparently this is more portable.
+
+2000-12-29  Derek Price  <address@hidden>
+
+       * sanity.sh: make "$@" explicit in 'for' statement since Solaris 5.6's
+       implementation of Bourne shell doesn't seem to implement this default
+       behavior.
+
+2000-12-27  Derek Price  <address@hidden>
+
+       * sanity.sh: add a -f option for continuing from a particular test
+       and shorten --keep to -k so we can use the getopt function.
+
+2000-12-27  Derek Price  <address@hidden>
+
+       * Makefile.am (remotecheck): Make remotecheck dependant on all
+       * Makefile.in: regenerated
+
+2000-12-26  Derek Price  <address@hidden>
+
+       * Makefile.in: update timestamp
+       * stamp-h2.in: ditto
+       * version.c: ditto
+
+2000-12-26  Derek Price  <address@hidden>
+
+       * Makefile.am: new target for version.c
+       (EXTRA_DIST): add version.c.in & version.c so builds work when
+       configure doesn't
+       * Makefile.in: Regenerated
+       * stamp-h2.in: update timestamp
+       * version.c: ditto
+
+2000-12-26  Derek Price  <address@hidden>
+
+       * Makefile.am (INCLUDES): add zlib
+       * Makefile.in: Regenerated
+
+2000-12-22  Derek Price  <address@hidden>
+
+       * Makefile.am (DISTCLEANFILES): added a few files
+       (INCLUDES): commented
+        * Makefile.in: Regenerated
+
+2000-12-21  Derek Price  <address@hidden>
+
+       * .cvsignore: Added .deps directory and a new stamp file
+       * Makefile.am: New file needed by Automake
+       * Makefile.in: Regenerated
+       * stamp-h2.in: New stamp file created by Automake
+       * version.c.in: use configure to generate version.c
+
+2000-12-16  Derek Price  <address@hidden>
+
+       * server.c (server_update): Keep the vers structure up to date after
+       sending a Remove or Remove-entry command to the client
+       * update.c (update): remove call to server_updated() after
+       scratch_file()
+       (scratch_file): in server mode, call server_updated(), otherwise keep
+       the vers structure up to date
+       (join_file): add a trace, save the revision to Register() on a remove
+       before calling server_scratch & server_updated
+       * sanity.sh (join): Add test for a remove/add caused by an update
+       to a new branch and a join in the same step.
+
+2000-12-15  Larry Jones  <address@hidden>
+
+       * error.c (error): Add %ld and %lu.
+
+       * history.c: Change hrec.idx from int to long, reformat NEXT_BAR
+       for readability, add hrec_idx.
+       (fill_hrec): Change initialization to be portable and always set
+       idx so it can be used as a line number in error messages; improve
+       parsing and error checking.
+       (read_hrecs): Initialize hrec_idx, handle embedded NULs, warn about
+       no newline at end of file.
+       (select_hrec): Add basic validity checking.
+
+2000-12-07  Larry Jones  <address@hidden>
+
+       * history.c (history): Allow multiple -m options as documented.
+
+2000-11-29  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): back out yesterday's redundant changes
+       * main.c (main): fix CVSROOT trace message to look like other trace
+       messages
+       * sanity.sh (multiroot2-9): expect new trace message
+
+2000-11-28  Derek Price  <address@hidden>
+
+       * root.c (parse_cvsroot): add trace on this function
+       * client.c (get_port_number): make trace print look like others
+
+2000-11-16  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): back out the previous change in the
+       interests of portability, add an assertion, and fix the header comment
+
+2000-11-16  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): refine the exit behavior to notice if
+       the out param was passed in NULL and, if so, avoid setting it and delete
+       the temp file for later
+
+2000-11-16  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): fixed a garble or two, added some
+       additional error checking, and added a comment
+
+2000-11-15  Derek Price  <address@hidden>
+
+       * filesubr.c (cvs_temp_file): added cvs_temp_file
+       function to use mkstemp rather than one of the other temp file
+       generators as gcc keeps complaining I should.
+       (cvs_temp_name): altered this function to simply wrap cvs_temp_file
+       and deprecated it
+       * cvs.h: added prototype for cvs_temp_file
+       * commit.c (commit): use the new function instead of the old and plug
+       an old (though related) memory leak.
+       * import.c (import): use the new function
+       * login.c (login): Ditto
+       * logmsg.c (do_editor, do_verify): Ditto
+       * patch.c (patch_fileproc): Ditto
+
+2000-11-14  Larry Jones  <address@hidden>
+
+       * update.c, update.h (do_update): Add xdotemplate parameter.
+       Change all callers.
+       (update_dirent_proc): Use dotemplate for Create_Admin, not 1.
+       * checkout.c (checkout_proc): Don't create CVS/Template if
+       exporting.
+       (Reported by Andrey Podkolzin <address@hidden>.)
+
+2000-11-08  Larry Jones  <address@hidden>
+
+       * admin.c (admin): Use getgroups() to check for membership in
+       CVS_ADMIN_GROUP if it exists.  In any event, check the user's
+       primary group in addition to any additional groups.
+       (Reported by Thomas Okken <address@hidden>.)
+
+2000-11-06  Jim Meyering  <address@hidden>
+
+       Compile with gcc's -Wformat and fix the exposed problems.
+       * root.c (parse_cvsroot) [! HAVE_KERBEROS]: Provide an argument
+       for the %s error format spec.
+       [! HAVE_GSSAPI]: Likewise.
+       (normalize_cvsroot): Put comment delimiters around token after `#endif'.
+
+2000-11-03  Larry Jones  <address@hidden>
+
+       * sanity.sh: Some versions of sed require a space between -e and
+       the value.
+
+2000-10-27  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout): Don't check for a safe location if just
+       cat'ing the module database.
+       (Reported by Ilya Martynov <address@hidden>.)
+       Have -s set cat as well as status; it simplifies the code.
+
+2000-10-26  Larry Jones  <address@hidden>
+
+       * sanity.sh (join-admin-2): Check output from all commands instead
+       of (mostly) discarding.  (Some of the tests used to produce stray
+       output in remote mode.)
+
+       * sanity.sh (dotest_line_by_line): Handle empty lines in pattern
+       (expr doesn't distingish between successfully matching nothing
+       and failing to match anything).
+
+       * sanity.sh (dotest_internal): Rearrange and use elif to simplify.
+
+2000-10-24  Jim Meyering  <address@hidden>
+
+       Fix a bug, introduced with my fix of 2000-07-10, whereby -kk would
+       sometimes be ignored for some of the files involved in an update.
+
+       * update.c (join_file): Restore the original value of `options'
+       right after calling checkout_file.
+       * sanity.sh (join-admin-2): New test for this.
+
+2000-10-23  Derek Price  <address@hidden>
+            James Youngman  <address@hidden>
+
+       * sanity.sh: it's /gnu/bin, not /gun/bin.  Thanks go to James Youngman
+       <address@hidden> for the bug report and patch.
+
+2000-10-20  Jim Kingdon  <http://sourceforge.net/users/kingdon/>
+
+       * server.c (switch_to_user): Set CVS_USER.  Patch from Sudish
+       Joseph and popularized by dozens (e.g. mozilla.org, also others).
+
+2000-10-20  Derek Price  <address@hidden>
+            KOIE Hidetaka  <address@hidden>
+
+       * root.c (normalize_cvsroot): plug a memory leak.  Thanks to
+       KOIE Hidetaka <address@hidden>
+
+2000-10-18  Derek Price  <address@hidden>
+
+       * client.c (connect_to_pserver): added a close brace the lack of which
+       was preventing compilation when gssapi was enabled.  Removed a
+       redundant check for HAVE_KERBEROS.
+
+2000-10-18  Derek Price  <address@hidden>
+
+       * root.c (normalize_cvsroot): removed references to free_port_s and the
+       now useless call to free now that port_s is on the stack.  Thanks to
+       Jon Miner.
+
+2000-10-18  Derek Price  <address@hidden>
+
+       * root.c (normalize_cvsroot): remove calls to snprintf for
+       compatibility with M$ Windoze.
+
+2000-10-18  Derek Price  <address@hidden>
+
+       * sanity.sh (crerepos-6a, crerepos-6a-r): fix a "?" in a regex & pipe
+       the output of a test to /dev/null since we don't know what error
+       messages specific rsh implementations will output.
+
+2000-10-17  Derek Price  <address@hidden>
+
+       * cvs.h: added CVSroot_password variable. Provided prototypes for
+       get_port_number & normalize_cvsroot.
+       * client.c (get_port_number): Fixed an ANSI prototype I had included
+       for get_port_number.
+       * login.c (login, logout): Removed two checks for a non-null
+       CVSroot_username since parse_cvsroot now supplies a default in pserver
+       mode. allow for a password in CVSROOT
+       (get_cvs_passsword): return CVSroot_password if it was supplied
+       in the CVSROOT.
+       * root.c (parse_cvsroot): Changed CVSROOT spec from
+       :method:address@hidden/port:/cvsroot to
+       :method:[[user][:address@hidden:[port]]/cvsroot
+       Removed the xstrdup function since we'd rather have the error checking
+       from the version in subr.c anyhow.  Moved some error messages which
+       looked like they would print the wrong error message after a failed
+       connect_to_gserver call.
+       (normalize_cvsroot): return a normalized CVSROOT for use in the
+       .cvspass file.
+       * sanity.sh (crerepos-6): fix a test which was expecting an old error
+       message.
+
+       * client.c (connect_to_pserver): Moved some error messages which looked 
like they
+       would print the wrong error message after a failed connect_to_gserver
+       call.
+
+       * login.c (login): Paranoiacly zero a password in memory.
+
+2000-10-12  Derek Price  <address@hidden>
+
+       * client.c (auth_server_port_number -> get_port_number, start_pserver,
+       start_tcp_server): use a port specified in CVSROOT instead of the
+       default port.  Failing that, use the CVS_CLIENT_PORT environment
+       variable.
+       * cvs.h: Added global CVSroot_port & renamed auth_server_port_number.
+       * root.c (parse_cvsroot): Parse the new CVSROOT format properly.
+       Incidentally reformated some error messages for uniformity and
+       readability.
+       * sanity.sh (crerepos): fix two tests which were now expecting the
+       wrong error message.
+
+2000-10-11  Larry Jones  <address@hidden>
+
+       * server.c (pserver_authenticate_connection): Fix stupid mistake
+       in previous change.
+
+2000-10-11  Derek Price  <address@hidden>
+
+       * main.c (main): Dispose old CVSroot when parsing a '-d' option if
+       free_CVSroot is set.
+       * root.c (parse_cvsroot): remove references to 'cvsroot_parsed', a
+       static boolean I expect hasn't been used since CVS learned to handle
+       multiple CVSROOTs.
+
+2000-10-10  Larry Jones  <address@hidden>
+
+       * server.c (print_error): Make up a message if strerror fails.
+
+       * server.c (pserver_authenticate_connection): Give a real error
+       message for an invalid repository.
+
+2000-10-06  Derek Price  <address@hidden>
+
+       * add.c (add): Made quiet mode affect some warning messages as seemed
+       appropriate.  Specifically, some of the messages which a user might
+       want to ignore so they don't have to be quite so specific on the
+       command line: files added twice, files already in the repository and
+       check out properly (i.e. but picked up by 'cvs add *'), & files which
+       are readded in place of a dead revision or onto a branch.  '-q' will
+       not change the non-zero exit code for the cases where at least one
+       passed in file name was already in the Entries file.  There seems to
+       be a precedent in remove.c.
+       * remove.c (cvsremove): switched the "use cvs ci to make these changes
+       permanent message" to only print w/o '-Q' to match the new behavior of
+       add.  This seems appropriate as '-Q' is defined to restrict messages
+       to critical errors.
+       * sanity.sh (adderrmsg): Added some tests for the above behavior.
+
+2000-10-05  Larry Jones  <address@hidden>
+
+       * client.c (call_in_directory): Create CVSADM directory if it doesn't
+       exist in the directory.  This makes client/server work more like
+       standalone when checking out into an existing (non-CVS) directory.
+       * sanity.sh (dirs2, conflicts3, toplevel): Update to match.
+
+2000-10-03  Larry Jones  <address@hidden>
+
+       * filesubr.c (get_homedir): Ignore $HOME when running in server mode.
+
+2000-10-02  Larry Jones  <address@hidden>
+
+       * cvs.h: Define (and use) T_PATCH as a valid file classification
+       even when SERVER_SUPPORT isn't defined -- it simplifies the code.
+       * classify.c (Classify_File): Ditto.
+       * commit.c (check_fileproc): Ditto.
+       * status.c (status_fileproc): Ditto.
+       * update.c (update_fileproc): Ditto.
+       * tag.c (check_fileproc): Accept T_PATCH in addition to T_CHECKOUT.
+       * sanity.sh (tagc-10): Update to match.
+
+2000-09-29  Larry Jones  <address@hidden>
+
+       * client.c (get_responses_and_close): Reset server_fd to -1 after
+       shutting down.
+       (Reported by Joerg Thoennes <address@hidden>.)
+
+2000-09-27  Larry Jones  <address@hidden>
+
+       * commit.c (commit): Don't sleep before returning in server mode,
+       just let the client do it.
+       * update.c (do_update): Ditto.
+
+       * sanity.sh (find_tool): Correct method of checking for GNU tools.
+
+       * checkout.c (checkout_proc): Match up user directories with
+       repository directories instead of using Emptydir.
+       * sanity.sh (cvsadm, emptydir): Update to match.
+
+2000-09-19  Larry Jones  <address@hidden>
+
+       * version.c: Push version number to 1.11.0.1.
+
+       * version.c: Version 1.11.
+
+2000-09-07  Larry Jones  <address@hidden>
+
+       * Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
+       from autoconf.
+
+2000-08-23  Larry Jones  <address@hidden>
+
+       * mkmodules.c (init): Create an empty val-tags file if it doesn't
+       already exist to avoid problems with users not having sufficient
+       permissions to create it later.
+
+2000-09-06  Jim Kingdon  <address@hidden>
+
+       * main.c (lookup_command_attribute): Add "release" to commands
+       which can be done by a read-only user.
+
+2000-08-23  Larry Jones  <address@hidden>
+
+       * repos.c (Name_Repository): Use pathname_levels to detect attempts
+       to get above the repository instead of checking for leading ..
+       which isn't reliable.
+       * sanity.sh (multiroot3-12 to multiroot3-15): New tests for above.
+
+2000-08-21  Larry Jones  <address@hidden>
+
+       * rcs.c (expand_keywords): Handle the unusual case of log == NULL.
+       (Reported by Craig Metz <address@hidden>.)
+
+2000-08-01  Larry Jones  <address@hidden>
+
+       * subr.c (pathname_levels): Fix bug that miscounts adjacent
+       slashes.
+       (Patch submitted by Tanaka Akira <address@hidden>.)
+
+       * loginc.c (login): If available, use getpassphrase instead of
+       getpass to support long passwords on Solaris.
+
+2000-07-28  Larry Jones  <address@hidden>
+
+       * server.c (server_noop): Avoid do_cvs_command() overhead.
+       (requests): Make noop RQ_ROOTLESS.
+
+2000-07-27  Noel Cragg  <address@hidden>
+
+       * root.c (parse_cvsroot): change fork method to behave like other
+       remote methods -- let the server check that the repository
+       directory is an absolute pathname.
+
+2000-07-27  Larry Jones  <address@hidden>
+
+       * lock.c (set_lock): Include actual lock directory in error message.
+       * sanity.sh (multiroot3-10): Change to match.
+
+       * sanity.sh (client-3): Allow for a potential "broken pipe".
+
+2000-07-26  Larry Jones  <address@hidden>
+
+       * commit.c (commit_filesdoneproc): Flush stdout before running script.
+       * modules.c (do_module): Ditto.
+       * update.c (update_dirleave_proc): Ditto.
+       * server.c (do_cvs_command): Give input from the protocol pipe
+       precedence over input from stdout/stderr.  There's no particularly
+       good justification for this other than helping to avoid out-of-order
+       messages in sanity.sh.
+
+       * admin.c (admin_usage): Add the supported options.
+
+       * sanity.sh (info): Try to avoid out-of-order messages.
+
+       * sanity.sh (info): Fix problems when running twice in a row.
+
+2000-07-17  Larry Jones  <address@hidden>
+
+       * sanity.sh (modules5-7, cvsadm-1e, emptydir-2): Allow for a nil
+       commit (can happen if the test is run twice in a row).
+
+2000-07-19  Pavel Roskin  <address@hidden>
+       and Larry Jones  <address@hidden>
+
+       * mkmodules.c (config_contents): Add a commented out example for
+       LockDir. Don't suggest PreservePermissions unless it's enabled.
+
+2000-07-17  Larry Jones  <address@hidden>
+
+       * login.c (get_cvs_password): Handle malformed ~/.cvspass more
+       gracefully.
+
+2000-07-12  Larry Jones  <address@hidden>
+
+       * sanity.sh (modules5): New tests for module programs.
+
+2000-07-11  Larry Jones  <address@hidden>
+
+       * filesubr.c (copy_file, xcmp): Handle systems (like Plan 9) that
+       don't support mknod() and/or st_rdev.
+       * import.c (add_rcs_file): Ditto.
+       * rcs.c (RCS_checkout, RCS_checkin): Ditto.
+       * update.c (special_file_mismatch): Ditto.
+
+2000-07-10  Larry Jones  <address@hidden>
+
+       * zlib.c (gunzip_and_write): Fix type clashes.
+
+       * main.c (main): Remove unused variables.
+
+2000-07-10  Jim Meyering  <address@hidden>
+
+       When a command like `cvs update -kk -jT1 -jT2' creates a new file
+       (because it had the T2 tag, but not T1), the subsequent commit of
+       that just-added file would effectively set the admin `-kk' option
+       for that file in the repository.
+
+       * update.c (join_file): Rename global-shadowing local `options'
+       to `t_options'.
+       Set file-scoped global `options' to NULL just before
+       check-out.
+       * sanity.sh (join-admin): New test for this.
+
+2000-07-08  Larry Jones  <address@hidden>
+
+       * version.c, cvs.h (version): New function.
+       * main.c (cmds[]): Add version command to invoke it.
+       (main): Also use it in -v.
+       * server.c (serve_version): New function.
+       (requests[]): Add version command to invoke it.
+
+2000-07-06  Karl Fogel  <address@hidden>
+
+       * sanity.sh (pserver-14): remove this test for portability
+       reasons (it was only recently added for the 2000-07-04 change).
+
+2000-07-06  Larry Jones  <address@hidden>
+
+       sanity.sh (modules-148): Don't test for specific revisions.
+
+       * main.c (main): Catch SIGABRT to try to clean up after assertion
+       failures.  Don't bother SIG_register'ing Lock_Cleanup because
+       main_cleanup calls it indirectly anyway.
+       * patch.c (patch): Catch SIGABRT.
+       * rcs.c (rcs_internal_lockfile): Ditto.
+       * server.c (server): Ditto.
+
+       * fileattr.c (fileattr_write): Don't delete the unrecog_head list
+       when writing...
+       (fileattr_free): Delete it when freeing!
+
+2000-07-05  Larry Jones  <address@hidden>
+
+       * admin.c (admin): Handle -t in client so reading from files works
+       correctly in client/server mode.
+       * sanity.sh (log2): Update to match.
+
+2000-07-04  Karl Fogel  <address@hidden>
+
+       * server.c (pserver_authenticate_connection): use new
+       getline_safe() during authentication phase, to avoid a
+       denial-of-service attack in which client sends arbitrary
+       amounts of data with no newlines.
+       (Reported by <address@hidden>.)
+
+       * sanity.sh: new test pserver-14 for above.
+
+       * myndbm.c: #include getline.h.
+       (mydbm_load_file): pass new GETLINE_NO_LIMIT flag to getstr().
+
+2000-07-03  Larry Jones  <address@hidden>
+
+       * sanity.sh (modules): Rewrite using dotest.  Add "modules-"
+       prefix to test names.
+
+2000-06-28  Larry Jones  <address@hidden>
+
+       * error.c (error_exit): Call rcs_cleanup () to release any rcs locks.
+       * rcs.c, rcs.h (rcs_cleanup): Make public, close file before trying
+       to remove (some systems won't remove open files).
+       (RCS_putdtree): Don't worry about cleaning up before call error
+       since it now does it for us.
+       (rcs_internal_lockfile, rcs_internal_unlockfile): Keep track of
+       lock file fd for rcs_cleanup ().
+
+       * client.c (handle_set_checkin_prog, handle_set_update_prog):
+       Just ignore the request when exporting.
+
+2000-06-27  Larry Jones  <address@hidden>
+
+       * create_adm.c, cvs.h (Create_Admin): Add dotemplate argument.
+       Change all callers.
+       * checkout.c (checkout_proc): Don't create CVS/Template if
+       exporting.
+
+2000-06-26  Pavel Roskin <address@hidden>
+       and Larry Jones  <address@hidden>
+
+       * server.c (switch_to_user): Only set CVS_Username if
+       AUTH_SERVER_SUPPORT is defined.
+
+2000-06-23  Larry Jones  <address@hidden>
+
+       * client.c (send_dirent_proc): Don't allocate ignlist if you're
+       going to skip the directory (plugs memory leak).
+       (send_dirleave_proc): New function.
+       (send_files): Use it (plugs memory leak).
+       * root.c (root_allow_free): Plug memory leaks.
+       * server.c (serve_directory, serve_notify, check_password,
+       pserver_authenticate_connection): Ditto.
+       * update.c (update): Ditto.
+
+       This completes the memory leak shoot-out -- the Purify'ed version
+       of CVS now runs the entire test suite, both local and remote (except
+       for remote crerepos, which causes Purify to choke) with *no* memory
+       leaks.
+
+       * server.c (pserver_authenticate_connection): Don't free null pointer.
+
+2000-06-21  Larry Jones  <address@hidden>
+
+       * client.c (update_entries, get_responses_and_close): Plug memory leaks.
+       * commit.c (find_fileproc, commit): Ditto.
+       * import.c (import): Ditto.
+       * log.c (cvslog): Ditto.
+       * recurse.c (start_recursion): Ditto.
+       * remove.c (cvsremove): Ditto.
+       * server.c (fd_buffer_initialize, server_notify, do_cvs_command): Ditto.
+       (fd_buffer_shutdown): New function.
+
+2000-06-20  Larry Jones  <address@hidden>
+
+       * root.c (parse_cvsroot): Put the terminating NUL byte into the
+       string *before* copying it, not after. :-(
+
+2000-06-19  Larry Jones  <address@hidden>
+
+       * main.c (main): Plug memory leaks.
+       * root.c (parse_cvsroot, set_local_cvsroot): Ditto.
+       * server.c (serve_root): Ditto.
+
+2000-06-16  Larry Jones  <address@hidden>
+
+       * fileattr.c (fileattr_read): Plug memory leak.
+       * rcs.c (RCS_whatbranch): Ditto.
+       * update.c (update_dirleave_proc): Ditto.
+
+       * ignore.c (ign_dir_add): Duplicate string so caller can free.
+
+       * modules.c (do_module): Don't write into dbm's memory!
+
+2000-06-15  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout_proc): Fix non-ANSI code in call to
+       findslash(), minor cleanups.
+
+2000-06-14  Larry Jones  <address@hidden>
+
+       * tag.c (val_direntproc): Return R_PROCESS instead of 0.
+
+       * client.c (update_entries): Fix type clash calling gunzip_and_write().
+       * server.c (receive_file): Fix type clash calling gunzip_and_write().
+       (server_updated): Fix type clash calling buf_output().
+       * error.c (error): Make buf char instead of unsigned char to avoid
+       type clashes.
+
+       * modules.c (do_module): Change callback_proc to pass argc by
+       value instead of by reference: callback procs shouldn't be
+       messing with the callers argc/argv, it makes correct memory
+       management impossible.  Plug memory leaks.
+       * cvs.h: Change to match.
+       * checkout.c (checkout_proc): Ditto; use a local argv array instead
+       of messing with caller's.
+       * modules.c (callback_proc): Ditto.
+       * patch.c (patch_proc): Ditto; use a local argv array instead
+       of messing with caller's.
+       * rtag.c (rtag_proc): Ditto; use a local argv array instead
+       of messing with caller's.
+       * server.c (expand_proc): Ditto.
+       * subr.c (line2argv): Change initial argv_allocated back to 1.
+
+       * checkout.c (findslash): Fix non-ANSI code.
+
+       * sanity.sh (modes3): Fix test names.
+
+2000-06-13  Larry Jones  <address@hidden>
+
+       * add.c (add): Plug memory leaks.
+       * admin.c (admin_fileproc): Ditto.
+       * checkout.c (build_dirs_and_chdir): Ditto.
+       * edit.c (editors_fileproc): Ditto.
+       * log.c (cvslog, log_parse_revlist, log_parse_date): Ditto.
+       * rcs.c (RCS_addaccess): Ditto.
+       * tag.c (check_fileproc): Ditto.
+       * vers_ts.c (Version_TS): Ditto.
+       * watch.c (watchers_fileproc): Ditto.
+
+2000-06-12  Larry Jones  <address@hidden>
+
+       * rcs.c (rcsbuf_valword): Set rcsbuf->vlen to keep rcsbuf_valcopy()
+       from allocating more memory than needed for @ strings.  Don't declare
+       unless PRESERVE_PERMISSIONS_SUPPORT (since not defined).
+
+       * rcs.c (RCS_abandon): New function to abandon changes.
+       * rcs.h: Declare it.
+       * admin.c (admin_fileproc): Use it instead of RCS_reparsercsfile.
+
+       * commit.c (commit_fileproc): Fix memory leaks.
+       * patch.c (patch_fileproc): Ditto.
+       * rcs.c (RCS_nodeisbranch, RCS_copydeltas): Ditto.
+       * tag.c (tag_fileproc): Ditto.
+       * update.c (update): Ditto.
+
+2000-06-09  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_reparsercsfile, RCS_fully_parse, getdelta,
+       RCS_getdeltatext): Handle newphrases with composite values.
+       (rcsbuf_getkey): Don't remove @s in composite values -- it makes
+       it impossible to parse the value!  Set special flag to indicate
+       a composite value.
+       (rcsbuf_valcopy, rcsbuf_valpolish_internal): Handle composite values.
+       (putrcsfield): Write composite values.
+       (RCS_checkin): Set node types in other_delta list.
+       * hash.h: Add RCSCMPFLD.
+       * hash.c (nodetypestring): Ditto.
+
+       * rcs.c (getdelta): Never allocate space for value, just return
+       pointer into rcsbuf (fixes memory leaks).  Use rcsbuf_getkey to
+       read a key and value and then parse the value if needed rather
+       than trying to read it in bits and pieces with rcsbuf_getid,
+       rcsbuf_getstring, and rcsbuf_getword.
+       (RCS_reparsercsfile): Change callers to compensate.
+       (rcsbuf_valcmp, rcsbuf_valword): New functions.
+       (rcsbuf_getid, rcsbuf_getstring, rcsbuf_getword): Deleted.
+       * sanity.sh (rcs3-1): Now get slightly different error message.
+
+2000-06-08  Larry Jones  <address@hidden>
+
+       * main.c (usg): Update CVS home page URL.
+
+       * main.c (main): Provide an actual error message for an unknown
+       command in addition to the usage message.
+
+2000-06-07  Larry Jones  <address@hidden>
+
+       * server.c (serve_root, dirswitch, serve_repository,
+       serve_static_directory, serve_sticky, receive_partial_file,
+       receive_file, serve_modified, server_write_entries, serve_notify,
+       serve_checkin_prog, serve_update_prog, server): Don't set
+       pending_error before calling alloc_pending, it makes it fail;
+       use alloc_pending instead of malloc when reasonable; be sure to
+       save errno before calling functions that might change it.
+       (Patch submitted by Dietmar Petras <address@hidden>.)
+
+2000-06-03  Larry Jones  <address@hidden>
+
+       * commit.c (checkaddfile): Plug memory leak.
+       * rcs.c (RCS_checkin): Plug memory leaks.
+       * server.c (do_cvs_command): Plug file descriptor leaks.
+       * tag.c (check_fileproc): Plug memory leak.
+
+2000-05-26  Larry Jones  <address@hidden>
+
+       * recurse.c (unroll_files_proc): Plug memory leak.
+
+       * recurse.c (addfile): Fix nonportable pointer cast.
+
+       * rcs.c (rcsbuf_getstring, rcsbuf_getword, getdelta): Plug memory
+       leaks.
+
+2000-05-25  Larry Jones  <address@hidden>
+
+       * checkout.c (checkout, build_one_dir, checkout_proc): Move m_type
+       to file scope and use it instead of continually doing strcmp on
+       command_name.
+       (build_one_dir, checkout_proc): Don't allow export if CVSADM
+       directory already exists.
+
+2000-05-23  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_checkin, RCS_cmp_file): Plug memory leaks.  (Patch
+       submitted by Chris G. Demetriou <address@hidden>.)
+
+2000-05-20  Ian Lance Taylor  <address@hidden>
+
+       * client.c (connect_to_gserver): Handle server error messages
+       reasonably.
+
+2000-05-19  Larry Jones  <address@hidden>
+
+       * server.c (requests): Make Global_option RQ_ROOTLESS so it can be
+       used with init.
+
+2000-05-18  Larry Jones  <address@hidden>
+
+       * client.c (start_server): Don't do encryption, authentication,
+       compression, or case insensitivity when doing init because init
+       is ROOTLESS and they're not.
+
+       * client.c (connect_to_pserver): Include repository and username in
+       authorization failed message -- if a directory tree crosses multiple
+       repositories, it can be quite difficult for the user to figure out
+       which one is the problem.
+
+2000-05-17  Larry Jones  <address@hidden>
+
+       * main.c (main): Use full set of options when looking for -f to
+       avoid misparsing options that take values (previously, -sVAR=foo
+       was incorrectly parsed as though it were -s -V -A -R -= -f -o -o
+       because it didn't know that -s takes a value).
+       * sanity.sh (info-6b): New test for above.
+
+       * sanity.sh (conflicts-status): Fix tests so they work remotely, too.
+
+2000-05-17  Jim Meyering  <address@hidden>
+
+       * sanity.sh (TESTDIR): Fix braino in last change:
+       cd to /tmp before invoking pwd.
+
+       * sanity.sh: Set TESTDIR so that `make check' passes even when /tmp
+       is a symlink.
+       (join-36): Use $TESTDIR rather than hard-coding `/tmp/cvs-sanity'.
+       (conflicts-132): Remove unnecessary `rm aa'.
+
+2000-05-16  Jim Kingdon  <address@hidden>
+
+       * cvs.h, checkout.c (safe_location): Make extern.
+       * import.c (import): Call it rather than reimplementing
+       (incompletely) the same check.
+
+2000-05-16  Larry Jones  <address@hidden>
+
+       * rcs.h, subr.c (file_has_markers): Check for any of the three
+       conflict marker lines, not just one.
+       * sanity.sh (conflicts-status): New tests for above.
+       * sanity.sh: Revise to avoid tripping the above check when merging
+       changes into sanity.sh itself.
+
+2000-05-15  Larry Jones  <address@hidden>
+
+       * update.c (join_file): When registering the result of the merge,
+       make sure that the version number is valid (vers->vn_rcs may be
+       null if the file doesn't exist on the branch yet).  (Patch submitted
+       by Robert de Vries <address@hidden>.)
+       * update.c (join_file): Correct diagnostics (previous change was not
+       correct -- the file *does* exist in the specified revision, it just
+       doesn't exist in the sandbox).
+       * sanity.sh (import-113, join): New tests and changes for above.
+
+2000-05-04  Larry Jones  <address@hidden>
+
+       * sanity.sh: Look for a useful id program.  Since we're getting
+       the real username for some tests anyway, use it for all the
+       tests instead of a generic regular expression that may or may
+       not match the actual username.
+
+2000-05-04  Larry Jones  <address@hidden>
+
+       * server.c: More error messages.
+
+2000-05-02  Donald Sharp <address@hidden>
+       and Larry Jones  <address@hidden>
+
+       * history.c (report_hrecs): Added code to print out year instead of
+       just month/day.
+       * sanity.sh (basic2-64, history): Update to match.
+
+2000-04-19  Larry Jones  <address@hidden>
+
+       * server.c (dirswitch): Set pending_error_text in addition to
+       pending_error to aid in problem determination.
+
+2000-03-23  Larry Jones  <address@hidden>
+
+       * mkmodules.c (mkmodules): Return without doing anything if noexec
+       is set to avoid trashing existing files.
+
+2000-03-23  Larry Jones  <address@hidden>
+
+       * main.c: Alphabetize cmds[] and cmd_usage[] and add server
+       commands to cmd_usage[].
+
+2000-03-21  Larry Jones  <address@hidden>
+
+       * sanity.sh (client-1): May get "Broken pipe" message from the
+       "server" in addition to the expected output.
+
+2000-03-17  Larry Jones  <address@hidden>
+
+       * server.c (switch_to_user): Set CVS_Username if it hasn't already
+       been set elsewhere.  (Patch submitted by Gordon Matzigkeit
+       <address@hidden>).
+
+2000-03-13  Larry Jones  <address@hidden>
+
+       * parseinfo.c: Add extern to logHistory declaration.  (Reported by
+       <address@hidden>.)
+       (parse_config): Reformat logHistory code.
+
+2000-03-10  Larry Jones  <address@hidden>
+
+       * add.c (add): Don't try to set cvsroot_len until after checking
+       for help only -- CVSroot_directory isn't set in that case.
+
+2000-03-03  Larry Jones  <address@hidden>
+
+       * mkmodules.c (init): Use mkdir_if_needed to create CVSROOT/Emptydir
+       so we don't fail if run multiple times.  (Reported by KOIE Hidetaka
+       <address@hidden>.)
+       * sanity.sh (1a): New test for above.
+
+2000-03-02  Larry Jones  <address@hidden>
+
+       * main.c: Use identical #if's in the command table and the code
+       for pserver and kserver to prevent "peculiar" configurations from
+       having really perverse behavior because the command table entries
+       are present but the related code isn't.
+
+2000-03-01  Larry Jones  <address@hidden>
+
+       * import.c (import): Don't allow importing the repository.
+       * sanity.sh (errmsg2-20, errmsg2-21): New tests for above.
+
+2000-03-01  Larry Jones  <address@hidden>
+
+       * main.c (main): Update year in copyright message.
+
+2000-03-01  Larry Jones  <address@hidden>
+
+       * logmsg.c (do_editor): Correct previous change.
+
+2000-02-29  Larry Jones  <address@hidden>
+
+       * logmsg.c (do_editor): When reading temp file, check that message
+       buffer is large enough to hold the next line and expand if needed.
+
+2000-02-28  Larry Jones  <address@hidden>
+
+       * commit.c (commit): Use get_file() to read log file correctly
+       and in text mode rather than binary mode.
+
+       * subr.c (get_file): Ignore bufsize if buf is NULL.  Include
+       terminating NUL byte when estimating required buffer size.
+
+2000-02-28  Larry Jones  <address@hidden>
+
+       * sanity.sh (find_tool): New function to replace duplicated code.
+
+2000-02-25  Larry Jones  <address@hidden>
+
+       * import.c (add_rcs_file): Don't abort just because lstat fails.
+
+2000-02-16  Jim Meyering  <address@hidden>
+
+       Avoid race condition whereby a catchable signal could
+       end up corrupting the repository.
+       * commit.c (checkaddfile): Put a critical section around the code
+       that handles the first commit on the trunk of a file that's already
+       been committed on a branch.
+       * cvs.h (Sig_inCrSect): Declare new function.
+
+2000-02-21  Karl Fogel  <address@hidden>
+
+       * main.c (main): still check for repository, but not history file
+       (correction to 2000-02-18 change -- that's what I get for
+       believing the comment rather than the code).
+
+2000-02-21  K.J. Paradise <address@hidden>
+
+       * history.c mkmodules.c parseinfo.c: control which actions
+       get logged to the cvs history file via CVSROOT/config file
+       and LogHistory keyword. (John P Cavanaugh <address@hidden>)
+
+2000-02-18  Karl Fogel  <address@hidden>
+
+       * history.c (history_write): don't die if history file not
+       writable, just warn (unless `really_quiet') and skip out.
+
+       * main.c (main): don't bother checking if history file is
+       writable.
+
+       * server.c (serve_root): same.
+
+2000-02-17  Larry Jones  <address@hidden>
+
+       * sanity.sh (perms symlinks symlinks2 hardlinks): Don't run by
+       default since PreservePermissions code is now disabled.
+
+2000-02-17  Larry Jones  <address@hidden>
+
+       * sanity.sh (import-113): Revise to match Jim Meyering's fix.
+
+2000-02-16  Larry Jones  <address@hidden>
+
+       * add.c (add): Don't allow adding files or directories to Emptydir.
+       (Patch submitted by Chris Cameron <address@hidden>.)
+       * sanity.sh (emptydir): Revise (emptydir-7 and emptydir-8) for this.
+
+2000-02-16  Jim Meyering  <address@hidden>
+
+       * update.c (join_file): Correct typo in diagnostic:
+       change `file %s is present...' to `file %s is not present...'.
+
+2000-02-10  Larry Jones  <address@hidden>
+
+       * parseinfo.c (Parse_Info): Treat matching lines with bad expansions
+       as errors rather than just ignoring.
+
+2000-02-10  Larry Jones  <address@hidden>
+
+       * edit.c (edit): Check for invalid characters in hostname and CurDir.
+       (Reported by "Andrew S. Townley" <address@hidden>.)
+       * sanity.sh (devcom2): New tests for above.
+
+2000-02-10  Larry Jones  <address@hidden>
+
+       * cvs.h: Always #include "server.h" to prevent compile errors when
+       neither CLIENT_SUPPORT nor SERVER_SUPPORT is defined.
+       (Reported by "Crow, Ian" <address@hidden>.)
+       * log.c (send_one, send_arg_list): Only define when CLIENT_SUPPORT
+       is defined to prevent link errors.
+
+       * server.c (server): Always create a new temporary directory, don't
+       try to reuse an existing one since we might not have correct
+       permissions.  Also, include directory name in error messages.
+
+2000-01-29  Jim Kingdon  <http://developer.redhat.com/>
+
+       * ignore.c (ignore_files): Correctly set errno to 0 when we go
+       back to the top of the loop.  Fixes spurious errors like "cvs
+       update: error reading current directory: No such file or
+       directory".
+
+2000-01-26  Larry Jones  <address@hidden>
+
+       * run.c (run_exec): Conditionalize K.J.'s change so that it only
+       applies when SETXID_SUPPORT is defined since some platforms don't
+       have setegid().
+
+2000-01-26  Larry Jones  <address@hidden>
+
+       * sanity.sh: Make TESTDIR earlier then use it to check for versions
+       of expr that don't work right with long expressions.
+
+       * sanity.sh (dotest_line_by_line): Have wc read from stdin so it
+       doesn't output the file name and confuse expr.  Make the output a
+       bit less verbose and easier to read.
+
+2000-01-24  K.J. Paradise <address@hidden>
+
+       * run.c :> prevents a user from creating a privileged shell from the
+       text editor when the SETXID_SUPPORT option is selected.  This came from
+       Bob Colle <address@hidden>, and is his completely.
+
+2000-01-22  Jim Kingdon  <http://developer.redhat.com/>
+
+       * sanity.sh (emptydir): Add a case in which one might hope for a
+       non-Emptydir result, but which result?
+
+2000-01-18  Larry Jones  <address@hidden>
+
+       * main.c (main): Allow -z0 to disable gzip compression.
+
+2000-01-17  Larry Jones  <address@hidden> for
+       K.J. Paradise (address@hidden)
+
+       * version.c: Push version number to 1.10.8.1.
+
+       * version.c: Version 1.10.8.
+
+2000-01-17  Larry Jones  <address@hidden>
+
+       * mkmodules.c (init): Create CVSROOT/Emptydir to avoid problems
+       with users not having sufficient permissions to create it later.
+
+2000-01-04  Larry Jones  <address@hidden>
+
+       * client.c (get_responses_and_close): Simplify time-stamp race
+       avoidance code.
+       * commit.c (commit): Ditto.
+       * update.c (do_update): Ditto.
+       (Prompted by patch submitted by Pavel Roskin
+       <address@hidden>.)
+
+       * hardlink.c: sizeof (char) is 1, by definition.
+       * logmsg.c: Ditto.
+       * rcs.c: Ditto.
+
+2000-01-03  Karl Fogel  <address@hidden>
+
+       * filesubr.c, subr.c (backup_file): moved this function from
+       filesubr.c to subr.c, at JimK's suggestion.
+
+2000-01-03  Jim Kingdon  <http://developer.redhat.com/>
+
+       * sanity.sh (clean): Test the contents of the .#cleanme.txt.1.1
+       file, not just its existence.
+
+2000-01-03  Karl Fogel  <address@hidden>
+
+       * cvs.h, filesubr.c (backup_file): use `const' for suffix too;
+       correct suffix length calculation and appending behavior; discard
+       unnecessary `void' cast.  Thanks to Jim Meyering for noticing.
+
+2000-01-03  Larry Jones <address@hidden>
+
+       * sanity.sh (clean): Fix up expected output.
+
+2000-01-02  John P Cavanaugh <address@hidden>
+        and Karl Fogel <address@hidden>
+
+       New -C option to update: overwrites local changes with clean
+       copies from the repository.  (This is an unreversion of the
+       1999-12-10 change, further modified to work remotely.)
+
+       * client.h (BACKUP_MODIFIED_FILES): new #define.
+
+       * client.c (struct send_data): new element `backup_modified'.
+       (send_files): set above element if BACKUP_MODIFIED_FILES flag is
+       present.
+
+       * filesubr.c (backup_file): new function.
+
+       * cvs.h: prototype for new function `backup_file'.
+
+       * update.c (toss_local_changes): new file-scoped global.
+       (update): set toss_local_changes if -C flag seen.  If
+       client_active, send "-C" to server, and set SEND_NO_CONTENTS and
+       BACKUP_MODIFIED_FILES flags before calling send_files().
+
+       (update_fileproc): if file is modified and toss_local_changes is
+       set, then back the file up and then check out a fresh copy from
+       the repository.  Also, fixed indentation and formatting for a
+       particularly bad stretch of code near (but unrelated to) these
+       changes.
+
+       * sanity.sh: new test `clean', for update -C option.
+
+1999-12-29  Jim Kingdon  <http://developer.redhat.com/>
+
+       * history.c (read_hrecs): st_blksize is unsigned long, not int.
+       This isn't just cosmetic - getting it wrong will cause coredumps
+       and such on 64 bit machines.
+
+       * import.c (import_descend), ignore.c (ignore_files): Placate gcc
+       -Wall by parenthesizing foo || (bar && baz).
+
+1999-12-24  Larry Jones <address@hidden>
+
+       * release.c (release): Use fputs to echo lines from update instead
+       of printf to avoid problems with lines containing "%".  (Reported
+       by Jean-Luc Simard <address@hidden>.)
+
+       * history.c (read_hrecs): Allocate a single 2-block buffer instead
+       of allocating and freeing a buffer for each block.
+       (fill_hrec): Remove redundant code.
+       (select_hrec): Plug memory leak.
+
+1999-12-22  Larry Jones <address@hidden>
+
+       * history.c (history): For "modified" or "checkout", sort on
+       file if user specified -l, even if user also specified a date-
+       oriented flag.
+       * sanity.sh (history): Update to match; add new tests.
+
+1999-12-15  Pavel Roskin <address@hidden>
+       and Larry Jones <address@hidden>
+
+       * lock.c (lock_name): fixed assertion failure for the
+       top-level CVS directory when LockDir is used
+       * sanity.sh (lockfiles-9): new test for this case
+
+1999-12-11  Karl Fogel  <address@hidden>
+
+       * Revert previous change -- it doesn't work remotely yet.
+
+1999-12-10  John P Cavanaugh <address@hidden>
+        and Karl Fogel <address@hidden>
+
+       * update.c: new -C option to update, overwrites local changes with
+       clean copies from the repository.
+       Also, fixed indentation and formatting for a particularly bad
+       stretch of code near these changes in update_fileproc().
+
+       * sanity.sh: test new update -C option.
+
+1999-12-10  Larry Jones <address@hidden>
+
+       * commit.c (remove_file): Call history_write with update_dir NULL
+       like Checkin() does for add and modify.
+       * sanity.sh (basic2-64): Update to match, add "R" records to expected
+       remote output.
+
+1999-12-09  K.J. Paradise (address@hidden)
+
+       * history.c, commit.c, sanity.sh: found (I think) final
+       cause of seg fault in history command.  Also, added the "R"
+       history functionality.  Fixed basic2-64 so it looks correct for
+       the change.
+
+1999-11-30  K.J. Paradise (address@hidden)
+
+       * history.c: fixed seg fault caused by 11-03 changes.
+       off by one in block memory allocations.
+
+1999-11-29  Karl Fogel  <address@hidden>
+
+       * login.c (logout): free `tmp_name' when done.
+       Correct a comment.
+
+1999-11-29  Larry Jones <address@hidden>
+
+       * cvs.h, error.c, import.c: Rename fperror to avoid name clash
+       on LynxOS.  (Reported by Markus Braun <address@hidden>.)
+
+1999-11-23  Larry Jones <address@hidden>
+
+       * checkout.c (checkout_proc): Split declaration and initialization
+       of rp to placate neurotic compilers that gripe about jumping past
+       an initialization, even when the variable is not subsequently used.
+
+1999-11-19  Larry Jones <address@hidden>
+
+       * server.c (switch_to_user): Correct setgid error messages.
+
+1999-11-19  Karl Fogel  <address@hidden>
+
+       * edit.c (unedit_usage, unedit): new struct, use it.  Now "cvs
+       unedit" prints an accurate usage message (formerly it printed the
+       message for "cvs edit", even though the two commands do not have
+       identical usages).
+
+1999-11-19  Larry Jones <address@hidden>
+
+       * history.c: Move -e documentation from Flags to Reports.
+       (history): Add -e to list of report types in error message.
+
+       * history.c (history): Process file arguments before client/server
+       processing so they get sent to the server.
+       * sanity.sh (history): New tests for above.  (Also remove comments
+       about variable spacing -- history output is in variable-width
+       columns with exactly one space between.)
+
+1999-11-19  Larry Jones <address@hidden>
+
+       * sanity.sh: Reestablish check for running as root (using ``id -u''
+       instead of ``whoami'').
+
+       * sanity.sh(dotest, dotest_lit, dotest_fail, dotest_status,
+       dotest_sort): Eval the command so quoting and pipes work right.
+       (spacefiles, dirs, rcslib, modules, unedit-without-baserev,
+       ignore, rcs, rcs2, history, tagdate, pserver, server, server2)
+       Simplify various tests based on above.
+
+1999-11-19  Karl Fogel  <address@hidden>
+
+       * mkmodules.c (init): make history file world-writeable after
+       creating it, since it needs to be writeable for virtually any
+       CVS operation.
+
+1999-11-10  Jim Kingdon  <http://developer.redhat.com/>
+
+       * admin.c: Revert change to add -H command option.  The help
+       invocation is "cvs -H admin" not "cvs admin -H" (see cvs.texinfo,
+       basicb-21 in sanity.sh; fix to cvs.1)
+
+1999-11-08  Jim Kingdon  <http://developer.redhat.com/>
+
+       * log.c (cvslog): If client_active, send options to the server
+       based on our parsed options rather than trying to send the exact
+       strings specified (using canonical forms, like RFC822/1123
+       dates, in the protocol is just cleaner).
+       (send_one, send_arg_list): New functions, helpers for above.
+       * sanity.sh (logopt-6a): New test, for this fix.
+
+1999-11-09  K.J. Paradise <address@hidden>
+
+       * admin.c: made the -H option do what it is documented to
+       do.  a
+
+1999-11-08  Tom Tromey  <address@hidden>
+
+       * client.c (connect_to_gserver): Print more error text if gssapi
+       initialization fails.  From Assar Westerlund <address@hidden>.
+
+1999-11-06  Larry Jones <address@hidden>
+
+       *sanity.sh(rcs3-5): Remote output can be out-of-order, so need a
+       more general pattern to match the assertion failure.
+
+1999-11-05  K.J. Paradise (address@hidden)
+
+       * history.c: Added a trap to verify that if a
+       read(file, buffer,blocksize) returns less than blocksize,
+       that we really are at the end of the file.  I can't easily
+       come up with a test case where this code gets touched, so
+       it may cause problems.  All sanity tests still pass though.
+
+1999-11-05  Jim Kingdon  <http://developer.redhat.com/>
+
+       * sanity.sh (logopt): New test, for Larry's fix.
+       * sanity.sh (log-18a, rcs-15 to rcs-19): New tests, to test -d
+       and -r more thoroughly.
+
+1999-11-05  Larry Jones <address@hidden>
+
+       * log.c (cvslog): Fix -s and -d with spaces on client side.
+       (log_usage): Revert Karl's change once again.
+       sanity.sh(rcs3-5): No longer get different results from local
+       and client/server.
+
+1999-11-04  Karl Fogel  <address@hidden>
+
+       * log.c (log_usage): Revert Jim Kingdon's reversion of my change
+       of 1999-11-03.  Allowing a space between option and argument
+       results in lossage; here is a reproduction recipe: run this from
+       the top of a remote copy of the cvs source tree
+
+          cvs log -d '>1999-03-01' > log-out.with-space
+
+       and then run this (note there's no space after -d now):
+
+          cvs log -d'>1999-03-01' > log-out.no-space
+
+       The resulting files differ; furthermore, a glance at the output of
+       cvs shows that the first command failed to recurse into
+       subdirectories.  Until this misbehavior can be fixed in the source
+       code, the documentation should reflect the true state of affairs:
+       if one simply omits the space, everything works fine.
+
+1999-11-04  Jim Kingdon  <http://developer.redhat.com/>
+
+       * log.c (log_usage): Revert Karl's change regarding -d and
+       -s.  A space is allowed (see sanity.sh for example).
+
+1999-11-03  K.J. Paradise (address@hidden>
+
+       * history.c: cleaned up my prior change a bit, per Larry Jones'
+       comments, and John O'Conner's additional comments about bits of
+       non MS-Visual C++ compliancy of my code.
+
+1999-11-04  Larry Jones <address@hidden>
+
+       * sanity.sh: Check that tr that correctly handles NULs; if not, try
+       to find a version that does; if none can be found, warn user.
+       Also fix warnings for defective expr.
+
+1999-11-04  Karl Fogel  <address@hidden>
+
+       Changes for empty/random passwords in anon pserver access:
+
+       * server.c (check_repository_password): if password empty, grant
+       access no matter what password is received; this is so anon CVS no
+       longer requires a password but remains backwards-compatible with
+       all those clients out there.
+
+       * client.c (connect_to_pserver): proceed with login even if
+       password not found in .cvspass file -- just use empty string as
+       password.  And if such a login fails, print a descriptive error.
+
+       * login.c (get_cvs_password): don't complain if file or password
+       not found.  That condition is no longer a showstopper, now that
+       empty passwords are permissible.
+       Cleaned up conditional chaining a bit, too.
+
+       * sanity.sh (pserver-9, pserver-10, pserver-11, pserver-12,
+       pserver-13): new tests, about empty-password pserver access.
+
+1999-11-03  K.J. Paradise (address@hidden>
+
+       * history.c:  modify parsing routines to parse the history
+       file a block at a time, rather than all at once.  This allows
+       people with large history files and small amount of memory
+       to still get some functionality out of the history file.
+
+1999-11-03  Karl Fogel  <address@hidden>
+
+       * log.c (log_usage): correct usage message for -d and -s options.
+       Because the space between the option letter and its argument has
+       been eliminated, I capitalized the argument portion to distinguish
+       it from the option letter.  This makes it slightly inconsistent
+       with other such usage summaries, but at least it is now both
+       correct and readable.
+
+1999-10-22  Larry Jones  <address@hidden>
+
+       * sanity.sh (dotest_sort): Old versions of tr don't understand \t
+       so use a literal tab instead.
+
+1999-10-21  Larry Jones  <address@hidden>
+
+       * sanity.sh (dotest_sort): Convert any tabs in the output into spaces
+       before sorting to avoid POSIX.2 sort weirdness.
+       (import-106, importb-2): Change expected output per above.
+
+1999-10-18  K.J. Paradise <address@hidden>
+
+       Bug: users 'stan' and 'cartman' both have full read/write access
+       to the cvs repository.  'cartman' does a 'cvs admin -l foo.c'.
+       'stan' then does a 'cvs admin -u foo.c'.  The lock wouldn't be
+       removed, and no warning/error would be given.  This is now fixed.
+       * rcs.c:(c.6157) remove caller/user check on the multiple lock
+        detection routines.  Sanity.sh runs with no errors after this fix.
+
+1999-10-14  Larry Jones  <address@hidden>
+
+       Make "cvs admin -e" (with no list of users) work:
+       * admin.c (admin): Remove error message.
+       (admin_fileproc): If no args for -e, call RCS_delaccess with NULL user.
+       * rcs.c (RCS_delaccess): Interpret NULL user as request to delete
+       entire access list.
+       * sanity.sh (admin-19a-*): Test.
+
+1999-09-29  Larry Jones  <address@hidden>
+
+       * entries.c (Subdirs_Known): Use entfilename when opening CVSADM_ENTLOG
+       like everywhere else.  Although this isn't strictly necessary (since
+       we immediately close it again), it keeps the code consistent and fixes
+       a bug where an open error reported the wrong file name.
+
+1999-09-16  Larry Jones  <address@hidden>
+
+       * log.c (log_parse_revlist): Handle peculiar revision specs like
+       "-r.", "-r:", and "-r," correctly.  (Thanks to Pavel Roskin
+       <address@hidden> for submitting a patch, this fix is
+       somewhat different.)
+       * sanity.sh (log): New tests for above.
+
+1999-09-15  Larry Jones  <address@hidden>
+
+       * sanity.sh (basica-8b1): New test to check fix for bad diff options
+       causing cvs to crash.
+
+1999-09-02  Larry Jones  <address@hidden>
+
+       * modules.c (do_module): Handle case where module definition has
+       options and special options but no directory; fix potential problems
+       running off beginning of string while stripping trailing blanks.
+       * sanity.sh (modules2): New tests for above.
+
+1999-08-26  Larry Jones  <address@hidden>
+
+       * lock.c (lock_name): Remove side-effects from assert() expression
+       since they won't occur if NDEBUG is defined (not that that's a good
+       thing to do).  (Reported by KOIE Hidetaka <address@hidden>.)
+
+1999-08-25  Larry Jones  <address@hidden>
+
+       * sanity.sh: Use "${AWK}" instead of "awk" to make it easier for
+       people to use nawk/gawk/etc.; use an explicit "-print" with find
+       since some older version don't assume it; rename tests to avoid
+       duplicate importc-8.  (Changes along these lines suggested by
+       Chris Cameron <address@hidden>.)
+
+1999-08-24  Larry Jones  <address@hidden>
+
+       * commit.c (check_fileproc): Don't crash when a file has no
+       repository, just treat it as unknown.  (Reported by Stefaan
+       Diericx <address@hidden>.)
+       * sanity.sh (errmsg2): New tests, for this fix.
+
+1999-08-18  Larry Jones  <address@hidden>
+
+       * update.c (special_file_mismatch): Initialize *_hardlinks to
+       avoid trying to free garbage later on.  (Reported by Jan
+       Scheffczyk <address@hidden>.)
+
+1999-08-17  Larry Jones  <address@hidden>
+
+       * sanity.sh (basicc-11): Older versions of sh don't understand
+       ``if ! test...''.  (Patch submitted by David J N Begley
+       <address@hidden>.)
+
+1999-08-17  Larry Jones  <address@hidden>
+
+       * client.c, hardlink.c, hash.c, hash.h, main.c, recurse.c: Change
+       enum constant UNKNOWN to avoid conflicts on HPUX 11.0.  (Reported
+       by Laurent Duperval <address@hidden>.)
+
+1999-08-16  Larry Jones  <address@hidden>
+
+       client.c: Eliminate redundant #if.  (Patch submitted by Assar
+       Westerlund <address@hidden>.)
+
+1999-07-30  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_checkin): Terminate cleanly if RCS_addbranch fails
+       rather than blithely continuing on and crashing.
+       * sanity.sh (basica): New tests, for this fix.
+
+1999-07-29  Larry Jones  <address@hidden>
+
+       * import.c (add_rcs_file): change "cannot lstat" message to include
+       userfile (the actual file causing the problem) instead of user
+       (which may or may not be the same).
+
+1999-07-29  Eric Sink   <address@hidden>
+
+       * version.c: Push version number to 1.10.7.1.
+
+       * version.c: Version 1.10.7.
+
+1999-07-28  Eric Sink   <address@hidden>
+
+       * sanity.sh: before running basicc-11, we need to see if
+       the cwd has been deleted (by basicc-8).  If so, we
+       recreate it to allow basicc-11 to proceed.  This may be
+       something that only happens under the Linux 2.2 kernel.
+
+1999-07-18  Karl Fogel  <address@hidden>
+
+       * edit.c (notify_do): chop newline, if any, from the value
+       obtained from CVSROOT/users.  Otherwise it just gets passed along
+       in the argument to the notification program (usually mail), which
+       will misinterpret it as signifying the end of the command.
+
+1999-07-19  Larry Jones  <address@hidden>
+
+       * rcs.c (RCS_delete_revs): In the WIN32 kludge, be sure that the result
+       of RCS_getexpand is not NULL before trying to use what it points to.
+       (Patch submitted by Timothy L. Taylor <address@hidden>.)
+
+1999-07-16  Tom Tromey  <address@hidden>
+
+       * admin.c (admin): Allow `-k' options to be used unrestricted.
+
+1999-06-23  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (symlinks2): New test, for symlinks in working
+       directory without PreservePermissions.  This test (modulo a few
+       details not relevant to testing whether we are following symlinks)
+       worked remote as of now, or either remote or local for CVS 1.9.
+       * subr.c (get_file): Revert 1998-02-15 change to special-case
+       symlinks.  This makes the above test work local too.
+       * rcs.c (RCS_checkin): Move the logic to handle special-case
+       symlinks (and other files other than regular files) here, and make
+       it only happen if PreservePermissions is on.
+
+1999-06-18  Larry Jones  <address@hidden>
+
+       * sanity.sh (devcom3-9a): Be less specific about the expected
+       error message (BSD/OS 4.0 has a bug that can cause exec* to fail
+       with EACCES instead of ENOENT).
+
+1999-06-08  Larry Jones  <address@hidden>
+
+       * sanity.sh (diff-4, dirs2-10, tagf-13, importc-7, conflicts2-142b8):
+       Use ${PROG} instead of "cvs".
+
+1999-06-05  Jim Kingdon  <http://www.cyclic.com>
+
+       * recurse.c (do_recursion, do_dir_proc): Make the SERVER_ACTIVE
+       #ifdef be only around the check for server_active.  Modulo a few
+       cosmetic tweaks, same as a patch submitted by Johannes Stezenbach
+       of propack-data.de.
+
+1999-06-01  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh: Add comment about rcs2-7 failures on certain days.
+
+       Make "cvs status -v" on a removed file work:
+       * status.c (cvsstatus): Reindent the client code.
+       (status_fileproc): Don't need a CVS/Entries listing to show the
+       tags.
+       * sanity.sh (rmadd2): New test rmadd2-16 tests the existing
+       behavior with "cvs log"; new test rmadd2-17 tests the new behavior
+       with "cvs status".
+
+       * sanity.sh (basicc): To match no output in dotest, put the empty
+       regexp first.  Remove tests which check that first-dir exists,
+       since that isn't true in the case where the OS let us delete it.
+       (dotest_internal): Fix so that things work with two regexps, with
+       an empty one first.
+
+1999-05-28  Larry Jones  <address@hidden>
+
+       * sanity.sh (server-4): Replace bogus directory with real one since
+       the server now checks it.
+
+1999-05-27  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (spacefiles): Clean up -c, top, and -b at end.
+       (spacefiles, files): Fix bad references to CVSROOT_DIRNAME.
+
+       Fix two problems pointed out by Olaf Kirch of swb.de/caldera.de:
+       * server.c (outside_root): New function, contains expanded version
+       of code from serve_directory.
+       (serve_directory): Call outside_root.
+       (outside_dir): New function
+       (serve_modified, serve_is_modified, serve_notify,
+       serve_questionable, serve_unchanged): Call outside_dir.
+       * sanity.sh (server2): New tests, for these fixes.
+
+1999-05-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * cvs.h, subr.c (xmalloc): Return void* not char*, like xrealloc
+       has done for some time.
+       * modules.c (do_module): If we find the module as a directory/file
+       (rather than in the modules file), skip a bunch of processing
+       which was unnecessary and also broken in most of the cases
+       now tested for by the spacefiles sanity.sh test.
+       * sanity.sh (spacefiles): New test, for specifying filenames
+       (containing spaces, or starting with '-', or starting with '/') to
+       "cvs co".
+
+1999-05-25  Jim Kingdon  <http://www.cyclic.com>
+
+       * client.c (update_entries): Make the old DONT_USE_PATCH code the
+       only code.  This means that if people are still on CVS 1.9
+       servers, then CVS will fall back to transferring entire files.
+       This is better than looking for an external "patch" program which
+       causes no end of troubles (especially on Windows, but someone just
+       posted to info-cvs about a problem with the Solaris patch).  (This
+       change was run by devel-cvs and feedback was positive).
+
+       * subr.c (xmalloc, xrealloc): The new error.c does not support
+       %lu; use sprintf instead.
+
+1999-05-25 Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * sanity.sh (server): Escaped a few more newlines in
+       another awk script.  Solaris awk still don't like 'em.
+
+1999-05-25 Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+       and Jim Kingdon
+
+       * log.c: Remove comment which said "you can delete [this line]"
+       and which stuck around for over 3 years.
+       * sanity.sh (errmsg2 & tagdate): Added tests to prove the
+       current functionality with respect to combining -r and -D.
+
+1999-05-20  Larry Jones  <address@hidden>
+
+       * server.c (pserver_authenticate_connection): Previous changes
+       broke verify_and_exit (reported by Robert Fitzsimons, thanks).
+       * sanity.sh (pserver): New tests pserver-7 and pserver-8 for this.
+
+1999-05-18 Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * sanity.sh (keyword2): Escaped a newline in an awk script.
+       Apparently Solaris awk don't like 'em.
+
+1999-05-18  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (basicc): Allow the behavior whereby unlink(".")
+       succeeds.  Reported by Jeremy Buhler and Pavel Roskin.
+
+1999-05-17  Steve Cameron of Compaq
+
+       * sanity.sh: Modified to no longer use "test -e" for existence
+       test as it has turned out to be not portable enough.  Instead use
+       "test -f", "test -d", etc.
+       [SCO Unixware 7 apparently doesn't always support it -kingdon]
+
+1999-05-17  Jim Kingdon  <http://www.cyclic.com>
+
+       * version.c: Push version number to 1.10.6.1.
+
+       * version.c: Version 1.10.6.
+
+1999-05-16  Jim Kingdon  <http://www.cyclic.com>
+
+       * update.c (patch_file): When we are passing vn_rcs to
+       RCS_checkout, pass vn_tag as well.
+       * sanity.sh (keyword): In test keyword-22, test for the fixed
+       behavior rather than the buggy behavior.  Adjust keyword-23.  Add
+       test keyword-24, to see whether keyword-23 really worked.
+
+1999-05-12  Larry Jones  <address@hidden>
+
+       * sanity.sh (pserver-4, pserver-5): Bogus error messages from
+       non-root initgroups on some 4.4BSD derived systems now show up
+       in different places in the output.
+
+1999-05-12  Jim Kingdon  <http://www.cyclic.com>
+
+       * import.c (import): Don't allow the user to supply a repository
+       directory which takes us out of the cvsroot.
+       * sanity.sh (importc): New tests importc-10 to importc-12, for this.
+
+1999-05-11  Larry Jones  <address@hidden>
+
+       * server.c (serve_notify): Allocate enough memory to hold the
+       "misformed Notify request" message in pending_error_text.
+
+1999-05-11  Jim Kingdon  <http://www.cyclic.com>
+
+       * server.c (switch_to_user): Ignore EPERM from initgroups.  Fixes
+       pserver-4 in testsuite.
+       (pserver_authenticate_connection): Only print "I LOVE YOU" after
+       switch_to_user has come back successfully.
+
+       * server.c (pserver_authenticate_connection): Call error_exit
+       rather than reinventing the wheel ourselves.
+       (switch_to_user): Check for errors from setuid, setgid, and
+       initgroups.  Fix the #ifdef's (the previous code would skip the
+       setuid call if SETXID_SUPPORT).
+
+1999-05-10  Jim Kingdon  <http://www.cyclic.com>
+
+       * server.c (serve_notify), edit.c (notify_do): Check for
+       and reject characters which will get confused with delimiters.
+       * sanity.sh (server): New tests server-7 through server-15 test
+       for this and for other notify behaviors.
+
+       * rcs.c (RCS_tag2rev): Also look for a physical branch with
+       RCS_getversion.
+       * sanity.sh (tagf): Adjust tagf-12 and following tests to test for
+       the fixed behavior rather than the broken behavior.
+
+1999-05-07  Jim Kingdon  <http://www.cyclic.com>
+
+       * server.c (server_notify): Also set last_node to NULL.
+       * sanity.sh (server): New tests server-6 and server-7, for this.
+
+1999-05-05  Jim Kingdon  <http://www.cyclic.com>
+
+       * rcs.c (rcs_internal_lockfile): Remove unused variable lockfile.
+
+       * add.c (add): Look for directories with the same name in a
+       different case where appropriate (analogous to fopen_case).
+       In client code, add comment about how this doesn't do quite
+       everything.
+
+1999-05-03  Jim Meyering  <address@hidden>
+
+       Remove rcs-style ,file, lock files upon signal.
+       * rcs.c (rcs_lockfile): New file-scoped global.
+       (rcs_cleanup): New function (similar to patch_cleanup).
+       (rcs_internal_lockfile): Register rcs_cleanup the first time this
+       function is called.  Rename uses of local `lockfile' to refer to new
+       global, `rcs_lockfile'.  Don't free the lock file name string, now
+       that it's global.
+       (rcs_internal_unlockfile): Rename `lockfile', as above, and carefully
+       free and NULL-out the global, rcs_lockfile.
+
+1999-04-30  Jim Kingdon  <http://www.cyclic.com>
+
+       * rcs.c (annotate_fileproc): Don't cast NULL in passing it to
+       RCS_deltas.  Because there is a prototype in scope the cast is
+       unnecessary (per HACKING's ANSI C or SunOS4 rule), and in fact it
+       was causing failures on UNICOS because it cast to size_t instead
+       of size_t*.  (Thanks to Dean Kopesky for reporting this).
+
+1999-04-29  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh: If invoked without any arguments, print a usage
+       message (thanks to Pavel Roskin for a report/patch).
+
+       * run.c (piped_child): Make the error messages more verbose.
+       (close_on_exec): Reindent.
+       * sanity.sh (devcom3): Several errors are possible in devcom3-9a.
+       Adjust for change to piped_child error message.
+
+1999-04-28  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (devcom3): Add some tests of the CVS/Notify file and
+       disconnected "cvs edit".
+
+       * main.c (opt_usage): Remove -b.
+
+1999-04-20 Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * rcs.c (RCS_delete_revs):  RCS_delete_revs uses an
+       RCS_checkout call to get a new copy of a revision to be
+       used internally after old revisions were deleted and it was
+       performing keyword substitutions.  This munged all the
+       the revisions of the file on the branch containing the
+       deleted revisions and its sub-branches, as the original they
+       were being patched from was incorrect.  Corrected this by
+       passing in "-ko" as an option to RCS_checkout.
+       * sanity.sh (keywordlog):  modified this test to verify the
+       correct behavior of 'cvs admin -o'.
+       [Fixed use of \$ in keywordlog test; added code in RCS_delete_revs
+       to abort on binary file on Windows -kingdon]
+
+1999-04-21  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+       and Jim Kingdon
+
+       * tag.c (tag_check_valid): A bug was causing CVS to spin
+       indefinately when -j:<date> was specified.  CVS now returns
+       an error.
+       * sanity.sh: Added a test (tagdate-12) to test this.
+
+1999-04-19  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (backuprecover): Clean up the repository at the end.
+
+1999-04-18  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * sanity.sh added a test (backuprecover) to test cvs behavior
+       with a repository that is out of date relative to the
+       developer's workspaces.
+       [Fix --keep code; move test to "Repository Storage" section since
+       it doesn't really exercise the diff/diff3 library. -kingdon]
+
+1999-04-13  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * sanity.sh (diff):  Tests to verify correct operation of
+       the --ifdef parameter to cvs diff.
+       [indentation fixed -kingdon].
+
+1999-04-13  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+       for Noah Friedman  <address@hidden>
+
+        * diff.c (diff): Put "--ifdef=" in opts string, not "-D"; the
+        latter is confused by pserver for a date spec.
+
+1999-04-14  Jim Kingdon  <http://www.cyclic.com>
+
+       * fileattr.h: Adjust comments to reflect the official version of
+       the fileattr format now being in cvs.texinfo.
+
+1999-04-05  Jim Kingdon
+
+       * sanity.sh (watch5): Remove nonstandard --keep code.  Don't pass
+       -f to rm when cleaning up (that tends to mask bugs).  Add watch5
+       to list of tests at start.  Add comment explaining why we consider
+       the behavior we test for the right one.  Rename a few tests which
+       had been erroneously named watch6* instead of watch5*.
+       * client.c (update_entries): Add comment with brief discussion of
+       whether there is a better way.
+
+1999-04-05  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * client.c (update_entries):  Only call mark_up_to_date
+       (which deletes the CVS/Base/<filename> file for watched
+       and edited files) on commit.
+       * sanity.sh:  Make sure the CVS/Base/<filename> file for
+       a watched and edited file is not removed on a status or
+       update of a touched/unmodfied file.
+
+1999-03-30  Larry Jones  <address@hidden>
+
+       * client.c (get_responses_and_close), commit.c (commit),
+       update.c (do_update): If the sleep(1) call returns prematurely
+       (due to the way wakeup is scheduled or receiving a signal), do
+       it again.
+
+1999-03-26  Jim Kingdon  <http://www.cyclic.com>
+
+       * server.c (server): Add comment about Gzip-stream vs. RQ_ROOTLESS.
+
+       * sanity.sh (modules3-11b): Adjust exact text of error message to
+       reflect 1999-03-24 change to dirswitch.
+
+1999-03-25  Jim Kingdon  <http://www.cyclic.com>
+
+       * admin.c (admin): Make argument to -e optional, to match the
+       documentation.
+       * sanity.sh (admin-19a-2): Test for this.
+
+       * server.c (serve_root): Update comment about checking for missing
+       Root request.
+
+1999-03-24  Jim Kingdon  <http://www.cyclic.com>
+
+       * server.c (dirswitch): Also check dir here, similar to
+       what server_pathname_check does for other cases.
+       * sanity.sh (files): Adjust files-14 to test for this.
+
+1999-03-24  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+       and Jim Kingdon
+
+       * sanity.sh: added a test (files-13) to test .. indirection
+       in a path and another (files-14) to make sure we still fail
+       out when the '..' indirection takes us into the $CVSROOT
+       directory or beyond.
+
+1999-03-24  Larry Jones  <address@hidden>
+
+       * rcs.c: Change enum constants ADD and DELETE to something less
+       likely to run into conflicts.
+
+1999-03-21  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (tagf): New test, tests for moving a branch tag to a
+       non-branch tag and trying to recover.
+
+1999-03-12  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (branches): Tweak test branches-5 to test the case in
+       which one modifies a file and then branches it.
+
+1999-03-09  John Bley of duke.edu
+
+       * mkmodules.c (filelist): Missed a NULL in this struct (should
+       have 3 members, only had 2).
+
+1999-03-07  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (Index): Rename new test from rm_CVS/Root to rmroot
+       (we don't have a formal rule about funky punctuation in test names
+       but both underscore and a slash is too funky for me :-)).
+       Reindent a few tests which were off.
+
+       * root.c: Remove the sentence which had the improper English;
+       there isn't really a need for that sentence and it isn't
+       particularly accurate any more.
+
+1999-02-27  Derek Price
+       <http://www-personal.engin.umich.edu/~oberon/resume.html>
+
+       * sanity.sh:  Added rm_CVS/Root test to test that CVS uses
+       $CVSROOT rather than dumping core when running remotely and
+       the admin file CVS/Root is deleted from the workspace.
+
+       Also, altered a few 'cvs commit' 's in regular expressions to
+       fit the .${PROG} commit. portability syntax.
+
+       * recurse.c:  Stopped CVS from dumping core in the case tested
+       above.
+
+       * root.c:  Fixed somebody's improper english.
+
+1999-02-25  Larry Jones  <address@hidden>
+
+       * sanity.sh (keyword2-12): Use ${QUESTION} instead of ? in the
+       expected result.
+
+1999-02-24  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (keyword2): Restore the original \\\$ instead of $.
+       The latter ends up working due to various kludgy semantics in the
+       shell and regular expressions, but the former is cleaner.
+
+       * sanity.sh (keyword2): Protect keywords against accidental
+       expansion in sanity.sh itself (most occurrences had this, but not
+       all).
+
+1999-02-23  Derek Price  <http://www.cyclic.com>
+       and Jim Kingdon.
+
+       * sanity.sh (keyword2): New test, tests for merging with -kk.
+
+1999-02-22  Jim Kingdon  <http://www.cyclic.com>
+
+       * version.c: Ease version number to 1.10.5.1.
+
+       * version.c: Version 1.10.5.
+
+1999-02-18  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (files): New test, for a relatively obscure spurious
+       "Up-to-date check failed" in client/server.
+
+       * main.c (lookup_command_attribute): Don't check for "history"
+       twice.
+
+1999-02-17  Jim Kingdon  <http://www.cyclic.com>
+           and Hallvard B Furuseth
+
+       * root.c (parse_cvsroot): Rearrange ifdefs to squelch possible
+       warnings about statement not reached.
+
+1999-02-16  Jim Kingdon  <http://www.cyclic.com>
+
+       * recurse.c (start_recursion): If we are skipping the current
+       directory (due to it being from the wrong repository), also adjust
+       the arguments we send to the server accordingly (like we already
+       do for the case in which there is no CVS directory).
+       * sanity.sh (multiroot4): New test, for this.  All these tests had
+       passed locally, but remote multiroot4-12 tests for this fix.
+       (multiroot): Adjust multiroot-diff-1, multiroot-update-2,
+       multiroot-tag-1, multiroot-status-1, multiroot-update-3, and
+       multiroot-log-1 to reflect the cosmetic change this produces (one
+       less "Diffing ." message).
+       (multiroot2): multiroot2-8 likewise.
+
+1999-02-10  Jim Kingdon  <http://www.cyclic.com>
+
+       * tag.c (cvstag): Don't pass SEND_NO_CONTENTS if -c specified.
+       * sanity.sh (tagc): New test, for various tag -c behaviors.
+       Test tagc-6 tests for this fix.
+
+1999-02-09  Jim Kingdon  <http://www.cyclic.com>
+
+       * error.c (error): Rewrite to no longer use vasprintf (see
+       ../lib/ChangeLog for rationale).  Note the slight change in
+       interface - callers which want %8.8s or similar formats need to
+       call sprintf.
+       * lock.c (lock_wait, lock_obtained): Use sprintf.
+
+1999-02-08  Jim Kingdon  <http://www.cyclic.com>
+
+       * rcs.c (RCS_delete_revs): Pass -a to diff_exec.
+       * sanity.sh (binfiles3): New tests binfiles3-9 through
+       binfiles3-13 test for this fix.
+       * sanity.sh (binfiles): New tests binfiles-o4 and binfiles-o5
+       (which don't test this bug, just on general principles).
+
+1999-02-04  Jim Kingdon  <http://www.cyclic.com>
+
+       * lock.c (lock_name): Permissions of directories in LockDir
+       shouldn't depend on the umask.
+       * sanity.sh (lockfiles): Set umask and CVSUMASK, to test for this.
+
+1999-02-01  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (keywordlog): New tests keywordlog-22 and
+       keywordlog-23 test keyword expansion and $Log.  Adjust other tests
+       so that revisions differ more from each other, so this is a
+       better test.
+
+1999-01-29  Jim Kingdon  <http://www.cyclic.com>
+
+       * commit.c (checkaddfile): If options is "", treat it the same as
+       NULL.  Centralize this check, and the one for it starting with
+       "-k", at the start of the function.
+
+       * rcs.c, rcs.h (RCS_setexpand): New function.
+       * admin.c (admin_fileproc): Access keyword expansion field via
+       RCS_getexpand and RCS_setexpand, rather than directly.
+       * commit.c (checkaddfile): When resurrecting, set the keyword
+       expansion mode.
+       * sanity.sh (binfiles3): Adjust tests binfiles3-7 and binfiles3-8
+       for the new behavior.
+
+1999-01-27  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (multiroot3): Add new variant of multiroot3-10 test
+       for RELATIVE_REPOS.  Move multiroot3-11 test out of the
+       conditionals; it works the same for remote or local,
+       RELATIVE_REPOS or no.
+
+       * options.h.in: Make RELATIVE_REPOS the default, as has been
+       announced as a future direction since 1997-10-11.
+       * sanity.sh (multiroot): Tweak multiroot-update-1a and
+       multiroot-update-1b tests to work with either RELATIVE_REPOS or
+       non-RELATIVE_REPOS.
+
+       * sanity.sh (client-9): Don't assume the time zone.
+
+1999-01-26  Jim Kingdon  <http://www.cyclic.com>
+
+       Fix one facet of the "cvs add -kb" re-adding problem (the other
+       known facet is tested for by binfiles3-8).
+       * add.c (add): When re-adding a file, set the keyword expansion
+       as we normally would.
+       * sanity.sh (binfiles3): New test binfiles3-6a tests for this.
+
+1999-01-22  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (rmadd2): New tests, for undoing a commit.
+
+1999-01-21  Eric Mumpower  <address@hidden>
+
+       * sanity.sh (reposmv): Actually modify CVSROOT in current
+       environment when calling functions, rather than trying to achieve
+       the same effect with "CVSROOT=foo functionname". (Many common
+       bourne shells, including those in SunOS and Solaris 2.4-2.7,
+       do not properly handle "ENVVAR=foo command" when "command" is
+       a user-defined shell function rather than an actual executable.)
+
+1999-01-15  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (rcs3): Redirect awk's stdin to /dev/null like all the
+       other awk invocations.  GNU awk seems not to read stdin in this
+       case, but that behavior is hard to reconcile with the Single Unix
+       Spec and some awks don't do it.
+
+       * sanity.sh (binfiles, binfiles2, binfiles3, server): Use the same
+       tr trick as in rcs3.  People don't seem to have been complaining,
+       and this should fix server-4 for HPUX.
+
+1999-01-14  Jim Kingdon  <http://www.cyclic.com>
+
+       * client.c (recv_line): If the line we are reading contains a
+       character which would sign-extend to EOF, don't treat it as end of
+       file.  recv() doesn't report end of file this way and this might
+       fix bugs with 0xff characters.
+
+1999-01-14  Larry Jones  <address@hidden>
+
+       * client.c (recv_line): Handle EOF from server.
+
+       * sanity.sh (importc-8, importc-9): Accept anything in the seconds
+       fields of the timestamps since touch doesn't set it reliably.
+       (This isn't great, but it's better than nothing.)
+
+1999-01-14  Jim Kingdon  <http://www.cyclic.com>
+
+       * run.c (run_exec): Adjust comment about vfork; this isn't the place
+       to get into a treatise about fork performance vs. vfork
+       performance but it isn't quite as simple as whether one has
+       copy-on-write.
+
+1999-01-13  Larry Jones  <address@hidden>
+
+       * sanity.sh (dotest_fail): Handle spurrious output from assert better.
+
+       * sanity.sh (rcs3-4, rcs3-5a): Handle even more variants of the
+       assertion failure message.
+
+1999-01-12  Larry Jones  <address@hidden>
+
+       * sanity.sh (mtfr-3): ls behavior varies wildly on nonexistant files,
+        just use echo instead.
+
+1999-01-11  Jim Meyering  <address@hidden>
+
+       * sanity.sh (mkmodules-temp-file-removal): New test, for this.
+       * mkmodules.c (mkmodules): Remove each `CVSROOT/.#[0-9]*' temporary
+       file that's used to check out files listed in CVSROOT/checkoutlist.
+       Remove extra semicolon at end of line.
+
+1999-01-11  Larry Jones  <address@hidden>
+
+       * sanity.sh (rcs3-5a): Allow for multiple lines of output before the
+       assertion failure message.
+
+       * sanity.sh (lockfiles-6, client-8): Work around bug in HP-UX chmod
+       (doesn't allow anything to follow omitted permissions).
+
+1999-01-09  Jim Kingdon  <http://www.cyclic.com>
+
+       * client.c (set_sticky): Nonfatal error if we can't write it.
+       * sanity.sh (dirs2-8 through dirs2-14): New tests, for this.
+
+       * sanity.sh (rcs3): Write NUL character with tr not awk, in
+       accordance with Single Unix Specification.  Hopefully will fix
+       rcs3-7 for HPUX.  Will not work on SunOS4, but then again neither
+       did the old syntax.
+
+1999-01-05  Jim Kingdon  <http://www.cyclic.com>
+
+       * client.c, update.c: Rename MD5* functions to cvs_MD5* per
+       corresponding change to ../lib/md5.h.
+
+1999-01-03  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (client): Give file1 a predictable mode so that the
+       output in client-9 will not depend on the umask of the user
+       running the tests.
+
+1998-12-29  Jim Kingdon  <http://www.cyclic.com>
+
+       * client.c (client_senddate): Use date_to_internet rather than
+       using our own "5/26/1997 13:01:40 GMT" date format.
+       * main.c (date_to_internet): Check for errors from sscanf.  Always
+       send a four digit year.  Send hours, minutes, and seconds as two
+       digits per RFC822.
+       * sanity.sh (client): New tests client-8 and client-9 test for this.
+
+       * sanity.sh (rcs2): New tests rcs2-6 through rcs2-8 test for fix
+       to lib/getdate.y (before the fix, "100 months" or "8 years" would
+       tend to mean the year 1969, thus the tests would give "cvs update:
+       file1 is no longer in the repository").
+
+1998-12-28  Larry Jones  <address@hidden>
+
+       * entries.c (Register): Return if unable to open log file to avoid
+       referencing the invalid file pointer.
+       * sanity.sh (dirs2-7): With above change, no longer fails.
+       * sanity.sh (rcs3-5a): Another assertion failure message.
+       * sanity.sh (pserver-4, pserver-5): Some 4.4BSD derived systems spit
+       out bogus error messages when initgroups is called as non-root.
+
+1998-12-23  Larry Jones  <address@hidden>
+
+       * sanity.sh (rcs3, dotest_fail): The assertion failure message varies
+       wildly between different systems and the resulting abort call can
+       even result in spurrious output.  Fix the regexp to accept nearly
+       anything containing some kind of assertion failure and ensure that
+       any spurrious output ends up in the output file instead of on the
+       terminal.
+
+1998-12-23  Jim Kingdon  <http://www.cyclic.com>
+
+       * admin.c, checkout.c, commit.c, cvsrc.c, expand_path.c,
+       history.c, ignore.c, import.c, log.c, mkmodules.c, modules.c,
+       myndbm.c, parseinfo.c, rcs.c, remove.c, rtag.c, status.c, subr.c,
+       tag.c, wrapper.c: Cast all char's to unsigned char before passing
+       them to ctype.h functions (isalpha, isgraph, isalnum, isspace,
+       isdigit, isprint, isupper).  Whether using ctype.h is the right
+       thing at all is unclear to me (having the server depend on locale
+       seems wrong, as we don't necessarily have any good way to set the
+       right locale, if there even is such a concept as 'right' locale in
+       this context), but as long as we use ctype.h we might as use it
+       according to the standards (this affects systems where plain char
+       is signed but users supply characters with the 8th bit set).
+       Thanks to Paul Eggert for suggesting this.
+
+1998-12-22  Jim Kingdon  <http://www.cyclic.com>
+
+       * sanity.sh (rcs3): Oops, the earlier fix for srcdir only fixed
+       the non-remote case, not the remote case.  Fix the other occurrence.
+
+1998-12-22  Jim Kingdon
+
+       * sanity.sh (rcs3): The assertion failure message varies slightly
+       depending on whether CVS was built with srcdir != ".".  Fix regexp.
+
+1998-12-21  Jim Kingdon
+
+       * rcs.c (RCS_getdate): Reindent Jim Meyering's change; remove
+       unused variable x_vers.
+
+       * rcs.c: When printing an unexpected character we found in the RCS
+       file, print it in hex rather than as a character (see comment for
+       rationale).
+       * sanity.sh (rcs3): Adjust rcs3-2 and rcs3-7 tests accordingly.
+
+       * sanity.sh (rcs3): New test, for some error handling cases
+       involving parsing RCS files.
+
+1998-12-16  Jim Meyering  <address@hidden>
+
+       * rcs.c (RCS_getdate): Handle the case in which a file is first
+       imported after its initial version has been created.
+       * sanity.sh (import-after-initial): New test for that.
+
+1998-12-17  Jim Kingdon
+
+       * server.c (serve_root): Pserver_Repos only exists if
+       AUTH_SERVER_SUPPORT is defined.
+
+1998-12-12  Jim Kingdon, and Derek R. Price of Stortek.
+
+       * sanity.sh (multiroot): Change + to ${PLUS}.
+
+1998-12-12  Jim Kingdon, and Gary Young of Motorola
+
+       * sanity.sh (admin): In tests admin-13, admin-25, and admin-29,
+       allow 4 digit year in addition to 2 digit year.
+
+1998-12-12  Jim Kingdon
+
+       * sanity.sh (log): New tests log-14a and log-14b test for -rHEAD
+       and for HEAD as (nonexistent) file name.
+
+1998-12-02  Jim Kingdon
+
+       * version.c: Squish version number to 1.10.4.1.
+
+       * version.c: Version 1.10.4.
+
+1998-11-24  Jim Kingdon
+
+       * recurse.c (do_file_proc): Check for errors from RCS_parse.
+       * sanity.sh (rcslib-symlink-7 through rcslib-symlink-10): New
+       tests, test for this.
+
+       * sanity.sh (reposmv-2): Adjust for 22-Nov change to Find_Names.
+
+       * entries.c (Register): If we can't write Entries.Log, make it a
+       nonfatal error.
+       * sanity.sh (dirs2): Test for this fix.
+
+       * sanity.sh (dirs2): Clean up working directory at end of test.
+
+1998-11-23  Jim Kingdon
+
+       * sanity.sh (dirs2): New test, for some more cases involving
+       deleting directories and such.
+
+       * sanity.sh (dirs): Update for yesterday's change in Find_Names
+       error handling.  The error in dirs-4 is fairly different now; in
+       dirs-3 and dirs-3a it is the obvious change.
+
+1998-11-22  Jim Kingdon
+
+       * sanity.sh (release): Move the commments listing "cvs release"
+       tests from modules2-6 to here.
+       * release.c (release): Update comment to reflect "? foo" case.
+
+       * find_names.c (Find_Names): If we can't read the repository, make
+       it a nonfatal error.  Tell the caller whether this happened.
+       (find_rcs): Add comment regarding this behavior.
+       * recurse.c (do_recursion): If Find_Names gives an error, skip
+       the directory and print a message saying so.
+       * sanity.sh (modes3): New test, for this.
+
+1998-11-18  Jim Kingdon
+
+       * rtag.c (rtag_usage), tag.c (tag_usage): Use "-r rev"
+       consistently.
+
+       * sanity.sh (conflicts3): Tests conflicts3-24 through
+       conflicts3-28 test for another case similar to conflicts3-22.
+
+1998-11-14  Jim Kingdon
+
+       * sanity.sh (diff): New test, for now just tests for the "I know
+       nothing" message.
+
+       * sanity.sh (conflicts2-142b7 through conflicts2-142b11): New
+       tests; resurrecting doesn't work from one level up.
+
+       * sanity.sh (mwrap-7): Remote prints the messages in a different
+       order.
+
+1998-11-13  Jim Kingdon
+
+       * tag.c (check_fileproc): Log tag deletions.
+       * rtag.c (check_fileproc): Likewise.
+       * sanity.sh (taginfo-14 through taginfo-18): New tests, for
+       these behaviors.
+
+1998-11-12  Jim Kingdon
+
+       * sanity.sh (mwrap-7): Update for the noexec fix.
+
+       * server.c (server_copy_file): Add comment about noexec.
+
+       * update.c (checkout_file): Handle noexec case involving revbuf
+       and modes.
+       (update_fileproc): In case T_NEEDS_MERGE, let merge_file take care
+       of noexec, so it can tell the user if there would be conflicts.
+       (merge_file): Print "conflicts found in FILE" message
+       regardless of noexec.  Add comment about checking for whether the
+       file already contained the changes, and noexec.
+       * sanity.sh (conflicts-192a): New test, for this.
+
+1998-10-20  Jim Kingdon
+
+       Use the gzip library on the server.  Probably doesn't speed things
+       up as currently implemented, but does avoid hassles in terms of
+       finding an external gzip program.
+       * zlib.c, server.h (gunzip_and_write, read_and_gzip): Now returns
+       whether a fatal error occurred, rather than expecting error (1,
+       ...) to work.
+       * client.c (update_entries, send_modified): Change callers.
+       * server.c (receive_file): Rewrite gzip code to use
+       gunzip_and_write rather than filter_through_gunzip.
+       (server_updated): Likewise, use read_and_gzip rather than
+       filter_through_gzip.
+       * client.c, client.h (filter_through_gzip, filter_through_gunzip),
+       run.c, cvs.h (filter_stream_through_program): Removed; no longer used.
+       * sanity.sh (server): New tests server-4 and server-5 test
+       this feature (note that CVS 1.10 also passes these tests; the
+       behavior is supposed to be unchanged).
+
+1998-10-19  Jim Kingdon
+
+       * sanity.sh (multiroot3): New test, tests for a few more
+       multiroot cases.
+
+       * lock.c (lock_name): Set the permissions on each directory we
+       create to that of the parent directory.
+       * sanity.sh (lockfiles): New chmod and tests lockfiles-7a and
+       lockfiles-7b test for this.  Adjust lockfiles-5 for new text of
+       error message.
+
+1998-10-15  Jim Kingdon
+
+       * server.c (requests): Set RQ_ROOTLESS for "Set".
+       * sanity.sh (info): Also clean up $HOME/.cvsrc.
+       (server): Test that we can send Set before Root (had been tested
+       by crerepos-6b, but only if you ran the info test first).  Tests
+       for this fix.
+
+1998-10-14  Jim Kingdon
+
+       * subr.c (expand_string): Tweak the algorithm so that the size
+       that it allocates is generally a power of two.
+
+1998-10-14  Eivind Eklund and Jim Kingdon
+
+       * commit.c (commit): For the client, don't worry about whether we
+       are root.
+
+1998-10-13  Jim Kingdon
+
+       * server.h (struct request): Change status field to flags and add
+       RQ_ROOTLESS.
+       * client.c (handle_valid_requests, supported_request): Change
+       status to flags.
+       * server.c (requests): Change status to flags.  Add RQ_ROOTLESS.
+       * server.c (server): If not RQ_ROOTLESS, and we haven't gotten a
+       Root request, give an error.
+
+1998-10-12  Jim Kingdon
+
+       * version.c: Slide version number to 1.10.3.1.
+
+       * Version 1.10.3.
+
+       * sanity.sh (modules2-17): Update for 9 Oct 1998 change to
+       update_dirent_proc.
+
+1998-10-11  Jim Kingdon
+
+       * commit.c (checkaddfile, commit_fileproc): A numeric value for
+       'tag' does not mean that we are adding on a branch.
+       * sanity.sh (keywordlog): Adjust this test, to test for this
+       (replaces comment saying we should be doing it).
+       (rmadd): Likewise.
+
+       * sanity.sh (rmadd): New test, tests for various existing
+       behaviors with "cvs ci -r".
+
+1998-10-09  Jim Kingdon
+
+       * update.c (update_dirent_proc): For local CVS, if the directory
+       does not exist in the working directory nor in the repository,
+       just skip it.
+       * sanity.sh (dirs): New tests dirs-3a, dirs-7 and dirs-8 test for
+       this and related behaviors.  Note that the new behavior was also
+       the previous behavior for remote; we are only changing it for local.
+
+       * wrapper.c, cvsrc.c, ignore.c: Add comments about ignoring .cvsrc
+       and friends if we can't find a home directory.
+       * expand_path.c (expand_path): If we can't find the home
+       directory, give an error rather than a coredump (or worse).
+       * login.c (construct_cvspass_filename): Don't use errno in error
+       message; get_homedir doesn't set it.  Add comment about this
+       message.
+
+1998-10-07  Jim Kingdon  <address@hidden>
+
+       * diff.c (diff): Set variables to NULL at the start, and free
+       memory at the end.
+       * sanity.sh (multiroot2): Add tests for this (before the fix,
+       multiroot2-12 would abort with "no more than two revisions/dates
+       can be specified").
+
+1998-10-06  Jim Kingdon  <address@hidden>
+
+       * Makefile.in (installcheck check): Remove references to RCSBIN;
+       they don't do anything now that RCSBIN is ignored.
+
+       * client.c: Clean up horrible confusion about whether stored_mode
+       or stored_mode_valid (or nothing :-)) indicates whether
+       stored_mode is allocated.  Should fix crashes (for example, on NT
+       when the server has renamed multiple files from uppercase to
+       lowercase).
+
+       * sanity.sh (dirs): New tests, tests for some cases involving
+       admins who do surgery on the repository.
+
+1998-10-03  Johannes Stezenbach <address@hidden>
+
+       * vers_ts.c (Version_TS): If UTIME_EXPECTS_WRITABLE, if
+       necessary change the file to be writable temporarily to set its
+       modification time.
+
+1998-10-03  Jim Kingdon  <address@hidden>
+
+       * client.c (handle_error): Add comment about indicating which
+       errors are from the server.
+
+1998-10-01  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (devcom-180): Allow one digit day.
+
+1998-09-30  Jim Kingdon  <address@hidden>
+
+       * main.c (main): Don't call Name_Root if -d specified.
+       * recurse.c (do_recursion, do_dir_proc): Don't check CVS/Root
+       if -d was specified.
+       * import.c (import): Indentation fix.
+       * sanity.sh (multiroot): Update for this change.
+       (reposmv): New test, tests for this.
+
+1998-09-28  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (multiroot2): New test, tests some nested directory
+       cases.
+
+1998-09-25  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (multiroot): Change a few comments which said modules
+       when they meant directories.
+
+1998-09-25  Jim Meyering  <address@hidden>
+
+       * sanity.sh (devcom-180): Add 0-9 to the range of characters allowed
+       in hostname regexp.
+
+1998-09-25  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (log2): New test log2-7a tests for one error handling
+       case.  Add a comment about another.
+
+1998-09-24  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Change crerepos test back to :ext: (for several
+       reasons; see comments).
+
+1998-09-24  Noel Cragg  <address@hidden>
+
+       * sanity.sh (rcslib-symlink-5, rcslib-symlink-6): new tests to
+       check the operation of "tag" when there are symlinks in the
+       repository.
+
+       * rcs.c (RCS_checkin): remove old code that resolved the symlink
+       and call resolve_symlink instead.
+       (RCS_rewrite): call resolve_symlink before doing anything else to
+       make sure we're operating on the file and not the symlink.
+
+       * subr.c (resolve_symlink): new routine -- resolves a symbolic
+       link chain to its destination.
+       * cvs.h: add prototype.
+
+       * sanity.sh (basica-6.2, basica-6.3): changed match expressions to
+       reflect new diff output.
+
+       * rcs.c (make_file_label): generate labels for files that include
+       the pathname so that output from "cvs diff" is useable by patch.
+       Looks like I came up with the mods as Andy Piper
+       <address@hidden>; his patch was on the Cyclic unofficial
+       patches page.
+
+       * sanity.sh: change remote access method from ext to fork.  This
+       results in a significant speed improvement when running the
+       testsuite.  The ext method on my machine (i586 120MHz Linux 2.0.35
+       with TCP wrappers installed) runs in 450% of the time of the local
+       method while the fork method runs in only 150% of the time of the
+       local method!  Yow!  Am I SWAPPING yet?!
+       (crerepos-6a, crerepos-6b): change to reflect different error
+       messages for fork method.
+       (modes-15): same.
+
+       * client.c (connect_to_forked_server): new routine.
+       (start_server): call the above when method is fork_method.
+
+       * root.c: add a new method named "fork".  This method uses the
+       remote protocol, but does so by forking a "cvs server" process
+       directly rather than doing "rsh host cvs server" (for example).
+       This new method has few advantages for day-to-day use, but has
+       three important benefits for debugging:
+
+         1) Most secure installations these days don't allow rsh access.
+         With this new method, we can still test the remote protocol on
+         these machines because we don't need to be able to make a local
+         TCP connection.
+
+         2) Even if installations allow rsh access, they almost always
+         have TCP wrappers to check permissions by IP/hostname.  This
+         causes a short delay for every connection.  For invocations from
+         the command line, this doesn't matter much, but it adds up to a
+         significant amount of time when running the testsuite.
+
+         3) On machines that can't (or do not usually) provide rshd
+         access (I'm thinking of WNT/W95 in particular), we can now run
+         tests of the remote protocol using this method.  Indeed, we can
+         run remote protocol tests on any machine that has an
+         implementation of piped_child().
+
+       (parse_cvsroot): handle new method.
+       (error_exit, xstrdup, isabsolute): new stub functions to use when
+       compiling root.c with the DEBUG option.
+       (main): fix a few typos.
+       * cvs.h (CVSmethod): add fork_method.
+
+       * server.c (create_adm_p): use Emptydir as the placeholder
+       directory instead of "." to avoid problems with "cvs update -d" et
+       al.
+
+1998-09-22  Noel Cragg  <address@hidden>
+
+       * sanity.sh (devcom-180): fixed typo in regexp.
+
+       * main.c (main): remove need_to_create_root and related code
+       (including CVS_IGNORE_REMOTE_ROOT environment variable).  The
+       current implementation (just removed) of rewriting the contents of
+       the CVS/Root file isn't desirable for a number of reasons:
+
+         1) Only the top-level CVS/Root directory is updated.  If we're
+         really interested in pointing our WD at another CVSROOT, we
+         should have a separate command.
+
+         2) With the new multiroot mods, we don't ever want to rewrite
+         CVS/Root files in the way the removed code did.  Consider:
+
+           cvs -d repository1 co a
+           cd a
+           cvs -d repository2 co b
+            cvs -d repository2 update b
+
+         The update command would rewrite the contents of a/CVS/Root to
+         the incorrect value.  Bad.  We then wouldn't be talking to the
+         correct repository for files in a.
+
+         3) The removed code seems to be a quick hack to support working
+         directories checked out from multiple repositories.  With the
+         CVS_IGNORE_REMOTE_ROOT variable set, one could perform commands
+         as in example 2, above, without worring about updating CVS/Root
+         files.  While in pre-1.10.1 recursive commands wouldn't handle
+         that working directory hierarchy, one could use commands like
+         "cvs foo -l" instead.  While not great, this allows you (with a
+         lot of manual interaction) to have a multiroot WD.  Since we now
+         have multiroot mods checked in, we don't need this code.
+
+       (lookup_command_attribute): while we don't need the
+       CVS_CMD_USES_WORK_DIR flag anymore (since it only was supporting
+       the need_to_create_root code), I'm leaving it in.  It may come in
+       handy at some later date.
+
+1998-09-18  Jim Kingdon  <address@hidden>
+
+       * version.c: Advance version number to 1.10.2.1.
+
+       * Version 1.10.2.
+
+1998-09-13  Jim Kingdon  <address@hidden>
+
+       * client.c: Refuse to Copy-file to another directory
+       * sanity.sh (client): New test, tests for this.
+
+       * edit.c (editors_fileproc), watch.c (watchers_fileproc): Use
+       cvs_output rather than writing to stdout.
+       * sanity.sh (devcom): Use dotest for tests 178, 180, and 183
+       (tests that we preserve existing behavior on "cvs editors").
+
+       * commit.c (check_fileproc): Don't allow commits in Emptydir.
+       * sanity.sh (emptydir-8): Test for this change in behavior.
+
+       * sanity.sh: Add some compatibility tests to TODO comments at end.
+
+1998-09-10  Jim Kingdon  <address@hidden>
+
+       * wrapper.c (wrap_add): Remove obsolete comment about -m.
+
+       * server.c (server_updated): Check for error from CVS_UNLINK.
+
+1998-09-09  Jim Kingdon  <address@hidden>
+
+       * server.c (serve_root): Allocate with malloc, not xmalloc.
+
+       * root.c (set_local_cvsroot): Move memory allocation from here...
+       * server.c (serve_root): ...to here.  Fixes error handling.
+
+       * root.c (parse_cvsroot): Don't call check_root_consistent;
+       parse_cvsroot is only used for local and client.
+       * root.c (set_local_cvsroot): Move check_root_consistent
+       functionality from here...
+       * server.c (serve_root): ...to here.  Fixes error handling.  Also
+       made the error more explicit, while I am at it.
+       * server.c (Pserver_Repos): Now static.
+       * cvs.h: Don't declare it.
+       * root.c (check_root_consistent): Removed; no longer needed.
+       * sanity.sh (pserver): New test, tests for this behavior and some
+       other basic pserver stuff.
+
+       * update.c (merge_file): Use cvs_output for "already contains the
+       differences" message.  Found this one when I actually observed the
+       out-of-order bug in Real Life(TM).
+
+1998-09-09  Jim Kingdon
+
+       * find_names.c (find_dirs): Make sure to zero errno before
+       going around the loop again.
+       * find_names.c (find_rcs): Make sure to set save_errno.
+       (thanks to Alexandre Parenteau for reporting both problems).
+
+1998-09-09  Jim Kingdon  <address@hidden> and Michael Pakovic
+
+       * edit.c (notify_do): Only free line if it is not NULL.
+
+1998-09-07  Jim Kingdon  <address@hidden>
+
+       * cvs.h: dirs_sent_to_server should not be inside
+       AUTH_SERVER_SUPPORT (reported by both Richard Levitte and Murray
+       Bishop, thanks).
+
+       * lock.c, cvs.h: New variable lock_dir.
+       * parseinfo.c (parse_config): New option LockDir.
+       * lock.c (lock_name): New function, abstracts out lock file naming
+       and also supports LockDir.
+       * lock.c (lock_simple_remove, Reader_Lock, write_lock, set_lock):
+       Call it (6 places, to create/remove read/write/master locks).
+       (Lock_Cleanup): Refuse to reenter this function.
+       * sanity.sh (lockfiles): New test, tests for this feature.
+
+1998-09-03  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (multiroot): Expect ${TESTDIR} in output instead of
+       assuming it is /tmp/cvs-sanity (thanks to Mark D. Baushke of Cisco).
+       Clean up working directory when done (fixes apparent thinko).
+
+       * server.c (create_adm_p): Fix one "return" which didn't return a
+       value.
+       (dirswitch): Check for errors from create_adm_p.
+
+       * sanity.sh: Set LC_ALL rather than just LC_COLLATE.
+
+Wed Sep  2 02:30:22 1998  Jim Kingdon  <address@hidden>
+
+       * version.c: Bump version number to 1.10.1.1.
+
+       * Version 1.10.1.
+
+1998-09-01  Jim Kingdon  <address@hidden>
+
+       Administrative note regarding Noel's changes to allow one to
+       switch from one CVS root to another in a single command: The
+       ChangeLog entries for the changes which Noel just checked in
+       appear for 1998-09-01, 1998-08-28, 1998-08-25, 1998-08-19, and
+       1998-08-18, rather than being all together.
+
+       * main.c (set_root_directory): Fix whitespace.
+       (main): Nuke new -m option and just have that message controlled
+       by -t.
+       * server.c (server): Revert the CVS_SERVER_SLEEP code back the way
+       it was in CVS 1.10.  Attaching to the parent process is relatively
+       boring (you can just run "cvs server" under a debugger instead),
+       but connecting to the child process is what the old code was for.
+       * recurse.c, server.c: Remove DEBUG_NJC code.
+
+1998-09-01  Noel Cragg  <address@hidden>
+
+       * server.c (do_cvs_command): add another environment variable,
+       CVS_SERVER_SLEEP2, after forking to pause the program so one can
+       attach a debugger.
+
+       * sanity.sh (crerepos): clean up crerepos-18 now that multiroot
+       works in this case.
+       (multiroot): finalize tests for local vs. remote operation.
+
+       * recurse.c (start_recursion): near the beginning, save the list
+       of directories to spoof as command-line arguments, if necessary.
+       Use that list near the end and call send_file_names to send those
+       arguments to the server.
+       (do_argument_proc): removed, since we call send_file_names now.
+
+       * main.c (main): re-initialize dirs_sent_to_server on each pass
+       through the loop for each CVSROOT.
+
+       * cvs.h: add proto for global variable which keeps track of which
+       directories have been sent to the server when in client mode.
+
+       * client.c (is_arg_a_parent_or_listed_dir): new function.
+       (arg_should_not_be_sent_to_server): new function.  Tries to decide
+       whether the given argument should be sent to the server, based on
+       the current CVSROOT and the list of directories sent to the
+       server.
+       (send_repository): add the directory name to the list of
+       directories sent to the server.
+       (send_file_names): call arg_should_not_be_sent_to_server.
+
+       * add.c (add): switch the order of send_files and send_file_names
+       to make multiple repository support possible.  send_files needs to
+       create a list of directories being requested so that
+       send_file_names can decide which command-line arguments to send to
+       the server for the given current CVSROOT.
+       * admin.c (admin): same.
+       * commit.c (commit): same.
+       * diff.c (diff): same.
+       * edit.c (editors): same.
+       * log.c (cvslog): same.
+       * rcs.c (annotate): same.
+       * remove.c (cvsremove): same.
+       * status.c (cvsstatus): same.
+       * tag.c (cvstag): same.
+       * update.c (update): same.
+       * watch.c (watch_addremove): same.
+       (watchers): same.
+
+1998-08-31  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Remove "debug" function; it was apparently checked
+       in accidentally by Norbert Kiesel's change.
+
+1998-08-31  Norbert Kiesel  <address@hidden>
+
+       * release.c (release): modify last patch to release so that
+       save_cwd is called only once and restore_cwd is always called when
+       neccessary.  Also fixed a tiny memory leak.
+
+       * sanity.sh (release): added some more tests for "cvs release"
+       including a test with two dirs and a "no" for the first one (which
+       fails without the above patch).
+
+1998-08-28  Noel Cragg  <address@hidden>
+
+       * sanity.sh (crerepos-18): add new comment and change test
+       slightly to support multiroot.
+       (multiroot): add more tests.
+
+       * server.c (create_adm_p): new function.
+       (dirswitch): call create_adm_p.  Modify the code to always write a
+       new CVSADM_REP file, since create_adm_p might have put a
+       placeholder there and our value is guaranteed to be correct.
+       (server): move the CVS_SERVER_SLEEP check here so we can debug
+       things at an earlier stage.
+
+       * recurse.c (start_recursion): add large comment about the ideal
+       solution to the "Argument xxx" problem.
+
+       * main.c (main): move position of debugging comment for -m flag.
+
+       * diff.c (diff): clear a static variable.
+
+       * client.c (send_file_names): check to see if we should send this
+       argument to the server based on the contents of the appropriate
+       CVSADM directory.  This avoids "nothing known about foo" messages
+       and problems with duplicate modules names in multiple
+       repositories.
+       (send_a_repository): change method of calculating toplevel_repos
+       to support multiple CVSROOTs.
+       (start_server): clear some static variables.
+
+1998-08-28  Jim Meyering  <address@hidden>
+
+       * sanity.sh (basicc-8, basicc-11): Use `.*' instead of explicit
+       `Operation not permitted'.  Solaris2.5.1 gets a different error:
+       `Invalid argument'.
+
+1998-08-26  Eric M. Hopper
+
+       * sanity.sh: Set LC_COLLATE to "C".
+
+1998-08-25  Noel Cragg  <address@hidden>
+
+       * sanity.sh (multiroot): new set of tests to check the behavior of
+       multiroot.
+
+       * diff.c (diff): set options value to NULL after freeing to reset
+       the state for the next time around.
+
+1998-08-25  Jim Kingdon  <address@hidden>
+
+       Fix problems with trying to rename an open file:
+       * rcs.c, rcs.h (RCS_setattic): New function.
+       * commit.c (remove_file, checkaddfile): Call it.
+
+1998-08-24  Jim Kingdon  <address@hidden>
+
+       * release.c (release): Use save_cwd and restore_cwd to get back to
+       where we started, rather than hoping that CVS_CHDIR ("..") will do
+       something useful.  This removes the need for most of
+       release_delete, so remove that function and inline what is left.
+       * sanity.sh (basicc): Adjust tests for this fix, also some tests
+       with multiple arguments to "cvs release" (in the non-"-d"-case, it
+       would seem like the old code would CVS_CHDIR into directories and not
+       CVS_CHDIR back, but I'm not going to investigate this and it
+       should be a moot point with this fix.).
+
+       * sanity.sh (basicc): Add tests for a serious bug in "cvs release
+       -d .".
+
+       More error handling fixes:
+       * ignore.c (ignore_files): Check for errors from opendir and
+       readdir.
+       * find_names.c (Find_Names): Check for errors from find_rcs.
+       (find_rcs, find_dirs): Comment error handling better; also return
+       an error if we got one from readdir.
+       * filesubr.c (deep_remove_dir): Also check for errors from readdir.
+       * import.c (import_descend): Print message on error from opendir
+       or readdir.
+       * commit.c (remove_file): Check for errors from CVS_MKDIR and
+       CVS_RENAME.
+       (remove_file): No need to remove the file in the temporary
+       directory; server.c now informs time_stamp_server of what is going
+       on via CVS/Entries rather than a file with a kludged up timestamp.
+       * client.c, entries.c, login.c, logmsg.c, mkmodules.c, patch.c,
+       remove.c, update.c: Check for errors from unlink_file.
+       * mkmodules.c (write_dbmfile, rename_dbfile, rename_rcsfile):
+       Check for errors from fclose, CVS_RENAME, and CVS_STAT.
+       * mkmodules.c (checkout_file): Clarify error handling convention.
+       * mkmodules.c (mkmodules): Call checkout_file accordingly.
+       * entries.c (Entries_Open): Check for errors from fclose.
+
+1998-08-21  Ian Lance Taylor  <address@hidden>
+
+       * import.c (import): Output suggested merge command using
+       cvs_output_tagged rather than just cvs_output.  Don't put
+       CVSroot_cmdline in the log file.
+       * client.c (importmergecmd): New static struct.
+       (handle_mt): Handle +importmergecmd tag.
+       * sanity.sh (import): Use an explicit -d in importb-2, to test
+       whether it is reported in the suggested merge command.
+
+1998-08-20  Ian Lance Taylor  <address@hidden>
+
+       * sanity.sh (import): Rewrite tests to use dotest.
+
+1998-08-20  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Add comments about binary files and cvs import.
+
+1998-08-19  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (importc): Use ${username} in one place where I had
+       missed it.
+
+       Make import -d work client/server:
+       * client.c, client.h (client_process_import_file): Take new
+       argument, for whether -d is specified, and send Checkin-time
+       request if it is set.
+       * import.c (import_descend): Pass it.
+       * main.c, cvs.h (date_to_internet): New function.
+       * server.c (server_modtime): Call date_to_internet.
+       * server.c (serve_checkin_time): New function.
+       (requests): Add "Checkin-time" request.
+       (serve_modified): If it was sent, set the timestamp in the
+       temporary directory.
+       * import.c (import): If the client sends a -d option, complain.
+       (import): For the server, always use the timestamps from the temp
+       directory.
+       (import): Don't send a -d option to the server.
+       * sanity.sh (importc): Add tests for import -d.
+
+Wed Aug 19 15:19:13 1998  Larry Jones  <address@hidden>
+
+       * sanity.sh (unedit-without-baserev-5): use ${DOTSTAR} instead
+       of .* since we expect to match multiple lines.
+
+1998-08-19  Ian Lance Taylor  <address@hidden>
+
+       * cvs.h (CVSroot_cmdline): Declare.
+       * root.c (CVSroot_cmdline): Define.
+       * main.c (main): Set CVSroot_cmdline if the -d option is used.
+       * import.c (import): If CVSroot_cmdline is not NULL, then mention
+       an explicit -d option in the suggested merge command line.
+
+Wed Aug 19 00:28:50 1998  Noel Cragg  <address@hidden>
+
+       * recurse.c (do_dir_proc): don't muck with CVS/Root directories
+       when running in server mode.
+       (do_recursion): same.
+
+       * main.c (main): add the command-line option `m' to help debug the
+       multiroot environment; it prints out the value of CVSROOT for each
+       iteration through the main loop.  Also, changed the main loop so
+       that it gets executed only once when running in server mode (the
+       server will only deal with a single CVSROOT).
+
+       * recurse.c (do_recursion): change default for
+       PROCESS_THIS_DIRECTORY to true; we should always process a
+       directory's contents unless there's an existing CVS/Root file with
+       a different root than the current root to tell us otherwise.
+       (do_dir_proc): same.
+
+Tue Aug 18 14:30:59 1998  Noel Cragg  <address@hidden>
+
+       * recurse.c (do_recursion): check the current value of CVS/Root
+       and add it to our list of CVSROOTs if it doesn't exist.  Decide
+       whether or not to process files in this directory based based on
+       the value of CURRENT_ROOT.
+       (do_dir_proc): same.
+
+       * main.c: add two new globals -- root_directories and current_root
+       -- which keep track of the values of CVSROOT we've seen and which
+       value of CVSROOT we're currently processing.
+       (main): put the main loop for stepping through cvsroot values
+       here, since we might need to send command-specific arguments for
+       every unique non-local cvsroot.  Moved blocks of code around so
+       that one-time initializations happen first (outside the loop) and
+       the other stuff happens inside the loop.
+       (set_root_directory): helper function.
+
+       * cvs.h: add prototypes for root_directories and current_root, two
+       new globals for keeping track of multiple CVSROOT information.
+
+1998-08-18  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Don't assume that the shell leaves $^ unexpanded in
+       an unquoted here-document (suggested by Bart Schaefer to help when
+       zsh is the shell).
+
+1998-08-17  Ian Lance Taylor  <address@hidden>
+
+       * commit.c (checkaddfile): Don't call fix_rcs_modes.
+       (fix_rcs_modes): Remove.
+
+1998-08-16  Jim Kingdon  <address@hidden>
+
+       * create_adm.c (Create_Admin): Don't condition traces on
+       SERVER_SUPPORT; SERVER_SUPPORT shouldn't do (much of) anything
+       independent of server_active.
+
+       * sanity.sh (binfiles3): New test, for yet another binary file
+       bug (sigh).  Thanks to Jason Aten for reporting this one.
+
+1998-08-15  Jim Kingdon  <address@hidden>
+
+       * rcscmds.c (call_diff_write_output): Update to reflect new
+       calling convention for the write_output callback.
+
+1998-08-15  Jim Meyering  <address@hidden>
+
+       * update.c (merge_file): Warn about failed unlink when not due
+       to ENOENT.
+
+       * server.h (CLIENT_SERVER_STR): New macro
+       * create_adm.c (Create_Admin): Use it.
+       * entries.c (Scratch_Entry, Register): Use it.
+       * filesubr.c (copy_file, xchmod, rename_file, unlink_file): Use it.
+       * history.c (history_write): Use it.
+       * modules.c (do_module): Use it.
+       * no_diff.c (No_Difference): Use it.
+       * run.c (run_popen): Use it.
+       * server.c (server_register): Use it.
+
+1998-08-14  Jim Meyering  <address@hidden>
+
+       * hardlink.c (lookup_file_by_inode): Use existence_error rather than
+       comparing errno to ENOENT directly.
+
+       * client.c (copy_a_file): Unlink destination before doing copy.
+       * sanity.sh (join-readonly-conflict): New test for this -- it would
+       fail only in client/server mode.
+
+       * sanity.sh (rcsmerge-symlink-4): Don't use `test -L', it's not
+       portable.  Instead, match against the output of `ls -l'.
+       (dotest tag8k-16): Simplify tag-construction code and at the same
+       time, avoid using expr's `length' and `substr' operators.  Not
+       all versions of expr support those.
+
+1998-08-14  Jim Kingdon  <address@hidden>
+
+       * version.c: Bump version number to 1.10.0.1.
+
+Thu Aug 13 11:15:24 1998  Noel Cragg  <address@hidden>
+
+       * version.c: Change version number to 1.10 and name to `Halibut'.
+
+       * sanity.sh (rcslib): new tests to check behavior of symlinks in
+       the repository.
+
+Wed Aug 12 15:39:38 1998  Noel Cragg  <address@hidden>
+
+       * main.c (lookup_command_attribute): the `annotate' command
+       shouldn't require access to the repository.  Add comment about
+       commands that do not use the working directory.
+
+Mon Aug 10 10:26:38 1998  Noel Cragg  <address@hidden>
+
+       * version.c: Change version number to 1.9.30.
+
+Thu Aug  6 17:44:50 1998  Noel Cragg  <address@hidden>
+
+       * server.c (serve_rdiff): change the name of the command (for
+       error reporting, etc.) from "patch" to "rdiff."
+       (serve_remove): rename from "cvsremove" to "remove."
+
+       * main.c (lookup_command_attribute): the `rdiff' command shouldn't
+       require write access to the repository.
+
+1998-08-06  David Masterson of kla-tencor.com
+       and Jim Kingdon
+
+       * commit.c (commit_filesdoneproc): Don't call strlen ("CVSROOT")
+       from within the assert statement.  Apparently HP's cc compiler on
+       HPUX 10.20 has trouble with that.
+
+1998-08-06  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_checkin): When adding branch, if there is a lock on
+       the branchpoint owned by someone else, leave it alone.  This
+       restores CVS 1.9 (RCS 5.7) behavior, fixing a core dump.
+       * sanity.sh (reserved): New tests reserved-16 through reserved-19
+       test for this fix.
+
+1998-08-05  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (unedit-without-baserev): Use ${QUESTION} not "?".
+       This makes it work with GNU expr 1.12 as well as 1.16.
+
+Sun Aug  2 20:27:44 1998  Noel Cragg  <address@hidden>
+
+       * mkmodules.c: add comment about TopLevelAdmin for the initial
+       contents of CVSROOT/config.
+
+1998-07-29  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_checkin): Only try to call xreadlink if HAVE_READLINK
+       is defined.
+
+Tue Jul 28 19:33:08 1998  Noel Cragg  <address@hidden>
+
+       * version.c: Change version number to 1.9.29.
+
+       * rcs.c (RCS_checkin): add code to follow symbolic links in the
+       repository.
+
+Sun Jul 26 05:14:41 1998  Noel Cragg  <address@hidden>
+
+       * This set of changes reverts the code to pre-1.9.2 behavior and
+       does not create CVS directories at top-level (except for the
+       obvious "cvs co .").  Added a new configuration option to switch
+       between 1.9 and 1.9.2 behavior.
+
+       * recurse.c (do_argument_proc): new function.
+       (start_recursion): in the case that we've done a command from
+       top-level but have no CVS directory there, the behavior should be
+       the same as "cvs <cmd> dir1 dir2 dir3...".  Make sure that the
+       appropriate "Argument" commands are sent to the server by calling
+       walklist with do_argument_proc.
+
+       * client.c (call_in_directory): only create the top-level CVS
+       directory when we're checking out "." explicitly.  The server will
+       force creation of this directory in all other cases.
+
+       * checkout.c (checkout_proc): only generate the top-level
+       directory when the TopLevelAdmin=yes.  Also send a message to the
+       client to do the same.
+
+       * parseinfo.c (parse_config): handle TopLevelAdmin option.  Set
+       top_level_admin.
+
+       * main.c: add new variable top_level_admin.
+       * cvs.h: add extern definition for above.
+
+       * sanity.sh: since we're reverting to pre 1.9.2 behavior for
+       top-level CVS directories, I needed to make changes to a bunch of
+       tests that made assumptions about said directories.
+       (preamble): make sure to add read and execute access to everything
+       in TMPDIR before removing, since some tests make things read-only.
+       (basicb-1a, basicb-1b, basicb-9a, basicb-9b): use dotest_fail
+       because these tests check for the non-existant top-level CVS
+       directory.
+       (basicc-3, emptydir-6, emptydir-7, crerepos-6): use "rm -rf" so it
+       won't complain when trying to remove the non-existant top-level
+       CVS directory.
+       (106.5): remove imported-f2-orig.tmp.
+       (modules2-10, emptydir-4, abspath-1ba, abspath-1bb): cd into the
+       directory where files exist before using the "add" command so cvs
+       can find CVSROOT in CVS/Root.
+       (cvsadm-2): look at a different CVS/Repository file, since the
+       top-level one doesn't exist.
+       (taginfo-3): create the directory in the repository directly
+       rather than relying on the fact that the top-level CVS directory
+       was created in a previous test.
+       (serverpatch-6): update first-dir explicity, rather than relying
+       on the non-existant top-level CVS/Entries file.
+       (crerepos-18): look at CVS/Repository in a subdirectory rather
+       than in the non-existant top-level CVS directory.
+       (toplevel): add code to set TopLevelAdmin=yes.
+       (toplevel2): new tests -- same as toplevel, but TopLevelAdmin=no.
+
+1998-07-21  Jim Meyering  <address@hidden>
+
+       * rcs.c (RCS_checkout): Hoist frees of rev and value.
+       Warn and return 1 in several cases rather than exiting via
+       `error (1, ...'.  The latter could abort a multi-file commit
+       in mid-stream, leaving stale locks in the repository.
+
+1998-07-16  Jim Kingdon  <address@hidden>
+
+       * build_src.com (rcscmds.c): Also look for include files in
+       [-.diff], just like Ian's 1998-06-18 change to Makefile.in
+
+1998-07-14  Jim Kingdon  <address@hidden>
+
+       * tag.c (pretag_proc), rtag.c (pretag_proc): Don't pass RUN_REALLY
+       to run_exec.  This means that taginfo does not get executed if the
+       global -n option is specified.  Which makes it like loginfo, -i,
+       -e, -o, -t, -u in modules, editinfo, and verifymsg and unlike
+       commitinfo.  The old behavior was pretty bad in the sense that it
+       doesn't provide any way to log only the tags which actually
+       happen.
+       * sanity.sh (taginfo): New tests taginfo-11 to taginfo-13, for this.
+
+1998-07-12  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (ann-id): Write the test so that it tests for the
+       current (buggy) behavior.
+
+       * sanity.sh (taginfo): Also clean up cvsroot/first-dir.
+
+1998-07-12  Jim Meyering  <address@hidden>
+
+       * sanity.sh (ann-id): New (currently failing) test for bug in how
+       rcs keywords are expanded in the output of `cvs annotate'.
+
+1998-07-12  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (taginfo): Write the TESTDIR into the script rather
+       than having the script look at the environment.  This means that
+       it will work if TESTDIR is set by sanity.sh as well as if
+       sanity.sh finds TESTDIR in the environment.
+
+1998-07-11  Jim Kingdon  <address@hidden>
+
+       * tag.c (check_fileproc): Calculate the revision to be tagged the
+       same way that tag_fileproc does.
+       * sanity.sh (taginfo): New tests, test for this (before this fix,
+       brtag had said 1.1 not 1.1.2.1).
+
+1998-07-10  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (unedit-without-baserev): Also clean up "2" directory.
+
+1998-07-08  Jim Kingdon  <address@hidden>
+
+       * edit.c (unedit_fileproc): If the Baserev file is missing, don't
+       get the working file from CVS/Base.  The previous code could get
+       you version 1.1 of the working file and put 1.2 in CVS/Entries.
+       * sanity.sh (unedit-without-baserev): New tests test for this.
+
+1998-07-02  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (unedit-without-baserev): Move the test itself to be
+       in the same order as in the "tests" variable.
+
+1998-07-02  Ian Lance Taylor  <address@hidden>
+
+       * rcscmds.c: Don't include <stdarg.h> or <vasprintf.h>.  Don't
+       declare vasprintf.
+       (call_diff_printf_output): Remove.
+       (call_diff_stdout_callbacks): Don't initialize printf_output
+       field--it has been removed from the interface.
+       (call_diff_file_callbacks): Likewise.
+
+1998-07-01  Jim Meyering  <address@hidden>
+
+       * edit.c (unedit_fileproc): Handle the case in which base_get
+       returns a NULL baserev.  That happens when a file being `unedit'ed
+       exists in the CVS/Base directory, but isn't listed in the CVS/Baserev
+       file.  The one case I've seen had no Baserev file at all.  The symptom
+       (if you're lucky) is a segmentation fault upon unedit.  If you use
+       SunOS4.1.4 for which printf prints NULL pointers as `(null)', your
+       unedit command will complete normally, but it will have corrupted
+       your CVS/Entries file and a subsequent update may result in an
+       assertion failure, a core dump, and a stale lock in the repository.
+       * sanity.sh (unedit-without-baserev): New test for this.
+
+1998-07-01  Andy Mortimer of aeat.co.uk
+       and Jim Kingdon  <address@hidden>
+
+       * server.c (server_updated): Use a prototype if we are using them
+       for declarations.
+
+1998-06-29  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (commit-readonly): Protect keyword against expansion
+       in sanity.sh itself.  Keep the keyword in the file which we check
+       in (or else this fails to test for the RCS_checkout change).
+
+1998-06-27  Jim Meyering  <address@hidden>
+
+       * rcs.c (RCS_checkout): If opening the local workfile fails due to
+       lack of write access, try to chmod the file and retry the open.
+       Before, a commit could fail part way through merely because the
+       open to rewrite with newly expanded rcs keywords would fail.  It's
+       easy to make this happen if you use `cvs -r' or CVSREAD and you
+       apply a patch to one of your read-only source files -- patch
+       preserves the read-only setting for the file and your next commit
+       will fail after committing that file, but before rewriting
+       (checking out) your working copy.
+       * sanity.sh (commit-readonly): New test for this.
+
+1998-06-25  Jim Kingdon  <address@hidden>
+
+       * update.c (patch_file): Update comments regarding context diffs
+       to reflect diff library.
+
+1998-06-23  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (modules4): Add tests for reversing the order of the
+       "!first-dir/sdir" and "first-dir".
+
+1998-06-23  Jim Kingdon  <address@hidden>
+       and Dave address@hidden
+
+       * sanity.sh (modes2): Touch the file before chmod'ing it.
+
+1998-06-21  Ian Lance Taylor  <address@hidden>
+
+       * update.c (merge_files): Revert changes of 1998-06-19.  Instead,
+       register a merged file with a dummy time stamp.  Only set
+       last_register_time if we need to.
+       (join_file): Likewise.  Always register a merged file, not just
+       when the merge fails.
+
+1998-06-21  Jim Kingdon  <address@hidden>
+
+       * call_diff_write_output, call_diff_printf_output,
+       call_diff_flush_output, call_diff_write_stdout, call_diff_error,
+       call_diff_stdout_callbacks, call_diff_file_callbacks): Re-indent.
+
+1998-06-19  Ian Lance Taylor  <address@hidden>
+
+       * update.c (merge_file): Make sure the time stamp of the file is
+       different from the time stamp we register in the Entries file.
+       (join_file): Likewise.
+
+1998-06-18  Ian Lance Taylor  <address@hidden>
+
+       * rcscmds.c: Include <stdio.h>.  Include either <stdarg.h> or
+       <varargs.h>.  Declare vasprintf.
+       (call_diff_write_output): New static function.
+       (call_diff_printf_output): New static function.
+       (call_diff_flush_output): New static function.
+       (call_diff_write_stdout): New static function.
+       (call_diff_error): New static function.
+       (call_diff_stdout_callbacks): New static variable.
+       (call_diff_file_callbacks): New static variable.
+       (call_diff): Don't sleep.  Use a callback structure when calling
+       the diff library.
+       (call_diff3): Likewise.
+
+       * rcscmds.c: Include diffrun.h.
+       (call_diff, call_diff3): Pass NULL callback parameter.
+       (diff_run, diff3_run): Don't declare.
+       * Makefile.in (rcscmds.o): New target, to use -I for diff
+       directory.
+       (zlib.o): Depend upon zlib.h.
+
+1998-06-09  Mike address@hidden
+
+       Make it compile with Sun's bundled K&R C compiler:
+       * rcs.c (count_delta_actions): Change to static to match
+       declaration.
+       * client.c (handle_wrapper_rcs_option): Rename error label to
+       handle_error to avoid clash with function name.
+
+1998-06-09  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_delete_revs): If we are trying to delete all
+       revisions, give an error rather than assertion failed.
+       * sanity.sh (basicb): New tests basicb-o* test for this.
+
+1998-06-04  Jim Kingdon  <address@hidden>
+
+       * add.c (add): Only send "Directory" requests if we need to.
+
+1998-06-02  Assar Westerlund  <address@hidden>
+
+       * client.c: Check for HAVE_GSS_C_NT_HOSTBASED_SERVICE rather than
+       assuming that GSS_C_NT_HOSTBASED_SERVICE is a macro.
+       * server.c: Likewise.
+
+1998-06-02  Jim Kingdon  <address@hidden>
+
+       * fileattr.c (fileattr_read): Check for NULL return from strchr.
+       * sanity.sh (devcom3): New test devcom3-10 checks for this.
+
+1998-06-01  Assar Westerlund  <address@hidden>
+       and Ian Lance Taylor  <address@hidden>
+
+       * client.c: If HAVE_GSSAPI_H, include <gssapi.h>.  Only include
+       <gssapi/gssapi.h> if HAVE_GSSAPI_GSSAPI_H.  Only include
+       <gssapi/gssapi_generic.h> if HAVE_GSSAPI_GSSAPI_GENERIC_H.
+       (GSS_C_NT_HOSTBASED_SERVICE): Define if not defined.
+       (connect_to_gserver): Use GSS_C_NT_HOSTBASED_SERVICE instead of
+       gss_nt_service_name.
+       * server.c: Same header file changes.
+       (GSS_C_NT_HOSTBASED_SERVICE): Define if not defined.
+       (gserver_authenticate_connection): Use GSS_C_NT_HOSTBASED_SERVICE
+       instead of gss_nt_service_name.
+
+1998-06-01  Jim Meyering  <address@hidden>
+
+       * sanity.sh (tag8k): Add a test for the 1998-05-02 rcs.c bug fix.
+
+1998-05-26  Jim Kingdon  <address@hidden>
+
+       * rcs.c (annotate): Call tag_check_valid like the other functions
+       which have a -r option.
+       * sanity.sh (ann): New test ann-14 tests for this.
+
+1998-05-24  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (importc): New tests importc-5 through importc-8 test
+       for a (fairly obscure) regression from CVS 1.9.
+
+1998-05-23  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (modules2): Add comment listing cvs release tests.
+       (info): New test info-cleanup-0 tests "cvs -n release".
+
+       * rcs.c (rcsbuf_getid): Remove semicolon at end of #undef.  I'm
+       kind of surprised that compilers accepted this at all, but
+       removing it squelches a warning for some compilers.
+
+       * version.c: Change version number to 1.9.28.1.
+
+       * Version 1.9.28.
+
+1998-05-22  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_cmp_file): Check for errors from CVS_FOPEN.  This
+       restores the CVS 1.9 behavior (fatal error if we can't open the
+       file), and corrects an apparent oversight in Ian's 13 Apr 1997
+       change.
+       * sanity.sh (modes2): New test, tests for this.
+
+1998-05-22  Ian Lance Taylor  <address@hidden>
+
+        * server.c (server_updated): Correct test for whether to unlink
+        the file.
+
+1998-05-20  Jim Kingdon  <address@hidden>
+
+       * wrapper.c (wrap_add): Disable -t/-f wrappers at least until the
+       serious bug can be fixed.
+
+1998-05-15  Jim Kingdon  <address@hidden>
+
+       * checkout.c (checkout): Call server_pathname_check on the
+       argument to "cvs co -d".
+       * server.c (server_pathname_check): Add comment about how we could
+       be handling absolute pathnames.
+       * sanity.sh (abspath): Rewrite the tests which run "cvs co -d /foo"
+       for remote, to reflect this.
+
+       * sanity.sh (abspath): Also do the "cannot rename" work-around for
+       abspath-7d.
+
+1998-05-13  Jim Kingdon  <address@hidden>
+
+       * commit.c (commit_filesdoneproc): Free admin_dir when done with it.
+
+1998-05-13  Jim Meyering  <address@hidden>
+
+       * sanity.sh (editor): Change bogus sed command, `s/^/x&/g', to `s/^/x/'.
+       The former exercised a bug in GNU sed-3.01-beta3.
+       (emptydir-8): Add `Rebuilding administrative file database' message,
+       since now it does that.
+       * commit.c (commit_filesdoneproc): Pass only the admin directory
+       pathname to mkmodules.
+       Remove #if 0, now that it's fixed.
+
+       * status.c (cvsstatus): Rename from `status' to avoid shadowing
+       lots of locals and parameters by the same name.
+       * server.c (serve_status): Update caller.
+       * main.c (cmds[]): Update table entry.
+       * cvs.h: Update prototype.
+
+       * commit.c (commit_filesdoneproc): Remove trailing blanks.
+       (commit) [CLIENT_SUPPORT]: Remove unnecessary (and local-shadowing)
+       declaration of `err'.
+       Rename global `tag' to `saved_tag' to avoid overshadowing `tag'
+       parameters of three functions.
+       Rename global `message' to `saved_message' to avoid overshadowing
+       `message' parameter of a function.
+       Rename global `ulist' to `saved_ulist' and move dcl up with others.
+
+1998-05-12  Jim Kingdon  <address@hidden>
+
+       * commit.c (commit_filesdoneproc): #if 0 the new code until it can
+       be fixed.
+
+       * commit.c (commit_filesdoneproc): Add comment explaining last
+       change.
+
+1998-05-12  Jim Meyering  <address@hidden>
+
+       * commit.c (commit_filesdoneproc): Call mkmodules not just when
+       committing a file directly under CVSROOT, but also when committing
+       files in subdirectories of CVSROOT.
+
+1998-05-08  Jim Meyering  <address@hidden>
+
+       * filesubr.c (xreadlink):  NUL-terminate the symbolic link name.
+       Use a much smaller initial buffer length.
+       Test errno only if readlink fails.
+       Use xstrdup then free the original link name so we don't waste space.
+
+1998-05-02  Jim Meyering  <address@hidden>
+
+       * rcs.c (rcsbuf_getword): Fix off-by-one error that would result in
+       an abort (the first one in rcsbuf_getkey) when operating on on some
+       ,v files with over 8192 bytes of tag and branch info.
+
+1998-05-04  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (ann): New tests ann-12 and ann-13 test for specifying
+       a numeric branch.
+
+1998-05-02  Jim Kingdon  <address@hidden>
+
+       * rcs.c: Add comments about getting rid of rcsbuf_getid,
+       rcsbuf_getword, and rcsbuf_getstring.
+
+       * sanity.sh (abspath): Revise the workarounds to deal with exit
+       status.
+
+1998-04-30  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (abspath): Work around the "cannot rename" bug.
+
+1998-04-27  Jim Kingdon  <address@hidden>
+
+       * classify.c (Classify_File): Add comments about checking whether
+       command name is "update".
+
+1998-04-22  Jim Kingdon  <address@hidden>
+
+       * version.c: Change version number to 1.9.27.1.
+
+       * Version 1.9.27.
+
+1998-04-20  Jim Kingdon  <address@hidden>
+
+       (This diff was run by devel-cvs and everyone seemed to like it).
+       * diff.c (diff_file_nodiff): Make HEAD mean the head of the branch
+       which contains the sticky tag, not the sticky tag itself.
+       * rcs.c, rcs.h (RCS_branch_head): New function.
+       * sanity.sh (head): Update for this changed behavior.
+
+1998-04-19  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Move emptydir tests from basicb to new test emptydir.
+       This is because we now need a module definition to create Emptydir;
+       "co -d" doesn't cut it anymore.
+
+1998-04-17  Petri Virkkula
+
+       * server.c (mkdir_p): Ignore EROFS error (like for EACCES).
+
+1998-04-16  Jim Kingdon  <address@hidden>
+
+       * checkout.c (checkout_proc): Don't create directories above the
+       last one specified in "co -d".
+       (build_dirs_and_chdir): Revert Noel's change of 17 Feb 1998.
+       (struct dir_to_build): New field just_chdir.
+       (build_dirs_and_chdir): Test it.
+       * sanity.sh (abspath): New tests abspath-7* test for a bug which
+       we fix, in which CVS would create bogus "D/////" entries in
+       CVS/Entries.
+       (abspath): Revise abspath-3* tests to test for the fact that we no
+       longer create directories above the last one specified in "co -d".
+       I checked that CVS 1.9 gives an error on this, so changing this
+       behavior back should be OK.
+       (cvsadm-2d3): Likewise (also checked CVS 1.9 for this case).
+       (cvsadm-2d3d): Likewise (also checked CVS 1.9 for this case).
+       (cvsadm-2d{4,5,6,7,8}, cvsadm-N2d{3,4,5,6,7,8}): Adjust for new
+       behavior (same case as cvsadm-2d3).
+       (cvsadm-2d{4,5,6,7,8}d, cvsadm-N2d{3,4,5,6,7,8}d): Remove test
+       (same case as cvsadm-2d3d).
+       (cvsadm): For remote, skip most these tests.
+       (abspath): When cleaning up, delete mod1 and mod2 rather than mod1
+       twice (longstanding bug, apparently only becomes visible if you
+       run the tests in a certain order).
+
+1998-04-14  Wilfredo Sanchez  <address@hidden>
+
+       * rcs.c: variable "lockfile" was being referenced after being
+       free'd.  Bad.  Moved the free() call down.
+
+1998-04-12  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (rcs): Add test for annotate and the year 2000.
+
+       * server.c (do_cvs_command): If there are partial lines left when
+       the child process is done, send them along.
+       * sanity.sh (rcs, rcs2): Enable all tests for remote; tests for
+       this fix.
+
+1998-04-11  Jim Kingdon  <address@hidden>
+
+       * client.c (client_senddate): Pass SDATEFORM not DATEFORM to
+       sscanf.  This fixes a Y2K bug.
+
+       * history.c (history, select_hrec): Change since_date from time_t
+       to RCS format.  Use the usual machinery (in particular, Make_Date
+       and client_senddate) so that it will work on VMS too.
+       * main.c, cvs.h (date_from_time_t): New function.
+       * sanity.sh (history): New test, to test that this didn't break
+       anything (also tests client_senddate fix).
+
+1998-04-11  Norbert Kiesel  <address@hidden>
+
+       * server.c (cvs_output_binary): Shut up "gcc -Wall" by removing
+       unnecessary else if test.
+       * server.c (check_password): Fix uninitialized memory read if
+       shadow passwords are used.  Also added some comments.
+       * rcs.c (RCS_checkout): Make sure to call chown with -1 for uid or
+       gid if they should not be changed
+
+1998-04-10  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (rcs2): New test, tests for various Y2K cases.
+       * rcs.c (getdelta): Value for "state" keyword is optional (bug
+       discovered incidentally in writing rcs2 test).
+
+1998-04-09  Jim Kingdon  <address@hidden>
+
+       * filesubr.c, cvs.h (link_file): Remove; no longer used.
+
+1998-04-08  Jim Kingdon  <address@hidden>
+
+       * recurse.c (do_dir_proc): Restore update_dir rather than a
+       computation which appears to, but does not necessarily, restore it
+       (reported by various people; this fix is from Greg Hudson).
+       * sanity.sh (importc): New test, tests for this fix.
+
+1998-03-27  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_lock): If the revision is already locked, give an
+       error rather than dumping core.
+       * sanity.sh (reserved): New test reserved-13c tests for this.
+
+1998-03-25  Loren J. Rittle
+
+       * import.c (add_rev): Rewrite to use RCS_FLAGS_KEEPFILE option
+       of RCS_checkin() to avoid damage to imported files instead of
+       externally undoing damage after the fact.  The side effect is
+       that callers of add_rev() may now incrementally walk the
+       entries of the current directory without seeing gratuitous
+       changes to the directory structure (under at least one file
+       system under at least one OS).
+
+1998-03-18  Jim Kingdon  <address@hidden>
+
+       * error.c (error): Save and restore errno.  Should fix test case
+       conflicts3-23 on SCO 5.0.2.  Reported by Steve Cameron.
+
+       * sanity.sh (admin): Rename admin-26-o* to admin-26-*; the "o"
+       stands for "cvs admin -o".  Add comment about length of tests.
+       Use ${PLUS}.
+
+1998-03-05  Dan Wilder <address@hidden>
+
+       * Fix problem with cvs admin in which -ntag:branch
+       option associated tag with the branch's head revision.
+       Should have used branch number.  Entailed in this fix,
+       the following.
+
+       * Add new functions "RCS_exist_rev", "RCS_exist_tag",
+       "RCS_tag2rev", and "RCS_valid_rev" to rcs.c.  RCS_tag2rev
+       is similar to RCS_gettag, but does less interpretation.
+
+       * Plug a small memory leak.
+
+       * Add tests admin-26 through admin-29 to sanity.sh,
+       to test "cvs admin -n".
+
+1998-03-17  Samuel Tardieu  <address@hidden>
+
+       * server.c (server_register): protect dereferencing timestamp in
+       the trace message when it is null, to avoid a segmentation fault.
+
+1998-03-16  Jim Kingdon  <address@hidden>
+
+       * options.h.in (MY_NDBM): Rewrite the comment explaining this
+       option.  It was not clear to everyone who "my" referred to, for
+       example.
+
+       * hardlink.c (list_linked_files_on_disk): Remove unused variables
+       err and p.
+       (list_linked_files_on_disk): Add comment about memory allocation
+       of return value.
+       * rcs.c (rcsbuf_getword): Shut up gcc -Wall with a "return 0".
+       (RCS_checkin): Remove unused variable fullpath.
+       * sanity.sh (hardlinks): Remove comment about spurious warnings;
+       the warnings are gone.
+
+1998-03-12  Tim Pierce  <address@hidden>
+
+       New functions for parsing and writing hardlink fields.
+       * rcs.c [PRESERVE_PERMISSIONS_SUPPORT] (puthardlink_proc): New
+       function.
+       (putdelta) [PRESERVE_PERMISSIONS_SUPPORT]: Use it.
+       (rcsbuf_getid, rcsbuf_getstring, rcsbuf_getword): New functions.
+       (getdelta): Call them, storing `hardlinks' field in vnode->hardlinks.
+       (RCS_reparsercsfile): When setting rdata->desc, xstrdup value
+       rather than rcsbuf_valcopying it (due to changes in how getdelta
+       handles keys and values in newphrases).
+
+       * sanity.sh (hardlinks): Use uglier filenames.  Checking out
+       hardlinked files no longer produces the same spurious diagnostics,
+       so fix that test.
+       (hardlinks-2.3): Renamed from hardlinks-2.2 (duplicate test name).
+
+       New infrastructure for managing hardlink lists internally...
+       * hardlink.c, hardlink.h (list_linked_files_on_disk,
+       compare_linkage_lists, find_checkedout_proc): New functions.
+       * rcs.h (struct rcsversnode) [PRESERVE_PERMISSIONS_SUPPORT]: New
+       member `hardlinks'.
+       * update.c (special_file_mismatch): Get hardlinks from
+       vp->hardlinks instead of from vp->other_delta.
+       * rcs.c (free_rcsvers_contents): Comment about freeing hardlinks
+       member.
+       (RCS_checkout) [PRESERVE_PERMISSIONS_SUPPORT]: Get hardlinks from
+       vers->hardlinks list instead of vers->other_delta.
+
+       ... and removed obsolete code from earlier revs.
+       * hardlink.c, hardlink.h (list_files_linked_to,
+       cache_hardlinks_proc, list_files_proc, set_hardlink_field_proc):
+       Removed.
+       * hardlink.h: Removed `links' member from hardlink_info struct.
+       * commit.c (commit): Remove the call to cache_hardlinks_proc.
+       (check_fileproc) [PRESERVE_PERMISSIONS_SUPPORT]: Removed reference
+       to hlinfo->links.
+       * hardlink.c (update_hardlink_info): Same.
+       * update.c (get_linkinfo_proc): Same.
+
+       * rcs.c (RCS_checkout) [PRESERVE_PERMISSIONS_SUPPORT]: Use
+       vp->hardlinks and find_checkedout_proc to find recently-updated
+       files that may be hardlinked.
+       * update.c (special_file_mismatch): Use List * structures and
+       compare_linkage_lists for rev1_hardlinks and rev2_hardlinks.
+
+1998-03-16  Larry Jones  <address@hidden>
+
+       * server.c (check_password): If shadow passwords are supported but no
+       entry is found in the shadow file, check the regular password file.
+
+1998-03-07  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Rename permissions test to perms since that is what
+       each of its individual tests are named.
+       * sanity.sh (perms symlinks hardlinks): Change CVSROOT to
+       CVSROOT_DIRNAME where appropriate.
+       (perms symlinks hardlinks): Disable/adjust the meat of the tests for
+       remote.
+       (symlinks): Link to ${TESTDIR}/fumble rather than
+       /fumble/mumble/grumble.  We shouldn't be making assumptions about
+       what might exist in random directories outside ${TESTDIR}.
+       * hardlink.c (cache_hardlinks_proc): Add comment about trimming
+       whitespace.
+
+1998-03-07  Tim Pierce  <address@hidden>
+
+       * rcs.c (RCS_checkout): Negation bug when checking out symlinks:
+       existence_error should be !existence_error.
+       * sanity.sh (permissions symlinks hardlinks): New tests, for
+       PreservePermissions.
+
+1998-03-04  Jim Kingdon  <address@hidden>
+
+       * version.c: Change version number to 1.9.26.1.
+
+       * Version 1.9.26.
+
+       * entries.c, cvs.h (Entries_Open): New argument update_dir; use it
+       in error message.
+       * add.c, checkout.c, client.c, find_names.c, import.c, recurse.c,
+       update.c: Pass it (as NULL except in call_in_directory).
+       * entries.c (Subdirs_Known): Just return if there is no CVSADM
+       directory (as in subdir_record).
+       * sanity.sh (conflicts3): New tests conflicts3-20a and
+       conflicts3-23 test for these fixes.
+
+       * commit.c (commit): Only set up hardlist if preserve_perms.
+
+       * commit.c, import.c, no_diff.c, parseinfo.c, rcs.c, rcscmds.c,
+       update.c: Omit the preserve_perms code if
+       PRESERVE_PERMISSIONS_SUPPORT is not defined.  Much of that code
+       won't even compile on non-unix systems.
+
+       * hardlink.c, hardlink.h: Use the 'standard' copyright (as found
+       in server.c).
+       * commit.c, rcs.c: Minor whitespace changes to Tim's submission.
+       * commit.c (check_fileproc), update.c (get_linkinfo_proc): Remove
+       unused variable delta.
+       * hardlink.c (set_hardlink_field_proc), update.c
+       (get_linkinfo_proc): Return a value rather than falling off the
+       end of the function.
+
+1998-03-02  Tim Pierce  <address@hidden>
+
+       * update.c (special_file_mismatch): Compare the hard links of the
+       two revisions.
+
+       * rcs.c (RCS_checkout):
+
+       * hardlink.c, hardlink.h: New files.
+       (hardlink_info): New struct.
+       (hardlist, working_dir): New variables.
+       (list_files_proc, cache_hardlinks_proc, set_hardlink_field_proc,
+       lookup_file_by_inode, update_hardlink_info, list_files_linked_to):
+       New functions.
+
+       * Makefile.in (SOURCES): Add hardlink.c.
+       (OBJECTS): Add hardlink.o.
+       (HEADERS): Add hardlink.h.
+       * commit.c: Include hardlink.h.
+       (commit): Save the working directory before recursing.  Walk the
+       hardlink list, calling set_hardlink_field_proc on each node.
+       (check_fileproc): Add each file's link information to hardlist.
+       * rcs.c: Include hardlink.h.
+       (RCS_checkin): Save list of hardlinks in delta node.
+       (RCS_checkout): Look up the file's `hardlinks' delta field, and
+       see if any of the files linked to it have been checked out
+       already.  Link to one of those files if so.
+       * update.c: Include hardlink.h.
+       (get_linkinfo_proc): New function.
+       (do_update): Extra recursion to collect hardlink info.
+       (special_file_mismatch): Reparse the RCS file if necessary.
+
+       fsortcmp is now used by several files, so let's make it extern.
+       * hash.c, hash.h (fsortcmp): New function.
+       * find_names.c (fsortcmp): Removed.
+       * lock.c (fsortcmp): Removed.
+
+1998-03-03  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (conflicts3): New tests conflicts3-14a,
+       conflicts3-14b, and conflicts3-21, conflicts3-22 test that we can
+       skip over a working directory with a CVSADM directory missing.
+
+1998-02-26  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (conflicts3): Tests conflicts3-16 and conflicts3-20
+       test that we include update_dir in messages.  Rename test
+       conflicts3-14 to fix typo.
+
+Sun Feb 22 23:14:25 1998  Steve Cameron  <address@hidden>
+       and Ian Lance Taylor  <address@hidden>
+
+       * update.c (tag_update_dir): New static variable.
+       (update_dirent_proc): If no tag or date were specified when
+       creating a subdirectory, use the tag and/or date of the parent
+       directory.
+       (update_dirleave_proc): If we set the tag and/or date in
+       update_dirent_proc, reset them when we leave the directory.
+       * sanity.sh (branches2): New set of tests for above patch, and
+       related behaviour.
+
+Sun Feb 22 13:31:51 1998  Ian Lance Taylor  <address@hidden>
+
+       * commit.c (lock_RCS): Don't call RCS_rewrite.
+
+       * update.c (patch_file): If the revision is dead, let
+       checkout_file handle it.
+       * sanity.sh (death2): Add test for above patch: add
+       death2-10a, death2-10b, death2-13a, and adjust
+       death2-{2,4,5,11,14,diff-11,diff-12,19}.
+
+       * cvs.h (RCS_FLAGS_KEEPFILE): Define.
+       * rcs.c (RCS_checkin): If RCS_FLAGS_KEEPFILE is set in the flags
+       parameter, don't unlink the working file.
+       * checkin.c (Checkin): Don't copy the file.  Instead pass
+       RCS_FLAGS_KEEPFILE to RCS_checkin, and only check the file out
+       again if it has changed.
+
+1998-02-21  Jim Kingdon  <address@hidden>
+
+       * rcs.c (rcs_internal_unlockfile, RCS_rewrite): Don't assume errno
+       means anything just because ferror is set.
+
+Sat Feb 21 20:02:24 1998  Ian Lance Taylor  <address@hidden>
+
+       * Makefile.in (clean): Change "/bin/rm" to "rm".
+
+       * buffer.c (buf_append_buffer): Correct typo in comment.
+       * rcs.c (RCS_putadmin): Likewise.
+
+Fri Feb 20 17:53:06 1998  Ian Lance Taylor  <address@hidden>
+
+       * rcs.c (rcs_internal_unlockfile): Pass errno when calling error
+       because ferror is true.
+
+1998-02-20  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (abspath): Don't assume that we can't write to /; this
+       is the kind of thing that is sure to break sooner or later
+       (especially on Windows).
+
+       * sanity.sh: Add summary of which modules tests are which (at
+       "modules").  Move cvsadm, abspath, and toplevel next to modules.
+       Add comments to clarify the structure (such as it is).
+
+Fri Feb 20 12:47:14 1998  Larry Jones  <address@hidden>
+
+       * admin.c (admin_fileproc): Better fix for -b.
+
+       * rcs.c (RCS_whatbranch): Back out previous change.
+       (RCS_getversion): Ditto.
+       (RCS_setbranch): Treat an empty revision string like a null pointer.
+
+1998-02-18  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_whatbranch): Fix indentation.
+
+       * patch.c (patch_fileproc): Check for errors from fclose; check
+       for errors from fopen properly.
+
+Wed Feb 18 16:03:37 1998  Larry Jones  <address@hidden>
+
+       * admin.c (admin_fileproc): Convert -b argument from symbolic name
+       to revision number before storing in the RCS file.
+       * rcs.c (RCS_whatbranch): Allow numeric as well as symbolic revision.
+       (RCS_getversion): Take advantage of above.
+       * sanity.sh (admin): Add/revise/renumber admin-10c, admin-11a,
+       admin-12, and admin-12a to check above.
+
+       * commmit.c (lock_RCS): Minor clean-up.
+
+       * sanity.sh (abspath-6a): Don't depend on the sepcific contents of
+       CVSROOT, it depends on which other tests have been run.
+
+Wed Feb 18 01:56:04 1998  Ian Lance Taylor  <address@hidden>
+
+       * rcs.c (putsymbol_proc): Use putc and fputs rather than fprintf.
+       (RCS_putadmin): Don't call RCS_symbols if the symbols have not yet
+       been converted to a list.
+
+       * rcs.c (rcsbuf_cache, rcsbuf_cache_open, rcsbuf_cache_close): New
+       static functions to avoid closing and reopening the RCS file.
+       (cached_rcs, cached_rcsbuf): New static variables.
+       (RCS_parse): Call rcsbuf_cache_close.  Don't call fclose.
+       (RCS_parsercsfile): Likewise.
+       (RCS_parsercsfile_i): Call rcsbuf_cache rather than
+       rcsbuf_close.  Call fclose on error.  Remove comment about
+       inefficiency of opening file twice.
+       (RCS_reparsercsfile): Call rcsbuf_cache_open rather than fopen and
+       rcsbuf_open.  Call rcsbuf_cache rather than rcsbuf_close and
+       fclose.
+       (RCS_fully_parse, RCS_checkout, RCS_deltas): Likewise.
+       (RCS_rewrite): Likewise.
+       (RCS_checkin): Call rcsbuf_cache_close.
+
+       * rcs.c (RCS_copydeltas): Fix code which checks for an extra
+       newline in buffered data.
+
+       * rcs.c (rcsbuf_getkey): Save an indirection by using start rather
+       than *valp when trimming trailing whitespace from value.
+
+       * rcs.c (rcsbuf_get_buffered): New static function.
+       (RCS_copydeltas): After we have done all the required special
+       actions, and inserted any new revision, just copy the file bytes
+       directly, rather than interpreting all the data.
+       (count_delta_actions): New static function.
+       * sanity.sh (rcs): Add rcs-6a and rcs-6b to commit a new branch
+       revision, to force CVS to interpret all the data, rather than just
+       copying it.  Adjust rcs-5 to add a branch tag.  Adjust rcs-8a and
+       rcs-14 for the changes created by rcs-6b.
+
+Tue Feb 17 18:34:01 1998  Ian Lance Taylor  <address@hidden>
+
+       * sanity.sh (cvsadm, diffmerge2): Remove directories at the end of
+       the test.
+
+       * import.c (expand_at_signs): Rewrite to use memchr and fwrite
+       rather than putc.
+
+       Rewrite RCS file reading routines for speed:
+       * rcs.c (struct rcsbuffer): Define.
+       (rcsbuf_open, rcsbuf_close, rcsbuf_getkey, rcsbuf_getrevnum,
+       rcsbuf_fill, rcsbuf_valcopy, rcsbuf_valpolish,
+       rcsbuf_valpolish_internal, rcsbuf_ftell): New static functions.
+       (getrcskey, getrcsrev, getrevnum): Remove.
+       (many functions): Change to use new rcsbuf functions instead of
+       old getrcskey/getrcsrev/getrevnum functions.
+       (RCS_reparsercsfile): Add rcsbufp parameter.  Change all callers.
+       (RCS_deltas): Add rcsbuf parameter.  Change all callers.
+       (getdelta): Change fp parameter to rcsbuf parameter.  Change all
+       callers.
+       (RCS_getdeltatext): Add rcsbuf parameter.  Change all callers.
+       (RCS_copydeltas): Add rcsbufin parameter.  Change all callers.
+       * rcs.h (RCS_reparsercsfile): Update declaration.
+       * admin.c (admin_fileproc): Update calls to RCS_reparsercsfile for
+       new parameters.
+
+1998-02-17  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (toplevel): Also clean up second-dir (not a new
+       bug, but triggered by running tests as "toplevel abspath").
+
+       * create_adm.c (Create_Admin): Just print update_dir to tell the
+       user where we are; not the whole xgetwd.  Cleaner than
+       Noel's change (which also had problems in errno handling).
+       * sanity.sh (toplevel-12): Update accordingly.
+
+Tue Feb 17 02:32:21 1998  Noel Cragg  <address@hidden>
+
+       [These mods make "checkout" work with "-d /absolute/pathname"
+       once again.]
+
+       * checkout.c (checkout_proc): the -d flag on the command line
+       should override the -d flag in the modules file if the latter is
+       an absolute path.  The loop that assembles the list of directories
+       to build has been reorganized slightly to prepare for rewriting
+       with last_component rather than assuming '/' as a path separator.
+       Also added to that loop was some code to handle absolute
+       pathnames.
+       (build_dirs_and_chdir): add a new argument that tells this routine
+       whether or not to check before it creates and populates
+       directories or not.
+
+       * filesubr.c (last_component): return the top-level directory when
+       asked about the top-level directory.
+
+       * sanity.sh (toplevel-12): change test to reflect the new style of
+       this error message.
+
+       * create_adm.c (Create_Admin): include the directory in the error
+       message.
+
+1998-02-16  Jim Kingdon  <address@hidden>
+
+       * diff.c (diff_fileproc), import.c (import, add_rcs_file), rcs.c
+       (RCS_cmp_file): Don't ignore errors from CVS_UNLINK and fclose.
+
+       * patch.c (patch_fileproc): Check for errors from fclose; if we
+       get -1 from getline check for end of file vs. error.
+
+       * rcs.c (RCS_checkout): Comment return value (0/1, not -1).
+       * commit.c, diff.c, mkmodules.c, patch.c, rcs.c, update.c: Update
+       to match this convention.  Don't suppress errors based on
+       quiet or really_quiet variables.
+
+       Fix a longstanding bug which also makes stamps-8kw in make
+       remotecheck work again (it stopped working with Ian's 8 Feb 98
+       checkin):
+       * client.c, client.h (change_mode): If new argument respect_umask
+       is set, then honor the umask.
+       * client.c, server.c: Update callers.
+
+       Cleanups to Tim's checkin:
+       * rcs.c (RCS_checkout): Use existence_error not ENOENT.
+       * commit.c (checkaddfile): Remove comment about whether we want to
+       check for errors from fclose; there is no reason not to.
+       * rcs.c (RCS_checkout), update.c (special_file_mismatch): sscanf
+       on %ld requires an unsigned long, not a dev_t.
+       * update.c (special_file_mismatch): Remove unused variable
+       check_devnums.
+       * mkmodules.c (config_contents): Between two settings, use a blank
+       line not a "#" line.
+
+1998-02-15  Tim Pierce  <address@hidden>
+
+       [This is the code as submitted.  I'll be checking in my cleanups
+       shortly.  This work sponsored by Abbott Labs.  -kingdon]
+
+       Support for device special files, symbolic links, user and group
+       ownerships, and file permissions.
+
+       * parseinfo.c: (parse_config): Handle new config variable
+       `PreservePermissions'.
+       * mkmodules.c (config_contents): Add new PreservePermissions var.
+
+       * rcs.c, rcs.h (preserve_perms): New variable.
+       (RCS_checkout, RCS_checkin): Support for newphrases `owner',
+       `group', `permissions', `special', `symlink'.
+       (RCS_checkout): If `workfile' and `sout' are symlinks, remove them
+       before attempting to open them for writing.
+       * import.c (add_rcs_file): Support for newphrases.  Do not attempt
+       to read data from special files or symlinks.  Error message
+       `cannot fstat' is now `cannot lstat'.
+
+       New metrics for deciding when two files are different:
+
+       * update.c, cvs.h (special_file_mismatch): New function.
+       (merge_file, join_file): Call it.
+       * no_diff.c (No_Difference): Call it.
+
+       * filesubr.c (xcmp): Consider files to be different if they are of
+       different types; if they are symlinks which link to different
+       pathnames; or if they are devices with different device numbers.
+       Error message is now `cannot lstat'.
+       * rcs.c (RCS_cmp_file): Use `xcmp' to compare files, simplifying
+       the special handling for nonregular files.
+
+       * rcscmds.c (diff_exec, diff_execv): If asked to obtain diffs for
+       special files, report no differences.
+
+       Miscellaneous changes to make special file support possible:
+
+       * commit.c (fix_rcs_modes): Don't attempt to `fix' permissions on
+       a symlink.
+
+       * import.c (add_rcs_file): Don't try to close fpuser if it was
+       never opened (e.g. when operating on a symlink).
+
+       * filesubr.c, cvs.h (isdevice, xreadlink): New functions.
+       * filesubr.c (copy_file): Handle special files and symlinks.
+       (xchmod): Do nothing if `preserve_perms' is set.
+
+       * commit.c (checkaddfile): Replace `copy_file (DEVNULL, ...)' with
+       fopen/fclose calls.  Copy_file no longer attempts to read data
+       from device files.
+
+       * filesubr.c (islink): Use CVS_LSTAT, not lstat.
+       * vers_ts.c (time_stamp, time_stamp_server): Use CVS_LSTAT, not stat,
+       to get symlinks right.
+       * subr.c (get_file): Same.  Don't attempt to read from special
+       files or symlinks.
+
+       * classify.c (Classify_File): Doc fix.
+
+Fri Feb 13 17:07:32 1998  Eric Mumpower  <address@hidden>
+       and Ian Lance Taylor  <address@hidden>
+
+       Fix some file system ordering problems found on Irix 6.4:
+       * sanity.sh (basic2): Use dotest_sort for test 56.
+       (importb): Use dotest_sort for tests importb-1 and importb-2.
+       (head): Use dotest_sort for test head-1.
+
+Thu Feb 12 15:15:33 1998  Jim Kingdon  <address@hidden>
+
+       * import.c (add_rcs_file): If add_logfp is NULL, don't call fperror.
+
+11 Feb 1998  Andy Piper
+
+       * server.c (cvs_output_binary): Use OPEN_BINARY not _O_BINARY.
+
+Mon Feb  9 18:34:39 1998  Jim Kingdon  <address@hidden>
+
+       Tweaks to Ian's checkin:
+       * update.c (merge_file): Remove comment about sending file to
+       client before the message.  It doesn't apply to this code any more
+       (it does apply to checkout_file, but I'm not sure it is important
+       to have such a comment anyway).
+       * buffer.c (buf_default_memory_error, buf_length): Reindent.
+       * server.h: Declare struct buffer before use.
+
+Mon Feb  9 21:05:28 1998  Ian Lance Taylor  <address@hidden>
+
+       * rcs.c (RCS_fully_parse): Call getrevnum rather than getrcsrev.
+       Don't bother with ungetc.
+
+       * rcs.c (getrcsrev): Rewrite to simply call getrevnum.
+
+Sun Feb  8 15:49:39 1998  Ian Lance Taylor  <address@hidden>
+
+       Don't have the server check out a revision into a file and then
+       immediately read the file; just read into a buffer instead.
+       * update.c: Include buffer.h.
+       (update_fileproc): Let checkout_file call server_updated.
+       (checkout_file): Add merging and update_server parameters.  Change
+       all callers.  If server_active, don't mess with backup files.  If
+       server_active, copy the revision into a buffer rather than a file
+       when possible.  If update_server, call server_updated.  Fix
+       handling of error status.
+       (checkout_to_buffer): New static function used by checkout_file.
+       (merge_file): Let checkout_file call server_updated.
+       (join_file): Likewise.
+       * server.c (server_updated): Change file_info parameter to mode
+       parameter.  Add filebuf parameter.  Change all callers.  If
+       filebuf is not NULL, don't read the file.
+       * server.h (server_updated): Update declaration.
+       * buffer.c (buf_free): New function.
+       (buf_append_buffer): New function.
+       (buf_length): New function.
+       * buffer.h (buf_free, buf_append_buffer, buf_length): Declare.
+
+       * buffer.c: (buf_initialize): If the memory parameter is NULL, use
+       buf_default_memory_error.
+       (buf_default_memory_error): New static function.
+       * buffer.h (BUFMEMERRPROC): Define typedef.
+       * client.c (buf_memory_error): Remove.
+       (start_server): Pass NULL rather than buf_memory_error as buffer
+       memory error function.
+
+Sat Feb  7 16:27:30 1998  Ian Lance Taylor  <address@hidden>
+
+       * rcs.c (RCS_parsercsfile_i): Read the expand keyword from the RCS
+       file.  We do this because Version_TS calls RCS_getexpand in many
+       common cases, and we don't want to reopen the file just for that.
+       (RCS_reparsercsfile): Skip the expand keyword.
+       (RCS_getexpand): Don't call RCS_reparsercsfile.
+
+       * rcs.c (STREQ): New macro.  In all string equality tests in the
+       file, replace strcmp with STREQ.
+
+Fri Feb  6 16:14:49 1998  Ian Lance Taylor  <address@hidden>
+
+       * update.c (checkout_file): If we've already removed the backup
+       file once, don't try to remove it again.
+
+       * filesubr.c (unlink_file_dir): Call stat rather than isdir, and
+       don't call unlink if the file does not exist.
+
+       * myndbm.c (mydbm_load_file): Rename line_len to line_size.  Call
+       getstr rather than getline, to avoid any confusion between \n and
+       \012.  Use the line length returned by getstr rather than calling
+       strlen.  Remove local variable len.
+
+Fri Feb  6 13:23:46 1998  Jim Kingdon  <address@hidden>
+
+       * rcs.c (RCS_parsercsfile_i): Don't suppress errors on
+       really_quiet.
+       (RCS_parsercsfile_i, RCS_reparsercsfile, RCS_fully_parse,
+       RCS_deltas, getdelta, getrcskey, RCS_getdeltatext):
+       Check for errors.  Include errno in error messages.  Include
+       filename in error messages.  Pass new argument to getrcskey.
+       (getrcskey): New argument NAME, so we can report errors ourself.
+
+Fri Feb  6 12:10:18 1998  Ian Lance Taylor  <address@hidden>
+
+       * rcs.c (RCS_reparsercsfile): Don't use ftell/fseek; just keep
+       track of whether we've already read a key/value pair.  Use sizeof
+       rather than strlen for a constant string.  Pass the current key
+       and value to getdelta, and get them back as well.
+       (getdelta): Add keyp and valp parameters.  Don't use ftell/fseek;
+       just return the key/value pair to the caller.  Don't allocate
+       vnode before we know we need it.  Check one getrcskey return
+       value.  Use sizeof rather than strlen for a constant string.
+
+       * rcs.c (getrcskey): Correct comment describing return value.
+
+Thu Feb  5 22:51:13 1998  Ian Lance Taylor  <address@hidden>
+
+       * subr.c (getcaller): Cache the result, so that we don't keep
+       searching the password file.
+
+Wed Feb  4 23:31:08 1998  Jim Kingdon  <address@hidden>
+
+       * rcs.c (max_rev): Don't prototype.  Interesting that noone
+       complained about this until now.
+
+4 Feb 1998  Jim Kingdon
+
+       * rcs.c (RCS_checkin): When adding a new file, read it
+       with "rb" if binary.
+
+Fri Jan 30 11:32:41 1998  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Also test "first-dir" as the regexp in loginfo in
+       addition to ALL.
+
+       * main.c (main): Update year in copyright notice to 1998.
+
+Thu Jan 29 00:01:05 1998  Jim Kingdon  <address@hidden>
+
+       * version.c: Change version number to 1.9.25.
+
+       * Version 1.9.24.
+
+       * sanity.sh (multibranch2): File file2 and tests multibranch2-13
+       through multibranch2-15 test a slightly different case than the
+       rest of multibranch2.
+
+       * mkmodules.c (cvswrappers_contents): Rewrite.  The text didn't
+       describe -k and had various other problems.
+
+28 Jan 1998  Karl Fogel and Jim Kingdon
+
+       New feature to let server tell client about wrappers.
+       * client.h (struct response): Add comment about args being
+       '\0' terminated when passed to handle_* functions.
+       * client.c (start_server): send "wrapper-sendme-rcsOptions" to
+       server iff supported.
+       (responses): new response "Wrapper-rcsOption"; allows the server
+       to send certain lines from its cvswrappers file.
+       (handle_wrapper_rcs_option): new func, handles "Wrapper-rcsOption"
+       response from server.
+       * server.c (serve_wrapper_sendme_rcs_options): new func, sends
+       server side CVSROOT/cvswrappers rcs option lines to client.
+       (requests): new request "wrapper-sendme-rcsOptions"; if received,
+       we know we can send "Wrapper-rcsOption..." to the client.
+       * wrapper.c (wrap_unparse_rcs_options): new func; repeated calls
+       step down the wrapper list returning rcs option entries, but
+       repackaged as cvswrappers lines.
+       (wrap_setup): new guard variable `wrap_setup_already_done'; if
+       this function has run already, just return having done nothing.
+       Add comment concerning environment variable.
+       * cvs.h: declare wrap_unparse_rcs_options().
+
+Tue Jan 27 18:27:19 1998  Ian Lance Taylor  <address@hidden>
+
+       * rtag.c (rtag_dirproc): Call ignore_directory, and skip the
+       directory if it returns true.
+       * sanity.sh (modules4): New set of tests to test some aspects of
+       excluding directories in the modules file, including the above
+       patch.
+
+Thu Jan 22 10:05:55 1998  Jim Kingdon  <address@hidden>
+
+       * server.c (serve_kopt): Check for length of arg.  Based on
+       inspection of the code, plugs a buffer overrun security hole which
+       was introduced Monday.
+
+       * server.c (serve_is_modified): Don't call xmalloc; we aren't
+       allowed to call error() here.  Remove duplicate (and potentially
+       confusing) variable 'p'.
+
+       * log.c (log_fileproc): Look for first character of version
+       '0' AND second character '\0', rather than OR.  I didn't try to
+       come up with a test case but this looks like a simple thinko
+       (albeit one which would show up in obscure cases if at all).
+
+Tue Jan 20 19:37:53 1998  Jim Kingdon  <address@hidden>
+
+       * client.c (send_dirent_proc): Don't send nonexistent directories
+       unless noexec.
+       * sanity.sh (modules2): New tests modules2-13 through modules2-18
+       test for this fix.
+
+Mon Jan 19 11:17:51 1998  Jim Kingdon  <address@hidden>
+
+       * server.c (serve_kopt): New function.
+       (requests): Add "Kopt" request.
+       (kopt): New variable.
+       (serve_is_modified): Write kopts from there into entries.
+       (serve_modified): Call serve_is_modified so we do the same.
+       Declare serve_modified and serve_is_modified.
+       * vers_ts.c (Version_TS): Set ->options even for a dummy ("D"
+       timestamp) entry.
+       * import.c (process_import_file): Check for -k options.
+       * client.c (client_process_import_file): Send Kopt request.
+       (send_fileproc): Likewise, for "cvs add".
+       * sanity.sh: Enable test binwrap3-sub2-add1 for remote.
+       Add -I .cvswrappers to binwrap3-2a; adjust binwrap3-2d
+       accordingly.  Tests for this fix.
+
+Mon Jan 19 08:48:59 1998  Larry Jones  <address@hidden>
+
+       * sanity.sh (errmsg1): Append test 168 output to log file.
+
+Sat Jan 17 08:01:51 1998  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (ann-10, ann-11): Don't make assumptions about the
+       number of characters in the username.
+
+Fri Jan 16 15:34:02 1998  Larry Jones  <address@hidden>
+
+       * diff.c (diff_fileproc): Free label1 and label2 when finished.
+
+       * edit.c (editor_set): Don't free edlist until after we're
+       done using it.
+
+       * rcscmds.c (RCS_merge): Free xrev1 and xrev2 when finished.
+
+       * subr.c (make_message_rcslegal): Don't access uninitialized or
+       unallocated memory; only strip trailing blank lines.
+       * sanity.sh (log-3): Enhance to test this fix.
+
+Fri Jan 16 12:41:03 1998  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Add keywordlog to list of tests run by default.
+
+       * rcs.c (RCS_deltas): Don't call cvs_output if length is zero;
+       passing zero length to cvs_output does not mean output zero
+       bytes.  The 27 Dec 1997 change to no longer '\0'-terminate the
+       ->text field turned this from a time bomb to a user-visible bug.
+       * sanity.sh (ann): New tests, test for this fix and other annotate
+       behaviors.
+
+Thu Jan 15 23:52:00 1998  Jim Kingdon  <address@hidden>
+
+       * root.c (root_allow_ok): If inetd.conf didn't specify an
+       --allow-root options at all, we know we are in trouble.  Give a
+       specific error message.
+
+Thu Jan 15 21:24:59 1998  Ian Lance Taylor  <address@hidden>
+
+       * sanity.sh (dotest_sort): New variant of dotest which sorts the
+       output, for use when the output depends upon details of the file
+       system, typically when doing an import.
+       (rdiff): Use dotest_sort for rdiff-1.
+       (ignore): Use dotest_sort for 188a, 188b, 189d, 190, and 191.
+
+       * sanity.sh: (TESTSHELL): New variable.
+       (editor, info, reserved): Use TESTSHELL in temporary script.
+
+       * sanity.sh (ignore): Do all tests in subdirectory, to avoid
+       conflict between cvsroot and CVSROOT on Windows.
+       (binwrap3, mwrap, info, config): Likewise.
+
+       * sanity.sh (binfiles2): Correct test name binfile2-7-brmod to
+       binfiles2-7-brmod.
+
+       * release.c (release_delete): If __CYGWIN32__ is defined, don't
+       worry about mismatched inodes.  This is a hack, but then I think
+       the test is rather peculiar anyhow.
+
+Thu Jan 15 16:07:36 1998  Larry Jones  <address@hidden>
+
+       * sanity.sh (reserved-9): Use ${PROG} instead of "cvs".
+
+Wed Jan 14 15:43:13 1998  Jim Kingdon  <address@hidden>
+
+       * Split ChangeLog into ChangeLog-97 and ChangeLog.
+       * Makefile.in (DISTFILES): Add ChangeLog-97.
+
+13 Jan 1998  Jim Kingdon
+
+       * client.c: Declare handle_mt.
+
+Tue Jan 13 22:21:30 1998  Jim Kingdon  <address@hidden>
+
+       * sanity.sh: Add comment about how pwd and /bin/pwd often differ
+       in behavior (but are not guaranteed to).
+
+Tue Jan 13 13:49:53 1998  Ian Lance Taylor  <address@hidden>
+
+       * sanity.sh: When setting TMPPWD use just pwd, not /bin/pwd.
+
+       * update.c (checkout_file): Don't pass set_time as true to
+       Version_TS if the file is dead.
+       * sanity.sh (modules): Add tests modules-155c6 through
+       modules-155c8 to test for above patch (without the above patch,
+       modules-155c8 will fail when remote).
+
+Tue Jan 13 10:37:02 1998  Larry Jones  <address@hidden>
+
+       * client.c (send_modified): Change bufsize and newsize from int
+       to size_t to avoid type clashes in call to read_and_gzip.
+
+Tue Jan 13 10:33:02 1998  Larry Jones  <address@hidden>
+
+       * zlib.c (read_and_gzip): Set finish to 0; it was uninitialized.
+
+Tue Jan 13 10:26:43 1998  Larry Jones  <address@hidden>
+
+       * add.c, rcs.c: Plug memory leaks.
+
+Mon Jan 12 10:45:27 1998  Larry Jones  <address@hidden>
+
+       * server.c (mkdir_p): Don't try to create nameless directories
+       (i.e., given "/foo//bar", don't try to create "/foo/",
+       just "/foo" and "/foo//bar") since it isn't necessary and
+       it fails on some systems in unexpected ways.
+
+1998-01-11  enami tsugutomo  <address@hidden>
+
+       * rcs.c (linevector_copy): Delete lines before overwriting them.
+
+Sat Jan 10 11:05:40 1998  Jim Kingdon  <address@hidden>
+
+       * cvsrc.c, entries.c, login.c, logmsg.c, myndbm.c, patch.c,
+       release.c, server.c: Check for errors from getline, CVS_FOPEN,
+       fprintf, CVS_UNLINK and fclose.  Note that the new errors are
+       nonfatal.  This is because of conservatism more than because
+       it is always the best thing.
+       * login.c (get_cvs_password): Close the file when done with it.
+       * client.c (notified_a_file): If -1 return from getline, check
+       feof rather than assuming errno is set.
+
+Fri Jan  9 14:38:54 1998  Jim Kingdon  <address@hidden>
+
+       * server.c (expand_proc): Also output server_dir in
+       "Module-expansion", not just in output_dir ("Created", &c).
+       * sanity.sh (modules2): New tests modules2-9 through modules2-12
+       test for this.
+
+Thu Jan  8 12:56:55 1998  Yasutoshi Hiroe  <address@hidden>
+
+       * import.c (import): Don't strcat on uninitialized memory.  Fixes
+       possible SIGSEGV with zero-length message.
+
+Tue Jan  6 22:56:29 1998  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (crerepos): Fix mistaken variable name which caused us
+       not to clean up at the end of the test.
+
+Mon Dec 22 01:40:57 1997  Jim Kingdon  <address@hidden>
+
+       * add.c (add): Also look for .cvswrappers files.
+       * sanity.sh (binwrap3): New tests binwrap3-2*, binwrap3-sub2-add*
+       test for this.
+
+Tue Jan  6 11:50:38 1998  Jim Kingdon  <address@hidden>
+
+       * sanity.sh (crerepos): New tests crerepos-8 through crerepos-18
+       test behaviors when mixing repositories.
+
+Sun Jan  4 17:40:22 1998  Jim Kingdon  <address@hidden>
+
+       * version.c: Change version number to 1.9.23.
+
+       * Version 1.9.22.
+
+
+For older changes see ChangeLog-97.
Index: ccvs/src/Makefile.am
diff -u /dev/null ccvs/src/Makefile.am:1.47.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/Makefile.am        Wed Dec 21 13:25:10 2005
@@ -0,0 +1,171 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for GNU CVS program.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+
+SHELL = /bin/sh
+
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib \
+              -I$(top_srcdir)/diff $(ZLIB_CPPFLAGS)
+
+bin_PROGRAMS = cvs
+bin_SCRIPTS = cvsbug
+
+# The cvs executable
+cvs_SOURCES = \
+       add.c \
+       admin.c \
+       annotate.c \
+       base.c base.h \
+       buffer.c \
+       checkin.c \
+       checkout.c \
+       classify.c \
+       client.c \
+       commit.c \
+       create_adm.c \
+       cvsrc.c \
+       diff.c \
+       difflib.c difflib.h \
+       edit.c \
+       entries.c \
+       error.c \
+       exithandle.c \
+       expand_path.c \
+       fileattr.c \
+       filesubr.c \
+       find_names.c \
+       gpg.c gpg.h \
+       hardlink.c \
+       hash.c \
+       history.c \
+       ignore.c \
+       import.c \
+       lock.c \
+       log.c \
+       log-buffer.c log-buffer.h \
+       login.c \
+       logmsg.c \
+       ls.c \
+       main.c \
+       mkmodules.c \
+       modules.c \
+       ms-buffer.c ms-buffer.h \
+       myndbm.c \
+       no_diff.c \
+       parseinfo.c parseinfo.h \
+       patch.c \
+       rcs.c \
+       rcscmds.c \
+       recurse.c \
+       release.c \
+       remove.c \
+       repos.c \
+       root.c \
+       rsh-client.c rsh-client.h \
+       run.c \
+       scramble.c \
+       server.c \
+       sign.c sign.h \
+       stack.c stack.h \
+       status.c \
+       subr.c subr.h \
+       tag.c \
+       update.c \
+       version.c \
+       vers_ts.c \
+       watch.c \
+       wrapper.c \
+       zlib.c \
+       buffer.h \
+       client.h \
+       cvs.h \
+       edit.h \
+       fileattr.h \
+       hardlink.h \
+       hash.h \
+       history.h \
+       myndbm.h \
+       rcs.h \
+       root.h \
+       server.h \
+       update.h \
+       watch.h
+
+EXTRA_cvs_SOURCES = gssapi-client.c gssapi-client.h \
+                    kerberos4-client.c kerberos4-client.h \
+                   socket-client.c socket-client.h
+
+cvs_DEPENDENCIES = $(cvs_client_objects) \
+       ../diff/libdiff.a \
+       ../lib/libcvs.a \
+       $(ZLIB_LIBS)
+cvs_LDADD = $(cvs_client_objects) \
+       ../diff/libdiff.a \
+       ../lib/libcvs.a \
+       $(ZLIB_LIBS) \
+       $(LIB_CLOCK_GETTIME) \
+       $(LIB_NANOSLEEP) \
+       $(LIBINTL)
+
+# General
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog-9194 \
+       ChangeLog-9395 \
+       ChangeLog-96 \
+       ChangeLog-97 \
+       build_src.com \
+       sanity.sh
+
+check-local: localcheck remotecheck nobaseremotecheck proxycheck
+
+.PHONY: maintainercheck-local
+maintainercheck-local: check-local nobaselocalcheck nobaseproxycheck
+
+.PHONY: localcheck
+localcheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs$(EXEEXT)
+
+.PHONY: nobaselocalcheck
+nobaselocalcheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -B `pwd`/cvs$(EXEEXT)
+
+.PHONY: remotecheck
+remotecheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs$(EXEEXT)
+
+.PHONY: nobaseremotecheck
+nobaseremotecheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -Br `pwd`/cvs$(EXEEXT)
+
+.PHONY: proxycheck
+proxycheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -p `pwd`/cvs$(EXEEXT)
+
+.PHONY: nobaseproxycheck
+nobaseproxycheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -Bp `pwd`/cvs$(EXEEXT)
+
+# Our distclean targets
+distclean-local:
+       rm -f check.log check.plog check.plog~
+
+## MAINTAINER Targets
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
Index: ccvs/src/Makefile.in
diff -u /dev/null ccvs/src/Makefile.in:1.162.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/Makefile.in        Wed Dec 21 13:25:10 2005
@@ -0,0 +1,803 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU CVS program.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = cvs$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/cvsbug.in $(srcdir)/sanity.config.sh.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = cvsbug sanity.config.sh
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \
+       base.$(OBJEXT) buffer.$(OBJEXT) checkin.$(OBJEXT) \
+       checkout.$(OBJEXT) classify.$(OBJEXT) client.$(OBJEXT) \
+       commit.$(OBJEXT) create_adm.$(OBJEXT) cvsrc.$(OBJEXT) \
+       diff.$(OBJEXT) difflib.$(OBJEXT) edit.$(OBJEXT) \
+       entries.$(OBJEXT) error.$(OBJEXT) exithandle.$(OBJEXT) \
+       expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \
+       find_names.$(OBJEXT) gpg.$(OBJEXT) hardlink.$(OBJEXT) \
+       hash.$(OBJEXT) history.$(OBJEXT) ignore.$(OBJEXT) \
+       import.$(OBJEXT) lock.$(OBJEXT) log.$(OBJEXT) \
+       log-buffer.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \
+       ls.$(OBJEXT) main.$(OBJEXT) mkmodules.$(OBJEXT) \
+       modules.$(OBJEXT) ms-buffer.$(OBJEXT) myndbm.$(OBJEXT) \
+       no_diff.$(OBJEXT) parseinfo.$(OBJEXT) patch.$(OBJEXT) \
+       rcs.$(OBJEXT) rcscmds.$(OBJEXT) recurse.$(OBJEXT) \
+       release.$(OBJEXT) remove.$(OBJEXT) repos.$(OBJEXT) \
+       root.$(OBJEXT) rsh-client.$(OBJEXT) run.$(OBJEXT) \
+       scramble.$(OBJEXT) server.$(OBJEXT) sign.$(OBJEXT) \
+       stack.$(OBJEXT) status.$(OBJEXT) subr.$(OBJEXT) tag.$(OBJEXT) \
+       update.$(OBJEXT) version.$(OBJEXT) vers_ts.$(OBJEXT) \
+       watch.$(OBJEXT) wrapper.$(OBJEXT) zlib.$(OBJEXT)
+cvs_OBJECTS = $(am_cvs_OBJECTS)
+am__DEPENDENCIES_1 =
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+SCRIPTS = $(bin_SCRIPTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(cvs_SOURCES) $(EXTRA_cvs_SOURCES)
+DIST_SOURCES = $(cvs_SOURCES) $(EXTRA_cvs_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = /bin/sh
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib \
+              -I$(top_srcdir)/diff $(ZLIB_CPPFLAGS)
+
+bin_SCRIPTS = cvsbug
+
+# The cvs executable
+cvs_SOURCES = \
+       add.c \
+       admin.c \
+       annotate.c \
+       base.c base.h \
+       buffer.c \
+       checkin.c \
+       checkout.c \
+       classify.c \
+       client.c \
+       commit.c \
+       create_adm.c \
+       cvsrc.c \
+       diff.c \
+       difflib.c difflib.h \
+       edit.c \
+       entries.c \
+       error.c \
+       exithandle.c \
+       expand_path.c \
+       fileattr.c \
+       filesubr.c \
+       find_names.c \
+       gpg.c gpg.h \
+       hardlink.c \
+       hash.c \
+       history.c \
+       ignore.c \
+       import.c \
+       lock.c \
+       log.c \
+       log-buffer.c log-buffer.h \
+       login.c \
+       logmsg.c \
+       ls.c \
+       main.c \
+       mkmodules.c \
+       modules.c \
+       ms-buffer.c ms-buffer.h \
+       myndbm.c \
+       no_diff.c \
+       parseinfo.c parseinfo.h \
+       patch.c \
+       rcs.c \
+       rcscmds.c \
+       recurse.c \
+       release.c \
+       remove.c \
+       repos.c \
+       root.c \
+       rsh-client.c rsh-client.h \
+       run.c \
+       scramble.c \
+       server.c \
+       sign.c sign.h \
+       stack.c stack.h \
+       status.c \
+       subr.c subr.h \
+       tag.c \
+       update.c \
+       version.c \
+       vers_ts.c \
+       watch.c \
+       wrapper.c \
+       zlib.c \
+       buffer.h \
+       client.h \
+       cvs.h \
+       edit.h \
+       fileattr.h \
+       hardlink.h \
+       hash.h \
+       history.h \
+       myndbm.h \
+       rcs.h \
+       root.h \
+       server.h \
+       update.h \
+       watch.h
+
+EXTRA_cvs_SOURCES = gssapi-client.c gssapi-client.h \
+                    kerberos4-client.c kerberos4-client.h \
+                   socket-client.c socket-client.h
+
+cvs_DEPENDENCIES = $(cvs_client_objects) \
+       ../diff/libdiff.a \
+       ../lib/libcvs.a \
+       $(ZLIB_LIBS)
+
+cvs_LDADD = $(cvs_client_objects) \
+       ../diff/libdiff.a \
+       ../lib/libcvs.a \
+       $(ZLIB_LIBS) \
+       $(LIB_CLOCK_GETTIME) \
+       $(LIB_NANOSLEEP) \
+       $(LIBINTL)
+
+
+# General
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog-9194 \
+       ChangeLog-9395 \
+       ChangeLog-96 \
+       ChangeLog-97 \
+       build_src.com \
+       sanity.sh
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+cvsbug: $(top_builddir)/config.status $(srcdir)/cvsbug.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+sanity.config.sh: $(top_builddir)/config.status $(srcdir)/sanity.config.sh.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+         if test -f $$p \
+         ; then \
+           f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+          echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' 
'$(DESTDIR)$(bindir)/$$f'"; \
+          $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" 
"$(DESTDIR)$(bindir)/$$f" || exit 1; \
+         else :; fi; \
+       done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 
's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+cvs$(EXEEXT): $(cvs_OBJECTS) $(cvs_DEPENDENCIES) 
+       @rm -f cvs$(EXEEXT)
+       $(LINK) $(cvs_LDFLAGS) $(cvs_OBJECTS) $(cvs_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+       @list='$(bin_SCRIPTS)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f $$d$$p; then \
+           f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+           echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+           $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; for p in $$list; do \
+         f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+         echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+         rm -f "$(DESTDIR)$(bindir)/$$f"; \
+       done
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@
+
+.c.o:
address@hidden@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ 
$<; \
address@hidden@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f 
"$(DEPDIR)/$*.Tpo"; exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(COMPILE) -c $<
+
+.c.obj:
address@hidden@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ 
`$(CYGPATH_W) '$<'`; \
address@hidden@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f 
"$(DEPDIR)/$*.Tpo"; exit 1; fi
address@hidden@@am__fastdepCC_FALSE@    source='$<' object='$@' libtool=no 
@AMDEPBACKSLASH@
address@hidden@@am__fastdepCC_FALSE@    DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
address@hidden@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+installdirs:
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-local distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \
+       clean-binPROGRAMS clean-generic ctags distclean \
+       distclean-compile distclean-generic distclean-local \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-binPROGRAMS install-binSCRIPTS \
+       install-data install-data-am install-exec install-exec-am \
+       install-info install-info-am install-man install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-info-am
+
+
+check-local: localcheck remotecheck nobaseremotecheck proxycheck
+
+.PHONY: maintainercheck-local
+maintainercheck-local: check-local nobaselocalcheck nobaseproxycheck
+
+.PHONY: localcheck
+localcheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs$(EXEEXT)
+
+.PHONY: nobaselocalcheck
+nobaselocalcheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -B `pwd`/cvs$(EXEEXT)
+
+.PHONY: remotecheck
+remotecheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs$(EXEEXT)
+
+.PHONY: nobaseremotecheck
+nobaseremotecheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -Br `pwd`/cvs$(EXEEXT)
+
+.PHONY: proxycheck
+proxycheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -p `pwd`/cvs$(EXEEXT)
+
+.PHONY: nobaseproxycheck
+nobaseproxycheck: all sanity.config.sh
+       $(SHELL) $(srcdir)/sanity.sh -Bp `pwd`/cvs$(EXEEXT)
+
+# Our distclean targets
+distclean-local:
+       rm -f check.log check.plog check.plog~
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/src/add.c
diff -u /dev/null ccvs/src/add.c:1.121.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/add.c      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,933 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (c) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Add
+ * 
+ * Adds a file or directory to the RCS source repository.  For a file,
+ * the entry is marked as "needing to be added" in the user's own CVS
+ * directory, and really added to the repository when it is committed.
+ * For a directory, it is added at the appropriate place in the source
+ * repository and a CVS directory is generated within the directory.
+ * 
+ * `cvs add' supports `-k <mode>' and `-m <description>' options.
+ * Some may wish to supply other standard "rcs" options here, but I've
+ * found that this causes more trouble than anything else.
+ * 
+ * The user files or directories must already exist.  For a directory, it must
+ * not already have a CVS file in it.
+ * 
+ * An "add" on a file that has been "remove"d but not committed will cause the
+ * file to be resurrected.
+ */
+
+#include <assert.h>
+
+/* CVS */
+#include "base.h"
+#include "cvs.h"
+#include "fileattr.h"
+
+/* GNULIB */
+#include "save-cwd.h"
+
+static int add_directory (struct file_info *finfo);
+static int build_entry (const char *repository, const char *user,
+                        const char *options, const char *message,
+                        List * entries, const char *tag);
+
+static const char *const add_usage[] =
+{
+    "Usage: %s %s [-k rcs-kflag] [-m message] files...\n",
+    "\t-k rcs-kflag\tUse \"rcs-kflag\" to add the file with the specified\n",
+    "\t\t\tkflag.\n",
+    "\t-m message\tUse \"message\" for the creation log.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+int
+add (int argc, char **argv)
+{
+    char *message = NULL;
+    int i;
+    char *repository;
+    int c;
+    int err = 0;
+    int added_files = 0;
+    char *options = NULL;
+    List *entries;
+    Vers_TS *vers;
+    struct saved_cwd cwd;
+    /* Nonzero if we found a slash, and are thus adding files in a
+       subdirectory.  */
+    int found_slash = 0;
+    size_t cvsroot_len;
+
+    if (argc == 1 || argc == -1)
+       usage (add_usage);
+
+    wrap_setup ();
+
+    /* parse args */
+    optind = 0;
+    while ((c = getopt (argc, argv, "+k:m:")) != -1)
+    {
+       switch (c)
+       {
+           case 'k':
+               if (options) free (options);
+               options = RCS_check_kflag (optarg);
+               break;
+
+           case 'm':
+               if (message) free (message);
+               message = xstrdup (optarg);
+               break;
+           case '?':
+           default:
+               usage (add_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+    if (argc <= 0)
+       usage (add_usage);
+
+    cvsroot_len = strlen (current_parsed_root->directory);
+
+    /* First some sanity checks.  I know that the CVS case is (sort of)
+       also handled by add_directory, but we need to check here so the
+       client won't get all confused in send_file_names.  */
+    for (i = 0; i < argc; i++)
+    {
+       int skip_file = 0;
+
+       /* If it were up to me I'd probably make this a fatal error.
+          But some people are really fond of their "cvs add *", and
+          don't seem to object to the warnings.
+          Whatever.  */
+       strip_trailing_slashes (argv[i]);
+       if (strcmp (argv[i], ".") == 0
+           || strcmp (argv[i], "..") == 0
+           || fncmp (argv[i], CVSADM) == 0)
+       {
+           if (!quiet)
+               error (0, 0, "cannot add special file `%s'; skipping", argv[i]);
+           skip_file = 1;
+       }
+       else
+       {
+           char *p;
+           p = argv[i];
+           while (*p != '\0')
+           {
+               if (ISSLASH (*p))
+               {
+                   found_slash = 1;
+                   break;
+               }
+               ++p;
+           }
+       }
+
+       if (skip_file)
+       {
+           int j;
+
+           /* FIXME: We don't do anything about free'ing argv[i].  But
+              the problem is that it is only sometimes allocated (see
+              cvsrc.c).  */
+
+           for (j = i; j < argc - 1; ++j)
+               argv[j] = argv[j + 1];
+           --argc;
+           /* Check the new argv[i] again.  */
+           --i;
+           ++err;
+       }
+    }
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       int j;
+
+       if (argc == 0)
+           /* We snipped out all the arguments in the above sanity
+              check.  We can just forget the whole thing (and we
+              better, because if we fired up the server and passed it
+              nothing, it would spit back a usage message).  */
+           return err;
+
+       start_server ();
+       ign_setup ();
+       if (options)
+       {
+           send_arg (options);
+           free (options);
+       }
+       option_with_arg ("-m", message);
+       send_arg ("--");
+
+       /* If !found_slash, refrain from sending "Directory", for
+          CVS 1.9 compatibility.  If we only tried to deal with servers
+          which are at least CVS 1.9.26 or so, we wouldn't have to
+          special-case this.  */
+       if (found_slash)
+       {
+           repository = Name_Repository (NULL, NULL);
+           send_a_repository ("", repository, "");
+           free (repository);
+       }
+
+       for (j = 0; j < argc; ++j)
+       {
+           /* FIXME: Does this erroneously call Create_Admin in error
+              conditions which are only detected once the server gets its
+              hands on things?  */
+           if (isdir (argv[j]))
+           {
+               char *tag;
+               char *date;
+               int nonbranch;
+               char *rcsdir;
+               char *p;
+               char *update_dir;
+               /* This is some mungeable storage into which we can point
+                  with p and/or update_dir.  */
+               char *filedir;
+
+               if (save_cwd (&cwd))
+                   error (1, errno, "Failed to save current directory.");
+
+               filedir = xstrdup (argv[j]);
+                /* Deliberately discard the const below since we know we just
+                 * allocated filedir and can do what we like with it.
+                 */
+               p = (char *)last_component (filedir);
+               if (p == filedir)
+               {
+                   update_dir = "";
+               }
+               else
+               {
+                   p[-1] = '\0';
+                   update_dir = filedir;
+                   if (CVS_CHDIR (update_dir) < 0)
+                       error (1, errno,
+                              "could not chdir to `%s'", update_dir);
+               }
+
+               /* find the repository associated with our current dir */
+               repository = Name_Repository (NULL, update_dir);
+
+               /* don't add stuff to Emptydir */
+               if (strncmp (repository, current_parsed_root->directory, 
cvsroot_len) == 0
+                   && ISSLASH (repository[cvsroot_len])
+                   && strncmp (repository + cvsroot_len + 1,
+                               CVSROOTADM,
+                               sizeof CVSROOTADM - 1) == 0
+                   && ISSLASH (repository[cvsroot_len + sizeof CVSROOTADM])
+                   && strcmp (repository + cvsroot_len + sizeof CVSROOTADM + 1,
+                              CVSNULLREPOS) == 0)
+                   error (1, 0, "cannot add to `%s'", repository);
+
+               /* before we do anything else, see if we have any
+                  per-directory tags */
+               ParseTag (&tag, &date, &nonbranch);
+
+               rcsdir = Xasprintf ("%s/%s", repository, p);
+
+               Create_Admin (p, argv[j], rcsdir, tag, date,
+                             nonbranch, 0, 1);
+
+               if (found_slash)
+                   send_a_repository ("", repository, update_dir);
+
+               if (restore_cwd (&cwd))
+                   error (1, errno,
+                          "Failed to restore current directory, `%s'.",
+                          cwd.name);
+               free_cwd (&cwd);
+
+               if (tag)
+                   free (tag);
+               if (date)
+                   free (date);
+               free (rcsdir);
+
+               if (p == filedir)
+                   Subdir_Register (NULL, NULL, argv[j]);
+               else
+               {
+                   Subdir_Register (NULL, update_dir, p);
+               }
+               free (repository);
+               free (filedir);
+           }
+       }
+       send_files (argc, argv, 0, 0, SEND_BUILD_DIRS | SEND_NO_CONTENTS);
+       send_file_names (argc, argv, SEND_EXPAND_WILD);
+       send_to_server ("add\012", 0);
+       if (message)
+           free (message);
+       return err + get_responses_and_close ();
+    }
+#endif
+
+    /* walk the arg list adding files/dirs */
+    for (i = 0; i < argc; i++)
+    {
+       int begin_err = err;
+#ifdef SERVER_SUPPORT
+       int begin_added_files = added_files;
+#endif
+       struct file_info finfo;
+       char *filename, *p;
+
+       memset (&finfo, 0, sizeof finfo);
+
+       if (save_cwd (&cwd))
+           error (1, errno, "Failed to save current directory.");
+
+       finfo.fullname = xstrdup (argv[i]);
+       filename = xstrdup (argv[i]);
+       /* We know we can discard the const below since we just allocated
+        * filename and can do as we like with it.
+         */
+       p = (char *)last_component (filename);
+       if (p == filename)
+       {
+           finfo.update_dir = "";
+           finfo.file = p;
+       }
+       else
+       {
+           p[-1] = '\0';
+           finfo.update_dir = filename;
+           finfo.file = p;
+           if (CVS_CHDIR (finfo.update_dir) < 0)
+               error (1, errno, "could not chdir to `%s'", finfo.update_dir);
+       }
+
+       /* Add wrappers for this directory.  They exist only until
+          the next call to wrap_add_file.  */
+       wrap_add_file (CVSDOTWRAPPER, 1);
+
+       finfo.rcs = NULL;
+
+       /* Find the repository associated with our current dir.  */
+       repository = Name_Repository (NULL, finfo.update_dir);
+
+       /* don't add stuff to Emptydir */
+       if (strncmp (repository, current_parsed_root->directory,
+                    cvsroot_len) == 0
+           && ISSLASH (repository[cvsroot_len])
+           && strncmp (repository + cvsroot_len + 1,
+                       CVSROOTADM,
+                       sizeof CVSROOTADM - 1) == 0
+           && ISSLASH (repository[cvsroot_len + sizeof CVSROOTADM])
+           && strcmp (repository + cvsroot_len + sizeof CVSROOTADM + 1,
+                      CVSNULLREPOS) == 0)
+           error (1, 0, "cannot add to `%s'", repository);
+
+       entries = Entries_Open (0, NULL);
+
+       finfo.repository = repository;
+       finfo.entries = entries;
+
+       /* We pass force_tag_match as 1.  If the directory has a
+           sticky branch tag, and there is already an RCS file which
+           does not have that tag, then the head revision is
+           meaningless to us.  */
+       vers = Version_TS (&finfo, options, NULL, NULL, 1, 0);
+       if (vers->vn_user == NULL)
+       {
+           /* No entry available, ts_rcs is invalid */
+           if (vers->vn_rcs == NULL)
+           {
+               /* There is no RCS file either */
+               if (vers->ts_user == NULL)
+               {
+                   /* There is no user file either */
+                   error (0, 0, "nothing known about `%s'", finfo.fullname);
+                   err++;
+               }
+               else if (!isdir (finfo.file)
+                        || wrap_name_has (finfo.file, WRAP_TOCVS))
+               {
+                   /*
+                    * See if a directory exists in the repository with
+                    * the same name.  If so, blow this request off.
+                    */
+                   char *dname = Xasprintf ("%s/%s", repository, finfo.file);
+                   if (isdir (dname))
+                   {
+                       error (0, 0,
+                              "cannot add file `%s' since the directory",
+                              finfo.fullname);
+                       error (0, 0, "`%s' already exists in the repository",
+                              dname);
+                       error (1, 0, "invalid filename overlap");
+                   }
+                   free (dname);
+
+                   if (vers->options == NULL || *vers->options == '\0')
+                   {
+                       /* No options specified on command line (or in
+                          rcs file if it existed, e.g. the file exists
+                          on another branch).  Check for a value from
+                          the wrapper stuff.  */
+                       if (wrap_name_has (finfo.file, WRAP_RCSOPTION))
+                       {
+                           if (vers->options)
+                               free (vers->options);
+                           vers->options = wrap_rcsoption (finfo.file, 1);
+                       }
+                   }
+
+                   if (vers->nonbranch)
+                   {
+                       error (0, 0,
+                               "cannot add file on non-branch tag `%s'",
+                               vers->tag);
+                       ++err;
+                   }
+                   else
+                   {
+                       /* There is a user file, so build the entry for it */
+                       if (build_entry (repository, finfo.file, vers->options,
+                                        message, entries, vers->tag) != 0)
+                           err++;
+                       else
+                       {
+                           added_files++;
+                           if (!quiet)
+                           {
+                               if (vers->tag)
+                                   error (0, 0, "scheduling %s `%s' for"
+                                          " addition on branch `%s'",
+                                          (wrap_name_has (finfo.file,
+                                                          WRAP_TOCVS)
+                                           ? "wrapper"
+                                           : "file"),
+                                          finfo.fullname, vers->tag);
+                               else
+                                   error (0, 0,
+                                          "scheduling %s `%s' for addition",
+                                          (wrap_name_has (finfo.file,
+                                                          WRAP_TOCVS)
+                                           ? "wrapper"
+                                           : "file"),
+                                          finfo.fullname);
+                           }
+                       }
+                   }
+               }
+           }
+           else if (RCS_isdead (vers->srcfile, vers->vn_rcs))
+           {
+               if (isdir (finfo.file)
+                   && !wrap_name_has (finfo.file, WRAP_TOCVS))
+               {
+                   error (0, 0,
+                          "the directory `%s' cannot be added because a file"
+                          " of the", finfo.fullname);
+                   error (1, 0, "same name already exists in the repository.");
+               }
+               else
+               {
+                   if (vers->nonbranch)
+                   {
+                       error (0, 0,
+                              "cannot add file on non-branch tag `%s'",
+                              vers->tag);
+                       ++err;
+                   }
+                   else
+                   {
+                       char *timestamp = NULL;
+                       if (vers->ts_user == NULL)
+                       {
+                           /* If this file does not exist locally, assume that
+                            * the last version on the branch is being
+                            * resurrected.
+                            *
+                            * Compute previous revision.  We assume that it
+                            * exists and that it is not a revision on the
+                            * trunk of the form X.1 (1.1, 2.1, 3.1, ...).  We
+                            * also assume that it is not dead, which seems
+                            * fair since we know vers->vn_rcs is dead
+                            * and we shouldn't see two dead revisions in a
+                            * row.
+                            */
+                           char *prev = previous_rev (vers->srcfile,
+                                                      vers->vn_rcs);
+                           char *tempfile;
+                           if (prev == NULL)
+                           {
+                               /* There is no previous revision.  Either:
+                                *
+                                *  * Revision 1.1 was dead, as when a file was
+                                *    inititially added on a branch, 
+                                *
+                                * or
+                                *
+                                *  * All previous revisions have been deleted.
+                                *    For instance, via `admin -o'.
+                                */
+                               if (!really_quiet)
+                                   error (0, 0,
+"File `%s' has no previous revision to resurrect.",
+                                          finfo.fullname);
+                               free (prev);
+                               goto skip_this_file;
+                           }
+                           if (!quiet)
+                               error (0, 0,
+"Resurrecting file `%s' from revision %s.",
+                                      finfo.fullname, prev);
+                           tempfile = temp_checkout (vers->srcfile, &finfo,
+                                                     NULL, prev, NULL,
+                                                     vers->tag,
+                                                     NULL, vers->options);
+                           if (!tempfile)
+                           {
+                               error (0, 0, "Failed to resurrect revision %s",
+                                      prev);
+                               err++;
+                           }
+                           else
+                           {
+                               /* I don't actually set vers->ts_user here
+                                * because it would confuse server_update ().
+                                */
+                               temp_copy (&finfo, "ny", tempfile);
+                               timestamp = time_stamp (finfo.file);
+                               if (!really_quiet)
+                                   write_letter (&finfo, 'U');
+                               free (tempfile);
+                           }
+                           free (prev);
+                       }
+                       if (!quiet)
+                       {
+                           char *bbuf;
+                           if (vers->tag)
+                           {
+                               bbuf = Xasprintf (" on branch `%s'",
+                                                 vers->tag);
+                           }
+                           else
+                               bbuf = "";
+                           error (0, 0,
+"Re-adding file `%s'%s after dead revision %s.",
+                                  finfo.fullname, bbuf, vers->vn_rcs);
+                           if (vers->tag)
+                               free (bbuf);
+                       }
+                       Register (entries, finfo.file, "0",
+                                 timestamp ? timestamp : vers->ts_user,
+                                 vers->options, vers->tag, vers->date, NULL);
+                       if (timestamp) free (timestamp);
+#ifdef SERVER_SUPPORT
+                       if (server_active && vers->ts_user == NULL)
+                       {
+                           /* If we resurrected the file from the archive, we
+                            * need to tell the client about it.
+                            */
+                           server_updated (&finfo, vers,
+                                           SERVER_UPDATED,
+                                           (mode_t) -1, NULL, NULL);
+                           /* This is kinda hacky or, at least, it renders the
+                            * name "begin_added_files" obsolete, but we want
+                            * the added_files to be counted without triggering
+                            * the check that causes server_checked_in() to be
+                            * called below since we have already called
+                            * server_updated() to complete the resurrection.
+                            */
+                           ++begin_added_files;
+                       }
+#endif
+                       ++added_files;
+                   }
+               }
+           }
+           else
+           {
+               /*
+                * There is an RCS file already, so somebody else must've
+                * added it
+                */
+               error (0, 0, "`%s' added independently by second party",
+                      finfo.fullname);
+               err++;
+           }
+       }
+       else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0')
+       {
+
+           /*
+            * An entry for a new-born file, ts_rcs is dummy, but that is
+            * inappropriate here
+            */
+           if (!quiet)
+               error (0, 0, "`%s' has already been entered", finfo.fullname);
+           err++;
+       }
+       else if (vers->vn_user[0] == '-')
+       {
+           /* An entry for a removed file, ts_rcs is invalid */
+           if (vers->ts_user == NULL)
+           {
+               /* There is no user file (as it should be) */
+               if (vers->vn_rcs == NULL)
+               {
+
+                   /*
+                    * There is no RCS file, so somebody else must've removed
+                    * it from under us
+                    */
+                   error (0, 0,
+                          "cannot resurrect `%s'; RCS file removed by"
+                          " second party", finfo.fullname);
+                   err++;
+               }
+               else
+               {
+                   int status;
+                   char *tmp;
+
+                   /*
+                    * There is an RCS file, so remove the "-" from the
+                    * version number and restore the file
+                    */
+                   memmove (vers->vn_user, vers->vn_user + 1,
+                            strlen (vers->vn_user));
+                   status = base_checkout (vers->srcfile, &finfo,
+                                           vers->vn_user, vers->vn_user,
+                                           vers->entdata->tag, vers->tag,
+                                           vers->entdata->options,
+                                           vers->options);
+                   if (status != 0)
+                   {
+                       error (0, 0, "Failed to resurrect revision %s.",
+                              vers->vn_user);
+                       err++;
+                       tmp = NULL;
+                   }
+                   else
+                   {
+                       /* I don't actually set vers->ts_user here because it
+                        * would confuse server_update().
+                        */
+                       base_copy (&finfo, vers->vn_user,
+                                  cvswrite ? "ny" : "nn");
+                       tmp = time_stamp (finfo.file);
+                       if (!really_quiet)
+                           write_letter (&finfo, 'U');
+                       if (!quiet)
+                            error (0, 0, "`%s', version %s, resurrected",
+                                   finfo.fullname, vers->vn_user);
+                   }
+                   Register (entries, finfo.file, vers->vn_user,
+                              tmp, vers->options,
+                             vers->tag, vers->date, NULL);
+                   if (tmp) free (tmp);
+#ifdef SERVER_SUPPORT
+                   if (server_active)
+                   {
+                       /* If we resurrected the file from the archive, we
+                        * need to tell the client about it.
+                        */
+                       server_updated (&finfo, vers,
+                                       SERVER_UPDATED,
+                                       (mode_t) -1, NULL, NULL);
+                   }
+                  /* We don't increment added_files here because this isn't
+                   * a change that needs to be committed.
+                   */
+#endif
+               }
+           }
+           else
+           {
+               /* The user file shouldn't be there */
+               error (0, 0, "\
+`%s' should be removed and is still there (or is back again)", finfo.fullname);
+               err++;
+           }
+       }
+       else
+       {
+           /* A normal entry, ts_rcs is valid, so it must already be there */
+           if (!quiet)
+               error (0, 0, "`%s' already exists, with version number %s",
+                       finfo.fullname,
+                       vers->vn_user);
+           err++;
+       }
+       freevers_ts (&vers);
+
+       /* passed all the checks.  Go ahead and add it if its a directory */
+       if (begin_err == err
+           && isdir (finfo.file)
+           && !wrap_name_has (finfo.file, WRAP_TOCVS))
+       {
+           err += add_directory (&finfo);
+       }
+       else
+       {
+#ifdef SERVER_SUPPORT
+           if (server_active && begin_added_files != added_files)
+               server_checked_in (finfo.file, finfo.update_dir, repository);
+#endif
+       }
+
+skip_this_file:
+       free (repository);
+       Entries_Close (entries);
+
+       if (restore_cwd (&cwd))
+           error (1, errno, "Failed to restore current directory, `%s'.",
+                  cwd.name);
+       free_cwd (&cwd);
+
+       /* It's okay to discard the const to free this - we allocated this
+        * above.  The const is for everybody else.
+        */
+       free ((char *) finfo.fullname);
+       free (filename);
+    }
+    if (added_files && !really_quiet)
+       error (0, 0, "use `%s commit' to add %s permanently",
+              program_name,
+              (added_files == 1) ? "this file" : "these files");
+
+    if (message)
+       free (message);
+    if (options)
+       free (options);
+
+    return err;
+}
+
+
+
+/*
+ * The specified user file is really a directory.  So, let's make sure that
+ * it is created in the RCS source repository, and that the user's directory
+ * is updated to include a CVS directory.
+ * 
+ * Returns 1 on failure, 0 on success.
+ */
+static int
+add_directory (struct file_info *finfo)
+{
+    const char *repository = finfo->repository;
+    List *entries = finfo->entries;
+    const char *dir = finfo->file;
+
+    char *rcsdir = NULL;
+    struct saved_cwd cwd;
+    char *message = NULL;
+    char *tag, *date;
+    int nonbranch;
+    char *attrs;
+
+    if (strchr (dir, '/') != NULL)
+    {
+       /* "Can't happen".  */
+       error (0, 0,
+              "directory %s not added; must be a direct sub-directory", dir);
+       return 1;
+    }
+    if (fncmp (dir, CVSADM) == 0)
+    {
+       error (0, 0, "cannot add a `%s' directory", CVSADM);
+       return 1;
+    }
+
+    /* before we do anything else, see if we have any per-directory tags */
+    ParseTag (&tag, &date, &nonbranch);
+
+    /* Remember the default attributes from this directory, so we can apply
+       them to the new directory.  */
+    fileattr_startdir (repository);
+    attrs = fileattr_getall (NULL);
+    fileattr_free ();
+
+    /* now, remember where we were, so we can get back */
+    if (save_cwd (&cwd))
+    {
+       error (0, errno, "Failed to save current directory.");
+       return 1;
+    }
+    if (CVS_CHDIR (dir) < 0)
+    {
+       error (0, errno, "cannot chdir to %s", finfo->fullname);
+       return 1;
+    }
+    if (!server_active && isfile (CVSADM))
+    {
+       error (0, 0, "%s/%s already exists", finfo->fullname, CVSADM);
+       goto out;
+    }
+
+    rcsdir = Xasprintf ("%s/%s", repository, dir);
+    if (isfile (rcsdir) && !isdir (rcsdir))
+    {
+       error (0, 0, "%s is not a directory; %s not added", rcsdir,
+              finfo->fullname);
+       goto out;
+    }
+
+    /* setup the log message */
+    message = Xasprintf ("Directory %s added to the repository\n%s%s%s%s%s%s",
+                        rcsdir,
+                        tag ? "--> Using per-directory sticky tag `" : "",
+                        tag ? tag : "", tag ? "'\n" : "",
+                        date ? "--> Using per-directory sticky date `" : "",
+                        date ? date : "", date ? "'\n" : "");
+
+    if (!isdir (rcsdir))
+    {
+       mode_t omask;
+       Node *p;
+       List *ulist;
+       struct logfile_info *li;
+
+       /* There used to be some code here which would prompt for
+          whether to add the directory.  The details of that code had
+          bitrotted, but more to the point it can't work
+          client/server, doesn't ask in the right way for GUIs, etc.
+          A better way of making it harder to accidentally add
+          directories would be to have to add and commit directories
+          like for files.  The code was #if 0'd at least since CVS 1.5.  */
+
+       if (!noexec)
+       {
+           omask = umask (cvsumask);
+           if (CVS_MKDIR (rcsdir, 0777) < 0)
+           {
+               error (0, errno, "cannot mkdir %s", rcsdir);
+               (void) umask (omask);
+               goto out;
+           }
+           (void) umask (omask);
+       }
+
+       /* Now set the default file attributes to the ones we inherited
+          from the parent directory.  */
+       fileattr_startdir (rcsdir);
+       fileattr_setall (NULL, attrs);
+       fileattr_write ();
+       fileattr_free ();
+       if (attrs != NULL)
+           free (attrs);
+
+       /*
+        * Set up an update list with a single title node for Update_Logfile
+        */
+       ulist = getlist ();
+       p = getnode ();
+       p->type = UPDATE;
+       p->delproc = update_delproc;
+       p->key = xstrdup ("- New directory");
+       li = xmalloc (sizeof (struct logfile_info));
+       li->type = T_TITLE;
+       li->tag = xstrdup (tag);
+       li->rev_old = li->rev_new = NULL;
+       p->data = li;
+       (void) addnode (ulist, p);
+       Update_Logfile (rcsdir, message, NULL, ulist);
+       dellist (&ulist);
+    }
+
+    if (server_active)
+       WriteTemplate (finfo->fullname, 1, rcsdir);
+    else
+       Create_Admin (".", finfo->fullname, rcsdir, tag, date, nonbranch, 0, 1);
+
+    if (tag)
+       free (tag);
+    if (date)
+       free (date);
+
+    if (restore_cwd (&cwd))
+       error (1, errno, "Failed to restore current directory, `%s'.",
+              cwd.name);
+    free_cwd (&cwd);
+
+    Subdir_Register (entries, NULL, dir);
+
+    if (!really_quiet)
+       cvs_output (message, 0);
+
+    free (rcsdir);
+    free (message);
+
+    return 0;
+
+out:
+    if (restore_cwd (&cwd))
+       error (1, errno, "Failed to restore current directory, `%s'.",
+              cwd.name);
+    free_cwd (&cwd);
+    if (message) free (message);
+    if (rcsdir != NULL)
+       free (rcsdir);
+    return 0;
+}
+
+
+
+/*
+ * Builds an entry for a new file and sets up "CVS/file",[pt] by
+ * interrogating the user.  Returns non-zero on error.
+ */
+static int
+build_entry (const char *repository, const char *user, const char *options,
+             const char *message, List *entries, const char *tag)
+{
+    char *fname;
+    char *line;
+    FILE *fp;
+
+    if (noexec)
+       return 0;
+
+    /*
+     * The requested log is read directly from the user and stored in the
+     * file user,t.  If the "message" argument is set, use it as the
+     * initial creation log (which typically describes the file).
+     */
+    fname = Xasprintf ("%s/%s%s", CVSADM, user, CVSEXT_LOG);
+    fp = xfopen (fname, "w+");
+    if (message && fputs (message, fp) == EOF)
+           error (1, errno, "cannot write to %s", fname);
+    if (fclose (fp) == EOF)
+        error (1, errno, "cannot close %s", fname);
+    free (fname);
+
+    /*
+     * Create the entry now, since this allows the user to interrupt us above
+     * without needing to clean anything up (well, we could clean up the
+     * ,t file, but who cares).
+     */
+    line = Xasprintf ("Initial %s", user);
+    Register (entries, user, "0", line, options, tag, NULL, NULL);
+    free (line);
+    return 0;
+}
Index: ccvs/src/admin.c
diff -u /dev/null ccvs/src/admin.c:1.111.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/admin.c    Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1181 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (c) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Administration ("cvs admin")
+ * 
+ */
+
+#include "cvs.h"
+#ifdef CVS_ADMIN_GROUP
+#include <grp.h>
+#endif
+
+static Dtype admin_dirproc (void *callerdat, const char *dir,
+                            const char *repos, const char *update_dir,
+                            List *entries);
+static int admin_fileproc (void *callerdat, struct file_info *finfo);
+
+static const char *const admin_usage[] =
+{
+    "Usage: %s %s [options] files...\n",
+    "\t-a users   Append (comma-separated) user names to access list.\n",
+    "\t-A file    Append another file's access list.\n",
+    "\t-b[rev]    Set default branch (highest branch on trunk if omitted).\n",
+    "\t-c string  Set comment leader.\n",
+    "\t-e[users]  Remove (comma-separated) user names from access list\n",
+    "\t           (all names if omitted).\n",
+    "\t-I         Run interactively.\n",
+    "\t-k subst   Set keyword substitution mode:\n",
+    "\t   kv   (Default) Substitute keyword and value.\n",
+    "\t   kvl  Substitute keyword, value, and locker (if any).\n",
+    "\t   k    Substitute keyword only.\n",
+    "\t   o    Preserve original string.\n",
+    "\t   b    Like o, but mark file as binary.\n",
+    "\t   v    Substitute value only.\n",
+    "\t-l[rev]    Lock revision (latest revision on branch,\n",
+    "\t           latest revision on trunk if omitted).\n",
+    "\t-L         Set strict locking.\n",
+    "\t-m rev:msg  Replace revision's log message.\n",
+    "\t-n tag[:[rev]]  Tag branch or revision.  If :rev is omitted,\n",
+    "\t                delete the tag; if rev is omitted, tag the latest\n",
+    "\t                revision on the default branch.\n",
+    "\t-N tag[:[rev]]  Same as -n except override existing tag.\n",
+    "\t-o range   Delete (outdate) specified range of revisions:\n",
+    "\t   rev1:rev2   Between rev1 and rev2, including rev1 and rev2.\n",
+    "\t   rev1::rev2  Between rev1 and rev2, excluding rev1 and rev2.\n",
+    "\t   rev:        rev and following revisions on the same branch.\n",
+    "\t   rev::       After rev on the same branch.\n",
+    "\t   :rev        rev and previous revisions on the same branch.\n",
+    "\t   ::rev       Before rev on the same branch.\n",
+    "\t   rev         Just rev.\n",
+    "\t-q         Run quietly.\n",
+    "\t-s state[:rev]  Set revision state (latest revision on branch,\n",
+    "\t                latest revision on trunk if omitted).\n",
+    "\t-t[file]   Get descriptive text from file (stdin if omitted).\n",
+    "\t-t-string  Set descriptive text.\n",
+    "\t-u[rev]    Unlock the revision (latest revision on branch,\n",
+    "\t           latest revision on trunk if omitted).\n",
+    "\t-U         Unset strict locking.\n",
+    "\t--execute    Turn on execute bits on repository file.\n",
+    "\t--no-execute Turn off execute bits on repository file.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+/* This structure is used to pass information through start_recursion.  */
+struct admin_data
+{
+    /* Set default branch (-b).  It is "-b" followed by the value
+       given, or NULL if not specified, or merely "-b" if -b is
+       specified without a value.  */
+    char *branch;
+
+    /* Set comment leader (-c).  It is "-c" followed by the value
+       given, or NULL if not specified.  The comment leader is
+       relevant only for old versions of RCS, but we let people set it
+       anyway.  */
+    char *comment;
+
+    /* Set strict locking (-L).  */
+    int set_strict;
+
+    /* Set nonstrict locking (-U).  */
+    int set_nonstrict;
+
+    /* Delete revisions (-o).  It is "-o" followed by the value specified.  */
+    char *delete_revs;
+
+    /* Keyword substitution mode (-k), e.g. "-kb".  */
+    char *kflag;
+
+    /* Description (-t).  */
+    char *desc;
+
+    /* Interactive (-I).  Problematic with client/server.  */
+    int interactive;
+
+    enum {AVOID = 0, NOEXECUTE, EXECUTE} execute;
+
+    /* This is the cheesy part.  It is a vector with the options which
+       we don't deal with above (e.g. "-afoo" "-abar,baz").  In the future
+       this presumably will be replaced by other variables which break
+       out the data in a more convenient fashion.  AV as well as each of
+       the strings it points to is malloc'd.  */
+    int ac;
+    char **av;
+    int av_alloc;
+};
+
+/* Add an argument.  OPT is the option letter, e.g. 'a'.  ARG is the
+   argument to that option, or NULL if omitted (whether NULL can actually
+   happen depends on whether the option was specified as optional to
+   getopt).  */
+static void
+arg_add (struct admin_data *dat, int opt, char *arg)
+{
+    char *newelt = Xasprintf ("-%c%s", opt, arg ? arg : "");
+
+    if (dat->av_alloc == 0)
+    {
+       dat->av_alloc = 1;
+       dat->av = xnmalloc (dat->av_alloc, sizeof (*dat->av));
+    }
+    else if (dat->ac >= dat->av_alloc)
+    {
+       dat->av_alloc *= 2;
+       dat->av = xnrealloc (dat->av, dat->av_alloc, sizeof (*dat->av));
+    }
+    dat->av[dat->ac++] = newelt;
+}
+
+
+
+/*
+ * callback proc to run a script when admin finishes.
+ */
+static int
+postadmin_proc (const char *repository, const char *filter, void *closure)
+{
+    char *cmdline;
+    const char *srepos = Short_Repository (repository);
+
+    TRACE (TRACE_FUNCTION, "postadmin_proc (%s, %s)", repository, filter);
+
+    /* %c = cvs_cmd_name
+     * %R = referrer
+     * %p = shortrepos
+     * %r = repository
+     */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             false, srepos,
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             filter,
+                             "c", "s", cvs_cmd_name,
+#ifdef SERVER_SUPPORT
+                             "R", "s", referrer ? referrer->original : "NONE",
+#endif /* SERVER_SUPPORT */
+                             "p", "s", srepos,
+                             "r", "s", current_parsed_root->directory,
+                             (char *) NULL);
+
+    if (!cmdline || !strlen (cmdline))
+    {
+       if (cmdline) free (cmdline);
+       error (0, 0, "postadmin proc resolved to the empty string!");
+       return 1;
+    }
+
+    run_setup (cmdline);
+
+    free (cmdline);
+
+    /* FIXME - read the comment in verifymsg_proc() about why we use abs()
+     * below() and shouldn't.
+     */
+    return abs (run_exec (RUN_TTY, RUN_TTY, RUN_TTY,
+                         RUN_NORMAL | RUN_SIGIGNORE));
+}
+
+
+
+/*
+ * Call any postadmin procs.
+ */
+static int
+admin_filesdoneproc (void *callerdat, int err, const char *repository,
+                     const char *update_dir, List *entries)
+{
+    TRACE (TRACE_FUNCTION, "admin_filesdoneproc (%d, %s, %s)", err, repository,
+           update_dir);
+    Parse_Info (CVSROOTADM_POSTADMIN, repository, postadmin_proc, PIOPT_ALL,
+                NULL);
+
+    return err;
+}
+
+
+
+static const char short_options[] =
+    "+ib::c:a:A:e::l::u::LUn:N:m:o:s:t::IqxV:k:";
+
+enum {OPT_NONE = 0, OPT_EXECUTE, OPT_NOEXECUTE} opt_values;
+static struct option long_options[] =
+{
+    {"execute", 0, NULL, OPT_EXECUTE},
+    {"no-execute", 0, NULL, OPT_NOEXECUTE},
+    {0, 0, NULL, OPT_NONE}
+};
+
+
+
+/* Accept a `;' delimited string and break it into tokens.  Allocate a
+ * return string.  Copy the first token into the return string
+ * checking to be sure that each character is a valid option character
+ * of the short_options string. For remaining tokens, convert to the
+ * long option VAL (from the global LONG_OPTIONS above) and append
+ * that char to the return value.  When long option tokens are
+ * unrecognized, a warning is printed and they are ignored.
+ *
+ * i.e., S will be of the format `[SHORTOPTIONS][;LONGOPTION]...'.  It is
+ * perfectly acceptable for SHORTOPTIONS to resolve to the empty string, 
+ * an empty LONGOPTION will also be ignored.
+ */
+char *
+make_UserAdminOptions (const char *infopath, unsigned int ln, const char *s)
+{
+    const char *cur_opt, *next_opt;
+    size_t len;
+    char *ns;
+
+    assert (s);
+
+    cur_opt = s;
+
+    next_opt = strchr (cur_opt, ';');
+    if (next_opt)
+       len = next_opt - cur_opt;
+    else
+       len = strlen (cur_opt);
+
+    ns = xmalloc (len + 1);
+    *ns = '\0';
+    if (len > 0)
+    {
+       const char *p;
+       size_t nspos = 0;
+       /* validate short options */
+       for (p = cur_opt; p < (cur_opt + len); p++)
+       {
+           if (*p == '+' || *p == ':' || strchr (short_options, *p) == NULL)
+               error (0, 0,
+                      "%s [%u]: Unrecognized short admin option `%c'.",
+                      infopath, ln, *p);
+           else
+               ns[nspos++] = *p;
+       }
+       ns[nspos] = '\0';
+       if (nspos > 0)
+           TRACE (TRACE_FUNCTION, "Setting short UserAdminOptions `%s'", ns);
+    }
+
+    /* process long options (if any) */
+    while ((cur_opt = next_opt))
+    {
+       next_opt = strchr (++cur_opt, ';');
+
+       if (next_opt)
+           len = next_opt - cur_opt;
+       else
+           len = strlen (cur_opt);
+
+       /* ignore empty long options (ie, ';;') */
+       if (len > 0)
+       {
+           struct option *found;
+
+           for (found = long_options; found->name; found++)
+               if (len == strlen (found->name)
+                   && !strncmp (cur_opt, found->name, len))
+                   break;
+
+           if (found->name)
+           {
+               size_t nslen = strlen (ns);
+
+               assert (found->val);
+
+               ns = xrealloc (ns, nslen + 2);
+               ns[nslen++] = found->val;
+               ns[nslen] = '\0';
+               TRACE (TRACE_FUNCTION, "Adding long UserAdminOptions `%s'",
+                      found->name);
+           }
+           else
+           {
+               char *tmp = xmalloc (len + 1);
+               strncpy (tmp, cur_opt, len);
+               tmp[len] = '\0';
+               error (0, 0,
+                      "%s [%u]: Unrecognized long admin option `%s'.",
+                      infopath, ln, tmp);
+               free (tmp);
+           }
+       }
+    }
+
+    return ns;
+}
+
+
+
+int
+admin (int argc, char **argv)
+{
+    int err;
+#ifdef CVS_ADMIN_GROUP
+    struct group *grp;
+    struct group *getgrnam (const char *);
+#endif
+    struct admin_data admin_data;
+    int c;
+    int i;
+    bool only_allowed_options;
+
+    if (argc <= 1)
+       usage (admin_usage);
+
+    wrap_setup ();
+
+    memset (&admin_data, 0, sizeof admin_data);
+
+    /* TODO: get rid of `-' switch notation in admin_data.  For
+       example, admin_data->branch should be not `-bfoo' but simply `foo'. */
+
+    optind = 0;
+    only_allowed_options = true;
+    while ((c = getopt_long
+           (argc, argv, short_options, long_options, NULL))
+          != EOF)
+    {
+       if (
+# ifdef CLIENT_SUPPORT
+           !current_parsed_root->isremote &&
+# endif        /* CLIENT_SUPPORT */
+           c != 'q' && !strchr (config->UserAdminOptions, c)
+          )
+           only_allowed_options = false;
+
+       switch (c)
+       {
+           case OPT_EXECUTE:   /* --execute */
+               admin_data.execute = EXECUTE;
+               break;
+
+           case OPT_NOEXECUTE: /* --no-execute */
+               admin_data.execute = NOEXECUTE;
+               break;
+
+           case 'i':
+               /* This has always been documented as useless in cvs.texinfo
+                  and it really is--admin_fileproc silently does nothing
+                  if vers->vn_user is NULL. */
+               error (0, 0, "the -i option to admin is not supported");
+               error (0, 0, "run add or import to create an RCS file");
+               goto usage_error;
+
+           case 'b':
+               if (admin_data.branch != NULL)
+               {
+                   error (0, 0, "duplicate 'b' option");
+                   goto usage_error;
+               }
+               if (optarg == NULL)
+                   admin_data.branch = xstrdup ("-b");
+               else
+                   admin_data.branch = Xasprintf ("-b%s", optarg);
+               break;
+
+           case 'c':
+               if (admin_data.comment != NULL)
+               {
+                   error (0, 0, "duplicate 'c' option");
+                   goto usage_error;
+               }
+               admin_data.comment = Xasprintf ("-c%s", optarg);
+               break;
+
+           case 'a':
+               arg_add (&admin_data, 'a', optarg);
+               break;
+
+           case 'A':
+               /* In the client/server case, this is cheesy because
+                  we just pass along the name of the RCS file, which
+                  then will want to exist on the server.  This is
+                  accidental; having the client specify a pathname on
+                  the server is not a design feature of the protocol.  */
+               arg_add (&admin_data, 'A', optarg);
+               break;
+
+           case 'e':
+               arg_add (&admin_data, 'e', optarg);
+               break;
+
+           case 'l':
+               /* Note that multiple -l options are valid.  */
+               arg_add (&admin_data, 'l', optarg);
+               break;
+
+           case 'u':
+               /* Note that multiple -u options are valid.  */
+               arg_add (&admin_data, 'u', optarg);
+               break;
+
+           case 'L':
+               /* Probably could also complain if -L is specified multiple
+                  times, although RCS doesn't and I suppose it is reasonable
+                  just to have it mean the same as a single -L.  */
+               if (admin_data.set_nonstrict)
+               {
+                   error (0, 0, "-U and -L are incompatible");
+                   goto usage_error;
+               }
+               admin_data.set_strict = 1;
+               break;
+
+           case 'U':
+               /* Probably could also complain if -U is specified multiple
+                  times, although RCS doesn't and I suppose it is reasonable
+                  just to have it mean the same as a single -U.  */
+               if (admin_data.set_strict)
+               {
+                   error (0, 0, "-U and -L are incompatible");
+                   goto usage_error;
+               }
+               admin_data.set_nonstrict = 1;
+               break;
+
+           case 'n':
+               /* Mostly similar to cvs tag.  Could also be parsing
+                  the syntax of optarg, although for now we just pass
+                  it to rcs as-is.  Note that multiple -n options are
+                  valid.  */
+               arg_add (&admin_data, 'n', optarg);
+               break;
+
+           case 'N':
+               /* Mostly similar to cvs tag.  Could also be parsing
+                  the syntax of optarg, although for now we just pass
+                  it to rcs as-is.  Note that multiple -N options are
+                  valid.  */
+               arg_add (&admin_data, 'N', optarg);
+               break;
+
+           case 'm':
+               /* Change log message.  Could also be parsing the syntax
+                  of optarg, although for now we just pass it to rcs
+                  as-is.  Note that multiple -m options are valid.  */
+               arg_add (&admin_data, 'm', optarg);
+               break;
+
+           case 'o':
+               /* Delete revisions.  Probably should also be parsing the
+                  syntax of optarg, so that the client can give errors
+                  rather than making the server take care of that.
+                  Other than that I'm not sure whether it matters much
+                  whether we parse it here or in admin_fileproc.
+
+                  Note that multiple -o options are invalid, in RCS
+                  as well as here.  */
+
+               if (admin_data.delete_revs != NULL)
+               {
+                   error (0, 0, "duplicate '-o' option");
+                   goto usage_error;
+               }
+               admin_data.delete_revs = Xasprintf ("-o%s", optarg);
+               break;
+
+           case 's':
+               /* Note that multiple -s options are valid.  */
+               arg_add (&admin_data, 's', optarg);
+               break;
+
+           case 't':
+               if (admin_data.desc != NULL)
+               {
+                   error (0, 0, "duplicate 't' option");
+                   goto usage_error;
+               }
+               if (optarg != NULL && optarg[0] == '-')
+                   admin_data.desc = xstrdup (optarg + 1);
+               else
+               {
+                   size_t bufsize = 0;
+                   size_t len;
+
+                   get_file (optarg, optarg, "r", &admin_data.desc,
+                             &bufsize, &len);
+               }
+               break;
+
+           case 'I':
+               /* At least in RCS this can be specified several times,
+                  with the same meaning as being specified once.  */
+               admin_data.interactive = 1;
+               break;
+
+           case 'q':
+               /* Silently set the global really_quiet flag.  This keeps admin 
in
+                * sync with the RCS man page and allows us to silently support
+                * older servers when necessary.
+                *
+                * Some logic says we might want to output a deprecation warning
+                * here, but I'm opting not to in order to stay quietly in sync
+                * with the RCS man page.
+                */
+               really_quiet = 1;
+               break;
+
+           case 'x':
+               error (0, 0, "the -x option has never done anything useful");
+               error (0, 0, "RCS files in CVS always end in ,v");
+               goto usage_error;
+
+           case 'V':
+               /* No longer supported. */
+               error (0, 0, "the `-V' option is obsolete");
+               break;
+
+           case 'k':
+               if (admin_data.kflag != NULL)
+               {
+                   error (0, 0, "duplicate '-k' option");
+                   goto usage_error;
+               }
+               admin_data.kflag = RCS_check_kflag (optarg);
+               break;
+           default:
+           case '?':
+               /* getopt will have printed an error message.  */
+
+           usage_error:
+               /* Don't use cvs_cmd_name; it might be "server".  */
+               error (1, 0, "specify %s -H admin for usage information",
+                      program_name);
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+#ifdef CVS_ADMIN_GROUP
+    /* The use of `cvs admin -k' is unrestricted.  However, any other
+       option is restricted if the group CVS_ADMIN_GROUP exists on the
+       server.  */
+    /* This is only "secure" on the server, since the user could edit the
+     * RCS file on a local host, but some people like this kind of
+     * check anyhow.  The alternative would be to check only when
+     * (server_active) rather than when not on the client.
+     */
+    if (!current_parsed_root->isremote && !only_allowed_options &&
+       (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
+    {
+#ifdef HAVE_GETGROUPS
+       gid_t *grps;
+       int n;
+
+       /* get number of auxiliary groups */
+       n = getgroups (0, NULL);
+       if (n < 0)
+           error (1, errno, "unable to get number of auxiliary groups");
+       grps = xnmalloc (n + 1, sizeof *grps);
+       n = getgroups (n, grps);
+       if (n < 0)
+           error (1, errno, "unable to get list of auxiliary groups");
+       grps[n] = getgid ();
+       for (i = 0; i <= n; i++)
+           if (grps[i] == grp->gr_gid) break;
+       free (grps);
+       if (i > n)
+           error (1, 0, "usage is restricted to members of the group `%s'",
+                  CVS_ADMIN_GROUP);
+#else
+       char *me = getcaller ();
+       char **grnam;
+       
+       for (grnam = grp->gr_mem; *grnam; grnam++)
+           if (strcmp (*grnam, me) == 0) break;
+       if (!*grnam && getgid () != grp->gr_gid)
+           error (1, 0, "usage is restricted to members of the group %s",
+                  CVS_ADMIN_GROUP);
+#endif
+    }
+#endif /* defined CVS_ADMIN_GROUP */
+
+    for (i = 0; i < admin_data.ac; ++i)
+    {
+       assert (admin_data.av[i][0] == '-');
+       switch (admin_data.av[i][1])
+       {
+           case 'm':
+           case 'l':
+           case 'u':
+               check_numeric (&admin_data.av[i][2], argc, argv);
+               break;
+           default:
+               break;
+       }
+    }
+    if (admin_data.branch != NULL)
+       check_numeric (admin_data.branch + 2, argc, argv);
+    if (admin_data.delete_revs != NULL)
+    {
+       char *p;
+
+       check_numeric (admin_data.delete_revs + 2, argc, argv);
+       p = strchr (admin_data.delete_revs + 2, ':');
+       if (p != NULL && isdigit ((unsigned char) p[1]))
+           check_numeric (p + 1, argc, argv);
+       else if (p != NULL && p[1] == ':' && isdigit ((unsigned char) p[2]))
+           check_numeric (p + 2, argc, argv);
+    }
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       /* We're the client side.  Fire up the remote server.  */
+       start_server ();
+       
+       ign_setup ();
+
+       /* Note that option_with_arg does not work for us, because some
+          of the options must be sent without a space between the option
+          and its argument.  */
+       if (admin_data.interactive)
+           error (1, 0, "-I option not useful with client/server");
+       if (admin_data.branch != NULL)
+           send_arg (admin_data.branch);
+       if (admin_data.comment != NULL)
+           send_arg (admin_data.comment);
+       if (admin_data.set_strict)
+           send_arg ("-L");
+       if (admin_data.set_nonstrict)
+           send_arg ("-U");
+       if (admin_data.delete_revs != NULL)
+           send_arg (admin_data.delete_revs);
+       if (admin_data.execute == EXECUTE)
+           send_arg ("--execute");
+       else if (admin_data.execute == NOEXECUTE)
+           send_arg ("--no-execute");
+       if (admin_data.desc != NULL)
+       {
+           char *p = admin_data.desc;
+           send_to_server ("Argument -t-", 0);
+           while (*p)
+           {
+               if (*p == '\n')
+               {
+                   send_to_server ("\012Argumentx ", 0);
+                   ++p;
+               }
+               else
+               {
+                   char *q = strchr (p, '\n');
+                   if (q == NULL) q = p + strlen (p);
+                   send_to_server (p, q - p);
+                   p = q;
+               }
+           }
+           send_to_server ("\012", 1);
+       }
+       /* Send this for all really_quiets since we know that it will be 
silently
+        * ignored when unneeded.  This supports old servers.
+        */
+       if (really_quiet)
+           send_arg ("-q");
+       if (admin_data.kflag != NULL)
+           send_arg (admin_data.kflag);
+
+       for (i = 0; i < admin_data.ac; ++i)
+           send_arg (admin_data.av[i]);
+
+       send_arg ("--");
+       send_files (argc, argv, 0, 0, SEND_NO_CONTENTS);
+       send_file_names (argc, argv, SEND_EXPAND_WILD);
+       send_to_server ("admin\012", 0);
+        err = get_responses_and_close ();
+       goto return_it;
+    }
+#endif /* CLIENT_SUPPORT */
+
+    lock_tree_promotably (argc, argv, 0, W_LOCAL, 0);
+
+    err = start_recursion
+           (admin_fileproc, admin_filesdoneproc, admin_dirproc,
+            NULL, &admin_data,
+            argc, argv, 0,
+            W_LOCAL, 0, CVS_LOCK_WRITE, NULL, 1, NULL);
+
+    Lock_Cleanup ();
+
+/* This just suppresses a warning from -Wall.  */
+#ifdef CLIENT_SUPPORT
+ return_it:
+#endif /* CLIENT_SUPPORT */
+    if (admin_data.branch != NULL)
+       free (admin_data.branch);
+    if (admin_data.comment != NULL)
+       free (admin_data.comment);
+    if (admin_data.delete_revs != NULL)
+       free (admin_data.delete_revs);
+    if (admin_data.kflag != NULL)
+       free (admin_data.kflag);
+    if (admin_data.desc != NULL)
+       free (admin_data.desc);
+    for (i = 0; i < admin_data.ac; ++i)
+       free (admin_data.av[i]);
+    if (admin_data.av != NULL)
+       free (admin_data.av);
+
+    return err;
+}
+
+
+
+/*
+ * Called to run "rcs" on a particular file.
+ */
+/* ARGSUSED */
+static int
+admin_fileproc (void *callerdat, struct file_info *finfo)
+{
+    struct admin_data *admin_data = (struct admin_data *) callerdat;
+    Vers_TS *vers;
+    char *version;
+    int i;
+    int status = 0;
+    RCSNode *rcs, *rcs2;
+
+    vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0);
+
+    version = vers->vn_user;
+    if (version != NULL && strcmp (version, "0") == 0)
+    {
+       error (0, 0, "cannot admin newly added file `%s'", finfo->file);
+       status = 1;
+       goto exitfunc;
+    }
+
+    rcs = vers->srcfile;
+    if (rcs == NULL)
+    {
+       if (!really_quiet)
+           error (0, 0, "nothing known about %s", finfo->file);
+       status = 1;
+       goto exitfunc;
+    }
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (!really_quiet)
+    {
+       cvs_output ("RCS file: ", 0);
+       cvs_output (rcs->path, 0);
+       cvs_output ("\n", 1);
+    }
+
+    if (admin_data->branch != NULL)
+    {
+       char *branch = &admin_data->branch[2];
+       if (*branch != '\0' && ! isdigit ((unsigned char) *branch))
+       {
+           branch = RCS_whatbranch (rcs, admin_data->branch + 2);
+           if (branch == NULL)
+           {
+               error (0, 0, "%s: Symbolic name %s is undefined.",
+                               rcs->path, admin_data->branch + 2);
+               status = 1;
+           }
+       }
+       if (status == 0)
+           RCS_setbranch (rcs, branch);
+       if (branch != NULL && branch != &admin_data->branch[2])
+           free (branch);
+    }
+    if (admin_data->comment != NULL)
+    {
+       if (rcs->comment != NULL)
+           free (rcs->comment);
+       rcs->comment = xstrdup (admin_data->comment + 2);
+    }
+    if (admin_data->set_strict)
+       rcs->strict_locks = 1;
+    if (admin_data->set_nonstrict)
+       rcs->strict_locks = 0;
+    if (admin_data->delete_revs != NULL)
+    {
+       char *s, *t, *rev1, *rev2;
+       /* Set for :, clear for ::.  */
+       int inclusive;
+       char *t2;
+
+       s = admin_data->delete_revs + 2;
+       inclusive = 1;
+       t = strchr (s, ':');
+       if (t != NULL)
+       {
+           if (t[1] == ':')
+           {
+               inclusive = 0;
+               t2 = t + 2;
+           }
+           else
+               t2 = t + 1;
+       }
+
+       /* Note that we don't support '-' for ranges.  RCS considers it
+          obsolete and it is problematic with tags containing '-'.  "cvs log"
+          has made the same decision.  */
+
+       if (t == NULL)
+       {
+           /* -orev */
+           rev1 = xstrdup (s);
+           rev2 = xstrdup (s);
+       }
+       else if (t == s)
+       {
+           /* -o:rev2 */
+           rev1 = NULL;
+           rev2 = xstrdup (t2);
+       }
+       else
+       {
+           *t = '\0';
+           rev1 = xstrdup (s);
+           *t = ':';   /* probably unnecessary */
+           if (*t2 == '\0')
+               /* -orev1: */
+               rev2 = NULL;
+           else
+               /* -orev1:rev2 */
+               rev2 = xstrdup (t2);
+       }
+
+       if (rev1 == NULL && rev2 == NULL)
+       {
+           /* RCS segfaults if `-o:' is given */
+           error (0, 0, "no valid revisions specified in `%s' option",
+                  admin_data->delete_revs);
+           status = 1;
+       }
+       else
+       {
+           status |= RCS_delete_revs (rcs, rev1, rev2, inclusive);
+           if (rev1)
+               free (rev1);
+           if (rev2)
+               free (rev2);
+       }
+    }
+    if (admin_data->desc != NULL)
+    {
+       free (rcs->desc);
+       rcs->desc = xstrdup (admin_data->desc);
+    }
+    if (admin_data->kflag != NULL)
+    {
+       char *kflag = admin_data->kflag + 2;
+       char *oldexpand = RCS_getexpand (rcs);
+       if (oldexpand == NULL || strcmp (oldexpand, kflag) != 0)
+           RCS_setexpand (rcs, kflag);
+    }
+
+    /* Handle miscellaneous options.  TODO: decide whether any or all
+       of these should have their own fields in the admin_data
+       structure. */
+    for (i = 0; i < admin_data->ac; ++i)
+    {
+       char *arg;
+       char *p, *rev, *revnum, *tag, *msg;
+       char **users;
+       int argc, u;
+       Node *n;
+       RCSVers *delta;
+       
+       arg = admin_data->av[i];
+       switch (arg[1])
+       {
+           case 'a': /* fall through */
+           case 'e':
+               line2argv (&argc, &users, arg + 2, " ,\t\n");
+               if (arg[1] == 'a')
+                   for (u = 0; u < argc; ++u)
+                       RCS_addaccess (rcs, users[u]);
+               else if (argc == 0)
+                   RCS_delaccess (rcs, NULL);
+               else
+                   for (u = 0; u < argc; ++u)
+                       RCS_delaccess (rcs, users[u]);
+               free_names (&argc, users);
+               break;
+           case 'A':
+
+               /* See admin-19a-admin and friends in sanity.sh for
+                  relative pathnames.  It makes sense to think in
+                  terms of a syntax which give pathnames relative to
+                  the repository or repository corresponding to the
+                  current directory or some such (and perhaps don't
+                  include ,v), but trying to worry about such things
+                  is a little pointless unless you first worry about
+                  whether "cvs admin -A" as a whole makes any sense
+                  (currently probably not, as access lists don't
+                  affect the behavior of CVS).  */
+
+               rcs2 = RCS_parsercsfile (arg + 2);
+               if (rcs2 == NULL)
+                   error (1, 0, "cannot continue");
+
+               p = xstrdup (RCS_getaccess (rcs2));
+               line2argv (&argc, &users, p, " \t\n");
+               free (p);
+               freercsnode (&rcs2);
+
+               for (u = 0; u < argc; ++u)
+                   RCS_addaccess (rcs, users[u]);
+               free_names (&argc, users);
+               break;
+           case 'n': /* fall through */
+           case 'N':
+               if (arg[2] == '\0')
+               {
+                   cvs_outerr ("missing symbolic name after ", 0);
+                   cvs_outerr (arg, 0);
+                   cvs_outerr ("\n", 1);
+                   break;
+               }
+               p = strchr (arg, ':');
+               if (p == NULL)
+               {
+                   if (RCS_deltag (rcs, arg + 2) != 0)
+                   {
+                       error (0, 0, "%s: Symbolic name %s is undefined.",
+                              rcs->path, 
+                              arg + 2);
+                       status = 1;
+                       continue;
+                   }
+                   break;
+               }
+               *p = '\0';
+               tag = xstrdup (arg + 2);
+               *p++ = ':';
+
+               /* Option `n' signals an error if this tag is already bound. */
+               if (arg[1] == 'n')
+               {
+                   n = findnode (RCS_symbols (rcs), tag);
+                   if (n != NULL)
+                   {
+                       error (0, 0,
+                              "%s: symbolic name %s already bound to %s",
+                              rcs->path,
+                              tag, (char *)n->data);
+                       status = 1;
+                       free (tag);
+                       continue;
+                   }
+               }
+
+                /* Attempt to perform the requested tagging.  */
+
+               if ((*p == 0 && (rev = RCS_head (rcs)))
+                    || (rev = RCS_tag2rev (rcs, p))) /* tag2rev may exit */
+               {
+                   RCS_check_tag (tag); /* exit if not a valid tag */
+                   RCS_settag (rcs, tag, rev);
+                   free (rev);
+               }
+                else
+               {
+                   if (!really_quiet)
+                       error (0, 0,
+                              "%s: Symbolic name or revision %s is undefined.",
+                              rcs->path, p);
+                   status = 1;
+               }
+               free (tag);
+               break;
+           case 's':
+               p = strchr (arg, ':');
+               if (p == NULL)
+               {
+                   tag = xstrdup (arg + 2);
+                   rev = RCS_head (rcs);
+                   if (!rev)
+                   {
+                       error (0, 0, "No head revision in archive file `%s'.",
+                              rcs->path);
+                       status = 1;
+                       continue;
+                   }
+               }
+               else
+               {
+                   *p = '\0';
+                   tag = xstrdup (arg + 2);
+                   *p++ = ':';
+                   rev = xstrdup (p);
+               }
+               revnum = RCS_gettag (rcs, rev, 0, NULL);
+               if (revnum != NULL)
+               {
+                   n = findnode (rcs->versions, revnum);
+                   free (revnum);
+               }
+               else
+                   n = NULL;
+               if (n == NULL)
+               {
+                   error (0, 0,
+                          "%s: can't set state of nonexisting revision %s",
+                          rcs->path,
+                          rev);
+                   free (rev);
+                   status = 1;
+                   continue;
+               }
+               free (rev);
+               delta = n->data;
+               free (delta->state);
+               delta->state = tag;
+               break;
+
+           case 'm':
+               p = strchr (arg, ':');
+               if (p == NULL)
+               {
+                   error (0, 0, "%s: -m option lacks revision number",
+                          rcs->path);
+                   status = 1;
+                   continue;
+               }
+               *p = '\0';      /* temporarily make arg+2 its own string */
+               rev = RCS_gettag (rcs, arg + 2, 1, NULL); /* Force tag match */
+               if (rev == NULL)
+               {
+                   error (0, 0, "%s: no such revision %s", rcs->path, arg+2);
+                   status = 1;
+                   *p = ':';   /* restore the full text of the -m argument */
+                   continue;
+               }
+               msg = p+1;
+
+               n = findnode (rcs->versions, rev);
+               /* tags may exist against non-existing versions */
+               if (n == NULL)
+               {
+                    error (0, 0, "%s: no such revision %s: %s",
+                           rcs->path, arg+2, rev);
+                   status = 1;
+                   *p = ':';   /* restore the full text of the -m argument */
+                   free (rev);
+                   continue;
+               }
+               *p = ':';       /* restore the full text of the -m argument */
+               free (rev);
+
+               delta = n->data;
+               if (delta->text == NULL)
+               {
+                   delta->text = xmalloc (sizeof (Deltatext));
+                   memset (delta->text, 0, sizeof (Deltatext));
+               }
+               delta->text->version = xstrdup (delta->version);
+               delta->text->log = make_message_rcsvalid (msg);
+               break;
+
+           case 'l':
+               status |= RCS_lock (rcs, arg[2] ? arg + 2 : NULL, 0);
+               break;
+           case 'u':
+               status |= RCS_unlock (rcs, arg[2] ? arg + 2 : NULL, 0);
+               break;
+           default: assert(0); /* can't happen */
+       }
+    }
+
+    if (status == 0)
+    {
+       RCS_rewrite (rcs, NULL, NULL);
+
+        /*
+         * Update the execute bit for the file if requested.
+         */
+        if (admin_data->execute != AVOID)
+        {
+            struct stat sb;
+ 
+            if (stat (rcs->path, &sb) < 0)
+                error (0, errno, "cannot stat `%s'", rcs->path);
+            else
+            {
+                mode_t mode;
+ 
+                if (admin_data->execute == EXECUTE)
+                    mode = (sb.st_mode
+                            | (((sb.st_mode & S_IRUSR) ? S_IXUSR : 0)
+                                  | ((sb.st_mode & S_IRGRP) ? S_IXGRP : 0)
+                                  | ((sb.st_mode & S_IROTH) ? S_IXOTH : 0)));
+                else /* admin_data->execute == NOEXECUTE */
+                    mode = (sb.st_mode
+                            & ~(S_IEXEC | S_IXGRP | S_IXOTH));
+ 
+                if (mode == sb.st_mode)
+                    error (0, 0, "%s: already has mode=0%o",
+                          rcs->path, (unsigned int) mode);
+                else
+                {
+                    TRACE (TRACE_FLOW, "chmod(%s,0%o)", rcs->path,
+                           (unsigned int) mode);
+                    
+                   if (!noexec)
+                   {
+                       if (chmod (rcs->path, mode) < 0)
+                           error (0, errno,
+                                  "cannot change mode of file `%s'",
+                                  rcs->path);
+                   }
+                }
+            }
+        }
+
+       if (!really_quiet)
+           cvs_output ("done\n", 5);
+    }
+    else
+    {
+       /* Note that this message should only occur after another
+          message has given a more specific error.  The point of this
+          additional message is to make it clear that the previous problems
+          caused CVS to forget about the idea of modifying the RCS file.  */
+       if (!really_quiet)
+           error (0, 0, "RCS file for `%s' not modified.", finfo->file);
+       RCS_abandon (rcs);
+    }
+
+  exitfunc:
+    freevers_ts (&vers);
+    return status;
+}
+
+
+
+/*
+ * Print a warm fuzzy message
+ */
+/* ARGSUSED */
+static Dtype
+admin_dirproc (void *callerdat, const char *dir, const char *repos,
+               const char *update_dir, List *entries)
+{
+    if (!quiet)
+       error (0, 0, "Administrating %s", update_dir);
+    return R_PROCESS;
+}
Index: ccvs/src/base.c
diff -u /dev/null ccvs/src/base.c:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/base.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,580 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "base.h"
+
+/* Standard headers.  */
+#include <assert.h>
+
+/* GNULIB headers.  */
+
+/* CVS headers.  */
+#include "difflib.h"
+#include "server.h"
+#include "subr.h"
+#include "cvs.h"       /* For CVSADM_BASE. */
+
+
+
+char *
+make_base_file_name (const char *filename, const char *rev)
+{
+    return Xasprintf ("%s/.#%s.%s", CVSADM_BASE, filename, rev);
+}
+
+
+
+/* OK, the following base_* code tracks the revisions of the files in
+   CVS/Base.  We do this in a file CVS/Baserev.  Separate from
+   CVS/Entries because it needs to go in separate data structures
+   anyway (the name in Entries must be unique), so this seemed
+   cleaner.  The business of rewriting the whole file in
+   base_deregister and base_register is the kind of thing we used to
+   do for Entries and which turned out to be slow, which is why there
+   is now the Entries.Log machinery.  So maybe from that point of
+   view it is a mistake to do this separately from Entries, I dunno.  */
+
+enum base_walk
+{
+    /* Set the revision for FILE to *REV.  */
+    BASE_REGISTER,
+    /* Get the revision for FILE and put it in a newly malloc'd string
+       in *REV, or put NULL if not mentioned.  */
+    BASE_GET,
+    /* Remove FILE.  */
+    BASE_DEREGISTER
+};
+
+
+
+/* Read through the lines in CVS/Baserev, taking the actions as documented
+   for CODE.  */
+static void
+base_walk (enum base_walk code, const char *update_dir, const char *file,
+          char **rev)
+{
+    FILE *fp;
+    char *line;
+    size_t line_allocated;
+    FILE *newf;
+    char *baserev_fullname;
+    char *baserevtmp_fullname;
+
+    line = NULL;
+    line_allocated = 0;
+    newf = NULL;
+
+    /* First compute the fullnames for the error messages.  This
+       computation probably should be broken out into a separate function,
+       as recurse.c does it too and places like Entries_Open should be
+       doing it.  */
+    if (update_dir[0] != '\0')
+    {
+       baserev_fullname = Xasprintf ("%s/%s", update_dir,
+                                     CVSADM_BASEREV);
+       baserevtmp_fullname = Xasprintf ("%s/%s", update_dir,
+                                        CVSADM_BASEREVTMP);
+    }
+    else
+    {
+       baserev_fullname = xstrdup (CVSADM_BASEREV);
+       baserevtmp_fullname = xstrdup (CVSADM_BASEREVTMP);
+    }
+
+    fp = CVS_FOPEN (CVSADM_BASEREV, "r");
+    if (!fp)
+    {
+       if (!existence_error (errno))
+       {
+           error (0, errno, "cannot open %s for reading", baserev_fullname);
+           goto out;
+       }
+    }
+
+    switch (code)
+    {
+       case BASE_REGISTER:
+       case BASE_DEREGISTER:
+           newf = CVS_FOPEN (CVSADM_BASEREVTMP, "w");
+           if (!newf)
+           {
+               error (0, errno, "cannot open %s for writing",
+                      baserevtmp_fullname);
+               goto out;
+           }
+           break;
+       case BASE_GET:
+           *rev = NULL;
+           break;
+    }
+
+    if (fp)
+    {
+       while (getline (&line, &line_allocated, fp) >= 0)
+       {
+           char *linefile;
+           char *p;
+           char *linerev;
+
+           if (line[0] != 'B')
+               /* Ignore, for future expansion.  */
+               continue;
+
+           linefile = line + 1;
+           p = strchr (linefile, '/');
+           if (!p)
+               /* Syntax error, ignore.  */
+               continue;
+           linerev = p + 1;
+           p = strchr (linerev, '/');
+           if (!p) continue;
+
+           linerev[-1] = '\0';
+           if (fncmp (linefile, file) == 0)
+           {
+               switch (code)
+               {
+               case BASE_REGISTER:
+               case BASE_DEREGISTER:
+                   /* Don't copy over the old entry, we don't want it.  */
+                   break;
+               case BASE_GET:
+                   *p = '\0';
+                   *rev = xstrdup (linerev);
+                   *p = '/';
+                   goto got_it;
+               }
+           }
+           else
+           {
+               linerev[-1] = '/';
+               switch (code)
+               {
+               case BASE_REGISTER:
+               case BASE_DEREGISTER:
+                   if (fprintf (newf, "%s\n", line) < 0)
+                       error (0, errno, "error writing %s",
+                              baserevtmp_fullname);
+                   break;
+               case BASE_GET:
+                   break;
+               }
+           }
+       }
+       if (ferror (fp))
+           error (0, errno, "cannot read %s", baserev_fullname);
+    }
+ got_it:
+
+    if (code == BASE_REGISTER)
+    {
+       if (fprintf (newf, "B%s/%s/\n", file, *rev) < 0)
+           error (0, errno, "error writing %s",
+                  baserevtmp_fullname);
+    }
+
+ out:
+
+    if (line) free (line);
+
+    if (fp)
+    {
+       if (fclose (fp) < 0)
+           error (0, errno, "cannot close %s", baserev_fullname);
+    }
+    if (newf)
+    {
+       if (fclose (newf) < 0)
+           error (0, errno, "cannot close %s", baserevtmp_fullname);
+       rename_file (CVSADM_BASEREVTMP, CVSADM_BASEREV);
+    }
+
+    free (baserev_fullname);
+    free (baserevtmp_fullname);
+}
+
+
+
+/* Return, in a newly malloc'd string, the revision for FILE in CVS/Baserev,
+ * or NULL if not listed.
+ */
+char *
+base_get (const char *update_dir, const char *file)
+{
+    char *rev;
+    base_walk (BASE_GET, update_dir, file, &rev);
+    return rev;
+}
+
+
+
+/* Set the revision for FILE to REV.  */
+void
+base_register (const char *update_dir, const char *file, char *rev)
+{
+    base_walk (BASE_REGISTER, update_dir, file, &rev);
+}
+
+
+
+/* Remove FILE.  */
+void
+base_deregister (const char *update_dir, const char *file)
+{
+    base_walk (BASE_DEREGISTER, update_dir, file, NULL);
+}
+
+
+
+int
+base_checkout (RCSNode *rcs, struct file_info *finfo,
+              const char *prev, const char *rev, const char *ptag,
+              const char *tag, const char *poptions, const char *options)
+{
+    int status;
+    char *basefile;
+
+    TRACE (TRACE_FUNCTION, "base_checkout (%s, %s, %s, %s, %s, %s, %s)",
+          finfo->fullname, prev, rev, ptag, tag, poptions, options);
+
+    if (noexec)
+       return 0;
+
+    mkdir_if_needed (CVSADM_BASE);
+
+    assert (!current_parsed_root->isremote);
+
+    basefile = make_base_file_name (finfo->file, rev);
+    status = RCS_checkout (rcs, basefile, rev, tag, options,
+                          NULL, NULL, NULL);
+
+    /* Always mark base files as read-only, to make disturbing them
+     * accidentally at least slightly challenging.
+     */
+    xchmod (basefile, false);
+    free (basefile);
+
+    /* FIXME: Verify the signature in local mode.  */
+
+    if (server_active && strcmp (cvs_cmd_name, "export"))
+       server_base_checkout (rcs, finfo, prev, rev, ptag, tag,
+                             poptions, options);
+
+    return status;
+}
+
+
+
+char *
+temp_checkout (RCSNode *rcs, struct file_info *finfo,
+              const char *prev, const char *rev, const char *ptag,
+              const char *tag, const char *poptions, const char *options)
+{
+    char *tempfile;
+    bool save_noexec;
+
+    TRACE (TRACE_FUNCTION, "temp_checkout (%s, %s, %s, %s, %s, %s, %s)",
+          finfo->fullname, prev, rev, ptag, tag, poptions, options);
+
+    assert (!current_parsed_root->isremote);
+
+    tempfile = cvs_temp_name ();
+    save_noexec = noexec;
+    noexec = false;
+    if (RCS_checkout (rcs, tempfile, rev, tag, options, NULL, NULL, NULL))
+    {
+       error (0, 0, "Failed to check out revision %s of `%s'",
+              rev, finfo->fullname);
+       free (tempfile);
+       noexec = save_noexec;
+       return NULL;
+    }
+    noexec = save_noexec;
+
+    assert (strcmp (cvs_cmd_name, "export"));
+    if (server_active)
+       server_temp_checkout (rcs, finfo, prev, rev, ptag, tag,
+                             poptions, options, tempfile);
+
+    return tempfile;
+}
+
+
+
+enum update_existing
+translate_exists (const char *exists)
+{
+    if (*exists == 'n') return UPDATE_ENTRIES_NEW;
+    if (*exists == 'y') return UPDATE_ENTRIES_EXISTING;
+    if (*exists == 'm') return UPDATE_ENTRIES_EXISTING_OR_NEW;
+    /* The error below should only happen due to a programming error or when
+     * the server sends a bad response.
+     */
+    error (1, 0, "unknown existence code received from server: `%s'",
+          exists);
+    assert (!"Internal error");  /* Placate GCC.  */
+}
+
+
+
+/* Validate the existance of FILENAME against whether we think it should exist
+ * or not.  If it should exist and doesn't, issue a warning and return success.
+ * If it shouldn't exist and does, issue a warning and return false to avoid
+ * accidentally overwriting a user's changes.
+ */
+bool
+validate_change (enum update_existing existp, const char *filename,
+                const char *fullname)
+{
+    /* Note that checking this separately from writing the file is
+       a race condition: if the existence or lack thereof of the
+       file changes between now and the actual calls which
+       operate on it, we lose.  However (a) there are so many
+       cases, I'm reluctant to try to fix them all, (b) in some
+       cases the system might not even have a system call which
+       does the right thing, and (c) it isn't clear this needs to
+       work.  */
+    if (existp == UPDATE_ENTRIES_EXISTING
+       && !isfile (filename))
+       /* Emit a warning and update the file anyway.  */
+       error (0, 0, "warning: %s unexpectedly disappeared", fullname);
+    else if (existp == UPDATE_ENTRIES_NEW
+       && isfile (filename))
+    {
+       /* This error might be confusing; it isn't really clear to
+          the user what to do about it.  Keep in mind that it has
+          several causes: (1) something/someone creates the file
+          during the time that CVS is running, (2) the repository
+          has two files whose names clash for the client because
+          of case-insensitivity or similar causes, See 3 for
+          additional notes.  (3) a special case of this is that a
+          file gets renamed for example from a.c to A.C.  A
+          "cvs update" on a case-insensitive client will get this
+          error.  In this case and in case 2, the filename
+          (short_pathname) printed in the error message will likely _not_
+          have the same case as seen by the user in a directory listing.
+          (4) the client has a file which the server doesn't know
+          about (e.g. "? foo" file), and that name clashes with a file
+          the server does know about, (5) classify.c will print the same
+          message for other reasons.
+
+          I hope the above paragraph makes it clear that making this
+          clearer is not a one-line fix.  */
+       error (0, 0, "move away `%s'; it is in the way", fullname);
+
+       /* The Mode, Mod-time, and Checksum responses should not carry
+        * over to a subsequent Created (or whatever) response, even
+        * in the error case.
+        */
+       if (!really_quiet)
+       {
+           cvs_output ("C ", 0);
+           cvs_output (fullname, 0);
+           cvs_output ("\n", 1);
+       }
+       return false;
+    }
+
+    return true;
+}
+
+
+
+static void
+ibase_copy (struct file_info *finfo, const char *rev, const char *flags,
+           const char *tempfile)
+{
+    const char *basefile;
+
+    TRACE (TRACE_FUNCTION, "ibase_copy (%s, %s, %s, %s)",
+          finfo->fullname, rev, flags,
+          tempfile ? tempfile : "(null)");
+
+    assert (flags && flags[0] && flags[1]);
+
+    if (!server_active /* The server still doesn't stay perfectly in sync with
+                       * the client workspace.
+                       */
+       && !validate_change (translate_exists (flags), finfo->file,
+                            finfo->fullname))
+       exit (EXIT_FAILURE);
+
+    if (noexec)
+       return;
+
+    if (tempfile)
+       basefile = tempfile;
+    else
+       basefile = make_base_file_name (finfo->file, rev);
+
+    if (isfile (finfo->file))
+       xchmod (finfo->file, true);
+
+    copy_file (basefile, finfo->file);
+    if (flags[1] == 'y')
+       xchmod (finfo->file, true);
+
+    if (server_active && strcmp (cvs_cmd_name, "export"))
+       server_base_copy (finfo, rev ? rev : "", flags);
+
+    if (suppress_bases || tempfile)
+    {
+       char *sigfile = Xasprintf ("%s.sig", basefile);
+       if (CVS_UNLINK (basefile) < 0)
+           error (0, errno, "Failed to remove temp file `%s'", basefile);
+       if (CVS_UNLINK (sigfile) < 0 && !existence_error (errno))
+           error (0, errno, "Failed to remove temp file `%s'", sigfile);
+       free (sigfile);
+    }
+    if (!tempfile)
+       free ((char *)basefile);
+}
+
+
+
+void
+temp_copy (struct file_info *finfo, const char *flags, const char *tempfile)
+{
+    ibase_copy (finfo, NULL, flags, tempfile);
+}
+
+
+
+void
+base_copy (struct file_info *finfo, const char *rev, const char *flags)
+{
+    ibase_copy (finfo, rev, flags, NULL);
+}
+
+
+
+/* Remove the base file for FILE & REV, and any sigfile present for the same.
+ */
+void
+base_remove (const char *file, const char *rev)
+{
+    char *basefile;
+    char *sigfile;
+
+    TRACE (TRACE_FUNCTION, "base_remove (%s, %s)", file, rev);
+
+    if (*rev == '-') rev++;
+    basefile = make_base_file_name (file, rev);
+    if (unlink_file (basefile) < 0 && !existence_error (errno))
+       error (0, errno, "Failed to remove `%s'", basefile);
+    sigfile = Xasprintf ("%s.sig", basefile);
+    if (unlink_file (sigfile) < 0 && !existence_error (errno))
+       error (0, errno, "Failed to remove `%s'", sigfile);
+    free (sigfile);
+    free (basefile);
+}
+
+
+
+/* Merge revisions REV1 and REV2. */
+int
+base_merge (RCSNode *rcs, struct file_info *finfo, const char *ptag,
+           const char *poptions, const char *options, const char *urev,
+           const char *rev1, const char *rev2, bool join)
+{
+    char *f1, *f2;
+    int retval;
+
+    assert (!options || !options[0]
+           || (options[0] == '-' && options[1] == 'k'));
+
+    /* Check out chosen revisions.  The error message when RCS_checkout
+       fails is not very informative -- it is taken verbatim from RCS 5.7,
+       and relies on RCS_checkout saying something intelligent upon failure. */
+
+    if (!(f1 = temp_checkout (rcs, finfo, urev, rev1, ptag, rev1, poptions,
+                             options)))
+       error (1, 0, "checkout of revision %s of `%s' failed.\n",
+              rev1, finfo->fullname);
+    if (join || noexec || suppress_bases)
+    {
+       if (!(f2 = temp_checkout (rcs, finfo, urev, rev2, ptag, rev2, poptions,
+                                 options)))
+           error (1, 0, "checkout of revision %s of `%s' failed.\n",
+                  rev2, finfo->fullname);
+    }
+    else
+    {
+       if (base_checkout (rcs, finfo, urev, rev2, ptag, rev2, poptions,
+                          options))
+           error (1, 0, "checkout of revision %s of `%s' failed.\n",
+                  rev2, finfo->fullname);
+       f2 = make_base_file_name (finfo->file, rev2);
+    }
+
+
+    if (!server_active || !server_use_bases())
+    {
+       /* Merge changes. */
+       /* It may violate the current abstraction to fail to generate the same
+        * files on the server as will be generated on the client, but I do not
+        * believe that they are being used currently and it saves server CPU.
+        */
+       if (!really_quiet)
+       {
+           cvs_output ("Merging differences between ", 0);
+           cvs_output (rev1, 0);
+           cvs_output (" and ", 5);
+           cvs_output (rev2, 0);
+           cvs_output (" into `", 7);
+           if (!finfo->update_dir || !strcmp (finfo->update_dir, "."))
+               cvs_output (finfo->file, 0);
+           else
+               cvs_output (finfo->fullname, 0);
+           cvs_output ("'\n", 2);
+       }
+
+       retval = merge (finfo->file, finfo->file, f1, rev1, f2, rev2);
+    }
+    else
+       retval = 0;
+
+    if (server_active)
+       server_base_merge (finfo, rev1, rev2);
+
+    if (CVS_UNLINK (f1) < 0)
+       error (0, errno, "unable to remove `%s'", f1);
+    /* Using a base file instead of a temp file here and not deleting it is an
+     * optimization since, for instance, on merge from 1.1 to 1.4 with local
+     * changes, the client is going to want to leave base 1.4 and delete base
+     * 1.1 rather than the other way around.
+     */
+    if (join || noexec || suppress_bases)
+    {
+       char *sigfile = Xasprintf ("%s.sig", f2);
+       if (CVS_UNLINK (f2) < 0)
+           error (0, errno, "unable to remove `%s'", f2);
+       if (CVS_UNLINK (sigfile) < 0 && !existence_error (errno))
+           error (0, errno, "unable to remove `%s'", sigfile);
+       free (sigfile);
+    }
+    free (f1);
+    free (f2);
+
+    return retval;
+}
Index: ccvs/src/base.h
diff -u /dev/null ccvs/src/base.h:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/base.h     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef BASE_H
+#define BASE_H
+
+#include "rcs.h"
+
+enum update_existing {
+    /* We are replacing an existing file.  */
+    UPDATE_ENTRIES_EXISTING,
+    /* We are creating a new file.  */
+    UPDATE_ENTRIES_NEW,
+    /* We don't know whether it is existing or new.  */
+    UPDATE_ENTRIES_EXISTING_OR_NEW
+};
+
+
+
+char *make_base_file_name (const char *filename, const char *rev);
+
+char *base_get (const char *update_dir, const char *file);
+void base_register (const char *update_dir, const char *file, char *rev);
+void base_deregister (const char *update_dir, const char *file);
+
+int base_checkout (RCSNode *rcs, struct file_info *finfo,
+                  const char *prev, const char *rev, const char *ptag,
+                  const char *tag, const char *poptions, const char *options);
+char *temp_checkout (RCSNode *rcs, struct file_info *finfo,
+                    const char *prev, const char *rev, const char *ptag,
+                    const char *tag, const char *poptions,
+                    const char *options);
+enum update_existing translate_exists (const char *exists);
+bool validate_change (enum update_existing existp, const char *filename,
+                     const char *fullname);
+void base_copy (struct file_info *finfo, const char *rev, const char *flags);
+void temp_copy (struct file_info *finfo, const char *flags,
+               const char *tempfile);
+void base_remove (const char *file, const char *rev);
+int base_merge (RCSNode *rcs, struct file_info *finfo, const char *ptag,
+               const char *poptions, const char *options,
+               const char *urev, const char *rev1, const char *rev2,
+               bool join);
+#endif /* BASE_H */
Index: ccvs/src/buffer.c
diff -u /dev/null ccvs/src/buffer.c:1.65.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/buffer.c   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,2204 @@
+/*
+ * Copyright (C) 1996-2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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.
+ */
+
+/* Code for the buffer data structure.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "buffer.h"
+
+#include "cvs.h"
+#include "pagealign_alloc.h"
+
+#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
+
+# include <sys/socket.h>
+
+/* OS/2 doesn't have EIO.  FIXME: this whole notion of turning
+   a different error into EIO strikes me as pretty dubious.  */
+# if !defined( EIO )
+#   define EIO EBADPOS
+# endif
+
+/* Local functions.  */
+static void buf_default_memory_error (struct buffer *);
+static struct buffer_data *get_buffer_data (void);
+
+
+
+/* Initialize a buffer structure.  */
+struct buffer *
+buf_initialize (type_buf_input input,
+                type_buf_output output,
+                type_buf_flush flush,
+                type_buf_block block,
+                type_buf_get_fd get_fd,
+                type_buf_shutdown shutdown,
+                type_buf_memory_error memory_error,
+                void *closure)
+{
+    struct buffer *buf;
+
+    buf = xmalloc (sizeof (struct buffer));
+    buf->data = NULL;
+    buf->last = NULL;
+    buf->nonblocking = false;
+    buf->input = input;
+    buf->output = output;
+    buf->flush = flush;
+    buf->block = block;
+    buf->get_fd = get_fd;
+    buf->shutdown = shutdown;
+    buf->memory_error = memory_error ? memory_error : buf_default_memory_error;
+    buf->closure = closure;
+    return buf;
+}
+
+
+
+/* Free a buffer structure.  */
+void
+buf_free (struct buffer *buf)
+{
+    if (buf->closure != NULL)
+    {
+       free (buf->closure);
+       buf->closure = NULL;
+    }
+    buf_free_data (buf);
+    free (buf);
+}
+
+
+
+/* Initialize a buffer structure which is not to be used for I/O.  */
+struct buffer *
+buf_nonio_initialize( void (*memory) (struct buffer *) )
+{
+    return buf_initialize (NULL, NULL, NULL, NULL, NULL, NULL, memory, NULL);
+}
+
+
+
+/* Default memory error handler.  */
+static void
+buf_default_memory_error (struct buffer *buf)
+{
+    error (1, 0, "out of memory");
+}
+
+
+
+/* Allocate more buffer_data structures.  */
+/* Get a new buffer_data structure.  */
+static struct buffer_data *
+get_buffer_data (void)
+{
+    struct buffer_data *ret;
+
+    ret = xmalloc (sizeof (struct buffer_data));
+    ret->text = pagealign_xalloc (BUFFER_DATA_SIZE);
+
+    return ret;
+}
+
+
+
+/* See whether a buffer and its file descriptor is empty.  */
+int
+buf_empty (buf)
+    struct buffer *buf;
+{
+       /* Try and read any data on the file descriptor first.
+        * We already know the descriptor is non-blocking.
+        */
+       buf_input_data (buf, NULL);
+       return buf_empty_p (buf);
+}
+
+
+
+/* See whether a buffer is empty.  */
+int
+buf_empty_p (struct buffer *buf)
+{
+    struct buffer_data *data;
+
+    for (data = buf->data; data != NULL; data = data->next)
+       if (data->size > 0)
+           return 0;
+    return 1;
+}
+
+
+
+# if defined (SERVER_FLOWCONTROL) || defined (PROXY_SUPPORT)
+/*
+ * Count how much data is stored in the buffer..
+ * Note that each buffer is a xmalloc'ed chunk BUFFER_DATA_SIZE.
+ */
+int
+buf_count_mem (struct buffer *buf)
+{
+    struct buffer_data *data;
+    int mem = 0;
+
+    for (data = buf->data; data != NULL; data = data->next)
+       mem += BUFFER_DATA_SIZE;
+
+    return mem;
+}
+# endif /* SERVER_FLOWCONTROL || PROXY_SUPPORT */
+
+
+
+/* Add data DATA of length LEN to BUF.  */
+void
+buf_output (struct buffer *buf, const char *data, size_t len)
+{
+    if (buf->data != NULL
+       && (((buf->last->text + BUFFER_DATA_SIZE)
+            - (buf->last->bufp + buf->last->size))
+           >= len))
+    {
+       memcpy (buf->last->bufp + buf->last->size, data, len);
+       buf->last->size += len;
+       return;
+    }
+
+    while (1)
+    {
+       struct buffer_data *newdata;
+
+       newdata = get_buffer_data ();
+       if (newdata == NULL)
+       {
+           (*buf->memory_error) (buf);
+           return;
+       }
+
+       if (buf->data == NULL)
+           buf->data = newdata;
+       else
+           buf->last->next = newdata;
+       newdata->next = NULL;
+       buf->last = newdata;
+
+       newdata->bufp = newdata->text;
+
+       if (len <= BUFFER_DATA_SIZE)
+       {
+           newdata->size = len;
+           memcpy (newdata->text, data, len);
+           return;
+       }
+
+       newdata->size = BUFFER_DATA_SIZE;
+       memcpy (newdata->text, data, BUFFER_DATA_SIZE);
+
+       data += BUFFER_DATA_SIZE;
+       len -= BUFFER_DATA_SIZE;
+    }
+
+    /*NOTREACHED*/
+}
+
+
+
+/* Add a '\0' terminated string to BUF.  */
+void
+buf_output0 (struct buffer *buf, const char *string)
+{
+    buf_output (buf, string, strlen (string));
+}
+
+
+
+/* Add a single character to BUF.  */
+void
+buf_append_char (struct buffer *buf, int ch)
+{
+    if (buf->data != NULL
+       && (buf->last->text + BUFFER_DATA_SIZE
+           != buf->last->bufp + buf->last->size))
+    {
+       *(buf->last->bufp + buf->last->size) = ch;
+       ++buf->last->size;
+    }
+    else
+    {
+       char b;
+
+       b = ch;
+       buf_output (buf, &b, 1);
+    }
+}
+
+
+
+/* Free struct buffer_data's from the list starting with FIRST and ending at
+ * LAST, inclusive.
+ */
+static inline void
+buf_free_datas (struct buffer_data *first, struct buffer_data *last)
+{
+    struct buffer_data *b, *n, *p;
+    b = first;
+    do
+    {
+       p = b;
+       n = b->next;
+       pagealign_free (b->text);
+       free (b);
+       b = n;
+    } while (p != last);
+}
+
+
+
+/*
+ * Send all the output we've been saving up.  Returns 0 for success or
+ * errno code.  If the buffer has been set to be nonblocking, this
+ * will just write until the write would block.
+ */
+int
+buf_send_output (struct buffer *buf)
+{
+    assert (buf->output != NULL);
+
+    while (buf->data != NULL)
+    {
+       struct buffer_data *data;
+
+       data = buf->data;
+
+       if (data->size > 0)
+       {
+           int status;
+           size_t nbytes;
+
+           status = (*buf->output) (buf->closure, data->bufp, data->size,
+                                    &nbytes);
+           if (status != 0)
+           {
+               /* Some sort of error.  Discard the data, and return.  */
+               buf_free_data (buf);
+               return status;
+           }
+
+           if (nbytes != data->size)
+           {
+               /* Not all the data was written out.  This is only
+                   permitted in nonblocking mode.  Adjust the buffer,
+                   and return.  */
+
+               assert (buf->nonblocking);
+
+               data->size -= nbytes;
+               data->bufp += nbytes;
+
+               return 0;
+           }
+       }
+
+       buf->data = data->next;
+       buf_free_datas (data, data);
+    }
+
+    buf->last = NULL;
+
+    return 0;
+}
+
+
+
+/*
+ * Flush any data queued up in the buffer.  If BLOCK is nonzero, then
+ * if the buffer is in nonblocking mode, put it into blocking mode for
+ * the duration of the flush.  This returns 0 on success, or an error
+ * code.
+ */
+int
+buf_flush (struct buffer *buf, bool block)
+{
+    int nonblocking;
+    int status;
+
+    assert (buf->flush != NULL);
+
+    nonblocking = buf->nonblocking;
+    if (nonblocking && block)
+    {
+        status = set_block (buf);
+       if (status != 0)
+           return status;
+    }
+
+    status = buf_send_output (buf);
+    if (status == 0)
+        status = (*buf->flush) (buf->closure);
+
+    if (nonblocking && block)
+    {
+        int blockstat;
+
+        blockstat = set_nonblock (buf);
+       if (status == 0)
+           status = blockstat;
+    }
+
+    return status;
+}
+
+
+
+/*
+ * Set buffer BUF to nonblocking I/O.  Returns 0 for success or errno
+ * code.
+ */
+int
+set_nonblock (struct buffer *buf)
+{
+    int status;
+
+    if (buf->nonblocking)
+       return 0;
+    assert (buf->block != NULL);
+    status = (*buf->block) (buf->closure, 0);
+    if (status != 0)
+       return status;
+    buf->nonblocking = true;
+    return 0;
+}
+
+
+
+/*
+ * Set buffer BUF to blocking I/O.  Returns 0 for success or errno
+ * code.
+ */
+int
+set_block (struct buffer *buf)
+{
+    int status;
+
+    if (! buf->nonblocking)
+       return 0;
+    assert (buf->block != NULL);
+    status = (*buf->block) (buf->closure, 1);
+    if (status != 0)
+       return status;
+    buf->nonblocking = false;
+    return 0;
+}
+
+
+
+/*
+ * Send a character count and some output.  Returns errno code or 0 for
+ * success.
+ *
+ * Sending the count in binary is OK since this is only used on a pipe
+ * within the same system.
+ */
+int
+buf_send_counted (struct buffer *buf)
+{
+    int size;
+    struct buffer_data *data;
+
+    size = 0;
+    for (data = buf->data; data != NULL; data = data->next)
+       size += data->size;
+
+    data = get_buffer_data ();
+    if (data == NULL)
+    {
+       (*buf->memory_error) (buf);
+       return ENOMEM;
+    }
+
+    data->next = buf->data;
+    buf->data = data;
+    if (buf->last == NULL)
+       buf->last = data;
+
+    data->bufp = data->text;
+    data->size = sizeof (int);
+
+    *((int *) data->text) = size;
+
+    return buf_send_output (buf);
+}
+
+
+
+/*
+ * Send a special count.  COUNT should be negative.  It will be
+ * handled specially by buf_copy_counted.  This function returns 0 or
+ * an errno code.
+ *
+ * Sending the count in binary is OK since this is only used on a pipe
+ * within the same system.
+ */
+int
+buf_send_special_count (struct buffer *buf, int count)
+{
+    struct buffer_data *data;
+
+    data = get_buffer_data ();
+    if (data == NULL)
+    {
+       (*buf->memory_error) (buf);
+       return ENOMEM;
+    }
+
+    data->next = buf->data;
+    buf->data = data;
+    if (buf->last == NULL)
+       buf->last = data;
+
+    data->bufp = data->text;
+    data->size = sizeof (int);
+
+    *((int *) data->text) = count;
+
+    return buf_send_output (buf);
+}
+
+
+
+/* Append a list of buffer_data structures to an buffer.  */
+void
+buf_append_data (struct buffer *buf, struct buffer_data *data,
+                 struct buffer_data *last)
+{
+    if (data != NULL)
+    {
+       if (buf->data == NULL)
+           buf->data = data;
+       else
+           buf->last->next = data;
+       buf->last = last;
+    }
+}
+
+
+
+# ifdef PROXY_SUPPORT
+/* Copy data structures and append them to a buffer.
+ *
+ * ERRORS
+ *   Failure to allocate memory here is fatal.
+ */
+void
+buf_copy_data (struct buffer *buf, struct buffer_data *data,
+               struct buffer_data *last)
+{
+    struct buffer_data *first, *new, *cur, *prev;
+
+    assert (buf);
+    assert (data);
+
+    prev = first = NULL;
+    cur = data;
+    while (1)
+    {
+       new = get_buffer_data ();
+       if (!new) error (1, errno, "Failed to allocate buffer data.");
+
+       if (!first) first = new;
+       memcpy (new->text, cur->bufp, cur->size);
+       new->bufp = new->text;
+       new->size = cur->size;
+       new->next = NULL;
+       if (prev) prev->next = new;
+       if (cur == last) break;
+       prev = new;
+       cur = cur->next;
+    }
+
+    buf_append_data (buf, first, new);
+}
+# endif /* PROXY_SUPPORT */
+
+
+
+/* Dispose of any remaining data in the buffer.  */
+void
+buf_free_data (struct buffer *buffer)
+{
+    if (buf_empty_p (buffer)) return;
+    buf_free_datas (buffer->data, buffer->last);
+    buffer->data = buffer->last = NULL;
+}
+
+
+
+/* Append the data in one buffer to another.  This removes the data
+ * from the source buffer.
+ */
+void
+buf_append_buffer (struct buffer *to, struct buffer *from)
+{
+    struct buffer_data *n;
+
+    /* Copy the data pointer to the new buf.  */
+    buf_append_data (to, from->data, from->last);
+
+    n = from->data;
+    while (n)
+    {
+       if (n == from->last) break;
+       n = n->next;
+    }
+
+    /* Remove from the original location.  */
+    from->data = NULL;
+    from->last = NULL;
+}
+
+
+
+/*
+ * Copy the contents of file F into buffer_data structures.  We can't
+ * copy directly into an buffer, because we want to handle failure and
+ * success differently.  Returns 0 on success, or -2 if out of
+ * memory, or a status code on error.  Since the caller happens to
+ * know the size of the file, it is passed in as SIZE.  On success,
+ * this function sets *RETP and *LASTP, which may be passed to
+ * buf_append_data.
+ */
+int
+buf_read_file (FILE *f, long int size, struct buffer_data **retp,
+               struct buffer_data **lastp)
+{
+    int status;
+
+    *retp = NULL;
+    *lastp = NULL;
+
+    while (size > 0)
+    {
+       struct buffer_data *data;
+       int get;
+
+       data = get_buffer_data ();
+       if (data == NULL)
+       {
+           status = -2;
+           goto error_return;
+       }
+
+       if (*retp == NULL)
+           *retp = data;
+       else
+           (*lastp)->next = data;
+       data->next = NULL;
+       *lastp = data;
+
+       data->bufp = data->text;
+       data->size = 0;
+
+       if (size > BUFFER_DATA_SIZE)
+           get = BUFFER_DATA_SIZE;
+       else
+           get = size;
+
+       errno = EIO;
+       if (fread (data->text, get, 1, f) != 1)
+       {
+           status = errno;
+           goto error_return;
+       }
+
+       data->size += get;
+       size -= get;
+    }
+
+    return 0;
+
+  error_return:
+    if (*retp != NULL)
+       buf_free_datas (*retp, (*lastp)->next);
+    return status;
+}
+
+
+
+/*
+ * Copy the contents of file F into buffer_data structures.  We can't
+ * copy directly into an buffer, because we want to handle failure and
+ * success differently.  Returns 0 on success, or -2 if out of
+ * memory, or a status code on error.  On success, this function sets
+ * *RETP and *LASTP, which may be passed to buf_append_data.
+ */
+int
+buf_read_file_to_eof (FILE *f, struct buffer_data **retp,
+                      struct buffer_data **lastp)
+{
+    int status;
+
+    *retp = NULL;
+    *lastp = NULL;
+
+    while (!feof (f))
+    {
+       struct buffer_data *data;
+       int get, nread;
+
+       data = get_buffer_data ();
+       if (data == NULL)
+       {
+           status = -2;
+           goto error_return;
+       }
+
+       if (*retp == NULL)
+           *retp = data;
+       else
+           (*lastp)->next = data;
+       data->next = NULL;
+       *lastp = data;
+
+       data->bufp = data->text;
+       data->size = 0;
+
+       get = BUFFER_DATA_SIZE;
+
+       errno = EIO;
+       nread = fread (data->text, 1, get, f);
+       if (nread == 0 && !feof (f))
+       {
+           status = errno;
+           goto error_return;
+       }
+
+       data->size = nread;
+    }
+
+    return 0;
+
+  error_return:
+    if (*retp != NULL)
+       buf_free_datas (*retp, (*lastp)->next);
+    return status;
+}
+
+
+
+/* Return the number of bytes in a chain of buffer_data structures.  */
+int
+buf_chain_length (struct buffer_data *buf)
+{
+    int size = 0;
+    while (buf)
+    {
+       size += buf->size;
+       buf = buf->next;
+    }
+    return size;
+}
+
+
+
+/* Return the number of bytes in a buffer.  */
+int
+buf_length (struct buffer *buf)
+{
+    return buf_chain_length (buf->data);
+}
+
+
+
+/*
+ * Read an arbitrary amount of data into an input buffer.  The buffer
+ * will be in nonblocking mode, and we just grab what we can.  Return
+ * 0 on success, or -1 on end of file, or -2 if out of memory, or an
+ * error code.  If COUNTP is not NULL, *COUNTP is set to the number of
+ * bytes read.
+ */
+int
+buf_input_data (struct buffer *buf, size_t *countp)
+{
+    assert (buf->input != NULL);
+
+    if (countp != NULL)
+       *countp = 0;
+
+    while (1)
+    {
+       int status;
+       size_t get, nbytes;
+
+       if (buf->data == NULL
+           || (buf->last->bufp + buf->last->size
+               == buf->last->text + BUFFER_DATA_SIZE))
+       {
+           struct buffer_data *data;
+
+           data = get_buffer_data ();
+           if (data == NULL)
+           {
+               (*buf->memory_error) (buf);
+               return -2;
+           }
+
+           if (buf->data == NULL)
+               buf->data = data;
+           else
+               buf->last->next = data;
+           data->next = NULL;
+           buf->last = data;
+
+           data->bufp = data->text;
+           data->size = 0;
+       }
+
+       get = ((buf->last->text + BUFFER_DATA_SIZE)
+              - (buf->last->bufp + buf->last->size));
+
+       status = (*buf->input) (buf->closure,
+                               buf->last->bufp + buf->last->size,
+                               0, get, &nbytes);
+       if (status != 0)
+           return status;
+
+       buf->last->size += nbytes;
+       if (countp != NULL)
+           *countp += nbytes;
+
+       if (nbytes < get)
+       {
+           /* If we did not fill the buffer, then presumably we read
+               all the available data.  */
+           return 0;
+       }
+    }
+
+    /*NOTREACHED*/
+}
+
+
+
+/*
+ * Read a line (characters up to a \012) from an input buffer.  (We
+ * use \012 rather than \n for the benefit of non Unix clients for
+ * which \n means something else).  This returns 0 on success, or -1
+ * on end of file, or -2 if out of memory, or an error code.  If it
+ * succeeds, it sets *LINE to an allocated buffer holding the contents
+ * of the line.  The trailing \012 is not included in the buffer.  If
+ * LENP is not NULL, then *LENP is set to the number of bytes read;
+ * strlen may not work, because there may be embedded null bytes.
+ */
+int
+buf_read_line (struct buffer *buf, char **line, size_t *lenp)
+{
+    return buf_read_short_line (buf, line, lenp, SIZE_MAX);
+}
+
+
+
+/* Like buf_read_line, but return -2 if no newline is found in MAX characters.
+ */
+int
+buf_read_short_line (struct buffer *buf, char **line, size_t *lenp,
+                     size_t max)
+{
+    assert (buf->input != NULL);
+
+    *line = NULL;
+
+    while (1)
+    {
+       size_t len, finallen, predicted_len;
+       struct buffer_data *data;
+       char *nl;
+
+       /* See if there is a newline in BUF.  */
+       len = 0;
+       for (data = buf->data; data != NULL; data = data->next)
+       {
+           nl = memchr (data->bufp, '\012', data->size);
+           if (nl != NULL)
+           {
+               finallen = nl - data->bufp;
+               if (xsum (len, finallen) >= max) return -2;
+               len += finallen;
+               break;
+           }
+           else if (xsum (len, data->size) >= max) return -2;
+           len += data->size;
+       }
+
+       /* If we found a newline, copy the line into a memory buffer,
+           and remove it from BUF.  */
+       if (data != NULL)
+       {
+           char *p;
+           struct buffer_data *nldata;
+
+           p = xmalloc (len + 1);
+           if (p == NULL)
+               return -2;
+           *line = p;
+
+           nldata = data;
+           data = buf->data;
+           while (data != nldata)
+           {
+               struct buffer_data *next;
+
+               memcpy (p, data->bufp, data->size);
+               p += data->size;
+               next = data->next;
+               buf_free_datas (data, data);
+               data = next;
+           }
+
+           memcpy (p, data->bufp, finallen);
+           p[finallen] = '\0';
+
+           data->size -= finallen + 1;
+           data->bufp = nl + 1;
+           buf->data = data;
+
+           if (lenp != NULL)
+               *lenp = len;
+
+           return 0;
+       }
+
+       /* Read more data until we get a newline or MAX characters.  */
+       predicted_len = 0;
+       while (1)
+       {
+           int status;
+           size_t size, nbytes;
+           char *mem;
+
+           if (buf->data == NULL
+               || (buf->last->bufp + buf->last->size
+                   == buf->last->text + BUFFER_DATA_SIZE))
+           {
+               data = get_buffer_data ();
+               if (data == NULL)
+               {
+                   (*buf->memory_error) (buf);
+                   return -2;
+               }
+
+               if (buf->data == NULL)
+                   buf->data = data;
+               else
+                   buf->last->next = data;
+               data->next = NULL;
+               buf->last = data;
+
+               data->bufp = data->text;
+               data->size = 0;
+           }
+
+           mem = buf->last->bufp + buf->last->size;
+           size = (buf->last->text + BUFFER_DATA_SIZE) - mem;
+
+           /* We need to read at least 1 byte.  We can handle up to
+               SIZE bytes.  This will only be efficient if the
+               underlying communication stream does its own buffering,
+               or is clever about getting more than 1 byte at a time.  */
+           status = (*buf->input) (buf->closure, mem, 1, size, &nbytes);
+           if (status != 0)
+               return status;
+
+           predicted_len += nbytes;
+           buf->last->size += nbytes;
+
+           /* Optimize slightly to avoid an unnecessary call to memchr.  */
+           if (nbytes == 1)
+           {
+               if (*mem == '\012')
+                   break;
+           }
+           else
+           {
+               if (memchr (mem, '\012', nbytes) != NULL)
+                   break;
+           }
+           if (xsum (len, predicted_len) >= max) return -2;
+       }
+    }
+}
+
+
+
+/*
+ * Extract data from the input buffer BUF.  This will read up to WANT
+ * bytes from the buffer.  It will set *RETDATA to point at the bytes,
+ * and set *GOT to the number of bytes to be found there.  Any buffer
+ * call which uses BUF may change the contents of the buffer at *DATA,
+ * so the data should be fully processed before any further calls are
+ * made.  This returns 0 on success, or -1 on end of file, or -2 if
+ * out of memory, or an error code.
+ */
+int
+buf_read_data (struct buffer *buf, size_t want, char **retdata, size_t *got)
+{
+    while (buf->data != NULL && buf->data->size == 0)
+    {
+       struct buffer_data *next;
+
+       next = buf->data->next;
+       buf_free_datas (buf->data, buf->data);
+       buf->data = next;
+       if (next == NULL)
+           buf->last = NULL;
+    }
+
+    if (buf->data == NULL)
+    {
+       struct buffer_data *data;
+       int status;
+       size_t get, nbytes;
+
+       if (!buf->input)
+           /* nonio (memory) buffers have no underlying input methods.  If
+            * there are no buffer datas, just return EOF.
+            */
+           return -1;
+
+       data = get_buffer_data ();
+       if (data == NULL)
+       {
+           (*buf->memory_error) (buf);
+           return -2;
+       }
+
+       buf->data = data;
+       buf->last = data;
+       data->next = NULL;
+       data->bufp = data->text;
+       data->size = 0;
+
+       if (want < BUFFER_DATA_SIZE)
+           get = want;
+       else
+           get = BUFFER_DATA_SIZE;
+       status = (*buf->input) (buf->closure, data->bufp, get,
+                               BUFFER_DATA_SIZE, &nbytes);
+       if (status != 0)
+           return status;
+
+       data->size = nbytes;
+    }
+
+    *retdata = buf->data->bufp;
+    if (want < buf->data->size)
+    {
+        *got = want;
+       buf->data->size -= want;
+       buf->data->bufp += want;
+    }
+    else
+    {
+        *got = buf->data->size;
+       buf->data->size = 0;
+    }
+
+    return 0;
+}
+
+
+
+/*
+ * Copy lines from an input buffer to an output buffer.
+ * This copies all complete lines (characters up to a
+ * newline) from INBUF to OUTBUF.  Each line in OUTBUF is preceded by the
+ * character COMMAND and a space.
+ */
+void
+buf_copy_lines (struct buffer *outbuf, struct buffer *inbuf, int command)
+{
+    while (1)
+    {
+       struct buffer_data *data;
+       struct buffer_data *nldata;
+       char *nl;
+       int len;
+
+       /* See if there is a newline in INBUF.  */
+       nldata = NULL;
+       nl = NULL;
+       for (data = inbuf->data; data != NULL; data = data->next)
+       {
+           nl = memchr (data->bufp, '\n', data->size);
+           if (nl != NULL)
+           {
+               nldata = data;
+               break;
+           }
+       }
+
+       if (nldata == NULL)
+       {
+           /* There are no more lines in INBUF.  */
+           return;
+       }
+
+       /* Put in the command.  */
+       buf_append_char (outbuf, command);
+       buf_append_char (outbuf, ' ');
+
+       if (inbuf->data != nldata)
+       {
+           /*
+            * Simply move over all the buffers up to the one containing
+            * the newline.
+            */
+           for (data = inbuf->data; data->next != nldata; data = data->next);
+           data->next = NULL;
+           buf_append_data (outbuf, inbuf->data, data);
+           inbuf->data = nldata;
+       }
+
+       /*
+        * If the newline is at the very end of the buffer, just move
+        * the buffer onto OUTBUF.  Otherwise we must copy the data.
+        */
+       len = nl + 1 - nldata->bufp;
+       if (len == nldata->size)
+       {
+           inbuf->data = nldata->next;
+           if (inbuf->data == NULL)
+               inbuf->last = NULL;
+
+           nldata->next = NULL;
+           buf_append_data (outbuf, nldata, nldata);
+       }
+       else
+       {
+           buf_output (outbuf, nldata->bufp, len);
+           nldata->bufp += len;
+           nldata->size -= len;
+       }
+    }
+}
+
+
+
+/*
+ * Copy counted data from one buffer to another.  The count is an
+ * integer, host size, host byte order (it is only used across a
+ * pipe).  If there is enough data, it should be moved over.  If there
+ * is not enough data, it should remain on the original buffer.  A
+ * negative count is a special case.  if one is seen, *SPECIAL is set
+ * to the (negative) count value and no additional data is gathered
+ * from the buffer; normally *SPECIAL is set to 0.  This function
+ * returns the number of bytes it needs to see in order to actually
+ * copy something over.
+ */
+int
+buf_copy_counted (struct buffer *outbuf, struct buffer *inbuf, int *special)
+{
+    *special = 0;
+
+    while (1)
+    {
+       struct buffer_data *data;
+       int need;
+       union
+       {
+           char intbuf[sizeof (int)];
+           int i;
+       } u;
+       char *intp;
+       int count;
+       struct buffer_data *start;
+       int startoff;
+       struct buffer_data *stop;
+       int stopwant;
+
+       /* See if we have enough bytes to figure out the count.  */
+       need = sizeof (int);
+       intp = u.intbuf;
+       for (data = inbuf->data; data != NULL; data = data->next)
+       {
+           if (data->size >= need)
+           {
+               memcpy (intp, data->bufp, need);
+               break;
+           }
+           memcpy (intp, data->bufp, data->size);
+           intp += data->size;
+           need -= data->size;
+       }
+       if (data == NULL)
+       {
+           /* We don't have enough bytes to form an integer.  */
+           return need;
+       }
+
+       count = u.i;
+       start = data;
+       startoff = need;
+
+       if (count < 0)
+       {
+           /* A negative COUNT is a special case meaning that we
+               don't need any further information.  */
+           stop = start;
+           stopwant = 0;
+       }
+       else
+       {
+           /*
+            * We have an integer in COUNT.  We have gotten all the
+            * data from INBUF in all buffers before START, and we
+            * have gotten STARTOFF bytes from START.  See if we have
+            * enough bytes remaining in INBUF.
+            */
+           need = count - (start->size - startoff);
+           if (need <= 0)
+           {
+               stop = start;
+               stopwant = count;
+           }
+           else
+           {
+               for (data = start->next; data != NULL; data = data->next)
+               {
+                   if (need <= data->size)
+                       break;
+                   need -= data->size;
+               }
+               if (data == NULL)
+               {
+                   /* We don't have enough bytes.  */
+                   return need;
+               }
+               stop = data;
+               stopwant = need;
+           }
+       }
+
+       /*
+        * We have enough bytes.  Free any buffers in INBUF before
+        * START, and remove STARTOFF bytes from START, so that we can
+        * forget about STARTOFF.
+        */
+       start->bufp += startoff;
+       start->size -= startoff;
+
+       if (start->size == 0)
+           start = start->next;
+
+       if (stop->size == stopwant)
+       {
+           stop = stop->next;
+           stopwant = 0;
+       }
+
+       while (inbuf->data != start)
+       {
+           data = inbuf->data;
+           inbuf->data = data->next;
+           buf_free_datas (data, data);
+       }
+
+       /* If COUNT is negative, set *SPECIAL and get out now.  */
+       if (count < 0)
+       {
+           *special = count;
+           return 0;
+       }
+
+       /*
+        * We want to copy over the bytes from START through STOP.  We
+        * only want STOPWANT bytes from STOP.
+        */
+
+       if (start != stop)
+       {
+           /* Attach the buffers from START through STOP to OUTBUF.  */
+           for (data = start; data->next != stop; data = data->next);
+           inbuf->data = stop;
+           data->next = NULL;
+           buf_append_data (outbuf, start, data);
+       }
+
+       if (stopwant > 0)
+       {
+           buf_output (outbuf, stop->bufp, stopwant);
+           stop->bufp += stopwant;
+           stop->size -= stopwant;
+       }
+    }
+
+    /*NOTREACHED*/
+}
+
+
+
+int
+buf_get_fd (struct buffer *buf)
+{
+    if (buf->get_fd)
+       return (*buf->get_fd) (buf->closure);
+    return -1;
+}
+
+
+
+/* Shut down a buffer.  This returns 0 on success, or an errno code.  */
+int
+buf_shutdown (struct buffer *buf)
+{
+    if (buf->shutdown) return (*buf->shutdown) (buf);
+    return 0;
+}
+
+
+
+/* Certain types of communication input and output data in packets,
+   where each packet is translated in some fashion.  The packetizing
+   buffer type supports that, given a buffer which handles lower level
+   I/O and a routine to translate the data in a packet.
+
+   This code uses two bytes for the size of a packet, so packets are
+   restricted to 65536 bytes in total.
+
+   The translation functions should just translate; they may not
+   significantly increase or decrease the amount of data.  The actual
+   size of the initial data is part of the translated data.  The
+   output translation routine may add up to PACKET_SLOP additional
+   bytes, and the input translation routine should shrink the data
+   correspondingly.  */
+
+# define PACKET_SLOP (100)
+
+/* This structure is the closure field of a packetizing buffer.  */
+
+struct packetizing_buffer
+{
+    /* The underlying buffer.  */
+    struct buffer *buf;
+    /* The input translation function.  Exactly one of inpfn and outfn
+       will be NULL.  The input translation function should
+       untranslate the data in INPUT, storing the result in OUTPUT.
+       SIZE is the amount of data in INPUT, and is also the size of
+       OUTPUT.  This should return 0 on success, or an errno code.  */
+    int (*inpfn) (void *fnclosure, const char *input, char *output,
+                       size_t size);
+    /* The output translation function.  This should translate the
+       data in INPUT, storing the result in OUTPUT.  The first two
+       bytes in INPUT will be the size of the data, and so will SIZE.
+       This should set *TRANSLATED to the amount of translated data in
+       OUTPUT.  OUTPUT is large enough to hold SIZE + PACKET_SLOP
+       bytes.  This should return 0 on success, or an errno code.  */
+    int (*outfn) (void *fnclosure, const char *input, char *output,
+                       size_t size, size_t *translated);
+    /* A closure for the translation function.  */
+    void *fnclosure;
+    /* For an input buffer, we may have to buffer up data here.  */
+    /* This is non-zero if the buffered data has been translated.
+       Otherwise, the buffered data has not been translated, and starts
+       with the two byte packet size.  */
+    bool translated;
+    /* The amount of buffered data.  */
+    size_t holdsize;
+    /* The buffer allocated to hold the data.  */
+    char *holdbuf;
+    /* The size of holdbuf.  */
+    size_t holdbufsize;
+    /* If translated is set, we need another data pointer to track
+       where we are in holdbuf.  If translated is clear, then this
+       pointer is not used.  */
+    char *holddata;
+};
+
+
+
+static int packetizing_buffer_input (void *, char *, size_t, size_t, size_t *);
+static int packetizing_buffer_output (void *, const char *, size_t, size_t *);
+static int packetizing_buffer_flush (void *);
+static int packetizing_buffer_block (void *, bool);
+static int packetizing_buffer_get_fd (void *);
+static int packetizing_buffer_shutdown (struct buffer *);
+
+
+
+/* Create a packetizing buffer.  */
+struct buffer *
+packetizing_buffer_initialize (struct buffer *buf,
+                               int (*inpfn) (void *, const char *, char *,
+                                             size_t),
+                               int (*outfn) (void *, const char *, char *,
+                                             size_t, size_t *),
+                               void *fnclosure,
+                               void (*memory) (struct buffer *))
+{
+    struct packetizing_buffer *pb;
+
+    pb = xmalloc (sizeof *pb);
+    memset (pb, 0, sizeof *pb);
+
+    pb->buf = buf;
+    pb->inpfn = inpfn;
+    pb->outfn = outfn;
+    pb->fnclosure = fnclosure;
+
+    if (inpfn != NULL)
+    {
+       /* Add PACKET_SLOP to handle larger translated packets, and
+           add 2 for the count.  This buffer is increased if
+           necessary.  */
+       pb->holdbufsize = BUFFER_DATA_SIZE + PACKET_SLOP + 2;
+       pb->holdbuf = xmalloc (pb->holdbufsize);
+    }
+
+    return buf_initialize (inpfn != NULL ? packetizing_buffer_input : NULL,
+                          inpfn != NULL ? NULL : packetizing_buffer_output,
+                          inpfn != NULL ? NULL : packetizing_buffer_flush,
+                          packetizing_buffer_block,
+                          packetizing_buffer_get_fd,
+                          packetizing_buffer_shutdown,
+                          memory,
+                          pb);
+}
+
+
+
+/* Input data from a packetizing buffer.  */
+static int
+packetizing_buffer_input (void *closure, char *data, size_t need, size_t size,
+                          size_t *got)
+{
+    struct packetizing_buffer *pb = closure;
+
+    *got = 0;
+
+    if (pb->holdsize > 0 && pb->translated)
+    {
+       size_t copy;
+
+       copy = pb->holdsize;
+
+       if (copy > size)
+       {
+           memcpy (data, pb->holddata, size);
+           pb->holdsize -= size;
+           pb->holddata += size;
+           *got = size;
+           return 0;
+       }
+
+       memcpy (data, pb->holddata, copy);
+       pb->holdsize = 0;
+       pb->translated = false;
+
+       data += copy;
+       need -= copy;
+       size -= copy;
+       *got = copy;
+    }
+
+    while (need > 0 || *got == 0)
+    {
+       int status;
+       size_t get, nread, count, tcount;
+       char *bytes;
+       static char *stackoutbuf = NULL;
+       char *inbuf, *outbuf;
+
+       if (!stackoutbuf)
+           stackoutbuf = xmalloc (BUFFER_DATA_SIZE + PACKET_SLOP);
+
+       /* If we don't already have the two byte count, get it.  */
+       if (pb->holdsize < 2)
+       {
+           get = 2 - pb->holdsize;
+           status = buf_read_data (pb->buf, get, &bytes, &nread);
+           if (status != 0)
+           {
+               /* buf_read_data can return -2, but a buffer input
+                   function is only supposed to return -1, 0, or an
+                   error code.  */
+               if (status == -2)
+                   status = ENOMEM;
+               return status;
+           }
+
+           if (nread == 0)
+           {
+               /* The buffer is in nonblocking mode, and we didn't
+                   manage to read anything.  */
+               return 0;
+           }
+
+           if (get == 1)
+               pb->holdbuf[1] = bytes[0];
+           else
+           {
+               pb->holdbuf[0] = bytes[0];
+               if (nread < 2)
+               {
+                   /* We only got one byte, but we needed two.  Stash
+                       the byte we got, and try again.  */
+                   pb->holdsize = 1;
+                   continue;
+               }
+               pb->holdbuf[1] = bytes[1];
+           }
+           pb->holdsize = 2;
+       }
+
+       /* Read the packet.  */
+
+       count = (((pb->holdbuf[0] & 0xff) << 8)
+                + (pb->holdbuf[1] & 0xff));
+
+       if (count + 2 > pb->holdbufsize)
+       {
+           char *n;
+
+           /* We didn't allocate enough space in the initialize
+               function.  */
+
+           n = xrealloc (pb->holdbuf, count + 2);
+           if (n == NULL)
+           {
+               (*pb->buf->memory_error) (pb->buf);
+               return ENOMEM;
+           }
+           pb->holdbuf = n;
+           pb->holdbufsize = count + 2;
+       }
+
+       get = count - (pb->holdsize - 2);
+
+       status = buf_read_data (pb->buf, get, &bytes, &nread);
+       if (status != 0)
+       {
+           /* buf_read_data can return -2, but a buffer input
+               function is only supposed to return -1, 0, or an error
+               code.  */
+           if (status == -2)
+               status = ENOMEM;
+           return status;
+       }
+
+       if (nread == 0)
+       {
+           /* We did not get any data.  Presumably the buffer is in
+               nonblocking mode.  */
+           return 0;
+       }
+
+       if (nread < get)
+       {
+           /* We did not get all the data we need to fill the packet.
+               buf_read_data does not promise to return all the bytes
+               requested, so we must try again.  */
+           memcpy (pb->holdbuf + pb->holdsize, bytes, nread);
+           pb->holdsize += nread;
+           continue;
+       }
+
+       /* We have a complete untranslated packet of COUNT bytes.  */
+
+       if (pb->holdsize == 2)
+       {
+           /* We just read the entire packet (the 2 bytes in
+               PB->HOLDBUF are the size).  Save a memcpy by
+               translating directly from BYTES.  */
+           inbuf = bytes;
+       }
+       else
+       {
+           /* We already had a partial packet in PB->HOLDBUF.  We
+               need to copy the new data over to make the input
+               contiguous.  */
+           memcpy (pb->holdbuf + pb->holdsize, bytes, nread);
+           inbuf = pb->holdbuf + 2;
+       }
+
+       if (count <= BUFFER_DATA_SIZE + PACKET_SLOP)
+           outbuf = stackoutbuf;
+       else
+       {
+           outbuf = xmalloc (count);
+           if (outbuf == NULL)
+           {
+               (*pb->buf->memory_error) (pb->buf);
+               return ENOMEM;
+           }
+       }
+
+       status = (*pb->inpfn) (pb->fnclosure, inbuf, outbuf, count);
+       if (status != 0)
+           return status;
+
+       /* The first two bytes in the translated buffer are the real
+           length of the translated data.  */
+       tcount = ((outbuf[0] & 0xff) << 8) + (outbuf[1] & 0xff);
+
+       if (tcount > count)
+           error (1, 0, "Input translation failure");
+
+       if (tcount > size)
+       {
+           /* We have more data than the caller has provided space
+               for.  We need to save some of it for the next call.  */
+
+           memcpy (data, outbuf + 2, size);
+           *got += size;
+
+           pb->holdsize = tcount - size;
+           memcpy (pb->holdbuf, outbuf + 2 + size, tcount - size);
+           pb->holddata = pb->holdbuf;
+           pb->translated = true;
+
+           if (outbuf != stackoutbuf)
+               free (outbuf);
+
+           return 0;
+       }
+
+       memcpy (data, outbuf + 2, tcount);
+
+       if (outbuf != stackoutbuf)
+           free (outbuf);
+
+       pb->holdsize = 0;
+
+       data += tcount;
+       need -= tcount;
+       size -= tcount;
+       *got += tcount;
+    }
+
+    return 0;
+}
+
+
+
+/* Output data to a packetizing buffer.  */
+static int
+packetizing_buffer_output (void *closure, const char *data, size_t have,
+                           size_t *wrote)
+{
+    struct packetizing_buffer *pb = closure;
+    static char *inbuf = NULL;  /* These two buffers are static so that they
+                                * depend on the size of BUFFER_DATA_SIZE yet
+                                * still only be allocated once per run.
+                                */
+    static char *stack_outbuf = NULL;
+    struct buffer_data *outdata = NULL; /* Initialize to silence -Wall.  Dumb.
+                                        */
+    char *outbuf;
+    size_t size, translated;
+    int status;
+
+    /* It would be easy to xmalloc a buffer, but I don't think this
+       case can ever arise.  */
+    assert (have <= BUFFER_DATA_SIZE);
+
+    if (!inbuf)
+    {
+       inbuf = xmalloc (BUFFER_DATA_SIZE + 2);
+        stack_outbuf = xmalloc (BUFFER_DATA_SIZE + PACKET_SLOP + 4);
+    }
+
+    inbuf[0] = (have >> 8) & 0xff;
+    inbuf[1] = have & 0xff;
+    memcpy (inbuf + 2, data, have);
+
+    size = have + 2;
+
+    /* The output function is permitted to add up to PACKET_SLOP
+       bytes, and we need 2 bytes for the size of the translated data.
+       If we can guarantee that the result will fit in a buffer_data,
+       we translate directly into one to avoid a memcpy in buf_output.  */
+    if (size + PACKET_SLOP + 2 > BUFFER_DATA_SIZE)
+       outbuf = stack_outbuf;
+    else
+    {
+       outdata = get_buffer_data ();
+       if (outdata == NULL)
+       {
+           (*pb->buf->memory_error) (pb->buf);
+           return ENOMEM;
+       }
+
+       outdata->next = NULL;
+       outdata->bufp = outdata->text;
+
+       outbuf = outdata->text;
+    }
+
+    status = (*pb->outfn) (pb->fnclosure, inbuf, outbuf + 2, size,
+                          &translated);
+    if (status != 0)
+       return status;
+
+    /* The output function is permitted to add up to PACKET_SLOP
+       bytes.  */
+    assert (translated <= size + PACKET_SLOP);
+
+    outbuf[0] = (translated >> 8) & 0xff;
+    outbuf[1] = translated & 0xff;
+
+    if (outbuf == stack_outbuf)
+       buf_output (pb->buf, outbuf, translated + 2);
+    else
+    {
+       outdata->size = translated + 2;
+       buf_append_data (pb->buf, outdata, outdata);
+    }
+
+    *wrote = have;
+
+    /* We will only be here because buf_send_output was called on the
+       packetizing buffer.  That means that we should now call
+       buf_send_output on the underlying buffer.  */
+    return buf_send_output (pb->buf);
+}
+
+
+
+/* Flush data to a packetizing buffer.  */
+static int
+packetizing_buffer_flush (void *closure)
+{
+    struct packetizing_buffer *pb = closure;
+
+    /* Flush the underlying buffer.  Note that if the original call to
+       buf_flush passed 1 for the BLOCK argument, then the buffer will
+       already have been set into blocking mode, so we should always
+       pass 0 here.  */
+    return buf_flush (pb->buf, 0);
+}
+
+
+
+/* The block routine for a packetizing buffer.  */
+static int
+packetizing_buffer_block (void *closure, bool block)
+{
+    struct packetizing_buffer *pb = closure;
+
+    if (block)
+       return set_block (pb->buf);
+    else
+       return set_nonblock (pb->buf);
+}
+
+
+
+/* Return the file descriptor underlying any child buffers.  */
+static int
+packetizing_buffer_get_fd (void *closure)
+{
+    struct packetizing_buffer *cb = closure;
+    return buf_get_fd (cb->buf);
+}
+
+
+
+/* Shut down a packetizing buffer.  */
+static int
+packetizing_buffer_shutdown (struct buffer *buf)
+{
+    struct packetizing_buffer *pb = buf->closure;
+
+    return buf_shutdown (pb->buf);
+}
+
+
+
+/* All server communication goes through buffer structures.  Most of
+   the buffers are built on top of a file descriptor.  This structure
+   is used as the closure field in a buffer.  */
+
+struct fd_buffer
+{
+    /* The file descriptor.  */
+    int fd;
+    /* Nonzero if the file descriptor is in blocking mode.  */
+    int blocking;
+    /* The child process id when fd is a pipe.  */
+    pid_t child_pid;
+    /* The connection info, when fd is a pipe to a server.  */
+    cvsroot_t *root;
+};
+
+static int fd_buffer_input (void *, char *, size_t, size_t, size_t *);
+static int fd_buffer_output (void *, const char *, size_t, size_t *);
+static int fd_buffer_flush (void *);
+static int fd_buffer_block (void *, bool);
+static int fd_buffer_get_fd (void *);
+static int fd_buffer_shutdown (struct buffer *);
+
+/* Initialize a buffer built on a file descriptor.  FD is the file
+   descriptor.  INPUT is nonzero if this is for input, zero if this is
+   for output.  MEMORY is the function to call when a memory error
+   occurs.  */
+
+struct buffer *
+fd_buffer_initialize (int fd, pid_t child_pid, cvsroot_t *root, bool input,
+                      void (*memory) (struct buffer *))
+{
+    struct fd_buffer *n;
+
+    n = xmalloc (sizeof *n);
+    n->fd = fd;
+    n->child_pid = child_pid;
+    n->root = root;
+    fd_buffer_block (n, true);
+    return buf_initialize (input ? fd_buffer_input : NULL,
+                          input ? NULL : fd_buffer_output,
+                          input ? NULL : fd_buffer_flush,
+                          fd_buffer_block, fd_buffer_get_fd,
+                          fd_buffer_shutdown,
+                          memory,
+                          n);
+}
+
+
+
+/* The buffer input function for a buffer built on a file descriptor.
+ *
+ * In non-blocking mode, this function will read as many bytes as it can in a
+ * single try, up to SIZE bytes, and return.
+ *
+ * In blocking mode with NEED > 0, this function will read as many bytes as it
+ * can but will not return until it has read at least NEED bytes.
+ *
+ * In blocking mode with NEED == 0, this function will block until it can read
+ * either at least one byte or EOF, then read as many bytes as are available
+ * and return.  At the very least, compress_buffer_shutdown depends on this
+ * behavior to read EOF and can loop indefinitely without it.
+ *
+ * ASSUMPTIONS
+ *   NEED <= SIZE.
+ *
+ * INPUTS
+ *   closure   Our FD_BUFFER struct.
+ *   data      The start of our input buffer.
+ *   need      How many bytes our caller needs.
+ *   size      How many bytes are available in DATA.
+ *   got       Where to store the number of bytes read.
+ *
+ * OUTPUTS
+ *   data      Filled with bytes read.
+ *   *got      Number of bytes actually read into DATA.
+ *
+ * RETURNS
+ *   errno     On error.
+ *   -1                On EOF.
+ *   0         Otherwise.
+ *
+ * ERRORS
+ *   This function can return an error if fd_buffer_block(), or the system
+ *   read() or select() calls do.
+ */
+static int
+fd_buffer_input (void *closure, char *data, size_t need, size_t size,
+                size_t *got)
+{
+    struct fd_buffer *fb = closure;
+    int nbytes;
+
+    assert (need <= size);
+
+    *got = 0;
+
+    if (fb->blocking)
+    {
+       int status;
+       fd_set readfds;
+
+       /* Set non-block.  */
+        status = fd_buffer_block (fb, false);
+       if (status != 0) return status;
+
+       FD_ZERO (&readfds);
+       FD_SET (fb->fd, &readfds);
+       do
+       {
+           int numfds;
+
+           do {
+               /* This used to select on exceptions too, but as far
+                  as I know there was never any reason to do that and
+                  SCO doesn't let you select on exceptions on pipes.  */
+               numfds = fd_select (fb->fd + 1, &readfds, NULL, NULL, NULL);
+               if (numfds < 0 && errno != EINTR)
+               {
+                   status = errno;
+                   goto block_done;
+               }
+           } while (numfds < 0);
+
+           nbytes = read (fb->fd, data + *got, size - *got);
+
+           if (nbytes == 0)
+           {
+               /* End of file.  This assumes that we are using POSIX or BSD
+                  style nonblocking I/O.  On System V we will get a zero
+                  return if there is no data, even when not at EOF.  */
+               if (*got)
+               {
+                   /* We already read some data, so return no error, counting
+                    * on the fact that we will read EOF again next time.
+                    */
+                   status = 0;
+                   break;
+               }
+               else
+               {
+                   /* Return EOF.  */
+                   status = -1;
+                   break;
+               }
+           }
+
+           if (nbytes < 0)
+           {
+               /* Some error occurred.  */
+               if (!blocking_error (errno))
+               {
+                   status = errno;
+                   break;
+               }
+               /* else Everything's fine, we just didn't get any data.  */
+           }
+
+           *got += nbytes;
+       } while (*got < need);
+
+block_done:
+       if (status == 0 || status == -1)
+       {
+           int newstatus;
+
+           /* OK or EOF - Reset block.  */
+           newstatus = fd_buffer_block (fb, true);
+           if (newstatus) status = newstatus;
+       }
+       return status;
+    }
+
+    /* The above will always return.  Handle non-blocking read.  */
+    nbytes = read (fb->fd, data, size);
+
+    if (nbytes > 0)
+    {
+       *got = nbytes;
+       return 0;
+    }
+
+    if (nbytes == 0)
+       /* End of file.  This assumes that we are using POSIX or BSD
+          style nonblocking I/O.  On System V we will get a zero
+          return if there is no data, even when not at EOF.  */
+       return -1;
+
+    /* Some error occurred.  */
+    if (blocking_error (errno))
+       /* Everything's fine, we just didn't get any data.  */
+       return 0;
+
+    return errno;
+}
+
+
+
+/* The buffer output function for a buffer built on a file descriptor.  */
+
+static int
+fd_buffer_output (void *closure, const char *data, size_t have, size_t *wrote)
+{
+    struct fd_buffer *fd = closure;
+
+    *wrote = 0;
+
+    while (have > 0)
+    {
+       int nbytes;
+
+       nbytes = write (fd->fd, data, have);
+
+       if (nbytes <= 0)
+       {
+           if (! fd->blocking
+               && (nbytes == 0 || blocking_error (errno)))
+           {
+               /* A nonblocking write failed to write any data.  Just
+                  return.  */
+               return 0;
+           }
+
+           /* Some sort of error occurred.  */
+
+           if (nbytes == 0)
+               return EIO;
+
+           return errno;
+       }
+
+       *wrote += nbytes;
+       data += nbytes;
+       have -= nbytes;
+    }
+
+    return 0;
+}
+
+
+
+/* The buffer flush function for a buffer built on a file descriptor.  */
+static int
+fd_buffer_flush (void *closure)
+{
+    /* We don't need to do anything here.  Our fd doesn't have its own buffer
+     * and syncing won't do anything but slow us down.
+     *
+     * struct fd_buffer *fb = closure;
+     *
+     * if (fsync (fb->fd) < 0 && errno != EROFS && errno != EINVAL)
+     *     return errno;
+     */
+    return 0;
+}
+
+
+
+static struct stat devnull;
+static int devnull_set = -1;
+
+/* The buffer block function for a buffer built on a file descriptor.  */
+static int
+fd_buffer_block (void *closure, bool block)
+{
+    struct fd_buffer *fb = closure;
+# if defined (F_GETFL) && defined (O_NONBLOCK) && defined (F_SETFL)
+    int flags;
+
+    flags = fcntl (fb->fd, F_GETFL, 0);
+    if (flags < 0)
+       return errno;
+
+    if (block)
+       flags &= ~O_NONBLOCK;
+    else
+       flags |= O_NONBLOCK;
+
+    if (fcntl (fb->fd, F_SETFL, flags) < 0)
+    {
+       /*
+        * BSD returns ENODEV when we try to set block/nonblock on /dev/null.
+        * BSDI returns ENOTTY when we try to set block/nonblock on /dev/null.
+        */
+       struct stat sb;
+       int save_errno = errno;
+       bool isdevnull = false;
+
+       if (devnull_set == -1)
+           devnull_set = stat ("/dev/null", &devnull);
+
+       if (devnull_set >= 0)
+           /* Equivalent to /dev/null ? */
+           isdevnull = (fstat (fb->fd, &sb) >= 0
+                        && sb.st_dev == devnull.st_dev
+                        && sb.st_ino == devnull.st_ino
+                        && sb.st_mode == devnull.st_mode
+                        && sb.st_uid == devnull.st_uid
+                        && sb.st_gid == devnull.st_gid
+                        && sb.st_size == devnull.st_size
+                        && sb.st_blocks == devnull.st_blocks
+                        && sb.st_blksize == devnull.st_blksize);
+       if (isdevnull)
+           errno = 0;
+       else
+       {
+           errno = save_errno;
+           return errno;
+       }
+    }
+# endif /* F_GETFL && O_NONBLOCK && F_SETFL */
+
+    fb->blocking = block;
+
+    return 0;
+}
+
+
+
+static int
+fd_buffer_get_fd (void *closure)
+{
+    struct fd_buffer *fb = closure;
+    return fb->fd;
+}
+
+
+
+/* The buffer shutdown function for a buffer built on a file descriptor.
+ *
+ * This function disposes of memory allocated for this buffer.
+ */
+static int
+fd_buffer_shutdown (struct buffer *buf)
+{
+    struct fd_buffer *fb = buf->closure;
+    struct stat s;
+    bool closefd, statted;
+
+    /* Must be an open pipe, socket, or file.  What could go wrong? */
+    if (fstat (fb->fd, &s) == -1) statted = false;
+    else statted = true;
+    /* Don't bother to try closing the FD if we couldn't stat it.  This
+     * probably won't work.
+     *
+     * (buf_shutdown() on some of the server/child communication pipes is
+     * getting EBADF on both the fstat and the close.  I'm not sure why -
+     * perhaps they were alredy closed somehow?
+     */
+    closefd = statted;
+
+    /* Flush the buffer if possible.  */
+    if (buf->flush)
+    {
+       buf_flush (buf, 1);
+       buf->flush = NULL;
+    }
+
+    if (buf->input)
+    {
+       /* There used to be a check here for unread data in the buffer of
+        * the pipe, but it was deemed unnecessary and possibly dangerous.  In
+        * some sense it could be second-guessing the caller who requested it
+        * closed, as well.
+        */
+
+/* FIXME:
+ *
+ * This mess of #ifdefs is hard to read.  There must be some relation between
+ * the macros being checked which at least deserves comments - if
+ * SHUTDOWN_SERVER, NO_SOCKET_TO_FD, & START_RSH_WITH_POPEN_RW were completely
+ * independant, then the next few lines could easily refuse to compile.
+ *
+ * The note below about START_RSH_WITH_POPEN_RW never being set when
+ * SHUTDOWN_SERVER is defined means that this code would always break on
+ * systems with SHUTDOWN_SERVER defined and thus the comment must now be
+ * incorrect or the code was broken since the comment was written.
+ */
+# ifdef SHUTDOWN_SERVER
+       if (fb->root && fb->root->method != server_method)
+# endif
+# ifndef NO_SOCKET_TO_FD
+       {
+           /* shutdown() sockets */
+           if (statted && S_ISSOCK (s.st_mode))
+               shutdown (fb->fd, 0);
+       }
+# endif /* NO_SOCKET_TO_FD */
+# ifdef START_RSH_WITH_POPEN_RW
+/* Can't be set with SHUTDOWN_SERVER defined */
+       /* FIXME: This is now certainly broken since pclose is defined by ANSI
+        * C to accept a FILE * argument.  The switch will need to happen at a
+        * higher abstraction level to switch between initializing stdio & fd
+        * buffers on systems that need this (or maybe an fd buffer that keeps
+        * track of the FILE * could be used - I think flushing the stream
+        * before beginning exclusive access via the FD is OK.
+        */
+       else if (fb->root && pclose (fb->fd) == EOF)
+       {
+           error (0, errno, "closing connection to %s",
+                  fb->root->hostname);
+           closefd = false;
+       }
+# endif /* START_RSH_WITH_POPEN_RW */
+
+       buf->input = NULL;
+    }
+    else if (buf->output)
+    {
+# ifdef SHUTDOWN_SERVER
+       /* FIXME:  Should have a SHUTDOWN_SERVER_INPUT &
+        * SHUTDOWN_SERVER_OUTPUT
+        */
+       if (fb->root && fb->root->method == server_method)
+           SHUTDOWN_SERVER (fb->fd);
+       else
+# endif
+# ifndef NO_SOCKET_TO_FD
+       /* shutdown() sockets */
+       if (statted && S_ISSOCK (s.st_mode))
+           shutdown (fb->fd, 1);
+# else
+       {
+       /* I'm not sure I like this empty block, but the alternative
+        * is another nested NO_SOCKET_TO_FD switch as above.
+        */
+       }
+# endif /* NO_SOCKET_TO_FD */
+
+       buf->output = NULL;
+    }
+
+    if (statted && closefd && close (fb->fd) == -1)
+    {
+       if (server_active)
+       {
+            /* Syslog this? */
+       }
+# ifdef CLIENT_SUPPORT
+       /* We are already closing the connection.
+        * On error, print a warning and try to
+        * continue to avoid infinte loops.
+        */
+       else if (fb->root)
+            error (0, errno, "closing down connection to %s",
+                   fb->root->hostname);
+# endif /* CLIENT_SUPPORT */
+       else
+           error (0, errno, "closing down buffer");
+    }
+
+    /* If we were talking to a process, make sure it exited */
+    if (fb->child_pid)
+    {
+       int w;
+
+       do
+           w = waitpid (fb->child_pid, NULL, 0);
+       while (w == -1 && errno == EINTR);
+
+       /* We are already closing the connection.
+        * On error, print a warning and try to
+        * continue to avoid infinte loops.
+        */
+       if (w == -1)
+           error (0, errno, "waiting for process %d", fb->child_pid);
+    }
+
+    free (buf->closure);
+    buf->closure = NULL;
+
+    return 0;
+}
+#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */
Index: ccvs/src/buffer.h
diff -u /dev/null ccvs/src/buffer.h:1.26.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/buffer.h   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 1996-2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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.
+ */
+
+/* Declarations concerning the buffer data structure.  */
+
+#ifndef BUFFER_H
+#define BUFFER_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include "root.h"
+
+#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
+
+# include "getpagesize.h"
+
+/*
+ * We must read data from a child process and send it across the
+ * network.  We do not want to block on writing to the network, so we
+ * store the data from the child process in memory.  A BUFFER
+ * structure holds the status of one communication, and uses a linked
+ * list of buffer_data structures to hold data.
+ */
+
+struct buffer;
+
+typedef int (*type_buf_input) (void *, char *, size_t, size_t, size_t *);
+typedef int (*type_buf_output) (void *, const char *, size_t, size_t *);
+typedef int (*type_buf_flush) (void *);
+typedef int (*type_buf_block) (void *, bool);
+typedef int (*type_buf_get_fd) (void *);
+typedef int (*type_buf_shutdown) (struct buffer *);
+typedef void (*type_buf_memory_error) (struct buffer *);
+
+struct buffer
+{
+    /* Data.  */
+    struct buffer_data *data;
+
+    /* Last buffer on data chain.  */
+    struct buffer_data *last;
+
+    /* Nonzero if the buffer is in nonblocking mode.  */
+    bool nonblocking;
+
+    /* Functions must be provided to transfer data in and out of the
+       buffer.  Either the input or output field must be set, but not
+       both.  */
+
+    /* Read data into the buffer DATA.  There is room for up to SIZE
+       bytes.  In blocking mode, wait until some input, at least NEED
+       bytes, is available (NEED may be 0 but that is the same as NEED
+       == 1).  In non-blocking mode return immediately no matter how
+       much input is available; NEED is ignored. Return 0 on success,
+       or -1 on end of file, or an errno code.  Set the number of
+       bytes read in *GOT.
+       
+       If there are a nonzero number of bytes available, less than NEED,
+       followed by end of file, just read those bytes and return 0.  */
+    type_buf_input input;
+
+    /* Write data.  This should write up to HAVE bytes from DATA.
+       This should return 0 on success, or an errno code.  It should
+       set the number of bytes written in *WROTE.  */
+    type_buf_output output;
+
+    /* Flush any data which may be buffered up after previous calls to
+       OUTPUT.  This should return 0 on success, or an errno code.  */
+    type_buf_flush flush;
+
+    /* Change the blocking mode of the underlying communication
+       stream.  If BLOCK is non-zero, it should be placed into
+       blocking mode.  Otherwise, it should be placed into
+       non-blocking mode.  This should return 0 on success, or an
+       errno code.  */
+    type_buf_block block;
+
+    /* Return the file descriptor underlying this buffer, if any, or -1
+     * otherwise.
+     */
+    type_buf_get_fd get_fd;
+
+    /* Shut down the communication stream.  This does not mean that it
+       should be closed.  It merely means that no more data will be
+       read or written, and that any final processing that is
+       appropriate should be done at this point.  This may be NULL.
+       It should return 0 on success, or an errno code.  This entry
+       point exists for the compression code.  */
+    type_buf_shutdown shutdown;
+
+    /* This field is passed to the INPUT, OUTPUT, and BLOCK functions.  */
+    void *closure;
+
+    /* Function to call if we can't allocate memory.  */
+    type_buf_memory_error memory_error;
+};
+
+/* Data is stored in lists of these structures.  */
+
+struct buffer_data
+{
+    /* Next buffer in linked list.  */
+    struct buffer_data *next;
+
+    /*
+     * A pointer into the data area pointed to by the text field.  This
+     * is where to find data that has not yet been written out.
+     */
+    char *bufp;
+
+    /* The number of data bytes found at BUFP.  */
+    size_t size;
+
+    /*
+     * Actual buffer.  This never changes after the structure is
+     * allocated.  The buffer is BUFFER_DATA_SIZE bytes.
+     */
+    char *text;
+};
+
+/* The size we allocate for each buffer_data structure.  */
+#define BUFFER_DATA_SIZE getpagesize ()
+
+/* The type of a function passed as a memory error handler.  */
+typedef void (*BUFMEMERRPROC) (struct buffer *);
+
+struct buffer *buf_initialize (type_buf_input,
+                               type_buf_output,
+                               type_buf_flush,
+                               type_buf_block,
+                               type_buf_get_fd,
+                               type_buf_shutdown,
+                               type_buf_memory_error,
+                               void *);
+void buf_free (struct buffer *);
+struct buffer *buf_nonio_initialize (void (*) (struct buffer *));
+struct buffer *compress_buffer_initialize (struct buffer *, int, int,
+                                          void (*) (struct buffer *));
+struct buffer *packetizing_buffer_initialize
+       (struct buffer *, int (*) (void *, const char *, char *, size_t),
+        int (*) (void *, const char *, char *, size_t, size_t *), void *,
+        void (*) (struct buffer *));
+int buf_empty (struct buffer *);
+int buf_empty_p (struct buffer *);
+void buf_output (struct buffer *, const char *, size_t);
+void buf_output0 (struct buffer *, const char *);
+void buf_append_char (struct buffer *, int);
+int buf_send_output (struct buffer *);
+int buf_flush (struct buffer *, bool);
+int set_nonblock (struct buffer *);
+int set_block (struct buffer *);
+int buf_send_counted (struct buffer *);
+int buf_send_special_count (struct buffer *, int);
+void buf_append_data (struct buffer *, struct buffer_data *,
+                     struct buffer_data *);
+void buf_append_buffer (struct buffer *, struct buffer *);
+int buf_read_file (FILE *, long, struct buffer_data **, struct buffer_data **);
+int buf_read_file_to_eof (FILE *, struct buffer_data **,
+                         struct buffer_data **);
+int buf_input_data (struct buffer *, size_t *);
+int buf_read_line (struct buffer *, char **, size_t *);
+int buf_read_short_line (struct buffer *buf, char **line, size_t *lenp,
+                         size_t max);
+int buf_read_data (struct buffer *, size_t, char **, size_t *);
+void buf_copy_lines (struct buffer *, struct buffer *, int);
+int buf_copy_counted (struct buffer *, struct buffer *, int *);
+int buf_chain_length (struct buffer_data *);
+int buf_length (struct buffer *);
+int buf_get_fd (struct buffer *);
+int buf_shutdown (struct buffer *);
+#ifdef PROXY_SUPPORT
+void buf_copy_data (struct buffer *buf, struct buffer_data *data,
+                    struct buffer_data *last);
+#endif /* PROXY_SUPPORT */
+void buf_free_data (struct buffer *);
+
+#ifdef SERVER_FLOWCONTROL
+int buf_count_mem (struct buffer *);
+#endif /* SERVER_FLOWCONTROL */
+
+struct buffer *
+fd_buffer_initialize (int fd, pid_t child_pid, cvsroot_t *root, bool input,
+                      void (*memory) (struct buffer *));
+
+/* EWOULDBLOCK is not defined by POSIX, but some BSD systems will
+   return it, rather than EAGAIN, for nonblocking writes.  */
+# ifdef EWOULDBLOCK
+#   define blocking_error(err) ((err) == EWOULDBLOCK || (err) == EAGAIN)
+# else
+#   define blocking_error(err) ((err) == EAGAIN)
+# endif
+#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */
+
+#endif /* BUFFER_H */
Index: ccvs/src/checkin.c
diff -u /dev/null ccvs/src/checkin.c:1.56.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/checkin.c  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Check In
+ * 
+ * Does a very careful checkin of the file "user", and tries not to spoil its
+ * modification time (to avoid needless recompilations). When RCS ID keywords
+ * get expanded on checkout, however, the modification time is updated and
+ * there is no good way to get around this.
+ * 
+ * Returns non-zero on error.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* CVS */
+#include "base.h"
+
+#include "cvs.h"
+#include "fileattr.h"
+#include "edit.h"
+
+int
+Checkin (int type, struct file_info *finfo, char *rev, char *tag,
+        char *options, char *message)
+{
+    Vers_TS *vers, *pvers;
+    int set_time;
+    char *tocvsPath = NULL;
+
+    tocvsPath = wrap_tocvs_process_file (finfo->file);
+    if (!noexec)
+    {
+        if (tocvsPath)
+       {
+           if (unlink_file_dir (finfo->file) < 0)
+               if (! existence_error (errno))
+                   error (1, errno, "cannot remove %s", finfo->fullname);
+           rename_file (tocvsPath, finfo->file);
+       }
+    }
+
+    /* There use to be a check for finfo->rcs == NULL here and then a
+     * call to RCS_parse when necessary, but Checkin() isn't called
+     * if the RCS file hasn't already been parsed in one of the
+     * check functions.
+     */
+    assert (finfo->rcs != NULL);
+
+    pvers = Version_TS (finfo, NULL, tag, NULL, 1, 0);
+    switch (RCS_checkin (finfo->rcs, finfo->update_dir, finfo->file, message,
+                        rev, 0, RCS_FLAGS_KEEPFILE))
+    {
+       case 0:                 /* everything normal */
+
+           /* The checkin succeeded.  If checking the file out again
+               would not cause any changes, we are done.  Otherwise,
+               we need to check out the file, which will change the
+               modification time of the file.
+
+              The only way checking out the file could cause any
+              changes is if the file contains RCS keywords.  So we if
+              we are not expanding RCS keywords, we are done.  */
+
+           if (strcmp (options, "-V4") == 0) /* upgrade to V5 now */
+               options[0] = '\0';
+
+           /* FIXME: If PreservePermissions is on, RCS_cmp_file is
+               going to call RCS_checkout into a temporary file
+               anyhow.  In that case, it would be more efficient to
+               call RCS_checkout here, compare the resulting files
+               using xcmp, and rename if necessary.  I think this
+               should be fixed in RCS_cmp_file.  */
+           if ((1
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+                !config->preserve_perms
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+                && options
+                && (!strcmp (options, "-ko") || !strcmp (options, "-kb")))
+               || !RCS_cmp_file (finfo->rcs, rev, NULL, NULL,
+                                 options, finfo->file))
+               /* The existing file is correct.  We don't have to do
+                   anything.  */
+               set_time = 0;
+           else
+               set_time = 1;
+
+           vers = Version_TS (finfo, NULL, tag, NULL, 1, set_time);
+
+           if (set_time)
+           {
+               /* The existing file is incorrect.  We need to check
+                   out the correct file contents.  */
+               if (base_checkout (finfo->rcs, finfo, pvers->vn_user,
+                                  vers->vn_rcs, pvers->entdata->tag,
+                                  vers->tag, pvers->entdata->options,
+                                  options))
+                   error (1, 0, "failed when checking out new copy of %s",
+                          finfo->fullname);
+               base_copy (finfo, vers->vn_rcs,
+                          cvswrite && !fileattr_get (finfo->file, "_watched")
+                          ? "yy" : "yn");
+               set_time = 1;
+           }
+           else if (!suppress_bases)
+           {
+               /* Still need to update the base file.  */
+               char *basefile;
+               mkdir_if_needed (CVSADM_BASE);
+               basefile = make_base_file_name (finfo->file, vers->vn_rcs);
+               copy_file (finfo->file, basefile);
+               free (basefile);
+           }
+           /* Remove the previous base file, in local mode.  */
+           base_remove (finfo->file, pvers->vn_user);
+
+           wrap_fromcvs_process_file (finfo->file);
+
+           /*
+            * If we want read-only files, muck the permissions here, before
+            * getting the file time-stamp.
+            */
+           if (!cvswrite || fileattr_get (finfo->file, "_watched"))
+               xchmod (finfo->file, 0);
+
+           /* Re-register with the new data.  */
+           if (strcmp (vers->options, "-V4") == 0)
+               vers->options[0] = '\0';
+           Register (finfo->entries, finfo->file, vers->vn_rcs, vers->ts_user,
+                     vers->options, vers->tag, vers->date, NULL);
+           history_write (type, NULL, vers->vn_rcs,
+                          finfo->file, finfo->repository);
+
+           if (tocvsPath)
+               if (unlink_file_dir (tocvsPath) < 0)
+                   error (0, errno, "cannot remove %s", tocvsPath);
+
+           break;
+
+       case -1:                        /* fork failed */
+           if (tocvsPath)
+               if (unlink_file_dir (tocvsPath) < 0)
+                   error (0, errno, "cannot remove %s", tocvsPath);
+
+           if (!noexec)
+               error (1, errno, "could not check in %s -- fork failed",
+                      finfo->fullname);
+           return (1);
+
+       default:                        /* ci failed */
+
+           /* The checkin failed, for some unknown reason, so we
+              print an error, and return an error.  We assume that
+              the original file has not been touched.  */
+           if (tocvsPath)
+               if (unlink_file_dir (tocvsPath) < 0)
+                   error (0, errno, "cannot remove %s", tocvsPath);
+
+           if (!noexec)
+               error (0, 0, "could not check in %s", finfo->fullname);
+           return (1);
+    }
+
+    /*
+     * When checking in a specific revision, we may have locked the wrong
+     * branch, so to be sure, we do an extra unlock here before
+     * returning.
+     */
+    if (rev)
+    {
+       (void) RCS_unlock (finfo->rcs, NULL, 1);
+       RCS_rewrite (finfo->rcs, NULL, NULL);
+    }
+
+#ifdef SERVER_SUPPORT
+    if (server_active)
+    {
+       if (set_time)
+           /* Need to update the checked out file on the client side.  */
+           server_updated (finfo, vers, SERVER_UPDATED,
+                           (mode_t) -1, NULL, NULL);
+       else
+           server_checked_in (finfo->file, finfo->update_dir,
+                              finfo->repository);
+    }
+    else
+#endif
+       mark_up_to_date (finfo->update_dir, finfo->file);
+
+    freevers_ts (&vers);
+    return 0;
+}
Index: ccvs/src/classify.c
diff -u /dev/null ccvs/src/classify.c:1.37.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/classify.c Wed Dec 21 13:25:10 2005
@@ -0,0 +1,441 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ */
+
+#include "cvs.h"
+
+static void sticky_ck (struct file_info *finfo, int aflag,
+                             Vers_TS * vers);
+
+/*
+ * Classify the state of a file.
+ *
+ * INPUTS
+ *   finfo             Information about the file to be classified.
+ *   tag
+ *   date
+ *   options           Keyword expansion options.  Can be either NULL or "" to
+ *                     indicate none are specified here.
+ *   force_tag_match
+ *   aflag
+ *   versp
+ *   pipeout           Did the user pass the "pipeout" flag to request that
+ *                     all output go to STDOUT rather than to a file or files?
+ *
+ * RETURNS
+ *   A Ctype (defined as an enum) describing the state of the file relative to
+ *   the repository.  See the definition of Ctype for more.
+ */
+Ctype
+Classify_File (struct file_info *finfo, char *tag, char *date, char *options,
+               int force_tag_match, int aflag, Vers_TS **versp, int pipeout)
+{
+    Vers_TS *vers;
+    Ctype ret;
+
+    TRACE (TRACE_FUNCTION, "classify_file (%s, %s, %s, %s)",
+          finfo->fullname, tag ? tag : "(null)", date ? date : "(null)",
+          options ? options : "(null)");
+
+    /* get all kinds of good data about the file */
+    vers = Version_TS (finfo, options, tag, date,
+                      force_tag_match, 0);
+
+    if (vers->vn_user == NULL)
+    {
+       /* No entry available, ts_rcs is invalid */
+       if (vers->vn_rcs == NULL)
+       {
+           /* there is no RCS file either */
+           if (vers->ts_user == NULL)
+           {
+               /* there is no user file */
+               /* FIXME: Why do we skip this message if vers->tag or
+                  vers->date is set?  It causes "cvs update -r tag98 foo"
+                  to silently do nothing, which is seriously confusing
+                  behavior.  "cvs update foo" gives this message, which
+                  is what I would expect.  */
+               if (!force_tag_match || !(vers->tag || vers->date))
+                   if (!really_quiet)
+                       error (0, 0, "nothing known about `%s'",
+                              finfo->fullname);
+               ret = T_UNKNOWN;
+           }
+           else
+           {
+               /* there is a user file */
+               /* FIXME: Why do we skip this message if vers->tag or
+                  vers->date is set?  It causes "cvs update -r tag98 foo"
+                  to silently do nothing, which is seriously confusing
+                  behavior.  "cvs update foo" gives this message, which
+                  is what I would expect.  */
+               if (!force_tag_match || !(vers->tag || vers->date))
+                   if (!really_quiet)
+                       error (0, 0, "use `%s add' to create an entry for `%s'",
+                              program_name, finfo->fullname);
+               ret = T_UNKNOWN;
+           }
+       }
+       else if (RCS_isdead (vers->srcfile, vers->vn_rcs))
+       {
+           /* there is an RCS file, but it's dead */
+           if (vers->ts_user == NULL)
+               ret = T_UPTODATE;
+           else
+           {
+               error (0, 0, "use `%s add' to create an entry for `%s'",
+                      program_name, finfo->fullname);
+               ret = T_UNKNOWN;
+           }
+       }
+       else if (!pipeout && vers->ts_user && No_Difference (finfo, vers))
+       {
+           /* the files were different so it is a conflict */
+           if (!really_quiet)
+               error (0, 0, "move away `%s'; it is in the way",
+                      finfo->fullname);
+           ret = T_CONFLICT;
+       }
+       else
+           /* no user file or no difference, just checkout */
+           ret = T_CHECKOUT;
+    }
+    else if (strcmp (vers->vn_user, "0") == 0)
+    {
+       /* An entry for a new-born file; ts_rcs is dummy */
+
+       if (vers->ts_user == NULL)
+       {
+           if (pipeout)
+           {
+               ret = T_CHECKOUT;
+           }
+           else
+           {
+               /*
+                * There is no user file, but there should be one; remove the
+                * entry
+                */
+               if (!really_quiet)
+                   error (0, 0, "warning: new-born `%s' has disappeared",
+                          finfo->fullname);
+               ret = T_REMOVE_ENTRY;
+           }
+       }
+       else if (vers->vn_rcs == NULL ||
+                RCS_isdead (vers->srcfile, vers->vn_rcs))
+           /* No RCS file or RCS file revision is dead  */
+           ret = T_ADDED;
+       else
+       {
+           if (pipeout)
+           {
+               ret = T_CHECKOUT;
+           }
+           else
+           {
+               if (vers->srcfile->flags & INATTIC
+                   && vers->srcfile->flags & VALID)
+               {
+                   /* This file has been added on some branch other than
+                      the one we are looking at.  In the branch we are
+                      looking at, the file was already valid.  */
+                   if (!really_quiet)
+                       error (0, 0,
+                          "conflict: `%s' has been added, but already exists",
+                              finfo->fullname);
+               }
+               else
+               {
+                   /*
+                    * There is an RCS file, so someone else must have checked
+                    * one in behind our back; conflict
+                    */
+                   if (!really_quiet)
+                       error (0, 0,
+                               "conflict: `%s' created independently by"
+                              " second party",
+                              finfo->fullname);
+               }
+               ret = T_CONFLICT;
+           }
+       }
+    }
+    else if (vers->vn_user[0] == '-')
+    {
+       /* An entry for a removed file, ts_rcs is invalid */
+
+       if (vers->ts_user == NULL)
+       {
+           /* There is no user file (as it should be) */
+
+           if (vers->vn_rcs == NULL
+               || RCS_isdead (vers->srcfile, vers->vn_rcs))
+           {
+
+               /*
+                * There is no RCS file; this is all-right, but it has been
+                * removed independently by a second party; remove the entry
+                */
+               ret = T_REMOVE_ENTRY;
+           }
+           else if (strcmp (vers->vn_rcs, vers->vn_user + 1) == 0)
+               /*
+                * The RCS file is the same version as the user file was, and
+                * that's OK; remove it
+                */
+               ret = T_REMOVED;
+           else if (pipeout)
+               /*
+                * The RCS file doesn't match the user's file, but it doesn't
+                * matter in this case
+                */
+               ret = T_NEEDS_MERGE;
+           else
+           {
+
+               /*
+                * The RCS file is a newer version than the removed user file
+                * and this is definitely not OK; make it a conflict.
+                */
+               if (!really_quiet)
+                   error (0, 0,
+                          "conflict: removed `%s' was modified by"
+                          " second party",
+                          finfo->fullname);
+               ret = T_CONFLICT;
+           }
+       }
+       else
+       {
+           /* The user file shouldn't be there */
+           if (!really_quiet)
+               error (0, 0, "`%s' should be removed and is still there",
+                      finfo->fullname);
+           ret = T_REMOVED;
+       }
+    }
+    else
+    {
+       /* A normal entry, TS_Rcs is valid */
+       if (vers->vn_rcs == NULL || RCS_isdead (vers->srcfile, vers->vn_rcs))
+       {
+           /* There is no RCS file */
+
+           if (vers->ts_user == NULL)
+           {
+               /* There is no user file, so just remove the entry */
+               if (!really_quiet)
+                   error (0, 0, "warning: `%s' is not (any longer) pertinent",
+                          finfo->fullname);
+               ret = T_REMOVE_ENTRY;
+           }
+           else if (strcmp (vers->ts_user, vers->ts_rcs)
+                    && No_Difference (finfo, vers))
+           {
+               /* they are different -> conflict */
+               if (!really_quiet)
+                   error (0, 0,
+                           "conflict: `%s' is modified but no longer in the"
+                          " repository",
+                          finfo->fullname);
+               ret = T_CONFLICT;
+           }
+           else
+           {
+
+               /*
+                * The user file is still unmodified, so just remove it from
+                * the entry list
+                */
+               if (!really_quiet)
+                   error (0, 0, "`%s' is no longer in the repository",
+                          finfo->fullname);
+               ret = T_REMOVE_ENTRY;
+           }
+       }
+       else if (strcmp (vers->vn_rcs, vers->vn_user) == 0)
+       {
+           /* The RCS file is the same version as the user file */
+
+           if (vers->ts_user == NULL)
+           {
+
+               /*
+                * There is no user file, so note that it was lost and
+                * extract a new version
+                */
+               /* Comparing the cvs_cmd_name against "update", in
+                  addition to being an ugly way to operate, means
+                  that this message does not get printed by the
+                  server.  That might be considered just a straight
+                  bug, although there is one subtlety: that case also
+                  gets hit when a patch fails and the client fetches
+                  a file.  I'm not sure there is currently any way
+                  for the server to distinguish those two cases.  */
+               if (strcmp (cvs_cmd_name, "update") == 0)
+                   if (!really_quiet)
+                       error (0, 0, "warning: `%s' was lost", finfo->fullname);
+               ret = T_CHECKOUT;
+           }
+           else if (!strcmp (vers->ts_user,
+                             vers->ts_conflict
+                             ? vers->ts_conflict : vers->ts_rcs))
+           {
+
+               /*
+                * The user file is still unmodified, so nothing special at
+                * all to do -- no lists updated, unless the sticky -k option
+                * has changed.  If the sticky tag has changed, we just need
+                * to re-register the entry
+                */
+               /* TODO: decide whether we need to check file permissions
+                  for a mismatch, and return T_CONFLICT if so. */
+               if (vers->entdata->options &&
+                   strcmp (vers->entdata->options, vers->options) != 0)
+                   ret = T_CHECKOUT;
+               else if (vers->ts_conflict)
+                   ret = T_CONFLICT;
+               else
+               {
+                   sticky_ck (finfo, aflag, vers);
+                   ret = T_UPTODATE;
+               }
+           }
+           else if (No_Difference (finfo, vers))
+           {
+
+               /*
+                * they really are different; modified if we aren't
+                * changing any sticky -k options, else needs merge
+                */
+#ifdef XXX_FIXME_WHEN_RCSMERGE_IS_FIXED
+               if (strcmp (vers->entdata->options ?
+                      vers->entdata->options : "", vers->options) == 0)
+                   ret = T_MODIFIED;
+               else
+                   ret = T_NEEDS_MERGE;
+#else
+               /* Files with conflict markers and new timestamps fall through
+                * here, but they need to.  T_CONFLICT is an error in
+                * commit_fileproc, whereas T_MODIFIED with conflict markers
+                * is caught but only warned about.  Similarly, update_fileproc
+                * currently reregisters a file that was conflicted but lost
+                * its markers.
+                */
+               ret = T_MODIFIED;
+               sticky_ck (finfo, aflag, vers);
+#endif
+           }
+           else if (strcmp (vers->entdata->options ?
+                      vers->entdata->options : "", vers->options) != 0)
+           {
+               /* file has not changed; check out if -k changed */
+               ret = T_CHECKOUT;
+           }
+           else
+           {
+
+               /*
+                * else -> note that No_Difference will Register the
+                * file already for us, using the new tag/date. This
+                * is the desired behaviour
+                */
+               ret = T_UPTODATE;
+           }
+       }
+       else
+       {
+           /* The RCS file is a newer version than the user file */
+
+           if (vers->ts_user == NULL)
+           {
+               /* There is no user file, so just get it */
+
+               /* See comment at other "update" compare, for more
+                  thoughts on this comparison.  */
+               if (strcmp (cvs_cmd_name, "update") == 0)
+                   if (!really_quiet)
+                       error (0, 0, "warning: `%s' was lost", finfo->fullname);
+               ret = T_CHECKOUT;
+           }
+           else if (strcmp (vers->ts_user, vers->ts_rcs) == 0)
+           {
+
+               /*
+                * The user file is still unmodified, so just get it as well
+                */
+               if (strcmp (vers->entdata->options ?
+                           vers->entdata->options : "", vers->options) != 0
+                   || (vers->srcfile != NULL
+                       && (vers->srcfile->flags & INATTIC) != 0))
+                   ret = T_CHECKOUT;
+               else
+                   ret = T_PATCH;
+           }
+           else if (No_Difference (finfo, vers))
+               /* really modified, needs to merge */
+               ret = T_NEEDS_MERGE;
+           else if ((strcmp (vers->entdata->options ?
+                             vers->entdata->options : "", vers->options)
+                     != 0)
+                    || (vers->srcfile != NULL
+                        && (vers->srcfile->flags & INATTIC) != 0))
+               /* not really modified, check it out */
+               ret = T_CHECKOUT;
+           else
+               ret = T_PATCH;
+       }
+    }
+
+    /* free up the vers struct, or just return it */
+    if (versp != NULL)
+       *versp = vers;
+    else
+       freevers_ts (&vers);
+
+    /* return the status of the file */
+    return (ret);
+}
+
+static void
+sticky_ck (struct file_info *finfo, int aflag, Vers_TS *vers)
+{
+    if (aflag || vers->tag || vers->date)
+    {
+       char *enttag = vers->entdata->tag;
+       char *entdate = vers->entdata->date;
+
+       if ((enttag && vers->tag && strcmp (enttag, vers->tag)) ||
+           ((enttag && !vers->tag) || (!enttag && vers->tag)) ||
+           (entdate && vers->date && strcmp (entdate, vers->date)) ||
+           ((entdate && !vers->date) || (!entdate && vers->date)))
+       {
+           Register (finfo->entries, finfo->file, vers->vn_user, vers->ts_rcs,
+                     vers->options, vers->tag, vers->date, vers->ts_conflict);
+
+#ifdef SERVER_SUPPORT
+           if (server_active)
+           {
+               /* We need to update the entries line on the client side.
+                  It is possible we will later update it again via
+                  server_updated or some such, but that is OK.  */
+               server_update_entries
+                 (finfo->file, finfo->update_dir, finfo->repository,
+                  strcmp (vers->ts_rcs, vers->ts_user) == 0 ?
+                  SERVER_UPDATED : SERVER_MERGED);
+           }
+#endif
+       }
+    }
+}
Index: ccvs/src/client.c
diff -u /dev/null ccvs/src/client.c:1.438.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/client.c   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,5881 @@
+/* CVS client-related stuff.
+
+   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
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
+/* GNULIB */
+#include "base64.h"
+#include "getline.h"
+#include "save-cwd.h"
+
+/* CVS */
+#include "base.h"
+#include "difflib.h"
+
+#include "cvs.h"
+#include "buffer.h"
+#include "edit.h"
+
+#ifdef CLIENT_SUPPORT
+
+# include "log-buffer.h"
+# include "md5.h"
+# include "sign.h"
+
+#include "socket-client.h"
+#include "rsh-client.h"
+
+# ifdef HAVE_GSSAPI
+#   include "gssapi-client.h"
+# endif
+
+# ifdef HAVE_KERBEROS
+#   include "kerberos4-client.h"
+# endif
+
+
+
+/* Whether the last Base-merge command from the server resulted in a conflict
+ * or not.
+ */
+static bool last_merge;
+static bool last_merge_conflict;
+static bool last_merge_no_change;
+static bool last_merge_made_base;
+static char *base_merge_rev1;
+static char *base_merge_rev2;
+static char *temp_checkout1;
+static char *temp_checkout2;
+
+/* Similarly, to ignore bad entries on error.  */
+static bool base_copy_error;
+
+
+
+/* Keep track of any paths we are sending for Max-dotdot so that we can verify
+ * that uplevel paths coming back form the server are valid.
+ *
+ * FIXME: The correct way to do this is probably provide some sort of virtual
+ * path map on the client side.  This would be generic enough to be applied to
+ * absolute paths supplied by the user too.
+ */
+static List *uppaths;
+
+
+
+static void add_prune_candidate (const char *);
+
+/* All the commands.  */
+int add (int argc, char **argv);
+int admin (int argc, char **argv);
+int checkout (int argc, char **argv);
+int commit (int argc, char **argv);
+int diff (int argc, char **argv);
+int history (int argc, char **argv);
+int import (int argc, char **argv);
+int cvslog (int argc, char **argv);
+int patch (int argc, char **argv);
+int release (int argc, char **argv);
+int cvsremove (int argc, char **argv);
+int rtag (int argc, char **argv);
+int status (int argc, char **argv);
+int tag (int argc, char **argv);
+int update (int argc, char **argv);
+
+static size_t try_read_from_server (char *, size_t);
+
+static void auth_server (cvsroot_t *, struct buffer *, struct buffer *,
+                        int, int, struct hostent *);
+
+
+
+/* This is the referrer who referred us to a primary, or write server, using
+ * the "Redirect" request.
+ */
+static cvsroot_t *client_referrer;
+
+/* We need to keep track of the list of directories we've sent to the
+   server.  This list, along with the current CVSROOT, will help us
+   decide which command-line arguments to send.  */
+List *dirs_sent_to_server;
+static int
+is_arg_a_parent_or_listed_dir (Node *n, void *d)
+{
+    char *directory = n->key;  /* name of the dir sent to server */
+    char *this_argv_elem = d;  /* this argv element */
+
+    /* Say we should send this argument if the argument matches the
+       beginning of a directory name sent to the server.  This way,
+       the server will know to start at the top of that directory
+       hierarchy and descend. */
+
+    if (!strncmp (directory, this_argv_elem, strlen (this_argv_elem)))
+       return 1;
+
+    return 0;
+}
+
+
+
+/* Return nonzero if this argument should not be sent to the
+   server. */
+static int
+arg_should_not_be_sent_to_server (char *arg)
+{
+    /* Decide if we should send this directory name to the server.  We
+       should always send argv[i] if:
+
+       1) the list of directories sent to the server is empty (as it
+       will be for checkout, etc.).
+
+       2) the argument is "."
+
+       3) the argument is a file in the cwd and the cwd is checked out
+       from the current root
+
+       4) the argument lies within one of the paths in
+       dirs_sent_to_server.
+
+       */
+
+    if (list_isempty (dirs_sent_to_server))
+       return 0;               /* always send it */
+
+    if (!strcmp (arg, "."))
+       return 0;               /* always send it */
+
+    /* We should send arg if it is one of the directories sent to the
+       server or the parent of one; this tells the server to descend
+       the hierarchy starting at this level. */
+    if (isdir (arg))
+    {
+       if (walklist (dirs_sent_to_server, is_arg_a_parent_or_listed_dir, arg))
+           return 0;
+
+       /* If arg wasn't a parent, we don't know anything about it (we
+          would have seen something related to it during the
+          send_files phase).  Don't send it.  */
+       return 1;
+    }
+
+    /* Try to decide whether we should send arg to the server by
+       checking the contents of the corresponding CVSADM directory. */
+    {
+       char *t, *root_string;
+       cvsroot_t *this_root = NULL;
+
+       /* Calculate "dirname arg" */
+       for (t = arg + strlen (arg) - 1; t >= arg; t--)
+       {
+           if (ISSLASH (*t))
+               break;
+       }
+
+       /* Now we're either poiting to the beginning of the
+          string, or we found a path separator. */
+       if (t >= arg)
+       {
+           /* Found a path separator.  */
+           char c = *t;
+           *t = '\0';
+           
+           /* First, check to see if we sent this directory to the
+               server, because it takes less time than actually
+               opening the stuff in the CVSADM directory.  */
+           if (walklist (dirs_sent_to_server, is_arg_a_parent_or_listed_dir,
+                         arg))
+           {
+               *t = c;         /* make sure to un-truncate the arg */
+               return 0;
+           }
+
+           /* Since we didn't find it in the list, check the CVSADM
+               files on disk.  */
+           this_root = Name_Root (arg, NULL);
+           root_string = this_root->original;
+           *t = c;
+       }
+       else
+       {
+           /* We're at the beginning of the string.  Look at the
+               CVSADM files in cwd.  */
+           if (CVSroot_cmdline)
+               root_string = CVSroot_cmdline;
+           else
+           {
+               this_root = Name_Root (NULL, NULL);
+               root_string = this_root->original;
+           }
+       }
+
+       /* Now check the value for root. */
+       if (root_string && current_parsed_root
+           && strcmp (root_string, original_parsed_root->original))
+       {
+           /* Don't send this, since the CVSROOTs don't match. */
+           return 1;
+       }
+    }
+    
+    /* OK, let's send it. */
+    return 0;
+}
+#endif /* CLIENT_SUPPORT */
+
+
+
+#if defined(CLIENT_SUPPORT) || defined(SERVER_SUPPORT)
+
+/* Shared with server.  */
+
+/*
+ * Return a malloc'd, '\0'-terminated string
+ * corresponding to the mode in SB.
+ */
+char *
+mode_to_string (mode_t mode)
+{
+    char u[4], g[4], o[4];
+    int i;
+
+    i = 0;
+    if (mode & S_IRUSR) u[i++] = 'r';
+    if (mode & S_IWUSR) u[i++] = 'w';
+    if (mode & S_IXUSR) u[i++] = 'x';
+    u[i] = '\0';
+
+    i = 0;
+    if (mode & S_IRGRP) g[i++] = 'r';
+    if (mode & S_IWGRP) g[i++] = 'w';
+    if (mode & S_IXGRP) g[i++] = 'x';
+    g[i] = '\0';
+
+    i = 0;
+    if (mode & S_IROTH) o[i++] = 'r';
+    if (mode & S_IWOTH) o[i++] = 'w';
+    if (mode & S_IXOTH) o[i++] = 'x';
+    o[i] = '\0';
+
+    return Xasprintf ("u=%s,g=%s,o=%s", u, g, o);
+}
+
+
+
+/*
+ * Change mode of FILENAME to MODE_STRING.
+ * Returns 0 for success or errno code.
+ * If RESPECT_UMASK is set, then honor the umask.
+ */
+int
+change_mode (const char *filename, const char *mode_string, int respect_umask)
+{
+#ifdef CHMOD_BROKEN
+    char *p;
+    int writeable = 0;
+
+    /* We can only distinguish between
+         1) readable
+         2) writeable
+         3) Picasso's "Blue Period"
+       We handle the first two. */
+    p = mode_string;
+    while (*p != '\0')
+    {
+       if ((p[0] == 'u' || p[0] == 'g' || p[0] == 'o') && p[1] == '=')
+       {
+           char *q = p + 2;
+           while (*q != ',' && *q != '\0')
+           {
+               if (*q == 'w')
+                   writeable = 1;
+               ++q;
+           }
+       }
+       /* Skip to the next field.  */
+       while (*p != ',' && *p != '\0')
+           ++p;
+       if (*p == ',')
+           ++p;
+    }
+
+    /* xchmod honors the umask for us.  In the !respect_umask case, we
+       don't try to cope with it (probably to handle that well, the server
+       needs to deal with modes in data structures, rather than via the
+       modes in temporary files).  */
+    xchmod (filename, writeable);
+       return 0;
+
+#else /* ! CHMOD_BROKEN */
+
+    const char *p;
+    mode_t mode = 0;
+    mode_t oumask;
+
+    p = mode_string;
+    while (*p != '\0')
+    {
+       if ((p[0] == 'u' || p[0] == 'g' || p[0] == 'o') && p[1] == '=')
+       {
+           int can_read = 0, can_write = 0, can_execute = 0;
+           const char *q = p + 2;
+           while (*q != ',' && *q != '\0')
+           {
+               if (*q == 'r')
+                   can_read = 1;
+               else if (*q == 'w')
+                   can_write = 1;
+               else if (*q == 'x')
+                   can_execute = 1;
+               ++q;
+           }
+           if (p[0] == 'u')
+           {
+               if (can_read)
+                   mode |= S_IRUSR;
+               if (can_write)
+                   mode |= S_IWUSR;
+               if (can_execute)
+                   mode |= S_IXUSR;
+           }
+           else if (p[0] == 'g')
+           {
+               if (can_read)
+                   mode |= S_IRGRP;
+               if (can_write)
+                   mode |= S_IWGRP;
+               if (can_execute)
+                   mode |= S_IXGRP;
+           }
+           else if (p[0] == 'o')
+           {
+               if (can_read)
+                   mode |= S_IROTH;
+               if (can_write)
+                   mode |= S_IWOTH;
+               if (can_execute)
+                   mode |= S_IXOTH;
+           }
+       }
+       /* Skip to the next field.  */
+       while (*p != ',' && *p != '\0')
+           ++p;
+       if (*p == ',')
+           ++p;
+    }
+
+    if (respect_umask)
+    {
+       oumask = umask (0);
+       (void) umask (oumask);
+       mode &= ~oumask;
+    }
+
+    if (chmod (filename, mode) < 0)
+       return errno;
+    return 0;
+#endif /* ! CHMOD_BROKEN */
+}
+#endif /* CLIENT_SUPPORT or SERVER_SUPPORT */
+
+
+
+#ifdef CLIENT_SUPPORT
+int client_prune_dirs;
+
+static List *ignlist = NULL;
+
+/* Buffer to write to the server.  */
+static struct buffer *global_to_server;
+
+/* Buffer used to read from the server.  */
+static struct buffer *global_from_server;
+
+
+
+/*
+ * Read a line from the server.  Result does not include the terminating \n.
+ *
+ * Space for the result is malloc'd and should be freed by the caller.
+ *
+ * Returns number of bytes read.
+ */
+static size_t
+read_line_via (struct buffer *via_from_buffer, struct buffer *via_to_buffer,
+               char **resultp)
+{
+    int status;
+    char *result;
+    size_t len;
+
+    status = buf_flush (via_to_buffer, 1);
+    if (status != 0)
+       error (1, status, "writing to server");
+
+    status = buf_read_line (via_from_buffer, &result, &len);
+    if (status != 0)
+    {
+       if (status == -1)
+           error (1, 0,
+                   "end of file from server (consult above messages if any)");
+       else if (status == -2)
+           error (1, 0, "out of memory");
+       else
+           error (1, status, "reading from server");
+    }
+
+    if (resultp)
+       *resultp = result;
+    else
+       free (result);
+
+    return len;
+}
+
+
+
+static size_t
+read_line (char **resultp)
+{
+  return read_line_via (global_from_server, global_to_server, resultp);
+}
+#endif /* CLIENT_SUPPORT */
+
+
+
+#if defined(CLIENT_SUPPORT) || defined(SERVER_SUPPORT)
+/*
+ * Zero if compression isn't supported or requested; non-zero to indicate
+ * a compression level to request from gzip.
+ */
+int gzip_level;
+
+/*
+ * Level of compression to use when running gzip on a single file.
+ */
+int file_gzip_level;
+
+#endif /* CLIENT_SUPPORT or SERVER_SUPPORT */
+
+#ifdef CLIENT_SUPPORT
+
+/* Whether the server asked us to force compression.  */
+static bool force_gzip;
+
+/*
+ * The Repository for the top level of this command (not necessarily
+ * the CVSROOT, just the current directory at the time we do it).
+ */
+static char *toplevel_repos;
+
+/* Working directory when we first started.  Note: we could speed things
+   up on some systems by using savecwd.h here instead of just always
+   storing a name.  */
+char *toplevel_wd;
+
+
+
+static void
+handle_ok (char *args, size_t len)
+{
+    return;
+}
+
+
+
+static void
+handle_error (char *args, size_t len)
+{
+    int something_printed;
+    
+    /*
+     * First there is a symbolic error code followed by a space, which
+     * we ignore.
+     */
+    char *p = strchr (args, ' ');
+    if (!p)
+    {
+       error (0, 0, "invalid data from cvs server");
+       return;
+    }
+    ++p;
+
+    /* Next we print the text of the message from the server.  We
+       probably should be prefixing it with "server error" or some
+       such, because if it is something like "Out of memory", the
+       current behavior doesn't say which machine is out of
+       memory.  */
+
+    len -= p - args;
+    something_printed = 0;
+    for (; len > 0; --len)
+    {
+       something_printed = 1;
+       putc (*p++, stderr);
+    }
+    if (something_printed)
+       putc ('\n', stderr);
+}
+
+
+
+static void
+handle_valid_requests (char *args, size_t len)
+{
+    char *p = args;
+    char *q;
+    struct request *rq;
+    do
+    {
+       q = strchr (p, ' ');
+       if (q)
+           *q++ = '\0';
+       for (rq = requests; rq->name; ++rq)
+       {
+           if (!strcmp (rq->name, p))
+               break;
+       }
+       if (!rq->name)
+           /*
+            * It is a request we have never heard of (and thus never
+            * will want to use).  So don't worry about it.
+            */
+           ;
+       else
+       {
+           if (rq->flags & RQ_ENABLEME)
+           {
+               /*
+                * Server wants to know if we have this, to enable the
+                * feature.
+                */
+               send_to_server (rq->name, 0);
+                send_to_server ("\012", 0);
+           }
+           else
+               rq->flags |= RQ_SUPPORTED;
+       }
+       p = q;
+    } while (q);
+    for (rq = requests; rq->name; ++rq)
+    {
+       if ((rq->flags & RQ_SUPPORTED)
+           || (rq->flags & RQ_ENABLEME))
+           continue;
+       if (rq->flags & RQ_ESSENTIAL)
+           error (1, 0, "request `%s' not supported by server", rq->name);
+    }
+}
+
+static void
+handle_force_gzip (char *args, size_t len)
+{
+    force_gzip = true;
+}
+
+
+
+/* Has the server told us its name since the last redirect?
+ */
+static bool referred_since_last_redirect = false;
+static bool free_client_referrer = false;
+
+
+
+static void
+handle_referrer (char *args, size_t len)
+{
+    TRACE (TRACE_FUNCTION, "handle_referrer (%s)", args);
+    client_referrer = parse_cvsroot (args);
+    referred_since_last_redirect = true;
+    free_client_referrer = true;
+}
+
+
+
+/* Redirect our connection to a different server and start over.
+ *
+ * GLOBALS
+ *   current_parsed_root       The CVSROOT being accessed.
+ *   client_referrer           Used to track the server which referred us to a
+ *                             new server.  Can be supplied by the referring
+ *                             server.
+ *   free_client_referrer      Used to track whether the client_referrer needs
+ *                             to be freed before changing it.
+ *   referred_since_last_redirect      
+ *                             Tracks whether the currect server told us how
+ *                             to refer to it.
+ *
+ * OUTPUTS
+ *   current_parsed_root       Updated to point to the new CVSROOT.
+ *   referred_since_last_redirect
+ *                             Always cleared.
+ *   client_referrer           Set automatically to current_parsed_root if
+ *                             the current server did not give us a name to
+ *                             refer to it by.
+ *   free_client_referrer      Reset when necessary.
+ */
+static void
+handle_redirect (char *args, size_t len)
+{
+    static List *redirects = NULL;
+
+    TRACE (TRACE_FUNCTION, "handle_redirect (%s)", args);
+
+    if (redirects && findnode (redirects, args))
+       error (1, 0, "`Redirect' loop detected.  Server misconfiguration?");
+    else
+    {
+       if (!redirects) redirects = getlist();
+       push_string (redirects, xstrdup (args));
+    }
+
+    if (referred_since_last_redirect)
+       referred_since_last_redirect = false;
+    else
+    {
+       if (free_client_referrer) free (client_referrer);
+       client_referrer = current_parsed_root;
+       free_client_referrer = false;
+    }
+
+    current_parsed_root = parse_cvsroot (args);
+
+    /* We deliberately do not set ORIGINAL_PARSED_ROOT here.
+     * ORIGINAL_PARSED_ROOT is used by the client to determine the current root
+     * being processed for the purpose of looking it up in lists and such, even
+     * after a redirect.
+     *
+     * FIXME
+     *   CURRENT_PARSED_ROOT should not be reset by this function.  Redirects
+     *   should be "added" to it.  The REDIRECTS list should also be replaced
+     *   by this new CURRENT_PARSED_ROOT element.  This way, if, for instance,
+     *   a multi-root workspace had two secondaries pointing to the same
+     *   primary, then the client would not report a looping error.
+     *
+     *   There is also a potential memory leak above and storing new roots as
+     *   part of the original could help avoid it fairly elegantly.
+     */
+    if (!current_parsed_root)
+       error (1, 0, "Server requested redirect to invalid root: `%s'",
+              args);
+}
+
+
+
+/*
+ * This is a proc for walklist().  It inverts the error return premise of
+ * walklist.
+ *
+ * RETURNS
+ *   True       If this path is prefixed by one of the paths in walklist and
+ *              does not step above the prefix path.
+ *   False      Otherwise.
+ */
+static
+int path_list_prefixed (Node *p, void *closure)
+{
+    const char *questionable = closure;
+    const char *prefix = p->key;
+    if (strncmp (prefix, questionable, strlen (prefix))) return 0;
+    questionable += strlen (prefix);
+    while (ISSLASH (*questionable)) questionable++;
+    if (*questionable == '\0') return 1;
+    return pathname_levels (questionable);
+}
+
+
+
+/*
+ * Need to validate the client pathname.  Disallowed paths include:
+ *
+ *   1. Absolute paths.
+ *   2. Pathnames that do not reference a specifically requested update
+ *      directory.
+ *
+ * In case 2, we actually only check that the directory is under the uppermost
+ * directories mentioned on the command line.
+ *
+ * RETURNS
+ *   True       If the path is valid.
+ *   False      Otherwise.
+ */
+static
+int is_valid_client_path (const char *pathname)
+{
+    /* 1. Absolute paths. */
+    if (ISABSOLUTE (pathname)) return 0;
+    /* 2. No up-references in path.  */
+    if (pathname_levels (pathname) == 0) return 1;
+    /* 2. No Max-dotdot paths registered.  */
+    if (!uppaths) return 0;
+
+    return walklist (uppaths, path_list_prefixed, (void *)pathname);
+}
+
+
+
+/*
+ * Do all the processing for PATHNAME, where pathname consists of the
+ * repository and the filename.  The parameters we pass to FUNC are:
+ * DATA is just the DATA parameter which was passed to
+ * call_in_directory; ENT_LIST is a pointer to an entries list (which
+ * we manage the storage for); SHORT_PATHNAME is the pathname of the
+ * file relative to the (overall) directory in which the command is
+ * taking place; and FILENAME is the filename portion only of
+ * SHORT_PATHNAME.  When we call FUNC, the curent directory points to
+ * the directory portion of SHORT_PATHNAME.  */
+static void
+call_in_directory (const char *pathname,
+                   void (*func) (void *, List *, const char *, const char *),
+                   void *data)
+{
+    /* This variable holds the result of Entries_Open. */
+    List *last_entries = NULL;
+    char *dir_name;
+    char *filename;
+    /* This is what we get when we hook up the directory (working directory
+       name) from PATHNAME with the filename from REPOSNAME.  For example:
+       pathname: ccvs/src/
+       reposname: /u/src/master/ccvs/foo/ChangeLog
+       short_pathname: ccvs/src/ChangeLog
+       */
+    char *short_pathname;
+    char *p;
+
+    /*
+     * Do the whole descent in parallel for the repositories, so we
+     * know what to put in CVS/Repository files.  I'm not sure the
+     * full hair is necessary since the server does a similar
+     * computation; I suspect that we only end up creating one
+     * directory at a time anyway.
+     *
+     * Also note that we must *only* worry about this stuff when we
+     * are creating directories; `cvs co foo/bar; cd foo/bar; cvs co
+     * CVSROOT; cvs update' is legitimate, but in this case
+     * foo/bar/CVSROOT/CVS/Repository is not a subdirectory of
+     * foo/bar/CVS/Repository.
+     */
+    char *reposname;
+    char *short_repos;
+    char *reposdirname;
+    char *rdirp;
+    int reposdirname_absolute;
+    int newdir = 0;
+
+    assert (pathname);
+
+    reposname = NULL;
+    read_line (&reposname);
+    assert (reposname);
+
+    reposdirname_absolute = 0;
+    if (strncmp (reposname, toplevel_repos, strlen (toplevel_repos)))
+    {
+       reposdirname_absolute = 1;
+       short_repos = reposname;
+    }
+    else
+    {
+       short_repos = reposname + strlen (toplevel_repos) + 1;
+       if (short_repos[-1] != '/')
+       {
+           reposdirname_absolute = 1;
+           short_repos = reposname;
+       }
+    }
+
+   /* Now that we have SHORT_REPOS, we can calculate the path to the file we
+    * are being requested to operate on.
+    */
+    filename = strrchr (short_repos, '/');
+    if (!filename)
+       filename = short_repos;
+    else
+       ++filename;
+
+    short_pathname = xmalloc (strlen (pathname) + strlen (filename) + 5);
+    /* Leave off the path when it is the CWD.  */
+    if (strcmp (pathname, "./"))
+       strcpy (short_pathname, pathname);
+    else
+       short_pathname[0] = '\0';
+    strcat (short_pathname, filename);
+
+    /* Now that we know the path to the file we were requested to operate on,
+     * we can verify that it is valid.
+     *
+     * For security reasons, if SHORT_PATHNAME is absolute or attempts to
+     * ascend outside of the current sanbbox, we abort.  The server should not
+     * send us anything but relative paths which remain inside the sandbox
+     * here.  Anything less means a trojan CVS server could create and edit
+     * arbitrary files on the client.
+     */
+    if (!is_valid_client_path (short_pathname))
+    {
+       error (0, 0,
+               "Server attempted to update a file via an invalid pathname:");
+        error (1, 0, "`%s'.", short_pathname);
+    }
+
+    reposdirname = xstrdup (short_repos);
+    p = strrchr (reposdirname, '/');
+    if (!p)
+    {
+       reposdirname = xrealloc (reposdirname, 2);
+       reposdirname[0] = '.'; reposdirname[1] = '\0';
+    }
+    else
+       *p = '\0';
+
+    dir_name = xstrdup (pathname);
+    p = strrchr (dir_name, '/');
+    if (!p)
+    {
+       dir_name = xrealloc (dir_name, 2);
+       dir_name[0] = '.'; dir_name[1] = '\0';
+    }
+    else
+       *p = '\0';
+    if (client_prune_dirs)
+       add_prune_candidate (dir_name);
+
+    if (!toplevel_wd)
+    {
+       toplevel_wd = xgetcwd ();
+       if (!toplevel_wd)
+           error (1, errno, "could not get working directory");
+    }
+
+    if (CVS_CHDIR (toplevel_wd) < 0)
+       error (1, errno, "could not chdir to %s", toplevel_wd);
+
+    /* Create the CVS directory at the top level if needed.  The
+       isdir seems like an unneeded system call, but it *does*
+       need to be called both if the CVS_CHDIR below succeeds
+       (e.g.  "cvs co .") or if it fails (e.g. basicb-1a in
+       testsuite).  We only need to do this for the "." case,
+       since the server takes care of forcing this directory to be
+       created in all other cases.  If we don't create CVSADM
+       here, the call to Entries_Open below will fail.  FIXME:
+       perhaps this means that we should change our algorithm
+       below that calls Create_Admin instead of having this code
+       here? */
+    if (/* I think the reposdirname_absolute case has to do with
+          things like "cvs update /foo/bar".  In any event, the
+          code below which tries to put toplevel_repos into
+          CVS/Repository is almost surely unsuited to
+          the reposdirname_absolute case.  */
+       !reposdirname_absolute
+       && !strcmp (dir_name, ".")
+       && ! isdir (CVSADM))
+    {
+       char *repo;
+       char *r;
+
+       newdir = 1;
+
+       /* If toplevel_repos doesn't have at least one character, then the
+        * reference to r[-1] below could be out of bounds.
+        */
+       assert (*toplevel_repos);
+
+       repo = xmalloc (strlen (toplevel_repos)
+                       + 10);
+       strcpy (repo, toplevel_repos);
+       r = repo + strlen (repo);
+       if (r[-1] != '.' || r[-2] != '/')
+           strcpy (r, "/.");
+
+       Create_Admin (".", ".", repo, NULL, NULL, 0, 1, 1);
+
+       free (repo);
+    }
+
+    if (CVS_CHDIR (dir_name) < 0)
+    {
+       char *dir;
+       char *dirp;
+       
+       if (! existence_error (errno))
+           error (1, errno, "could not chdir to %s", dir_name);
+       
+       /* Directory does not exist, we need to create it.  */
+       newdir = 1;
+
+       /* Provided we are willing to assume that directories get
+          created one at a time, we could simplify this a lot.
+          Do note that one aspect still would need to walk the
+          dir_name path: the checking for "fncmp (dir, CVSADM)".  */
+
+       dir = xmalloc (strlen (dir_name) + 1);
+       dirp = dir_name;
+       rdirp = reposdirname;
+
+       /* This algorithm makes nested directories one at a time
+          and create CVS administration files in them.  For
+          example, we're checking out foo/bar/baz from the
+          repository:
+
+          1) create foo, point CVS/Repository to <root>/foo
+          2)     .. foo/bar                   .. <root>/foo/bar
+          3)     .. foo/bar/baz               .. <root>/foo/bar/baz
+          
+          As you can see, we're just stepping along DIR_NAME (with
+          DIRP) and REPOSDIRNAME (with RDIRP) respectively.
+
+          We need to be careful when we are checking out a
+          module, however, since DIR_NAME and REPOSDIRNAME are not
+          going to be the same.  Since modules will not have any
+          slashes in their names, we should watch the output of
+          STRCHR to decide whether or not we should use STRCHR on
+          the RDIRP.  That is, if we're down to a module name,
+          don't keep picking apart the repository directory name.  */
+
+       do
+       {
+           dirp = strchr (dirp, '/');
+           if (dirp)
+           {
+               strncpy (dir, dir_name, dirp - dir_name);
+               dir[dirp - dir_name] = '\0';
+               /* Skip the slash.  */
+               ++dirp;
+               if (!rdirp)
+                   /* This just means that the repository string has
+                      fewer components than the dir_name string.  But
+                      that is OK (e.g. see modules3-8 in testsuite).  */
+                   ;
+               else
+                   rdirp = strchr (rdirp, '/');
+           }
+           else
+           {
+               /* If there are no more slashes in the dir name,
+                  we're down to the most nested directory -OR- to
+                  the name of a module.  In the first case, we
+                  should be down to a DIRP that has no slashes,
+                  so it won't help/hurt to do another STRCHR call
+                  on DIRP.  It will definitely hurt, however, if
+                  we're down to a module name, since a module
+                  name can point to a nested directory (that is,
+                  DIRP will still have slashes in it.  Therefore,
+                  we should set it to NULL so the routine below
+                  copies the contents of REMOTEDIRNAME onto the
+                  root repository directory (does this if rdirp
+                  is set to NULL, because we used to do an extra
+                  STRCHR call here). */
+
+               rdirp = NULL;
+               strcpy (dir, dir_name);
+           }
+
+           if (fncmp (dir, CVSADM) == 0)
+           {
+               error (0, 0, "cannot create a directory named %s", dir);
+               error (0, 0, "because CVS uses \"%s\" for its own uses",
+                      CVSADM);
+               error (1, 0, "rename the directory and try again");
+           }
+
+           if (mkdir_if_needed (dir))
+           {
+               /* It already existed, fine.  Just keep going.  */
+           }
+           else if (!strcmp (cvs_cmd_name, "export"))
+               /* Don't create CVSADM directories if this is export.  */
+               ;
+           else
+           {
+               /*
+                * Put repository in CVS/Repository.  For historical
+                * (pre-CVS/Root) reasons, this is an absolute pathname,
+                * but what really matters is the part of it which is
+                * relative to cvsroot.
+                */
+               char *repo;
+               char *r, *b;
+
+               repo = xmalloc (strlen (reposdirname)
+                               + strlen (toplevel_repos)
+                               + 80);
+               if (reposdirname_absolute)
+                   r = repo;
+               else
+               {
+                   strcpy (repo, toplevel_repos);
+                   strcat (repo, "/");
+                   r = repo + strlen (repo);
+               }
+
+               if (rdirp)
+               {
+                   /* See comment near start of function; the only
+                      way that the server can put the right thing
+                      in each CVS/Repository file is to create the
+                      directories one at a time.  I think that the
+                      CVS server has been doing this all along.  */
+                   error (0, 0, "\
+warning: server is not creating directories one at a time");
+                   strncpy (r, reposdirname, rdirp - reposdirname);
+                   r[rdirp - reposdirname] = '\0';
+               }
+               else
+                   strcpy (r, reposdirname);
+
+               Create_Admin (dir, dir, repo, NULL, NULL, 0, 0, 1);
+               free (repo);
+
+               b = strrchr (dir, '/');
+               if (!b)
+                   Subdir_Register (NULL, NULL, dir);
+               else
+               {
+                   *b = '\0';
+                   Subdir_Register (NULL, dir, b + 1);
+                   *b = '/';
+               }
+           }
+
+           if (rdirp)
+           {
+               /* Skip the slash.  */
+               ++rdirp;
+           }
+
+       } while (dirp);
+       free (dir);
+       /* Now it better work.  */
+       if (CVS_CHDIR (dir_name) < 0)
+           error (1, errno, "could not chdir to %s", dir_name);
+    }
+    else if (!strcmp (cvs_cmd_name, "export"))
+       /* Don't create CVSADM directories if this is export.  */
+       ;
+    else if (!isdir (CVSADM))
+    {
+       /*
+        * Put repository in CVS/Repository.  For historical
+        * (pre-CVS/Root) reasons, this is an absolute pathname,
+        * but what really matters is the part of it which is
+        * relative to cvsroot.
+        */
+       char *repo;
+
+       if (reposdirname_absolute)
+           repo = reposdirname;
+       else
+           repo = Xasprintf ("%s/%s", toplevel_repos, reposdirname);
+
+       Create_Admin (".", ".", repo, NULL, NULL, 0, 1, 1);
+       if (repo != reposdirname)
+           free (repo);
+    }
+
+    if (strcmp (cvs_cmd_name, "export"))
+    {
+       last_entries = Entries_Open (0, dir_name);
+
+       /* If this is a newly created directory, we will record
+          all subdirectory information, so call Subdirs_Known in
+          case there are no subdirectories.  If this is not a
+          newly created directory, it may be an old working
+          directory from before we recorded subdirectory
+          information in the Entries file.  We force a search for
+          all subdirectories now, to make sure our subdirectory
+          information is up to date.  If the Entries file does
+          record subdirectory information, then this call only
+          does list manipulation.  */
+       if (newdir)
+           Subdirs_Known (last_entries);
+       else
+       {
+           List *dirlist;
+
+           dirlist = Find_Directories (NULL, W_LOCAL, last_entries);
+           dellist (&dirlist);
+       }
+    }
+    free (reposdirname);
+    (*func) (data, last_entries, short_pathname, filename);
+    if (last_entries)
+       Entries_Close (last_entries);
+    free (dir_name);
+    free (short_pathname);
+    free (reposname);
+}
+
+
+
+static void
+copy_a_file (void *data, List *ent_list, const char *short_pathname,
+            const char *filename)
+{
+    char *newname;
+
+    read_line (&newname);
+
+#ifdef USE_VMS_FILENAMES
+    {
+       /* Mogrify the filename so VMS is happy with it. */
+       char *p;
+       for(p = newname; *p; p++)
+          if(*p == '.' || *p == '#') *p = '_';
+    }
+#endif
+    /* cvsclient.texi has said for a long time that newname must be in the
+       same directory.  Wouldn't want a malicious or buggy server overwriting
+       ~/.profile, /etc/passwd, or anything like that.  */
+    if (last_component (newname) != newname)
+       error (1, 0, "protocol error: Copy-file tried to specify directory");
+
+    if (unlink_file (newname) && !existence_error (errno))
+       error (0, errno, "unable to remove %s", newname);
+    copy_file (filename, newname);
+    free (newname);
+}
+
+
+
+static void
+handle_copy_file (char *args, size_t len)
+{
+    call_in_directory (args, copy_a_file, NULL);
+}
+
+
+
+/* Read from the server the count for the length of a file, then read
+   the contents of that file and write them to FILENAME.  FULLNAME is
+   the name of the file for use in error messages.  FIXME-someday:
+   extend this to deal with compressed files and make update_entries
+   use it.  On error, gives a fatal error.  */
+static void
+read_counted_file (char *filename, char *fullname)
+{
+    char *size_string;
+    size_t size;
+    char *buf;
+
+    /* Pointers in buf to the place to put data which will be read,
+       and the data which needs to be written, respectively.  */
+    char *pread;
+    char *pwrite;
+    /* Number of bytes left to read and number of bytes in buf waiting to
+       be written, respectively.  */
+    size_t nread;
+    size_t nwrite;
+
+    FILE *fp;
+
+    read_line (&size_string);
+    if (size_string[0] == 'z')
+       error (1, 0, "\
+protocol error: compressed files not supported for that operation");
+    /* FIXME: should be doing more error checking, probably.  Like using
+       strtoul and making sure we used up the whole line.  */
+    size = atoi (size_string);
+    free (size_string);
+
+    /* A more sophisticated implementation would use only a limited amount
+       of buffer space (8K perhaps), and read that much at a time.  We allocate
+       a buffer for the whole file only to make it easy to keep track what
+       needs to be read and written.  */
+    buf = xmalloc (size);
+
+    /* FIXME-someday: caller should pass in a flag saying whether it
+       is binary or not.  I haven't carefully looked into whether
+       CVS/Template files should use local text file conventions or
+       not.  */
+    fp = CVS_FOPEN (filename, "wb");
+    if (!fp)
+       error (1, errno, "cannot write %s", fullname);
+    nread = size;
+    nwrite = 0;
+    pread = buf;
+    pwrite = buf;
+    while (nread > 0 || nwrite > 0)
+    {
+       size_t n;
+
+       if (nread > 0)
+       {
+           n = try_read_from_server (pread, nread);
+           nread -= n;
+           pread += n;
+           nwrite += n;
+       }
+
+       if (nwrite > 0)
+       {
+           n = fwrite (pwrite, sizeof *pwrite, nwrite, fp);
+           if (ferror (fp))
+               error (1, errno, "cannot write %s", fullname);
+           nwrite -= n;
+           pwrite += n;
+       }
+    }
+    free (buf);
+    if (fclose (fp) < 0)
+       error (1, errno, "cannot close %s", fullname);
+}
+
+
+
+/* OK, we want to swallow the "U foo.c" response and then output it only
+   if we can update the file.  In the future we probably want some more
+   systematic approach to parsing tagged text, but for now we keep it
+   ad hoc.  "Why," I hear you cry, "do we not just look at the
+   Update-existing and Created responses?"  That is an excellent question,
+   and the answer is roughly conservatism/laziness--I haven't read through
+   update.c enough to figure out the exact correspondence or lack thereof
+   between those responses and a "U foo.c" line (note that Merged, from
+   join_file, can be either "C foo" or "U foo" depending on the context).  */
+/* Nonzero if we have seen +updated and not -updated.  */
+static int updated_seen;
+/* Filename from an "fname" tagged response within +updated/-updated.  */
+static char *updated_fname;
+
+/* This struct is used to hold data when reading the +importmergecmd
+   and -importmergecmd tags.  We put the variables in a struct only
+   for namespace issues.  FIXME: As noted above, we need to develop a
+   more systematic approach.  */
+static struct
+{
+    /* Nonzero if we have seen +importmergecmd and not -importmergecmd.  */
+    int seen;
+    /* Number of conflicts, from a "conflicts" tagged response.  */
+    int conflicts;
+    /* First merge tag, from a "mergetag1" tagged response.  */
+    char *mergetag1;
+    /* Second merge tag, from a "mergetag2" tagged response.  */
+    char *mergetag2;
+    /* Repository, from a "repository" tagged response.  */
+    char *repository;
+} importmergecmd;
+
+/* Nonzero if we should arrange to return with a failure exit status.  */
+static bool failure_exit;
+
+
+/*
+ * The time stamp of the last file we registered.
+ */
+static time_t last_register_time;
+
+
+
+/*
+ * The Checksum response gives the checksum for the file transferred
+ * over by the next Updated, Merged or Patch response.  We just store
+ * it here, and then check it in update_entries.
+ */
+static int stored_checksum_valid;
+static unsigned char stored_checksum[16];
+static void
+handle_checksum (char *args, size_t len)
+{
+    char *s;
+    char buf[3];
+    int i;
+
+    if (stored_checksum_valid)
+        error (1, 0, "Checksum received before last one was used");
+
+    s = args;
+    buf[2] = '\0';
+    for (i = 0; i < 16; i++)
+    {
+        char *bufend;
+
+       buf[0] = *s++;
+       buf[1] = *s++;
+       stored_checksum[i] = (char) strtol (buf, &bufend, 16);
+       if (bufend != buf + 2)
+           break;
+    }
+
+    if (i < 16 || *s != '\0')
+        error (1, 0, "Invalid Checksum response: `%s'", args);
+
+    stored_checksum_valid = 1;
+}
+
+
+
+/* Mode that we got in a "Mode" response (malloc'd), or NULL if none.  */
+static char *stored_mode;
+static void
+handle_mode (char *args, size_t len)
+{
+    if (stored_mode)
+       error (1, 0, "protocol error: duplicate Mode");
+    stored_mode = xstrdup (args);
+}
+
+
+
+/* Nonzero if time was specified in Mod-time.  */
+static int stored_modtime_valid;
+/* Time specified in Mod-time.  */
+static time_t stored_modtime;
+static void
+handle_mod_time (char *args, size_t len)
+{
+    struct timespec newtime;
+    if (stored_modtime_valid)
+       error (0, 0, "protocol error: duplicate Mod-time");
+    if (get_date (&newtime, args, NULL))
+    {
+       /* Truncate nanoseconds.  */
+       stored_modtime = newtime.tv_sec;
+       stored_modtime_valid = 1;
+    }
+    else
+       error (0, 0, "protocol error: cannot parse date %s", args);
+}
+
+
+
+/*
+ * If we receive a patch, but the patch program fails to apply it, we
+ * want to request the original file.  We keep a list of files whose
+ * patches have failed.
+ */
+
+char **failed_patches;
+int failed_patches_count;
+
+
+
+struct update_entries_data
+{
+    enum {
+      /*
+       * We are just getting an Entries line; the local file is
+       * correct.
+       */
+      UPDATE_ENTRIES_CHECKIN,
+
+      /* The file content may be in a temp file, waiting to be renamed.  */
+      UPDATE_ENTRIES_BASE,
+
+      /* We are getting the file contents as well.  */
+      UPDATE_ENTRIES_UPDATE,
+      /*
+       * We are getting a patch against the existing local file, not
+       * an entire new file.
+       */
+      UPDATE_ENTRIES_PATCH,
+      /*
+       * We are getting an RCS change text (diff -n output) against
+       * the existing local file, not an entire new file.
+       */
+      UPDATE_ENTRIES_RCS_DIFF
+    } contents;
+
+    enum update_existing existp;
+
+    /*
+     * String to put in the timestamp field or NULL to use the timestamp
+     * of the file.
+     */
+    char *timestamp;
+};
+
+
+
+static void
+discard_file (void)
+{
+    char *mode_string;
+    char *size_string;
+    size_t size, nread;
+
+    read_line (&mode_string);
+    free (mode_string);
+
+    read_line (&size_string);
+    if (size_string[0] == 'z')
+       size = atoi (size_string + 1);
+    else
+       size = atoi (size_string);
+    free (size_string);
+
+    /* Now read and discard the file contents.  */
+    nread = 0;
+    while (nread < size)
+    {
+       char buf[8192];
+       size_t toread;
+
+       toread = size - nread;
+       if (toread > sizeof buf)
+           toread = sizeof buf;
+
+       nread += try_read_from_server (buf, toread);
+       if (nread == size)
+           break;
+    }
+
+    return;
+}
+
+
+
+static char *
+newfilename (const char *filename)
+{
+#ifdef USE_VMS_FILENAMES
+    /* A VMS rename of "blah.dat" to "foo" to implies a
+     * destination of "foo.dat" which is unfortinate for CVS.
+     */
+    return Xasprintf ("%s_new_", filename);
+#else
+#ifdef _POSIX_NO_TRUNC
+    return Xasprintf (".new.%.9s", filename);
+#else /* _POSIX_NO_TRUNC */
+    return Xasprintf (".new.%s", filename);
+#endif /* _POSIX_NO_TRUNC */
+#endif /* USE_VMS_FILENAMES */
+}
+
+
+
+static char *
+read_file_from_server (const char *fullname, char **mode_string, size_t *size)
+{
+    char *size_string;
+    bool use_gzip;
+    char *buf;
+
+    read_line (mode_string);
+    
+    read_line (&size_string);
+    if (size_string[0] == 'z')
+    {
+       use_gzip = true;
+       *size = atoi (size_string + 1);
+    }
+    else
+    {
+       use_gzip = false;
+       *size = atoi (size_string);
+    }
+    free (size_string);
+
+    buf = xmalloc (*size);
+    read_from_server (buf, *size);
+
+    if (use_gzip)
+    {
+       char *outbuf;
+
+       if (gunzip_in_mem (fullname, (unsigned char *) buf, size, &outbuf))
+           error (1, 0, "aborting due to compression error");
+
+       free (buf);
+       buf = outbuf;
+    }
+
+    return buf;
+}
+
+
+
+/* Update the Entries line for this file.  */
+static void
+update_entries (void *data_arg, List *ent_list, const char *short_pathname,
+                const char *filename)
+{
+    char *entries_line;
+    struct update_entries_data *data = data_arg;
+
+    char *cp;
+    char *user;
+    char *vn;
+    /* Timestamp field.  Always empty according to the protocol.  */
+    char *ts;
+    char *options = NULL;
+    char *tag = NULL;
+    char *date = NULL;
+    char *tag_or_date;
+    char *scratch_entries = NULL;
+    bool bin;
+    char *temp_filename;
+
+#ifdef UTIME_EXPECTS_WRITABLE
+    int change_it_back = 0;
+#endif
+
+    read_line (&entries_line);
+
+    /*
+     * Parse the entries line.
+     */
+    scratch_entries = xstrdup (entries_line);
+
+    if (scratch_entries[0] != '/')
+        error (1, 0, "bad entries line `%s' from server", entries_line);
+    user = scratch_entries + 1;
+    if (!(cp = strchr (user, '/')))
+        error (1, 0, "bad entries line `%s' from server", entries_line);
+    *cp++ = '\0';
+    vn = cp;
+    if (!(cp = strchr (vn, '/')))
+        error (1, 0, "bad entries line `%s' from server", entries_line);
+    *cp++ = '\0';
+    
+    ts = cp;
+    if (!(cp = strchr (ts, '/')))
+        error (1, 0, "bad entries line `%s' from server", entries_line);
+    *cp++ = '\0';
+    options = cp;
+    if (!(cp = strchr (options, '/')))
+        error (1, 0, "bad entries line `%s' from server", entries_line);
+    *cp++ = '\0';
+    tag_or_date = cp;
+    
+    /* If a slash ends the tag_or_date, ignore everything after it.  */
+    cp = strchr (tag_or_date, '/');
+    if (cp)
+        *cp = '\0';
+    if (*tag_or_date == 'T')
+        tag = tag_or_date + 1;
+    else if (*tag_or_date == 'D')
+        date = tag_or_date + 1;
+
+    /* Done parsing the entries line. */
+
+    temp_filename = newfilename (filename);
+
+    if (data->contents == UPDATE_ENTRIES_UPDATE
+       || data->contents == UPDATE_ENTRIES_PATCH
+       || data->contents == UPDATE_ENTRIES_RCS_DIFF)
+    {
+       char *mode_string;
+       size_t size;
+       char *buf;
+       bool patch_failed;
+
+       if (!validate_change (data->existp, filename, short_pathname))
+       {
+           /* The Mode, Mod-time, and Checksum responses should not carry
+            * over to a subsequent Created (or whatever) response, even
+            * in the error case.
+            */
+           if (updated_fname)
+           {
+               free (updated_fname);
+               updated_fname = NULL;
+           }
+           if (stored_mode)
+           {
+               free (stored_mode);
+               stored_mode = NULL;
+           }
+           stored_modtime_valid = 0;
+           stored_checksum_valid = 0;
+
+           failure_exit = true;
+
+       discard_file_and_return:
+           discard_file ();
+           free (scratch_entries);
+           free (entries_line);
+           return;
+       }
+
+       buf = read_file_from_server (short_pathname, &mode_string, &size);
+
+        /* Some systems, like OS/2 and Windows NT, end lines with CRLF
+           instead of just LF.  Format translation is done in the C
+           library I/O funtions.  Here we tell them whether or not to
+           convert -- if this file is marked "binary" with the RCS -kb
+           flag, then we don't want to convert, else we do (because
+           CVS assumes text files by default). */
+       if (options)
+           bin = !strcmp (options, "-kb");
+       else
+           bin = false;
+
+       if (data->contents != UPDATE_ENTRIES_RCS_DIFF)
+       {
+           int fd;
+
+           fd = CVS_OPEN (temp_filename,
+                          (O_WRONLY | O_CREAT | O_TRUNC
+                           | (bin ? OPEN_BINARY : 0)),
+                          0777);
+
+           if (fd < 0)
+           {
+               /* I can see a case for making this a fatal error; for
+                  a condition like disk full or network unreachable
+                  (for a file server), carrying on and giving an
+                  error on each file seems unnecessary.  But if it is
+                  a permission problem, or some such, then it is
+                  entirely possible that future files will not have
+                  the same problem.  */
+               error (0, errno, "cannot write %s", short_pathname);
+               free (temp_filename);
+               free (buf);
+               goto discard_file_and_return;
+           }
+
+           if (write (fd, buf, size) != size)
+               error (1, errno, "writing %s", short_pathname);
+
+           if (close (fd) < 0)
+               error (1, errno, "writing %s", short_pathname);
+       }
+
+       patch_failed = false;
+
+       if (data->contents == UPDATE_ENTRIES_UPDATE)
+       {
+           rename_file (temp_filename, filename);
+       }
+       else if (data->contents == UPDATE_ENTRIES_PATCH)
+       {
+           /* You might think we could just leave Patched out of
+              Valid-responses and not get this response.  However, if
+              memory serves, the CVS 1.9 server bases this on -u
+              (update-patches), and there is no way for us to send -u
+              or not based on whether the server supports "Rcs-diff".  
+
+              Fall back to transmitting entire files.  */
+           error (0, 0,
+                  "unsupported patch format received for `%s'; will refetch",
+                  short_pathname);
+           patch_failed = true;
+       }
+       else
+       {
+           char *filebuf;
+           size_t filebufsize;
+           size_t nread;
+           char *patchedbuf;
+           size_t patchedlen;
+
+           /* Handle UPDATE_ENTRIES_RCS_DIFF.  */
+
+           if (!isfile (filename))
+               error (1, 0, "patch original file %s does not exist",
+                      short_pathname);
+           filebuf = NULL;
+           filebufsize = 0;
+           nread = 0;
+
+           get_file (filename, short_pathname, bin ? FOPEN_BINARY_READ : "r",
+                     &filebuf, &filebufsize, &nread);
+           /* At this point the contents of the existing file are in
+               FILEBUF, and the length of the contents is in NREAD.
+               The contents of the patch from the network are in BUF,
+               and the length of the patch is in SIZE.  */
+
+           if (!rcs_change_text (short_pathname, filebuf, nread, buf, size,
+                                  &patchedbuf, &patchedlen))
+           {
+               error (0, 0, "patch failed for `%s'; will refetch",
+                      short_pathname);
+               patch_failed = true;
+           }
+           else
+           {
+               if (stored_checksum_valid)
+               {
+                   unsigned char checksum[16];
+
+                   /* We have a checksum.  Check it before writing
+                      the file out, so that we don't have to read it
+                      back in again.  */
+                   md5_buffer (patchedbuf, patchedlen, checksum);
+                   if (memcmp (checksum, stored_checksum, 16) != 0)
+                   {
+                       error (0, 0,
+"checksum failure after patch to `%s'; will refetch",
+                              short_pathname);
+
+                       patch_failed = true;
+                   }
+
+                   stored_checksum_valid = 0;
+               }
+
+               if (!patch_failed)
+               {
+                   FILE *e;
+
+                   e = xfopen (temp_filename,
+                               bin ? FOPEN_BINARY_WRITE : "w");
+                   if (fwrite (patchedbuf, sizeof *patchedbuf, patchedlen, e)
+                       != patchedlen)
+                       error (1, errno, "cannot write %s", temp_filename);
+                   if (fclose (e) == EOF)
+                       error (1, errno, "cannot close %s", temp_filename);
+                   rename_file (temp_filename, filename);
+               }
+
+               free (patchedbuf);
+           }
+
+           free (filebuf);
+       }
+
+       free (buf);
+       free (temp_filename);
+
+       if (stored_checksum_valid && !patch_failed)
+       {
+           FILE *e;
+           struct md5_ctx context;
+           unsigned char buf[8192];
+           unsigned len;
+           unsigned char checksum[16];
+
+           /*
+            * Compute the MD5 checksum.  This will normally only be
+            * used when receiving a patch, so we always compute it
+            * here on the final file, rather than on the received
+            * data.
+            *
+            * Note that if the file is a text file, we should read it
+            * here using text mode, so its lines will be terminated the same
+            * way they were transmitted.
+            */
+           e = CVS_FOPEN (filename, "r");
+           if (!e)
+               error (1, errno, "could not open %s", short_pathname);
+
+           md5_init_ctx (&context);
+           while ((len = fread (buf, 1, sizeof buf, e)) != 0)
+               md5_process_bytes (buf, len, &context);
+           if (ferror (e))
+               error (1, errno, "could not read %s", short_pathname);
+           md5_finish_ctx (&context, checksum);
+
+           fclose (e);
+
+           stored_checksum_valid = 0;
+
+           if (memcmp (checksum, stored_checksum, 16) != 0)
+           {
+               if (data->contents != UPDATE_ENTRIES_PATCH)
+                   error (1, 0, "checksum failure on %s",
+                          short_pathname);
+
+               error (0, 0,
+                      "checksum failure after patch to `%s'; will refetch",
+                      short_pathname);
+
+               patch_failed = true;
+           }
+       }
+
+       if (patch_failed)
+       {
+           /* Save this file to retrieve later.  */
+           failed_patches = xnrealloc (failed_patches,
+                                       failed_patches_count + 1,
+                                       sizeof (char *));
+           failed_patches[failed_patches_count] = xstrdup (short_pathname);
+           ++failed_patches_count;
+
+           stored_checksum_valid = 0;
+
+           free (mode_string);
+           free (scratch_entries);
+           free (entries_line);
+
+           if (updated_fname)
+           {
+               free (updated_fname);
+               updated_fname = NULL;
+           }
+
+           return;
+       }
+       else if (updated_fname)
+       {
+           cvs_output ("U ", 0);
+           cvs_output (updated_fname, 0);
+           cvs_output ("\n", 1);
+           free (updated_fname);
+           updated_fname = NULL;
+       }
+
+        {
+           int status = change_mode (filename, mode_string, 1);
+           if (status != 0)
+               error (0, status, "cannot change mode of %s", short_pathname);
+       }
+
+       free (mode_string);
+    }
+    else if (data->contents == UPDATE_ENTRIES_BASE)
+    {
+       Node *n;
+       if (!noexec && (n = findnode_fn (ent_list, filename)))
+       {
+           Entnode *e = n->data;
+           /* After a join, control can get here without having changed the
+            * version number.  In this case, do not remove the base file.
+            */
+           if (strcmp (vn, e->version))
+               base_remove (filename, e->version);
+       }
+
+       if (last_merge)
+       {
+           /* Won't need these now that the merge is complete.  */
+           if (strcmp (vn, base_merge_rev1))
+               base_remove (filename, base_merge_rev1);
+           free (base_merge_rev1);
+           if (strcmp (vn, base_merge_rev2))
+               base_remove (filename, base_merge_rev2);
+           free (base_merge_rev2);
+       }
+
+       if (base_copy_error)
+       {
+           /* The previous base_copy command returned an error, such as in the
+            * "move away `FILE'; it is in the way" case.  Do not allow the
+            * entry to be updated.
+            */
+           if (updated_fname)
+           {
+               /* validate_change() has already printed "C filename" via the
+                * call from client_base_copy().
+                */
+               free (updated_fname);
+               updated_fname = false;
+           }
+           base_copy_error = false;
+           return;
+       }
+       if (!noexec)
+           rename_file (temp_filename, filename);
+       if (updated_fname)
+       {
+           cvs_output ("U ", 0);
+           cvs_output (updated_fname, 0);
+           cvs_output ("\n", 1);
+           free (updated_fname);
+           updated_fname = NULL;
+       }
+    }
+    else if (!noexec && data->contents == UPDATE_ENTRIES_CHECKIN
+            && strcmp (vn, "0") && *vn != '-')
+    {
+       /* On checkin, create the base file.  */
+       Node *n;
+       bool makebase = true;
+       if ((n = findnode_fn (ent_list, filename)))
+       {
+           /* This could be a readd of a locally removed file or, for
+            * instance, an update that changed keyword options without
+            * changing the revision number or the base file.
+            */
+           Entnode *e = n->data;
+           if (strcmp (vn, e->version))
+               /* The version number has changed.  */
+               base_remove (filename, e->version);
+           else
+               /* The version number has not changed.  */
+               makebase = false;
+       }
+       if (makebase)
+       {
+           /* A real checkin.  */
+           char *basefile = make_base_file_name (filename, vn);
+           mkdir_if_needed (CVSADM_BASE);
+           copy_file (filename, basefile);
+           free (basefile);
+       }
+    }
+
+    if (stored_mode)
+    {
+       change_mode (filename, stored_mode, 1);
+       free (stored_mode);
+       stored_mode = NULL;
+    }
+   
+    if (stored_modtime_valid)
+    {
+       struct utimbuf t;
+
+       memset (&t, 0, sizeof (t));
+       t.modtime = stored_modtime;
+       (void) time (&t.actime);
+
+#ifdef UTIME_EXPECTS_WRITABLE
+       if (!iswritable (filename))
+       {
+           xchmod (filename, 1);
+           change_it_back = 1;
+       }
+#endif  /* UTIME_EXPECTS_WRITABLE  */
+
+       if (utime (filename, &t) < 0)
+           error (0, errno, "cannot set time on %s", filename);
+
+#ifdef UTIME_EXPECTS_WRITABLE
+       if (change_it_back)
+       {
+           xchmod (filename, 0);
+           change_it_back = 0;
+       }
+#endif  /*  UTIME_EXPECTS_WRITABLE  */
+
+       stored_modtime_valid = 0;
+    }
+
+    /*
+     * Process the entries line.  Do this after we've written the file,
+     * since we need the timestamp.
+     */
+    if (strcmp (cvs_cmd_name, "export"))
+    {
+       char *local_timestamp;
+       char *file_timestamp;
+       bool ignore_merge;
+
+       (void) time (&last_register_time);
+
+       local_timestamp = data->timestamp;
+       if (!local_timestamp || ts[0] == '+' || last_merge_conflict)
+           file_timestamp = time_stamp (filename);
+       else
+           file_timestamp = NULL;
+
+       /*
+        * These special version numbers signify that it is not up to
+        * date.  Create a dummy timestamp which will never compare
+        * equal to the timestamp of the file.
+        */
+       if (vn[0] == '\0' || !strcmp (vn, "0") || vn[0] == '-')
+           local_timestamp = "dummy timestamp";
+       else if (!local_timestamp)
+       {
+           local_timestamp = file_timestamp;
+
+           /* Checking for cvs_cmd_name of "commit" doesn't seem like
+              the cleanest way to handle this, but it seem to roughly
+              parallel what the :local: code which calls
+              mark_up_to_date ends up amounting to.  Some day, should
+              think more about what the Checked-in response means
+              vis-a-vis both Entries and Base and clarify
+              cvsclient.texi accordingly.  */
+
+           if (!strcmp (cvs_cmd_name, "commit"))
+           {
+               char *update_dir = dir_name (short_pathname);
+               mark_up_to_date (update_dir, filename);
+               free (update_dir);
+           }
+       }
+
+       if (last_merge)
+       {
+           if (last_merge_made_base)
+           {
+               Node *n;
+               Entnode *e;
+
+               n = findnode_fn (ent_list, filename);
+               assert (n);
+
+               e = n->data;
+               if (strcmp (vn, e->version))
+                   /* Merge.  */
+                   ignore_merge = false;
+               else
+                   /* Join. */
+                   ignore_merge = true;
+           }
+           else
+               ignore_merge = false;
+       }
+       else
+           ignore_merge = true;
+       
+       Register (ent_list, filename, vn,
+                 ignore_merge ? local_timestamp : "Result of merge",
+                 options, tag, date,
+                 ts[0] == '+' || last_merge_conflict ? file_timestamp : NULL);
+       if (last_merge_conflict)
+       {
+           assert (!ignore_merge);
+           if (!really_quiet)
+           {
+               cvs_output ("C ", 2);
+               cvs_output (short_pathname, 0);
+               cvs_output ("\n", 1);
+           }
+       }
+       else if (!ignore_merge)
+       {
+           if (!really_quiet)
+           {
+               cvs_output ("M ", 2);
+               cvs_output (short_pathname, 0);
+               cvs_output ("\n", 1);
+           }
+       }
+       last_merge = false;
+       last_merge_conflict = false;
+       last_merge_made_base = false;
+       last_merge_no_change = false;
+
+       if (file_timestamp)
+           free (file_timestamp);
+
+    }
+    free (scratch_entries);
+    free (entries_line);
+}
+
+
+
+static void
+handle_checked_in (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_CHECKIN;
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_new_entry (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_CHECKIN;
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = "dummy timestamp from new-entry";
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_updated (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_UPDATE;
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_created (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_UPDATE;
+    dat.existp = UPDATE_ENTRIES_NEW;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_update_existing (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_UPDATE;
+    dat.existp = UPDATE_ENTRIES_EXISTING;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_merged (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_UPDATE;
+    /* Think this could be UPDATE_ENTRIES_EXISTING, but just in case...  */
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = "Result of merge";
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_patched (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_PATCH;
+    /* Think this could be UPDATE_ENTRIES_EXISTING, but just in case...  */
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_rcs_diff (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    dat.contents = UPDATE_ENTRIES_RCS_DIFF;
+    /* Think this could be UPDATE_ENTRIES_EXISTING, but just in case...  */
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+/*
+ * The OpenPGP-signatures response gives the signature for the file to be
+ * transmitted in the next Base-checkout or Temp-checkout response.
+ */
+static char *stored_signatures;
+static size_t stored_signatures_len;
+static void
+handle_openpgp_signatures (char *args, size_t len)
+{
+    if (stored_signatures)
+        error (1, 0, "OpenPGP-signatures received before last one was used");
+
+    if (!base64_decode_alloc (args, len, &stored_signatures,
+                             &stored_signatures_len))
+       error (1, 0, "Bad signature received from server.");
+
+    if (!stored_signatures)
+       error (1, errno, "Failed to allocate memory");
+}
+
+
+
+static void
+client_base_checkout (void *data_arg, List *ent_list,
+                     const char *short_pathname, const char *filename)
+{
+    /* Options for this file, a Previous REVision if this is a diff, and the
+     * REVision of the new file.
+     */
+    char *options, *prev, *rev;
+
+    /* The base file to be created.  */
+    char *basefile;
+    char *update_dir;
+    char *fullbase;
+
+    /* File buf from net.  May be an RCS diff from PREV to REV.  */
+    char *buf;
+    char *mode_string;
+    size_t size;
+
+    bool bin;
+    bool patch_failed;
+    bool *istemp = data_arg;
+
+    TRACE (TRACE_FUNCTION, "client_base_checkout (%s)", short_pathname);
+
+    /* Read OPTIONS, PREV, and REV from the server.  */
+    read_line (&options);
+    read_line (&prev);
+    read_line (&rev);
+
+    /* Use these values to get our base file name.  */
+    if (*istemp)
+    {
+       if (temp_checkout2)
+           error (1, 0,
+                  "Server sent more than two temp files without using them.");
+       basefile = cvs_temp_name ();
+       if (temp_checkout1)
+           temp_checkout2 = basefile;
+       else
+           temp_checkout1 = basefile;
+    }
+    else
+       basefile = make_base_file_name (filename, rev);
+
+    /* FIXME?  It might be nice to verify that base files aren't being
+     * overwritten except when the keyword mode has changed.
+     */
+    if (!*istemp && isfile (basefile))
+       force_xchmod (basefile, true);
+
+    update_dir = dir_name (short_pathname);
+    if (*istemp || !*update_dir) fullbase = xstrdup (basefile);
+    else fullbase = Xasprintf ("%s/%s", update_dir, basefile);
+
+    /* Read the file or patch from the server.  */
+    /* FIXME: Read/write to file is repeated and could be optimized to
+     * write directly to disk without using so much mem.
+     */
+    buf = read_file_from_server (fullbase, &mode_string, &size);
+
+    if (options) bin = !strcmp (options, "-kb");
+    else bin = false;
+
+    if (*prev && strcmp (prev, rev))
+    {
+       char *filebuf;
+       size_t filebufsize;
+       size_t nread;
+       char *patchedbuf;
+       size_t patchedlen;
+       char *pbasefile;
+       char *pfullbase;
+
+       /* Handle UPDATE_ENTRIES_RCS_DIFF.  */
+
+       pbasefile = make_base_file_name (filename, prev);
+       if (!*update_dir) pfullbase = xstrdup (pbasefile);
+       else pfullbase = Xasprintf ("%s/%s", update_dir, pbasefile);
+
+       if (!isfile (pbasefile))
+           error (1, 0, "patch original file `%s' does not exist",
+                  pfullbase);
+
+       filebuf = NULL;
+       filebufsize = 0;
+       nread = 0;
+
+       get_file (pbasefile, pfullbase, bin ? FOPEN_BINARY_READ : "r",
+                 &filebuf, &filebufsize, &nread);
+       /* At this point the contents of the existing file are in
+        * FILEBUF, and the length of the contents is in NREAD.
+        * The contents of the patch from the network are in BUF,
+        * and the length of the patch is in SIZE.
+        */
+
+       patch_failed = !rcs_change_text (fullbase, filebuf, nread, buf,
+                                        size, &patchedbuf, &patchedlen);
+
+       if (!patch_failed)
+       {
+           free (buf);
+           buf = patchedbuf;
+           size = patchedlen;
+       }
+       else
+           free (patchedbuf);
+
+       free (filebuf);
+       free (pbasefile);
+       free (pfullbase);
+    }
+    else
+       patch_failed = false;
+
+    if (!patch_failed)
+    {
+       FILE *e;
+       int status;
+
+       if (!*istemp)
+           mkdir_if_needed (CVSADM_BASE);
+       e = xfopen (basefile, bin ? FOPEN_BINARY_WRITE : "w");
+       if (fwrite (buf, sizeof *buf, size, e) != size)
+           error (1, errno, "cannot write `%s'", fullbase);
+       if (fclose (e) == EOF)
+           error (0, errno, "cannot close `%s'", fullbase);
+
+       status = change_mode (basefile, mode_string, 1);
+       if (status != 0)
+           error (0, status, "cannot change mode of `%s'", fullbase);
+
+       if (stored_signatures)
+       {
+           char *sigfile = Xasprintf ("%s.sig", basefile);
+           
+           if (!*istemp && isfile (sigfile))
+               xchmod (sigfile, true);
+           e = xfopen (sigfile, FOPEN_BINARY_WRITE);
+           if (fwrite (stored_signatures, sizeof *stored_signatures,
+                       stored_signatures_len, e) != stored_signatures_len)
+               error (1, errno, "cannot write signature file `%s'", sigfile);
+           if (fclose (e) == EOF)
+               error (0, errno, "cannot close signature file `%s'", sigfile);
+
+           if (!*istemp)
+               xchmod (sigfile, false);
+
+           /* FIXME: Verify the signature here, when configured to do so.  */
+
+           if (*istemp && CVS_UNLINK (sigfile) < 0)
+               error (0, errno, "Failed to remove temp sig file `%s'",
+                      sigfile);
+
+           free (sigfile);
+           free (stored_signatures);
+           stored_signatures = NULL;
+       }
+    }
+
+    /* FIXME: When enabled, verify base file via openpgp signature.  */
+
+    free (buf);
+    free (rev);
+    free (prev);
+    if (!*istemp)
+       free (basefile);
+    free (update_dir);
+    free (fullbase);
+}
+
+
+
+static void
+handle_base_checkout (char *args, size_t len)
+{
+    bool istemp = false;
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    call_in_directory (args, client_base_checkout, &istemp);
+}
+
+
+
+static void
+handle_temp_checkout (char *args, size_t len)
+{
+    bool istemp = true;
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    call_in_directory (args, client_base_checkout, &istemp);
+}
+
+
+
+/* Create am up-to-date temporary workfile from a base file.  */
+static void
+client_base_copy (void *data_arg, List *ent_list, const char *short_pathname,
+                 const char *filename)
+{
+    char *rev, *flags;
+    char *basefile;
+    char *temp_filename;
+
+    TRACE (TRACE_FUNCTION, "client_base_copy (%s)", short_pathname);
+
+    read_line (&rev);
+
+    read_line (&flags);
+    if (!validate_change (translate_exists (flags), filename, short_pathname))
+    {
+       /* The Mode, Mod-time, and Checksum responses should not carry
+        * over to a subsequent Created (or whatever) response, even
+        * in the error case.
+        */
+       if (updated_fname)
+       {
+           free (updated_fname);
+           updated_fname = NULL;
+       }
+       if (stored_mode)
+       {
+           free (stored_mode);
+           stored_mode = NULL;
+       }
+       stored_modtime_valid = 0;
+       stored_checksum_valid = 0;
+
+       failure_exit = true;
+       base_copy_error = true;
+       free (rev);
+       free (flags);
+       return;
+    }
+
+    if (temp_checkout1)
+    {
+       if (temp_checkout2)
+           error (1, 0, "Server sent two temp files before a Base-copy.");
+       basefile = temp_checkout1;
+    }
+    else
+       basefile = make_base_file_name (filename, rev);
+
+    temp_filename = newfilename (filename);
+    copy_file (basefile, temp_filename);
+
+    if (flags[0] && flags[1] == 'n')
+       xchmod (temp_filename, false);
+    else
+       xchmod (temp_filename, true);
+
+    /* I think it is ok to assume that if the server is sending base_copy,
+     * then it sent the commands necessary to create the required base file.
+     * If not, then it may be necessary to provide a way to request the base
+     * file be sent.
+     */
+
+    if (temp_checkout1)
+    {
+       temp_checkout1 = NULL;
+       if (CVS_UNLINK (basefile) < 0)
+           error (0, errno, "Failed to remove temp file `%s'", basefile);
+    }
+
+    free (flags);
+    free (temp_filename);
+    free (basefile);
+    free (rev);
+}
+
+
+
+static void
+handle_base_copy (char *args, size_t len)
+{
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    call_in_directory (args, client_base_copy, NULL);
+}
+
+
+
+static void
+client_base_merge (void *data_arg, List *ent_list, const char *short_pathname,
+                  const char *filename)
+{
+    char *f1, *f2;
+    char *temp_filename;
+    int status;
+
+    TRACE (TRACE_FUNCTION, "client_base_merge (%s)", short_pathname);
+
+    read_line (&base_merge_rev1);
+    read_line (&base_merge_rev2);
+
+    if (!really_quiet)
+    {
+       cvs_output ("Merging differences between ", 0);
+       cvs_output (base_merge_rev1, 0);
+       cvs_output (" and ", 5);
+       cvs_output (base_merge_rev2, 0);
+       cvs_output (" into `", 7);
+       cvs_output (short_pathname, 0);
+       cvs_output ("'\n", 2);
+    }
+
+    if (temp_checkout1)
+    {
+       f1 = temp_checkout1;
+       if (temp_checkout2)
+           f2 = temp_checkout2;
+       else
+       {
+           f2 = make_base_file_name (filename, base_merge_rev2);
+           if (!isfile (f2))
+               error (1, 0, "Server sent only one temp file before a merge.");
+       }
+    }
+    else
+    {
+       f1 = make_base_file_name (filename, base_merge_rev1);
+       f2 = make_base_file_name (filename, base_merge_rev2);
+    }
+
+    temp_filename = newfilename (filename);
+
+    force_copy_file (filename, temp_filename);
+    force_xchmod (temp_filename, true);
+
+    status = merge (temp_filename, filename, f1, base_merge_rev1, f2,
+                   base_merge_rev2);
+
+    if (status != 0 && status != 1)
+       error (status == -1, status == -1 ? errno : 0,
+              "could not merge differences between %s & %s of `%s'",
+              base_merge_rev1, base_merge_rev2, short_pathname);
+
+    if (last_merge && !noexec)
+       error (1, 0,
+"protocol error: received two `Base-merge' responses without a `Base-entry'");
+    last_merge = true;
+
+    if (status == 1)
+    {
+       /* The server won't send a response telling the client to update the
+        * entry in noexec mode.  Normally the client delays printing the
+        * "C filename" line until then.
+        */
+       last_merge_conflict = true;
+       if (noexec && !really_quiet)
+       {
+           cvs_output ("C ", 2);
+           cvs_output (short_pathname, 0);
+           cvs_output ("\n", 1);
+       }
+    }
+    else
+    {
+       Node *n;
+
+       if (!xcmp (temp_filename, filename))
+       {
+           if (!quiet)
+           {
+               cvs_output ("`", 1);
+               cvs_output (short_pathname, 0);
+               cvs_output ("' already contains the differences between ", 0);
+               cvs_output (base_merge_rev1, 0);
+               cvs_output (" and ", 5);
+               cvs_output (base_merge_rev2, 0);
+               cvs_output ("\n", 1);
+           }
+           last_merge_no_change = true;
+       }
+
+       /* This next is a separate case because a join could restore the file
+        * to its state at checkout time.
+        */
+       if ((n = findnode_fn (ent_list, filename)))
+       {
+           Entnode *e = n->data;
+           char *basefile = make_base_file_name (filename, e->version);
+           if (isfile (basefile) && !xcmp (basefile, temp_filename))
+               /* The user's file is identical to the base file.
+                * Pretend this merge never happened.
+                */
+               last_merge_made_base = true;
+           free (basefile);
+       }
+    }
+
+    /* In the noexec case, just remove our results.  */
+    if (noexec && CVS_UNLINK (temp_filename) < 0)
+       error (0, errno, "Failed to remove `%s'", temp_filename);
+
+    /* Let update_entries remove our "temporary" base files, since it should
+     * know which one should be kept.
+     */
+
+    if (temp_checkout1)
+    {
+       temp_checkout1 = NULL;
+       if (CVS_UNLINK (f1) < 0)
+           error (0, errno, "Failed to remove temp file `%s'", f1);
+    }
+    if (temp_checkout2)
+    {
+       temp_checkout2 = NULL;
+       if (CVS_UNLINK (f2) < 0)
+           error (0, errno, "Failed to remove temp file `%s'", f2);
+    }
+    free (f1);
+    free (f2);
+}
+
+
+
+static void
+handle_base_merge (char *args, size_t len)
+{
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    call_in_directory (args, client_base_merge, NULL);
+}
+
+
+
+static void
+handle_base_entry (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    dat.contents = UPDATE_ENTRIES_BASE;
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = NULL;
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+handle_base_merged (char *args, size_t len)
+{
+    struct update_entries_data dat;
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    dat.contents = UPDATE_ENTRIES_BASE;
+    dat.existp = UPDATE_ENTRIES_EXISTING_OR_NEW;
+    dat.timestamp = "Result of merge";
+    call_in_directory (args, update_entries, &dat);
+}
+
+
+
+static void
+remove_entry (void *data, List *ent_list, const char *short_pathname,
+              const char *filename)
+{
+    Scratch_Entry (ent_list, filename);
+}
+
+
+
+static void
+handle_remove_entry (char *args, size_t len)
+{
+    call_in_directory (args, remove_entry, NULL);
+}
+
+
+
+static void
+remove_entry_and_file (void *data, List *ent_list, const char *short_pathname,
+                       const char *filename)
+{
+    Scratch_Entry (ent_list, filename);
+    /* Note that we don't ignore existence_error's here.  The server
+       should be sending Remove-entry rather than Removed in cases
+       where the file does not exist.  And if the user removes the
+       file halfway through a cvs command, we should be printing an
+       error.  */
+    if (unlink_file (filename) < 0)
+       error (0, errno, "unable to remove %s", short_pathname);
+}
+
+
+
+static void
+handle_removed (char *args, size_t len)
+{
+    call_in_directory (args, remove_entry_and_file, NULL);
+}
+
+
+
+/* Is this the top level (directory containing CVSROOT)?  */
+static int
+is_cvsroot_level (char *pathname)
+{
+    if (strcmp (toplevel_repos, current_parsed_root->directory))
+       return 0;
+
+    return !strchr (pathname, '/');
+}
+
+
+
+static void
+set_static (void *data, List *ent_list, const char *short_pathname,
+           const char *filename)
+{
+    FILE *fp;
+    fp = xfopen (CVSADM_ENTSTAT, "w+");
+    if (fclose (fp) == EOF)
+        error (1, errno, "cannot close %s", CVSADM_ENTSTAT);
+}
+
+
+
+static void
+handle_set_static_directory (char *args, size_t len)
+{
+    if (!strcmp (cvs_cmd_name, "export"))
+    {
+       /* Swallow the repository.  */
+       read_line (NULL);
+       return;
+    }
+    call_in_directory (args, set_static, NULL);
+}
+
+
+
+static void
+clear_static (void *data, List *ent_list, const char *short_pathname,
+              const char *filename)
+{
+    if (unlink_file (CVSADM_ENTSTAT) < 0 && ! existence_error (errno))
+        error (1, errno, "cannot remove file %s", CVSADM_ENTSTAT);
+}
+
+
+
+static void
+handle_clear_static_directory (char *pathname, size_t len)
+{
+    if (!strcmp (cvs_cmd_name, "export"))
+    {
+       /* Swallow the repository.  */
+       read_line (NULL);
+       return;
+    }
+
+    if (is_cvsroot_level (pathname))
+    {
+        /*
+        * Top level (directory containing CVSROOT).  This seems to normally
+        * lack a CVS directory, so don't try to create files in it.
+        */
+       return;
+    }
+    call_in_directory (pathname, clear_static, NULL);
+}
+
+
+
+static void
+set_sticky (void *data, List *ent_list, const char *short_pathname,
+           const char *filename)
+{
+    char *tagspec;
+    FILE *f;
+
+    read_line (&tagspec);
+
+    /* FIXME-update-dir: error messages should include the directory.  */
+    f = CVS_FOPEN (CVSADM_TAG, "w+");
+    if (!f)
+    {
+       /* Making this non-fatal is a bit of a kludge (see dirs2
+          in testsuite).  A better solution would be to avoid having
+          the server tell us about a directory we shouldn't be doing
+          anything with anyway (e.g. by handling directory
+          addition/removal better).  */
+       error (0, errno, "cannot open %s", CVSADM_TAG);
+       free (tagspec);
+       return;
+    }
+    if (fprintf (f, "%s\n", tagspec) < 0)
+       error (1, errno, "writing %s", CVSADM_TAG);
+    if (fclose (f) == EOF)
+       error (1, errno, "closing %s", CVSADM_TAG);
+    free (tagspec);
+}
+
+
+
+static void
+handle_set_sticky (char *pathname, size_t len)
+{
+    if (!strcmp (cvs_cmd_name, "export"))
+    {
+       /* Swallow the repository.  */
+       read_line (NULL);
+        /* Swallow the tag line.  */
+       read_line (NULL);
+       return;
+    }
+    if (is_cvsroot_level (pathname))
+    {
+        /*
+        * Top level (directory containing CVSROOT).  This seems to normally
+        * lack a CVS directory, so don't try to create files in it.
+        */
+
+       /* Swallow the repository.  */
+       read_line (NULL);
+        /* Swallow the tag line.  */
+       read_line (NULL);
+       return;
+    }
+
+    call_in_directory (pathname, set_sticky, NULL);
+}
+
+
+
+static void
+clear_sticky (void *data, List *ent_list, const char *short_pathname,
+              const char *filename)
+{
+    if (unlink_file (CVSADM_TAG) < 0 && ! existence_error (errno))
+       error (1, errno, "cannot remove %s", CVSADM_TAG);
+}
+
+
+
+static void
+handle_clear_sticky (char *pathname, size_t len)
+{
+    if (!strcmp (cvs_cmd_name, "export"))
+    {
+       /* Swallow the repository.  */
+       read_line (NULL);
+       return;
+    }
+
+    if (is_cvsroot_level (pathname))
+    {
+        /*
+        * Top level (directory containing CVSROOT).  This seems to normally
+        * lack a CVS directory, so don't try to create files in it.
+        */
+       return;
+    }
+
+    call_in_directory (pathname, clear_sticky, NULL);
+}
+
+
+
+/* Handle the client-side support for a successful edit.
+ */
+static void
+handle_edit_file (char *pathname, size_t len)
+{
+    call_in_directory (pathname, edit_file, NULL);
+}
+
+
+
+static void
+template (void *data, List *ent_list, const char *short_pathname,
+         const char *filename)
+{
+    char *buf = Xasprintf ("%s/%s", short_pathname, CVSADM_TEMPLATE);
+    read_counted_file (CVSADM_TEMPLATE, buf);
+    free (buf);
+}
+
+
+
+static void
+handle_template (char *pathname, size_t len)
+{
+    call_in_directory (pathname, template, NULL);
+}
+
+
+
+static void
+clear_template (void *data, List *ent_list, const char *short_pathname,
+                const char *filename)
+{
+    if (unlink_file (CVSADM_TEMPLATE) < 0 && ! existence_error (errno))
+       error (1, errno, "cannot remove %s", CVSADM_TEMPLATE);
+}
+
+
+
+static void
+handle_clear_template (char *pathname, size_t len)
+{
+    call_in_directory (pathname, clear_template, NULL);
+}
+
+
+
+struct save_dir {
+    char *dir;
+    struct save_dir *next;
+};
+
+struct save_dir *prune_candidates;
+
+static void
+add_prune_candidate (const char *dir)
+{
+    struct save_dir *p;
+
+    if ((dir[0] == '.' && dir[1] == '\0')
+       || (prune_candidates && !strcmp (dir, prune_candidates->dir)))
+       return;
+    p = xmalloc (sizeof (struct save_dir));
+    p->dir = xstrdup (dir);
+    p->next = prune_candidates;
+    prune_candidates = p;
+}
+
+
+
+static void
+process_prune_candidates (void)
+{
+    struct save_dir *p;
+    struct save_dir *q;
+
+    if (toplevel_wd)
+    {
+       if (CVS_CHDIR (toplevel_wd) < 0)
+           error (1, errno, "could not chdir to %s", toplevel_wd);
+    }
+    for (p = prune_candidates; p; )
+    {
+       if (isemptydir (p->dir, 1))
+       {
+           char *b;
+
+           if (unlink_file_dir (p->dir) < 0)
+               error (0, errno, "cannot remove %s", p->dir);
+           b = strrchr (p->dir, '/');
+           if (!b)
+               Subdir_Deregister (NULL, NULL, p->dir);
+           else
+           {
+               *b = '\0';
+               Subdir_Deregister (NULL, p->dir, b + 1);
+           }
+       }
+       free (p->dir);
+       q = p->next;
+       free (p);
+       p = q;
+    }
+    prune_candidates = NULL;
+}
+
+
+
+/* Send a Repository line.  */
+static char *last_repos;
+static char *last_update_dir;
+static void
+send_repository (const char *dir, const char *repos, const char *update_dir)
+{
+    char *adm_name;
+
+    /* FIXME: this is probably not the best place to check; I wish I
+     * knew where in here's callers to really trap this bug.  To
+     * reproduce the bug, just do this:
+     * 
+     *       mkdir junk
+     *       cd junk
+     *       cvs -d some_repos update foo
+     *
+     * Poof, CVS seg faults and dies!  It's because it's trying to
+     * send a NULL string to the server but dies in send_to_server.
+     * That string was supposed to be the repository, but it doesn't
+     * get set because there's no CVSADM dir, and somehow it's not
+     * getting set from the -d argument either... ?
+     */
+    if (!repos)
+    {
+        /* Lame error.  I want a real fix but can't stay up to track
+           this down right now. */
+        error (1, 0, "no repository");
+    }
+
+    if (!update_dir || update_dir[0] == '\0')
+       update_dir = ".";
+
+    if (last_repos && !strcmp (repos, last_repos)
+       && last_update_dir && !strcmp (update_dir, last_update_dir))
+       /* We've already sent it.  */
+       return;
+
+    if (client_prune_dirs)
+       add_prune_candidate (update_dir);
+
+    /* Add a directory name to the list of those sent to the
+       server. */
+    if (update_dir && *update_dir != '\0' && strcmp (update_dir, ".")
+       && !findnode (dirs_sent_to_server, update_dir))
+    {
+       Node *n;
+       n = getnode ();
+       n->type = NT_UNKNOWN;
+       n->key = xstrdup (update_dir);
+       n->data = NULL;
+
+       if (addnode (dirs_sent_to_server, n))
+           error (1, 0, "cannot add directory %s to list", n->key);
+    }
+
+    /* 80 is large enough for any of CVSADM_*.  */
+    adm_name = xmalloc (strlen (dir) + 80);
+
+    send_to_server ("Directory ", 0);
+    {
+       /* Send the directory name.  I know that this
+          sort of duplicates code elsewhere, but each
+          case seems slightly different...  */
+       char buf[1];
+       const char *p = update_dir;
+       while (*p != '\0')
+       {
+           assert (*p != '\012');
+           if (ISSLASH (*p))
+           {
+               buf[0] = '/';
+               send_to_server (buf, 1);
+           }
+           else
+           {
+               buf[0] = *p;
+               send_to_server (buf, 1);
+           }
+           ++p;
+       }
+    }
+    send_to_server ("\012", 1);
+    if (supported_request ("Relative-directory"))
+    {
+       const char *short_repos = Short_Repository (repos);
+       send_to_server (short_repos, 0);
+    }
+    else
+       send_to_server (repos, 0);
+    send_to_server ("\012", 1);
+
+    if (supported_request ("Static-directory"))
+    {
+       adm_name[0] = '\0';
+       if (dir[0] != '\0')
+       {
+           strcat (adm_name, dir);
+           strcat (adm_name, "/");
+       }
+       strcat (adm_name, CVSADM_ENTSTAT);
+       if (isreadable (adm_name))
+       {
+           send_to_server ("Static-directory\012", 0);
+       }
+    }
+    if (supported_request ("Sticky"))
+    {
+       FILE *f;
+       if (dir[0] == '\0')
+           strcpy (adm_name, CVSADM_TAG);
+       else
+           sprintf (adm_name, "%s/%s", dir, CVSADM_TAG);
+
+       f = CVS_FOPEN (adm_name, "r");
+       if (!f)
+       {
+           if (! existence_error (errno))
+               error (1, errno, "reading %s", adm_name);
+       }
+       else
+       {
+           char line[80];
+           char *nl = NULL;
+           send_to_server ("Sticky ", 0);
+           while (fgets (line, sizeof (line), f))
+           {
+               send_to_server (line, 0);
+               nl = strchr (line, '\n');
+               if (nl)
+                   break;
+           }
+           if (!nl)
+                send_to_server ("\012", 1);
+           if (fclose (f) == EOF)
+               error (0, errno, "closing %s", adm_name);
+       }
+    }
+    free (adm_name);
+    if (last_repos) free (last_repos);
+    if (last_update_dir) free (last_update_dir);
+    last_repos = xstrdup (repos);
+    last_update_dir = xstrdup (update_dir);
+}
+
+
+
+/* Send a Repository line and set toplevel_repos.  */
+void
+send_a_repository (const char *dir, const char *repository,
+                   const char *update_dir_in)
+{
+    char *update_dir = xstrdup (update_dir_in);
+
+    if (!toplevel_repos && repository)
+    {
+       if (update_dir[0] == '\0'
+           || (update_dir[0] == '.' && update_dir[1] == '\0'))
+           toplevel_repos = xstrdup (repository);
+       else
+       {
+           /*
+            * Get the repository from a CVS/Repository file if update_dir
+            * is absolute.  This is not correct in general, because
+            * the CVS/Repository file might not be the top-level one.
+            * This is for cases like "cvs update /foo/bar" (I'm not
+            * sure it matters what toplevel_repos we get, but it does
+            * matter that we don't hit the "internal error" code below).
+            */
+           if (update_dir[0] == '/')
+               toplevel_repos = Name_Repository (update_dir, update_dir);
+           else
+           {
+               /*
+                * Guess the repository of that directory by looking at a
+                * subdirectory and removing as many pathname components
+                * as are in update_dir.  I think that will always (or at
+                * least almost always) be 1.
+                *
+                * So this deals with directories which have been
+                * renamed, though it doesn't necessarily deal with
+                * directories which have been put inside other
+                * directories (and cvs invoked on the containing
+                * directory).  I'm not sure the latter case needs to
+                * work.
+                *
+                * 21 Aug 1998: Well, Mr. Above-Comment-Writer, it
+                * does need to work after all.  When we are using the
+                * client in a multi-cvsroot environment, it will be
+                * fairly common that we have the above case (e.g.,
+                * cwd checked out from one repository but
+                * subdirectory checked out from another).  We can't
+                * assume that by walking up a directory in our wd we
+                * necessarily walk up a directory in the repository.
+                */
+               /*
+                * This gets toplevel_repos wrong for "cvs update ../foo"
+                * but I'm not sure toplevel_repos matters in that case.
+                */
+
+               int repository_len, update_dir_len;
+
+               strip_trailing_slashes (update_dir);
+
+               repository_len = strlen (repository);
+               update_dir_len = strlen (update_dir);
+
+               /* Try to remove the path components in UPDATE_DIR
+                   from REPOSITORY.  If the path elements don't exist
+                   in REPOSITORY, or the removal of those path
+                   elements mean that we "step above"
+                   current_parsed_root->directory, set toplevel_repos to
+                   current_parsed_root->directory. */
+               if (repository_len > update_dir_len
+                   && !strcmp (repository + repository_len - update_dir_len,
+                               update_dir)
+                   /* TOPLEVEL_REPOS shouldn't be above 
current_parsed_root->directory */
+                   && ((size_t)(repository_len - update_dir_len)
+                       > strlen (current_parsed_root->directory)))
+               {
+                   /* The repository name contains UPDATE_DIR.  Set
+                       toplevel_repos to the repository name without
+                       UPDATE_DIR. */
+
+                   toplevel_repos = xmalloc (repository_len - update_dir_len);
+                   /* Note that we don't copy the trailing '/'.  */
+                   strncpy (toplevel_repos, repository,
+                            repository_len - update_dir_len - 1);
+                   toplevel_repos[repository_len - update_dir_len - 1] = '\0';
+               }
+               else
+               {
+                   toplevel_repos = xstrdup (current_parsed_root->directory);
+               }
+           }
+       }
+    }
+
+    send_repository (dir, repository, update_dir);
+    free (update_dir);
+}
+
+
+
+static void
+notified_a_file (void *data, List *ent_list, const char *short_pathname,
+                 const char *filename)
+{
+    FILE *fp;
+    FILE *newf;
+    size_t line_len = 8192;
+    char *line = xmalloc (line_len);
+    char *cp;
+    int nread;
+    int nwritten;
+    char *p;
+
+    fp = xfopen (CVSADM_NOTIFY, "r");
+    if (getline (&line, &line_len, fp) < 0)
+    {
+       if (feof (fp))
+           error (0, 0, "cannot read %s: end of file", CVSADM_NOTIFY);
+       else
+           error (0, errno, "cannot read %s", CVSADM_NOTIFY);
+       goto error_exit;
+    }
+    cp = strchr (line, '\t');
+    if (!cp)
+    {
+       error (0, 0, "malformed %s file", CVSADM_NOTIFY);
+       goto error_exit;
+    }
+    *cp = '\0';
+    if (strcmp (filename, line + 1))
+       error (0, 0, "protocol error: notified %s, expected %s", filename,
+              line + 1);
+
+    if (getline (&line, &line_len, fp) < 0)
+    {
+       if (feof (fp))
+       {
+           free (line);
+           if (fclose (fp) < 0)
+               error (0, errno, "cannot close %s", CVSADM_NOTIFY);
+           if ( CVS_UNLINK (CVSADM_NOTIFY) < 0)
+               error (0, errno, "cannot remove %s", CVSADM_NOTIFY);
+           return;
+       }
+       else
+       {
+           error (0, errno, "cannot read %s", CVSADM_NOTIFY);
+           goto error_exit;
+       }
+    }
+    newf = xfopen (CVSADM_NOTIFYTMP, "w");
+    if (fputs (line, newf) < 0)
+    {
+       error (0, errno, "cannot write %s", CVSADM_NOTIFYTMP);
+       goto error2;
+    }
+    while ((nread = fread (line, 1, line_len, fp)) > 0)
+    {
+       p = line;
+       while ((nwritten = fwrite (p, sizeof *p, nread, newf)) > 0)
+       {
+           nread -= nwritten;
+           p += nwritten;
+       }
+       if (ferror (newf))
+       {
+           error (0, errno, "cannot write %s", CVSADM_NOTIFYTMP);
+           goto error2;
+       }
+    }
+    if (ferror (fp))
+    {
+       error (0, errno, "cannot read %s", CVSADM_NOTIFY);
+       goto error2;
+    }
+    if (fclose (newf) < 0)
+    {
+       error (0, errno, "cannot close %s", CVSADM_NOTIFYTMP);
+       goto error_exit;
+    }
+    free (line);
+    if (fclose (fp) < 0)
+    {
+       error (0, errno, "cannot close %s", CVSADM_NOTIFY);
+       return;
+    }
+
+    {
+        /* In this case, we want rename_file() to ignore noexec. */
+        int saved_noexec = noexec;
+        noexec = 0;
+        rename_file (CVSADM_NOTIFYTMP, CVSADM_NOTIFY);
+        noexec = saved_noexec;
+    }
+
+    return;
+  error2:
+    (void)fclose (newf);
+  error_exit:
+    free (line);
+    (void)fclose (fp);
+}
+
+
+
+static void
+handle_notified (char *args, size_t len)
+{
+    call_in_directory (args, notified_a_file, NULL);
+}
+
+
+
+/* The "expanded" modules.  */
+static int modules_count;
+static int modules_allocated;
+static char **modules_vector;
+
+static void
+handle_module_expansion (char *args, size_t len)
+{
+    if (!modules_vector)
+    {
+       modules_allocated = 1; /* Small for testing */
+       modules_vector = xnmalloc (modules_allocated,
+                                  sizeof (modules_vector[0]));
+    }
+    else if (modules_count >= modules_allocated)
+    {
+       modules_allocated *= 2;
+       modules_vector = xnrealloc (modules_vector,
+                                   modules_allocated,
+                                   sizeof (modules_vector[0]));
+    }
+    modules_vector[modules_count] = xstrdup (args);
+    ++modules_count;
+}
+
+
+
+/* Original, not "expanded" modules.  */
+static int module_argc;
+static char **module_argv;
+
+void
+client_expand_modules (int argc, char **argv, int local)
+{
+    int errs;
+    int i;
+
+    module_argc = argc;
+    module_argv = xnmalloc (argc + 1, sizeof (module_argv[0]));
+    for (i = 0; i < argc; ++i)
+       module_argv[i] = xstrdup (argv[i]);
+    module_argv[argc] = NULL;
+
+    for (i = 0; i < argc; ++i)
+       send_arg (argv[i]);
+    send_a_repository ("", current_parsed_root->directory, "");
+
+    send_to_server ("expand-modules\012", 0);
+
+    errs = get_server_responses ();
+
+    if (last_repos) free (last_repos);
+    last_repos = NULL;
+
+    if (last_update_dir) free (last_update_dir);
+    last_update_dir = NULL;
+
+    if (errs)
+       error (errs, 0, "cannot expand modules");
+}
+
+
+
+void
+client_send_expansions (int local, char *where, int build_dirs)
+{
+    int i;
+    char *argv[1];
+
+    /* Send the original module names.  The "expanded" module name might
+       not be suitable as an argument to a co request (e.g. it might be
+       the result of a -d argument in the modules file).  It might be
+       cleaner if we genuinely expanded module names, all the way to a
+       local directory and repository, but that isn't the way it works
+       now.  */
+    send_file_names (module_argc, module_argv, 0);
+
+    for (i = 0; i < modules_count; ++i)
+    {
+       argv[0] = where ? where : modules_vector[i];
+       if (isfile (argv[0]))
+           send_files (1, argv, local, 0, build_dirs ? SEND_BUILD_DIRS : 0);
+    }
+    send_a_repository ("", current_parsed_root->directory, "");
+}
+
+
+
+void
+client_nonexpanded_setup (void)
+{
+    send_a_repository ("", current_parsed_root->directory, "");
+}
+
+
+
+/* Receive a cvswrappers line from the server; it must be a line
+   containing an RCS option (e.g., "*.exe   -k 'b'").
+
+   Note that this doesn't try to handle -t/-f options (which are a
+   whole separate issue which noone has thought much about, as far
+   as I know).
+
+   We need to know the keyword expansion mode so we know whether to
+   read the file in text or binary mode.  */
+static void
+handle_wrapper_rcs_option (char *args, size_t len)
+{
+    char *p;
+
+    /* Enforce the notes in cvsclient.texi about how the response is not
+       as free-form as it looks.  */
+    p = strchr (args, ' ');
+    if (!p)
+       goto handle_error;
+    if (*++p != '-'
+       || *++p != 'k'
+       || *++p != ' '
+       || *++p != '\'')
+       goto handle_error;
+    if (!strchr (p, '\''))
+       goto handle_error;
+
+    /* Add server-side cvswrappers line to our wrapper list. */
+    wrap_add (args, 0);
+    return;
+ handle_error:
+    error (0, errno, "protocol error: ignoring invalid wrappers %s", args);
+}
+
+
+
+
+static void
+handle_m (char *args, size_t len)
+{
+    /* In the case where stdout and stderr point to the same place,
+       fflushing stderr will make output happen in the correct order.
+       Often stderr will be line-buffered and this won't be needed,
+       but not always (is that true?  I think the comment is probably
+       based on being confused between default buffering between
+       stdout and stderr.  But I'm not sure).  */
+    fflush (stderr);
+    fwrite (args, sizeof *args, len, stdout);
+    putc ('\n', stdout);
+}
+
+
+
+static void
+handle_mbinary (char *args, size_t len)
+{
+    char *size_string;
+    size_t size;
+    size_t totalread;
+    size_t nread;
+    size_t toread;
+    char buf[8192];
+
+    /* See comment at handle_m about (non)flush of stderr.  */
+
+    /* Get the size.  */
+    read_line (&size_string);
+    size = atoi (size_string);
+    free (size_string);
+
+    /* OK, now get all the data.  The algorithm here is that we read
+       as much as the network wants to give us in
+       try_read_from_server, and then we output it all, and then
+       repeat, until we get all the data.  */
+    totalread = 0;
+    while (totalread < size)
+    {
+       toread = size - totalread;
+       if (toread > sizeof buf)
+           toread = sizeof buf;
+
+       nread = try_read_from_server (buf, toread);
+       cvs_output_binary (buf, nread);
+       totalread += nread;
+    }
+}
+
+
+
+static void
+handle_e (char *args, size_t len)
+{
+    /* In the case where stdout and stderr point to the same place,
+       fflushing stdout will make output happen in the correct order.  */
+    fflush (stdout);
+    fwrite (args, sizeof *args, len, stderr);
+    putc ('\n', stderr);
+}
+
+
+
+/*ARGSUSED*/
+static void
+handle_f  (char *args, size_t len)
+{
+    fflush (stderr);
+}
+
+
+
+static void
+handle_mt (char *args, size_t len)
+{
+    char *p;
+    char *tag = args;
+    char *text;
+
+    /* See comment at handle_m for more details.  */
+    fflush (stderr);
+
+    p = strchr (args, ' ');
+    if (!p)
+       text = NULL;
+    else
+    {
+       *p++ = '\0';
+       text = p;
+    }
+
+    switch (tag[0])
+    {
+       case '+':
+           if (!strcmp (tag, "+updated"))
+               updated_seen = 1;
+           else if (!strcmp (tag, "+importmergecmd"))
+               importmergecmd.seen = 1;
+           break;
+       case '-':
+           if (!strcmp (tag, "-updated"))
+               updated_seen = 0;
+           else if (!strcmp (tag, "-importmergecmd"))
+           {
+               char buf[80];
+
+               /* Now that we have gathered the information, we can
+                   output the suggested merge command.  */
+
+               if (importmergecmd.conflicts == 0
+                   || !importmergecmd.mergetag1
+                   || !importmergecmd.mergetag2
+                   || !importmergecmd.repository)
+               {
+                   error (0, 0,
+                          "invalid server: incomplete importmergecmd tags");
+                   break;
+               }
+
+               if (importmergecmd.conflicts == -1)
+                   sprintf (buf, "\nNo conflicts created by this import.\n");
+               else
+                   sprintf (buf, "\n%d conflicts created by this import.\n",
+                            importmergecmd.conflicts);
+               cvs_output (buf, 0);
+               cvs_output ("Use the following command to help the merge:\n\n",
+                           0);
+               cvs_output ("\t", 1);
+               cvs_output (program_name, 0);
+               if (CVSroot_cmdline)
+               {
+                   cvs_output (" -d ", 0);
+                   cvs_output (CVSroot_cmdline, 0);
+               }
+               cvs_output (" checkout -j", 0);
+               cvs_output (importmergecmd.mergetag1, 0);
+               cvs_output (" -j", 0);
+               cvs_output (importmergecmd.mergetag2, 0);
+               cvs_output (" ", 1);
+               cvs_output (importmergecmd.repository, 0);
+               cvs_output ("\n\n", 0);
+
+               /* Clear the static variables so that everything is
+                   ready for any subsequent importmergecmd tag.  */
+               importmergecmd.conflicts = 0;
+               free (importmergecmd.mergetag1);
+               importmergecmd.mergetag1 = NULL;
+               free (importmergecmd.mergetag2);
+               importmergecmd.mergetag2 = NULL;
+               free (importmergecmd.repository);
+               importmergecmd.repository = NULL;
+
+               importmergecmd.seen = 0;
+           }
+           break;
+       default:
+           if (updated_seen)
+           {
+               if (!strcmp (tag, "fname"))
+               {
+                   if (updated_fname)
+                   {
+                       /* Output the previous message now.  This can happen
+                          if there was no Update-existing or other such
+                          response, due to the -n global option.  */
+                       cvs_output ("U ", 0);
+                       cvs_output (updated_fname, 0);
+                       cvs_output ("\n", 1);
+                       free (updated_fname);
+                   }
+                   updated_fname = xstrdup (text);
+               }
+               /* Swallow all other tags.  Either they are extraneous
+                  or they reflect future extensions that we can
+                  safely ignore.  */
+           }
+           else if (importmergecmd.seen)
+           {
+               if (!strcmp (tag, "conflicts"))
+               {
+                   if (!strcmp (text, "No"))
+                       importmergecmd.conflicts = -1;
+                   else
+                       importmergecmd.conflicts = atoi (text);
+               }
+               else if (!strcmp (tag, "mergetag1"))
+                   importmergecmd.mergetag1 = xstrdup (text);
+               else if (!strcmp (tag, "mergetag2"))
+                   importmergecmd.mergetag2 = xstrdup (text);
+               else if (!strcmp (tag, "repository"))
+                   importmergecmd.repository = xstrdup (text);
+               /* Swallow all other tags.  Either they are text for
+                   which we are going to print our own version when we
+                   see -importmergecmd, or they are future extensions
+                   we can safely ignore.  */
+           }
+           else if (!strcmp (tag, "newline"))
+               printf ("\n");
+           else if (!strcmp (tag, "date"))
+           {
+               char *date = format_date_alloc (text);
+               printf ("%s", date);
+               free (date);
+           }
+           else if (text)
+               printf ("%s", text);
+    }
+}
+
+
+
+#endif /* CLIENT_SUPPORT */
+#if defined(CLIENT_SUPPORT) || defined(SERVER_SUPPORT)
+
+/* This table must be writeable if the server code is included.  */
+struct response responses[] =
+{
+#ifdef CLIENT_SUPPORT
+#define RSP_LINE(n, f, t, s) {n, f, t, s}
+#else /* ! CLIENT_SUPPORT */
+#define RSP_LINE(n, f, t, s) {n, s}
+#endif /* CLIENT_SUPPORT */
+
+    RSP_LINE("ok", handle_ok, response_type_ok, rs_essential),
+    RSP_LINE("error", handle_error, response_type_error, rs_essential),
+    RSP_LINE("Valid-requests", handle_valid_requests, response_type_normal,
+       rs_essential),
+    RSP_LINE("Force-gzip", handle_force_gzip, response_type_normal,
+       rs_optional),
+    RSP_LINE("Referrer", handle_referrer, response_type_normal, rs_optional),
+    RSP_LINE("Redirect", handle_redirect, response_type_redirect, rs_optional),
+    RSP_LINE("Checked-in", handle_checked_in, response_type_normal,
+       rs_essential),
+    RSP_LINE("New-entry", handle_new_entry, response_type_normal, rs_optional),
+    RSP_LINE("Checksum", handle_checksum, response_type_normal, rs_optional),
+    RSP_LINE("Copy-file", handle_copy_file, response_type_normal, rs_optional),
+    RSP_LINE("Updated", handle_updated, response_type_normal, rs_essential),
+    RSP_LINE("Created", handle_created, response_type_normal, rs_optional),
+    RSP_LINE("Update-existing", handle_update_existing, response_type_normal,
+       rs_optional),
+    RSP_LINE("Merged", handle_merged, response_type_normal, rs_essential),
+    RSP_LINE("Patched", handle_patched, response_type_normal, rs_optional),
+    RSP_LINE("Rcs-diff", handle_rcs_diff, response_type_normal, rs_optional),
+    RSP_LINE("Mode", handle_mode, response_type_normal, rs_optional),
+    RSP_LINE("Mod-time", handle_mod_time, response_type_normal, rs_optional),
+    RSP_LINE("Removed", handle_removed, response_type_normal, rs_essential),
+    RSP_LINE("Remove-entry", handle_remove_entry, response_type_normal,
+       rs_optional),
+    RSP_LINE("Set-static-directory", handle_set_static_directory,
+       response_type_normal,
+       rs_optional),
+    RSP_LINE("Clear-static-directory", handle_clear_static_directory,
+       response_type_normal,
+       rs_optional),
+    RSP_LINE("Set-sticky", handle_set_sticky, response_type_normal,
+       rs_optional),
+    RSP_LINE("Clear-sticky", handle_clear_sticky, response_type_normal,
+       rs_optional),
+    RSP_LINE("Edit-file", handle_edit_file, response_type_normal,
+       rs_optional),
+    RSP_LINE("Template", handle_template, response_type_normal,
+       rs_optional),
+    RSP_LINE("Clear-template", handle_clear_template, response_type_normal,
+       rs_optional),
+    RSP_LINE("Notified", handle_notified, response_type_normal, rs_optional),
+    RSP_LINE("Module-expansion", handle_module_expansion, response_type_normal,
+       rs_optional),
+    RSP_LINE("Wrapper-rcsOption", handle_wrapper_rcs_option,
+       response_type_normal,
+       rs_optional),
+    RSP_LINE("M", handle_m, response_type_normal, rs_essential),
+    RSP_LINE("Mbinary", handle_mbinary, response_type_normal, rs_optional),
+    RSP_LINE("E", handle_e, response_type_normal, rs_essential),
+    RSP_LINE("F", handle_f, response_type_normal, rs_optional),
+    RSP_LINE("MT", handle_mt, response_type_normal, rs_optional),
+
+    /* The server makes the assumption that if the client handles one of the
+     * Base-* responses, then it will handle all of them.
+     */
+    RSP_LINE("Base-checkout", handle_base_checkout, response_type_normal,
+            rs_optional),
+    RSP_LINE("Temp-checkout", handle_temp_checkout, response_type_normal,
+            rs_optional),
+    RSP_LINE("Base-copy", handle_base_copy, response_type_normal,
+            rs_optional),
+    RSP_LINE("Base-merge", handle_base_merge, response_type_normal,
+            rs_optional),
+    RSP_LINE("Base-entry", handle_base_entry, response_type_normal,
+            rs_optional),
+    RSP_LINE("Base-merged", handle_base_merged, response_type_normal,
+            rs_optional),
+
+    RSP_LINE("OpenPGP-signatures", handle_openpgp_signatures,
+            response_type_normal, rs_optional),
+
+    /* Possibly should be response_type_error.  */
+    RSP_LINE(NULL, NULL, response_type_normal, rs_essential)
+
+#undef RSP_LINE
+};
+
+#endif /* CLIENT_SUPPORT or SERVER_SUPPORT */
+#ifdef CLIENT_SUPPORT
+
+
+
+/* 
+ * If LEN is 0, then send_to_server_via() computes string's length itself.
+ *
+ * Therefore, pass the real length when transmitting data that might
+ * contain 0's.
+ */
+void
+send_to_server_via (struct buffer *via_buffer, const char *str, size_t len)
+{
+    static int nbytes;
+
+    if (len == 0)
+       len = strlen (str);
+
+    buf_output (via_buffer, str, len);
+      
+    /* There is no reason not to send data to the server, so do it
+       whenever we've accumulated enough information in the buffer to
+       make it worth sending.  */
+    nbytes += len;
+    if (nbytes >= 2 * BUFFER_DATA_SIZE)
+    {
+       int status;
+
+        status = buf_send_output (via_buffer);
+       if (status != 0)
+           error (1, status, "error writing to server");
+       nbytes = 0;
+    }
+}
+
+
+
+void
+send_to_server (const char *str, size_t len)
+{
+  send_to_server_via (global_to_server, str, len);
+}
+
+
+
+/* Read up to LEN bytes from the server.  Returns actual number of
+   bytes read, which will always be at least one; blocks if there is
+   no data available at all.  Gives a fatal error on EOF or error.  */
+static size_t
+try_read_from_server( char *buf, size_t len )
+{
+    int status;
+    size_t nread;
+    char *data;
+
+    status = buf_read_data (global_from_server, len, &data, &nread);
+    if (status != 0)
+    {
+       if (status == -1)
+           error (1, 0,
+                  "end of file from server (consult above messages if any)");
+       else if (status == -2)
+           error (1, 0, "out of memory");
+       else
+           error (1, status, "reading from server");
+    }
+
+    memcpy (buf, data, nread);
+
+    return nread;
+}
+
+
+
+/*
+ * Read LEN bytes from the server or die trying.
+ */
+void
+read_from_server (char *buf, size_t len)
+{
+    size_t red = 0;
+    while (red < len)
+    {
+       red += try_read_from_server (buf + red, len - red);
+       if (red == len)
+           break;
+    }
+}
+
+
+
+/* Get some server responses and process them.
+ *
+ * RETURNS
+ *   0         Success
+ *   1         Error
+ *   2         Redirect
+ */
+int
+get_server_responses (void)
+{
+    struct response *rs;
+    do
+    {
+       char *cmd;
+       size_t len;
+       
+       len = read_line (&cmd);
+       for (rs = responses; rs->name; ++rs)
+           if (!strncmp (cmd, rs->name, strlen (rs->name)))
+           {
+               size_t cmdlen = strlen (rs->name);
+               if (cmd[cmdlen] == '\0')
+                   ;
+               else if (cmd[cmdlen] == ' ')
+                   ++cmdlen;
+               else
+                   /*
+                    * The first len characters match, but it's a different
+                    * response.  e.g. the response is "oklahoma" but we
+                    * matched "ok".
+                    */
+                   continue;
+               (*rs->func) (cmd + cmdlen, len - cmdlen);
+               break;
+           }
+       if (!rs->name)
+           /* It's OK to print just to the first '\0'.  */
+           /* We might want to handle control characters and the like
+              in some other way other than just sending them to stdout.
+              One common reason for this error is if people use :ext:
+              with a version of rsh which is doing CRLF translation or
+              something, and so the client gets "ok^M" instead of "ok".
+              Right now that will tend to print part of this error
+              message over the other part of it.  It seems like we could
+              do better (either in general, by quoting or omitting all
+              control characters, and/or specifically, by detecting the CRLF
+              case and printing a specific error message).  */
+           error (0, 0,
+                  "warning: unrecognized response `%s' from cvs server",
+                  cmd);
+       free (cmd);
+    } while (rs->type == response_type_normal);
+
+    if (updated_fname)
+    {
+       /* Output the previous message now.  This can happen
+          if there was no Update-existing or other such
+          response, due to the -n global option.  */
+       cvs_output ("U ", 0);
+       cvs_output (updated_fname, 0);
+       cvs_output ("\n", 1);
+       free (updated_fname);
+       updated_fname = NULL;
+    }
+
+    if (rs->type == response_type_redirect) return 2;
+    if (rs->type == response_type_error) return 1;
+    if (failure_exit) return 1;
+    return 0;
+}
+
+
+
+static inline void
+close_connection_to_server (struct buffer **to, struct buffer **from)
+{
+    int status;
+
+    /* First we shut down GLOBAL_TO_SERVER.  That tells the server that its
+     * input is finished.  It then shuts down the buffer it is sending to us,
+     * at which point our shut down of GLOBAL_FROM_SERVER will complete.
+     */
+
+    TRACE (TRACE_FUNCTION, "close_connection_to_server ()");
+
+    status = buf_shutdown (*to);
+    if (status != 0)
+       error (0, status, "shutting down buffer to server");
+    buf_free (*to);
+    *to = NULL;
+
+    status = buf_shutdown (*from);
+    if (status != 0)
+       error (0, status, "shutting down buffer from server");
+    buf_free (*from);
+    *from = NULL;
+}
+
+
+
+/* Get the responses and then close the connection.  */
+
+/*
+ * Flag var; we'll set it in start_server() and not one of its
+ * callees, such as start_rsh_server().  This means that there might
+ * be a small window between the starting of the server and the
+ * setting of this var, but all the code in that window shouldn't care
+ * because it's busy checking return values to see if the server got
+ * started successfully anyway.
+ */
+int server_started = 0;
+
+int
+get_responses_and_close (void)
+{
+    int errs = get_server_responses ();
+
+    /* The following is necessary when working with multiple cvsroots, at least
+     * with commit.  It used to be buried nicely in do_deferred_progs() before
+     * that function was removed.  I suspect it wouldn't be necessary if
+     * call_in_directory() saved its working directory via save_cwd() before
+     * changing its directory and restored the saved working directory via
+     * restore_cwd() before exiting.  Of course, calling CVS_CHDIR only once,
+     * here, may be more efficient.
+     */
+    if (toplevel_wd)
+    {
+       if (CVS_CHDIR (toplevel_wd) < 0)
+           error (1, errno, "could not chdir to %s", toplevel_wd);
+    }
+
+    if (client_prune_dirs)
+       process_prune_candidates ();
+
+    close_connection_to_server (&global_to_server, &global_from_server);
+    server_started = 0;
+
+    /* see if we need to sleep before returning to avoid time-stamp races */
+    if (last_register_time)
+       sleep_past (last_register_time);
+
+    return errs;
+}
+
+
+
+bool
+supported_request (const char *name)
+{
+    struct request *rq;
+
+    for (rq = requests; rq->name; rq++)
+       if (!strcmp (rq->name, name))
+           return (rq->flags & RQ_SUPPORTED) != 0;
+    error (1, 0, "internal error: testing support for unknown request?");
+    /* NOTREACHED */
+    return 0;
+}
+
+
+
+#if defined (AUTH_CLIENT_SUPPORT) || defined (SERVER_SUPPORT) || defined 
(HAVE_KERBEROS) || defined (HAVE_GSSAPI)
+
+
+/* Generic function to do port number lookup tasks.
+ *
+ * In order of precedence, will return:
+ *     getenv (envname), if defined
+ *     getservbyname (portname), if defined
+ *     defaultport
+ */
+static int
+get_port_number (const char *envname, const char *portname, int defaultport)
+{
+    struct servent *s;
+    char *port_s;
+
+    if (envname && (port_s = getenv (envname)))
+    {
+       int port = atoi (port_s);
+       if (port <= 0)
+       {
+           error (0, 0, "%s must be a positive integer!  If you", envname);
+           error (0, 0, "are trying to force a connection via rsh, please");
+           error (0, 0, "put \":server:\" at the beginning of your CVSROOT");
+           error (1, 0, "variable.");
+       }
+       return port;
+    }
+    else if (portname && (s = getservbyname (portname, "tcp")))
+       return ntohs (s->s_port);
+    else
+       return defaultport;
+}
+
+
+
+/* get the port number for a client to connect to based on the port
+ * and method of a cvsroot_t.
+ *
+ * we do this here instead of in parse_cvsroot so that we can keep network
+ * code confined to a localized area and also to delay the lookup until the
+ * last possible moment so it remains possible to run cvs client commands that
+ * skip opening connections to the server (i.e. skip network operations
+ * entirely)
+ *
+ * and yes, I know none of the commands do that now, but here's to planning
+ * for the future, eh?  cheers.
+ */
+int
+get_cvs_port_number (const cvsroot_t *root)
+{
+
+    if (root->port) return root->port;
+
+    switch (root->method)
+    {
+# ifdef HAVE_GSSAPI
+       case gserver_method:
+# endif /* HAVE_GSSAPI */
+# ifdef AUTH_CLIENT_SUPPORT
+       case pserver_method:
+# endif /* AUTH_CLIENT_SUPPORT */
+# if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI)
+           return get_port_number ("CVS_CLIENT_PORT", "cvspserver",
+                                    CVS_AUTH_PORT);
+# endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */
+# ifdef HAVE_KERBEROS
+       case kserver_method:
+           return get_port_number ("CVS_CLIENT_PORT", "cvs", CVS_PORT);
+# endif /* HAVE_KERBEROS */
+       default:
+           error(1, EINVAL,
+"internal error: get_cvs_port_number called for invalid connection method 
(%s)",
+                 method_names[root->method]);
+           break;
+    }
+    /* NOTREACHED */
+    return -1;
+}
+
+
+
+/* get the port number for a client to connect to based on the proxy port
+ * of a cvsroot_t.
+ */
+static int
+get_proxy_port_number (const cvsroot_t *root)
+{
+
+    if (root->proxy_port) return root->proxy_port;
+
+    return get_port_number ("CVS_PROXY_PORT", NULL, CVS_PROXY_PORT);
+}
+
+
+
+void
+make_bufs_from_fds(int tofd, int fromfd, int child_pid, cvsroot_t *root,
+                   struct buffer **to_server_p,
+                   struct buffer **from_server_p, int is_sock)
+{
+# ifdef NO_SOCKET_TO_FD
+    if (is_sock)
+    {
+       assert (tofd == fromfd);
+       *to_server_p = socket_buffer_initialize (tofd, 0, NULL);
+       *from_server_p = socket_buffer_initialize (tofd, 1, NULL);
+    }
+    else
+# endif /* NO_SOCKET_TO_FD */
+    {
+       /* todo: some OS's don't need these calls... */
+       close_on_exec (tofd);
+       close_on_exec (fromfd);
+
+       /* SCO 3 and AIX have a nasty bug in the I/O libraries which precludes
+          fdopening the same file descriptor twice, so dup it if it is the
+          same.  */
+       if (tofd == fromfd)
+       {
+           fromfd = dup (tofd);
+           if (fromfd < 0)
+               error (1, errno, "cannot dup net connection");
+       }
+
+       /* These will use binary mode on systems which have it.  */
+       /*
+        * Also, we know that from_server is shut down second, so we pass
+        * child_pid in there.  In theory, it should be stored in both
+        * buffers with a ref count...
+        */
+       *to_server_p = fd_buffer_initialize (tofd, 0, root, false, NULL);
+       *from_server_p = fd_buffer_initialize (fromfd, child_pid, root,
+                                               true, NULL);
+    }
+}
+#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (SERVER_SUPPORT) || defined 
(HAVE_KERBEROS) || defined(HAVE_GSSAPI) */
+
+
+
+#if defined (AUTH_CLIENT_SUPPORT) || defined(HAVE_GSSAPI)
+/* Connect to the authenticating server.
+
+   If VERIFY_ONLY is non-zero, then just verify that the password is
+   correct and then shutdown the connection.
+
+   If VERIFY_ONLY is 0, then really connect to the server.
+
+   If DO_GSSAPI is non-zero, then we use GSSAPI authentication rather
+   than the pserver password authentication.
+
+   If we fail to connect or if access is denied, then die with fatal
+   error.  */
+void
+connect_to_pserver (cvsroot_t *root, struct buffer **to_server_p,
+                    struct buffer **from_server_p, int verify_only,
+                    int do_gssapi)
+{
+    int sock;
+    int port_number,
+       proxy_port_number = 0; /* Initialize to silence -Wall.  Dumb.  */
+    union sai {
+       struct sockaddr_in addr_in;
+       struct sockaddr addr;
+    } client_sai;
+    struct hostent *hostinfo;
+    struct buffer *to_server, *from_server;
+
+    sock = socket (AF_INET, SOCK_STREAM, 0);
+    if (sock == -1)
+       error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
+    port_number = get_cvs_port_number (root);
+
+    /* if we have a proxy connect to that instead */
+    if (root->proxy_hostname)
+    {
+        proxy_port_number = get_proxy_port_number (root);
+       hostinfo = init_sockaddr (&client_sai.addr_in, root->proxy_hostname,
+                                  proxy_port_number);
+        TRACE (TRACE_FUNCTION, "Connecting to %s:%d via proxy %s(%s):%d.",
+               root->hostname, port_number, root->proxy_hostname,
+               inet_ntoa (client_sai.addr_in.sin_addr), proxy_port_number);
+    }
+    else
+    {
+       hostinfo = init_sockaddr (&client_sai.addr_in, root->hostname,
+                                 port_number);
+        TRACE (TRACE_FUNCTION, "Connecting to %s(%s):%d.",
+               root->hostname,
+               inet_ntoa (client_sai.addr_in.sin_addr), port_number);
+    }
+
+    if (connect (sock, &client_sai.addr, sizeof (client_sai))
+       < 0)
+       error (1, 0, "connect to %s(%s):%d failed: %s",
+              root->proxy_hostname ? root->proxy_hostname : root->hostname,
+              inet_ntoa (client_sai.addr_in.sin_addr),
+              root->proxy_hostname ? proxy_port_number : port_number,
+               SOCK_STRERROR (SOCK_ERRNO));
+
+    make_bufs_from_fds (sock, sock, 0, root, &to_server, &from_server, 1);
+
+    /* if we have proxy then connect to the proxy first */
+    if (root->proxy_hostname)
+    {
+#define CONNECT_STRING "CONNECT %s:%d HTTP/1.0\r\n\r\n"
+       /* Send a "CONNECT" command to proxy: */
+       char* read_buf;
+       int codenum;
+       size_t count;
+       /* 4 characters for port covered by the length of %s & %d */
+       char* write_buf = Xasnprintf (NULL, &count, CONNECT_STRING,
+                                      root->hostname, port_number);
+       send_to_server_via (to_server, write_buf, count);
+
+       /* Wait for HTTP status code, bail out if you don't get back a 2xx
+         * code.
+         */
+       read_line_via (from_server, to_server, &read_buf);
+       sscanf (read_buf, "%s %d", write_buf, &codenum);
+
+       if ((codenum / 100) != 2)
+           error (1, 0, "proxy server %s:%d does not support http tunnelling",
+                  root->proxy_hostname, proxy_port_number);
+       free (read_buf);
+       free (write_buf);
+
+       /* Skip through remaining part of MIME header, recv_line
+           consumes the trailing \n */
+       while (read_line_via (from_server, to_server, &read_buf) > 0)
+       {
+           if (read_buf[0] == '\r' || read_buf[0] == 0)
+           {
+               free (read_buf);
+               break;
+           }
+           free (read_buf);
+       }
+    }
+
+    auth_server (root, to_server, from_server, verify_only, do_gssapi,
+                 hostinfo);
+
+    if (verify_only)
+    {
+       int status;
+
+       status = buf_shutdown (to_server);
+       if (status != 0)
+           error (0, status, "shutting down buffer to server");
+       buf_free (to_server);
+       to_server = NULL;
+
+       status = buf_shutdown (from_server);
+       if (status != 0)
+           error (0, status, "shutting down buffer from server");
+       buf_free (from_server);
+       from_server = NULL;
+
+       /* Don't need to set server_started = 0 since we don't set it to 1
+        * until returning from this call.
+        */
+    }
+    else
+    {
+       *to_server_p = to_server;
+       *from_server_p = from_server;
+    }
+
+    return;
+}
+
+
+
+static void
+auth_server (cvsroot_t *root, struct buffer *to_server,
+             struct buffer *from_server, int verify_only, int do_gssapi,
+             struct hostent *hostinfo)
+{
+    char *username = NULL;             /* the username we use to connect */
+    char no_passwd = 0;                        /* gets set if no password 
found */
+
+    /* Run the authorization mini-protocol before anything else. */
+    if (do_gssapi)
+    {
+# ifdef HAVE_GSSAPI
+       int fd = buf_get_fd (to_server);
+       struct stat s;
+
+       if ((fd < 0) || (fstat (fd, &s) < 0) || !S_ISSOCK(s.st_mode))
+       {
+           error (1, 0,
+                   "gserver currently only enabled for socket connections");
+       }
+
+       if (! connect_to_gserver (root, fd, hostinfo))
+       {
+           error (1, 0,
+                   "authorization failed: server %s rejected access to %s",
+                   root->hostname, root->directory);
+       }
+# else /* ! HAVE_GSSAPI */
+       error (1, 0,
+"INTERNAL ERROR: This client does not support GSSAPI authentication");
+# endif /* HAVE_GSSAPI */
+    }
+    else /* ! do_gssapi */
+    {
+# ifdef AUTH_CLIENT_SUPPORT
+       char *begin      = NULL;
+       char *password   = NULL;
+       char *end        = NULL;
+       
+       if (verify_only)
+       {
+           begin = "BEGIN VERIFICATION REQUEST";
+           end   = "END VERIFICATION REQUEST";
+       }
+       else
+       {
+           begin = "BEGIN AUTH REQUEST";
+           end   = "END AUTH REQUEST";
+       }
+
+       /* Get the password, probably from ~/.cvspass. */
+       password = get_cvs_password ();
+       username = root->username ? root->username : getcaller();
+
+       /* Send the empty string by default.  This is so anonymous CVS
+          access doesn't require client to have done "cvs login". */
+       if (!password) 
+       {
+           no_passwd = 1;
+           password = scramble ("");
+       }
+
+       /* Announce that we're starting the authorization protocol. */
+       send_to_server_via(to_server, begin, 0);
+       send_to_server_via(to_server, "\012", 1);
+
+       /* Send the data the server needs. */
+       send_to_server_via(to_server, root->directory, 0);
+       send_to_server_via(to_server, "\012", 1);
+       send_to_server_via(to_server, username, 0);
+       send_to_server_via(to_server, "\012", 1);
+       send_to_server_via(to_server, password, 0);
+       send_to_server_via(to_server, "\012", 1);
+
+       /* Announce that we're ending the authorization protocol. */
+       send_to_server_via(to_server, end, 0);
+       send_to_server_via(to_server, "\012", 1);
+
+        /* Paranoia. */
+        memset (password, 0, strlen (password));
+# else /* ! AUTH_CLIENT_SUPPORT */
+       error (1, 0, "INTERNAL ERROR: This client does not support pserver 
authentication");
+# endif /* AUTH_CLIENT_SUPPORT */
+    } /* if (do_gssapi) */
+
+    {
+       char *read_buf;
+
+       /* Loop, getting responses from the server.  */
+       while (1)
+       {
+           read_line_via (from_server, to_server, &read_buf);
+
+           if (!strcmp (read_buf, "I HATE YOU"))
+           {
+               /* Authorization not granted.
+                *
+                * This is a little confusing since we can reach this while
+                * loop in GSSAPI mode, but if GSSAPI authentication failed,
+                * we already jumped to the rejected label (there is no case
+                * where the connect_to_gserver function can return 1 and we
+                * will not receive "I LOVE YOU" from the server, barring
+                * broken connections and garbled messages, of course).  The
+                * GSSAPI case is also the case where username can be NULL
+                * since username is initialized in the !gssapi section.
+                *
+                * i.e. This is a pserver specific error message and should be
+                * since GSSAPI doesn't use username.
+                */
+               error (0, 0,
+"authorization failed: server %s rejected access to %s for user %s",
+                      root->hostname, root->directory,
+                      username ? username : "(null)");
+
+               /* Output a special error message if authentication was 
attempted
+               with no password -- the user should be made aware that they may
+               have missed a step. */
+               if (no_passwd)
+               {
+                   error (0, 0,
+"used empty password; try \"cvs login\" with a real password");
+               }
+               exit (EXIT_FAILURE);
+           }
+           else if (!strncmp (read_buf, "E ", 2))
+           {
+               fprintf (stderr, "%s\n", read_buf + 2);
+
+               /* Continue with the authentication protocol.  */
+           }
+           else if (!strncmp (read_buf, "error ", 6))
+           {
+               char *p;
+
+               /* First skip the code.  */
+               p = read_buf + 6;
+               while (*p != ' ' && *p != '\0')
+                   ++p;
+
+               /* Skip the space that follows the code.  */
+               if (*p == ' ')
+                   ++p;
+
+               /* Now output the text.  */
+               fprintf (stderr, "%s\n", p);
+               exit (EXIT_FAILURE);
+           }
+           else if (!strcmp (read_buf, "I LOVE YOU"))
+           {
+               free (read_buf);
+               break;
+           }
+           else
+           {
+               error (1, 0, 
+                      "unrecognized auth response from %s: %s", 
+                      root->hostname, read_buf);
+           }
+           free (read_buf);
+       }
+    }
+}
+#endif /* defined (AUTH_CLIENT_SUPPORT) || defined(HAVE_GSSAPI) */
+
+
+
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+/* 
+ * Connect to a forked server process.
+ */
+static void
+connect_to_forked_server (cvsroot_t *root, struct buffer **to_server_p,
+                          struct buffer **from_server_p)
+{
+    int tofd, fromfd;
+    int child_pid;
+
+    /* This is pretty simple.  All we need to do is choose the correct
+       cvs binary and call piped_child. */
+
+     char *command[3];
+
+    command[0] = (root->cvs_server
+                 ? root->cvs_server : getenv ("CVS_SERVER"));
+    if (!command[0])
+# ifdef SERVER_SUPPORT
+        /* FIXME:
+         * I'm casting out the const below because I know that piped_child, the
+         * only function we pass COMMAND to, accepts COMMAND as a
+         * (char *const *) and won't alter it, and we don't alter it in this
+         * function.  This is yucky, there should be a way to declare COMMAND
+         * such that this casting isn't needed, but I don't know how.  If I
+         * declare it as (const char *command[]), the compiler complains about
+         * an incompatible arg 1 being passed to piped_child and if I declare
+         * it as (char *const command[3]), then the compiler complains when I
+         * assign values to command[i].
+         */
+       command[0] = (char *)program_path;
+# else /* SERVER_SUPPORT */
+    {
+       error( 0, 0, "You must set the CVS_SERVER environment variable when" );
+       error( 0, 0, "using the :fork: access method." );
+       error( 1, 0, "This CVS was not compiled with server support." );
+    }
+# endif /* SERVER_SUPPORT */
+    
+    command[1] = "server";
+    command[2] = NULL;
+
+    TRACE (TRACE_FUNCTION, "Forking server: %s %s",
+          command[0] ? command[0] : "(null)", command[1]);
+
+    child_pid = piped_child (command, &tofd, &fromfd, false);
+    if (child_pid < 0)
+       error (1, 0, "could not fork server process");
+
+    make_bufs_from_fds (tofd, fromfd, child_pid, root, to_server_p,
+                        from_server_p, 0);
+}
+#endif /* CLIENT_SUPPORT || SERVER_SUPPORT */
+
+
+
+static int
+send_variable_proc (Node *node, void *closure)
+{
+    send_to_server ("Set ", 0);
+    send_to_server (node->key, 0);
+    send_to_server ("=", 1);
+    send_to_server (node->data, 0);
+    send_to_server ("\012", 1);
+    return 0;
+}
+
+
+
+/* Open up the connection to the server and perform any necessary
+ * authentication.
+ */
+void
+open_connection_to_server (cvsroot_t *root, struct buffer **to_server_p,
+                           struct buffer **from_server_p)
+{
+    /* Note that generally speaking we do *not* fall back to a different
+       way of connecting if the first one does not work.  This is slow
+       (*really* slow on a 14.4kbps link); the clean way to have a CVS
+       which supports several ways of connecting is with access methods.  */
+
+    TRACE (TRACE_FUNCTION, "open_connection_to_server (%s)", root->original);
+
+    switch (root->method)
+    {
+       case pserver_method:
+#ifdef AUTH_CLIENT_SUPPORT
+           /* Toss the return value.  It will die with an error message if
+            * anything goes wrong anyway.
+            */
+           connect_to_pserver (root, to_server_p, from_server_p, 0, 0);
+#else /* AUTH_CLIENT_SUPPORT */
+           error (0, 0, "CVSROOT is set for a pserver access method but your");
+           error (1, 0, "CVS executable doesn't support it.");
+#endif /* AUTH_CLIENT_SUPPORT */
+           break;
+
+       case kserver_method:
+#if HAVE_KERBEROS
+           start_kerberos4_server (root, to_server_p, 
+                                    from_server_p);
+#else /* !HAVE_KERBEROS */
+           error (0, 0,
+                  "CVSROOT is set for a kerberos access method but your");
+           error (1, 0, "CVS executable doesn't support it.");
+#endif /* HAVE_KERBEROS */
+           break;
+
+       case gserver_method:
+#ifdef HAVE_GSSAPI
+           /* GSSAPI authentication is handled by the pserver.  */
+           connect_to_pserver (root, to_server_p, from_server_p, 0, 1);
+#else /* !HAVE_GSSAPI */
+           error (0, 0, "CVSROOT is set for a GSSAPI access method but your");
+           error (1, 0, "CVS executable doesn't support it.");
+#endif /* HAVE_GSSAPI */
+           break;
+
+       case ext_method:
+       case extssh_method:
+#ifdef NO_EXT_METHOD
+           error (0, 0, ":ext: method not supported by this port of CVS");
+           error (1, 0, "try :server: instead");
+#else /* ! NO_EXT_METHOD */
+           start_rsh_server (root, to_server_p,
+                              from_server_p);
+#endif /* NO_EXT_METHOD */
+           break;
+
+       case server_method:
+#ifdef START_SERVER
+           {
+           int tofd, fromfd;
+           START_SERVER (&tofd, &fromfd, getcaller (),
+                         root->username,
+                          root->hostname,
+                         root->directory);
+# ifdef START_SERVER_RETURNS_SOCKET
+           make_bufs_from_fds (tofd, fromfd, 0, root, to_server_p,
+                                from_server_p, 1);
+# else /* ! START_SERVER_RETURNS_SOCKET */
+           make_bufs_from_fds (tofd, fromfd, 0, root, to_server_p,
+                                from_server_p, 0);
+# endif /* START_SERVER_RETURNS_SOCKET */
+           }
+#else /* ! START_SERVER */
+           /* FIXME: It should be possible to implement this portably,
+              like pserver, which would get rid of the duplicated code
+              in {vms,windows-NT,...}/startserver.c.  */
+           error (1, 0,
+"the :server: access method is not supported by this port of CVS");
+#endif /* START_SERVER */
+           break;
+
+        case fork_method:
+           connect_to_forked_server (root, to_server_p, from_server_p);
+           break;
+
+       default:
+           error (1, 0,
+                   "(start_server internal error): unknown access method");
+           break;
+    }
+
+    /* "Hi, I'm Darlene and I'll be your server tonight..." */
+    server_started = 1;
+}
+
+
+
+/* Contact the server.  */
+void
+start_server (void)
+{
+    bool rootless;
+    int status;
+    bool have_global;
+
+    do
+    {
+       /* Clear our static variables for this invocation. */
+       if (toplevel_repos)
+           free (toplevel_repos);
+       toplevel_repos = NULL;
+
+       open_connection_to_server (current_parsed_root, &global_to_server,
+                                  &global_from_server);
+       setup_logfiles ("CVS_CLIENT_LOG", &global_to_server,
+                       &global_from_server);
+
+       /* Clear static variables.  */
+       if (toplevel_repos)
+       {
+           free (toplevel_repos);
+           toplevel_repos = NULL;
+       }
+       if (last_repos)
+       {
+           free (last_repos);
+           last_repos = NULL;
+       }
+       if (last_update_dir)
+       {
+           free (last_update_dir);
+           last_update_dir = NULL;
+       }
+       stored_checksum_valid = 0;
+       if (stored_mode)
+       {
+           free (stored_mode);
+           stored_mode = NULL;
+       }
+
+       rootless = !strcmp (cvs_cmd_name, "init");
+       if (!rootless)
+       {
+           send_to_server ("Root ", 0);
+           send_to_server (current_parsed_root->directory, 0);
+           send_to_server ("\012", 1);
+       }
+
+       {
+           struct response *rs;
+           bool suppress_redirect = !current_parsed_root->redirect;
+
+           send_to_server ("Valid-responses", 0);
+
+           for (rs = responses; rs->name; ++rs)
+           {
+               if (suppress_redirect && !strcmp (rs->name, "Redirect"))
+                   continue;
+               if (suppress_bases && !strncmp (rs->name, "Base-", 5))
+                   continue;
+               if (suppress_bases && !strcmp (rs->name, "Temp-checkout"))
+                   continue;
+
+               send_to_server (" ", 0);
+               send_to_server (rs->name, 0);
+           }
+           send_to_server ("\012", 1);
+       }
+       send_to_server ("valid-requests\012", 0);
+
+       if (get_server_responses ())
+           exit (EXIT_FAILURE);
+
+       have_global = supported_request ("Global_option");
+
+       /* Encryption needs to come before compression.  Good encryption can
+        * render compression useless in the other direction.
+        */
+       if (cvsencrypt && !rootless)
+       {
+#ifdef ENCRYPTION
+           /* Turn on encryption before turning on compression.  We do
+            * not want to try to compress the encrypted stream.  Instead,
+            * we want to encrypt the compressed stream.  If we can't turn
+            * on encryption, bomb out; don't let the user think the data
+            * is being encrypted when it is not.
+            */
+#  ifdef HAVE_KERBEROS
+           if (current_parsed_root->method == kserver_method)
+           {
+               if (!supported_request ("Kerberos-encrypt"))
+                   error (1, 0, "This server does not support encryption");
+               send_to_server ("Kerberos-encrypt\012", 0);
+              initialize_kerberos4_encryption_buffers (&global_to_server,
+                                                       &global_from_server);
+           }
+           else
+#  endif /* HAVE_KERBEROS */
+#  ifdef HAVE_GSSAPI
+           if (current_parsed_root->method == gserver_method)
+           {
+               if (!supported_request ("Gssapi-encrypt"))
+                   error (1, 0, "This server does not support encryption");
+               send_to_server ("Gssapi-encrypt\012", 0);
+               initialize_gssapi_buffers (&global_to_server,
+                                          &global_from_server);
+               cvs_gssapi_encrypt = 1;
+           }
+           else
+#  endif /* HAVE_GSSAPI */
+               error (1, 0,
+"Encryption is only supported when using GSSAPI or Kerberos");
+#else /* ! ENCRYPTION */
+           error (1, 0, "This client does not support encryption");
+#endif /* ! ENCRYPTION */
+       }
+
+       /* Send this before compression to enable supression of the
+        * "Forcing compression level Z" messages.
+        */
+       if (quiet)
+       {
+           if (have_global)
+           {
+               send_to_server ("Global_option -q\012", 0);
+           }
+           else
+               error (1, 0,
+                      "This server does not support the global -q option.");
+       }
+       if (really_quiet)
+       {
+           if (have_global)
+           {
+               send_to_server ("Global_option -Q\012", 0);
+           }
+           else
+               error (1, 0,
+                      "This server does not support the global -Q option.");
+       }
+
+       /* Compression needs to come before any of the rooted requests to
+        * work with compression limits.
+        */
+       if (!rootless && (gzip_level || force_gzip))
+       {
+           if (supported_request ("Gzip-stream"))
+           {
+               char *gzip_level_buf = Xasprintf ("%d", gzip_level);
+               send_to_server ("Gzip-stream ", 0);
+               send_to_server (gzip_level_buf, 0);
+               free (gzip_level_buf);
+               send_to_server ("\012", 1);
+
+               /* All further communication with the server will be
+                  compressed.  */
+
+               global_to_server =
+                   compress_buffer_initialize (global_to_server, 0,
+                                               gzip_level, NULL);
+               global_from_server =
+                   compress_buffer_initialize (global_from_server, 1,
+                                               gzip_level, NULL);
+           }
+#ifndef NO_CLIENT_GZIP_PROCESS
+           else if (supported_request ("gzip-file-contents"))
+           {
+               char *gzip_level_buf = Xasprintf ("%d", gzip_level);
+               send_to_server ("gzip-file-contents ", 0);
+               send_to_server (gzip_level_buf, 0);
+               free (gzip_level_buf);
+               send_to_server ("\012", 1);
+
+               file_gzip_level = gzip_level;
+           }
+#endif
+           else
+           {
+               fprintf (stderr, "server doesn't support gzip-file-contents\n");
+               /* Setting gzip_level to 0 prevents us from giving the
+                  error twice if update has to contact the server again
+                  to fetch unpatchable files.  */
+               gzip_level = 0;
+           }
+       }
+
+       if (client_referrer && supported_request ("Referrer"))
+       {
+           send_to_server ("Referrer ", 0);
+           send_to_server (client_referrer->original, 0);
+           send_to_server ("\012", 0);
+       }
+
+       /* FIXME: I think we should still be sending this for init.  */
+       if (!rootless && supported_request ("Command-prep"))
+       {
+           send_to_server ("Command-prep ", 0);
+           send_to_server (cvs_cmd_name, 0);
+           send_to_server ("\012", 0);
+           status = get_server_responses ();
+           if (status == 1) exit (EXIT_FAILURE);
+           if (status == 2) close_connection_to_server (&global_to_server,
+                                                        &global_from_server);
+       }
+       else status = 0;
+    } while (status == 2);
+
+
+    /*
+     * Now handle global options.
+     *
+     * -H, -f, -d, -e should be handled OK locally.
+     *
+     * -b we ignore (treating it as a server installation issue).
+     * FIXME: should be an error message.
+     *
+     * -v we print local version info; FIXME: Add a protocol request to get
+     * the version from the server so we can print that too.
+     *
+     * -l -t -r -w -q -n and -Q need to go to the server.
+     */
+    if (noexec)
+    {
+       if (have_global)
+       {
+           send_to_server ("Global_option -n\012", 0);
+       }
+       else
+           error (1, 0,
+                  "This server does not support the global -n option.");
+    }
+    if (!cvswrite)
+    {
+       if (have_global)
+       {
+           send_to_server ("Global_option -r\012", 0);
+       }
+       else
+           error (1, 0,
+                  "This server does not support the global -r option.");
+    }
+    if (trace)
+    {
+       if (have_global)
+       {
+           int count = trace;
+           while (count--) send_to_server ("Global_option -t\012", 0);
+       }
+       else
+           error (1, 0,
+                  "This server does not support the global -t option.");
+    }
+
+    /* Find out about server-side cvswrappers.  An extra network
+       turnaround for cvs import seems to be unavoidable, unless we
+       want to add some kind of client-side place to configure which
+       filenames imply binary.  For cvs add, we could avoid the
+       problem by keeping a copy of the wrappers in CVSADM (the main
+       reason to bother would be so we could make add work without
+       contacting the server, I suspect).  */
+
+    if (!strcmp (cvs_cmd_name, "import") || !strcmp (cvs_cmd_name, "add"))
+    {
+       if (supported_request ("wrapper-sendme-rcsOptions"))
+       {
+           int err;
+           send_to_server ("wrapper-sendme-rcsOptions\012", 0);
+           err = get_server_responses ();
+           if (err != 0)
+               error (err, 0, "error reading from server");
+       }
+    }
+
+    if (cvsauthenticate && ! cvsencrypt && !rootless)
+    {
+       /* Turn on authentication after turning on compression, so
+          that we can compress the authentication information.  We
+          assume that encrypted data is always authenticated--the
+          ability to decrypt the data stream is itself a form of
+          authentication.  */
+#ifdef HAVE_GSSAPI
+       if (current_parsed_root->method == gserver_method)
+       {
+           if (! supported_request ("Gssapi-authenticate"))
+               error (1, 0,
+                      "This server does not support stream authentication");
+           send_to_server ("Gssapi-authenticate\012", 0);
+           initialize_gssapi_buffers(&global_to_server, &global_from_server);
+
+       }
+       else
+           error (1, 0, "Stream authentication is only supported when using 
GSSAPI");
+#else /* ! HAVE_GSSAPI */
+       error (1, 0, "This client does not support stream authentication");
+#endif /* ! HAVE_GSSAPI */
+    }
+
+    /* If "Set" is not supported, just silently fail to send the variables.
+       Users with an old server should get a useful error message when it
+       fails to recognize the ${=foo} syntax.  This way if someone uses
+       several servers, some of which are new and some old, they can still
+       set user variables in their .cvsrc without trouble.  */
+    if (supported_request ("Set"))
+       walklist (variable_list, send_variable_proc, NULL);
+}
+
+
+
+/* Send an argument STRING.  */
+void
+send_arg (const char *string)
+{
+    const char *p = string;
+
+    send_to_server ("Argument ", 0);
+
+    while (*p)
+    {
+       if (*p == '\n')
+           send_to_server ("\012Argumentx ", 0);
+       else
+           send_to_server (p, 1);
+       ++p;
+    }
+    send_to_server ("\012", 1);
+}
+
+
+
+/* VERS->OPTIONS specifies whether the file is binary or not.  NOTE: BEFORE
+   using any other fields of the struct vers, we would need to fix
+   client_process_import_file to set them up.  */
+static void
+send_modified (const char *file, const char *short_pathname, Vers_TS *vers)
+{
+    /* File was modified, send it.  */
+    struct stat sb;
+    int fd;
+    unsigned char *buf;
+    char *mode_string;
+    size_t bufsize;
+    int bin;
+
+    TRACE (TRACE_FUNCTION, "Sending file `%s' to server", file);
+
+    /* Don't think we can assume fstat exists.  */
+    if (stat (file, &sb) < 0)
+       error (1, errno, "reading %s", short_pathname);
+
+    mode_string = mode_to_string (sb.st_mode);
+
+    /* Beware: on systems using CRLF line termination conventions,
+       the read and write functions will convert CRLF to LF, so the
+       number of characters read is not the same as sb.st_size.  Text
+       files should always be transmitted using the LF convention, so
+       we don't want to disable this conversion.  */
+    bufsize = sb.st_size;
+    buf = xmalloc (bufsize);
+
+    /* Is the file marked as containing binary data by the "-kb" flag?
+       If so, make sure to open it in binary mode: */
+
+    if (vers && vers->options)
+      bin = !strcmp (vers->options, "-kb");
+    else
+      bin = 0;
+
+#ifdef BROKEN_READWRITE_CONVERSION
+    if (!bin)
+    {
+       /* If only stdio, not open/write/etc., do text/binary
+          conversion, use convert_file which can compensate
+          (FIXME: we could just use stdio instead which would
+          avoid the whole problem).  */
+       char *tfile = Xasprintf ("%s.CVSBFCTMP", file);
+       convert_file (file, O_RDONLY,
+                     tfile, O_WRONLY | O_CREAT | O_TRUNC | OPEN_BINARY);
+       fd = CVS_OPEN (tfile, O_RDONLY | OPEN_BINARY);
+       if (fd < 0)
+           error (1, errno, "reading %s", short_pathname);
+       free (tfile);
+    }
+    else
+       fd = CVS_OPEN (file, O_RDONLY | OPEN_BINARY);
+#else
+    fd = CVS_OPEN (file, O_RDONLY | (bin ? OPEN_BINARY : 0));
+#endif
+
+    if (fd < 0)
+       error (1, errno, "reading %s", short_pathname);
+
+    if (file_gzip_level && sb.st_size > 100)
+    {
+       size_t newsize = 0;
+
+       if (read_and_gzip (fd, short_pathname, &buf,
+                          &bufsize, &newsize,
+                          file_gzip_level))
+           error (1, 0, "aborting due to compression error");
+
+       if (close (fd) < 0)
+           error (0, errno, "warning: can't close %s", short_pathname);
+
+        {
+          char tmp[80];
+
+         send_to_server ("Modified ", 0);
+         send_to_server (file, 0);
+         send_to_server ("\012", 1);
+         send_to_server (mode_string, 0);
+         send_to_server ("\012z", 2);
+         sprintf (tmp, "%lu\n", (unsigned long) newsize);
+         send_to_server (tmp, 0);
+
+          send_to_server (buf, newsize);
+        }
+    }
+    else
+    {
+       int newsize;
+
+        {
+           unsigned char *bufp = buf;
+           int len;
+
+           /* FIXME: This is gross.  It assumes that we might read
+              less than st_size bytes (true on NT), but not more.
+              Instead of this we should just be reading a block of
+              data (e.g. 8192 bytes), writing it to the network, and
+              so on until EOF.  */
+           while ((len = read (fd, bufp, (buf + sb.st_size) - bufp)) > 0)
+               bufp += len;
+
+           if (len < 0)
+               error (1, errno, "reading %s", short_pathname);
+
+           newsize = bufp - buf;
+       }
+       if (close (fd) < 0)
+           error (0, errno, "warning: can't close %s", short_pathname);
+
+        {
+          char tmp[80];
+
+         send_to_server ("Modified ", 0);
+         send_to_server (file, 0);
+         send_to_server ("\012", 1);
+         send_to_server (mode_string, 0);
+         send_to_server ("\012", 1);
+          sprintf (tmp, "%lu\012", (unsigned long) newsize);
+          send_to_server (tmp, 0);
+        }
+#ifdef BROKEN_READWRITE_CONVERSION
+       if (!bin)
+       {
+           char *tfile = Xasprintf ("%s.CVSBFCTMP", file);
+           if (CVS_UNLINK (tfile) < 0)
+               error (0, errno, "warning: can't remove temp file %s", tfile);
+           free (tfile);
+       }
+#endif
+
+       /*
+        * Note that this only ends with a newline if the file ended with
+        * one.
+        */
+       if (newsize > 0)
+           send_to_server (buf, newsize);
+    }
+    free (buf);
+    free (mode_string);
+}
+
+
+
+static void
+send_signature (const char *srepos, const char *filename, bool bin)
+{
+    char *sigbuf;
+    size_t len;
+
+    sigbuf = gen_signature (srepos, filename, bin, &len);
+
+    send_to_server ("Signature\012", 0);
+    send_to_server (sigbuf, len);
+    free (sigbuf);
+}
+
+
+
+/* The address of an instance of this structure is passed to
+   send_fileproc, send_filesdoneproc, and send_direntproc, as the
+   callerdat parameter.  */
+struct send_data
+{
+    /* Each of the following flags are zero for clear or nonzero for set.  */
+    bool build_dirs;
+    bool force;
+    bool no_contents;
+    bool backup_modified;
+    bool sign;
+};
+
+/* Deal with one file.  */
+static int
+send_fileproc (void *callerdat, struct file_info *finfo)
+{
+    struct send_data *args = callerdat;
+    Vers_TS *vers;
+    struct file_info xfinfo;
+    /* File name to actually use.  Might differ in case from
+       finfo->file.  */
+    const char *filename;
+
+    send_a_repository ("", finfo->repository, finfo->update_dir);
+
+    xfinfo = *finfo;
+    xfinfo.repository = NULL;
+    xfinfo.rcs = NULL;
+    vers = Version_TS (&xfinfo, NULL, NULL, NULL, 0, 0);
+
+    if (vers->entdata)
+       filename = vers->entdata->user;
+    else
+       filename = finfo->file;
+
+    if (vers->vn_user)
+    {
+       /* The Entries request.  */
+       send_to_server ("Entry /", 0);
+       send_to_server (filename, 0);
+       send_to_server ("/", 0);
+       send_to_server (vers->vn_user, 0);
+       send_to_server ("/", 0);
+       if (vers->ts_conflict)
+       {
+           if (vers->ts_user && !strcmp (vers->ts_conflict, vers->ts_user))
+               send_to_server ("+=", 0);
+           else
+               send_to_server ("+modified", 0);
+       }
+       send_to_server ("/", 0);
+       send_to_server (vers->entdata ? vers->entdata->options : vers->options,
+                       0);
+       send_to_server ("/", 0);
+       if (vers->entdata && vers->entdata->tag)
+       {
+           send_to_server ("T", 0);
+           send_to_server (vers->entdata->tag, 0);
+       }
+       else if (vers->entdata && vers->entdata->date)
+          {
+           send_to_server ("D", 0);
+           send_to_server (vers->entdata->date, 0);
+          }
+       send_to_server ("\012", 1);
+    }
+    else
+    {
+       /* It seems a little silly to re-read this on each file, but
+          send_dirent_proc doesn't get called if filenames are specified
+          explicitly on the command line.  */
+       wrap_add_file (CVSDOTWRAPPER, 1);
+
+       if (wrap_name_has (filename, WRAP_RCSOPTION))
+       {
+           /* No "Entry", but the wrappers did give us a kopt so we better
+              send it with "Kopt".  As far as I know this only happens
+              for "cvs add".  Question: is there any reason why checking
+              for options from wrappers isn't done in Version_TS?
+
+              Note: it might have been better to just remember all the
+              kopts on the client side, rather than send them to the server,
+              and have it send us back the same kopts.  But that seemed like
+              a bigger change than I had in mind making now.  */
+
+           if (supported_request ("Kopt"))
+           {
+               char *opt;
+
+               send_to_server ("Kopt ", 0);
+               opt = wrap_rcsoption (filename, 1);
+               send_to_server (opt, 0);
+               send_to_server ("\012", 1);
+               free (opt);
+           }
+           else
+               error (0, 0, "\
+warning: ignoring -k options due to server limitations");
+       }
+    }
+
+    if (!vers->ts_user)
+    {
+       /*
+        * Do we want to print "file was lost" like normal CVS?
+        * Would it always be appropriate?
+        */
+       /* File no longer exists.  Don't do anything, missing files
+          just happen.  */
+    }
+    else if (!vers->ts_rcs || args->force
+            || strcmp (vers->ts_conflict
+                       ? vers->ts_conflict : vers->ts_rcs, vers->ts_user)
+            || (vers->ts_conflict && !strcmp (cvs_cmd_name, "diff")))
+    {
+       if (args->no_contents
+           && supported_request ("Is-modified"))
+       {
+           send_to_server ("Is-modified ", 0);
+           send_to_server (filename, 0);
+           send_to_server ("\012", 1);
+       }
+       else
+       {
+           if (args->sign
+               && get_sign_commits (false, supported_request ("Signature")))
+           {
+               if (!supported_request ("Signature"))
+                   error (1, 0, "Server doesn't support commit signatures.");
+
+               send_signature (Short_Repository (finfo->repository),
+                               finfo->file,
+                               vers && !strcmp (vers->options, "-kb"));
+           }
+           send_modified (filename, finfo->fullname, vers);
+       }
+
+        if (args->backup_modified)
+        {
+            char *bakname;
+            bakname = backup_file (filename, vers->vn_user);
+            /* This behavior is sufficiently unexpected to
+               justify overinformativeness, I think. */
+            if (! really_quiet)
+                printf ("(Locally modified %s moved to %s)\n",
+                        filename, bakname);
+            free (bakname);
+        }
+    }
+    else
+    {
+       send_to_server ("Unchanged ", 0);
+       send_to_server (filename, 0);
+       send_to_server ("\012", 1);
+    }
+
+    /* if this directory has an ignore list, add this file to it */
+    if (ignlist)
+    {
+       Node *p;
+
+       p = getnode ();
+       p->type = FILES;
+       p->key = xstrdup (finfo->file);
+       (void) addnode (ignlist, p);
+    }
+
+    freevers_ts (&vers);
+    return 0;
+}
+
+
+
+static void
+send_ignproc (const char *file, const char *dir)
+{
+    if (ign_inhibit_server || !supported_request ("Questionable"))
+    {
+       if (dir[0] != '\0')
+           (void) printf ("? %s/%s\n", dir, file);
+       else
+           (void) printf ("? %s\n", file);
+    }
+    else
+    {
+       send_to_server ("Questionable ", 0);
+       send_to_server (file, 0);
+       send_to_server ("\012", 1);
+    }
+}
+
+
+
+static int
+send_filesdoneproc (void *callerdat, int err, const char *repository,
+                    const char *update_dir, List *entries)
+{
+    /* if this directory has an ignore list, process it then free it */
+    if (ignlist)
+    {
+       ignore_files (ignlist, entries, update_dir, send_ignproc);
+       dellist (&ignlist);
+    }
+
+    return err;
+}
+
+
+
+/*
+ * send_dirent_proc () is called back by the recursion processor before a
+ * sub-directory is processed for update.
+ * A return code of 0 indicates the directory should be
+ * processed by the recursion code.  A return of non-zero indicates the
+ * recursion code should skip this directory.
+ *
+ */
+static Dtype
+send_dirent_proc (void *callerdat, const char *dir, const char *repository,
+                  const char *update_dir, List *entries)
+{
+    struct send_data *args = callerdat;
+    int dir_exists;
+    char *cvsadm_name;
+
+    if (ignore_directory (update_dir))
+    {
+       /* print the warm fuzzy message */
+       if (!quiet)
+           error (0, 0, "Ignoring %s", update_dir);
+        return R_SKIP_ALL;
+    }
+
+    /*
+     * If the directory does not exist yet (e.g. "cvs update -d foo"),
+     * no need to send any files from it.  If the directory does not
+     * have a CVS directory, then we pretend that it does not exist.
+     * Otherwise, we will fail when trying to open the Entries file.
+     * This case will happen when checking out a module defined as
+     * ``-a .''.
+     */
+    cvsadm_name = Xasprintf ("%s/%s", dir, CVSADM);
+    dir_exists = isdir (cvsadm_name);
+    free (cvsadm_name);
+
+    /*
+     * If there is an empty directory (e.g. we are doing `cvs add' on a
+     * newly-created directory), the server still needs to know about it.
+     */
+
+    if (dir_exists)
+    {
+       /*
+        * Get the repository from a CVS/Repository file whenever possible.
+        * The repository variable is wrong if the names in the local
+        * directory don't match the names in the repository.
+        */
+       char *repos = Name_Repository (dir, update_dir);
+       send_a_repository (dir, repos, update_dir);
+       free (repos);
+
+       /* initialize the ignore list for this directory */
+       ignlist = getlist ();
+    }
+    else
+    {
+       /* It doesn't make sense to send a non-existent directory,
+          because there is no way to get the correct value for
+          the repository (I suppose maybe via the expand-modules
+          request).  In the case where the "obvious" choice for
+          repository is correct, the server can figure out whether
+          to recreate the directory; in the case where it is wrong
+          (that is, does not match what modules give us), we might as
+          well just fail to recreate it.
+
+          Checking for noexec is a kludge for "cvs -n add dir".  */
+       /* Don't send a non-existent directory unless we are building
+           new directories (build_dirs is true).  Otherwise, CVS may
+           see a D line in an Entries file, and recreate a directory
+           which the user removed by hand.  */
+       if (args->build_dirs && noexec)
+           send_a_repository (dir, repository, update_dir);
+    }
+
+    return dir_exists ? R_PROCESS : R_SKIP_ALL;
+}
+
+
+
+/*
+ * send_dirleave_proc () is called back by the recursion code upon leaving
+ * a directory.  All it does is delete the ignore list if it hasn't already
+ * been done (by send_filesdone_proc).
+ */
+/* ARGSUSED */
+static int
+send_dirleave_proc (void *callerdat, const char *dir, int err,
+                    const char *update_dir, List *entries )
+{
+
+    /* Delete the ignore list if it hasn't already been done.  */
+    if (ignlist)
+       dellist (&ignlist);
+    return err;
+}
+
+
+
+/*
+ * Send each option in an array to the server, one by one.
+ * argv might be "--foo=bar",  "-C", "5", "-y".
+ */
+
+void
+send_options (int argc, char * const *argv)
+{
+    int i;
+    for (i = 0; i < argc; i++)
+       send_arg (argv[i]);
+}
+
+
+
+/* Send the names of all the argument files to the server.  */
+void
+send_file_names (int argc, char **argv, unsigned int flags)
+{
+    int i;
+    
+    /* The fact that we do this here as well as start_recursion is a bit 
+       of a performance hit.  Perhaps worth cleaning up someday.  */
+    if (flags & SEND_EXPAND_WILD)
+       expand_wild (argc, argv, &argc, &argv);
+
+    for (i = 0; i < argc; ++i)
+    {
+       char buf[1];
+       char *p;
+#ifdef FILENAMES_CASE_INSENSITIVE
+       char *line = NULL;
+#endif /* FILENAMES_CASE_INSENSITIVE */
+
+       if (arg_should_not_be_sent_to_server (argv[i]))
+           continue;
+
+#ifdef FILENAMES_CASE_INSENSITIVE
+       /* We want to send the path as it appears in the
+          CVS/Entries files.  We put this inside an ifdef
+          to avoid doing all these system calls in
+          cases where fncmp is just strcmp anyway.  */
+       /* The isdir (CVSADM) check could more gracefully be replaced
+          with a way of having Entries_Open report back the
+          error to us and letting us ignore existence_error.
+          Or some such.  */
+       {
+           List *stack;
+           size_t line_len = 0;
+           char *q, *r;
+           struct saved_cwd sdir;
+
+           /* Split the argument onto the stack.  */
+           stack = getlist();
+           r = xstrdup (argv[i]);
+            /* It's okay to discard the const from the last_component return
+             * below since we know we passed in an arg that was not const.
+             */
+           while ((q = (char *)last_component (r)) != r)
+           {
+               push (stack, xstrdup (q));
+               *--q = '\0';
+           }
+           push (stack, r);
+
+           /* Normalize the path into outstr. */
+           save_cwd (&sdir);
+           while (q = pop (stack))
+           {
+               Node *node = NULL;
+               if (isdir (CVSADM))
+               {
+                   List *entries;
+
+                   /* Note that if we are adding a directory,
+                      the following will read the entry
+                      that we just wrote there, that is, we
+                      will get the case specified on the
+                      command line, not the case of the
+                      directory in the filesystem.  This
+                      is correct behavior.  */
+                   entries = Entries_Open (0, NULL);
+                   node = findnode_fn (entries, q);
+                   if (node)
+                   {
+                       /* Add the slash unless this is our first element. */
+                       if (line_len)
+                           xrealloc_and_strcat (&line, &line_len, "/");
+                       xrealloc_and_strcat (&line, &line_len, node->key);
+                       delnode (node);
+                   }
+                   Entries_Close (entries);
+               }
+
+               /* If node is still NULL then we either didn't find CVSADM or
+                * we didn't find an entry there.
+                */
+               if (!node)
+               {
+                   /* Add the slash unless this is our first element. */
+                   if (line_len)
+                       xrealloc_and_strcat (&line, &line_len, "/");
+                   xrealloc_and_strcat (&line, &line_len, q);
+                   break;
+               }
+
+               /* And descend the tree. */
+               if (isdir (q))
+                   CVS_CHDIR (q);
+               free (q);
+           }
+           restore_cwd (&sdir);
+           free_cwd (&sdir);
+
+           /* Now put everything we didn't find entries for back on. */
+           while (q = pop (stack))
+           {
+               if (line_len)
+                   xrealloc_and_strcat (&line, &line_len, "/");
+               xrealloc_and_strcat (&line, &line_len, q);
+               free (q);
+           }
+
+           p = line;
+
+           dellist (&stack);
+       }
+#else /* !FILENAMES_CASE_INSENSITIVE */
+       p = argv[i];
+#endif /* FILENAMES_CASE_INSENSITIVE */
+
+       send_to_server ("Argument ", 0);
+
+       while (*p)
+       {
+           if (*p == '\n')
+           {
+               send_to_server ("\012Argumentx ", 0);
+           }
+           else if (ISSLASH (*p))
+           {
+               buf[0] = '/';
+               send_to_server (buf, 1);
+           }
+           else
+           {
+               buf[0] = *p;
+               send_to_server (buf, 1);
+           }
+           ++p;
+       }
+       send_to_server ("\012", 1);
+#ifdef FILENAMES_CASE_INSENSITIVE
+       free (line);
+#endif /* FILENAMES_CASE_INSENSITIVE */
+    }
+
+    if (flags & SEND_EXPAND_WILD)
+    {
+       int i;
+       for (i = 0; i < argc; ++i)
+           free (argv[i]);
+       free (argv);
+    }
+}
+
+
+
+/* Calculate and send max-dotdot to the server */
+static void
+send_max_dotdot (argc, argv)
+    int argc;
+    char **argv;
+{
+    int i;
+    int level = 0;
+    int max_level = 0;
+
+    /* Send Max-dotdot if needed.  */
+    for (i = 0; i < argc; ++i)
+    {
+        level = pathname_levels (argv[i]);
+       if (level > 0)
+       {
+            if (!uppaths) uppaths = getlist();
+           push_string (uppaths, xstrdup (argv[i]));
+       }
+        if (level > max_level)
+            max_level = level;
+    }
+
+    if (max_level > 0)
+    {
+        if (supported_request ("Max-dotdot"))
+        {
+            char buf[10];
+            sprintf (buf, "%d", max_level);
+
+            send_to_server ("Max-dotdot ", 0);
+            send_to_server (buf, 0);
+            send_to_server ("\012", 1);
+        }
+        else
+        {
+            error (1, 0,
+"backreference in path (`..') not supported by old (pre-Max-dotdot) servers");
+        }
+    }
+}
+
+
+
+/*
+ * Send Repository, Modified and Entry.  Also sends Argument lines for argc
+ * and argv, so should be called after options are sent.  
+ *
+ * ARGUMENTS
+ *   argc      # of files to operate on (0 for everything).
+ *   argv      Paths to file to operate on.
+ *   local     nonzero if we should not recurse (-l option).
+ *   flags     FLAGS & SEND_BUILD_DIRS if nonexistent directories should be
+ *             sent.
+ *             FLAGS & SEND_FORCE if we should send unmodified files to the
+ *             server as though they were modified.
+ *             FLAGS & SEND_NO_CONTENTS means that this command only needs to
+ *             know _whether_ a file is modified, not the contents.
+ *   sign      Whether to send files signatures.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+void
+send_files (int argc, char **argv, int local, int aflag, unsigned int flags)
+{
+    struct send_data args;
+    int err;
+
+    send_max_dotdot (argc, argv);
+
+    /*
+     * aflag controls whether the tag/date is copied into the vers_ts.
+     * But we don't actually use it, so I don't think it matters what we pass
+     * for aflag here.
+     */
+    args.build_dirs = flags & SEND_BUILD_DIRS;
+    args.force = flags & SEND_FORCE;
+    args.no_contents = flags & SEND_NO_CONTENTS;
+    args.backup_modified = flags & BACKUP_MODIFIED_FILES;
+    args.sign = flags & SEND_SIGNATURES;
+    err = start_recursion
+       (send_fileproc, send_filesdoneproc, send_dirent_proc,
+         send_dirleave_proc, &args, argc, argv, local, W_LOCAL, aflag,
+         CVS_LOCK_NONE, NULL, 0, NULL);
+    if (err)
+       exit (EXIT_FAILURE);
+    if (!toplevel_repos)
+       /*
+        * This happens if we are not processing any files,
+        * or for checkouts in directories without any existing stuff
+        * checked out.  The following assignment is correct for the
+        * latter case; I don't think toplevel_repos matters for the
+        * former.
+        */
+       toplevel_repos = xstrdup (current_parsed_root->directory);
+    send_repository ("", toplevel_repos, ".");
+}
+
+
+
+void
+client_import_setup (char *repository)
+{
+    if (!toplevel_repos)               /* should always be true */
+        send_a_repository ("", repository, "");
+}
+
+
+
+/*
+ * Process the argument import file.
+ */
+int
+client_process_import_file (char *message, char *vfile, char *vtag, int targc,
+                            char *targv[], char *repository,
+                            int all_files_binary,
+                            int modtime /* Nonzero for "import -d".  */ )
+{
+    char *update_dir;
+    char *fullname;
+    Vers_TS vers;
+
+    assert (toplevel_repos);
+
+    if (strncmp (repository, toplevel_repos, strlen (toplevel_repos)))
+       error (1, 0,
+              "internal error: pathname `%s' doesn't specify file in `%s'",
+              repository, toplevel_repos);
+
+    if (!strcmp (repository, toplevel_repos))
+    {
+       update_dir = "";
+       fullname = xstrdup (vfile);
+    }
+    else
+    {
+       update_dir = repository + strlen (toplevel_repos) + 1;
+
+       fullname = Xasprintf ("%s/%s", update_dir, vfile);
+    }
+
+    send_a_repository ("", repository, update_dir);
+    if (all_files_binary)
+       vers.options = xstrdup ("-kb");
+    else
+       vers.options = wrap_rcsoption (vfile, 1);
+
+    if (vers.options)
+    {
+       if (supported_request ("Kopt"))
+       {
+           send_to_server ("Kopt ", 0);
+           send_to_server (vers.options, 0);
+           send_to_server ("\012", 1);
+       }
+       else
+           error (0, 0,
+                  "warning: ignoring -k options due to server limitations");
+    }
+    if (modtime)
+    {
+       if (supported_request ("Checkin-time"))
+       {
+           struct stat sb;
+           char *rcsdate;
+           char netdate[MAXDATELEN];
+
+           if (stat (vfile, &sb) < 0)
+               error (1, errno, "cannot stat %s", fullname);
+           rcsdate = date_from_time_t (sb.st_mtime);
+           date_to_internet (netdate, rcsdate);
+           free (rcsdate);
+
+           send_to_server ("Checkin-time ", 0);
+           send_to_server (netdate, 0);
+           send_to_server ("\012", 1);
+       }
+       else
+           error (0, 0,
+                  "warning: ignoring -d option due to server limitations");
+    }
+
+    /* Send signature.  */
+    if (get_sign_commits (false, supported_request ("Signature")))
+    {
+       if (!supported_request ("Signature"))
+           error (1, 0, "Server doesn't support commit signatures.");
+
+       send_signature (Short_Repository (repository), vfile,
+                       vers.options && !strcmp (vers.options, "-kb"));
+    }
+
+    send_modified (vfile, fullname, &vers);
+    if (vers.options)
+       free (vers.options);
+    free (fullname);
+    return 0;
+}
+
+
+
+void
+client_import_done (void)
+{
+    if (!toplevel_repos)
+       /*
+        * This happens if we are not processing any files,
+        * or for checkouts in directories without any existing stuff
+        * checked out.  The following assignment is correct for the
+        * latter case; I don't think toplevel_repos matters for the
+        * former.
+        */
+        /* FIXME: "can't happen" now that we call client_import_setup
+          at the beginning.  */
+       toplevel_repos = xstrdup (current_parsed_root->directory);
+    send_repository ("", toplevel_repos, ".");
+}
+
+
+
+void
+client_notify (const char *repository, const char *update_dir,
+               const char *filename, int notif_type, const char *val)
+{
+    char buf[2];
+
+    send_a_repository ("", repository, update_dir);
+    send_to_server ("Notify ", 0);
+    send_to_server (filename, 0);
+    send_to_server ("\012", 1);
+    buf[0] = notif_type;
+    buf[1] = '\0';
+    send_to_server (buf, 1);
+    send_to_server ("\t", 1);
+    send_to_server (val, 0);
+}
+
+
+
+/*
+ * Send an option with an argument, dealing correctly with newlines in
+ * the argument.  If ARG is NULL, forget the whole thing.
+ */
+void
+option_with_arg (const char *option, const char *arg)
+{
+    if (!arg)
+       return;
+
+    send_to_server ("Argument ", 0);
+    send_to_server (option, 0);
+    send_to_server ("\012", 1);
+
+    send_arg (arg);
+}
+
+
+
+/* Send a date to the server.  The input DATE is in RCS format.
+   The time will be GMT.
+
+   We then convert that to the format required in the protocol
+   (including the "-D" option) and send it.  According to
+   cvsclient.texi, RFC 822/1123 format is preferred.  */
+void
+client_senddate (const char *date)
+{
+    char buf[MAXDATELEN];
+
+    date_to_internet (buf, date);
+    option_with_arg ("-D", buf);
+}
+
+
+
+void
+send_init_command (void)
+{
+    /* This is here because we need the current_parsed_root->directory 
variable.  */
+    send_to_server ("init ", 0);
+    send_to_server (current_parsed_root->directory, 0);
+    send_to_server ("\012", 0);
+}
+
+
+
+#if defined AUTH_CLIENT_SUPPORT || defined HAVE_KERBEROS || defined HAVE_GSSAPI
+
+struct hostent *
+init_sockaddr (struct sockaddr_in *name, char *hostname, unsigned int port)
+{
+    struct hostent *hostinfo;
+    unsigned short shortport = port;
+
+    memset (name, 0, sizeof (*name));
+    name->sin_family = AF_INET;
+    name->sin_port = htons (shortport);
+    hostinfo = gethostbyname (hostname);
+    if (!hostinfo)
+    {
+       fprintf (stderr, "Unknown host %s.\n", hostname);
+       exit (EXIT_FAILURE);
+    }
+    name->sin_addr = *(struct in_addr *) hostinfo->h_addr;
+    return hostinfo;
+}
+
+#endif /* defined AUTH_CLIENT_SUPPORT || defined HAVE_KERBEROS
+       * || defined HAVE_GSSAPI
+       */
+
+#endif /* CLIENT_SUPPORT */
Index: ccvs/src/client.h
diff -u /dev/null ccvs/src/client.h:1.61.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/client.h   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 1994-2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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.
+ */
+
+/* Interface between the client and the rest of CVS.  */
+
+/* Stuff shared with the server.  */
+char *mode_to_string (mode_t);
+int change_mode (const char *, const char *, int);
+
+extern int gzip_level;
+extern int file_gzip_level;
+
+struct buffer;
+
+void make_bufs_from_fds (int, int, int, cvsroot_t *,
+                        struct buffer **, struct buffer **, int);
+
+
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+
+/* Whether the connection should be encrypted.  */
+extern int cvsencrypt;
+
+/* Whether the connection should use per-packet authentication.  */
+extern int cvsauthenticate;
+
+# ifdef ENCRYPTION
+
+#   ifdef HAVE_KERBEROS
+
+/* We can't declare the arguments without including krb.h, and I don't
+   want to do that in every file.  */
+extern struct buffer *krb_encrypt_buffer_initialize ();
+
+#   endif /* HAVE_KERBEROS */
+
+# endif /* ENCRYPTION */
+
+#endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+
+#ifdef CLIENT_SUPPORT
+/*
+ * Flag variable for seeing whether the server has been started yet.
+ * As of this writing, only edit.c:notify_check() uses it.
+ */
+extern int server_started;
+
+/* Is the -P option to checkout or update specified?  */
+extern int client_prune_dirs;
+
+# ifdef AUTH_CLIENT_SUPPORT
+extern int use_authenticating_server;
+# endif /* AUTH_CLIENT_SUPPORT */
+# if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI)
+void connect_to_pserver (cvsroot_t *, struct buffer **, struct buffer **,
+                         int, int );
+#   ifndef CVS_AUTH_PORT
+#     define CVS_AUTH_PORT 2401
+#   endif /* CVS_AUTH_PORT */
+#   ifndef CVS_PROXY_PORT
+#     define CVS_PROXY_PORT 8080
+#   endif /* CVS_AUTH_PORT */
+# endif /* (AUTH_CLIENT_SUPPORT) || defined (HAVE_GSSAPI) */
+
+# if HAVE_KERBEROS
+#   ifndef CVS_PORT
+#     define CVS_PORT 1999
+#   endif
+# endif /* HAVE_KERBEROS */
+
+/* Talking to the server. */
+void send_to_server (const char *str, size_t len);
+void read_from_server (char *buf, size_t len);
+
+/* Internal functions that handle client communication to server, etc.  */
+bool supported_request (const char *);
+void option_with_arg (const char *option, const char *arg);
+
+/* Get the responses and then close the connection.  */
+int get_responses_and_close (void);
+
+int get_server_responses (void);
+
+/* Start up the connection to the server on the other end.  */
+void
+open_connection_to_server (cvsroot_t *root, struct buffer **to_server_p,
+                           struct buffer **from_server_p);
+void
+start_server (void);
+
+/* Send the names of all the argument files to the server.  */
+void
+send_file_names (int argc, char **argv, unsigned int flags);
+
+/* Flags for send_file_names.  */
+/* Expand wild cards?  */
+# define SEND_EXPAND_WILD 1
+
+/*
+ * Send Repository, Modified and Entry.  argc and argv contain only
+ * the files to operate on (or empty for everything), not options.
+ * local is nonzero if we should not recurse (-l option).
+ */
+void send_files (int argc, char **argv, int local, int aflag,
+                unsigned int flags);
+
+/* Flags for send_files.  */
+# define SEND_BUILD_DIRS       (1 << 0)
+# define SEND_FORCE            (1 << 1)
+# define SEND_NO_CONTENTS      (1 << 2)
+# define BACKUP_MODIFIED_FILES (1 << 3)
+# define SEND_SIGNATURES       (1 << 4)
+
+/* Send an argument to the remote server.  */
+void
+send_arg (const char *string);
+
+/* Send a string of single-char options to the remote server, one by one.  */
+void
+send_options (int argc, char * const *argv);
+
+void send_a_repository (const char *, const char *, const char *);
+
+#endif /* CLIENT_SUPPORT */
+
+/*
+ * This structure is used to catalog the responses the client is
+ * prepared to see from the server.
+ */
+
+struct response
+{
+    /* Name of the response.  */
+    const char *name;
+
+#ifdef CLIENT_SUPPORT
+    /*
+     * Function to carry out the response.  ARGS is the text of the
+     * command after name and, if present, a single space, have been
+     * stripped off.  The function can scribble into ARGS if it wants.
+     * Note that although LEN is given, ARGS is also guaranteed to be
+     * '\0' terminated.
+     */
+    void (*func) (char *args, size_t len);
+
+    /*
+     * ok and error are special; they indicate we are at the end of the
+     * responses, and error indicates we should exit with nonzero
+     * exitstatus.
+     */
+    enum {response_type_normal, response_type_ok, response_type_error,
+         response_type_redirect} type;
+#endif
+
+    /* Used by the server to indicate whether response is supported by
+       the client, as set by the Valid-responses request.  */
+    enum {
+      /*
+       * Failure to implement this response can imply a fatal
+       * error.  This should be set only for responses which were in the
+       * original version of the protocol; it should not be set for new
+       * responses.
+       */
+      rs_essential,
+
+      /* Some clients might not understand this response.  */
+      rs_optional,
+
+      /*
+       * Set by the server to one of the following based on what this
+       * client actually supports.
+       */
+      rs_supported,
+      rs_not_supported
+      } status;
+};
+
+/* Table of responses ending in an entry with a NULL name.  */
+
+extern struct response responses[];
+
+#ifdef CLIENT_SUPPORT
+
+void client_senddate (const char *date);
+void client_expand_modules (int argc, char **argv, int local);
+void client_send_expansions (int local, char *where, int build_dirs);
+void client_nonexpanded_setup (void);
+
+void send_init_command (void);
+
+extern char **failed_patches;
+extern int failed_patches_count;
+extern char *toplevel_wd;
+void client_import_setup (char *repository);
+int client_process_import_file
+    (char *message, char *vfile, char *vtag, int targc, char *targv[],
+     char *repository, int all_files_binary, int modtime);
+void client_import_done (void);
+void client_notify (const char *, const char *, const char *, int,
+                    const char *);
+
+#if defined AUTH_CLIENT_SUPPORT || defined HAVE_KERBEROS || defined HAVE_GSSAPI
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+struct hostent *init_sockaddr (struct sockaddr_in *, char *, unsigned int);
+#endif
+
+#endif /* CLIENT_SUPPORT */
Index: ccvs/src/commit.c
diff -u /dev/null ccvs/src/commit.c:1.257.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/commit.c   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,2501 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ *
+ * Commit Files
+ *
+ * "commit" commits the present version to the RCS repository, AFTER
+ * having done a test on conflicts.
+ *
+ * The call is: cvs commit [options] files...
+ *
+ */
+
+#include "cvs.h"
+#include "getline.h"
+#include "edit.h"
+#include "fileattr.h"
+#include "hardlink.h"
+#include "sign.h"
+
+static Dtype check_direntproc (void *callerdat, const char *dir,
+                               const char *repos, const char *update_dir,
+                               List *entries);
+static int check_fileproc (void *callerdat, struct file_info *finfo);
+static int check_filesdoneproc (void *callerdat, int err, const char *repos,
+                               const char *update_dir, List *entries);
+static int checkaddfile (const char *file, const char *repository,
+                         const char *tag, const char *options,
+                         RCSNode **rcsnode);
+static Dtype commit_direntproc (void *callerdat, const char *dir,
+                                const char *repos, const char *update_dir,
+                                List *entries);
+static int commit_dirleaveproc (void *callerdat, const char *dir, int err,
+                               const char *update_dir, List *entries);
+static int commit_fileproc (void *callerdat, struct file_info *finfo);
+static int commit_filesdoneproc (void *callerdat, int err,
+                                 const char *repository,
+                                const char *update_dir, List *entries);
+static int finaladd (struct file_info *finfo, char *revision, char *tag,
+                    char *options);
+static int findmaxrev (Node * p, void *closure);
+static int lock_RCS (const char *user, RCSNode *rcs, const char *rev,
+                     const char *repository);
+static int precommit_list_to_args_proc (Node * p, void *closure);
+static int precommit_proc (const char *repository, const char *filter,
+                           void *closure);
+static int remove_file (struct file_info *finfo, char *tag,
+                       char *message);
+static void fixaddfile (const char *rcs);
+static void fixbranch (RCSNode *, char *branch);
+static void unlockrcs (RCSNode *rcs);
+static void ci_delproc (Node *p);
+static void masterlist_delproc (Node *p);
+
+struct commit_info
+{
+    Ctype status;                      /* as returned from Classify_File() */
+    char *rev;                         /* a numeric rev, if we know it */
+    char *tag;                         /* any sticky tag, or -r option */
+    char *options;                     /* Any sticky -k option */
+};
+struct master_lists
+{
+    List *ulist;                       /* list for Update_Logfile */
+    List *cilist;                      /* list with commit_info structs */
+};
+
+static int check_valid_edit = 0;
+static int force_ci = 0;
+static int got_message;
+static int aflag;
+static char *saved_tag;
+static char *write_dirtag;
+static int write_dirnonbranch;
+static char *logfile;
+static List *mulist;
+static char *saved_message;
+static time_t last_register_time;
+
+static const char *const commit_usage[] =
+{
+    "Usage: %s %s [-cRlf] [-m msg | -F logfile] [-r rev] [files...]\n",
+    "\n",
+    "    -c          Check for valid edits before committing.\n",
+    "    -R          Process directories recursively.\n",
+    "    -l          Local directory only (not recursive).\n",
+    "    -f          Force the file to be committed; disables recursion.\n",
+    "    -F logfile  Read the log message from file.\n",
+    "    -m msg      Log message.\n",
+    "    -r rev      Commit to this branch or trunk revision.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+#ifdef CLIENT_SUPPORT
+/* Identify a file which needs "? foo" or a Questionable request.  */
+struct question
+{
+    /* The two fields for the Directory request.  */
+    char *dir;
+    char *repos;
+
+    /* The file name.  */
+    char *file;
+
+    struct question *next;
+};
+
+struct find_data
+{
+    List *ulist;
+    int argc;
+    char **argv;
+
+    /* This is used from dirent to filesdone time, for each directory,
+       to make a list of files we have already seen.  */
+    List *ignlist;
+
+    /* Linked list of files which need "? foo" or a Questionable request.  */
+    struct question *questionables;
+
+    /* Only good within functions called from the filesdoneproc.  Stores
+       the repository (pointer into storage managed by the recursion
+       processor.  */
+    const char *repository;
+
+    /* Non-zero if we should force the commit.  This is enabled by
+       either -f or -r options, unlike force_ci which is just -f.  */
+    int force;
+};
+
+
+
+static Dtype
+find_dirent_proc (void *callerdat, const char *dir, const char *repository,
+                  const char *update_dir, List *entries)
+{
+    struct find_data *find_data = callerdat;
+
+    /* This check seems to slowly be creeping throughout CVS (update
+       and send_dirent_proc by CVS 1.5, diff in 31 Oct 1995.  My guess
+       is that it (or some variant thereof) should go in all the
+       dirent procs.  Unless someone has some better idea...  */
+    if (!isdir (dir))
+       return R_SKIP_ALL;
+
+    /* initialize the ignore list for this directory */
+    find_data->ignlist = getlist ();
+
+    /* Print the same warm fuzzy as in check_direntproc, since that
+       code will never be run during client/server operation and we
+       want the messages to match. */
+    if (!quiet)
+       error (0, 0, "Examining %s", update_dir);
+
+    return R_PROCESS;
+}
+
+
+
+/* Here as a static until we get around to fixing ignore_files to pass
+   it along as an argument.  */
+static struct find_data *find_data_static;
+
+
+
+static void
+find_ignproc (const char *file, const char *dir)
+{
+    struct question *p;
+
+    p = xmalloc (sizeof (struct question));
+    p->dir = xstrdup (dir);
+    p->repos = xstrdup (find_data_static->repository);
+    p->file = xstrdup (file);
+    p->next = find_data_static->questionables;
+    find_data_static->questionables = p;
+}
+
+
+
+static int
+find_filesdoneproc (void *callerdat, int err, const char *repository,
+                    const char *update_dir, List *entries)
+{
+    struct find_data *find_data = callerdat;
+    find_data->repository = repository;
+
+    /* if this directory has an ignore list, process it then free it */
+    if (find_data->ignlist)
+    {
+       find_data_static = find_data;
+       ignore_files (find_data->ignlist, entries, update_dir, find_ignproc);
+       dellist (&find_data->ignlist);
+    }
+
+    find_data->repository = NULL;
+
+    return err;
+}
+
+
+
+/* Machinery to find out what is modified, added, and removed.  It is
+   possible this should be broken out into a new client_classify function;
+   merging it with classify_file is almost sure to be a mess, though,
+   because classify_file has all kinds of repository processing.  */
+static int
+find_fileproc (void *callerdat, struct file_info *finfo)
+{
+    Vers_TS *vers;
+    enum classify_type status;
+    Node *node;
+    struct find_data *args = callerdat;
+    struct logfile_info *data;
+    struct file_info xfinfo;
+
+    /* if this directory has an ignore list, add this file to it */
+    if (args->ignlist)
+    {
+       Node *p;
+
+       p = getnode ();
+       p->type = FILES;
+       p->key = xstrdup (finfo->file);
+       if (addnode (args->ignlist, p) != 0)
+           freenode (p);
+    }
+
+    xfinfo = *finfo;
+    xfinfo.repository = NULL;
+    xfinfo.rcs = NULL;
+
+    vers = Version_TS (&xfinfo, NULL, saved_tag, NULL, 0, 0);
+    if (vers->vn_user == NULL)
+    {
+       if (vers->ts_user == NULL)
+           error (0, 0, "nothing known about `%s'", finfo->fullname);
+       else
+           error (0, 0, "use `%s add' to create an entry for `%s'",
+                  program_name, finfo->fullname);
+       freevers_ts (&vers);
+       return 1;
+    }
+    if (vers->vn_user[0] == '-')
+    {
+       if (vers->ts_user != NULL)
+       {
+           error (0, 0,
+                  "`%s' should be removed and is still there (or is back"
+                  " again)", finfo->fullname);
+           freevers_ts (&vers);
+           return 1;
+       }
+       /* else */
+       status = T_REMOVED;
+    }
+    else if (strcmp (vers->vn_user, "0") == 0)
+    {
+       if (vers->ts_user == NULL)
+       {
+           /* This happens when one has `cvs add'ed a file, but it no
+              longer exists in the working directory at commit time.
+              FIXME: What classify_file does in this case is print
+              "new-born %s has disappeared" and removes the entry.
+              We probably should do the same.  */
+           if (!really_quiet)
+               error (0, 0, "warning: new-born %s has disappeared",
+                      finfo->fullname);
+           status = T_REMOVE_ENTRY;
+       }
+       else
+           status = T_ADDED;
+    }
+    else if (vers->ts_user == NULL)
+    {
+       /* FIXME: What classify_file does in this case is print
+          "%s was lost".  We probably should do the same.  */
+       freevers_ts (&vers);
+       return 0;
+    }
+    else if (vers->ts_rcs != NULL
+            && (args->force || strcmp (vers->ts_user, vers->ts_rcs) != 0))
+       /* If we are forcing commits, pretend that the file is
+           modified.  */
+       status = T_MODIFIED;
+    else
+    {
+       /* This covers unmodified files, as well as a variety of other
+          cases.  FIXME: we probably should be printing a message and
+          returning 1 for many of those cases (but I'm not sure
+          exactly which ones).  */
+       freevers_ts (&vers);
+       return 0;
+    }
+
+    node = getnode ();
+    node->key = xstrdup (finfo->fullname);
+
+    data = xmalloc (sizeof (struct logfile_info));
+    data->type = status;
+    data->tag = xstrdup (vers->tag);
+    data->rev_old = data->rev_new = NULL;
+
+    node->type = UPDATE;
+    node->delproc = update_delproc;
+    node->data = data;
+    (void)addnode (args->ulist, node);
+
+    ++args->argc;
+
+    freevers_ts (&vers);
+    return 0;
+}
+
+
+
+static int
+copy_ulist (Node *node, void *data)
+{
+    struct find_data *args = data;
+    args->argv[args->argc++] = node->key;
+    return 0;
+}
+#endif /* CLIENT_SUPPORT */
+
+
+
+/* Commit options both the client and server accept.  */
+#define COMMIT_OPTIONS "+cgG:lRm:fF:r:"
+
+    
+    
+int
+commit (int argc, char **argv)
+{
+    int c;
+    int err = 0;
+    int local = 0;
+    int flags;
+
+#ifdef SERVER_SUPPORT
+    /* See below for documentation of the `-n' option.  */
+    const char short_options[] = COMMIT_OPTIONS"n";
+#else /* !SERVER_SUPPORT */
+    const char short_options[] = COMMIT_OPTIONS;
+#endif /* SERVER_SUPPORT */
+
+    if (argc == -1)
+       usage (commit_usage);
+
+#ifdef CVS_BADROOT
+    /*
+     * For log purposes, do not allow "root" to commit files.  If you look
+     * like root, but are really logged in as a non-root user, it's OK.
+     */
+    /* FIXME: Shouldn't this check be much more closely related to the
+       readonly user stuff (CVSROOT/readers, &c).  That is, why should
+       root be able to "cvs init", "cvs import", &c, but not "cvs ci"?  */
+    /* Who we are on the client side doesn't affect logging.  */
+    if (geteuid () == (uid_t) 0 && !current_parsed_root->isremote)
+    {
+       struct passwd *pw;
+
+       if ((pw = getpwnam (getcaller ())) == NULL)
+           error (1, 0,
+                   "your apparent username (%s) is unknown to this system",
+                   getcaller ());
+       if (pw->pw_uid == (uid_t) 0)
+           error (1, 0, "'root' is not allowed to commit files");
+    }
+#endif /* CVS_BADROOT */
+
+    optind = 0;
+    while ((c = getopt (argc, argv, short_options)) != EOF)
+    {
+       switch (c)
+       {
+            case 'c':
+                check_valid_edit = 1;
+                break;
+
+#ifdef SERVER_SUPPORT
+           case 'n':
+               /* Silently ignore -n for compatibility with old
+                * clients.
+                */
+               if (!server_active) error(0, 0, "the `-n' option is obsolete");
+               break;
+#endif /* SERVER_SUPPORT */
+           case 'm':
+#ifdef FORCE_USE_EDITOR
+               use_editor = 1;
+#else
+               use_editor = 0;
+#endif
+               if (saved_message)
+               {
+                   free (saved_message);
+                   saved_message = NULL;
+               }
+
+               saved_message = xstrdup (optarg);
+               break;
+           case 'r':
+               if (saved_tag)
+                   free (saved_tag);
+               saved_tag = xstrdup (optarg);
+               break;
+           case 'l':
+               local = 1;
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case 'f':
+               force_ci = 1;
+                check_valid_edit = 0;
+               local = 1;              /* also disable recursion */
+               break;
+           case 'F':
+#ifdef FORCE_USE_EDITOR
+               use_editor = 1;
+#else
+               use_editor = 0;
+#endif
+               logfile = optarg;
+               break;
+           case '?':
+           default:
+               usage (commit_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+    /* numeric specified revision means we ignore sticky tags... */
+    if (saved_tag && isdigit ((unsigned char) *saved_tag))
+    {
+       char *p = saved_tag + strlen (saved_tag);
+       aflag = 1;
+       /* strip trailing dots and leading zeros */
+       while (*--p == '.') ;
+       p[1] = '\0';
+       while (saved_tag[0] == '0' && isdigit ((unsigned char) saved_tag[1]))
+           ++saved_tag;
+    }
+
+    /* some checks related to the "-F logfile" option */
+    if (logfile)
+    {
+       size_t size = 0, len;
+
+       if (saved_message)
+           error (1, 0, "cannot specify both a message and a log file");
+
+       get_file (logfile, logfile, "r", &saved_message, &size, &len);
+    }
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       struct find_data find_args;
+
+       ign_setup ();
+
+       find_args.ulist = getlist ();
+       find_args.argc = 0;
+       find_args.questionables = NULL;
+       find_args.ignlist = NULL;
+       find_args.repository = NULL;
+
+       /* It is possible that only a numeric tag should set this.
+          I haven't really thought about it much.
+          Anyway, I suspect that setting it unnecessarily only causes
+          a little unneeded network traffic.  */
+       find_args.force = force_ci || saved_tag != NULL;
+
+       err = start_recursion
+           (find_fileproc, find_filesdoneproc, find_dirent_proc, NULL,
+            &find_args, argc, argv, local, W_LOCAL, 0, CVS_LOCK_NONE,
+            NULL, 0, NULL );
+       if (err)
+           error (1, 0, "correct above errors first!");
+
+       if (find_args.argc == 0)
+       {
+           /* Nothing to commit.  Exit now without contacting the
+              server (note that this means that we won't print "?
+              foo" for files which merit it, because we don't know
+              what is in the CVSROOT/cvsignore file).  */
+           dellist (&find_args.ulist);
+           return 0;
+       }
+
+       /* Now we keep track of which files we actually are going to
+          operate on, and only work with those files in the future.
+          This saves time--we don't want to search the file system
+          of the working directory twice.  */
+       if (size_overflow_p (xtimes (find_args.argc, sizeof (char **))))
+       {
+           find_args.argc = 0;
+           return 0;
+       }
+       find_args.argv = xnmalloc (find_args.argc, sizeof (char **));
+       find_args.argc = 0;
+       walklist (find_args.ulist, copy_ulist, &find_args);
+
+       /* Do this before calling do_editor; don't ask for a log
+          message if we can't talk to the server.  But do it after we
+          have made the checks that we can locally (to more quickly
+          catch syntax errors, the case where no files are modified,
+          added or removed, etc.).
+
+          On the other hand, calling start_server before do_editor
+          means that we chew up server resources the whole time that
+          the user has the editor open (hours or days if the user
+          forgets about it), which seems dubious.  */
+       start_server ();
+
+       /*
+        * We do this once, not once for each directory as in normal CVS.
+        * The protocol is designed this way.  This is a feature.
+        */
+       if (use_editor)
+           do_editor (".", &saved_message, NULL, find_args.ulist);
+
+       /* We always send some sort of message, even if empty.  */
+       option_with_arg ("-m", saved_message ? saved_message : "");
+
+       /* OK, now process all the questionable files we have been saving
+          up.  */
+       {
+           struct question *p;
+           struct question *q;
+
+           p = find_args.questionables;
+           while (p != NULL)
+           {
+               if (ign_inhibit_server || !supported_request ("Questionable"))
+               {
+                   cvs_output ("? ", 2);
+                   if (p->dir[0] != '\0')
+                   {
+                       cvs_output (p->dir, 0);
+                       cvs_output ("/", 1);
+                   }
+                   cvs_output (p->file, 0);
+                   cvs_output ("\n", 1);
+               }
+               else
+               {
+                   /* This used to send the Directory line of its own accord,
+                    * but skipped some of the other processing like checking
+                    * for whether the server would accept "Relative-directory"
+                    * requests.  Relying on send_a_repository() to do this
+                    * picks up these checks but also:
+                    *
+                    *   1. Causes the "Directory" request to be sent only once
+                    *      per directory.
+                    *   2. Causes the global TOPLEVEL_REPOS to be set.
+                    *   3. Causes "Static-directory" and "Sticky" requests
+                    *      to sometimes be sent.
+                    *
+                    * (1) is almost certainly a plus.  (2) & (3) may or may
+                    * not be useful sometimes, and will ocassionally cause a
+                    * little extra network traffic.  The additional network
+                    * traffic is probably already saved several times over and
+                    * certainly cancelled out via the multiple "Directory"
+                    * request suppression of (1).
+                    */
+                   send_a_repository (p->dir, p->repos, p->dir);
+
+                   send_to_server ("Questionable ", 0);
+                   send_to_server (p->file, 0);
+                   send_to_server ("\012", 1);
+               }
+               free (p->dir);
+               free (p->repos);
+               free (p->file);
+               q = p->next;
+               free (p);
+               p = q;
+           }
+       }
+
+       if (local)
+           send_arg ("-l");
+        if (check_valid_edit)
+            send_arg ("-c");
+       if (force_ci)
+           send_arg ("-f");
+       option_with_arg ("-r", saved_tag);
+       send_arg ("--");
+
+       /* FIXME: This whole find_args.force/SEND_FORCE business is a
+          kludge.  It would seem to be a server bug that we have to
+          say that files are modified when they are not.  This makes
+          "cvs commit -r 2" across a whole bunch of files a very slow
+          operation (and it isn't documented in cvsclient.texi).  I
+          haven't looked at the server code carefully enough to be
+          _sure_ why this is needed, but if it is because the "ci"
+          program, which we used to call, wanted the file to exist,
+          then it would be relatively simple to fix in the server.  */
+       flags = find_args.force ? SEND_FORCE : 0;
+       flags |= SEND_SIGNATURES;
+       send_files (find_args.argc, find_args.argv, local, 0, flags);
+
+       /* Sending only the names of the files which were modified, added,
+          or removed means that the server will only do an up-to-date
+          check on those files.  This is different from local CVS and
+          previous versions of client/server CVS, but it probably is a Good
+          Thing, or at least Not Such A Bad Thing.  */
+       send_file_names (find_args.argc, find_args.argv, 0);
+       free (find_args.argv);
+       dellist (&find_args.ulist);
+
+       send_to_server ("ci\012", 0);
+       err = get_responses_and_close ();
+       if (err != 0 && use_editor && saved_message != NULL)
+       {
+           /* If there was an error, don't nuke the user's carefully
+              constructed prose.  This is something of a kludge; a better
+              solution is probably more along the lines of #150 in TODO
+              (doing a second up-to-date check before accepting the
+              log message has also been suggested, but that seems kind of
+              iffy because the real up-to-date check could still fail,
+              another error could occur, &c.  Also, a second check would
+              slow things down).  */
+
+           char *fname;
+           FILE *fp;
+
+           fp = cvs_temp_file (&fname);
+           if (fp == NULL)
+               error (1, 0, "cannot create temporary file %s", fname);
+           if (fwrite (saved_message, 1, strlen (saved_message), fp)
+               != strlen (saved_message))
+               error (1, errno, "cannot write temporary file %s", fname);
+           if (fclose (fp) < 0)
+               error (0, errno, "cannot close temporary file %s", fname);
+           error (0, 0, "saving log message in %s", fname);
+           free (fname);
+       }
+       return err;
+    }
+#endif
+
+    if (saved_tag != NULL)
+       tag_check_valid (saved_tag, argc, argv, local, aflag, "", false);
+
+    /* XXX - this is not the perfect check for this */
+    if (argc <= 0)
+       write_dirtag = saved_tag;
+
+    wrap_setup ();
+
+    lock_tree_promotably (argc, argv, local, W_LOCAL, aflag);
+
+    /*
+     * Set up the master update list and hard link list
+     */
+    mulist = getlist ();
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    if (preserve_perms)
+    {
+       hardlist = getlist ();
+
+       /*
+        * We need to save the working directory so that
+        * check_fileproc can construct a full pathname for each file.
+        */
+       working_dir = xgetcwd ();
+    }
+#endif
+
+    /*
+     * Run the recursion processor to verify the files are all up-to-date
+     */
+    err = start_recursion (check_fileproc, check_filesdoneproc,
+                           check_direntproc, NULL, NULL, argc, argv, local,
+                           W_LOCAL, aflag, CVS_LOCK_NONE, NULL, 1, NULL);
+    if (err)
+       error (1, 0, "correct above errors first!");
+
+    /*
+     * Run the recursion processor to commit the files
+     */
+    write_dirnonbranch = 0;
+    if (noexec == 0)
+       err = start_recursion (commit_fileproc, commit_filesdoneproc,
+                               commit_direntproc, commit_dirleaveproc, NULL,
+                               argc, argv, local, W_LOCAL, aflag,
+                               CVS_LOCK_WRITE, NULL, 1, NULL);
+
+    /*
+     * Unlock all the dirs and clean up
+     */
+    Lock_Cleanup ();
+    dellist (&mulist);
+
+    /* see if we need to sleep before returning to avoid time-stamp races */
+    if (!server_active && last_register_time)
+    {
+       sleep_past (last_register_time);
+    }
+
+    return err;
+}
+
+
+
+/* This routine determines the status of a given file and retrieves
+   the version information that is associated with that file. */
+
+static
+Ctype
+classify_file_internal (struct file_info *finfo, Vers_TS **vers)
+{
+    int save_noexec, save_quiet, save_really_quiet;
+    Ctype status;
+
+    /* FIXME: Do we need to save quiet as well as really_quiet?  Last
+       time I glanced at Classify_File I only saw it looking at really_quiet
+       not quiet.  */
+    save_noexec = noexec;
+    save_quiet = quiet;
+    save_really_quiet = really_quiet;
+    noexec = quiet = really_quiet = 1;
+
+    /* handle specified numeric revision specially */
+    if (saved_tag && isdigit ((unsigned char) *saved_tag))
+    {
+       /* If the tag is for the trunk, make sure we're at the head */
+       if (numdots (saved_tag) < 2)
+       {
+           status = Classify_File (finfo, NULL, NULL,
+                                   NULL, 1, aflag, vers, 0);
+           if (status == T_UPTODATE || status == T_MODIFIED ||
+               status == T_ADDED)
+           {
+               Ctype xstatus;
+
+               freevers_ts (vers);
+               xstatus = Classify_File (finfo, saved_tag, NULL,
+                                        NULL, 1, aflag, vers, 0);
+               if (xstatus == T_REMOVE_ENTRY)
+                   status = T_MODIFIED;
+               else if (status == T_MODIFIED && xstatus == T_CONFLICT)
+                   status = T_MODIFIED;
+               else
+                   status = xstatus;
+           }
+       }
+       else
+       {
+           char *xtag, *cp;
+
+           /*
+            * The revision is off the main trunk; make sure we're
+            * up-to-date with the head of the specified branch.
+            */
+           xtag = xstrdup (saved_tag);
+           if ((numdots (xtag) & 1) != 0)
+           {
+               cp = strrchr (xtag, '.');
+               *cp = '\0';
+           }
+           status = Classify_File (finfo, xtag, NULL,
+                                   NULL, 1, aflag, vers, 0);
+           if ((status == T_REMOVE_ENTRY || status == T_CONFLICT)
+               && (cp = strrchr (xtag, '.')) != NULL)
+           {
+               /* pluck one more dot off the revision */
+               *cp = '\0';
+               freevers_ts (vers);
+               status = Classify_File (finfo, xtag, NULL,
+                                       NULL, 1, aflag, vers, 0);
+               if (status == T_UPTODATE || status == T_REMOVE_ENTRY)
+                   status = T_MODIFIED;
+           }
+           /* now, muck with vers to make the tag correct */
+           free ((*vers)->tag);
+           (*vers)->tag = xstrdup (saved_tag);
+           free (xtag);
+       }
+    }
+    else
+       status = Classify_File (finfo, saved_tag, NULL, NULL, 1, 0, vers, 0);
+    noexec = save_noexec;
+    quiet = save_quiet;
+    really_quiet = save_really_quiet;
+
+    return status;
+}
+
+
+
+/*
+ * Check to see if a file is ok to commit and make sure all files are
+ * up-to-date
+ */
+/* ARGSUSED */
+static int
+check_fileproc (void *callerdat, struct file_info *finfo)
+{
+    Ctype status;
+    const char *xdir;
+    Node *p;
+    List *ulist, *cilist;
+    Vers_TS *vers;
+    struct commit_info *ci;
+    struct logfile_info *li;
+    int retval = 1;
+
+    size_t cvsroot_len = strlen (current_parsed_root->directory);
+
+    if (!finfo->repository)
+    {
+       error (0, 0, "nothing known about `%s'", finfo->fullname);
+       return 1;
+    }
+
+    if (strncmp (finfo->repository, current_parsed_root->directory,
+                 cvsroot_len) == 0
+       && ISSLASH (finfo->repository[cvsroot_len])
+       && strncmp (finfo->repository + cvsroot_len + 1,
+                   CVSROOTADM,
+                   sizeof (CVSROOTADM) - 1) == 0
+       && ISSLASH (finfo->repository[cvsroot_len + sizeof (CVSROOTADM)])
+       && strcmp (finfo->repository + cvsroot_len + sizeof (CVSROOTADM) + 1,
+                  CVSNULLREPOS) == 0
+       )
+       error (1, 0, "cannot check in to %s", finfo->repository);
+
+    status = classify_file_internal (finfo, &vers);
+
+    /*
+     * If the force-commit option is enabled, and the file in question
+     * appears to be up-to-date, just make it look modified so that
+     * it will be committed.
+     */
+    if (force_ci && status == T_UPTODATE)
+       status = T_MODIFIED;
+
+    switch (status)
+    {
+       case T_CHECKOUT:
+       case T_PATCH:
+       case T_NEEDS_MERGE:
+       case T_REMOVE_ENTRY:
+           error (0, 0, "Up-to-date check failed for `%s'", finfo->fullname);
+           goto out;
+       case T_CONFLICT:
+       case T_MODIFIED:
+       case T_ADDED:
+       case T_REMOVED:
+        {
+            char *editor;
+
+           /*
+            * some quick sanity checks; if no numeric -r option specified:
+            *  - can't have a sticky date
+            *  - can't have a sticky tag that is not a branch
+            * Also,
+            *  - if status is T_REMOVED, file must not exist and its entry
+            *    can't have a numeric sticky tag.
+            *  - if status is T_ADDED, rcs file must not exist unless on
+            *    a branch or head is dead
+            *  - if status is T_ADDED, can't have a non-trunk numeric rev
+            *  - if status is T_MODIFIED and a Conflict marker exists, don't
+            *    allow the commit if timestamp is identical or if we find
+            *    an RCS_MERGE_PAT in the file.
+            */
+           if (!saved_tag || !isdigit ((unsigned char) *saved_tag))
+           {
+               if (vers->date)
+               {
+                   error (0, 0,
+                          "cannot commit with sticky date for file `%s'",
+                          finfo->fullname);
+                   goto out;
+               }
+               if (status == T_MODIFIED && vers->tag &&
+                   !RCS_isbranch (finfo->rcs, vers->tag))
+               {
+                   error (0, 0,
+                          "sticky tag `%s' for file `%s' is not a branch",
+                          vers->tag, finfo->fullname);
+                   goto out;
+               }
+           }
+           if (status == T_CONFLICT && !force_ci)
+           {
+               error (0, 0,
+                     "file `%s' had a conflict and has not been modified",
+                      finfo->fullname);
+               goto out;
+           }
+           if (status == T_MODIFIED && !force_ci && !really_quiet
+               && file_has_markers (finfo))
+           {
+               /* Make this a warning, not an error, because we have
+                  no way of knowing whether the "conflict indicators"
+                  are really from a conflict or whether they are part
+                  of the document itself (cvs.texinfo and sanity.sh in
+                  CVS itself, for example, tend to want to have strings
+                  like ">>>>>>>" at the start of a line).  Making people
+                  kludge this the way they need to kludge keyword
+                  expansion seems undesirable.  And it is worse than
+                  keyword expansion, because there is no -ko
+                  analogue.  */
+               error (0, 0,
+                      "\
+warning: file `%s' seems to still contain conflict indicators",
+                      finfo->fullname);
+           }
+
+           if ((status == T_ADDED || status == T_MODIFIED)
+               && !force_ci && !really_quiet
+               /* This will not be called from the client.  */
+               && (get_sign_commits (server_active, true)
+                   || have_sigfile (server_active, finfo->file))
+               && file_contains_keyword (finfo))
+           {
+               /* Make this a warning, not an error, because the user may
+                * be intentionally signing a file with keywords.  Such a file
+                * may still be verified when checked out -ko.
+                */
+               error (0, 0,
+"warning: signed file `%s' contains at least one RCS keyword",
+                      finfo->fullname);
+           }
+
+           if (status == T_REMOVED)
+           {
+               if (vers->ts_user != NULL)
+               {
+                   error (0, 0,
+                          "`%s' should be removed and is still there (or is"
+                          " back again)", finfo->fullname);
+                   goto out;
+               }
+
+               if (vers->tag && isdigit ((unsigned char) *vers->tag))
+               {
+                   /* Remove also tries to forbid this, but we should check
+                      here.  I'm only _sure_ about somewhat obscure cases
+                      (hacking the Entries file, using an old version of
+                      CVS for the remove and a new one for the commit), but
+                      there might be other cases.  */
+                   error (0, 0,
+                          "cannot remove file `%s' which has a numeric sticky"
+                          " tag of `%s'", finfo->fullname, vers->tag);
+                   freevers_ts (&vers);
+                   goto out;
+               }
+           }
+           if (status == T_ADDED)
+           {
+               if (vers->tag == NULL)
+               {
+                   if (finfo->rcs != NULL &&
+                       !RCS_isdead (finfo->rcs, finfo->rcs->head))
+                   {
+                       error (0, 0,
+                   "cannot add file `%s' when RCS file `%s' already exists",
+                              finfo->fullname, finfo->rcs->path);
+                       goto out;
+                   }
+               }
+               else if (isdigit ((unsigned char) *vers->tag) &&
+                   numdots (vers->tag) > 1)
+               {
+                   error (0, 0,
+               "cannot add file `%s' with revision `%s'; must be on trunk",
+                              finfo->fullname, vers->tag);
+                   goto out;
+               }
+           }
+
+           /* done with consistency checks; now, to get on with the commit */
+           if (finfo->update_dir[0] == '\0')
+               xdir = ".";
+           else
+               xdir = finfo->update_dir;
+           if ((p = findnode (mulist, xdir)) != NULL)
+           {
+               ulist = ((struct master_lists *) p->data)->ulist;
+               cilist = ((struct master_lists *) p->data)->cilist;
+           }
+           else
+           {
+               struct master_lists *ml;
+
+               ml = xmalloc (sizeof (struct master_lists));
+               ulist = ml->ulist = getlist ();
+               cilist = ml->cilist = getlist ();
+
+               p = getnode ();
+               p->key = xstrdup (xdir);
+               p->type = UPDATE;
+               p->data = ml;
+               p->delproc = masterlist_delproc;
+               (void) addnode (mulist, p);
+           }
+
+           /* first do ulist, then cilist */
+           p = getnode ();
+           p->key = xstrdup (finfo->file);
+           p->type = UPDATE;
+           p->delproc = update_delproc;
+           li = xmalloc (sizeof (struct logfile_info));
+           li->type = status;
+
+           if (check_valid_edit)
+            {
+                char *editors = NULL;
+
+               editor = NULL;
+                editors = fileattr_get0 (finfo->file, "_editors");
+                if (editors != NULL)
+                {
+                    char *caller = getcaller ();
+                    char *p = NULL;
+                    char *p0 = NULL;
+
+                    p = editors;
+                    p0 = p;
+                    while (*p != '\0')
+                    {
+                        p = strchr (p, '>');
+                        if (p == NULL)
+                        {
+                            break;
+                        }
+                        *p = '\0';
+                        if (strcmp (caller, p0) == 0)
+                        {
+                            break;
+                        }
+                        p = strchr (p + 1, ',');
+                        if (p == NULL)
+                        {
+                            break;
+                        }
+                        ++p;
+                        p0 = p;
+                    }
+
+                    if (strcmp (caller, p0) == 0)
+                    {
+                        editor = caller;
+                    }
+
+                    free (editors);
+                }
+            }
+
+            if (check_valid_edit && editor == NULL)
+            {
+                error (0, 0, "Valid edit does not exist for %s",
+                       finfo->fullname);
+                freevers_ts (&vers);
+                return 1;
+            }
+
+           li->tag = xstrdup (vers->tag);
+           li->rev_old = xstrdup (vers->vn_rcs);
+           li->rev_new = NULL;
+           p->data = li;
+           (void) addnode (ulist, p);
+
+           p = getnode ();
+           p->key = xstrdup (finfo->file);
+           p->type = UPDATE;
+           p->delproc = ci_delproc;
+           ci = xmalloc (sizeof (struct commit_info));
+           ci->status = status;
+           if (vers->tag)
+               if (isdigit ((unsigned char) *vers->tag))
+                   ci->rev = xstrdup (vers->tag);
+               else
+                   ci->rev = RCS_whatbranch (finfo->rcs, vers->tag);
+           else
+               ci->rev = NULL;
+           ci->tag = xstrdup (vers->tag);
+           ci->options = xstrdup (vers->options);
+           p->data = ci;
+           (void) addnode (cilist, p);
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+           if (preserve_perms)
+           {
+               /* Add this file to hardlist, indexed on its inode.  When
+                  we are done, we can find out what files are hardlinked
+                  to a given file by looking up its inode in hardlist. */
+               char *fullpath;
+               Node *linkp;
+               struct hardlink_info *hlinfo;
+
+               /* Get the full pathname of the current file. */
+               fullpath = Xasprintf ("%s/%s", working_dir, finfo->fullname);
+
+               /* To permit following links in subdirectories, files
+                   are keyed on finfo->fullname, not on finfo->name. */
+               linkp = lookup_file_by_inode (fullpath);
+
+               /* If linkp is NULL, the file doesn't exist... maybe
+                  we're doing a remove operation? */
+               if (linkp != NULL)
+               {
+                   /* Create a new hardlink_info node, which will record
+                      the current file's status and the links listed in its
+                      `hardlinks' delta field.  We will append this
+                      hardlink_info node to the appropriate hardlist entry. */
+                   hlinfo = xmalloc (sizeof (struct hardlink_info));
+                   hlinfo->status = status;
+                   linkp->data = hlinfo;
+               }
+           }
+#endif
+
+           break;
+        }
+
+       case T_UNKNOWN:
+           error (0, 0, "nothing known about `%s'", finfo->fullname);
+           goto out;
+       case T_UPTODATE:
+           break;
+       default:
+           error (0, 0, "CVS internal error: unknown status %d", status);
+           break;
+    }
+
+    retval = 0;
+
+ out:
+
+    freevers_ts (&vers);
+    return retval;
+}
+
+
+
+/*
+ * By default, return the code that tells do_recursion to examine all
+ * directories
+ */
+/* ARGSUSED */
+static Dtype
+check_direntproc (void *callerdat, const char *dir, const char *repos,
+                  const char *update_dir, List *entries)
+{
+    if (!isdir (dir))
+       return R_SKIP_ALL;
+
+    if (!quiet)
+       error (0, 0, "Examining %s", update_dir);
+
+    return R_PROCESS;
+}
+
+
+
+/*
+ * Walklist proc to generate an arg list from the line in commitinfo
+ */
+static int
+precommit_list_to_args_proc (p, closure)
+    Node *p;
+    void *closure;
+{
+    struct format_cmdline_walklist_closure *c = closure;
+    struct logfile_info *li;
+    char *arg = NULL;
+    const char *f;
+    char *d;
+    size_t doff;
+
+    if (p->data == NULL) return 1;
+
+    f = c->format;
+    d = *c->d;
+    /* foreach requested attribute */
+    while (*f)
+    {
+       switch (*f++)
+       {
+           case 's':
+               li = p->data;
+               if (li->type == T_ADDED
+                       || li->type == T_MODIFIED
+                       || li->type == T_REMOVED)
+               {
+                   arg = p->key;
+               }
+               break;
+           default:
+               error (1, 0,
+                      "Unknown format character or not a list attribute: %c",
+                      f[-1]);
+               /* NOTREACHED */
+               break;
+       }
+       /* copy the attribute into an argument */
+       if (c->quotes)
+       {
+           arg = cmdlineescape (c->quotes, arg);
+       }
+       else
+       {
+           arg = cmdlinequote ('"', arg);
+       }
+       doff = d - *c->buf;
+       expand_string (c->buf, c->length, doff + strlen (arg));
+       d = *c->buf + doff;
+       strncpy (d, arg, strlen (arg));
+       d += strlen (arg);
+       free (arg);
+
+       /* and always put the extra space on.  we'll have to back up a char
+        * when we're done, but that seems most efficient
+        */
+       doff = d - *c->buf;
+       expand_string (c->buf, c->length, doff + 1);
+       d = *c->buf + doff;
+       *d++ = ' ';
+    }
+    /* correct our original pointer into the buff */
+    *c->d = d;
+    return 0;
+}
+
+
+
+/*
+ * Callback proc for pre-commit checking
+ */
+static int
+precommit_proc (const char *repository, const char *filter, void *closure)
+{
+    char *newfilter = NULL;
+    char *cmdline;
+    const char *srepos = Short_Repository (repository);
+    List *ulist = closure;
+
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+    if (!strchr (filter, '%'))
+    {
+       error (0, 0,
+               "warning: commitinfo line contains no format strings:\n"
+               "    \"%s\"\n"
+               "Appending defaults (\" %%r/%%p %%s\"), but please be aware 
that this usage is\n"
+               "deprecated.", filter);
+       newfilter = Xasprintf ("%s %%r/%%p %%s", filter);
+       filter = newfilter;
+    }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             false, srepos,
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             filter,
+                             "c", "s", cvs_cmd_name,
+#ifdef SERVER_SUPPORT
+                             "R", "s", referrer ? referrer->original : "NONE",
+#endif /* SERVER_SUPPORT */
+                             "p", "s", srepos,
+                             "r", "s", current_parsed_root->directory,
+                             "s", ",", ulist, precommit_list_to_args_proc,
+                             (void *) NULL,
+                             (char *) NULL);
+
+    if (newfilter) free (newfilter);
+
+    if (!cmdline || !strlen (cmdline))
+    {
+       if (cmdline) free (cmdline);
+       error (0, 0, "precommit proc resolved to the empty string!");
+       return 1;
+    }
+
+    run_setup (cmdline);
+    free (cmdline);
+
+    return run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL | RUN_REALLY);
+}
+
+
+
+/*
+ * Run the pre-commit checks for the dir
+ */
+/* ARGSUSED */
+static int
+check_filesdoneproc (void *callerdat, int err, const char *repos,
+                     const char *update_dir, List *entries)
+{
+    int n;
+    Node *p;
+    List *saved_ulist;
+
+    /* find the update list for this dir */
+    p = findnode (mulist, update_dir);
+    if (p != NULL)
+       saved_ulist = ((struct master_lists *) p->data)->ulist;
+    else
+       saved_ulist = NULL;
+
+    /* skip the checks if there's nothing to do */
+    if (saved_ulist == NULL || saved_ulist->list->next == saved_ulist->list)
+       return err;
+
+    /* run any pre-commit checks */
+    n = Parse_Info (CVSROOTADM_COMMITINFO, repos, precommit_proc, PIOPT_ALL,
+                    saved_ulist);
+    if (n > 0)
+    {
+       error (0, 0, "Pre-commit check failed");
+       err += n;
+    }
+
+    return err;
+}
+
+
+
+/*
+ * Do the work of committing a file
+ */
+static int maxrev;
+static char *sbranch;
+
+/* ARGSUSED */
+static int
+commit_fileproc (void *callerdat, struct file_info *finfo)
+{
+    Node *p;
+    int err = 0;
+    List *ulist, *cilist;
+    struct commit_info *ci;
+
+    /* Keep track of whether write_dirtag is a branch tag.
+       Note that if it is a branch tag in some files and a nonbranch tag
+       in others, treat it as a nonbranch tag.  It is possible that case
+       should elicit a warning or an error.  */
+    if (write_dirtag != NULL
+       && finfo->rcs != NULL)
+    {
+       char *rev = RCS_getversion (finfo->rcs, write_dirtag, NULL, 1, NULL);
+       if (rev != NULL
+           && !RCS_nodeisbranch (finfo->rcs, write_dirtag))
+           write_dirnonbranch = 1;
+       if (rev != NULL)
+           free (rev);
+    }
+
+    if (finfo->update_dir[0] == '\0')
+       p = findnode (mulist, ".");
+    else
+       p = findnode (mulist, finfo->update_dir);
+
+    /*
+     * if p is null, there were file type command line args which were
+     * all up-to-date so nothing really needs to be done
+     */
+    if (p == NULL)
+       return 0;
+    ulist = ((struct master_lists *) p->data)->ulist;
+    cilist = ((struct master_lists *) p->data)->cilist;
+
+    /*
+     * At this point, we should have the commit message unless we were called
+     * with files as args from the command line.  In that latter case, we
+     * need to get the commit message ourselves
+     */
+    if (!got_message)
+    {
+       got_message = 1;
+       if (!server_active && use_editor)
+           do_editor (finfo->update_dir, &saved_message,
+                      finfo->repository, ulist);
+       do_verify (&saved_message, finfo->repository, ulist);
+    }
+
+    p = findnode (cilist, finfo->file);
+    if (p == NULL)
+       return 0;
+
+    ci = p->data;
+    if (ci->status == T_MODIFIED)
+    {
+       if (finfo->rcs == NULL)
+           error (1, 0, "internal error: no parsed RCS file");
+       if (lock_RCS (finfo->file, finfo->rcs, ci->rev,
+                     finfo->repository) != 0)
+       {
+           unlockrcs (finfo->rcs);
+           err = 1;
+           goto out;
+       }
+    }
+    else if (ci->status == T_ADDED)
+    {
+       if (checkaddfile (finfo->file, finfo->repository, ci->tag, ci->options,
+                         &finfo->rcs) != 0)
+       {
+           if (finfo->rcs != NULL)
+               fixaddfile (finfo->rcs->path);
+           err = 1;
+           goto out;
+       }
+
+       /* adding files with a tag, now means adding them on a branch.
+          Since the branch test was done in check_fileproc for
+          modified files, we need to stub it in again here. */
+
+       if (ci->tag
+
+           /* If numeric, it is on the trunk; check_fileproc enforced
+              this.  */
+           && !isdigit ((unsigned char) ci->tag[0]))
+       {
+           if (finfo->rcs == NULL)
+               error (1, 0, "internal error: no parsed RCS file");
+           if (ci->rev)
+               free (ci->rev);
+           ci->rev = RCS_whatbranch (finfo->rcs, ci->tag);
+           err = Checkin ('A', finfo, ci->rev,
+                          ci->tag, ci->options, saved_message);
+           if (err != 0)
+           {
+               unlockrcs (finfo->rcs);
+               fixbranch (finfo->rcs, sbranch);
+           }
+
+           (void) time (&last_register_time);
+
+           ci->status = T_UPTODATE;
+       }
+    }
+
+    /*
+     * Add the file for real
+     */
+    if (ci->status == T_ADDED)
+    {
+       char *xrev = NULL;
+
+       if (ci->rev == NULL)
+       {
+           /* find the max major rev number in this directory */
+           maxrev = 0;
+           (void) walklist (finfo->entries, findmaxrev, NULL);
+           if (finfo->rcs->head)
+           {
+               /* resurrecting: include dead revision */
+               int thisrev = atoi (finfo->rcs->head);
+               if (thisrev > maxrev)
+                   maxrev = thisrev;
+           }
+           if (maxrev == 0)
+               maxrev = 1;
+           xrev = Xasprintf ("%d", maxrev);
+       }
+
+       /* XXX - an added file with symbolic -r should add tag as well */
+       err = finaladd (finfo, ci->rev ? ci->rev : xrev, ci->tag, ci->options);
+       if (xrev)
+           free (xrev);
+    }
+    else if (ci->status == T_MODIFIED)
+    {
+       err = Checkin ('M', finfo, ci->rev, ci->tag,
+                      ci->options, saved_message);
+
+       (void) time (&last_register_time);
+
+       if (err != 0)
+       {
+           unlockrcs (finfo->rcs);
+           fixbranch (finfo->rcs, sbranch);
+       }
+    }
+    else if (ci->status == T_REMOVED)
+    {
+       err = remove_file (finfo, ci->tag, saved_message);
+#ifdef SERVER_SUPPORT
+       if (server_active)
+       {
+           server_scratch_entry_only ();
+           server_updated (finfo,
+                           NULL,
+
+                           /* Doesn't matter, it won't get checked.  */
+                           SERVER_UPDATED,
+
+                           (mode_t) -1,
+                           NULL,
+                           NULL);
+       }
+#endif
+    }
+
+    /* Clearly this is right for T_MODIFIED.  I haven't thought so much
+       about T_ADDED or T_REMOVED.  */
+    notify_do ('C', finfo->file, finfo->update_dir, getcaller (), NULL, NULL,
+              finfo->repository);
+
+out:
+    if (err != 0)
+    {
+       /* on failure, remove the file from ulist */
+       p = findnode (ulist, finfo->file);
+       if (p)
+           delnode (p);
+    }
+    else
+    {
+       /* On success, retrieve the new version number of the file and
+           copy it into the log information (see logmsg.c
+           (logfile_write) for more details).  We should only update
+           the version number for files that have been added or
+           modified but not removed since classify_file_internal
+           will return the version number of a file even after it has
+           been removed from the archive, which is not the behavior we
+           want for our commitlog messages; we want the old version
+           number and then "NONE." */
+
+       if (ci->status != T_REMOVED)
+       {
+           p = findnode (ulist, finfo->file);
+           if (p)
+           {
+               Vers_TS *vers;
+               struct logfile_info *li;
+
+               (void) classify_file_internal (finfo, &vers);
+               li = p->data;
+               li->rev_new = xstrdup (vers->vn_rcs);
+               freevers_ts (&vers);
+           }
+       }
+    }
+    if (SIG_inCrSect ())
+       SIG_endCrSect ();
+
+    return err;
+}
+
+
+
+/*
+ * Log the commit and clean up the update list
+ */
+/* ARGSUSED */
+static int
+commit_filesdoneproc (void *callerdat, int err, const char *repository,
+                      const char *update_dir, List *entries)
+{
+    Node *p;
+    List *ulist;
+
+    assert (repository);
+
+    p = findnode (mulist, update_dir);
+    if (p == NULL)
+       return err;
+
+    ulist = ((struct master_lists *) p->data)->ulist;
+
+    got_message = 0;
+
+    /* Build the administrative files if necessary.  */
+    {
+       const char *p;
+
+       if (strncmp (current_parsed_root->directory, repository,
+                    strlen (current_parsed_root->directory)) != 0)
+           error (0, 0,
+                "internal error: repository (%s) doesn't begin with root (%s)",
+                  repository, current_parsed_root->directory);
+       p = repository + strlen (current_parsed_root->directory);
+       if (*p == '/')
+           ++p;
+       if (strcmp ("CVSROOT", p) == 0
+           /* Check for subdirectories because people may want to create
+              subdirectories and list files therein in checkoutlist.  */
+           || strncmp ("CVSROOT/", p, strlen ("CVSROOT/")) == 0
+           )
+       {
+           /* "Database" might a little bit grandiose and/or vague,
+              but "checked-out copies of administrative files, unless
+              in the case of modules and you are using ndbm in which
+              case modules.{pag,dir,db}" is verbose and excessively
+              focused on how the database is implemented.  */
+
+           /* mkmodules requires the absolute name of the CVSROOT directory.
+              Remove anything after the `CVSROOT' component -- this is
+              necessary when committing in a subdirectory of CVSROOT.  */
+           char *admin_dir = xstrdup (repository);
+           int cvsrootlen = strlen ("CVSROOT");
+           assert (admin_dir[p - repository + cvsrootlen] == '\0'
+                   || admin_dir[p - repository + cvsrootlen] == '/');
+           admin_dir[p - repository + cvsrootlen] = '\0';
+
+           if (!really_quiet)
+           {
+               cvs_output (program_name, 0);
+               cvs_output (" ", 1);
+               cvs_output (cvs_cmd_name, 0);
+               cvs_output (": Rebuilding administrative file database\n", 0);
+           }
+           mkmodules (admin_dir);
+           free (admin_dir);
+           WriteTemplate (".", 1, repository);
+       }
+    }
+
+    /* FIXME: This used to be above the block above.  The advantage of being
+     * here is that it is not called until after all possible writes from this
+     * process are complete.  The disadvantage is that a fatal error during
+     * update of CVSROOT can prevent the loginfo script from being called.
+     *
+     * A more general solution I have been considering is calling a generic
+     * "postwrite" hook from the remove write lock routine.
+     */
+    Update_Logfile (repository, saved_message, NULL, ulist);
+
+    return err;
+}
+
+
+
+/*
+ * Get the log message for a dir
+ */
+/* ARGSUSED */
+static Dtype
+commit_direntproc (void *callerdat, const char *dir, const char *repos,
+                   const char *update_dir, List *entries)
+{
+    Node *p;
+    List *ulist;
+    char *real_repos;
+
+    if (!isdir (dir))
+       return R_SKIP_ALL;
+
+    /* find the update list for this dir */
+    p = findnode (mulist, update_dir);
+    if (p != NULL)
+       ulist = ((struct master_lists *) p->data)->ulist;
+    else
+       ulist = NULL;
+
+    /* skip the files as an optimization */
+    if (ulist == NULL || ulist->list->next == ulist->list)
+       return R_SKIP_FILES;
+
+    /* get commit message */
+    got_message = 1;
+    real_repos = Name_Repository (dir, update_dir);
+    if (!server_active && use_editor)
+       do_editor (update_dir, &saved_message, real_repos, ulist);
+    do_verify (&saved_message, real_repos, ulist);
+    free (real_repos);
+    return R_PROCESS;
+}
+
+
+
+/*
+ * Process the post-commit proc if necessary
+ */
+/* ARGSUSED */
+static int
+commit_dirleaveproc (void *callerdat, const char *dir, int err,
+                     const char *update_dir, List *entries)
+{
+    /* update the per-directory tag info */
+    /* FIXME?  Why?  The "commit examples" node of cvs.texinfo briefly
+       mentions commit -r being sticky, but apparently in the context of
+       this being a confusing feature!  */
+    if (err == 0 && write_dirtag != NULL)
+    {
+       char *repos = Name_Repository (NULL, update_dir);
+       WriteTag (NULL, write_dirtag, NULL, write_dirnonbranch,
+                 update_dir, repos);
+       free (repos);
+    }
+
+    return err;
+}
+
+
+
+/*
+ * find the maximum major rev number in an entries file
+ */
+static int
+findmaxrev (Node *p, void *closure)
+{
+    int thisrev;
+    Entnode *entdata = p->data;
+
+    if (entdata->type != ENT_FILE)
+       return 0;
+    thisrev = atoi (entdata->version);
+    if (thisrev > maxrev)
+       maxrev = thisrev;
+    return 0;
+}
+
+/*
+ * Actually remove a file by moving it to the attic
+ * XXX - if removing a ,v file that is a relative symbolic link to
+ * another ,v file, we probably should add a ".." component to the
+ * link to keep it relative after we move it into the attic.
+
+   Return value is 0 on success, or >0 on error (in which case we have
+   printed an error message).  */
+static int
+remove_file (struct file_info *finfo, char *tag, char *message)
+{
+    int retcode;
+
+    int branch;
+    int lockflag;
+    char *corev;
+    char *rev;
+    char *prev_rev;
+    char *old_path;
+
+    corev = NULL;
+    rev = NULL;
+    prev_rev = NULL;
+
+    retcode = 0;
+
+    if (finfo->rcs == NULL)
+       error (1, 0, "internal error: no parsed RCS file");
+
+    branch = 0;
+    if (tag && !(branch = RCS_nodeisbranch (finfo->rcs, tag)))
+    {
+       /* a symbolic tag is specified; just remove the tag from the file */
+       if ((retcode = RCS_deltag (finfo->rcs, tag)) != 0)
+       {
+           if (!quiet)
+               error (0, retcode == -1 ? errno : 0,
+                      "failed to remove tag `%s' from `%s'", tag,
+                      finfo->fullname);
+           return 1;
+       }
+       RCS_rewrite (finfo->rcs, NULL, NULL);
+       Scratch_Entry (finfo->entries, finfo->file);
+       return 0;
+    }
+
+    /* we are removing the file from either the head or a branch */
+    /* commit a new, dead revision. */
+
+    rev = NULL;
+    lockflag = 1;
+    if (branch)
+    {
+       char *branchname;
+
+       rev = RCS_whatbranch (finfo->rcs, tag);
+       if (rev == NULL)
+       {
+           error (0, 0, "cannot find branch \"%s\".", tag);
+           return 1;
+       }
+
+       branchname = RCS_getbranch (finfo->rcs, rev, 1);
+       if (branchname == NULL)
+       {
+           /* no revision exists on this branch.  use the previous
+              revision but do not lock. */
+           corev = RCS_gettag (finfo->rcs, tag, 1, NULL);
+           prev_rev = xstrdup (corev);
+           lockflag = 0;
+       } else
+       {
+           corev = xstrdup (rev);
+           prev_rev = xstrdup (branchname);
+           free (branchname);
+       }
+
+    } else  /* Not a branch */
+    {
+        /* Get current head revision of file. */
+       prev_rev = RCS_head (finfo->rcs);
+    }
+
+    /* if removing without a tag or a branch, then make sure the default
+       branch is the trunk. */
+    if (!tag && !branch)
+    {
+        if (RCS_setbranch (finfo->rcs, NULL) != 0)
+       {
+           error (0, 0, "cannot change branch to default for %s",
+                  finfo->fullname);
+           return 1;
+       }
+       RCS_rewrite (finfo->rcs, NULL, NULL);
+    }
+
+    /* check something out.  Generally this is the head.  If we have a
+       particular rev, then name it.  */
+    retcode = RCS_checkout (finfo->rcs, finfo->file, rev ? corev : NULL,
+                           NULL, NULL, RUN_TTY, NULL, NULL);
+    if (retcode != 0)
+    {
+       error (0, 0,
+              "failed to check out `%s'", finfo->fullname);
+       return 1;
+    }
+
+    /* Except when we are creating a branch, lock the revision so that
+       we can check in the new revision.  */
+    if (lockflag)
+    {
+       if (RCS_lock (finfo->rcs, rev ? corev : NULL, 1) == 0)
+           RCS_rewrite (finfo->rcs, NULL, NULL);
+    }
+
+    if (corev != NULL)
+       free (corev);
+
+    retcode = RCS_checkin (finfo->rcs, NULL, finfo->file, message,
+                          rev, 0, RCS_FLAGS_DEAD | RCS_FLAGS_QUIET);
+    if (retcode        != 0)
+    {
+       if (!quiet)
+           error (0, retcode == -1 ? errno : 0,
+                  "failed to commit dead revision for `%s'", finfo->fullname);
+       return 1;
+    }
+    /* At this point, the file has been committed as removed.  We should
+       probably tell the history file about it  */
+    history_write ('R', NULL, finfo->rcs->head, finfo->file, 
finfo->repository);
+
+    if (rev != NULL)
+       free (rev);
+
+    old_path = xstrdup (finfo->rcs->path);
+    if (!branch)
+       RCS_setattic (finfo->rcs, 1);
+
+    /* Print message that file was removed. */
+    if (!really_quiet)
+    {
+       cvs_output (old_path, 0);
+       cvs_output ("  <--  ", 0);
+       if (finfo->update_dir && strlen (finfo->update_dir))
+       {
+           cvs_output (finfo->update_dir, 0);
+           cvs_output ("/", 1);
+       }
+       cvs_output (finfo->file, 0);
+       cvs_output ("\nnew revision: delete; previous revision: ", 0);
+       cvs_output (prev_rev, 0);
+       cvs_output ("\n", 0);
+    }
+
+    free (prev_rev);
+
+    free (old_path);
+
+    Scratch_Entry (finfo->entries, finfo->file);
+    return 0;
+}
+
+
+
+/*
+ * Do the actual checkin for added files
+ */
+static int
+finaladd (struct file_info *finfo, char *rev, char *tag, char *options)
+{
+    int ret;
+
+    ret = Checkin ('A', finfo, rev, tag, options, saved_message);
+    if (ret == 0)
+    {
+       char *tmp = Xasprintf ("%s/%s%s", CVSADM, finfo->file, CVSEXT_LOG);
+       if (unlink_file (tmp) < 0
+           && !existence_error (errno))
+           error (0, errno, "cannot remove %s", tmp);
+       free (tmp);
+    }
+    else if (finfo->rcs != NULL)
+       fixaddfile (finfo->rcs->path);
+
+    (void) time (&last_register_time);
+
+    return ret;
+}
+
+
+
+/*
+ * Unlock an rcs file
+ */
+static void
+unlockrcs (RCSNode *rcs)
+{
+    int retcode;
+
+    if ((retcode = RCS_unlock (rcs, NULL, 1)) != 0)
+       error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0,
+              "could not unlock %s", rcs->path);
+    else
+       RCS_rewrite (rcs, NULL, NULL);
+}
+
+
+
+/*
+ * remove a partially added file.  if we can parse it, leave it alone.
+ *
+ * FIXME: Every caller that calls this function can access finfo->rcs (the
+ * parsed RCSNode data), so we should be able to detect that the file needs
+ * to be removed without reparsing the file as we do below.
+ */
+static void
+fixaddfile (const char *rcs)
+{
+    RCSNode *rcsfile;
+    int save_really_quiet;
+
+    save_really_quiet = really_quiet;
+    really_quiet = 1;
+    if ((rcsfile = RCS_parsercsfile (rcs)) == NULL)
+    {
+       if (unlink_file (rcs) < 0)
+           error (0, errno, "cannot remove %s", rcs);
+    }
+    else
+       freercsnode (&rcsfile);
+    really_quiet = save_really_quiet;
+}
+
+
+
+/*
+ * put the branch back on an rcs file
+ */
+static void
+fixbranch (RCSNode *rcs, char *branch)
+{
+    int retcode;
+
+    if (branch != NULL)
+    {
+       if ((retcode = RCS_setbranch (rcs, branch)) != 0)
+           error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0,
+                  "cannot restore branch to %s for %s", branch, rcs->path);
+       RCS_rewrite (rcs, NULL, NULL);
+    }
+}
+
+
+
+/*
+ * do the initial part of a file add for the named file.  if adding
+ * with a tag, put the file in the Attic and point the symbolic tag
+ * at the committed revision.
+ *
+ * INPUTS
+ *   file      The name of the file in the workspace.
+ *   repository        The repository directory to expect to find FILE,v in.
+ *   tag       The name or rev num of the branch being added to, if any.
+ *   options   Any RCS keyword expansion options specified by the user.
+ *   rcsnode   A pointer to the pre-parsed RCSNode for this file, if the file
+ *             exists in the repository.  If this is NULL, assume the file
+ *             does not yet exist.
+ *
+ * RETURNS
+ *   0 on success.
+ *   1 on errors, after printing any appropriate error messages.
+ *
+ * ERRORS
+ *   This function will return an error when any of the following functions do:
+ *     add_rcs_file
+ *     RCS_setattic
+ *     lock_RCS
+ *     RCS_checkin
+ *     RCS_parse (called to verify the newly created archive file)
+ *     RCS_settag
+ */
+
+static int
+checkaddfile (const char *file, const char *repository, const char *tag,
+              const char *options, RCSNode **rcsnode)
+{
+    RCSNode *rcs;
+    char *fname;
+    int newfile = 0;           /* Set to 1 if we created a new RCS archive. */
+    int retval = 1;
+    int adding_on_branch;
+
+    assert (rcsnode != NULL);
+
+    /* Callers expect to be able to use either "" or NULL to mean the
+       default keyword expansion.  */
+    if (options != NULL && options[0] == '\0')
+       options = NULL;
+    if (options != NULL)
+       assert (options[0] == '-' && options[1] == 'k');
+
+    /* If numeric, it is on the trunk; check_fileproc enforced
+       this.  */
+    adding_on_branch = tag != NULL && !isdigit ((unsigned char) tag[0]);
+
+    if (*rcsnode == NULL)
+    {
+       char *rcsname;
+       char *desc = NULL;
+       size_t descalloc = 0;
+       size_t desclen = 0;
+       const char *opt;
+
+       if (adding_on_branch)
+       {
+           mode_t omask;
+           rcsname = xmalloc (strlen (repository)
+                              + sizeof (CVSATTIC)
+                              + strlen (file)
+                              + sizeof (RCSEXT)
+                              + 3);
+           (void) sprintf (rcsname, "%s/%s", repository, CVSATTIC);
+           omask = umask (cvsumask);
+           if (CVS_MKDIR (rcsname, 0777) != 0 && errno != EEXIST)
+               error (1, errno, "cannot make directory `%s'", rcsname);
+           (void) umask (omask);
+           (void) sprintf (rcsname,
+                           "%s/%s/%s%s",
+                           repository,
+                           CVSATTIC,
+                           file,
+                           RCSEXT);
+       }
+       else
+           rcsname = Xasprintf ("%s/%s%s", repository, file, RCSEXT);
+
+       /* this is the first time we have ever seen this file; create
+          an RCS file.  */
+       fname = Xasprintf ("%s/%s%s", CVSADM, file, CVSEXT_LOG);
+       /* If the file does not exist, no big deal.  In particular, the
+          server does not (yet at least) create CVSEXT_LOG files.  */
+       if (isfile (fname))
+           /* FIXME: Should be including update_dir in the appropriate
+              place here.  */
+           get_file (fname, fname, "r", &desc, &descalloc, &desclen);
+       free (fname);
+
+       /* From reading the RCS 5.7 source, "rcs -i" adds a newline to the
+          end of the log message if the message is nonempty.
+          Do it.  RCS also deletes certain whitespace, in cleanlogmsg,
+          which we don't try to do here.  */
+       if (desclen > 0)
+       {
+           expand_string (&desc, &descalloc, desclen + 1);
+           desc[desclen++] = '\012';
+       }
+
+       /* Set RCS keyword expansion options.  */
+       if (options != NULL)
+           opt = options + 2;
+       else
+           opt = NULL;
+
+       if (add_rcs_file (NULL, rcsname, file, NULL, opt,
+                         NULL, NULL, 0, NULL,
+                         desc, desclen, NULL, 0) != 0)
+       {
+           if (rcsname != NULL)
+               free (rcsname);
+           goto out;
+       }
+       rcs = RCS_parsercsfile (rcsname);
+       newfile = 1;
+       if (rcsname != NULL)
+           free (rcsname);
+       if (desc != NULL)
+           free (desc);
+       *rcsnode = rcs;
+    }
+    else
+    {
+       /* file has existed in the past.  Prepare to resurrect. */
+       char *rev;
+       char *oldexpand;
+
+       rcs = *rcsnode;
+
+       oldexpand = RCS_getexpand (rcs);
+       if ((oldexpand != NULL
+            && options != NULL
+            && strcmp (options + 2, oldexpand) != 0)
+           || (oldexpand == NULL && options != NULL))
+       {
+           /* We tell the user about this, because it means that the
+              old revisions will no longer retrieve the way that they
+              used to.  */
+           error (0, 0,
+"changing keyword expansion mode of `%s' from `-k%s' to `%s'",
+                  file, oldexpand ? oldexpand : "kv", options);
+           RCS_setexpand (rcs, options + 2);
+       }
+
+       if (!adding_on_branch)
+       {
+           /* We are adding on the trunk, so move the file out of the
+              Attic.  */
+           if (!(rcs->flags & INATTIC))
+           {
+               error (0, 0, "warning: expected %s to be in Attic",
+                      rcs->path);
+           }
+
+           /* Begin a critical section around the code that spans the
+              first commit on the trunk of a file that's already been
+              committed on a branch.  */
+           SIG_beginCrSect ();
+
+           if (RCS_setattic (rcs, 0))
+           {
+               goto out;
+           }
+       }
+
+       rev = RCS_getversion (rcs, tag, NULL, 1, NULL);
+       /* and lock it */
+       if (lock_RCS (file, rcs, rev, repository))
+       {
+           error (0, 0, "cannot lock revision %s in `%s'.",
+                  rev ? rev : tag ? tag : "HEAD", rcs->path);
+           if (rev != NULL)
+               free (rev);
+           goto out;
+       }
+
+       if (rev != NULL)
+           free (rev);
+    }
+
+    /* when adding a file for the first time, and using a tag, we need
+       to create a dead revision on the trunk.  */
+    if (adding_on_branch)
+    {
+       if (newfile)
+       {
+           char *tmp;
+           FILE *fp;
+           int retcode;
+
+           /* move the new file out of the way. */
+           fname = Xasprintf ("%s/%s%s", CVSADM, CVSPREFIX, file);
+           rename_file (file, fname);
+
+           /* Create empty FILE.  Can't use copy_file with a DEVNULL
+              argument -- copy_file now ignores device files. */
+           fp = fopen (file, "w");
+           if (fp == NULL)
+               error (1, errno, "cannot open %s for writing", file);
+           if (fclose (fp) < 0)
+               error (0, errno, "cannot close %s", file);
+
+           tmp = Xasprintf ("file %s was initially added on branch %s.",
+                            file, tag);
+           /* commit a dead revision. */
+           retcode = RCS_checkin (rcs, NULL, NULL, tmp, NULL, 0,
+                                  RCS_FLAGS_DEAD | RCS_FLAGS_QUIET);
+           free (tmp);
+           if (retcode != 0)
+           {
+               error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0,
+                      "could not create initial dead revision %s", rcs->path);
+               free (fname);
+               goto out;
+           }
+
+           /* put the new file back where it was */
+           rename_file (fname, file);
+           free (fname);
+
+           /* double-check that the file was written correctly */
+           freercsnode (&rcs);
+           rcs = RCS_parse (file, repository);
+           if (rcs == NULL)
+           {
+               error (0, 0, "could not read %s", rcs->path);
+               goto out;
+           }
+           *rcsnode = rcs;
+
+           /* and lock it once again. */
+           if (lock_RCS (file, rcs, NULL, repository))
+           {
+               error (0, 0, "cannot lock initial revision in `%s'.",
+                      rcs->path);
+               goto out;
+           }
+       }
+
+       /* when adding with a tag, we need to stub a branch, if it
+          doesn't already exist.  */
+       if (!RCS_nodeisbranch (rcs, tag))
+       {
+           /* branch does not exist.  Stub it.  */
+           char *head;
+           char *magicrev;
+           int retcode;
+           time_t headtime = -1;
+           char *revnum, *tmp;
+           FILE *fp;
+           time_t t = -1;
+           struct tm *ct;
+
+           fixbranch (rcs, sbranch);
+
+           head = RCS_getversion (rcs, NULL, NULL, 0, NULL);
+           if (!head)
+               error (1, 0, "No head revision in archive file `%s'.",
+                      rcs->print_path);
+           magicrev = RCS_magicrev (rcs, head);
+
+           /* If this is not a new branch, then we will want a dead
+              version created before this one. */
+           if (!newfile)
+               headtime = RCS_getrevtime (rcs, head, 0, 0);
+
+           retcode = RCS_settag (rcs, tag, magicrev);
+           RCS_rewrite (rcs, NULL, NULL);
+
+           free (head);
+           free (magicrev);
+
+           if (retcode != 0)
+           {
+               error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0,
+                      "could not stub branch %s for %s", tag, rcs->path);
+               goto out;
+           }
+           /* We need to add a dead version here to avoid -rtag -Dtime
+              checkout problems between when the head version was
+              created and now. */
+           if (!newfile && headtime != -1)
+           {
+               /* move the new file out of the way. */
+               fname = Xasprintf ("%s/%s%s", CVSADM, CVSPREFIX, file);
+               rename_file (file, fname);
+
+               /* Create empty FILE.  Can't use copy_file with a DEVNULL
+                  argument -- copy_file now ignores device files. */
+               fp = fopen (file, "w");
+               if (fp == NULL)
+                   error (1, errno, "cannot open %s for writing", file);
+               if (fclose (fp) < 0)
+                   error (0, errno, "cannot close %s", file);
+
+               /* As we will be hacking the delta date, put the time
+                  this was added into the log message. */
+               t = time (NULL);
+               ct = gmtime (&t);
+               tmp = Xasprintf ("file %s was added on branch %s on 
%d-%02d-%02d %02d:%02d:%02d +0000",
+                                file, tag,
+                                ct->tm_year + (ct->tm_year < 100 ? 0 : 1900),
+                                ct->tm_mon + 1, ct->tm_mday,
+                                ct->tm_hour, ct->tm_min, ct->tm_sec);
+                        
+               /* commit a dead revision. */
+               revnum = RCS_whatbranch (rcs, tag);
+               retcode = RCS_checkin (rcs, NULL, NULL, tmp, revnum, headtime,
+                                      RCS_FLAGS_DEAD |
+                                      RCS_FLAGS_QUIET |
+                                      RCS_FLAGS_USETIME);
+               free (revnum);
+               free (tmp);
+
+               if (retcode != 0)
+               {
+                   error (retcode == -1 ? 1 : 0, retcode == -1 ? errno : 0,
+                          "could not created dead stub %s for %s", tag,
+                          rcs->path);
+                   goto out;
+               }
+
+               /* put the new file back where it was */
+               rename_file (fname, file);
+               free (fname);
+
+               /* double-check that the file was written correctly */
+               freercsnode (&rcs);
+               rcs = RCS_parse (file, repository);
+               if (rcs == NULL)
+               {
+                   error (0, 0, "could not read %s", rcs->path);
+                   goto out;
+               }
+               *rcsnode = rcs;
+           }
+       }
+       else
+       {
+           /* lock the branch. (stubbed branches need not be locked.)  */
+           if (lock_RCS (file, rcs, NULL, repository))
+           {
+               error (0, 0, "cannot lock head revision in `%s'.", rcs->path);
+               goto out;
+           }
+       }
+
+       if (*rcsnode != rcs)
+       {
+           freercsnode (rcsnode);
+           *rcsnode = rcs;
+       }
+    }
+
+    fileattr_newfile (file);
+
+    /* At this point, we used to set the file mode of the RCS file
+       based on the mode of the file in the working directory.  If we
+       are creating the RCS file for the first time, add_rcs_file does
+       this already.  If we are re-adding the file, then perhaps it is
+       consistent to preserve the old file mode, just as we preserve
+       the old keyword expansion mode.
+
+       If we decide that we should change the modes, then we can't do
+       it here anyhow.  At this point, the RCS file may be owned by
+       somebody else, so a chmod will fail.  We need to instead do the
+       chmod after rewriting it.
+
+       FIXME: In general, I think the file mode (and the keyword
+       expansion mode) should be associated with a particular revision
+       of the file, so that it is possible to have different revisions
+       of a file have different modes.  */
+
+    retval = 0;
+
+ out:
+    if (retval != 0 && SIG_inCrSect ())
+       SIG_endCrSect ();
+    return retval;
+}
+
+
+
+/*
+ * Attempt to place a lock on the RCS file; returns 0 if it could and 1 if it
+ * couldn't.  If the RCS file currently has a branch as the head, we must
+ * move the head back to the trunk before locking the file, and be sure to
+ * put the branch back as the head if there are any errors.
+ */
+static int
+lock_RCS (const char *user, RCSNode *rcs, const char *rev,
+          const char *repository)
+{
+    char *branch = NULL;
+    int err = 0;
+
+    /*
+     * For a specified, numeric revision of the form "1" or "1.1", (or when
+     * no revision is specified ""), definitely move the branch to the trunk
+     * before locking the RCS file.
+     *
+     * The assumption is that if there is more than one revision on the trunk,
+     * the head points to the trunk, not a branch... and as such, it's not
+     * necessary to move the head in this case.
+     */
+    if (rev == NULL
+       || (rev && isdigit ((unsigned char) *rev) && numdots (rev) < 2))
+    {
+       branch = xstrdup (rcs->branch);
+       if (branch != NULL)
+       {
+           if (RCS_setbranch (rcs, NULL) != 0)
+           {
+               error (0, 0, "cannot change branch to default for %s",
+                      rcs->path);
+               if (branch)
+                   free (branch);
+               return 1;
+           }
+       }
+       err = RCS_lock (rcs, NULL, 1);
+    }
+    else
+    {
+       RCS_lock (rcs, rev, 1);
+    }
+
+    /* We used to call RCS_rewrite here, and that might seem
+       appropriate in order to write out the locked revision
+       information.  However, such a call would actually serve no
+       purpose.  CVS locks will prevent any interference from other
+       CVS processes.  The comment above rcs_internal_lockfile
+       explains that it is already unsafe to use RCS and CVS
+       simultaneously.  It follows that writing out the locked
+       revision information here would add no additional security.
+
+       If we ever do care about it, the proper fix is to create the
+       RCS lock file before calling this function, and maintain it
+       until the checkin is complete.
+
+       The call to RCS_lock is still required at present, since in
+       some cases RCS_checkin will determine which revision to check
+       in by looking for a lock.  FIXME: This is rather roundabout,
+       and a more straightforward approach would probably be easier to
+       understand.  */
+
+    if (err == 0)
+    {
+       if (sbranch != NULL)
+           free (sbranch);
+       sbranch = branch;
+       return 0;
+    }
+
+    /* try to restore the branch if we can on error */
+    if (branch != NULL)
+       fixbranch (rcs, branch);
+
+    if (branch)
+       free (branch);
+    return 1;
+}
+
+
+
+/*
+ * free an UPDATE node's data
+ */
+void
+update_delproc (Node *p)
+{
+    struct logfile_info *li = p->data;
+
+    if (li->tag)
+       free (li->tag);
+    if (li->rev_old)
+       free (li->rev_old);
+    if (li->rev_new)
+       free (li->rev_new);
+    free (li);
+}
+
+/*
+ * Free the commit_info structure in p.
+ */
+static void
+ci_delproc (Node *p)
+{
+    struct commit_info *ci = p->data;
+
+    if (ci->rev)
+       free (ci->rev);
+    if (ci->tag)
+       free (ci->tag);
+    if (ci->options)
+       free (ci->options);
+    free (ci);
+}
+
+/*
+ * Free the commit_info structure in p.
+ */
+static void
+masterlist_delproc (Node *p)
+{
+    struct master_lists *ml = p->data;
+
+    dellist (&ml->ulist);
+    dellist (&ml->cilist);
+    free (ml);
+}
Index: ccvs/src/cvs.h
diff -u /dev/null ccvs/src/cvs.h:1.345.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/cvs.h      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,751 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS kit.
+ */
+
+/*
+ * basic information used in all source files
+ *
+ */
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>           /* this is stuff found via autoconf */
+#endif /* CONFIG_H */
+
+/* Add GNU attribute suppport.  */
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+#  define __attribute__(Spec) /* empty */
+# else
+#   if __GNUC__ == 2 && __GNUC_MINOR__ < 96
+#    define __pure__   /* empty */
+#   endif
+#   if __GNUC__ < 3
+#    define __malloc__ /* empty */
+#   endif
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#  define __const__    const
+#  define __format__   format
+#  define __noreturn__ noreturn
+#  define __printf__   printf
+# endif
+#endif /* __attribute__ */
+
+/* Some GNULIB headers require that we include system headers first.  */
+#include "system.h"
+
+/* begin GNULIB headers */
+#include "dirname.h"
+#include "exit.h"
+#include "getdate.h"
+#include "minmax.h"
+#include "regex.h"
+#include "strcase.h"
+#include "stat-macros.h"
+#include "timespec.h"
+#include "unlocked-io.h"
+#include "xalloc.h"
+#include "xgetcwd.h"
+#include "xreadlink.h"
+#include "xsize.h"
+/* end GNULIB headers */
+
+#if ! STDC_HEADERS
+char *getenv();
+#endif /* ! STDC_HEADERS */
+
+/* Under OS/2, <stdio.h> doesn't define popen()/pclose(). */
+#ifdef USE_OWN_POPEN
+#include "popen.h"
+#endif
+
+#ifdef SERVER_SUPPORT
+/* If the system doesn't provide strerror, it won't be declared in
+   string.h.  */
+char *strerror (int);
+#endif
+
+#include "hash.h"
+#include "stack.h"
+
+#include "root.h"
+
+#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
+# include "client.h"
+#endif
+
+#ifdef MY_NDBM
+#include "myndbm.h"
+#else
+#include <ndbm.h>
+#endif /* MY_NDBM */
+
+#include "rcs.h"
+
+
+
+/* Note that the _ONLY_ reason for PATH_MAX is if various system calls (getwd,
+ * getcwd, readlink) require/want us to use it.  All other parts of CVS
+ * allocate pathname buffers dynamically, and we want to keep it that way.
+ */
+#include "pathmax.h"
+
+
+
+/* Definitions for the CVS Administrative directory and the files it contains.
+   Here as #define's to make changing the names a simple task.  */
+
+#ifdef USE_VMS_FILENAMES
+#define CVSADM          "CVS"
+#define CVSADM_ENT      "CVS/Entries."
+#define CVSADM_ENTBAK   "CVS/Entries.Backup"
+#define CVSADM_ENTLOG   "CVS/Entries.Log"
+#define CVSADM_ENTSTAT  "CVS/Entries.Static"
+#define CVSADM_REP      "CVS/Repository."
+#define CVSADM_ROOT     "CVS/Root."
+#define CVSADM_TAG      "CVS/Tag."
+#define CVSADM_NOTIFY   "CVS/Notify."
+#define CVSADM_NOTIFYTMP "CVS/Notify.tmp"
+#define CVSADM_BASE      "CVS/Base"
+#define CVSADM_BASEREV   "CVS/Baserev."
+#define CVSADM_BASEREVTMP "CVS/Baserev.tmp"
+#define CVSADM_TEMPLATE "CVS/Template."
+#else /* USE_VMS_FILENAMES */
+#define        CVSADM          "CVS"
+#define        CVSADM_ENT      "CVS/Entries"
+#define        CVSADM_ENTBAK   "CVS/Entries.Backup"
+#define CVSADM_ENTLOG  "CVS/Entries.Log"
+#define        CVSADM_ENTSTAT  "CVS/Entries.Static"
+#define        CVSADM_REP      "CVS/Repository"
+#define        CVSADM_ROOT     "CVS/Root"
+#define        CVSADM_TAG      "CVS/Tag"
+#define CVSADM_NOTIFY  "CVS/Notify"
+#define CVSADM_NOTIFYTMP "CVS/Notify.tmp"
+/* A directory in which we store base versions of files we currently are
+   editing with "cvs edit".  */
+#define CVSADM_BASE     "CVS/Base"
+#define CVSADM_BASEREV  "CVS/Baserev"
+#define CVSADM_BASEREVTMP "CVS/Baserev.tmp"
+/* File which contains the template for use in log messages.  */
+#define CVSADM_TEMPLATE "CVS/Template"
+#endif /* USE_VMS_FILENAMES */
+
+/* This is the special directory which we use to store various extra
+   per-directory information in the repository.  It must be the same as
+   CVSADM to avoid creating a new reserved directory name which users cannot
+   use, but is a separate #define because if anyone changes it (which I don't
+   recommend), one needs to deal with old, unconverted, repositories.
+   
+   See fileattr.h for details about file attributes, the only thing stored
+   in CVSREP currently.  */
+#define CVSREP "CVS"
+
+/*
+ * Definitions for the CVSROOT Administrative directory and the files it
+ * contains.  This directory is created as a sub-directory of the $CVSROOT
+ * environment variable, and holds global administration information for the
+ * entire source repository beginning at $CVSROOT.
+ */
+#define        CVSROOTADM              "CVSROOT"
+#define        CVSROOTADM_CHECKOUTLIST "checkoutlist"
+#define CVSROOTADM_COMMITINFO  "commitinfo"
+#define CVSROOTADM_CONFIG      "config"
+#define        CVSROOTADM_HISTORY      "history"
+#define        CVSROOTADM_IGNORE       "cvsignore"
+#define        CVSROOTADM_LOGINFO      "loginfo"
+#define        CVSROOTADM_MODULES      "modules"
+#define CVSROOTADM_NOTIFY      "notify"
+#define CVSROOTADM_PASSWD      "passwd"
+#define CVSROOTADM_POSTADMIN   "postadmin"
+#define CVSROOTADM_POSTPROXY   "postproxy"
+#define CVSROOTADM_POSTTAG     "posttag"
+#define CVSROOTADM_POSTWATCH   "postwatch"
+#define CVSROOTADM_PREPROXY    "preproxy"
+#define        CVSROOTADM_RCSINFO      "rcsinfo"
+#define CVSROOTADM_READERS     "readers"
+#define CVSROOTADM_TAGINFO      "taginfo"
+#define CVSROOTADM_USERS       "users"
+#define CVSROOTADM_VALTAGS     "val-tags"
+#define CVSROOTADM_VERIFYMSG    "verifymsg"
+#define CVSROOTADM_WRAPPER     "cvswrappers"
+#define CVSROOTADM_WRITERS     "writers"
+
+#define CVSNULLREPOS           "Emptydir"      /* an empty directory */
+
+/* Other CVS file names */
+
+/* Files go in the attic if the head main branch revision is dead,
+   otherwise they go in the regular repository directories.  The whole
+   concept of having an attic is sort of a relic from before death
+   support but on the other hand, it probably does help the speed of
+   some operations (such as main branch checkouts and updates).  */
+#define        CVSATTIC        "Attic"
+
+#define        CVSLCK          "#cvs.lock"
+#define        CVSHISTORYLCK   "#cvs.history.lock"
+#define        CVSVALTAGSLCK   "#cvs.val-tags.lock"
+#define        CVSRFL          "#cvs.rfl"
+#define        CVSPFL          "#cvs.pfl"
+#define        CVSWFL          "#cvs.wfl"
+#define CVSPFLPAT      "#cvs.pfl.*"    /* wildcard expr to match plocks */
+#define CVSRFLPAT      "#cvs.rfl.*"    /* wildcard expr to match read locks */
+#define        CVSEXT_LOG      ",t"
+#define        CVSPREFIX       ",,"
+#define CVSDOTIGNORE   ".cvsignore"
+#define CVSDOTWRAPPER   ".cvswrappers"
+
+/* Command attributes -- see function lookup_command_attribute(). */
+#define CVS_CMD_IGNORE_ADMROOT        1
+
+/* Set if CVS needs to create a CVS/Root file upon completion of this
+   command.  The name may be slightly confusing, because the flag
+   isn't really as general purpose as it seems (it is not set for cvs
+   release).  */
+
+#define CVS_CMD_USES_WORK_DIR         2
+
+#define CVS_CMD_MODIFIES_REPOSITORY   4
+
+/* miscellaneous CVS defines */
+
+/* This is the string which is at the start of the non-log-message lines
+   that we put up for the user when they edit the log message.  */
+#define        CVSEDITPREFIX   "CVS: "
+/* Number of characters in CVSEDITPREFIX to compare when deciding to strip
+   off those lines.  We don't check for the space, to accomodate users who
+   have editors which strip trailing spaces.  */
+#define CVSEDITPREFIXLEN 4
+
+#define        CVSLCKAGE       (60*60)         /* 1-hour old lock files 
cleaned up */
+#define        CVSLCKSLEEP     30              /* wait 30 seconds before 
retrying */
+#define        CVSBRANCH       "1.1.1"         /* RCS branch used for vendor 
srcs */
+
+/*
+ * Special tags. -rHEAD        refers to the head of an RCS file, regardless 
of any
+ * sticky tags. -rBASE refers to the current revision the user has checked
+ * out This mimics the behaviour of RCS.
+ */
+#define        TAG_HEAD        "HEAD"
+#define        TAG_BASE        "BASE"
+
+/* Environment variable used by CVS */
+#define        CVSREAD_ENV     "CVSREAD"       /* make files read-only */
+#define        CVSREAD_DFLT    0               /* writable files by default */
+
+#define        CVSREADONLYFS_ENV "CVSREADONLYFS" /* repository is read-only */
+
+#define        TMPDIR_ENV      "TMPDIR"        /* Temporary directory */
+#define        CVS_PID_ENV     "CVS_PID"       /* pid of running cvs */
+
+#define        EDITOR1_ENV     "CVSEDITOR"     /* which editor to use */
+#define        EDITOR2_ENV     "VISUAL"        /* which editor to use */
+#define        EDITOR3_ENV     "EDITOR"        /* which editor to use */
+
+#define        CVSROOT_ENV     "CVSROOT"       /* source directory root */
+/* Define CVSROOT_DFLT to a fallback value for CVSROOT.
+ *
+#undef CVSROOT_DFL
+ */
+
+#define        IGNORE_ENV      "CVSIGNORE"     /* More files to ignore */
+#define WRAPPER_ENV     "CVSWRAPPERS"   /* name of the wrapper file */
+
+#define        CVSUMASK_ENV    "CVSUMASK"      /* Effective umask for 
repository */
+
+#define        CVSNOBASES_ENV  "CVSNOBASES"    /* Suppress use of base files 
when
+                                        * set.
+                                        */
+
+/*
+ * If the beginning of the Repository matches the following string, strip it
+ * so that the output to the logfile does not contain a full pathname.
+ *
+ * If the CVSROOT environment variable is set, it overrides this define.
+ */
+#define        REPOS_STRIP     "/master/"
+
+/* Large enough to hold DATEFORM.  Not an arbitrary limit as long as
+   it is used for that purpose, and not to hold a string from the
+   command line, the client, etc.  */
+#define MAXDATELEN     50
+
+#include "entries.h"
+
+/* The type of request that is being done in do_module() */
+enum mtype
+{
+    CHECKOUT, TAG, PATCH, EXPORT, MISC
+};
+
+/*
+ * structure used for list-private storage by Entries_Open() and
+ * Version_TS() and Find_Directories().
+ */
+struct stickydirtag
+{
+    /* These fields pass sticky tag information from Entries_Open() to
+       Version_TS().  */
+    int aflag;
+    char *tag;
+    char *date;
+    int nonbranch;
+
+    /* This field is set by Entries_Open() if there was subdirectory
+       information; Find_Directories() uses it to see whether it needs
+       to scan the directory itself.  */
+    int subdirs;
+};
+
+/* Flags for find_{names,dirs} routines */
+#define W_LOCAL                        0x01    /* look for files locally */
+#define W_REPOS                        0x02    /* look for files in the 
repository */
+#define W_ATTIC                        0x04    /* look for files in the attic 
*/
+
+/* Flags for return values of direnter procs for the recursion processor */
+enum direnter_type
+{
+    R_PROCESS = 1,                     /* process files and maybe dirs */
+    R_SKIP_FILES,                      /* don't process files in this dir */
+    R_SKIP_DIRS,                       /* don't process sub-dirs */
+    R_SKIP_ALL                         /* don't process files or dirs */
+};
+#ifdef ENUMS_CAN_BE_TROUBLE
+typedef int Dtype;
+#else
+typedef enum direnter_type Dtype;
+#endif
+
+/* Recursion processor lock types */
+#define CVS_LOCK_NONE  0
+#define CVS_LOCK_READ  1
+#define CVS_LOCK_WRITE 2
+
+/* Option flags for Parse_Info() */
+#define PIOPT_ALL 1    /* accept "all" keyword */
+
+extern const char *program_name, *program_path, *cvs_cmd_name;
+extern char *Editor;
+extern int cvsadmin_root;
+extern char *CurDir;
+extern int really_quiet, quiet;
+extern int use_editor;
+extern int cvswrite;
+extern mode_t cvsumask;
+
+/* Temp dir abstraction.  */
+/* From main.c.  */
+const char *get_cvs_tmp_dir (void);
+/* From filesubr.c.  */
+const char *get_system_temp_dir (void);
+void push_env_temp_dir (void);
+
+
+/* This global variable holds the global -d option.  It is NULL if -d
+   was not used, which means that we must get the CVSroot information
+   from the CVSROOT environment variable or from a CVS/Root file.  */
+extern char *CVSroot_cmdline;
+
+/* This variable keeps track of all of the CVSROOT directories that
+ * have been seen by the client.
+ */
+extern List *root_directories;
+
+char *emptydir_name (void);
+int safe_location (char *);
+
+extern int trace;              /* Show all commands */
+extern int noexec;             /* Don't modify disk anywhere */
+extern int readonlyfs;         /* fail on all write locks; succeed all read 
locks */
+extern int logoff;             /* Don't write history entry */
+extern bool suppress_bases;
+
+
+
+#define LOGMSG_REREAD_NEVER 0  /* do_verify - never  reread message */
+#define LOGMSG_REREAD_ALWAYS 1 /* do_verify - always reread message */
+#define LOGMSG_REREAD_STAT 2   /* do_verify - reread message if changed */
+
+/* This header needs the LOGMSG_* defns above.  */
+#include "parseinfo.h"
+
+/* This structure holds the global configuration data.  */
+extern struct config *config;
+
+#ifdef CLIENT_SUPPORT
+extern List *dirs_sent_to_server; /* used to decide which "Argument
+                                    xxx" commands to send to each
+                                    server in multiroot mode. */
+#endif
+
+extern char *hostname;
+
+/* Externs that are included directly in the CVS sources */
+
+/* Flags used by RCS_* functions.  See the description of the individual
+   functions for which flags mean what for each function.  */
+#define RCS_FLAGS_FORCE 1
+#define RCS_FLAGS_DEAD 2
+#define RCS_FLAGS_QUIET 4
+#define RCS_FLAGS_MODTIME 8
+#define RCS_FLAGS_KEEPFILE 16
+#define RCS_FLAGS_USETIME 32
+
+int RCS_exec_rcsdiff (RCSNode *rcsfile, int diff_argc,
+                      char * const *diff_argv, const char *options,
+                      const char *rev1, const char *rev1_cache,
+                      const char *rev2,
+                      const char *label1, const char *label2,
+                      const char *workfile);
+int diff_exec (const char *file1, const char *file2,
+               const char *label1, const char *label2,
+               int iargc, char * const *iargv, const char *out);
+
+
+#include "error.h"
+
+/* If non-zero, error will use the CVS protocol to report error
+ * messages.  This will only be set in the CVS server parent process;
+ * most other code is run via do_cvs_command, which forks off a child
+ * process and packages up its stderr in the protocol.
+ *
+ * This needs to be here rather than in error.h in order to use an unforked
+ * error.h from GNULIB.
+ */
+extern int error_use_protocol;
+
+
+DBM *open_module (void);
+List *Find_Directories (char *repository, int which, List *entries);
+void Entries_Close (List *entries);
+List *Entries_Open (int aflag, char *update_dir);
+void Subdirs_Known (List *entries);
+void Subdir_Register (List *, const char *, const char *);
+void Subdir_Deregister (List *, const char *, const char *);
+
+void parse_tagdate (char **tag, char **date, const char *input);
+char *Make_Date (const char *rawdate);
+char *date_from_time_t (time_t);
+void date_to_internet (char *, const char *);
+void date_to_tm (struct tm *, const char *);
+void tm_to_internet (char *, const struct tm *);
+char *gmformat_time_t (time_t unixtime);
+char *format_date_alloc (char *text);
+
+char *Name_Repository (const char *dir, const char *update_dir);
+const char *Short_Repository (const char *repository);
+void Sanitize_Repository_Name (char *repository);
+
+char *entries_time (time_t unixtime);
+time_t unix_time_stamp (const char *file);
+char *time_stamp (const char *file);
+
+typedef        int (*CALLPROC) (const char *repository, const char *value,
+                         void *closure);
+int Parse_Info (const char *infofile, const char *repository,
+                CALLPROC callproc, int opt, void *closure);
+
+typedef        RETSIGTYPE (*SIGCLEANUPPROC)    (int);
+int SIG_register (int sig, SIGCLEANUPPROC sigcleanup);
+
+#include "filesubr.h"
+#include "subr.h"
+
+int ls (int argc, char *argv[]);
+
+int update (int argc, char *argv[]);
+/* The only place this is currently used outside of update.c is add.c.
+ * Restricting its use to update.c seems to be in the best interest of
+ * modularity, but I can't think of a good way to get an update of a
+ * resurrected file done and print the fact otherwise.
+ */
+void write_letter (struct file_info *finfo, int letter);
+int xcmp (const char *file1, const char *file2);
+void *valloc (size_t bytes);
+
+int Create_Admin (const char *dir, const char *update_dir,
+                  const char *repository, const char *tag, const char *date,
+                  int nonbranch, int warn, int dotemplate);
+int expand_at_signs (const char *, size_t, FILE *);
+
+/* Locking subsystem (implemented in lock.c).  */
+
+int Reader_Lock (char *xrepository);
+void Simple_Lock_Cleanup (void);
+void Lock_Cleanup (void);
+
+/* Writelock an entire subtree, well the part specified by ARGC, ARGV, LOCAL,
+   and AFLAG, anyway.  */
+void lock_tree_promotably (int argc, char **argv, int local, int which,
+                          int aflag);
+
+/* See lock.c for description.  */
+void lock_dir_for_write (const char *);
+
+/* Get a write lock for the history file.  */
+int history_lock (const char *);
+void clear_history_lock (void);
+
+/* Get a write lock for the val-tags file.  */
+int val_tags_lock (const char *);
+void clear_val_tags_lock (void);
+
+void Scratch_Entry (List * list, const char *fname);
+void ParseTag (char **tagp, char **datep, int *nonbranchp);
+void WriteTag (const char *dir, const char *tag, const char *date,
+               int nonbranch, const char *update_dir, const char *repository);
+void WriteTemplate (const char *update_dir, int dotemplate,
+                    const char *repository);
+void cat_module (int status);
+void check_entries (char *dir);
+void close_module (DBM * db);
+void fperrmsg (FILE * fp, int status, int errnum, char *message,...);
+
+int ign_name (char *name);
+void ign_add (char *ign, int hold);
+void ign_add_file (char *file, int hold);
+void ign_setup (void);
+void ign_dir_add (char *name);
+int ignore_directory (const char *name);
+typedef void (*Ignore_proc) (const char *, const char *);
+void ignore_files (List *, List *, const char *, Ignore_proc);
+extern int ign_inhibit_server;
+
+#include "update.h"
+
+void make_directories (const char *name);
+void make_directory (const char *name);
+int mkdir_if_needed (const char *name);
+void rename_file (const char *from, const char *to);
+/* Expand wildcards in each element of (ARGC,ARGV).  This is according to the
+   files which exist in the current directory, and accordingly to OS-specific
+   conventions regarding wildcard syntax.  It might be desirable to change the
+   former in the future (e.g. "cvs status *.h" including files which don't 
exist
+   in the working directory).  The result is placed in *PARGC and *PARGV;
+   the *PARGV array itself and all the strings it contains are newly
+   malloc'd.  It is OK to call it with PARGC == &ARGC or PARGV == &ARGV.  */
+void expand_wild (int argc, char **argv, 
+                  int *pargc, char ***pargv);
+
+/* exithandle.c */
+void signals_register (RETSIGTYPE (*handler)(int));
+void cleanup_register (void (*handler) (void));
+
+void update_delproc (Node * p);
+void usage (const char *const *cpp);
+List *Find_Names (char *repository, int which, int aflag,
+                 List ** optentries);
+void Update_Logfile (const char *repository, const char *xmessage,
+                     FILE *xlogfp, List *xchanges);
+void do_editor (const char *dir, char **messagep,
+                const char *repository, List *changes);
+
+void do_verify (char **messagep, const char *repository, List *changes);
+
+typedef        int (*CALLBACKPROC)     (int argc, char *argv[], char *where,
+       char *mwhere, char *mfile, int shorten, int local_specified,
+       char *omodule, char *msg);
+
+
+typedef        int (*FILEPROC) (void *callerdat, struct file_info *finfo);
+typedef        int (*FILESDONEPROC) (void *callerdat, int err,
+                              const char *repository, const char *update_dir,
+                              List *entries);
+typedef        Dtype (*DIRENTPROC) (void *callerdat, const char *dir,
+                             const char *repos, const char *update_dir,
+                             List *entries);
+typedef        int (*DIRLEAVEPROC) (void *callerdat, const char *dir, int err,
+                             const char *update_dir, List *entries);
+
+int mkmodules (char *dir);
+int init (int argc, char **argv);
+
+int do_module (DBM * db, char *mname, enum mtype m_type, char *msg,
+               CALLBACKPROC callback_proc, char *where, int shorten,
+               int local_specified, int run_module_prog, int build_dirs,
+               char *extra_arg);
+void history_write (int type, const char *update_dir, const char *revs,
+                    const char *name, const char *repository);
+int start_recursion (FILEPROC fileproc, FILESDONEPROC filesdoneproc,
+                    DIRENTPROC direntproc, DIRLEAVEPROC dirleaveproc,
+                    void *callerdat,
+                    int argc, char *argv[], int local, int which,
+                    int aflag, int locktype, char *update_preload,
+                    int dosrcs, char *repository);
+void SIG_beginCrSect (void);
+void SIG_endCrSect (void);
+int SIG_inCrSect (void);
+void read_cvsrc (int *argc, char ***argv, const char *cmdname);
+
+#include "run.h"
+
+pid_t waitpid (pid_t, int *, int);
+
+/*
+ * a struct vers_ts contains all the information about a file including the
+ * user and rcs file names, and the version checked out and the head.
+ *
+ * this is usually obtained from a call to Version_TS which takes a
+ * tag argument for the RCS file if desired
+ */
+
+#include "vers_ts.h"
+
+Vers_TS *Version_TS (struct file_info *finfo, char *options, char *tag,
+                           char *date, int force_tag_match,
+                           int set_time);
+void freevers_ts (Vers_TS ** versp);
+
+/* Miscellaneous CVS infrastructure which layers on top of the recursion
+   processor (for example, needs struct file_info).  */
+
+int Checkin (int type, struct file_info *finfo, char *rev,
+            char *tag, char *options, char *message);
+int No_Difference (struct file_info *finfo, Vers_TS *vers);
+/* TODO: can the finfo argument to special_file_mismatch be changed? -twp */
+int special_file_mismatch (struct file_info *finfo,
+                                 char *rev1, char *rev2);
+
+/*
+ * defines for Classify_File() to determine the current state of a file.
+ * These are also used as types in the data field for the list we make for
+ * Update_Logfile in commit, import, and add.
+ */
+enum classify_type
+{
+    T_UNKNOWN = 1,                     /* no old-style analog existed   */
+    T_CONFLICT,                                /* C (conflict) list            
 */
+    T_NEEDS_MERGE,                     /* G (needs merging) list        */
+    T_MODIFIED,                                /* M (needs checked in) list    
 */
+    T_CHECKOUT,                                /* O (needs checkout) list      
 */
+    T_ADDED,                           /* A (added file) list           */
+    T_REMOVED,                         /* R (removed file) list         */
+    T_REMOVE_ENTRY,                    /* W (removed entry) list        */
+    T_UPTODATE,                                /* File is up-to-date           
 */
+    T_PATCH,                           /* P Like C, but can patch       */
+    T_TITLE                            /* title for node type           */
+};
+typedef enum classify_type Ctype;
+
+Ctype Classify_File (struct file_info *finfo, char *tag, char *date, char 
*options,
+      int force_tag_match, int aflag, Vers_TS **versp, int pipeout);
+
+/*
+ * structure used for list nodes passed to Update_Logfile() and
+ * do_editor().
+ */
+struct logfile_info
+{
+  enum classify_type type;
+  char *tag;
+  char *rev_old;               /* rev number before a commit/modify,
+                                  NULL for add or import */
+  char *rev_new;               /* rev number after a commit/modify,
+                                  add, or import, NULL for remove */
+};
+
+/* Wrappers.  */
+
+typedef enum { WRAP_MERGE, WRAP_COPY } WrapMergeMethod;
+typedef enum {
+    /* -t and -f wrapper options.  Treating directories as single files.  */
+    WRAP_TOCVS,
+    WRAP_FROMCVS,
+    /* -k wrapper option.  Default keyword expansion options.  */
+    WRAP_RCSOPTION
+} WrapMergeHas;
+
+void  wrap_setup (void);
+int   wrap_name_has (const char *name,WrapMergeHas has);
+char *wrap_rcsoption (const char *fileName, int asFlag);
+char *wrap_tocvs_process_file (const char *fileName);
+int   wrap_merge_is_copy (const char *fileName);
+void wrap_fromcvs_process_file (const char *fileName);
+void wrap_add_file (const char *file,int temp);
+void wrap_add (char *line,int temp);
+void wrap_send (void);
+#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
+void wrap_unparse_rcs_options (char **, int);
+#endif /* SERVER_SUPPORT || CLIENT_SUPPORT */
+
+/* Pathname expansion */
+char *expand_path (const char *name, const char *cvsroot, bool formatsafe,
+                  const char *file, int line);
+
+/* User variables.  */
+extern List *variable_list;
+
+void variable_set (char *nameval);
+
+int watch (int argc, char **argv);
+int edit (int argc, char **argv);
+int unedit (int argc, char **argv);
+int editors (int argc, char **argv);
+int watchers (int argc, char **argv);
+int annotate (int argc, char **argv);
+int add (int argc, char **argv);
+int admin (int argc, char **argv);
+int checkout (int argc, char **argv);
+int commit (int argc, char **argv);
+int diff (int argc, char **argv);
+int history (int argc, char **argv);
+int import (int argc, char **argv);
+int cvslog (int argc, char **argv);
+#ifdef AUTH_CLIENT_SUPPORT
+/* Some systems (namely Mac OS X) have conflicting definitions for these
+ * functions.  Avoid them.
+ */
+#ifdef HAVE_LOGIN
+# define login         cvs_login
+#endif /* HAVE_LOGIN */
+#ifdef HAVE_LOGOUT
+# define logout                cvs_logout
+#endif /* HAVE_LOGOUT */
+int login (int argc, char **argv);
+int logout (int argc, char **argv);
+#endif /* AUTH_CLIENT_SUPPORT */
+int patch (int argc, char **argv);
+int release (int argc, char **argv);
+int cvsremove (int argc, char **argv);
+int rtag (int argc, char **argv);
+int cvsstatus (int argc, char **argv);
+int cvstag (int argc, char **argv);
+int version (int argc, char **argv);
+
+unsigned long int lookup_command_attribute (const char *);
+
+#if defined(AUTH_CLIENT_SUPPORT) || defined(AUTH_SERVER_SUPPORT)
+char *scramble (char *str);
+char *descramble (char *str);
+#endif /* AUTH_CLIENT_SUPPORT || AUTH_SERVER_SUPPORT */
+
+#ifdef AUTH_CLIENT_SUPPORT
+char *get_cvs_password (void);
+/* get_cvs_port_number() is not pure since the /etc/services file could change
+ * between calls.  */
+int get_cvs_port_number (const cvsroot_t *root);
+/* normalize_cvsroot() is not pure since it calls get_cvs_port_number.  */
+char *normalize_cvsroot (const cvsroot_t *root)
+       __attribute__ ((__malloc__));
+#endif /* AUTH_CLIENT_SUPPORT */
+
+void tag_check_valid (const char *, int, char **, int, int, char *, bool);
+
+#include "server.h"
+
+extern const char *global_session_id;
+
+/* From find_names.c.  */
+List *find_files (const char *dir, const char *pat);
Index: ccvs/src/diff.c
diff -u /dev/null ccvs/src/diff.c:1.116.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/diff.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1126 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Difference
+ * 
+ * Run diff against versions in the repository.  Options that are specified are
+ * passed on directly to "rcsdiff".
+ * 
+ * Without any file arguments, runs diff against all the currently modified
+ * files.
+ */
+
+#include "cvs.h"
+
+enum diff_file
+{
+    DIFF_ERROR,
+    DIFF_ADDED,
+    DIFF_REMOVED,
+    DIFF_DIFFERENT,
+    DIFF_SAME
+};
+
+static Dtype diff_dirproc (void *callerdat, const char *dir,
+                           const char *pos_repos, const char *update_dir,
+                           List *entries);
+static int diff_filesdoneproc (void *callerdat, int err,
+                               const char *repos, const char *update_dir,
+                               List *entries);
+static int diff_dirleaveproc (void *callerdat, const char *dir,
+                              int err, const char *update_dir,
+                              List *entries);
+static enum diff_file diff_file_nodiff (struct file_info *finfo, Vers_TS *vers,
+                                        enum diff_file, char **rev1_cache );
+static int diff_fileproc (void *callerdat, struct file_info *finfo);
+static void diff_mark_errors (int err);
+
+
+/* Global variables.  Would be cleaner if we just put this stuff in a
+   struct like log.c does.  */
+
+/* Command line tags, from -r option.  Points into argv.  */
+static char *diff_rev1, *diff_rev2;
+/* Command line dates, from -D option.  Malloc'd.  */
+static char *diff_date1, *diff_date2;
+static char *use_rev1, *use_rev2;
+static int have_rev1_label, have_rev2_label;
+
+/* Revision of the user file, if it is unchanged from something in the
+   repository and we want to use that fact.  */
+static char *user_file_rev;
+
+static char *options;
+static char **diff_argv;
+static int diff_argc;
+static size_t diff_arg_allocated;
+static int diff_errors;
+static int empty_files;
+
+static const char *const diff_usage[] =
+{
+    "Usage: %s %s [-lR] [-k kopt] [format_options]\n",
+    "    [[-r rev1 | -D date1] [-r rev2 | -D date2]] [files...] \n",
+    "\t-l\tLocal directory only, not recursive\n",
+    "\t-R\tProcess directories recursively.\n",
+    "\t-k kopt\tSpecify keyword expansion mode.\n",
+    "\t-D d1\tDiff revision for date against working file.\n",
+    "\t-D d2\tDiff rev1/date1 against date2.\n",
+    "\t-r rev1\tDiff revision for rev1 against working file.\n",
+    "\t-r rev2\tDiff rev1/date1 against rev2.\n",
+    "\nformat_options:\n",
+    "  -i  --ignore-case  Consider upper- and lower-case to be the same.\n",
+    "  -w  --ignore-all-space  Ignore all white space.\n",
+    "  -b  --ignore-space-change  Ignore changes in the amount of white 
space.\n",
+    "  -B  --ignore-blank-lines  Ignore changes whose lines are all blank.\n",
+    "  -I RE  --ignore-matching-lines=RE  Ignore changes whose lines all match 
RE.\n",
+    "  --binary  Read and write data in binary mode.\n",
+    "  -a  --text  Treat all files as text.\n\n",
+    "  -c  -C NUM  --context[=NUM]  Output NUM (default 2) lines of copied 
context.\n",
+    "  -u  -U NUM  --unified[=NUM]  Output NUM (default 2) lines of unified 
context.\n",
+    "    -NUM  Use NUM context lines.\n",
+    "    -L LABEL  --label LABEL  Use LABEL instead of file name.\n",
+    "    -p  --show-c-function  Show which C function each change is in.\n",
+    "    -F RE  --show-function-line=RE  Show the most recent line matching 
RE.\n",
+    "  --brief  Output only whether files differ.\n",
+    "  -e  --ed  Output an ed script.\n",
+    "  -f  --forward-ed  Output something like an ed script in forward 
order.\n",
+    "  -n  --rcs  Output an RCS format diff.\n",
+    "  -y  --side-by-side  Output in two columns.\n",
+    "    -W NUM  --width=NUM  Output at most NUM (default 130) characters per 
line.\n",
+    "    --left-column  Output only the left column of common lines.\n",
+    "    --suppress-common-lines  Do not output common lines.\n",
+    "  --ifdef=NAME  Output merged file to show `#ifdef NAME' diffs.\n",
+    "  --GTYPE-group-format=GFMT  Similar, but format GTYPE input groups with 
GFMT.\n",
+    "  --line-format=LFMT  Similar, but format all input lines with LFMT.\n",
+    "  --LTYPE-line-format=LFMT  Similar, but format LTYPE input lines with 
LFMT.\n",
+    "    LTYPE is `old', `new', or `unchanged'.  GTYPE is LTYPE or 
`changed'.\n",
+    "    GFMT may contain:\n",
+    "      %%<  lines from FILE1\n",
+    "      %%>  lines from FILE2\n",
+    "      %%=  lines common to FILE1 and FILE2\n",
+    "      %%[-][WIDTH][.[PREC]]{doxX}LETTER  printf-style spec for LETTER\n",
+    "        LETTERs are as follows for new group, lower case for old 
group:\n",
+    "          F  first line number\n",
+    "          L  last line number\n",
+    "          N  number of lines = L-F+1\n",
+    "          E  F-1\n",
+    "          M  L+1\n",
+    "    LFMT may contain:\n",
+    "      %%L  contents of line\n",
+    "      %%l  contents of line, excluding any trailing newline\n",
+    "      %%[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line 
number\n",
+    "    Either GFMT or LFMT may contain:\n",
+    "      %%%%  %%\n",
+    "      %%c'C'  the single character C\n",
+    "      %%c'\\OOO'  the character with octal code OOO\n\n",
+    "  -t  --expand-tabs  Expand tabs to spaces in output.\n",
+    "  -T  --initial-tab  Make tabs line up by prepending a tab.\n\n",
+    "  -N  --new-file  Treat absent files as empty.\n",
+    "  -s  --report-identical-files  Report when two files are the same.\n",
+    "  --horizon-lines=NUM  Keep NUM lines of the common prefix and suffix.\n",
+    "  -d  --minimal  Try hard to find a smaller set of changes.\n",
+    "  -H  --speed-large-files  Assume large files and many scattered small 
changes.\n",
+    "\n(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+/* I copied this array directly out of diff.c in diffutils 2.7, after
+   removing the following entries, none of which seem relevant to use
+   with CVS:
+     --help
+     --version (-v)
+     --recursive (-r)
+     --unidirectional-new-file (-P)
+     --starting-file (-S)
+     --exclude (-x)
+     --exclude-from (-X)
+     --sdiff-merge-assist
+     --paginate (-l)  (doesn't work with library callbacks)
+
+   I changed the options which take optional arguments (--context and
+   --unified) to return a number rather than a letter, so that the
+   optional argument could be handled more easily.  I changed the
+   --brief and --ifdef options to return numbers, since -q  and -D mean
+   something else to cvs diff.
+
+   The numbers 129- that appear in the fourth element of some entries
+   tell the big switch in `diff' how to process those options. -- Ian
+
+   The following options, which diff lists as "An alias, no longer
+   recommended" have been removed: --file-label --entire-new-file
+   --ascii --print.  */
+
+static struct option const longopts[] =
+{
+    {"ignore-blank-lines", 0, 0, 'B'},
+    {"context", 2, 0, 143},
+    {"ifdef", 1, 0, 131},
+    {"show-function-line", 1, 0, 'F'},
+    {"speed-large-files", 0, 0, 'H'},
+    {"ignore-matching-lines", 1, 0, 'I'},
+    {"label", 1, 0, 'L'},
+    {"new-file", 0, 0, 'N'},
+    {"initial-tab", 0, 0, 'T'},
+    {"width", 1, 0, 'W'},
+    {"text", 0, 0, 'a'},
+    {"ignore-space-change", 0, 0, 'b'},
+    {"minimal", 0, 0, 'd'},
+    {"ed", 0, 0, 'e'},
+    {"forward-ed", 0, 0, 'f'},
+    {"ignore-case", 0, 0, 'i'},
+    {"rcs", 0, 0, 'n'},
+    {"show-c-function", 0, 0, 'p'},
+
+    /* This is a potentially very useful option, except the output is so
+       silly.  It would be much better for it to look like "cvs rdiff -s"
+       which displays all the same info, minus quite a few lines of
+       extraneous garbage.  */
+    {"brief", 0, 0, 145},
+
+    {"report-identical-files", 0, 0, 's'},
+    {"expand-tabs", 0, 0, 't'},
+    {"ignore-all-space", 0, 0, 'w'},
+    {"side-by-side", 0, 0, 'y'},
+    {"unified", 2, 0, 146},
+    {"left-column", 0, 0, 129},
+    {"suppress-common-lines", 0, 0, 130},
+    {"old-line-format", 1, 0, 132},
+    {"new-line-format", 1, 0, 133},
+    {"unchanged-line-format", 1, 0, 134},
+    {"line-format", 1, 0, 135},
+    {"old-group-format", 1, 0, 136},
+    {"new-group-format", 1, 0, 137},
+    {"unchanged-group-format", 1, 0, 138},
+    {"changed-group-format", 1, 0, 139},
+    {"horizon-lines", 1, 0, 140},
+    {"binary", 0, 0, 142},
+    {0, 0, 0, 0}
+};
+
+
+
+/* Add one of OPT or LONGOPT, and ARGUMENT, when present, to global DIFF_ARGV.
+ *
+ * INPUTS
+ *   opt               A character option representation.
+ *   longopt           A long option name.
+ *   argument          Optional option argument.
+ *   
+ * GLOBALS
+ *   diff_argc         The number of arguments in DIFF_ARGV.
+ *   diff_argv         Array of argument strings.
+ *   diff_arg_allocated        Allocated length of DIFF_ARGV.
+ *
+ * NOTES
+ *   Behavior when both OPT & LONGOPT are provided is undefined.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+static void
+add_diff_args (char opt, const char *longopt, const char *argument)
+{
+    char *tmp;
+
+    /* Add opt or longopt to diff_arv.  */
+    assert (opt || (longopt && *longopt));
+    assert (!(opt && (longopt && *longopt)));
+    if (opt) tmp = Xasprintf ("-%c", opt);
+    else tmp = Xasprintf ("--%s", longopt);
+    run_add_arg_p (&diff_argc, &diff_arg_allocated, &diff_argv, tmp);
+    free (tmp);
+
+    /* When present, add ARGUMENT to DIFF_ARGV.  */
+    if (argument)
+       run_add_arg_p (&diff_argc, &diff_arg_allocated, &diff_argv, argument);
+}
+
+
+
+/* CVS 1.9 and similar versions seemed to have pretty weird handling
+   of -y and -T.  In the cases where it called rcsdiff,
+   they would have the meanings mentioned below.  In the cases where it
+   called diff, they would have the meanings mentioned in "longopts".
+   Noone seems to have missed them, so I think the right thing to do is
+   just to remove the options altogether (which I have done).
+
+   In the case of -z and -q, "cvs diff" did not accept them even back
+   when we called rcsdiff (at least, it hasn't accepted them
+   recently).
+
+   In comparing rcsdiff to the new CVS implementation, I noticed that
+   the following rcsdiff flags are not handled by CVS diff:
+
+          -y: perform diff even when the requested revisions are the
+                  same revision number
+          -q: run quietly
+          -T: preserve modification time on the RCS file
+          -z: specify timezone for use in file labels
+
+   I think these are not really relevant.  -y is undocumented even in
+   RCS 5.7, and seems like a minor change at best.  According to RCS
+   documentation, -T only applies when a RCS file has been modified
+   because of lock changes; doesn't CVS sidestep RCS's entire lock
+   structure?  -z seems to be unsupported by CVS diff, and has a
+   different meaning as a global option anyway.  (Adding it could be
+   a feature, but if it is left out for now, it should not break
+   anything.)  For the purposes of producing output, CVS diff appears
+   mostly to ignore -q.  Maybe this should be fixed, but I think it's
+   a larger issue than the changes included here.  */
+
+int
+diff (int argc, char **argv)
+{
+    int c, err = 0;
+    int local = 0;
+    int which;
+    int option_index;
+    char *diff_orig1, *diff_orig2;
+
+    if (argc == -1)
+       usage (diff_usage);
+
+    have_rev1_label = have_rev2_label = 0;
+
+    /*
+     * Note that we catch all the valid arguments here, so that we can
+     * intercept the -r arguments for doing revision diffs; and -l/-R for a
+     * non-recursive/recursive diff.
+     */
+
+    /* Clean out our global variables (multiroot can call us multiple
+       times and the server can too, if the client sends several
+       diff commands).  */
+    run_arg_free_p (diff_argc, diff_argv);
+    diff_argc = 0;
+
+    diff_orig1 = NULL;
+    diff_orig2 = NULL;
+    diff_rev1 = NULL;
+    diff_rev2 = NULL;
+    diff_date1 = NULL;
+    diff_date2 = NULL;
+
+    optind = 0;
+    /* FIXME: This should really be allocating an argv to be passed to diff
+     * later rather than strcatting onto the opts variable.  We have some
+     * handling routines that can already handle most of the argc/argv
+     * maintenance for us and currently, if anyone were to attempt to pass a
+     * quoted string in here, it would be split on spaces and tabs on its way
+     * to diff.
+     */
+    while ((c = getopt_long (argc, argv,
+              "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:W:k:r:",
+                            longopts, &option_index)) != -1)
+    {
+       switch (c)
+       {
+           case 'y':
+               add_diff_args (0, "side-by-side", NULL);
+               break;
+           case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+           case 'h': case 'i': case 'n': case 'p': case 's': case 't':
+           case 'u': case 'w':
+            case '0': case '1': case '2': case '3': case '4': case '5':
+            case '6': case '7': case '8': case '9':
+           case 'B': case 'H': case 'T':
+               add_diff_args (c, NULL, NULL);
+               break;
+           case 'L':
+               if (have_rev1_label++)
+                   if (have_rev2_label++)
+                   {
+                       error (0, 0, "extra -L arguments ignored");
+                       break;
+                   }
+               /* Fall through.  */
+           case 'C': case 'F': case 'I': case 'U': case 'W':
+               add_diff_args (c, NULL, optarg);
+               break;
+           case 129: case 130: case 131: case 132: case 133: case 134:
+           case 135: case 136: case 137: case 138: case 139: case 140:
+           case 141: case 142: case 143: case 145: case 146:
+               add_diff_args (0, longopts[option_index].name,
+                             longopts[option_index].has_arg ? optarg : NULL);
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case 'l':
+               local = 1;
+               break;
+           case 'k':
+               if (options)
+                   free (options);
+               options = RCS_check_kflag (optarg);
+               break;
+           case 'r':
+               if (diff_rev2 || diff_date2)
+                   error (1, 0,
+                      "no more than two revisions/dates can be specified");
+               if (diff_rev1 || diff_date1)
+               {
+                   diff_orig2 = xstrdup (optarg);
+                   parse_tagdate (&diff_rev2, &diff_date2, optarg);
+               }
+               else
+               {
+                   diff_orig1 = xstrdup (optarg);
+                   parse_tagdate (&diff_rev1, &diff_date1, optarg);
+               }
+               break;
+           case 'D':
+               if (diff_rev2 || diff_date2)
+                   error (1, 0,
+                      "no more than two revisions/dates can be specified");
+               if (diff_rev1 || diff_date1)
+                   diff_date2 = Make_Date (optarg);
+               else
+                   diff_date1 = Make_Date (optarg);
+               break;
+           case 'N':
+               empty_files = 1;
+               break;
+           case '?':
+           default:
+               usage (diff_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+    /* make sure options is non-null */
+    if (!options)
+       options = xstrdup ("");
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote) {
+       /* We're the client side.  Fire up the remote server.  */
+       start_server ();
+       
+       ign_setup ();
+
+       if (local)
+           send_arg("-l");
+       if (empty_files)
+           send_arg("-N");
+       send_options (diff_argc, diff_argv);
+       if (options[0] != '\0')
+           send_arg (options);
+       if (diff_orig1)
+           option_with_arg ("-r", diff_orig1);
+       else if (diff_date1)
+           client_senddate (diff_date1);
+       if (diff_orig2)
+           option_with_arg ("-r", diff_orig2);
+       else if (diff_date2)
+           client_senddate (diff_date2);
+       send_arg ("--");
+
+       /* Send the current files unless diffing two revs from the archive */
+       send_files (argc, argv, local, 0,
+                   (diff_rev2 || diff_date2) ? SEND_NO_CONTENTS : 0);
+
+       send_file_names (argc, argv, SEND_EXPAND_WILD);
+
+       send_to_server ("diff\012", 0);
+        err = get_responses_and_close ();
+       free (options);
+       options = NULL;
+       return err;
+    }
+#endif
+
+    if (diff_rev1 != NULL)
+       tag_check_valid (diff_rev1, argc, argv, local, 0, "", false);
+    if (diff_rev2 != NULL)
+       tag_check_valid (diff_rev2, argc, argv, local, 0, "", false);
+
+    which = W_LOCAL;
+    if (diff_rev1 || diff_date1)
+       which |= W_REPOS | W_ATTIC;
+
+    wrap_setup ();
+
+    /* start the recursion processor */
+    err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc,
+                           diff_dirleaveproc, NULL, argc, argv, local,
+                           which, 0, CVS_LOCK_READ, NULL, 1, NULL);
+
+    /* clean up */
+    free (options);
+    options = NULL;
+
+    if (diff_date1 != NULL)
+       free (diff_date1);
+    if (diff_date2 != NULL)
+       free (diff_date2);
+
+    return err;
+}
+
+
+
+/*
+ * Do a file diff
+ */
+/* ARGSUSED */
+static int
+diff_fileproc (void *callerdat, struct file_info *finfo)
+{
+    int status, err = 2;               /* 2 == trouble, like rcsdiff */
+    Vers_TS *vers;
+    enum diff_file empty_file = DIFF_DIFFERENT;
+    char *tmp = NULL;
+    char *tocvsPath = NULL;
+    char *fname = NULL;
+    char *label1;
+    char *label2;
+    char *rev1_cache = NULL;
+
+    user_file_rev = 0;
+    vers = Version_TS (finfo, NULL, NULL, NULL, 1, 0);
+
+    if (diff_rev2 || diff_date2)
+    {
+       /* Skip all the following checks regarding the user file; we're
+          not using it.  */
+    }
+    else if (vers->vn_user == NULL)
+    {
+       /* The file does not exist in the working directory.  */
+       if ((diff_rev1 || diff_date1)
+           && vers->srcfile != NULL)
+       {
+           /* The file does exist in the repository.  */
+           if (empty_files)
+               empty_file = DIFF_REMOVED;
+           else
+           {
+               int exists;
+
+               exists = 0;
+               /* special handling for TAG_HEAD */
+               if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
+               {
+                   char *head =
+                       (vers->vn_rcs == NULL
+                        ? NULL
+                        : RCS_branch_head (vers->srcfile, vers->vn_rcs));
+                   exists = head != NULL && !RCS_isdead (vers->srcfile, head);
+                   if (head != NULL)
+                       free (head);
+               }
+               else
+               {
+                   Vers_TS *xvers;
+
+                   xvers = Version_TS (finfo, NULL, diff_rev1, diff_date1,
+                                       1, 0);
+                   exists = xvers->vn_rcs && !RCS_isdead (xvers->srcfile,
+                                                          xvers->vn_rcs);
+                   freevers_ts (&xvers);
+               }
+               if (exists)
+                   error (0, 0,
+                          "%s no longer exists, no comparison available",
+                          finfo->fullname);
+               goto out;
+           }
+       }
+       else
+       {
+           error (0, 0, "I know nothing about %s", finfo->fullname);
+           goto out;
+       }
+    }
+    else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0')
+    {
+       /* The file was added locally.  */
+       int exists = 0;
+
+       if (vers->srcfile != NULL)
+       {
+           /* The file does exist in the repository.  */
+
+           if (diff_rev1 || diff_date1)
+           {
+               /* special handling for TAG_HEAD */
+               if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
+               {
+                   char *head =
+                       (vers->vn_rcs == NULL
+                        ? NULL
+                        : RCS_branch_head (vers->srcfile, vers->vn_rcs));
+                   exists = head && !RCS_isdead (vers->srcfile, head);
+                   if (head != NULL)
+                       free (head);
+               }
+               else
+               {
+                   Vers_TS *xvers;
+
+                   xvers = Version_TS (finfo, NULL, diff_rev1, diff_date1,
+                                       1, 0);
+                   exists = xvers->vn_rcs
+                            && !RCS_isdead (xvers->srcfile, xvers->vn_rcs);
+                   freevers_ts (&xvers);
+               }
+           }
+           else
+           {
+               /* The file was added locally, but an RCS archive exists.  Our
+                * base revision must be dead.
+                */
+               /* No need to set, exists = 0, here.  That's the default.  */
+           }
+       }
+       if (!exists)
+       {
+           /* If we got here, then either the RCS archive does not exist or
+            * the relevant revision is dead.
+            */
+           if (empty_files)
+               empty_file = DIFF_ADDED;
+           else
+           {
+               error (0, 0, "%s is a new entry, no comparison available",
+                      finfo->fullname);
+               goto out;
+           }
+       }
+    }
+    else if (vers->vn_user[0] == '-')
+    {
+       if (empty_files)
+           empty_file = DIFF_REMOVED;
+       else
+       {
+           error (0, 0, "%s was removed, no comparison available",
+                  finfo->fullname);
+           goto out;
+       }
+    }
+    else
+    {
+       if (!vers->vn_rcs && !vers->srcfile)
+       {
+           error (0, 0, "cannot find revision control file for %s",
+                  finfo->fullname);
+           goto out;
+       }
+       else
+       {
+           if (vers->ts_user == NULL)
+           {
+               error (0, 0, "cannot find %s", finfo->fullname);
+               goto out;
+           }
+           else if (!strcmp (vers->ts_user, vers->ts_rcs)) 
+           {
+               /* The user file matches some revision in the repository
+                  Diff against the repository (for remote CVS, we might not
+                  have a copy of the user file around).  */
+               user_file_rev = vers->vn_user;
+           }
+       }
+    }
+
+    empty_file = diff_file_nodiff (finfo, vers, empty_file, &rev1_cache);
+    if (empty_file == DIFF_SAME)
+    {
+       /* In the server case, would be nice to send a "Checked-in"
+          response, so that the client can rewrite its timestamp.
+          server_checked_in by itself isn't the right thing (it
+          needs a server_register), but I'm not sure what is.
+          It isn't clear to me how "cvs status" handles this (that
+          is, for a client which sends Modified not Is-modified to
+          "cvs status"), but it does.  */
+       err = 0;
+       goto out;
+    }
+    else if (empty_file == DIFF_ERROR)
+       goto out;
+
+    /* Output an "Index:" line for patch to use */
+    cvs_output ("Index: ", 0);
+    cvs_output (finfo->fullname, 0);
+    cvs_output ("\n", 1);
+
+    tocvsPath = wrap_tocvs_process_file (finfo->file);
+    if (tocvsPath)
+    {
+       /* Backup the current version of the file to CVS/,,filename */
+       fname = Xasprintf (fname, "%s/%s%s", CVSADM, CVSPREFIX, finfo->file);
+       if (unlink_file_dir (fname) < 0)
+           if (!existence_error (errno))
+               error (1, errno, "cannot remove %s", fname);
+       rename_file (finfo->file, fname);
+       /* Copy the wrapped file to the current directory then go to work */
+       copy_file (tocvsPath, finfo->file);
+    }
+
+    /* Set up file labels appropriate for compatibility with the Larry Wall
+     * implementation of patch if the user didn't specify.  This is irrelevant
+     * according to the POSIX.2 specification.
+     */
+    label1 = NULL;
+    label2 = NULL;
+    /* The user cannot set the rev2 label without first setting the rev1
+     * label.
+     */
+    if (!have_rev2_label)
+    {
+       if (empty_file == DIFF_REMOVED)
+           label2 = make_file_label (DEVNULL, NULL, NULL);
+       else
+           label2 = make_file_label (finfo->fullname, use_rev2,
+                                     vers->srcfile);
+       if (!have_rev1_label)
+       {
+           if (empty_file == DIFF_ADDED)
+               label1 = make_file_label (DEVNULL, NULL, NULL);
+           else
+               label1 = make_file_label (finfo->fullname, use_rev1,
+                                         vers->srcfile);
+       }
+    }
+
+    if (empty_file == DIFF_ADDED || empty_file == DIFF_REMOVED)
+    {
+       /* This is fullname, not file, possibly despite the POSIX.2
+        * specification, because that's the way all the Larry Wall
+        * implementations of patch (are there other implementations?) want
+        * things and the POSIX.2 spec appears to leave room for this.
+        */
+       cvs_output ("\
+===================================================================\n\
+RCS file: ", 0);
+       cvs_output (finfo->fullname, 0);
+       cvs_output ("\n", 1);
+
+       cvs_output ("diff -N ", 0);
+       cvs_output (finfo->fullname, 0);
+       cvs_output ("\n", 1);
+
+       if (empty_file == DIFF_ADDED)
+       {
+           if (use_rev2 == NULL)
+                status = diff_exec (DEVNULL, finfo->file, label1, label2,
+                                   diff_argc, diff_argv, RUN_TTY);
+           else
+           {
+               int retcode;
+
+               tmp = cvs_temp_name ();
+               retcode = RCS_checkout (vers->srcfile, NULL, use_rev2, NULL,
+                                       *options ? options : vers->options,
+                                       tmp, NULL, NULL);
+               if (retcode != 0)
+                   goto out;
+
+               status = diff_exec (DEVNULL, tmp, label1, label2,
+                                   diff_argc, diff_argv, RUN_TTY);
+           }
+       }
+       else
+       {
+           int retcode;
+
+           tmp = cvs_temp_name ();
+           retcode = RCS_checkout (vers->srcfile, NULL, use_rev1, NULL,
+                                   *options ? options : vers->options,
+                                   tmp, NULL, NULL);
+           if (retcode != 0)
+               goto out;
+
+           status = diff_exec (tmp, DEVNULL, label1, label2,
+                               diff_argc, diff_argv, RUN_TTY);
+       }
+    }
+    else
+    {
+       status = RCS_exec_rcsdiff (vers->srcfile, diff_argc, diff_argv,
+                                   *options ? options : vers->options,
+                                   use_rev1, rev1_cache, use_rev2,
+                                   label1, label2, finfo->file);
+
+    }
+
+    if (label1) free (label1);
+    if (label2) free (label2);
+
+    switch (status)
+    {
+       case -1:                        /* fork failed */
+           error (1, errno, "fork failed while diffing %s",
+                  vers->srcfile->path);
+       case 0:                         /* everything ok */
+           err = 0;
+           break;
+       default:                        /* other error */
+           err = status;
+           break;
+    }
+
+out:
+    if( tocvsPath != NULL )
+    {
+       if (unlink_file_dir (finfo->file) < 0)
+           if (! existence_error (errno))
+               error (1, errno, "cannot remove %s", finfo->file);
+
+       rename_file (fname, finfo->file);
+       if (unlink_file (tocvsPath) < 0)
+           error (1, errno, "cannot remove %s", tocvsPath);
+       free (fname);
+    }
+
+    /* Call CVS_UNLINK() rather than unlink_file() below to avoid the check
+     * for noexec.
+     */
+    if (tmp != NULL)
+    {
+       if (CVS_UNLINK (tmp) < 0)
+           error (0, errno, "cannot remove %s", tmp);
+       free (tmp);
+    }
+    if (rev1_cache != NULL)
+    {
+       if (CVS_UNLINK (rev1_cache) < 0)
+           error (0, errno, "cannot remove %s", rev1_cache);
+       free (rev1_cache);
+    }
+
+    freevers_ts (&vers);
+    diff_mark_errors (err);
+    return err;
+}
+
+
+
+/*
+ * Remember the exit status for each file.
+ */
+static void
+diff_mark_errors (int err)
+{
+    if (err > diff_errors)
+       diff_errors = err;
+}
+
+
+
+/*
+ * Print a warm fuzzy message when we enter a dir
+ *
+ * Don't try to diff directories that don't exist! -- DW
+ */
+/* ARGSUSED */
+static Dtype
+diff_dirproc (void *callerdat, const char *dir, const char *pos_repos,
+              const char *update_dir, List *entries)
+{
+    /* XXX - check for dirs we don't want to process??? */
+
+    /* YES ... for instance dirs that don't exist!!! -- DW */
+    if (!isdir (dir))
+       return R_SKIP_ALL;
+
+    if (!quiet)
+       error (0, 0, "Diffing %s", update_dir);
+    return R_PROCESS;
+}
+
+
+
+/*
+ * Concoct the proper exit status - done with files
+ */
+/* ARGSUSED */
+static int
+diff_filesdoneproc (void *callerdat, int err, const char *repos,
+                    const char *update_dir, List *entries)
+{
+    return diff_errors;
+}
+
+
+
+/*
+ * Concoct the proper exit status - leaving directories
+ */
+/* ARGSUSED */
+static int
+diff_dirleaveproc (void *callerdat, const char *dir, int err,
+                   const char *update_dir, List *entries)
+{
+    return diff_errors;
+}
+
+
+
+/*
+ * verify that a file is different
+ *
+ * INPUTS
+ *   finfo
+ *   vers
+ *   empty_file
+ *
+ * OUTPUTS
+ *   rev1_cache                Cache the contents of rev1 if we look it up.
+ */
+static enum diff_file
+diff_file_nodiff (struct file_info *finfo, Vers_TS *vers,
+                  enum diff_file empty_file, char **rev1_cache)
+{
+    Vers_TS *xvers;
+    int retcode;
+
+    TRACE (TRACE_FUNCTION, "diff_file_nodiff (%s, %d)",
+           finfo->fullname ? finfo->fullname : "(null)", empty_file);
+
+    /* free up any old use_rev* variables and reset 'em */
+    if (use_rev1)
+       free (use_rev1);
+    if (use_rev2)
+       free (use_rev2);
+    use_rev1 = use_rev2 = NULL;
+
+    if (diff_rev1 || diff_date1)
+    {
+       /* special handling for TAG_HEAD */
+       if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
+       {
+           if (vers->vn_rcs != NULL && vers->srcfile != NULL)
+               use_rev1 = RCS_branch_head (vers->srcfile, vers->vn_rcs);
+       }
+       else
+       {
+           xvers = Version_TS (finfo, NULL, diff_rev1, diff_date1, 1, 0);
+           if (xvers->vn_rcs != NULL)
+               use_rev1 = xstrdup (xvers->vn_rcs);
+           freevers_ts (&xvers);
+       }
+    }
+    if (diff_rev2 || diff_date2)
+    {
+       /* special handling for TAG_HEAD */
+       if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0)
+       {
+           if (vers->vn_rcs && vers->srcfile)
+               use_rev2 = RCS_branch_head (vers->srcfile, vers->vn_rcs);
+       }
+       else
+       {
+           xvers = Version_TS (finfo, NULL, diff_rev2, diff_date2, 1, 0);
+           if (xvers->vn_rcs != NULL)
+               use_rev2 = xstrdup (xvers->vn_rcs);
+           freevers_ts (&xvers);
+       }
+
+       if (use_rev1 == NULL || RCS_isdead (vers->srcfile, use_rev1))
+       {
+           /* The first revision does not exist.  If EMPTY_FILES is
+               true, treat this as an added file.  Otherwise, warn
+               about the missing tag.  */
+           if (use_rev2 == NULL || RCS_isdead (vers->srcfile, use_rev2))
+               /* At least in the case where DIFF_REV1 and DIFF_REV2
+                * are both numeric (and non-existant (NULL), as opposed to
+                * dead?), we should be returning some kind of error (see
+                * basicb-8a0 in testsuite).  The symbolic case may be more
+                * complicated.
+                */
+               return DIFF_SAME;
+           if (empty_files)
+               return DIFF_ADDED;
+           if (use_rev1 != NULL)
+           {
+               if (diff_rev1)
+               {
+                   error (0, 0,
+                      "Tag %s refers to a dead (removed) revision in file 
`%s'.",
+                      diff_rev1, finfo->fullname);
+               }
+               else
+               {
+                   error (0, 0,
+                      "Date %s refers to a dead (removed) revision in file 
`%s'.",
+                      diff_date1, finfo->fullname);
+               }
+               error (0, 0,
+                      "No comparison available.  Pass `-N' to `%s diff'?",
+                      program_name);
+           }
+           else if (diff_rev1)
+               error (0, 0, "tag %s is not in file %s", diff_rev1,
+                      finfo->fullname);
+           else
+               error (0, 0, "no revision for date %s in file %s",
+                      diff_date1, finfo->fullname);
+           return DIFF_ERROR;
+       }
+
+       assert( use_rev1 != NULL );
+       if( use_rev2 == NULL || RCS_isdead( vers->srcfile, use_rev2 ) )
+       {
+           /* The second revision does not exist.  If EMPTY_FILES is
+               true, treat this as a removed file.  Otherwise warn
+               about the missing tag.  */
+           if (empty_files)
+               return DIFF_REMOVED;
+           if( use_rev2 != NULL )
+           {
+               if (diff_rev2)
+               {
+                   error( 0, 0,
+                      "Tag %s refers to a dead (removed) revision in file 
`%s'.",
+                      diff_rev2, finfo->fullname );
+               }
+               else
+               {
+                   error( 0, 0,
+                      "Date %s refers to a dead (removed) revision in file 
`%s'.",
+                      diff_date2, finfo->fullname );
+               }
+               error( 0, 0,
+                      "No comparison available.  Pass `-N' to `%s diff'?",
+                      program_name );
+           }
+           else if (diff_rev2)
+               error (0, 0, "tag %s is not in file %s", diff_rev2,
+                      finfo->fullname);
+           else
+               error (0, 0, "no revision for date %s in file %s",
+                      diff_date2, finfo->fullname);
+           return DIFF_ERROR;
+       }
+       /* Now, see if we really need to do the diff.  We can't assume that the
+        * files are different when the revs are.
+        */
+       assert( use_rev2 != NULL );
+       if( strcmp (use_rev1, use_rev2) == 0 )
+           return DIFF_SAME;
+       /* else fall through and do the diff */
+    }
+
+    /* If we had a r1/d1 & r2/d2, then at this point we must have a C3P0...
+     * err...  ok, then both rev1 & rev2 must have resolved to an existing,
+     * live version due to if statement we just closed.
+     */
+    assert (!(diff_rev2 || diff_date2) || (use_rev1 && use_rev2));
+
+    if ((diff_rev1 || diff_date1) &&
+       (use_rev1 == NULL || RCS_isdead (vers->srcfile, use_rev1)))
+    {
+       /* The first revision does not exist, and no second revision
+           was given.  */
+       if (empty_files)
+       {
+           if (empty_file == DIFF_REMOVED)
+               return DIFF_SAME;
+           if( user_file_rev && use_rev2 == NULL )
+               use_rev2 = xstrdup( user_file_rev );
+           return DIFF_ADDED;
+       }
+       if( use_rev1 != NULL )
+       {
+           if (diff_rev1)
+           {
+               error( 0, 0,
+                  "Tag %s refers to a dead (removed) revision in file `%s'.",
+                  diff_rev1, finfo->fullname );
+           }
+           else
+           {
+               error( 0, 0,
+                  "Date %s refers to a dead (removed) revision in file `%s'.",
+                  diff_date1, finfo->fullname );
+           }
+           error( 0, 0,
+                  "No comparison available.  Pass `-N' to `%s diff'?",
+                  program_name );
+       }
+       else if ( diff_rev1 )
+           error( 0, 0, "tag %s is not in file %s", diff_rev1,
+                  finfo->fullname );
+       else
+           error( 0, 0, "no revision for date %s in file %s",
+                  diff_date1, finfo->fullname );
+       return DIFF_ERROR;
+    }
+
+    assert( !diff_rev1 || use_rev1 );
+
+    if (user_file_rev)
+    {
+        /* drop user_file_rev into first unused use_rev */
+        if (!use_rev1) 
+           use_rev1 = xstrdup (user_file_rev);
+       else if (!use_rev2)
+           use_rev2 = xstrdup (user_file_rev);
+       /* and if not, it wasn't needed anyhow */
+       user_file_rev = NULL;
+    }
+
+    /* Now, see if we really need to do the diff.  We can't assume that the
+     * files are different when the revs are.
+     */
+    if( use_rev1 && use_rev2) 
+    {
+       if (strcmp (use_rev1, use_rev2) == 0)
+           return DIFF_SAME;
+       /* Fall through and do the diff. */
+    }
+    /* Don't want to do the timestamp check with both use_rev1 & use_rev2 set.
+     * The timestamp check is just for the default case of diffing the
+     * workspace file against its base revision.
+     */
+    else if( use_rev1 == NULL
+             || ( vers->vn_user != NULL
+                  && strcmp( use_rev1, vers->vn_user ) == 0 ) )
+    {
+       if (empty_file == DIFF_DIFFERENT
+           && vers->ts_user != NULL
+           && strcmp (vers->ts_rcs, vers->ts_user) == 0
+           && (!(*options) || strcmp (options, vers->options) == 0))
+       {
+           return DIFF_SAME;
+       }
+       if (use_rev1 == NULL
+           && (vers->vn_user[0] != '0' || vers->vn_user[1] != '\0'))
+       {
+           if (vers->vn_user[0] == '-')
+               use_rev1 = xstrdup (vers->vn_user + 1);
+           else
+               use_rev1 = xstrdup (vers->vn_user);
+       }
+    }
+
+    /* If we already know that the file is being added or removed,
+       then we don't want to do an actual file comparison here.  */
+    if (empty_file != DIFF_DIFFERENT)
+       return empty_file;
+
+    /*
+     * Run a quick cmp to see if we should bother with a full diff.
+     */
+
+    retcode = RCS_cmp_file( vers->srcfile, use_rev1, rev1_cache,
+                            use_rev2, *options ? options : vers->options,
+                           finfo->file );
+
+    return retcode == 0 ? DIFF_SAME : DIFF_DIFFERENT;
+}
Index: ccvs/src/difflib.c
diff -u /dev/null ccvs/src/difflib.c:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/difflib.c  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,228 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "difflib.h"
+
+/* Standard headers.  */
+#include <stddef.h>
+
+/* GNULIB */
+#include "error.h"
+
+/* diffutils */
+#include "diffrun.h"
+
+/* CVS */
+#include "filesubr.h"
+#include "run.h"
+#include "server.h"
+#include "system.h"
+
+extern int noexec;             /* Don't modify disk anywhere */
+extern int really_quiet, quiet;
+
+
+
+/* First call call_diff_setup to setup any initial arguments.  The
+   argument will be parsed into whitespace separated words and added
+   to the global call_diff_argv list.
+
+   Then, optionally, call call_diff_add_arg for each additional argument
+   that you'd like to pass to the diff library.
+
+   Finally, call call_diff or call_diff3 to produce the diffs.  */
+
+static char **call_diff_argv;
+static int call_diff_argc;
+static size_t call_diff_arg_allocated;
+
+
+
+/* VARARGS */
+void
+call_diff_add_arg (const char *s)
+{
+    TRACE (TRACE_DATA, "call_diff_add_arg (%s)", s);
+    run_add_arg_p (&call_diff_argc, &call_diff_arg_allocated, &call_diff_argv,
+                  s);
+}
+
+
+
+void 
+call_diff_setup (const char *prog, int argc, char * const *argv)
+{
+    int i;
+
+    /* clean out any malloc'ed values from call_diff_argv */
+    run_arg_free_p (call_diff_argc, call_diff_argv);
+    call_diff_argc = 0;
+
+    /* put each word into call_diff_argv, allocating it as we go */
+    call_diff_add_arg (prog);
+    for (i = 0; i < argc; i++)
+       call_diff_add_arg (argv[i]);
+}
+
+
+
+/* Callback function for the diff library to write data to the output
+   file.  This is used when we are producing output to stdout.  */
+
+static void
+call_diff_write_output (const char *text, size_t len)
+{
+    if (len > 0)
+       cvs_output (text, len);
+}
+
+
+
+/* Call back function for the diff library to flush the output file.
+   This is used when we are producing output to stdout.  */
+static void
+call_diff_flush_output (void)
+{
+    cvs_flushout ();
+}
+
+
+
+/* Call back function for the diff library to write to stdout.  */
+static void
+call_diff_write_stdout (const char *text)
+{
+    cvs_output (text, 0);
+}
+
+
+
+/* Call back function for the diff library to write to stderr.  */
+static void
+call_diff_error (const char *format, const char *a1, const char *a2)
+{
+    /* FIXME: Should we somehow indicate that this error is coming from
+       the diff library?  */
+    error (0, 0, format, a1, a2);
+}
+
+
+
+/* This set of callback functions is used if we are sending the diff
+   to stdout.  */
+static struct diff_callbacks call_diff_stdout_callbacks =
+{
+    call_diff_write_output,
+    call_diff_flush_output,
+    call_diff_write_stdout,
+    call_diff_error
+};
+
+
+
+/* This set of callback functions is used if we are sending the diff
+   to a file.  */
+static struct diff_callbacks call_diff_file_callbacks =
+{
+    NULL,
+    NULL,
+    call_diff_write_stdout,
+    call_diff_error
+};
+
+
+
+int
+call_diff (const char *out)
+{
+    call_diff_add_arg (NULL);
+
+    if (out == RUN_TTY)
+       return diff_run( call_diff_argc, call_diff_argv, NULL,
+                        &call_diff_stdout_callbacks );
+    else
+       return diff_run( call_diff_argc, call_diff_argv, out,
+                        &call_diff_file_callbacks );
+}
+
+
+
+int
+call_diff3 (char *out)
+{
+    if (out == RUN_TTY)
+       return diff3_run (call_diff_argc, call_diff_argv, NULL,
+                         &call_diff_stdout_callbacks);
+    else
+       return diff3_run (call_diff_argc, call_diff_argv, out,
+                         &call_diff_file_callbacks);
+}
+
+
+
+/* Merge the changes between files J1 & J2 into file DEST.  Mark portions from
+ * particular files using strings REV1 & REV2.
+ */
+int
+merge (const char *dest, const char *dlabel, const char *j1,
+       const char *j1label, const char *j2, const char *j2label)
+{
+    char *diffout;
+    int retval;
+
+    /* Remember that the first word in the `call_diff_setup' string is used
+       now only for diagnostic messages -- CVS no longer forks to run
+       diff3. */
+    diffout = cvs_temp_name();
+    call_diff_setup ("diff3", 0, NULL);
+    call_diff_add_arg ("-E");
+    call_diff_add_arg ("-am");
+
+    call_diff_add_arg ("-L");
+    call_diff_add_arg (dlabel);
+    call_diff_add_arg ("-L");
+    call_diff_add_arg (j1label);
+    call_diff_add_arg ("-L");
+    call_diff_add_arg (j2label);
+
+    call_diff_add_arg ("--");
+    call_diff_add_arg (dest);
+    call_diff_add_arg (j1);
+    call_diff_add_arg (j2);
+
+    retval = call_diff3 (diffout);
+
+    if (retval == 1 && !really_quiet)
+       error (0, 0, "conflicts during merge");
+    else if (retval == 2)
+       error (1, 0, "diff3 failed.");
+
+    copy_file (diffout, dest);
+
+    /* Clean up. */
+    if (CVS_UNLINK (diffout) < 0 && !existence_error (errno))
+       error (0, errno, "cannot remove temp file `%s'", diffout);
+    free (diffout);
+
+    return retval;
+}
Index: ccvs/src/difflib.h
diff -u /dev/null ccvs/src/difflib.h:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/difflib.h  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+#ifndef DIFFLIB_H
+#define DIFFLIB_H
+
+int call_diff (const char *out);
+int call_diff3 (char *out);
+void call_diff_add_arg (const char *s);
+void call_diff_setup (const char *prog, int argc, char * const *argv);
+int merge (const char *dest, const char *dlabel, const char *j1,
+          const char *j1label, const char *j2, const char *j2label);
+
+#endif /* DIFFLIB_H */
Index: ccvs/src/edit.c
diff -u /dev/null ccvs/src/edit.c:1.90.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/edit.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1257 @@
+/* Implementation for "cvs edit", "cvs watch on", and related commands
+
+   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
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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.  */
+
+#include "cvs.h"
+#include "getline.h"
+#include "yesno.h"
+#include "watch.h"
+#include "edit.h"
+#include "fileattr.h"
+#include "base.h"
+
+static bool check_edited = false;
+static int setting_default;
+static int turning_on;
+
+static bool setting_tedit;
+static bool setting_tunedit;
+static bool setting_tcommit;
+
+
+
+static int
+onoff_fileproc (void *callerdat, struct file_info *finfo)
+{
+    fileattr_get0 (finfo->file, "_watched");
+    fileattr_set (finfo->file, "_watched", turning_on ? "" : NULL);
+    return 0;
+}
+
+
+
+static int
+onoff_filesdoneproc (void *callerdat, int err, const char *repository,
+                     const char *update_dir, List *entries)
+{
+    if (setting_default)
+    {
+       fileattr_get0 (NULL, "_watched");
+       fileattr_set (NULL, "_watched", turning_on ? "" : NULL);
+    }
+    return err;
+}
+
+
+
+static int
+watch_onoff (int argc, char **argv)
+{
+    int c;
+    int local = 0;
+    int err;
+
+    optind = 0;
+    while ((c = getopt (argc, argv, "+lR")) != -1)
+    {
+       switch (c)
+       {
+           case 'l':
+               local = 1;
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case '?':
+           default:
+               usage (watch_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       start_server ();
+
+       ign_setup ();
+
+       if (local)
+           send_arg ("-l");
+       send_arg ("--");
+       send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
+       send_file_names (argc, argv, SEND_EXPAND_WILD);
+       send_to_server (turning_on ? "watch-on\012" : "watch-off\012", 0);
+       return get_responses_and_close ();
+    }
+#endif /* CLIENT_SUPPORT */
+
+    setting_default = (argc <= 0);
+
+    lock_tree_promotably (argc, argv, local, W_LOCAL, 0);
+
+    err = start_recursion (onoff_fileproc, onoff_filesdoneproc, NULL, NULL,
+                          NULL, argc, argv, local, W_LOCAL, 0, CVS_LOCK_WRITE,
+                          NULL, 0, NULL);
+
+    Lock_Cleanup ();
+    return err;
+}
+
+int
+watch_on (int argc, char **argv)
+{
+    turning_on = 1;
+    return watch_onoff (argc, argv);
+}
+
+int
+watch_off (int argc, char **argv)
+{
+    turning_on = 0;
+    return watch_onoff (argc, argv);
+}
+
+
+
+static int
+dummy_fileproc (void *callerdat, struct file_info *finfo)
+{
+    /* This is a pretty hideous hack, but the gist of it is that recurse.c
+       won't call notify_check unless there is a fileproc, so we can't just
+       pass NULL for fileproc.  */
+    return 0;
+}
+
+
+
+/* Check for and process notifications.  Local only.  I think that doing
+   this as a fileproc is the only way to catch all the
+   cases (e.g. foo/bar.c), even though that means checking over and over
+   for the same CVSADM_NOTIFY file which we removed the first time we
+   processed the directory.  */
+static int
+ncheck_fileproc (void *callerdat, struct file_info *finfo)
+{
+    int notif_type;
+    char *filename;
+    char *val;
+    char *cp;
+    char *watches;
+
+    FILE *fp;
+    char *line = NULL;
+    size_t line_len = 0;
+
+    /* We send notifications even if noexec.  I'm not sure which behavior
+       is most sensible.  */
+
+    fp = CVS_FOPEN (CVSADM_NOTIFY, "r");
+    if (fp == NULL)
+    {
+       if (!existence_error (errno))
+           error (0, errno, "cannot open %s", CVSADM_NOTIFY);
+       return 0;
+    }
+
+    while (getline (&line, &line_len, fp) > 0)
+    {
+       notif_type = line[0];
+       if (notif_type == '\0')
+           continue;
+       filename = line + 1;
+       cp = strchr (filename, '\t');
+       if (cp == NULL)
+           continue;
+       *cp++ = '\0';
+       val = cp;
+       cp = strchr (val, '\t');
+       if (cp == NULL)
+           continue;
+       *cp++ = '+';
+       cp = strchr (cp, '\t');
+       if (cp == NULL)
+           continue;
+       *cp++ = '+';
+       cp = strchr (cp, '\t');
+       if (cp == NULL)
+           continue;
+       *cp++ = '\0';
+       watches = cp;
+       cp = strchr (cp, '\n');
+       if (cp == NULL)
+           continue;
+       *cp = '\0';
+
+       notify_do (notif_type, filename, finfo->update_dir, getcaller (), val,
+                  watches, finfo->repository);
+    }
+    free (line);
+
+    if (ferror (fp))
+       error (0, errno, "cannot read %s", CVSADM_NOTIFY);
+    if (fclose (fp) < 0)
+       error (0, errno, "cannot close %s", CVSADM_NOTIFY);
+
+    if ( CVS_UNLINK (CVSADM_NOTIFY) < 0)
+       error (0, errno, "cannot remove %s", CVSADM_NOTIFY);
+
+    return 0;
+}
+
+
+
+/* Look through the CVSADM_NOTIFY file and process each item there
+   accordingly.  */
+static int
+send_notifications (int argc, char **argv, int local)
+{
+    int err = 0;
+
+#ifdef CLIENT_SUPPORT
+    /* OK, we've done everything which needs to happen on the client side.
+       Now we can try to contact the server; if we fail, then the
+       notifications stay in CVSADM_NOTIFY to be sent next time.  */
+    if (current_parsed_root->isremote)
+    {
+       if (strcmp (cvs_cmd_name, "release") != 0)
+       {
+           start_server ();
+           ign_setup ();
+       }
+
+       err += start_recursion (dummy_fileproc, NULL, NULL, NULL, NULL, argc,
+                               argv, local, W_LOCAL, 0, 0, NULL, 0, NULL);
+
+       send_to_server ("noop\012", 0);
+       if (strcmp (cvs_cmd_name, "release") == 0)
+           err += get_server_responses ();
+       else
+           err += get_responses_and_close ();
+    }
+    else
+#endif
+    {
+       /* Local.  */
+
+       err += start_recursion (ncheck_fileproc, NULL, NULL, NULL, NULL, argc,
+                               argv, local, W_LOCAL, 0, CVS_LOCK_WRITE, NULL,
+                               0, NULL);
+       Lock_Cleanup ();
+    }
+    return err;
+}
+
+
+
+void editors_output (const char *fullname, const char *p)
+{
+    cvs_output (fullname, 0);
+
+    while (1)
+    {
+        cvs_output ("\t", 1);
+        while (*p != '>' && *p != '\0')
+            cvs_output (p++, 1);
+        if (*p == '\0')
+        {
+            /* Only happens if attribute is misformed.  */
+            cvs_output ("\n", 1);
+            break;
+        }
+        ++p;
+        cvs_output ("\t", 1);
+        while (1)
+        {
+            while (*p != '+' && *p != ',' && *p != '\0')
+                cvs_output (p++, 1);
+            if (*p == '\0')
+            {
+                cvs_output ("\n", 1);
+                return;
+            }
+            if (*p == ',')
+            {
+                ++p;
+                break;
+            }
+            ++p;
+            cvs_output ("\t", 1);
+        }
+        cvs_output ("\n", 1);
+    }
+}
+
+
+
+static int find_editors_and_output (struct file_info *finfo)
+{
+    char *them;
+
+    them = fileattr_get0 (finfo->file, "_editors");
+    if (them == NULL)
+        return 0;
+
+    editors_output (finfo->fullname, them);
+
+    return 0;
+}
+
+
+
+/* Handle the client-side details of editing a file.
+ *
+ * These args could be const but this needs to fit the call_in_directory API.
+ */
+void
+edit_file (void *data, List *ent_list, const char *short_pathname,
+          const char *filename)
+{
+    Node *node;
+    struct file_info finfo;
+    char *editbasefn, *basefn, *rev;
+
+
+    node = findnode_fn (ent_list, filename);
+
+    /* I'm not sure why this isn't an error.  */
+    if (!node) return;
+    rev = ((Entnode *) node->data)->version;
+
+    xchmod (filename, 1);
+    mkdir_if_needed (CVSADM_BASE);
+    basefn = make_base_file_name (filename, rev);
+
+    if (!isfile (basefn))
+    {
+       /* If this client is interoperating with clients older than 1.12.14,
+        * then the CVS/Base/.#FILENAME.REV may not have been created on
+        * checkout/update/commit.
+        */
+       if (!quiet)
+       {
+           error (0, 0, "Base revision (%s) for `%s' is missing.",
+                  rev, short_pathname);
+           error (0, 0, "Using `%s' to create unedit fallback.",
+                  short_pathname);
+       }
+
+       free (basefn);
+       basefn = xstrdup (filename);
+    }
+
+    editbasefn = Xasprintf ("%s/%s", CVSADM_BASE, filename);
+    if (isfile (editbasefn))
+       xchmod (editbasefn, true);
+    copy_file (basefn, editbasefn);
+    free (basefn);
+    free (editbasefn);
+
+    finfo.file = filename;
+    finfo.fullname = short_pathname;
+    finfo.update_dir = dir_name (short_pathname);
+    base_register (finfo.update_dir, finfo.file, rev);
+    free ((char *)finfo.update_dir);
+}
+
+
+
+static int
+edit_fileproc (void *callerdat, struct file_info *finfo)
+{
+    FILE *fp;
+    time_t now;
+    char *ascnow;
+    Vers_TS *vers;
+
+#if defined (CLIENT_SUPPORT)
+    assert (!(current_parsed_root->isremote && check_edited));
+#else /* !CLIENT_SUPPORT */
+    assert (!check_edited);
+#endif /* CLIENT_SUPPORT */
+
+    if (noexec)
+       return 0;
+
+    vers = Version_TS (finfo, NULL, NULL, NULL, 1, 0);
+
+    if (!vers->vn_user)
+    {
+       error (0, 0, "no such file %s; ignored", finfo->fullname);
+       return 1;
+    }
+
+#ifdef CLIENT_SUPPORT
+    if (!current_parsed_root->isremote)
+#endif /* CLIENT_SUPPORT */
+    {
+        char *editors = fileattr_get0 (finfo->file, "_editors");
+        if (editors)
+        {
+           if (check_edited)
+           {
+               /* In the !CHECK_EDIT case, this message is printed by
+                * server_notify.
+                */
+               if (!quiet)
+                   editors_output (finfo->fullname, editors);
+                /* Now warn the user if we skip the file, then return.  */
+               if (!really_quiet)
+                   error (0, 0, "Skipping file `%s' due to existing editors.",
+                          finfo->fullname);
+               return 1;
+           }
+            free (editors);
+        }
+    }
+
+    fp = xfopen (CVSADM_NOTIFY, "a");
+
+    (void) time (&now);
+    ascnow = asctime (gmtime (&now));
+    ascnow[24] = '\0';
+    /* Fix non-standard format.  */
+    if (ascnow[8] == '0') ascnow[8] = ' ';
+    fprintf (fp, "E%s\t%s -0000\t%s\t%s\t", finfo->file,
+            ascnow, hostname, CurDir);
+    if (setting_tedit)
+       fprintf (fp, "E");
+    if (setting_tunedit)
+       fprintf (fp, "U");
+    if (setting_tcommit)
+       fprintf (fp, "C");
+    fprintf (fp, "\n");
+
+    if (fclose (fp) < 0)
+    {
+       if (finfo->update_dir[0] == '\0')
+           error (0, errno, "cannot close %s", CVSADM_NOTIFY);
+       else
+           error (0, errno, "cannot close %s/%s", finfo->update_dir,
+                  CVSADM_NOTIFY);
+    }
+
+    /* Now stash the file away in CVSADM so that unedit can revert even if
+       it can't communicate with the server.  We stash away a writable
+       copy so that if the user removes the working file, then restores it
+       with "cvs update" (which clears _editors but does not update
+       CVSADM_BASE), then a future "cvs edit" can still win.  */
+    /* Could save a system call by only calling mkdir_if_needed if
+       trying to create the output file fails.  But copy_file isn't
+       set up to facilitate that.  */
+#ifdef SERVER_SUPPORT
+    if (server_active)
+       server_edit_file (finfo);
+    else
+#endif /* SERVER_SUPPORT */
+       edit_file (NULL, finfo->entries, finfo->fullname, finfo->file);
+
+    return 0;
+}
+
+static const char *const edit_usage[] =
+{
+    "Usage: %s %s [-lRcf] [-a <action>]... [<file>]...\n",
+    "-l\tLocal directory only, not recursive.\n",
+    "-R\tProcess directories recursively (default).\n",
+    "-a\tSpecify action to register for temporary watch, one of:\n",
+    "  \t`edit', `unedit', `commit', `all', `none' (defaults to `all').\n",
+    "-c\tCheck for <file>s edited by others and abort if found.\n",
+    "-f\tAllow edit if <file>s are edited by others (default).\n",
+    "(Specify the --help global option for a list of other help options.)\n",
+    NULL
+};
+
+int
+edit (int argc, char **argv)
+{
+    int local = 0;
+    int c;
+    int err = 0;
+    bool a_omitted, a_all, a_none;
+
+    if (argc == -1)
+       usage (edit_usage);
+
+    a_omitted = true;
+    a_all = false;
+    a_none = false;
+    setting_tedit = false;
+    setting_tunedit = false;
+    setting_tcommit = false;
+    optind = 0;
+    while ((c = getopt (argc, argv, "+cflRa:")) != -1)
+    {
+       switch (c)
+       {
+            case 'c':
+                check_edited = true;
+                break;
+            case 'f':
+                check_edited = false;
+                break;
+           case 'l':
+               local = 1;
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case 'a':
+               a_omitted = false;
+               if (strcmp (optarg, "edit") == 0)
+                   setting_tedit = true;
+               else if (strcmp (optarg, "unedit") == 0)
+                   setting_tunedit = true;
+               else if (strcmp (optarg, "commit") == 0)
+                   setting_tcommit = true;
+               else if (strcmp (optarg, "all") == 0)
+               {
+                   a_all = true;
+                   a_none = false;
+                   setting_tedit = true;
+                   setting_tunedit = true;
+                   setting_tcommit = true;
+               }
+               else if (strcmp (optarg, "none") == 0)
+               {
+                   a_none = true;
+                   a_all = false;
+                   setting_tedit = false;
+                   setting_tunedit = false;
+                   setting_tcommit = false;
+               }
+               else
+                   usage (edit_usage);
+               break;
+           case '?':
+           default:
+               usage (edit_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+    if (strpbrk (hostname, "+,>;=\t\n") != NULL)
+       error (1, 0,
+              "host name (%s) contains an invalid character (+,>;=\\t\\n)",
+              hostname);
+    if (strpbrk (CurDir, "+,>;=\t\n") != NULL)
+       error (1, 0,
+"current directory (%s) contains an invalid character (+,>;=\\t\\n)",
+              CurDir);
+
+#ifdef CLIENT_SUPPORT
+    if (check_edited && current_parsed_root->isremote)
+    {
+       /* When CHECK_EDITED, we might as well contact the server and let it do
+        * the work since we don't want an edit unless we know it is safe.
+        *
+        * When !CHECK_EDITED, we set up notifications and then attempt to
+        * contact the server in order to allow disconnected edits.
+        */
+       start_server();
+
+       if (!supported_request ("edit"))
+           error (1, 0, "Server does not support enforced advisory locks.");
+
+       ign_setup();
+
+       send_to_server ("Hostname ", 0);
+       send_to_server (hostname, 0);
+       send_to_server ("\012", 1);
+       send_to_server ("LocalDir ", 0);
+       send_to_server (CurDir, 0);
+       send_to_server ("\012", 1);
+
+       if (local)
+           send_arg ("-l");
+       send_arg ("-c");
+       if (!a_omitted)
+       {
+           if (a_all)
+               option_with_arg ("-a", "all");
+           else if (a_none)
+               option_with_arg ("-a", "none");
+           else
+           {
+               if (setting_tedit)
+                   option_with_arg ("-a", "edit");
+               if (setting_tunedit)
+                   option_with_arg ("-a", "unedit");
+               if (setting_tcommit)
+                   option_with_arg ("-a", "commit");
+           }
+       }
+       send_arg ("--");
+       send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
+       send_file_names (argc, argv, SEND_EXPAND_WILD);
+       send_to_server ("edit\012", 0);
+       return get_responses_and_close ();
+    }
+#endif /* CLIENT_SUPPORT */
+
+    /* Now, either SERVER_ACTIVE, local mode, or !CHECK_EDITED.  */
+
+    if (a_omitted)
+    {
+       setting_tedit = true;
+       setting_tunedit = true;
+       setting_tcommit = true;
+    }
+
+    TRACE (TRACE_DATA, "edit(): EUC: %d%d%d edit-check: %d",
+          setting_tedit, setting_tunedit, setting_tcommit, check_edited);
+
+    err = start_recursion (edit_fileproc, NULL, NULL, NULL, NULL, argc, argv,
+                          local, W_LOCAL, 0, 0, NULL, 0, NULL);
+
+    err += send_notifications (argc, argv, local);
+
+    return err;
+}
+
+static int unedit_fileproc (void *callerdat, struct file_info *finfo);
+
+static int
+unedit_fileproc (void *callerdat, struct file_info *finfo)
+{
+    FILE *fp;
+    time_t now;
+    char *ascnow;
+    char *basefilename = NULL;
+
+    if (noexec)
+       return 0;
+
+    basefilename = Xasprintf ("%s/%s", CVSADM_BASE, finfo->file);
+    if (!isfile (basefilename))
+    {
+       /* This file apparently was never cvs edit'd (e.g. we are uneditting
+          a directory where only some of the files were cvs edit'd.  */
+       free (basefilename);
+       return 0;
+    }
+
+    if (xcmp (finfo->file, basefilename) != 0)
+    {
+       printf ("%s has been modified; revert changes? ", finfo->fullname);
+       fflush (stderr);
+       fflush (stdout);
+       if (!yesno ())
+       {
+           /* "no".  */
+           free (basefilename);
+           return 0;
+       }
+    }
+    rename_file (basefilename, finfo->file);
+    free (basefilename);
+
+    fp = xfopen (CVSADM_NOTIFY, "a");
+
+    (void) time (&now);
+    ascnow = asctime (gmtime (&now));
+    ascnow[24] = '\0';
+    /* Fix non-standard format.  */
+    if (ascnow[8] == '0') ascnow[8] = ' ';
+    fprintf (fp, "U%s\t%s -0000\t%s\t%s\t\n", finfo->file,
+            ascnow, hostname, CurDir);
+
+    if (fclose (fp) < 0)
+    {
+       if (finfo->update_dir[0] == '\0')
+           error (0, errno, "cannot close %s", CVSADM_NOTIFY);
+       else
+           error (0, errno, "cannot close %s/%s", finfo->update_dir,
+                  CVSADM_NOTIFY);
+    }
+
+    /* Now update the revision number in CVS/Entries from CVS/Baserev.
+       The basic idea here is that we are reverting to the revision
+       that the user edited.  If we wanted "cvs update" to update
+       CVS/Base as we go along (so that an unedit could revert to the
+       current repository revision), we would need:
+
+       update (or all send_files?) (client) needs to send revision in
+       new Entry-base request.  update (server/local) needs to check
+       revision against repository and send new Update-base response
+       (like Update-existing in that the file already exists.  While
+       we are at it, might try to clean up the syntax by having the
+       mode only in a "Mode" response, not in the Update-base itself).  */
+    {
+       char *baserev;
+       Node *node;
+       Entnode *entdata;
+
+       baserev = base_get (finfo->update_dir, finfo->file);
+       node = findnode_fn (finfo->entries, finfo->file);
+       /* The case where node is NULL probably should be an error or
+          something, but I don't want to think about it too hard right
+          now.  */
+       if (node != NULL)
+       {
+           entdata = node->data;
+           if (baserev == NULL)
+           {
+               /* This can only happen if the CVS/Baserev file got
+                  corrupted.  We suspect it might be possible if the
+                  user interrupts CVS, although I haven't verified
+                  that.  */
+               error (0, 0, "%s not mentioned in %s", finfo->fullname,
+                      CVSADM_BASEREV);
+
+               /* Since we don't know what revision the file derives from,
+                  keeping it around would be asking for trouble.  */
+               if (unlink_file (finfo->file) < 0)
+                   error (0, errno, "cannot remove %s", finfo->fullname);
+
+               /* This is cheesy, in a sense; why shouldn't we do the
+                  update for the user?  However, doing that would require
+                  contacting the server, so maybe this is OK.  */
+               error (0, 0, "run update to complete the unedit");
+               return 0;
+           }
+           Register (finfo->entries, finfo->file, baserev, entdata->timestamp,
+                     entdata->options, entdata->tag, entdata->date,
+                     entdata->conflict);
+       }
+       free (baserev);
+       base_deregister (finfo->update_dir, finfo->file);
+    }
+
+    xchmod (finfo->file, 0);
+    return 0;
+}
+
+static const char *const unedit_usage[] =
+{
+    "Usage: %s %s [-lR] [<file>]...\n",
+    "-l\tLocal directory only, not recursive.\n",
+    "-R\tProcess directories recursively (default).\n",
+    "(Specify the --help global option for a list of other help options.)\n",
+    NULL
+};
+
+int
+unedit (int argc, char **argv)
+{
+    int local = 0;
+    int c;
+    int err;
+
+    if (argc == -1)
+       usage (unedit_usage);
+
+    optind = 0;
+    while ((c = getopt (argc, argv, "+lR")) != -1)
+    {
+       switch (c)
+       {
+           case 'l':
+               local = 1;
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case '?':
+           default:
+               usage (unedit_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+    /* No need to readlock since we aren't doing anything to the
+       repository.  */
+    err = start_recursion (unedit_fileproc, NULL, NULL, NULL, NULL, argc, argv,
+                          local, W_LOCAL, 0, 0, NULL, 0, NULL);
+
+    err += send_notifications (argc, argv, local);
+
+    return err;
+}
+
+
+
+void
+mark_up_to_date (const char*update_dir, const char *file)
+{
+    char *base;
+
+    /* The file is up to date, so we better get rid of an out of
+       date file in CVSADM_BASE.  */
+    base = Xasprintf ("%s/%s", CVSADM_BASE, file);
+    if (unlink_file (base) < 0 && ! existence_error (errno))
+       error (0, errno, "cannot remove `%s/%s'", update_dir, base);
+    free (base);
+}
+
+
+
+void
+editor_set (const char *filename, const char *editor, const char *val)
+{
+    char *edlist;
+    char *newlist;
+
+    edlist = fileattr_get0 (filename, "_editors");
+    newlist = fileattr_modify (edlist, editor, val, '>', ',');
+    /* If the attributes is unchanged, don't rewrite the attribute file.  */
+    if (!((edlist == NULL && newlist == NULL)
+         || (edlist != NULL
+             && newlist != NULL
+             && strcmp (edlist, newlist) == 0)))
+       fileattr_set (filename, "_editors", newlist);
+    if (edlist != NULL)
+       free (edlist);
+    if (newlist != NULL)
+       free (newlist);
+}
+
+struct notify_proc_args {
+    /* What kind of notification, "edit", "tedit", etc.  */
+    const char *type;
+    /* User who is running the command which causes notification.  */
+    const char *who;
+    /* User to be notified.  */
+    const char *notifyee;
+    /* File.  */
+    const char *file;
+};
+
+
+
+static int
+notify_proc (const char *repository, const char *filter, void *closure)
+{
+    char *cmdline;
+    FILE *pipefp;
+    const char *srepos = Short_Repository (repository);
+    struct notify_proc_args *args = closure;
+
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             false, srepos,
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             filter,
+                             "c", "s", cvs_cmd_name,
+#ifdef SERVER_SUPPORT
+                             "R", "s", referrer ? referrer->original : "NONE",
+#endif /* SERVER_SUPPORT */
+                             "p", "s", srepos,
+                             "r", "s", current_parsed_root->directory,
+                             "s", "s", args->notifyee,
+                             (char *) NULL);
+    if (!cmdline || !strlen (cmdline))
+    {
+       if (cmdline) free (cmdline);
+       error (0, 0, "pretag proc resolved to the empty string!");
+       return 1;
+    }
+
+    pipefp = run_popen (cmdline, "w");
+    if (pipefp == NULL)
+    {
+       error (0, errno, "cannot write entry to notify filter: %s", cmdline);
+       free (cmdline);
+       return 1;
+    }
+
+    fprintf (pipefp, "%s %s\n---\n", srepos, args->file);
+    fprintf (pipefp, "Triggered %s watch on %s\n", args->type, repository);
+    fprintf (pipefp, "By %s\n", args->who);
+
+    /* Lots more potentially useful information we could add here; see
+       logfile_write for inspiration.  */
+
+    free (cmdline);
+    return pclose (pipefp);
+}
+
+
+
+/* FIXME: this function should have a way to report whether there was
+   an error so that server.c can know whether to report Notified back
+   to the client.  */
+void
+notify_do (int type, const char *filename, const char *update_dir,
+          const char *who, const char *val, const char *watches,
+          const char *repository)
+{
+    static struct addremove_args blank;
+    struct addremove_args args;
+    char *watchers;
+    char *p;
+    char *endp;
+    char *nextp;
+
+    /* Print out information on current editors if we were called during an
+     * edit.
+     */
+    if (type == 'E' && !check_edited && !quiet)
+    {
+       char *editors = fileattr_get0 (filename, "_editors");
+       if (editors)
+       {
+           /* In the CHECK_EDIT case, this message is printed by
+            * edit_check.  It needs to be done here too since files
+            * which are found to be edited when CHECK_EDIT are not
+            * added to the notify list.
+            */
+           const char *tmp;
+           if (update_dir && *update_dir)
+               tmp  = Xasprintf ("%s/%s", update_dir, filename);
+           else
+               tmp = filename;
+
+           editors_output (tmp, editors);
+
+           if (update_dir && *update_dir) free ((char *)tmp);
+           free (editors);
+       }
+    }
+
+    /* Initialize fields to 0, NULL, or 0.0.  */
+    args = blank;
+    switch (type)
+    {
+       case 'E':
+           if (strpbrk (val, ",>;=\n") != NULL)
+           {
+               error (0, 0, "invalid character in editor value");
+               return;
+           }
+           editor_set (filename, who, val);
+           break;
+       case 'U':
+       case 'C':
+           editor_set (filename, who, NULL);
+           break;
+       default:
+           return;
+    }
+
+    watchers = fileattr_get0 (filename, "_watchers");
+    p = watchers;
+    while (p != NULL)
+    {
+       char *q;
+       char *endq;
+       char *nextq;
+       char *notif;
+
+       endp = strchr (p, '>');
+       if (endp == NULL)
+           break;
+       nextp = strchr (p, ',');
+
+       if ((size_t)(endp - p) == strlen (who) && strncmp (who, p, endp - p) == 
0)
+       {
+           /* Don't notify user of their own changes.  Would perhaps
+              be better to check whether it is the same working
+              directory, not the same user, but that is hairy.  */
+           p = nextp == NULL ? nextp : nextp + 1;
+           continue;
+       }
+
+       /* Now we point q at a string which looks like
+          "edit+unedit+commit,"... and walk down it.  */
+       q = endp + 1;
+       notif = NULL;
+       while (q != NULL)
+       {
+           endq = strchr (q, '+');
+           if (endq == NULL || (nextp != NULL && endq > nextp))
+           {
+               if (nextp == NULL)
+                   endq = q + strlen (q);
+               else
+                   endq = nextp;
+               nextq = NULL;
+           }
+           else
+               nextq = endq + 1;
+
+           /* If there is a temporary and a regular watch, send a single
+              notification, for the regular watch.  */
+           if (type == 'E' && endq - q == 4 && strncmp ("edit", q, 4) == 0)
+           {
+               notif = "edit";
+           }
+           else if (type == 'U'
+                    && endq - q == 6 && strncmp ("unedit", q, 6) == 0)
+           {
+               notif = "unedit";
+           }
+           else if (type == 'C'
+                    && endq - q == 6 && strncmp ("commit", q, 6) == 0)
+           {
+               notif = "commit";
+           }
+           else if (type == 'E'
+                    && endq - q == 5 && strncmp ("tedit", q, 5) == 0)
+           {
+               if (notif == NULL)
+                   notif = "temporary edit";
+           }
+           else if (type == 'U'
+                    && endq - q == 7 && strncmp ("tunedit", q, 7) == 0)
+           {
+               if (notif == NULL)
+                   notif = "temporary unedit";
+           }
+           else if (type == 'C'
+                    && endq - q == 7 && strncmp ("tcommit", q, 7) == 0)
+           {
+               if (notif == NULL)
+                   notif = "temporary commit";
+           }
+           q = nextq;
+       }
+       if (nextp != NULL)
+           ++nextp;
+
+       if (notif != NULL)
+       {
+           struct notify_proc_args args;
+           size_t len = endp - p;
+           FILE *fp;
+           char *usersname;
+           char *line = NULL;
+           size_t line_len = 0;
+
+           args.notifyee = NULL;
+           usersname = Xasprintf ("%s/%s/%s", current_parsed_root->directory,
+                                  CVSROOTADM, CVSROOTADM_USERS);
+           fp = CVS_FOPEN (usersname, "r");
+           if (fp == NULL && !existence_error (errno))
+               error (0, errno, "cannot read %s", usersname);
+           if (fp != NULL)
+           {
+               while (getline (&line, &line_len, fp) >= 0)
+               {
+                   if (strncmp (line, p, len) == 0
+                       && line[len] == ':')
+                   {
+                       char *cp;
+                       args.notifyee = xstrdup (line + len + 1);
+
+                        /* There may or may not be more
+                           colon-separated fields added to this in the
+                           future; in any case, we ignore them right
+                           now, and if there are none we make sure to
+                           chop off the final newline, if any. */
+                       cp = strpbrk (args.notifyee, ":\n");
+
+                       if (cp != NULL)
+                           *cp = '\0';
+                       break;
+                   }
+               }
+               if (ferror (fp))
+                   error (0, errno, "cannot read %s", usersname);
+               if (fclose (fp) < 0)
+                   error (0, errno, "cannot close %s", usersname);
+           }
+           free (usersname);
+           if (line != NULL)
+               free (line);
+
+           if (args.notifyee == NULL)
+           {
+               char *tmp;
+               tmp = xmalloc (endp - p + 1);
+               strncpy (tmp, p, endp - p);
+               tmp[endp - p] = '\0';
+               args.notifyee = tmp;
+           }
+
+           args.type = notif;
+           args.who = who;
+           args.file = filename;
+
+           (void) Parse_Info (CVSROOTADM_NOTIFY, repository, notify_proc,
+                              PIOPT_ALL, &args);
+            /* It's okay to cast out the const for the free() below since we
+             * just allocated this a few lines above.  The const was for
+             * everybody else.
+             */
+           free ((char *)args.notifyee);
+       }
+
+       p = nextp;
+    }
+    if (watchers != NULL)
+       free (watchers);
+
+    switch (type)
+    {
+       case 'E':
+           if (*watches == 'E')
+           {
+               args.add_tedit = 1;
+               ++watches;
+           }
+           if (*watches == 'U')
+           {
+               args.add_tunedit = 1;
+               ++watches;
+           }
+           if (*watches == 'C')
+           {
+               args.add_tcommit = 1;
+           }
+           watch_modify_watchers (filename, &args);
+           break;
+       case 'U':
+       case 'C':
+           args.remove_temp = 1;
+           watch_modify_watchers (filename, &args);
+           break;
+    }
+}
+
+
+
+#ifdef CLIENT_SUPPORT
+/* Check and send notifications.  This is only for the client.  */
+void
+notify_check (const char *repository, const char *update_dir)
+{
+    FILE *fp;
+    char *line = NULL;
+    size_t line_len = 0;
+
+    if (!server_started)
+       /* We are in the midst of a command which is not to talk to
+          the server (e.g. the first phase of a cvs edit).  Just chill
+          out, we'll catch the notifications on the flip side.  */
+       return;
+
+    /* We send notifications even if noexec.  I'm not sure which behavior
+       is most sensible.  */
+
+    fp = CVS_FOPEN (CVSADM_NOTIFY, "r");
+    if (fp == NULL)
+    {
+       if (!existence_error (errno))
+           error (0, errno, "cannot open %s", CVSADM_NOTIFY);
+       return;
+    }
+    while (getline (&line, &line_len, fp) > 0)
+    {
+       int notif_type;
+       char *filename;
+       char *val;
+       char *cp;
+
+       notif_type = line[0];
+       if (notif_type == '\0')
+           continue;
+       filename = line + 1;
+       cp = strchr (filename, '\t');
+       if (cp == NULL)
+           continue;
+       *cp++ = '\0';
+       val = cp;
+
+       client_notify (repository, update_dir, filename, notif_type, val);
+    }
+    if (line)
+       free (line);
+    if (ferror (fp))
+       error (0, errno, "cannot read %s", CVSADM_NOTIFY);
+    if (fclose (fp) < 0)
+       error (0, errno, "cannot close %s", CVSADM_NOTIFY);
+
+    /* Leave the CVSADM_NOTIFY file there, until the server tells us it
+       has dealt with it.  */
+}
+#endif /* CLIENT_SUPPORT */
+
+
+static const char *const editors_usage[] =
+{
+    "Usage: %s %s [-lR] [<file>]...\n",
+    "-l\tProcess this directory only (not recursive).\n",
+    "-R\tProcess directories recursively (default).\n",
+    "(Specify the --help global option for a list of other help options.)\n",
+    NULL
+};
+
+
+
+static int
+editors_fileproc (void *callerdat, struct file_info *finfo)
+{
+    return find_editors_and_output (finfo);
+}
+
+
+
+int
+editors (int argc, char **argv)
+{
+    int local = 0;
+    int c;
+
+    if (argc == -1)
+       usage (editors_usage);
+
+    optind = 0;
+    while ((c = getopt (argc, argv, "+lR")) != -1)
+    {
+       switch (c)
+       {
+           case 'l':
+               local = 1;
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case '?':
+           default:
+               usage (editors_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       start_server ();
+       ign_setup ();
+
+       if (local)
+           send_arg ("-l");
+       send_arg ("--");
+       send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
+       send_file_names (argc, argv, SEND_EXPAND_WILD);
+       send_to_server ("editors\012", 0);
+       return get_responses_and_close ();
+    }
+#endif /* CLIENT_SUPPORT */
+
+    return start_recursion (editors_fileproc, NULL, NULL, NULL, NULL,
+                           argc, argv, local, W_LOCAL, 0, CVS_LOCK_READ, NULL,
+                           0, NULL);
+}
Index: ccvs/src/entries.c
diff -u /dev/null ccvs/src/entries.c:1.66.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/entries.c  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,951 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Entries file to Files file
+ * 
+ * Creates the file Files containing the names that comprise the project, from
+ * the Entries file.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Validate API.  */
+#include "entries.h"
+
+/* GNULIB */
+#include "getline.h"
+
+/* CVS */
+#include "base.h"
+
+#include "cvs.h"
+
+static Node *AddEntryNode (List * list, Entnode *entnode);
+
+static Entnode *fgetentent (FILE *, char *, int *);
+static int   fputentent (FILE *, Entnode *);
+
+static Entnode *subdir_record (int, const char *, const char *);
+
+static FILE *entfile;
+static char *entfilename;              /* for error messages */
+
+
+
+/*
+ * Construct an Entnode
+ */
+static Entnode *
+Entnode_Create (enum ent_type type, const char *user, const char *vn,
+                const char *ts, const char *options, const char *tag,
+                const char *date, const char *ts_conflict)
+{
+    Entnode *ent;
+    
+    /* Note that timestamp and options must be non-NULL */
+    ent = xmalloc (sizeof (Entnode));
+    ent->type      = type;
+    ent->user      = xstrdup (user);
+    ent->version   = xstrdup (vn);
+    ent->timestamp = xstrdup (ts ? ts : "");
+    ent->options   = xstrdup (options ? options : "");
+    ent->tag       = xstrdup (tag);
+    ent->date      = xstrdup (date);
+    ent->conflict  = xstrdup (ts_conflict);
+
+    return ent;
+}
+
+/*
+ * Destruct an Entnode
+ */
+static void Entnode_Destroy (Entnode *);
+
+static void
+Entnode_Destroy (Entnode *ent)
+{
+    TRACE (TRACE_FLOW, "Entnode_Destroy ()");
+
+    free (ent->user);
+    free (ent->version);
+    free (ent->timestamp);
+    free (ent->options);
+    if (ent->tag)
+       free (ent->tag);
+    if (ent->date)
+       free (ent->date);
+    if (ent->conflict)
+       free (ent->conflict);
+    free (ent);
+}
+
+/*
+ * Write out the line associated with a node of an entries file
+ */
+static int write_ent_proc (Node *, void *);
+static int
+write_ent_proc (Node *node, void *closure)
+{
+    Entnode *entnode = node->data;
+
+    if (closure != NULL && entnode->type != ENT_FILE)
+       *(int *) closure = 1;
+
+    if (fputentent (entfile, entnode))
+       error (1, errno, "cannot write %s", entfilename);
+
+    return 0;
+}
+
+/*
+ * write out the current entries file given a list,  making a backup copy
+ * first of course
+ */
+static void
+write_entries (List *list)
+{
+    int sawdir;
+
+    sawdir = 0;
+
+    /* open the new one and walk the list writing entries */
+    entfilename = CVSADM_ENTBAK;
+    entfile = CVS_FOPEN (entfilename, "w+");
+    if (entfile == NULL)
+    {
+       /* Make this a warning, not an error.  For example, one user might
+          have checked out a working directory which, for whatever reason,
+          contains an Entries.Log file.  A second user, without write access
+          to that working directory, might want to do a "cvs log".  The
+          problem rewriting Entries shouldn't affect the ability of "cvs log"
+          to work, although the warning is probably a good idea so that
+          whether Entries gets rewritten is not an inexplicable process.  */
+       /* FIXME: should be including update_dir in message.  */
+       error (0, errno, "cannot rewrite %s", entfilename);
+
+       /* Now just return.  We leave the Entries.Log file around.  As far
+          as I know, there is never any data lying around in 'list' that
+          is not in Entries.Log at this time (if there is an error writing
+          Entries.Log that is a separate problem).  */
+       return;
+    }
+
+    (void) walklist (list, write_ent_proc, (void *) &sawdir);
+    if (! sawdir)
+    {
+       struct stickydirtag *sdtp;
+
+       /* We didn't write out any directories.  Check the list
+           private data to see whether subdirectory information is
+           known.  If it is, we need to write out an empty D line.  */
+       sdtp = list->list->data;
+       if (sdtp == NULL || sdtp->subdirs)
+           if (fprintf (entfile, "D\n") < 0)
+               error (1, errno, "cannot write %s", entfilename);
+    }
+    if (fclose (entfile) == EOF)
+       error (1, errno, "error closing %s", entfilename);
+
+    /* now, atomically (on systems that support it) rename it */
+    rename_file (entfilename, CVSADM_ENT);
+
+    /* now, remove the log file */
+    if (unlink_file (CVSADM_ENTLOG) < 0
+       && !existence_error (errno))
+       error (0, errno, "cannot remove %s", CVSADM_ENTLOG);
+}
+
+
+
+/*
+ * Removes the argument file from the Entries file if necessary.
+ * Deletes the base file, if it existed.
+ */
+void
+Scratch_Entry (List *list, const char *fname)
+{
+    Node *node;
+
+    TRACE (TRACE_FUNCTION, "Scratch_Entry(%s)", fname);
+
+    /* hashlookup to see if it is there */
+    if ((node = findnode_fn (list, fname)) != NULL)
+    {
+       if (!noexec)
+       {
+           Entnode *e = node->data;
+           base_remove (fname, e->version);
+
+           entfilename = CVSADM_ENTLOG;
+           entfile = xfopen (entfilename, "a");
+
+           if (fprintf (entfile, "R ") < 0)
+               error (1, errno, "cannot write %s", entfilename);
+
+           write_ent_proc (node, NULL);
+
+           if (fclose (entfile) == EOF)
+               error (1, errno, "error closing %s", entfilename);
+       }
+
+       delnode (node);                 /* delete the node */
+
+#ifdef SERVER_SUPPORT
+       if (server_active)
+           server_scratch (fname);
+#endif
+    }
+}
+
+
+
+/*
+ * Enters the given file name/version/time-stamp into the Entries file,
+ * removing the old entry first, if necessary.
+ */
+void
+Register (List *list, const char *fname, const char *vn, const char *ts,
+         const char *options, const char *tag, const char *date,
+         const char *ts_conflict)
+{
+    Entnode *entnode;
+    Node *node;
+
+    TRACE (TRACE_FUNCTION, "Register(%s, %s, %s%s%s, %s, %s %s)",
+          fname, vn, ts ? ts : "",
+          ts_conflict ? "+" : "", ts_conflict ? ts_conflict : "",
+          options, tag ? tag : "", date ? date : "");
+
+#ifdef SERVER_SUPPORT
+    if (server_active)
+    {
+       server_register (fname, vn, ts, options, tag, date, ts_conflict);
+    }
+#endif
+
+    entnode = Entnode_Create (ENT_FILE, fname, vn, ts, options, tag, date,
+                             ts_conflict);
+    node = AddEntryNode (list, entnode);
+
+    if (!noexec)
+    {
+       entfilename = CVSADM_ENTLOG;
+       entfile = CVS_FOPEN (entfilename, "a");
+
+       if (entfile == NULL)
+       {
+           /* Warning, not error, as in write_entries.  */
+           /* FIXME-update-dir: should be including update_dir in message.  */
+           error (0, errno, "cannot open %s", entfilename);
+           return;
+       }
+
+       if (fprintf (entfile, "A ") < 0)
+           error (1, errno, "cannot write %s", entfilename);
+
+       write_ent_proc (node, NULL);
+
+        if (fclose (entfile) == EOF)
+           error (1, errno, "error closing %s", entfilename);
+    }
+}
+
+/*
+ * Node delete procedure for list-private sticky dir tag/date info
+ */
+static void
+freesdt (Node *p)
+{
+    struct stickydirtag *sdtp = p->data;
+
+    if (sdtp->tag)
+       free (sdtp->tag);
+    if (sdtp->date)
+       free (sdtp->date);
+    free ((char *) sdtp);
+}
+
+/* Return the next real Entries line.  On end of file, returns NULL.
+   On error, prints an error message and returns NULL.  */
+
+static Entnode *
+fgetentent (FILE *fpin, char *cmd, int *sawdir)
+{
+    Entnode *ent;
+    char *line;
+    size_t line_chars_allocated;
+    register char *cp;
+    enum ent_type type;
+    char *l, *user, *vn, *ts, *options;
+    char *tag_or_date, *tag, *date, *ts_conflict;
+    int line_length;
+
+    line = NULL;
+    line_chars_allocated = 0;
+
+    ent = NULL;
+    while ((line_length = getline (&line, &line_chars_allocated, fpin)) > 0)
+    {
+       l = line;
+
+       /* If CMD is not NULL, we are reading an Entries.Log file.
+          Each line in the Entries.Log file starts with a single
+          character command followed by a space.  For backward
+          compatibility, the absence of a space indicates an add
+          command.  */
+       if (cmd != NULL)
+       {
+           if (l[1] != ' ')
+               *cmd = 'A';
+           else
+           {
+               *cmd = l[0];
+               l += 2;
+           }
+       }
+
+       type = ENT_FILE;
+
+       if (l[0] == 'D')
+       {
+           type = ENT_SUBDIR;
+           *sawdir = 1;
+           ++l;
+           /* An empty D line is permitted; it is a signal that this
+              Entries file lists all known subdirectories.  */
+       }
+
+       if (l[0] != '/')
+           continue;
+
+       user = l + 1;
+       if ((cp = strchr (user, '/')) == NULL)
+           continue;
+       *cp++ = '\0';
+       vn = cp;
+       if ((cp = strchr (vn, '/')) == NULL)
+           continue;
+       *cp++ = '\0';
+       ts = cp;
+       if ((cp = strchr (ts, '/')) == NULL)
+           continue;
+       *cp++ = '\0';
+       options = cp;
+       if ((cp = strchr (options, '/')) == NULL)
+           continue;
+       *cp++ = '\0';
+       tag_or_date = cp;
+       if ((cp = strchr (tag_or_date, '\n')) == NULL)
+           continue;
+       *cp = '\0';
+       tag = NULL;
+       date = NULL;
+       if (*tag_or_date == 'T')
+           tag = tag_or_date + 1;
+       else if (*tag_or_date == 'D')
+           date = tag_or_date + 1;
+
+       if ((ts_conflict = strchr (ts, '+')))
+           *ts_conflict++ = '\0';
+           
+       /*
+        * XXX - Convert timestamp from old format to new format.
+        *
+        * If the timestamp doesn't match the file's current
+        * mtime, we'd have to generate a string that doesn't
+        * match anyways, so cheat and base it on the existing
+        * string; it doesn't have to match the same mod time.
+        *
+        * For an unmodified file, write the correct timestamp.
+        */
+       {
+           struct stat sb;
+           if (strlen (ts) > 30 && stat (user, &sb) == 0)
+           {
+               char *c = ctime (&sb.st_mtime);
+               /* Fix non-standard format.  */
+               if (c[8] == '0') c[8] = ' ';
+
+               if (!strncmp (ts + 25, c, 24))
+                   ts = time_stamp (user);
+               else
+               {
+                   ts += 24;
+                   ts[0] = '*';
+               }
+           }
+       }
+
+       ent = Entnode_Create (type, user, vn, ts, options, tag, date,
+                             ts_conflict);
+       break;
+    }
+
+    if (line_length < 0 && !feof (fpin))
+       error (0, errno, "cannot read entries file");
+
+    free (line);
+    return ent;
+}
+
+static int
+fputentent (FILE *fp, Entnode *p)
+{
+    switch (p->type)
+    {
+    case ENT_FILE:
+        break;
+    case ENT_SUBDIR:
+        if (fprintf (fp, "D") < 0)
+           return 1;
+       break;
+    }
+
+    if (fprintf (fp, "/%s/%s/%s", p->user, p->version, p->timestamp) < 0)
+       return 1;
+    if (p->conflict)
+    {
+       if (fprintf (fp, "+%s", p->conflict) < 0)
+           return 1;
+    }
+    if (fprintf (fp, "/%s/", p->options) < 0)
+       return 1;
+
+    if (p->tag)
+    {
+       if (fprintf (fp, "T%s\n", p->tag) < 0)
+           return 1;
+    }
+    else if (p->date)
+    {
+       if (fprintf (fp, "D%s\n", p->date) < 0)
+           return 1;
+    }
+    else 
+    {
+       if (fprintf (fp, "\n") < 0)
+           return 1;
+    }
+
+    return 0;
+}
+
+
+/* Read the entries file into a list, hashing on the file name.
+
+   UPDATE_DIR is the name of the current directory, for use in error
+   messages, or NULL if not known (that is, noone has gotten around
+   to updating the caller to pass in the information).  */
+List *
+Entries_Open (int aflag, char *update_dir)
+{
+    List *entries;
+    struct stickydirtag *sdtp = NULL;
+    Entnode *ent;
+    char *dirtag, *dirdate;
+    int dirnonbranch;
+    int do_rewrite = 0;
+    FILE *fpin;
+    int sawdir;
+
+    /* get a fresh list... */
+    entries = getlist ();
+
+    /*
+     * Parse the CVS/Tag file, to get any default tag/date settings. Use
+     * list-private storage to tuck them away for Version_TS().
+     */
+    ParseTag (&dirtag, &dirdate, &dirnonbranch);
+    if (aflag || dirtag || dirdate)
+    {
+       sdtp = xmalloc (sizeof (*sdtp));
+       memset (sdtp, 0, sizeof (*sdtp));
+       sdtp->aflag = aflag;
+       sdtp->tag = xstrdup (dirtag);
+       sdtp->date = xstrdup (dirdate);
+       sdtp->nonbranch = dirnonbranch;
+
+       /* feed it into the list-private area */
+       entries->list->data = sdtp;
+       entries->list->delproc = freesdt;
+    }
+
+    sawdir = 0;
+
+    fpin = CVS_FOPEN (CVSADM_ENT, "r");
+    if (fpin == NULL)
+    {
+       if (update_dir != NULL)
+           error (0, 0, "in directory %s:", update_dir);
+       error (0, errno, "cannot open %s for reading", CVSADM_ENT);
+    }
+    else
+    {
+       while ((ent = fgetentent (fpin, NULL, &sawdir)) != NULL) 
+       {
+           (void) AddEntryNode (entries, ent);
+       }
+
+       if (fclose (fpin) < 0)
+           /* FIXME-update-dir: should include update_dir in message.  */
+           error (0, errno, "cannot close %s", CVSADM_ENT);
+    }
+
+    fpin = CVS_FOPEN (CVSADM_ENTLOG, "r");
+    if (fpin != NULL) 
+    {
+       char cmd;
+       Node *node;
+
+       while ((ent = fgetentent (fpin, &cmd, &sawdir)) != NULL)
+       {
+           switch (cmd)
+           {
+           case 'A':
+               (void) AddEntryNode (entries, ent);
+               break;
+           case 'R':
+               node = findnode_fn (entries, ent->user);
+               if (node != NULL)
+                   delnode (node);
+               Entnode_Destroy (ent);
+               break;
+           default:
+               /* Ignore unrecognized commands.  */
+               Entnode_Destroy (ent);
+               break;
+           }
+       }
+       do_rewrite = 1;
+       if (fclose (fpin) < 0)
+           /* FIXME-update-dir: should include update_dir in message.  */
+           error (0, errno, "cannot close %s", CVSADM_ENTLOG);
+    }
+
+    /* Update the list private data to indicate whether subdirectory
+       information is known.  Nonexistent list private data is taken
+       to mean that it is known.  */
+    if (sdtp != NULL)
+       sdtp->subdirs = sawdir;
+    else if (! sawdir)
+    {
+       sdtp = xmalloc (sizeof (*sdtp));
+       memset (sdtp, 0, sizeof (*sdtp));
+       sdtp->subdirs = 0;
+       entries->list->data = sdtp;
+       entries->list->delproc = freesdt;
+    }
+
+    if (do_rewrite && !noexec)
+       write_entries (entries);
+
+    /* clean up and return */
+    if (dirtag)
+       free (dirtag);
+    if (dirdate)
+       free (dirdate);
+    return entries;
+}
+
+void
+Entries_Close (List *list)
+{
+    if (list)
+    {
+       if (!noexec) 
+        {
+            if (isfile (CVSADM_ENTLOG))
+               write_entries (list);
+       }
+       dellist (&list);
+    }
+}
+
+
+/*
+ * Free up the memory associated with the data section of an ENTRIES type
+ * node
+ */
+static void
+Entries_delproc (Node *node)
+{
+    Entnode *p = node->data;
+
+    Entnode_Destroy (p);
+}
+
+/*
+ * Get an Entries file list node, initialize it, and add it to the specified
+ * list
+ */
+static Node *
+AddEntryNode (List *list, Entnode *entdata)
+{
+    Node *p;
+
+    /* was it already there? */
+    if ((p  = findnode_fn (list, entdata->user)) != NULL)
+    {
+       /* take it out */
+       delnode (p);
+    }
+
+    /* get a node and fill in the regular stuff */
+    p = getnode ();
+    p->type = ENTRIES;
+    p->delproc = Entries_delproc;
+
+    /* this one gets a key of the name for hashing */
+    /* FIXME This results in duplicated data --- the hash package shouldn't
+       assume that the key is dynamically allocated.  The user's free proc
+       should be responsible for freeing the key. */
+    p->key = xstrdup (entdata->user);
+    p->data = entdata;
+
+    /* put the node into the list */
+    addnode (list, p);
+    return p;
+}
+
+
+
+/*
+ * Write out the CVS/Template file.
+ */
+void
+WriteTemplate (const char *update_dir, int xdotemplate, const char *repository)
+{
+#ifdef SERVER_SUPPORT
+    TRACE (TRACE_FUNCTION, "Write_Template (%s, %s)", update_dir, repository);
+
+    if (noexec)
+       return;
+
+    if (server_active && xdotemplate)
+    {
+       /* Clear the CVS/Template if supported to allow for the case
+        * where the rcsinfo file no longer has an entry for this
+        * directory.
+        */
+       server_clear_template (update_dir, repository);
+       server_template (update_dir, repository);
+    }
+#endif
+
+    return;
+}
+
+
+
+/*
+ * Write out/Clear the CVS/Tag file.
+ */
+void
+WriteTag (const char *dir, const char *tag, const char *date, int nonbranch,
+          const char *update_dir, const char *repository)
+{
+    FILE *fout;
+    char *tmp;
+
+    if (noexec)
+       return;
+
+    if (dir != NULL)
+       tmp = Xasprintf ("%s/%s", dir, CVSADM_TAG);
+    else
+       tmp = xstrdup (CVSADM_TAG);
+
+
+    if (tag || date)
+    {
+       fout = xfopen (tmp, "w+");
+       if (tag)
+       {
+           if (nonbranch)
+           {
+               if (fprintf (fout, "N%s\n", tag) < 0)
+                   error (1, errno, "write to %s failed", tmp);
+           }
+           else
+           {
+               if (fprintf (fout, "T%s\n", tag) < 0)
+                   error (1, errno, "write to %s failed", tmp);
+           }
+       }
+       else
+       {
+           if (fprintf (fout, "D%s\n", date) < 0)
+               error (1, errno, "write to %s failed", tmp);
+       }
+       if (fclose (fout) == EOF)
+           error (1, errno, "cannot close %s", tmp);
+    }
+    else
+       if (unlink_file (tmp) < 0 && ! existence_error (errno))
+           error (1, errno, "cannot remove %s", tmp);
+    free (tmp);
+#ifdef SERVER_SUPPORT
+    if (server_active)
+       server_set_sticky (update_dir, repository, tag, date, nonbranch);
+#endif
+}
+
+/* Parse the CVS/Tag file for the current directory.
+
+   If it contains a date, sets *DATEP to the date in a newly malloc'd
+   string, *TAGP to NULL, and *NONBRANCHP to an unspecified value.
+
+   If it contains a branch tag, sets *TAGP to the tag in a newly
+   malloc'd string, *NONBRANCHP to 0, and *DATEP to NULL.
+
+   If it contains a nonbranch tag, sets *TAGP to the tag in a newly
+   malloc'd string, *NONBRANCHP to 1, and *DATEP to NULL.
+
+   If it does not exist, or contains something unrecognized by this
+   version of CVS, set *DATEP and *TAGP to NULL and *NONBRANCHP to
+   an unspecified value.
+
+   If there is an error, print an error message, set *DATEP and *TAGP
+   to NULL, and return.  */
+void
+ParseTag (char **tagp, char **datep, int *nonbranchp)
+{
+    FILE *fp;
+
+    if (tagp)
+       *tagp = NULL;
+    if (datep)
+       *datep = NULL;
+    /* Always store a value here, even in the 'D' case where the value
+       is unspecified.  Shuts up tools which check for references to
+       uninitialized memory.  */
+    if (nonbranchp != NULL)
+       *nonbranchp = 0;
+    fp = CVS_FOPEN (CVSADM_TAG, "r");
+    if (fp)
+    {
+       char *line;
+       int line_length;
+       size_t line_chars_allocated;
+
+       line = NULL;
+       line_chars_allocated = 0;
+
+       if ((line_length = getline (&line, &line_chars_allocated, fp)) > 0)
+       {
+           /* Remove any trailing newline.  */
+           if (line[line_length - 1] == '\n')
+               line[--line_length] = '\0';
+           switch (*line)
+           {
+               case 'T':
+                   if (tagp != NULL)
+                       *tagp = xstrdup (line + 1);
+                   break;
+               case 'D':
+                   if (datep != NULL)
+                       *datep = xstrdup (line + 1);
+                   break;
+               case 'N':
+                   if (tagp != NULL)
+                       *tagp = xstrdup (line + 1);
+                   if (nonbranchp != NULL)
+                       *nonbranchp = 1;
+                   break;
+               default:
+                   /* Silently ignore it; it may have been
+                      written by a future version of CVS which extends the
+                      syntax.  */
+                   break;
+           }
+       }
+
+       if (line_length < 0)
+       {
+           /* FIXME-update-dir: should include update_dir in messages.  */
+           if (feof (fp))
+               error (0, 0, "cannot read %s: end of file", CVSADM_TAG);
+           else
+               error (0, errno, "cannot read %s", CVSADM_TAG);
+       }
+
+       if (fclose (fp) < 0)
+           /* FIXME-update-dir: should include update_dir in message.  */
+           error (0, errno, "cannot close %s", CVSADM_TAG);
+
+       free (line);
+    }
+    else if (!existence_error (errno))
+       /* FIXME-update-dir: should include update_dir in message.  */
+       error (0, errno, "cannot open %s", CVSADM_TAG);
+}
+
+/*
+ * This is called if all subdirectory information is known, but there
+ * aren't any subdirectories.  It records that fact in the list
+ * private data.
+ */
+
+void
+Subdirs_Known (List *entries)
+{
+    struct stickydirtag *sdtp = entries->list->data;
+
+    /* If there is no list private data, that means that the
+       subdirectory information is known.  */
+    if (sdtp != NULL && ! sdtp->subdirs)
+    {
+       FILE *fp;
+
+       sdtp->subdirs = 1;
+       if (!noexec)
+       {
+           /* Create Entries.Log so that Entries_Close will do something.  */
+           entfilename = CVSADM_ENTLOG;
+           fp = CVS_FOPEN (entfilename, "a");
+           if (fp == NULL)
+           {
+               int save_errno = errno;
+
+               /* As in subdir_record, just silently skip the whole thing
+                  if there is no CVSADM directory.  */
+               if (! isdir (CVSADM))
+                   return;
+               error (1, save_errno, "cannot open %s", entfilename);
+           }
+           else
+           {
+               if (fclose (fp) == EOF)
+                   error (1, errno, "cannot close %s", entfilename);
+           }
+       }
+    }
+}
+
+/* Record subdirectory information.  */
+
+static Entnode *
+subdir_record (int cmd, const char *parent, const char *dir)
+{
+    Entnode *entnode;
+
+    /* None of the information associated with a directory is
+       currently meaningful.  */
+    entnode = Entnode_Create (ENT_SUBDIR, dir, "", "", "",
+                             NULL, NULL, NULL);
+
+    if (!noexec)
+    {
+       if (parent == NULL)
+           entfilename = CVSADM_ENTLOG;
+       else
+           entfilename = Xasprintf ("%s/%s", parent, CVSADM_ENTLOG);
+
+       entfile = CVS_FOPEN (entfilename, "a");
+       if (entfile == NULL)
+       {
+           int save_errno = errno;
+
+           /* It is not an error if there is no CVS administration
+               directory.  Permitting this case simplifies some
+               calling code.  */
+
+           if (parent == NULL)
+           {
+               if (! isdir (CVSADM))
+                   return entnode;
+           }
+           else
+           {
+               free (entfilename);
+               entfilename = Xasprintf ("%s/%s", parent, CVSADM);
+               if (! isdir (entfilename))
+               {
+                   free (entfilename);
+                   entfilename = NULL;
+                   return entnode;
+               }
+           }
+
+           error (1, save_errno, "cannot open %s", entfilename);
+       }
+
+       if (fprintf (entfile, "%c ", cmd) < 0)
+           error (1, errno, "cannot write %s", entfilename);
+
+       if (fputentent (entfile, entnode) != 0)
+           error (1, errno, "cannot write %s", entfilename);
+
+       if (fclose (entfile) == EOF)
+           error (1, errno, "error closing %s", entfilename);
+
+       if (parent != NULL)
+       {
+           free (entfilename);
+           entfilename = NULL;
+       }
+    }
+
+    return entnode;
+}
+
+/*
+ * Record the addition of a new subdirectory DIR in PARENT.  PARENT
+ * may be NULL, which means the current directory.  ENTRIES is the
+ * current entries list; it may be NULL, which means that it need not
+ * be updated.
+ */
+
+void
+Subdir_Register (List *entries, const char *parent, const char *dir)
+{
+    Entnode *entnode;
+
+    /* Ignore attempts to register ".".  These can happen in the
+       server code.  */
+    if (dir[0] == '.' && dir[1] == '\0')
+       return;
+
+    entnode = subdir_record ('A', parent, dir);
+
+    if (entries != NULL && (parent == NULL || strcmp (parent, ".") == 0))
+       (void) AddEntryNode (entries, entnode);
+    else
+       Entnode_Destroy (entnode);
+}
+
+
+
+/*
+ * Record the removal of a subdirectory.  The arguments are the same
+ * as for Subdir_Register.
+ */
+
+void
+Subdir_Deregister (List *entries, const char *parent, const char *dir)
+{
+    Entnode *entnode;
+
+    entnode = subdir_record ('R', parent, dir);
+    Entnode_Destroy (entnode);
+
+    if (entries != NULL && (parent == NULL || strcmp (parent, ".") == 0))
+    {
+       Node *p;
+
+       p = findnode_fn (entries, dir);
+       if (p != NULL)
+           delnode (p);
+    }
+}
Index: ccvs/src/entries.h
diff -u /dev/null ccvs/src/entries.h:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/entries.h  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef ENTRIES_H
+#define ENTRIES_H
+
+#include "hash.h"
+
+/* The type of an entnode.  */
+enum ent_type
+{
+    ENT_FILE, ENT_SUBDIR
+};
+
+/* structure of a entry record */
+struct entnode
+{
+    enum ent_type type;
+    char *user;
+    char *version;
+
+    /* Timestamp, or "" if none (never NULL).  */
+    char *timestamp;
+
+    /* Keyword expansion options, or "" if none (never NULL).  */
+    char *options;
+
+    char *tag;
+    char *date;
+    char *conflict;
+};
+typedef struct entnode Entnode;
+
+void Register (List *list, const char *fname, const char *vn,
+              const char *ts, const char *options, const char *tag,
+              const char *date, const char *ts_conflict);
+#endif /* !defined ENTRIES_H */
Index: ccvs/src/filesubr.c
diff -u /dev/null ccvs/src/filesubr.c:1.105.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/filesubr.c Wed Dec 21 13:25:10 2005
@@ -0,0 +1,922 @@
+/* filesubr.c --- subroutines for dealing with files
+   Jim Blandy <address@hidden>
+
+   This file is part of GNU CVS.
+
+   GNU CVS 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.
+
+   This program 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.  */
+
+/* These functions were moved out of subr.c because they need different
+   definitions under operating systems (like, say, Windows NT) with different
+   file system semantics.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "filesubr.h"
+
+/* GNULIB */
+#include "lstat.h"
+#include "save-cwd.h"
+#include "xsize.h"
+
+/* CVS */
+#include "cvs.h"
+
+static int deep_remove_dir (const char *path);
+
+
+
+/*
+ * Copies FROM to TO.  Ignores NOEXEC.
+ */
+void
+force_copy_file (const char *from, const char *to)
+{
+    struct stat sb;
+    struct utimbuf t;
+    int fdin, fdout;
+    ssize_t rsize;
+
+    /* If the file to be copied is a link or a device, then just create
+       the new link or device appropriately. */
+    if ((rsize = islink (from)) > 0)
+    {
+       char *source = Xreadlink (from, rsize);
+       symlink (source, to);
+       free (source);
+       return;
+    }
+
+    if (isdevice (from))
+    {
+#if defined(HAVE_MKNOD) && defined(HAVE_STRUCT_STAT_ST_RDEV)
+       if (stat (from, &sb) < 0)
+           error (1, errno, "cannot stat %s", from);
+       mknod (to, sb.st_mode, sb.st_rdev);
+#else
+       error (1, 0, "cannot copy device files on this system (%s)", from);
+#endif
+    }
+    else
+    {
+       /* Not a link or a device... probably a regular file. */
+       if ((fdin = open (from, O_RDONLY)) < 0)
+           error (1, errno, "cannot open %s for copying", from);
+       if (fstat (fdin, &sb) < 0)
+           error (1, errno, "cannot fstat %s", from);
+       if ((fdout = creat (to, (int) sb.st_mode & 07777)) < 0)
+           error (1, errno, "cannot create %s for copying", to);
+       if (sb.st_size > 0)
+       {
+           char buf[BUFSIZ];
+           int n;
+           
+           for (;;) 
+           {
+               n = read (fdin, buf, sizeof(buf));
+               if (n == -1)
+               {
+#ifdef EINTR
+                   if (errno == EINTR)
+                       continue;
+#endif
+                   error (1, errno, "cannot read file %s for copying", from);
+               }
+               else if (n == 0) 
+                   break;
+               
+               if (write(fdout, buf, n) != n) {
+                   error (1, errno, "cannot write file %s for copying", to);
+               }
+           }
+       }
+
+       if (close (fdin) < 0) 
+           error (0, errno, "cannot close %s", from);
+       if (close (fdout) < 0)
+           error (1, errno, "cannot close %s", to);
+    }
+
+    /* preserve last access & modification times */
+    memset ((char *) &t, 0, sizeof (t));
+    t.actime = sb.st_atime;
+    t.modtime = sb.st_mtime;
+    (void) utime (to, &t);
+}
+
+
+
+/*
+ * Copies FROM to TO.  Honors NOEXEC.
+ */
+void
+copy_file (const char *from, const char *to)
+{
+    TRACE (TRACE_FUNCTION, "copy (%s, %s)", from, to);
+    if (noexec) return;
+    force_copy_file (from, to);
+}
+
+
+
+/* FIXME-krp: these functions would benefit from caching the char * &
+   stat buf.  */
+
+/*
+ * Returns true if the argument file is a directory, or is a symbolic
+ * link which points to a directory.
+ */
+bool
+isdir (const char *file)
+{
+    struct stat sb;
+
+    if (stat (file, &sb) < 0)
+       return false;
+    return S_ISDIR (sb.st_mode);
+}
+
+
+
+/*
+ * Returns 0 if the argument file is not a symbolic link.
+ * Returns size of the link if it is a symbolic link.
+ *
+ * FIXME: Is there a good reason that the off_t specified by POSIX for st_size
+ *        (http://www.opengroup.org/susv3xbd/sys/stat.h.html) is converted to
+ *        ssize_t here?  rcs.h uses off_t, so it's not because off_t isn't
+ *        portable.
+ */
+ssize_t
+islink (const char *file)
+{
+    ssize_t retsize = 0;
+#ifdef S_ISLNK
+    struct stat sb;
+
+    if ((lstat (file, &sb) >= 0) && S_ISLNK (sb.st_mode))
+       retsize = sb.st_size;
+#endif
+    return retsize;
+}
+
+
+
+/*
+ * Returns true if the argument file is a block or
+ * character special device.
+ */
+bool
+isdevice (const char *file)
+{
+    struct stat sb;
+
+    if (lstat (file, &sb) < 0)
+       return false;
+#ifdef S_ISBLK
+    if (S_ISBLK (sb.st_mode))
+       return true;
+#endif
+#ifdef S_ISCHR
+    if (S_ISCHR (sb.st_mode))
+       return true;
+#endif
+    return false;
+}
+
+
+
+/*
+ * Returns true if the argument file exists.
+ */
+bool
+isfile (const char *file)
+{
+    return isaccessible (file, F_OK);
+}
+
+
+
+/*
+ * Returns non-zero if the argument file is readable.
+ */
+bool
+isreadable (const char *file)
+{
+    return isaccessible (file, R_OK);
+}
+
+
+
+/*
+ * Returns non-zero if the argument file is writable.
+ */
+bool
+iswritable (const char *file)
+{
+    return isaccessible (file, W_OK);
+}
+
+
+
+/*
+ * Returns true if the argument file is accessable according to
+ * mode.  If compiled with SETXID_SUPPORT also works if cvs has setxid
+ * bits set.
+ */
+bool
+isaccessible (const char *file, const int mode)
+{
+#ifdef SETXID_SUPPORT
+    struct stat sb;
+    int umask = 0;
+    int gmask = 0;
+    int omask = 0;
+    int uid, mask;
+    
+    if (stat (file, &sb)== -1)
+       return false;
+    if (mode == F_OK)
+       return true;
+
+    uid = geteuid();
+    if (uid == 0)              /* superuser */
+    {
+       if (!(mode & X_OK) || (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)))
+           return true;
+
+       errno = EACCES;
+       return false;
+    }
+       
+    if (mode & R_OK)
+    {
+       umask |= S_IRUSR;
+       gmask |= S_IRGRP;
+       omask |= S_IROTH;
+    }
+    if (mode & W_OK)
+    {
+       umask |= S_IWUSR;
+       gmask |= S_IWGRP;
+       omask |= S_IWOTH;
+    }
+    if (mode & X_OK)
+    {
+       umask |= S_IXUSR;
+       gmask |= S_IXGRP;
+       omask |= S_IXOTH;
+    }
+
+    mask = sb.st_uid == uid ? umask : sb.st_gid == getegid() ? gmask : omask;
+    if ((sb.st_mode & mask) == mask)
+       return true;
+    errno = EACCES;
+    return false;
+#else /* !SETXID_SUPPORT */
+    return access (file, mode) == 0;
+#endif /* SETXID_SUPPORT */
+}
+
+
+
+/*
+ * Make a directory and die if it fails
+ */
+void
+make_directory (const char *name)
+{
+    struct stat sb;
+
+    if (stat (name, &sb) == 0 && (!S_ISDIR (sb.st_mode)))
+           error (0, 0, "%s already exists but is not a directory", name);
+    if (!noexec && mkdir (name, 0777) < 0)
+       error (1, errno, "cannot make directory %s", name);
+}
+
+/*
+ * Make a path to the argument directory, printing a message if something
+ * goes wrong.
+ */
+void
+make_directories (const char *name)
+{
+    char *cp;
+
+    if (noexec)
+       return;
+
+    if (mkdir (name, 0777) == 0 || errno == EEXIST)
+       return;
+    if (! existence_error (errno))
+    {
+       error (0, errno, "cannot make path to %s", name);
+       return;
+    }
+    if ((cp = strrchr (name, '/')) == NULL)
+       return;
+    *cp = '\0';
+    make_directories (name);
+    *cp++ = '/';
+    if (*cp == '\0')
+       return;
+    (void) mkdir (name, 0777);
+}
+
+/* Create directory NAME if it does not already exist; fatal error for
+   other errors.  Returns 0 if directory was created; 1 if it already
+   existed.  */
+int
+mkdir_if_needed (const char *name)
+{
+    if (mkdir (name, 0777) < 0)
+    {
+       int save_errno = errno;
+       if (save_errno != EEXIST && !isdir (name))
+           error (1, save_errno, "cannot make directory %s", name);
+       return 1;
+    }
+    return 0;
+}
+
+
+
+/*
+ * Change the mode of a file, either adding write permissions, or removing
+ * all write permissions.  Either change honors the current umask setting.
+ *
+ * Don't do anything if PreservePermissions is set to `yes'.  This may
+ * have unexpected consequences for some uses of xchmod.
+ */
+static void
+ixchmod (const char *fname, bool writable, bool noexec)
+{
+    struct stat sb;
+    mode_t mode, oumask;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    if (config->preserve_perms)
+       return;
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+
+    if (stat (fname, &sb) < 0)
+    {
+       if (!noexec)
+           error (0, errno, "cannot stat %s", fname);
+       return;
+    }
+    oumask = umask (0);
+    (void) umask (oumask);
+    if (writable)
+       mode = sb.st_mode | (~oumask
+                            & (((sb.st_mode & S_IRUSR) ? S_IWUSR : 0)
+                               | ((sb.st_mode & S_IRGRP) ? S_IWGRP : 0)
+                               | ((sb.st_mode & S_IROTH) ? S_IWOTH : 0)));
+    else
+       mode = sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH) & ~oumask;
+
+    TRACE (TRACE_FUNCTION, "chmod(%s,%o)", fname, (unsigned int) mode);
+
+    if (noexec)
+       return;
+
+    if (chmod (fname, mode) < 0)
+       error (0, errno, "cannot change mode of file %s", fname);
+}
+
+
+
+/* See description for ixchmod.  Ignores NOEXEC.  */
+void
+force_xchmod (const char *fname, bool writable)
+{
+    ixchmod (fname, writable, false);
+}
+
+
+
+/* See description for ixchmod.  Honors NOEXEC.  */
+void
+xchmod (const char *fname, bool writable)
+{
+    ixchmod (fname, writable, noexec);
+}
+
+
+
+/*
+ * Rename a file and die if it fails
+ */
+void
+rename_file (const char *from, const char *to)
+{
+    TRACE (TRACE_FUNCTION, "rename(%s,%s)", from, to);
+
+    if (noexec)
+       return;
+
+    if (rename (from, to) < 0)
+       error (1, errno, "cannot rename file %s to %s", from, to);
+}
+
+/*
+ * unlink a file, if possible.  Use CVS_UNLINK if you want to ignore the
+ * noexec flag.
+ */
+int
+unlink_file (const char *f)
+{
+    TRACE (TRACE_FUNCTION, "unlink_file(%s)", f);
+
+    if (noexec)
+       return (0);
+
+    return (CVS_UNLINK (f));
+}
+
+
+
+/*
+ * Unlink a file or dir, if possible.  If it is a directory do a deep
+ * removal of all of the files in the directory.  Return -1 on error
+ * (in which case errno is set).
+ */
+int
+unlink_file_dir (const char *f)
+{
+    struct stat sb;
+
+    /* This is called by the server parent process in contexts where
+       it is not OK to send output (e.g. after we sent "ok" to the
+       client).  */
+    if (!server_active)
+       TRACE (TRACE_FUNCTION, "unlink_file_dir(%s)", f);
+
+    if (noexec)
+       return 0;
+
+    /* For at least some unices, if root tries to unlink() a directory,
+       instead of doing something rational like returning EISDIR,
+       the system will gleefully go ahead and corrupt the filesystem.
+       So we first call stat() to see if it is OK to call unlink().  This
+       doesn't quite work--if someone creates a directory between the
+       call to stat() and the call to unlink(), we'll still corrupt
+       the filesystem.  Where is the Unix Haters Handbook when you need
+       it?  */
+    if (stat (f, &sb) < 0)
+    {
+       if (existence_error (errno))
+       {
+           /* The file or directory doesn't exist anyhow.  */
+           return -1;
+       }
+    }
+    else if (S_ISDIR (sb.st_mode))
+       return deep_remove_dir (f);
+
+    return CVS_UNLINK (f);
+}
+
+
+
+/* Remove a directory and everything it contains.  Returns 0 for
+ * success, -1 for failure (in which case errno is set).
+ */
+
+static int
+deep_remove_dir (const char *path)
+{
+    DIR                  *dirp;
+    struct dirent *dp;
+
+    if (rmdir (path) != 0)
+    {
+       if (errno == ENOTEMPTY
+           || errno == EEXIST
+           /* Ugly workaround for ugly AIX 4.1 (and 3.2) header bug
+              (it defines ENOTEMPTY and EEXIST to 17 but actually
+              returns 87).  */
+           || (ENOTEMPTY == 17 && EEXIST == 17 && errno == 87))
+       {
+           if ((dirp = CVS_OPENDIR (path)) == NULL)
+               /* If unable to open the directory return
+                * an error
+                */
+               return -1;
+
+           errno = 0;
+           while ((dp = CVS_READDIR (dirp)) != NULL)
+           {
+               char *buf;
+
+               if (strcmp (dp->d_name, ".") == 0 ||
+                           strcmp (dp->d_name, "..") == 0)
+                   continue;
+
+               buf = Xasprintf ("%s/%s", path, dp->d_name);
+
+               /* See comment in unlink_file_dir explanation of why we use
+                  isdir instead of just calling unlink and checking the
+                  status.  */
+               if (isdir (buf)) 
+               {
+                   if (deep_remove_dir (buf))
+                   {
+                       CVS_CLOSEDIR (dirp);
+                       free (buf);
+                       return -1;
+                   }
+               }
+               else
+               {
+                   if (CVS_UNLINK (buf) != 0)
+                   {
+                       CVS_CLOSEDIR (dirp);
+                       free (buf);
+                       return -1;
+                   }
+               }
+               free (buf);
+
+               errno = 0;
+           }
+           if (errno != 0)
+           {
+               int save_errno = errno;
+               CVS_CLOSEDIR (dirp);
+               errno = save_errno;
+               return -1;
+           }
+           CVS_CLOSEDIR (dirp);
+           return rmdir (path);
+       }
+       else
+           return -1;
+    }
+
+    /* Was able to remove the directory return 0 */
+    return 0;
+}
+
+
+
+/* Read NCHARS bytes from descriptor FD into BUF.
+   Return the number of characters successfully read.
+   The number returned is always NCHARS unless end-of-file or error.  */
+static size_t
+block_read (int fd, char *buf, size_t nchars)
+{
+    char *bp = buf;
+    size_t nread;
+
+    do 
+    {
+       nread = read (fd, bp, nchars);
+       if (nread == (size_t)-1)
+       {
+#ifdef EINTR
+           if (errno == EINTR)
+               continue;
+#endif
+           return (size_t)-1;
+       }
+
+       if (nread == 0)
+           break; 
+
+       bp += nread;
+       nchars -= nread;
+    } while (nchars != 0);
+
+    return bp - buf;
+} 
+
+    
+/*
+ * Compare "file1" to "file2". Return non-zero if they don't compare exactly.
+ * If FILE1 and FILE2 are special files, compare their salient characteristics
+ * (i.e. major/minor device numbers, links, etc.
+ */
+int
+xcmp (const char *file1, const char *file2)
+{
+    char *buf1, *buf2;
+    struct stat sb1, sb2;
+    int fd1, fd2;
+    int ret;
+
+    if (lstat (file1, &sb1) < 0)
+       error (1, errno, "cannot lstat %s", file1);
+    if (lstat (file2, &sb2) < 0)
+       error (1, errno, "cannot lstat %s", file2);
+
+    /* If FILE1 and FILE2 are not the same file type, they are unequal. */
+    if ((sb1.st_mode & S_IFMT) != (sb2.st_mode & S_IFMT))
+       return 1;
+
+    /* If FILE1 and FILE2 are symlinks, they are equal if they point to
+       the same thing. */
+#ifdef S_ISLNK
+    if (S_ISLNK (sb1.st_mode) && S_ISLNK (sb2.st_mode))
+    {
+       int result;
+       buf1 = Xreadlink (file1, sb1.st_size);
+       buf2 = Xreadlink (file2, sb2.st_size);
+       result = (strcmp (buf1, buf2) == 0);
+       free (buf1);
+       free (buf2);
+       return result;
+    }
+#endif
+
+    /* If FILE1 and FILE2 are devices, they are equal if their device
+       numbers match. */
+    if (S_ISBLK (sb1.st_mode) || S_ISCHR (sb1.st_mode))
+    {
+#ifdef HAVE_STRUCT_STAT_ST_RDEV
+       if (sb1.st_rdev == sb2.st_rdev)
+           return 0;
+       else
+           return 1;
+#else
+       error (1, 0, "cannot compare device files on this system (%s and %s)",
+              file1, file2);
+#endif
+    }
+
+    if ((fd1 = open (file1, O_RDONLY)) < 0)
+       error (1, errno, "cannot open file %s for comparing", file1);
+    if ((fd2 = open (file2, O_RDONLY)) < 0)
+       error (1, errno, "cannot open file %s for comparing", file2);
+
+    /* A generic file compare routine might compare st_dev & st_ino here 
+       to see if the two files being compared are actually the same file.
+       But that won't happen in CVS, so we won't bother. */
+
+    if (sb1.st_size != sb2.st_size)
+       ret = 1;
+    else if (sb1.st_size == 0)
+       ret = 0;
+    else
+    {
+       /* FIXME: compute the optimal buffer size by computing the least
+          common multiple of the files st_blocks field */
+       size_t buf_size = 8 * 1024;
+       size_t read1;
+       size_t read2;
+
+       buf1 = xmalloc (buf_size);
+       buf2 = xmalloc (buf_size);
+
+       do 
+       {
+           read1 = block_read (fd1, buf1, buf_size);
+           if (read1 == (size_t)-1)
+               error (1, errno, "cannot read file %s for comparing", file1);
+
+           read2 = block_read (fd2, buf2, buf_size);
+           if (read2 == (size_t)-1)
+               error (1, errno, "cannot read file %s for comparing", file2);
+
+           /* assert (read1 == read2); */
+
+           ret = memcmp(buf1, buf2, read1);
+       } while (ret == 0 && read1 == buf_size);
+
+       free (buf1);
+       free (buf2);
+    }
+       
+    (void) close (fd1);
+    (void) close (fd2);
+    return (ret);
+}
+
+/* Generate a unique temporary filename.  Returns a pointer to a newly
+ * malloc'd string containing the name.  Returns successfully or not at
+ * all.
+ *
+ *     THIS FUNCTION IS DEPRECATED!!!  USE cvs_temp_file INSTEAD!!!
+ *
+ * and yes, I know about the way the rcs commands use temp files.  I think
+ * they should be converted too but I don't have time to look into it right
+ * now.
+ */
+char *
+cvs_temp_name (void)
+{
+    char *fn;
+    FILE *fp;
+
+    fp = cvs_temp_file (&fn);
+    if (fp == NULL)
+       error (1, errno, "Failed to create temporary file");
+    if (fclose (fp) == EOF)
+       error (0, errno, "Failed to close temporary file %s", fn);
+    return fn;
+}
+
+/* Generate a unique temporary filename and return an open file stream
+ * to the truncated file by that name
+ *
+ *  INPUTS
+ *     filename        where to place the pointer to the newly allocated file
+ *                     name string
+ *
+ *  OUTPUTS
+ *     filename        dereferenced, will point to the newly allocated file
+ *                     name string.  This value is undefined if the function
+ *                     returns an error.
+ *
+ *  RETURNS
+ *     An open file pointer to a read/write mode empty temporary file with the
+ *     unique file name or NULL on failure.
+ *
+ *  ERRORS
+ *     On error, errno will be set to some value either by CVS_FOPEN or
+ *     whatever system function is called to generate the temporary file name.
+ *     The value of filename is undefined on error.
+ */
+FILE *
+cvs_temp_file (char **filename)
+{
+    char *fn;
+    FILE *fp;
+    int fd;
+
+    /* FIXME - I'd like to be returning NULL here in noexec mode, but I think
+     * some of the rcs & diff functions which rely on a temp file run in
+     * noexec mode too.
+     */
+
+    assert (filename != NULL);
+
+    fn = Xasprintf ("%s/%s", get_cvs_tmp_dir (), "cvsXXXXXX");
+    fd = mkstemp (fn);
+
+    /* a NULL return will be interpreted by callers as an error and
+     * errno should still be set
+     */
+    if (fd == -1)
+       fp = NULL;
+    else if ((fp = CVS_FDOPEN (fd, "w+")) == NULL)
+    {
+       /* Attempt to close and unlink the file since mkstemp returned
+        * sucessfully and we believe it's been created and opened.
+        */
+       int save_errno = errno;
+       if (close (fd))
+           error (0, errno, "Failed to close temporary file %s", fn);
+       if (CVS_UNLINK (fn))
+           error (0, errno, "Failed to unlink temporary file %s", fn);
+       errno = save_errno;
+    }
+
+    if (fp == NULL)
+       free (fn);
+
+    /* mkstemp is defined to open mode 0600 using glibc 2.0.7+.  There used
+     * to be a complicated #ifdef checking the library versions here and then
+     * a chmod 0600 on the temp file for versions of glibc less than 2.1.  This
+     * is rather a special case, leaves a race condition open regardless, and
+     * one could hope that sysadmins have read the relevant security
+     * announcements and upgraded by now to a version with a fix committed in
+     * January of 1999.
+     *
+     * If it is decided at some point that old, buggy versions of glibc should
+     * still be catered to, a umask of 0600 should be set before file creation
+     * instead then reset after file creation since this would avoid the race
+     * condition that the chmod left open to exploitation.
+     */
+
+    *filename = fn;
+    return fp;
+}
+
+
+
+/* Return a pointer into PATH's last component.  */
+const char *
+last_component (const char *path)
+{
+    const char *last = strrchr (path, '/');
+    
+    if (last && (last != path))
+        return last + 1;
+    else
+        return path;
+}
+
+
+
+/* Return the home directory.  Returns a pointer to storage
+   managed by this function or its callees (currently getenv).
+   This function will return the same thing every time it is
+   called.  Returns NULL if there is no home directory.
+
+   Note that for a pserver server, this may return root's home
+   directory.  What typically happens is that upon being started from
+   inetd, before switching users, the code in cvsrc.c calls
+   get_homedir which remembers root's home directory in the static
+   variable.  Then the switch happens and get_homedir might return a
+   directory that we don't even have read or execute permissions for
+   (which is bad, when various parts of CVS try to read there).  One
+   fix would be to make the value returned by get_homedir only good
+   until the next call (which would free the old value).  Another fix
+   would be to just always malloc our answer, and let the caller free
+   it (that is best, because some day we may need to be reentrant).
+
+   The workaround is to put -f in inetd.conf which means that
+   get_homedir won't get called until after the switch in user ID.
+
+   The whole concept of a "home directory" on the server is pretty
+   iffy, although I suppose some people probably are relying on it for
+   .cvsrc and such, in the cases where it works.  */
+char *
+get_homedir (void)
+{
+    static char *home = NULL;
+    char *env;
+    struct passwd *pw;
+
+    if (home != NULL)
+       return home;
+
+    if (!server_active && (env = getenv ("HOME")) != NULL)
+       home = env;
+    else if ((pw = (struct passwd *) getpwuid (getuid ()))
+            && pw->pw_dir)
+       home = xstrdup (pw->pw_dir);
+    else
+       return 0;
+
+    return home;
+}
+
+/* Compose a path to a file in the home directory.  This is necessary because
+ * of different behavior on UNIX and VMS.  See the notes in vms/filesubr.c.
+ *
+ * A more clean solution would be something more along the lines of a
+ * "join a directory to a filename" kind of thing which was not specific to
+ * the homedir.  This should aid portability between UNIX, Mac, Windows, VMS,
+ * and possibly others.  This is already handled by Perl - it might be
+ * interesting to see how much of the code was written in C since Perl is under
+ * the GPL and the Artistic license - we might be able to use it.
+ */
+char *
+strcat_filename_onto_homedir (const char *dir, const char *file)
+{
+    char *path = Xasprintf ("%s/%s", dir, file);
+    return path;
+}
+
+/* See cvs.h for description.  On unix this does nothing, because the
+   shell expands the wildcards.  */
+void
+expand_wild (int argc, char **argv, int *pargc, char ***pargv)
+{
+    int i;
+    if (size_overflow_p (xtimes (argc, sizeof (char *)))) {
+       *pargc = 0;
+       *pargv = NULL;
+       error (0, 0, "expand_wild: too many arguments");
+       return;
+    }
+    *pargc = argc;
+    *pargv = xnmalloc (argc, sizeof (char *));
+    for (i = 0; i < argc; ++i)
+       (*pargv)[i] = xstrdup (argv[i]);
+}
+
+
+
+static char *tmpdir_env;
+
+/* Return path to temp directory.
+ */
+const char *
+get_system_temp_dir (void)
+{
+    if (!tmpdir_env) tmpdir_env = getenv (TMPDIR_ENV);
+    return tmpdir_env;
+}
+
+
+
+void
+push_env_temp_dir (void)
+{
+    const char *tmpdir = get_cvs_tmp_dir ();
+    if (tmpdir_env && strcmp (tmpdir_env, tmpdir))
+       setenv (TMPDIR_ENV, tmpdir, 1);
+}
Index: ccvs/src/filesubr.h
diff -u /dev/null ccvs/src/filesubr.h:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/filesubr.h Wed Dec 21 13:25:10 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FILESUBR_H
+#define FILESUBR_H
+
+#include <stdbool.h>
+#include <stdio.h>      /* Get FILE. */
+#include <sys/types.h>  /* Get ssize_t.  */
+
+
+
+bool isdir (const char *file);
+bool isfile (const char *file);
+ssize_t islink (const char *file);
+bool isdevice (const char *file);
+bool isreadable (const char *file);
+bool iswritable (const char *file);
+bool isaccessible (const char *file, const int mode);
+const char *last_component (const char *path);
+char *get_homedir (void);
+char *strcat_filename_onto_homedir (const char *, const char *);
+char *cvs_temp_name (void);
+FILE *cvs_temp_file (char **filename);
+int unlink_file (const char *f);
+int unlink_file_dir (const char *f);
+void copy_file (const char *from, const char *to);
+void force_copy_file (const char *from, const char *to);
+void xchmod (const char *fname, bool writable);
+void force_xchmod (const char *fname, bool writable);
+
+#endif /* FILESUBR_H */
Index: ccvs/src/gpg.c
diff -u /dev/null ccvs/src/gpg.c:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/gpg.c      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,250 @@
+/* gpgsplit.c - An OpenPGP signature packet splitting tool
+ * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+ *
+ * This file is part of of CVS
+ * (derived from gpgsplit.c distributed with GnuPG).
+ *
+ * GnuPG 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 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+/* Verify interface.  */
+#include "gpg.h"
+
+#include <assert.h>
+#include <string.h>
+
+#include "error.h"
+
+
+
+typedef enum {
+       PKT_NONE           =0,
+       PKT_PUBKEY_ENC     =1, /* public key encrypted packet */
+       PKT_SIGNATURE      =2, /* secret key encrypted packet */
+       PKT_SYMKEY_ENC     =3, /* session key packet (OpenPGP)*/
+       PKT_ONEPASS_SIG    =4, /* one pass sig packet (OpenPGP)*/
+       PKT_SECRET_KEY     =5, /* secret key */
+       PKT_PUBLIC_KEY     =6, /* public key */
+       PKT_SECRET_SUBKEY  =7, /* secret subkey (OpenPGP) */
+       PKT_COMPRESSED     =8, /* compressed data packet */
+       PKT_ENCRYPTED      =9, /* conventional encrypted data */
+       PKT_MARKER        =10, /* marker packet (OpenPGP) */
+       PKT_PLAINTEXT     =11, /* plaintext data with filename and mode */
+       PKT_RING_TRUST    =12, /* keyring trust packet */
+       PKT_USER_ID       =13, /* user id packet */
+       PKT_PUBLIC_SUBKEY =14, /* public subkey (OpenPGP) */
+       PKT_OLD_COMMENT   =16, /* comment packet from an OpenPGP draft */
+       PKT_ATTRIBUTE     =17, /* PGP's attribute packet */
+       PKT_ENCRYPTED_MDC =18, /* integrity protected encrypted data */
+       PKT_MDC           =19, /* manipulation detection code packet */
+       PKT_COMMENT       =61, /* new comment packet (private) */
+        PKT_GPG_CONTROL   =63  /* internal control packet */
+} pkttype_t;
+
+
+
+static const char *
+pkttype_to_string (int pkttype)
+{
+  const char *s;
+
+  switch (pkttype)
+    {
+    case PKT_PUBKEY_ENC    : s = "pk_enc"; break;
+    case PKT_SIGNATURE     : s = "sig"; break;
+    case PKT_SYMKEY_ENC    : s = "sym_enc"; break;
+    case PKT_ONEPASS_SIG   : s = "onepass_sig"; break;
+    case PKT_SECRET_KEY    : s = "secret_key"; break;
+    case PKT_PUBLIC_KEY    : s = "public_key"; break;
+    case PKT_SECRET_SUBKEY : s = "secret_subkey"; break;
+    case PKT_COMPRESSED    : s = "compressed";
+      break;
+    case PKT_ENCRYPTED     : s = "encrypted"; break;
+    case PKT_MARKER       : s = "marker"; break;
+    case PKT_PLAINTEXT     : s = "plaintext"; break;
+    case PKT_RING_TRUST    : s = "ring_trust"; break;
+    case PKT_USER_ID       : s = "user_id"; break;
+    case PKT_PUBLIC_SUBKEY : s = "public_subkey"; break;
+    case PKT_OLD_COMMENT   : s = "old_comment"; break;
+    case PKT_ATTRIBUTE     : s = "attribute"; break;
+    case PKT_ENCRYPTED_MDC : s = "encrypted_mdc"; break;
+    case PKT_MDC          : s = "mdc"; break;
+    case PKT_COMMENT       : s = "comment"; break;
+    case PKT_GPG_CONTROL   : s = "gpg_control"; break;
+    default                : s = "unknown"; break;
+    }
+  return s;
+}
+
+
+
+static int
+read_u8 (struct buffer *bpin, unsigned char *rn)
+{
+  char *tmp;
+  size_t got;
+  int rc;
+
+  if ((rc = buf_read_data (bpin, 1, &tmp, &got)) < 0)
+    return rc;
+  assert (got == 1);
+  *rn = *tmp;
+  return 0;
+}
+
+
+
+static int
+read_u16 (struct buffer *bpin, size_t *rn)
+{
+  unsigned char tmp;
+  int rc;
+
+  if ((rc = read_u8 (bpin, &tmp)))
+    return rc;
+  *rn = tmp << 8;
+  if ((rc = read_u8 (bpin, &tmp)))
+    return rc;
+  *rn |= tmp;
+  return 0;
+}
+
+
+
+/* hdr must point to a buffer large enough to hold all header bytes */
+static int
+write_part (struct buffer *bpin, struct buffer *bpout, unsigned long pktlen,
+            int pkttype, int partial, unsigned char *hdr, size_t hdrlen)
+{
+  char *tmp;
+  int rc;
+
+  while (partial)
+    {
+      size_t partlen;
+      
+      assert (partial == 2);
+      /* old gnupg */
+      assert (!pktlen);
+      if ((rc = read_u16 (bpin, &partlen)))
+       return rc;
+      hdr[hdrlen++] = partlen >> 8;
+      hdr[hdrlen++] = partlen;
+      buf_output (bpout, (char *)hdr, hdrlen);
+      hdrlen = 0;
+      if (!partlen)
+       partial = 0; /* end of packet */
+      while (partlen)
+       {
+         size_t got;
+         if ((rc = buf_read_data (bpin, partlen, &tmp, &got)) < 0)
+           return rc;
+         assert (got);  /* Blocking buffers cannot return 0 bytes.  */
+         buf_output (bpout, tmp, got);
+         partlen -= got;
+       }
+    }
+
+  if (hdrlen)
+    buf_output (bpout, (char *)hdr, hdrlen);
+  
+  /* standard packet or last segment of partial length encoded packet */
+  while (pktlen)
+    {
+      size_t got;
+      if ((rc = buf_read_data (bpin, pktlen, &tmp, &got)) < 0)
+       return rc;
+      assert (got);  /* Blocking buffers cannot return 0 bytes.  */
+      buf_output (bpout, tmp, got);
+      pktlen -= got;
+    }
+
+  return 0;
+}
+
+
+
+/* Read a single signature packet from BPIN, copying it to BPOUT.
+ *
+ * RETURNS
+ *   0         On success.
+ *   -1                If EOF is encountered before a full packet is read.
+ *   -2                On memory allocation errors from buf_read_data().
+ *
+ * ERRORS
+ *   Aside from the error returns above, buf_output() can call its memory
+ *   failure function on memory allocation failures, which could exit.
+ */
+int
+read_signature (struct buffer *bpin, struct buffer *bpout)
+{
+  int ctb, pkttype;
+  unsigned long pktlen = 0;
+  int partial = 0;
+  unsigned char header[20];
+  int header_idx = 0;
+  int lenbytes;
+  int rc;
+  unsigned char c;
+  
+  if ((rc = read_u8 (bpin, &c)))
+    return rc;
+
+  ctb = c;
+
+  header[header_idx++] = ctb;
+  
+  if (!(ctb & 0x80))
+    {
+      error (0, 0, "invalid CTB %02x\n", ctb );
+      return 1;
+    }
+  if ( (ctb & 0x40) )
+    /* new CTB */
+    pkttype =  (ctb & 0x3f);
+  else
+    pkttype = (ctb>>2)&0xf;
+
+  if (pkttype != PKT_SIGNATURE)
+    error (1, 0, "Inavlid OpenPGP packet type (%s)",
+          pkttype_to_string (pkttype));
+
+  lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3));
+  if (!lenbytes )
+    {
+      pktlen = 0; /* don't know the value */
+      partial = 2; /* the old GnuPG partial length encoding */
+    }
+  else
+    {
+      for (; lenbytes; lenbytes--) 
+       {
+         pktlen <<= 8;
+         if ((rc = read_u8 (bpin, &c)))
+           return rc;
+         header[header_idx++] = c;
+         
+         pktlen |= c;
+       }
+    }
+
+  return write_part (bpin, bpout, pktlen, pkttype, partial,
+                     header, header_idx);
+}
Index: ccvs/src/gpg.h
diff -u /dev/null ccvs/src/gpg.h:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/gpg.h      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,29 @@
+/* gpg.h - OpenPGP functions header.
+ * Copyright (C) 2005 Free Software Foundation, Inc.
+ *
+ * This file is part of of CVS.
+ *
+ * GnuPG 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 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ */
+
+#ifndef GPG_H
+#define GPG_H
+
+#include "buffer.h"
+
+int read_signature (struct buffer *bpin, struct buffer *bpout);
+
+#endif /* GPG_H */
Index: ccvs/src/hash.c
diff -u /dev/null ccvs/src/hash.c:1.48.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/hash.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,593 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ *
+ * Polk's hash list manager.  So cool.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "hash.h"
+
+/* CVS */
+#include "cvs.h"
+
+/* Global caches.  The idea is that we maintain a linked list of "free"d
+   nodes or lists, and get new items from there.  It has been suggested
+   to use an obstack instead, but off the top of my head, I'm not sure
+   that would gain enough to be worth worrying about.  */
+static List *listcache = NULL;
+static Node *nodecache = NULL;
+
+static void freenode_mem (Node * p);
+
+/* hash function */
+static int
+hashp (const char *key)
+{
+    unsigned int h = 0;
+    unsigned int g;
+
+    assert(key != NULL);
+
+    while (*key != 0)
+    {
+       unsigned int c = *key++;
+       /* The FOLD_FN_CHAR is so that findnode_fn works.  */
+       h = (h << 4) + FOLD_FN_CHAR (c);
+       if ((g = h & 0xf0000000) != 0)
+           h = (h ^ (g >> 24)) ^ g;
+    }
+
+    return h % HASHSIZE;
+}
+
+
+
+/*
+ * create a new list (or get an old one from the cache)
+ */
+List *
+getlist (void)
+{
+    int i;
+    List *list;
+    Node *node;
+
+    if (listcache != NULL)
+    {
+       /* get a list from the cache and clear it */
+       list = listcache;
+       listcache = listcache->next;
+       list->next = NULL;
+       for (i = 0; i < HASHSIZE; i++)
+           list->hasharray[i] = NULL;
+    }
+    else
+    {
+       /* make a new list from scratch */
+       list = xmalloc (sizeof (List));
+       memset (list, 0, sizeof (List));
+       node = getnode ();
+       list->list = node;
+       node->type = HEADER;
+       node->next = node->prev = node;
+    }
+    return list;
+}
+
+
+
+/*
+ * Free up a list.  For accessing globals which might be accessed via interrupt
+ * handlers, it can be assumed that the first action of this function will be
+ * to set the *listp to NULL.
+ */
+void
+dellist (List **listp)
+{
+    int i;
+    Node *p;
+    List *tmp;
+
+    if (*listp == NULL)
+       return;
+
+    tmp = *listp;
+    *listp = NULL;
+
+    p = tmp->list;
+
+    /* free each node in the list (except header) */
+    while (p->next != p)
+       delnode (p->next);
+
+    /* free any list-private data, without freeing the actual header */
+    freenode_mem (p);
+
+    /* free up the header nodes for hash lists (if any) */
+    for (i = 0; i < HASHSIZE; i++)
+    {
+       if ((p = tmp->hasharray[i]) != NULL)
+       {
+           /* put the nodes into the cache */
+#ifndef NOCACHE
+           p->type = NT_UNKNOWN;
+           p->next = nodecache;
+           nodecache = p;
+#else
+           /* If NOCACHE is defined we turn off the cache.  This can make
+              it easier to tools to determine where items were allocated
+              and freed, for tracking down memory leaks and the like.  */
+           free (p);
+#endif
+       }
+    }
+
+    /* put it on the cache */
+#ifndef NOCACHE
+    tmp->next = listcache;
+    listcache = tmp;
+#else
+    free (tmp->list);
+    free (tmp);
+#endif
+}
+
+
+
+/*
+ * remove a node from it's list (maybe hash list too)
+ */
+void
+removenode (Node *p)
+{
+    if (!p) return;
+
+    /* take it out of the list */
+    p->next->prev = p->prev;
+    p->prev->next = p->next;
+
+    /* if it was hashed, remove it from there too */
+    if (p->hashnext)
+    {
+       p->hashnext->hashprev = p->hashprev;
+       p->hashprev->hashnext = p->hashnext;
+    }
+}
+
+
+
+void
+mergelists (List *dest, List **src)
+{
+    Node *head, *p, *n;
+
+    head = (*src)->list;
+    for (p = head->next; p != head; p = n)
+    {
+       n = p->next;
+       removenode (p);
+       addnode (dest, p);
+    }
+    dellist (src);
+}
+
+
+
+/*
+ * get a new list node
+ */
+Node *
+getnode (void)
+{
+    Node *p;
+
+    if (nodecache != NULL)
+    {
+       /* get one from the cache */
+       p = nodecache;
+       nodecache = p->next;
+    }
+    else
+    {
+       /* make a new one */
+       p = xmalloc (sizeof (Node));
+    }
+
+    /* always make it clean */
+    memset (p, 0, sizeof (Node));
+    p->type = NT_UNKNOWN;
+
+    return p;
+}
+
+
+
+/*
+ * remove a node from it's list (maybe hash list too) and free it
+ */
+void
+delnode (Node *p)
+{
+    if (!p) return;
+    /* remove it */
+    removenode (p);
+    /* free up the storage */
+    freenode (p);
+}
+
+
+
+/*
+ * free up the storage associated with a node
+ */
+static void
+freenode_mem (Node *p)
+{
+    if (p->delproc != NULL)
+       p->delproc (p);                 /* call the specified delproc */
+    else
+    {
+       if (p->data != NULL)            /* otherwise free() it if necessary */
+           free (p->data);
+    }
+    if (p->key != NULL)                        /* free the key if necessary */
+       free (p->key);
+
+    /* to be safe, re-initialize these */
+    p->key = p->data = NULL;
+    p->delproc = NULL;
+}
+
+
+
+/*
+ * free up the storage associated with a node and recycle it
+ */
+void
+freenode (Node *p)
+{
+    /* first free the memory */
+    freenode_mem (p);
+
+    /* then put it in the cache */
+#ifndef NOCACHE
+    p->type = NT_UNKNOWN;
+    p->next = nodecache;
+    nodecache = p;
+#else
+    free (p);
+#endif
+}
+
+
+
+/*
+ * Link item P into list LIST before item MARKER.  If P->KEY is non-NULL and
+ * that key is already in the hash table, return -1 without modifying any
+ * parameter.
+ *
+ * return 0 on success
+ */
+int
+insert_before (List *list, Node *marker, Node *p)
+{
+    if (p->key != NULL)                        /* hash it too? */
+    {
+       int hashval;
+       Node *q;
+
+       hashval = hashp (p->key);
+       if (list->hasharray[hashval] == NULL)   /* make a header for list? */
+       {
+           q = getnode ();
+           q->type = HEADER;
+           list->hasharray[hashval] = q->hashnext = q->hashprev = q;
+       }
+
+       /* put it into the hash list if it's not already there */
+       for (q = list->hasharray[hashval]->hashnext;
+            q != list->hasharray[hashval]; q = q->hashnext)
+       {
+           if (strcmp (p->key, q->key) == 0)
+               return -1;
+       }
+       q = list->hasharray[hashval];
+       p->hashprev = q->hashprev;
+       p->hashnext = q;
+       p->hashprev->hashnext = p;
+       q->hashprev = p;
+    }
+
+    p->next = marker;
+    p->prev = marker->prev;
+    marker->prev->next = p;
+    marker->prev = p;
+
+    return 0;
+}
+
+
+
+/*
+ * insert item p at end of list "list" (maybe hash it too) if hashing and it
+ * already exists, return -1 and don't actually put it in the list
+ *
+ * return 0 on success
+ */
+int
+addnode (List *list, Node *p)
+{
+  return insert_before (list, list->list, p);
+}
+
+
+
+/*
+ * Like addnode, but insert p at the front of `list'.  This bogosity is
+ * necessary to preserve last-to-first output order for some RCS functions.
+ */
+int
+addnode_at_front (List *list, Node *p)
+{
+  return insert_before (list, list->list->next, p);
+}
+
+
+
+/* Look up an entry in hash list table and return a pointer to the
+ * node.  Return NULL if not found or if list is NULL.  Abort with a fatal
+ * error for errors.
+ */
+Node *
+findnode (List *list, const char *key)
+{
+    Node *head, *p;
+
+    if ((list == NULL))
+       return NULL;
+
+    assert (key != NULL);
+
+    head = list->hasharray[hashp (key)];
+    if (head == NULL)
+       /* Not found.  */
+       return NULL;
+
+    for (p = head->hashnext; p != head; p = p->hashnext)
+       if (strcmp (p->key, key) == 0)
+           return p;
+    return NULL;
+}
+
+
+
+/*
+ * Like findnode, but for a filename.
+ */
+Node *
+findnode_fn (List *list, const char *key)
+{
+    Node *head, *p;
+
+    /* This probably should be "assert (list != NULL)" (or if not we
+       should document the current behavior), but only if we check all
+       the callers to see if any are relying on this behavior.  */
+    if (list == NULL)
+       return NULL;
+
+    assert (key != NULL);
+
+    head = list->hasharray[hashp (key)];
+    if (head == NULL)
+       return NULL;
+
+    for (p = head->hashnext; p != head; p = p->hashnext)
+       if (fncmp (p->key, key) == 0)
+           return p;
+    return NULL;
+}
+
+
+
+/*
+ * walk a list with a specific proc
+ */
+int
+walklist (List *list, int (*proc) (Node *, void *), void *closure)
+{
+    Node *head, *p;
+    int err = 0;
+
+#ifdef HAVE_PRINTF_PTR
+    TRACE (TRACE_FLOW, "walklist ( list=%p, proc=%p, closure=%p )",
+          (void *)list, (void *)proc, (void *)closure);
+#else
+    TRACE (TRACE_FLOW, "walklist ( list=%lx, proc=%lx, closure=%lx )",
+          (unsigned long)list,(unsigned long) proc,
+          (unsigned long)closure);
+#endif
+
+    if (list == NULL)
+       return 0;
+
+    head = list->list;
+    for (p = head->next; p != head; p = p->next)
+       err += proc (p, closure);
+    return err;
+}
+
+
+
+int
+list_isempty (List *list)
+{
+    return list == NULL || list->list->next == list->list;
+}
+
+
+
+static int (*client_comp) (const Node *, const Node *);
+
+static int
+qsort_comp (const void *elem1, const void *elem2)
+{
+    Node **node1 = (Node **) elem1;
+    Node **node2 = (Node **) elem2;
+    return client_comp (*node1, *node2);
+}
+
+
+
+/*
+ * sort the elements of a list (in place)
+ */
+void
+sortlist (List *list, int (*comp) (const Node *, const Node *))
+{
+    Node *head, *remain, *p, **array;
+    int i, n;
+
+    if (list == NULL)
+       return;
+
+    /* save the old first element of the list */
+    head = list->list;
+    remain = head->next;
+
+    /* count the number of nodes in the list */
+    n = 0;
+    for (p = remain; p != head; p = p->next)
+       n++;
+
+    /* allocate an array of nodes and populate it */
+    array = xnmalloc (n, sizeof (Node *));
+    i = 0;
+    for (p = remain; p != head; p = p->next)
+       array[i++] = p;
+
+    /* sort the array of nodes */
+    client_comp = comp;
+    qsort (array, n, sizeof(Node *), qsort_comp);
+
+    /* rebuild the list from beginning to end */
+    head->next = head->prev = head;
+    for (i = 0; i < n; i++)
+    {
+       p = array[i];
+       p->next = head;
+       p->prev = head->prev;
+       p->prev->next = p;
+       head->prev = p;
+    }
+
+    /* release the array of nodes */
+    free (array);
+}
+
+
+
+/*
+ * compare two files list node (for sort)
+ */
+int
+fsortcmp (const Node *p, const Node *q)
+{
+    return strcmp (p->key, q->key);
+}
+
+
+
+/* Debugging functions.  Quite useful to call from within gdb. */
+
+
+static char *
+nodetypestring (Ntype type)
+{
+    switch (type) {
+    case NT_UNKNOWN:   return "UNKNOWN";
+    case HEADER:       return "HEADER";
+    case ENTRIES:      return "ENTRIES";
+    case FILES:                return "FILES";
+    case LIST:         return "LIST";
+    case RCSNODE:      return "RCSNODE";
+    case RCSVERS:      return "RCSVERS";
+    case DIRS:         return "DIRS";
+    case UPDATE:       return "UPDATE";
+    case LOCK:         return "LOCK";
+    case NDBMNODE:     return "NDBMNODE";
+    case FILEATTR:     return "FILEATTR";
+    case VARIABLE:     return "VARIABLE";
+    case RCSFIELD:     return "RCSFIELD";
+    case RCSCMPFLD:    return "RCSCMPFLD";
+    case RCSSTRING:    return "RCSSTRING";
+    }
+
+    return "<trash>";
+}
+
+
+
+static int
+printnode (Node *node, void *closure)
+{
+    if (node == NULL)
+    {
+       (void) printf("NULL node.\n");
+       return 0;
+    }
+
+#ifdef HAVE_PRINTF_PTR
+    (void) printf("Node at %p: type = %s, key = %p = \"%s\", data = %p, next = 
%p, prev = %p\n",
+          (void *) node, nodetypestring(node->type),
+          (void *) node->key, node->key, node->data,
+          (void *) node->next, (void *) node->prev);
+#else
+    (void) printf("Node at 0x%lx: type = %s, key = 0x%lx = \"%s\", data = 
0x%lx, next = 0x%lx, prev = 0x%lx\n",
+          (unsigned long) node, nodetypestring(node->type),
+          (unsigned long) node->key, node->key, (unsigned long) node->data,
+          (unsigned long) node->next, (unsigned long) node->prev);
+#endif
+
+    return 0;
+}
+
+
+
+/* This is global, not static, so that its name is unique and to avoid
+   compiler warnings about it not being used.  But it is not used by CVS;
+   it exists so one can call it from a debugger.  */
+
+void
+printlist (List *list)
+{
+    if (list == NULL)
+    {
+       (void) printf("NULL list.\n");
+       return;
+    }
+
+#ifdef HAVE_PRINTF_PTR
+    (void) printf("List at %p: list = %p, HASHSIZE = %d, next = %p\n",
+          (void *) list, (void *) list->list, HASHSIZE, (void *) list->next);
+#else
+    (void) printf("List at 0x%lx: list = 0x%lx, HASHSIZE = %d, next = 0x%lx\n",
+          (unsigned long) list, (unsigned long) list->list, HASHSIZE,
+          (unsigned long) list->next);
+#endif
+
+    (void) walklist(list, printnode, NULL);
+
+    return;
+}
Index: ccvs/src/hash.h
diff -u /dev/null ccvs/src/hash.h:1.21.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/hash.h     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ */
+
+#ifndef HASH_H
+#define HASH_H
+
+#include <stddef.h>
+
+/*
+ * The number of buckets for the hash table contained in each list.  This
+ * should probably be prime.
+ */
+#define HASHSIZE       151
+
+/*
+ * Types of nodes
+ */
+enum ntype
+{
+    NT_UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE,
+    RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR,
+    VARIABLE, RCSFIELD, RCSCMPFLD, RCSSTRING
+};
+typedef enum ntype Ntype;
+
+struct node
+{
+    Ntype type;
+    struct node *next;
+    struct node *prev;
+    struct node *hashnext;
+    struct node *hashprev;
+    char *key;
+    void *data;
+    size_t len;                        /* Length of DATA.  */
+    void (*delproc) (struct node *);
+};
+typedef struct node Node;
+
+struct list
+{
+    Node *list;
+    Node *hasharray[HASHSIZE];
+    struct list *next;
+};
+typedef struct list List;
+
+List *getlist (void);
+Node *findnode (List *list, const char *key);
+Node *findnode_fn (List *list, const char *key);
+Node *getnode (void);
+int insert_before (List *list, Node *marker, Node *p);
+int addnode (List *list, Node *p);
+int addnode_at_front (List *list, Node *p);
+int walklist (List *list, int (*)(Node *n, void *closure), void *closure);
+int list_isempty (List *list);
+void removenode (Node *p);
+void mergelists (List *dest, List **src);
+void dellist (List **listp);
+void delnode (Node *p);
+void freenode (Node *p);
+void sortlist (List *list, int (*)(const Node *, const Node *));
+int fsortcmp (const Node *p, const Node *q);
+
+#endif /* HASH_H */
Index: ccvs/src/import.c
diff -u /dev/null ccvs/src/import.c:1.175.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/import.c   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1784 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * "import" checks in the vendor release located in the current directory into
+ * the CVS source repository.  The CVS vendor branch support is utilized.
+ * 
+ * At least three arguments are expected to follow the options:
+ *     repository      Where the source belongs relative to the CVSROOT
+ *     VendorTag       Vendor's major tag
+ *     VendorReleTag   Tag for this particular release
+ *
+ * Additional arguments specify more Vendor Release Tags.
+ */
+
+#include "cvs.h"
+#include "lstat.h"
+#include "save-cwd.h"
+
+static char *get_comment (const char *user);
+static int add_rev (char *message, RCSNode *rcs, char *vfile,
+                         char *vers);
+static int add_tags (RCSNode *rcs, char *vfile, char *vtag, int targc,
+                    char *targv[]);
+static int import_descend (char *message, char *vtag, int targc, char 
*targv[]);
+static int import_descend_dir (char *message, char *dir, char *vtag,
+                              int targc, char *targv[]);
+static int process_import_file (char *message, char *vfile, char *vtag,
+                               int targc, char *targv[]);
+static int update_rcs_file (char *message, char *vfile, char *vtag, int targc,
+                           char *targv[], int inattic);
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+static int preserve_initial_permissions (FILE *fprcs, const char *userfile,
+                                        mode_t file_type, struct stat *sbp);
+#endif
+static int expand_and_copy_contents (FILE *fprcs, mode_t file_type,
+                                    const char *user, FILE *fpuser);
+static void add_log (int ch, char *fname);
+
+static int repos_len;
+static char *vhead;
+static char *vbranch;
+static FILE *logfp;
+static char *repository;
+static int conflicts;
+static int use_file_modtime;
+static char *keyword_opt = NULL;
+static bool killnew;
+
+static const char *const import_usage[] =
+{
+    "Usage: %s %s [-dX] [-k subst] [-I ign] [-m msg] [-b branch]\n",
+    "    [-W spec] repository vendor-tag release-tags...\n",
+    "\t-d\tUse the file's modification time as the time of import.\n",
+    "\t-X\tWhen importing new files, mark their trunk revisions as dead.\n",
+    "\t-k sub\tSet default RCS keyword substitution mode.\n",
+    "\t-I ign\tMore files to ignore (! to reset).\n",
+    "\t-b bra\tVendor branch id.\n",
+    "\t-m msg\tLog message.\n",
+    "\t-W spec\tWrappers specification line.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+int
+import (int argc, char **argv)
+{
+    char *message = NULL;
+    char *tmpfile;
+    char *cp;
+    int i, c, msglen, err;
+    List *ulist;
+    Node *p;
+    struct logfile_info *li;
+
+    if (argc == -1)
+       usage (import_usage);
+
+    /* Force -X behaviour or not based on the CVS repository
+       CVSROOT/config setting.  */
+#ifdef CLIENT_SUPPORT
+    killnew = !current_parsed_root->isremote
+             && config->ImportNewFilesToVendorBranchOnly;
+#else /* !CLIENT_SUPPORT */
+    killnew = config->ImportNewFilesToVendorBranchOnly;
+#endif /* CLIENT_SUPPORT */
+
+
+    ign_setup ();
+    wrap_setup ();
+
+    vbranch = xstrdup (CVSBRANCH);
+    optind = 0;
+    while ((c = getopt (argc, argv, "+Qqdb:m:I:k:W:X")) != -1)
+    {
+       switch (c)
+       {
+           case 'Q':
+           case 'q':
+               /* The CVS 1.5 client sends these options (in addition to
+                  Global_option requests), so we must ignore them.  */
+               if (!server_active)
+                   error (1, 0,
+                          "-q or -Q must be specified before \"%s\"",
+                          cvs_cmd_name);
+               break;
+           case 'd':
+               if (server_active)
+               {
+                   /* CVS 1.10 and older clients will send this, but it
+                      doesn't do any good.  So tell the user we can't
+                      cope, rather than silently losing.  */
+                   error (0, 0,
+                          "warning: not setting the time of import from the 
file");
+                   error (0, 0, "due to client limitations");
+               }
+               use_file_modtime = 1;
+               break;
+           case 'b':
+               free (vbranch);
+               vbranch = xstrdup (optarg);
+               break;
+           case 'm':
+#ifdef FORCE_USE_EDITOR
+               use_editor = 1;
+#else
+               use_editor = 0;
+#endif
+               if (message) free (message);
+               message = xstrdup (optarg);
+               break;
+           case 'I':
+               ign_add (optarg, 0);
+               break;
+            case 'k':
+               /* RCS_check_kflag returns strings of the form -kxx.  We
+                  only use it for validation, so we can free the value
+                  as soon as it is returned. */
+               free (RCS_check_kflag (optarg));
+               keyword_opt = optarg;
+               break;
+           case 'W':
+               wrap_add (optarg, 0);
+               break;
+           case 'X':
+               killnew = true;
+               break;
+           case '?':
+           default:
+               usage (import_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+    if (argc < 3)
+       usage (import_usage);
+
+    /* This is for handling the Checkin-time request.  It might seem a
+       bit odd to enable the use_file_modtime code even in the case
+       where Checkin-time was not sent for a particular file.  The
+       effect is that we use the time of upload, rather than the time
+       when we call RCS_checkin.  Since those times are both during
+       CVS's run, that seems OK, and it is easier to implement than
+       putting the "was Checkin-time sent" flag in CVS/Entries or some
+       such place.  */
+
+    if (server_active)
+       use_file_modtime = 1;
+
+    /* Don't allow "CVS" as any directory in module path.
+     *
+     * Could abstract this to valid_module_path, but I don't think we'll need
+     * to call it from anywhere else.
+     */
+    if ((cp = strstr (argv[0], "CVS")) &&   /* path contains "CVS" AND ... */
+        ((cp == argv[0]) || ISSLASH (*(cp-1))) && /* /^CVS/ OR m#/CVS# AND ... 
*/
+        ((*(cp+3) == '\0') || ISSLASH (*(cp+3))) /* /CVS$/ OR m#CVS/# */
+       )
+    {
+        error (0, 0,
+               "The word `CVS' is reserved by CVS and may not be used");
+        error (1, 0, "as a directory in a path or as a file name.");
+    }
+
+    for (i = 1; i < argc; i++)         /* check the tags for validity */
+    {
+       int j;
+
+       RCS_check_tag (argv[i]);
+       for (j = 1; j < i; j++)
+           if (strcmp (argv[j], argv[i]) == 0)
+               error (1, 0, "tag `%s' was specified more than once", argv[i]);
+    }
+
+    if (ISABSOLUTE (argv[0]) || pathname_levels (argv[0]) > 0)
+       /* It is somewhere between a security hole and "unexpected" to
+          let the client start mucking around outside the cvsroot
+          (wouldn't get the right CVSROOT configuration, &c).  */
+       error (1, 0, "directory %s not relative within the repository",
+              argv[0]);
+
+    if (current_parsed_root == NULL)
+    {
+       error (0, 0, "missing CVSROOT environment variable\n");
+       error (1, 0, "Set it or specify the '-d' option to %s.",
+              program_name);
+    }
+    repository = Xasprintf ("%s/%s", current_parsed_root->directory, argv[0]);
+    repos_len = strlen (current_parsed_root->directory);
+
+    /*
+     * Consistency checks on the specified vendor branch.  It must be
+     * composed of only numbers and dots ('.').  Also, for now we only
+     * support branching to a single level, so the specified vendor branch
+     * must only have two dots in it (like "1.1.1").
+     */
+    {
+       regex_t pat;
+       int ret = regcomp (&pat, "^[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*$",
+                          REG_EXTENDED);
+       assert (!ret);
+       if (regexec (&pat, vbranch, 0, NULL, 0))
+       {
+           error (1, 0,
+"Only numeric branch specifications with two dots are\n"
+"supported by import, not `%s'.  For example: `1.1.1'.",
+                  vbranch);
+       }
+       regfree (&pat);
+    }
+
+    /* Set vhead to the branch's parent.  */
+    vhead = xstrdup (vbranch);
+    cp = strrchr (vhead, '.');
+    *cp = '\0';
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       /* For rationale behind calling start_server before do_editor, see
+          commit.c  */
+       start_server ();
+    }
+#endif
+
+    if (!server_active && use_editor)
+    {
+       do_editor (NULL, &message,
+                  current_parsed_root->isremote ? NULL : repository,
+                  NULL);
+    }
+    msglen = message == NULL ? 0 : strlen (message);
+    if (msglen == 0 || message[msglen - 1] != '\n')
+    {
+       char *nm = xmalloc (msglen + 2);
+       *nm = '\0';
+       if (message != NULL)
+       {
+           (void) strcpy (nm, message);
+           free (message);
+       }
+       (void) strcat (nm + msglen, "\n");
+       message = nm;
+    }
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       int err;
+
+       if (vbranch[0] != '\0')
+           option_with_arg ("-b", vbranch);
+       option_with_arg ("-m", message ? message : "");
+       if (keyword_opt != NULL)
+           option_with_arg ("-k", keyword_opt);
+       if (killnew)
+           send_arg ("-X");
+       /* The only ignore processing which takes place on the server side
+          is the CVSROOT/cvsignore file.  But if the user specified -I !,
+          the documented behavior is to not process said file.  */
+       if (ign_inhibit_server)
+       {
+           send_arg ("-I");
+           send_arg ("!");
+       }
+       wrap_send ();
+
+       {
+           int i;
+           for (i = 0; i < argc; ++i)
+               send_arg (argv[i]);
+       }
+
+       logfp = stdin;
+       client_import_setup (repository);
+       err = import_descend (message, argv[1], argc - 2, argv + 2);
+       client_import_done ();
+       if (message)
+           free (message);
+       free (repository);
+       free (vbranch);
+       free (vhead);
+       send_to_server ("import\012", 0);
+       err += get_responses_and_close ();
+       return err;
+    }
+#endif
+
+    if (!safe_location (NULL))
+    {
+       error (1, 0, "attempt to import the repository");
+    }
+
+    ulist = getlist ();
+    p = getnode ();
+    p->type = UPDATE;
+    p->delproc = update_delproc;
+    p->key = xstrdup ("- Imported sources");
+    li = xmalloc (sizeof (struct logfile_info));
+    li->type = T_TITLE;
+    li->tag = xstrdup (vbranch);
+    li->rev_old = li->rev_new = NULL;
+    p->data = li;
+    (void) addnode (ulist, p);
+    do_verify (&message, repository, ulist);
+
+    /*
+     * Make all newly created directories writable.  Should really use a more
+     * sophisticated security mechanism here.
+     */
+    (void) umask (cvsumask);
+    make_directories (repository);
+
+    /* Create the logfile that will be logged upon completion */
+    if ((logfp = cvs_temp_file (&tmpfile)) == NULL)
+       error (1, errno, "cannot create temporary file `%s'", tmpfile);
+    /* On systems where we can unlink an open file, do so, so it will go
+       away no matter how we exit.  FIXME-maybe: Should be checking for
+       errors but I'm not sure which error(s) we get if we are on a system
+       where one can't unlink open files.  */
+    (void) CVS_UNLINK (tmpfile);
+    (void) fprintf (logfp, "\nVendor Tag:\t%s\n", argv[1]);
+    (void) fprintf (logfp, "Release Tags:\t");
+    for (i = 2; i < argc; i++)
+       (void) fprintf (logfp, "%s\n\t\t", argv[i]);
+    (void) fprintf (logfp, "\n");
+
+    /* Just Do It.  */
+    err = import_descend (message, argv[1], argc - 2, argv + 2);
+    if (conflicts || killnew)
+    {
+       if (!really_quiet)
+       {
+           char buf[20];
+
+           cvs_output_tagged ("+importmergecmd", NULL);
+           cvs_output_tagged ("newline", NULL);
+           if (conflicts)
+               sprintf (buf, "%d", conflicts);
+           else
+               strcpy (buf, "No");
+           cvs_output_tagged ("conflicts", buf);
+           cvs_output_tagged ("text", " conflicts created by this import.");
+           cvs_output_tagged ("newline", NULL);
+           cvs_output_tagged ("text",
+                              "Use the following command to help the merge:");
+           cvs_output_tagged ("newline", NULL);
+           cvs_output_tagged ("newline", NULL);
+           cvs_output_tagged ("text", "\t");
+           cvs_output_tagged ("text", program_name);
+           if (CVSroot_cmdline != NULL)
+           {
+               cvs_output_tagged ("text", " -d ");
+               cvs_output_tagged ("text", CVSroot_cmdline);
+           }
+           cvs_output_tagged ("text", " checkout -j");
+           cvs_output_tagged ("mergetag1", "<prev_rel_tag>");
+           cvs_output_tagged ("text", " -j");
+           cvs_output_tagged ("mergetag2", argv[2]);
+           cvs_output_tagged ("text", " ");
+           cvs_output_tagged ("repository", argv[0]);
+           cvs_output_tagged ("newline", NULL);
+           cvs_output_tagged ("newline", NULL);
+           cvs_output_tagged ("-importmergecmd", NULL);
+       }
+
+       /* FIXME: I'm not sure whether we need to put this information
+           into the loginfo.  If we do, then note that it does not
+           report any required -d option.  There is no particularly
+           clean way to tell the server about the -d option used by
+           the client.  */
+       if (conflicts)
+           (void) fprintf (logfp, "\n%d", conflicts);
+       else
+           (void) fprintf (logfp, "\nNo");
+       (void) fprintf (logfp, " conflicts created by this import.\n");
+       (void) fprintf (logfp,
+                       "Use the following command to help the merge:\n\n");
+       (void) fprintf (logfp, "\t%s checkout ", program_name);
+       (void) fprintf (logfp, "-j%s:yesterday -j%s %s\n\n",
+                       argv[1], argv[1], argv[0]);
+    }
+    else
+    {
+       if (!really_quiet)
+           cvs_output ("\nNo conflicts created by this import\n\n", 0);
+       (void) fprintf (logfp, "\nNo conflicts created by this import\n\n");
+    }
+
+    /*
+     * Write out the logfile and clean up.
+     */
+    Update_Logfile (repository, message, logfp, ulist);
+    dellist (&ulist);
+    if (fclose (logfp) < 0)
+       error (0, errno, "error closing %s", tmpfile);
+
+    /* Make sure the temporary file goes away, even on systems that don't let
+       you delete a file that's in use.  */
+    if (CVS_UNLINK (tmpfile) < 0 && !existence_error (errno))
+       error (0, errno, "cannot remove %s", tmpfile);
+    free (tmpfile);
+
+    if (message)
+       free (message);
+    free (repository);
+    free (vbranch);
+    free (vhead);
+
+    return err;
+}
+
+/* Process all the files in ".", then descend into other directories.
+   Returns 0 for success, or >0 on error (in which case a message
+   will have been printed).  */
+static int
+import_descend (char *message, char *vtag, int targc, char **targv)
+{
+    DIR *dirp;
+    struct dirent *dp;
+    int err = 0;
+    List *dirlist = NULL;
+
+    /* first, load up any per-directory ignore lists */
+    ign_add_file (CVSDOTIGNORE, 1);
+    wrap_add_file (CVSDOTWRAPPER, 1);
+
+    if (!current_parsed_root->isremote)
+       lock_dir_for_write (repository);
+
+    if ((dirp = CVS_OPENDIR (".")) == NULL)
+    {
+       error (0, errno, "cannot open directory");
+       err++;
+    }
+    else
+    {
+       errno = 0;
+       while ((dp = CVS_READDIR (dirp)) != NULL)
+       {
+           if (strcmp (dp->d_name, ".") == 0 || strcmp (dp->d_name, "..") == 0)
+               goto one_more_time_boys;
+
+           /* CVS directories are created in the temp directory by
+              server.c because it doesn't special-case import.  So
+              don't print a message about them, regardless of -I!.  */
+           if (server_active && strcmp (dp->d_name, CVSADM) == 0)
+               goto one_more_time_boys;
+
+           /* FIXME: .#filename.sig is where the server currently saves the
+            * signature data when available.  For now just ignore it.
+            */
+           if (server_active && !fnmatch (".#*.sig", dp->d_name, 0))
+               goto one_more_time_boys;
+
+           if (ign_name (dp->d_name))
+           {
+               add_log ('I', dp->d_name);
+               goto one_more_time_boys;
+           }
+
+           if (
+#ifdef DT_DIR
+               (dp->d_type == DT_DIR
+                || (dp->d_type == DT_UNKNOWN && isdir (dp->d_name)))
+#else
+               isdir (dp->d_name)
+#endif
+               && !wrap_name_has (dp->d_name, WRAP_TOCVS)
+               )
+           {
+               Node *n;
+
+               if (dirlist == NULL)
+                   dirlist = getlist ();
+
+               n = getnode ();
+               n->key = xstrdup (dp->d_name);
+               addnode (dirlist, n);
+           }
+           else if (
+#ifdef DT_DIR
+                    dp->d_type == DT_LNK
+                    || (dp->d_type == DT_UNKNOWN && islink (dp->d_name))
+#else
+                    islink (dp->d_name)
+#endif
+                    )
+           {
+               add_log ('L', dp->d_name);
+               err++;
+           }
+           else
+           {
+#ifdef CLIENT_SUPPORT
+               if (current_parsed_root->isremote)
+                   err += client_process_import_file (message, dp->d_name,
+                                                       vtag, targc, targv,
+                                                       repository,
+                                                       keyword_opt != NULL &&
+                                                      keyword_opt[0] == 'b',
+                                                      use_file_modtime);
+               else
+#endif
+                   err += process_import_file (message, dp->d_name,
+                                               vtag, targc, targv);
+           }
+       one_more_time_boys:
+           errno = 0;
+       }
+       if (errno != 0)
+       {
+           error (0, errno, "cannot read directory");
+           ++err;
+       }
+       (void) CVS_CLOSEDIR (dirp);
+    }
+
+    if (!current_parsed_root->isremote)
+       Simple_Lock_Cleanup ();
+
+    if (dirlist != NULL)
+    {
+       Node *head, *p;
+
+       head = dirlist->list;
+       for (p = head->next; p != head; p = p->next)
+       {
+           err += import_descend_dir (message, p->key, vtag, targc, targv);
+       }
+
+       dellist (&dirlist);
+    }
+
+    return err;
+}
+
+/*
+ * Process the argument import file.
+ */
+static int
+process_import_file (char *message, char *vfile, char *vtag, int targc,
+                    char **targv)
+{
+    char *rcs;
+    int inattic = 0;
+
+    rcs = Xasprintf ("%s/%s%s", repository, vfile, RCSEXT);
+    if (!isfile (rcs))
+    {
+       char *attic_name;
+
+       attic_name = xmalloc (strlen (repository) + strlen (vfile) +
+                             sizeof (CVSATTIC) + sizeof (RCSEXT) + 10);
+       (void) sprintf (attic_name, "%s/%s/%s%s", repository, CVSATTIC,
+                       vfile, RCSEXT);
+       if (!isfile (attic_name))
+       {
+           int retval;
+           char *free_opt = NULL;
+           char *our_opt = keyword_opt;
+
+           /* If marking newly-imported files as dead, they must be
+              created in the attic!  */
+           if (!killnew)
+               free (attic_name);
+           else 
+           {
+               free (rcs);
+               rcs = attic_name;
+
+               /* Attempt to make the Attic directory, in case it
+                  does not exist.  */
+               (void) sprintf (rcs, "%s/%s", repository, CVSATTIC);
+               if (CVS_MKDIR (rcs, 0777 ) != 0 && errno != EEXIST)
+                   error (1, errno, "cannot make directory `%s'", rcs);
+
+               /* Note that the above clobbered the path name, so we
+                  recreate it here.  */
+               (void) sprintf (rcs, "%s/%s/%s%s", repository, CVSATTIC,
+                               vfile, RCSEXT);
+           }
+
+           /*
+            * A new import source file; it doesn't exist as a ,v within the
+            * repository nor in the Attic -- create it anew.
+            */
+           add_log ('N', vfile);
+
+#ifdef SERVER_SUPPORT
+           /* The most reliable information on whether the file is binary
+              is what the client told us.  That is because if the client had
+              the wrong idea about binaryness, it corrupted the file, so
+              we might as well believe the client.  */
+           if (server_active)
+           {
+               Node *node;
+               List *entries;
+
+               /* Reading all the entries for each file is fairly silly, and
+                  probably slow.  But I am too lazy at the moment to do
+                  anything else.  */
+               entries = Entries_Open (0, NULL);
+               node = findnode_fn (entries, vfile);
+               if (node != NULL)
+               {
+                   Entnode *entdata = node->data;
+
+                   if (entdata->type == ENT_FILE)
+                   {
+                       assert (entdata->options[0] == '-'
+                               && entdata->options[1] == 'k');
+                       our_opt = xstrdup (entdata->options + 2);
+                       free_opt = our_opt;
+                   }
+               }
+               Entries_Close (entries);
+           }
+#endif
+
+           retval = add_rcs_file (message, rcs, vfile, vhead, our_opt,
+                                  vbranch, vtag, targc, targv,
+                                  NULL, 0, logfp, killnew);
+           if (free_opt != NULL)
+               free (free_opt);
+           free (rcs);
+           return retval;
+       }
+       free (attic_name);
+       inattic = 1;
+    }
+
+    free (rcs);
+    /*
+     * an rcs file exists. have to do things the official, slow, way.
+     */
+    return update_rcs_file (message, vfile, vtag, targc, targv, inattic);
+}
+
+/*
+ * The RCS file exists; update it by adding the new import file to the
+ * (possibly already existing) vendor branch.
+ */
+static int
+update_rcs_file (char *message, char *vfile, char *vtag, int targc,
+                char **targv, int inattic)
+{
+    Vers_TS *vers;
+    int letter;
+    char *tocvsPath;
+    char *expand;
+    struct file_info finfo;
+
+    memset (&finfo, 0, sizeof finfo);
+    finfo.file = vfile;
+    /* Not used, so don't worry about it.  */
+    finfo.update_dir = NULL;
+    finfo.fullname = finfo.file;
+    finfo.repository = repository;
+    finfo.entries = NULL;
+    finfo.rcs = NULL;
+    vers = Version_TS (&finfo, NULL, vbranch, NULL, 1, 0);
+    if (vers->vn_rcs != NULL
+       && !RCS_isdead (vers->srcfile, vers->vn_rcs))
+    {
+       int different;
+
+       /*
+        * The rcs file does have a revision on the vendor branch. Compare
+        * this revision with the import file; if they match exactly, there
+        * is no need to install the new import file as a new revision to the
+        * branch.  Just tag the revision with the new import tags.
+        * 
+        * This is to try to cut down the number of "C" conflict messages for
+        * locally modified import source files.
+        */
+       tocvsPath = wrap_tocvs_process_file (vfile);
+       /* FIXME: Why don't we pass tocvsPath to RCS_cmp_file if it is
+           not NULL?  */
+       expand = (vers->srcfile->expand != NULL
+                 && vers->srcfile->expand[0] == 'b') ? "-kb" : "-ko";
+       different = RCS_cmp_file (vers->srcfile, vers->vn_rcs, NULL,
+                                 NULL, expand, vfile);
+       if (tocvsPath)
+           if (unlink_file_dir (tocvsPath) < 0)
+               error (0, errno, "cannot remove %s", tocvsPath);
+
+       if (!different)
+       {
+           int retval = 0;
+
+           /*
+            * The two files are identical.  Just update the tags, print the
+            * "U", signifying that the file has changed, but needs no
+            * attention, and we're done.
+            */
+           if (add_tags (vers->srcfile, vfile, vtag, targc, targv))
+               retval = 1;
+           add_log ('U', vfile);
+           freevers_ts (&vers);
+           return retval;
+       }
+    }
+
+    /* We may have failed to parse the RCS file; check just in case */
+    if (vers->srcfile == NULL ||
+       add_rev (message, vers->srcfile, vfile, vers->vn_rcs) ||
+       add_tags (vers->srcfile, vfile, vtag, targc, targv))
+    {
+       freevers_ts (&vers);
+       return 1;
+    }
+
+    if (vers->srcfile->branch == NULL || inattic ||
+       strcmp (vers->srcfile->branch, vbranch) != 0)
+    {
+       conflicts++;
+       letter = 'C';
+    }
+    else
+       letter = 'U';
+    add_log (letter, vfile);
+
+    freevers_ts (&vers);
+    return 0;
+}
+
+/*
+ * Add the revision to the vendor branch
+ */
+static int
+add_rev (char *message, RCSNode *rcs, char *vfile, char *vers)
+{
+    int locked, status, ierrno;
+    char *tocvsPath;
+
+    if (noexec)
+       return 0;
+
+    locked = 0;
+    if (vers != NULL)
+    {
+       /* Before RCS_lock existed, we were directing stdout, as well as
+          stderr, from the RCS command, to DEVNULL.  I wouldn't guess that
+          was necessary, but I don't know for sure.  */
+       /* Earlier versions of this function printed a `fork failed' error
+          when RCS_lock returned an error code.  That's not appropriate
+          now that RCS_lock is librarified, but should the error text be
+          preserved? */
+       if (RCS_lock (rcs, vbranch, 1) != 0)
+           return 1;
+       locked = 1;
+       RCS_rewrite (rcs, NULL, NULL);
+    }
+    tocvsPath = wrap_tocvs_process_file (vfile);
+
+    status = RCS_checkin (rcs, NULL, tocvsPath == NULL ? vfile : tocvsPath,
+                         message, vbranch, 0,
+                         (RCS_FLAGS_QUIET | RCS_FLAGS_KEEPFILE
+                          | (use_file_modtime ? RCS_FLAGS_MODTIME : 0)));
+    ierrno = errno;
+
+    if ((tocvsPath != NULL) && (unlink_file_dir (tocvsPath) < 0))
+       error (0, errno, "cannot remove %s", tocvsPath);
+
+    if (status)
+    {
+       if (!noexec)
+       {
+           fperrmsg (logfp, 0, status == -1 ? ierrno : 0,
+                     "ERROR: Check-in of %s failed", rcs->path);
+           error (0, status == -1 ? ierrno : 0,
+                  "ERROR: Check-in of %s failed", rcs->path);
+       }
+       if (locked)
+       {
+           (void) RCS_unlock (rcs, vbranch, 0);
+           RCS_rewrite (rcs, NULL, NULL);
+       }
+       return 1;
+    }
+    return 0;
+}
+
+/*
+ * Add the vendor branch tag and all the specified import release tags to the
+ * RCS file.  The vendor branch tag goes on the branch root (1.1.1) while the
+ * vendor release tags go on the newly added leaf of the branch (1.1.1.1,
+ * 1.1.1.2, ...).
+ */
+static int
+add_tags (RCSNode *rcs, char *vfile, char *vtag, int targc, char **targv)
+{
+    int i, ierrno;
+    Vers_TS *vers;
+    int retcode = 0;
+    struct file_info finfo;
+
+    if (noexec)
+       return 0;
+
+    if ((retcode = RCS_settag (rcs, vtag, vbranch)) != 0)
+    {
+       ierrno = errno;
+       fperrmsg (logfp, 0, retcode == -1 ? ierrno : 0,
+                 "ERROR: Failed to set tag %s in %s", vtag, rcs->path);
+       error (0, retcode == -1 ? ierrno : 0,
+              "ERROR: Failed to set tag %s in %s", vtag, rcs->path);
+       return 1;
+    }
+    RCS_rewrite (rcs, NULL, NULL);
+
+    memset (&finfo, 0, sizeof finfo);
+    finfo.file = vfile;
+    /* Not used, so don't worry about it.  */
+    finfo.update_dir = NULL;
+    finfo.fullname = finfo.file;
+    finfo.repository = repository;
+    finfo.entries = NULL;
+    finfo.rcs = NULL;
+    vers = Version_TS (&finfo, NULL, vtag, NULL, 1, 0);
+    for (i = 0; i < targc; i++)
+    {
+       if ((retcode = RCS_settag (rcs, targv[i], vers->vn_rcs)) == 0)
+           RCS_rewrite (rcs, NULL, NULL);
+       else
+       {
+           ierrno = errno;
+           fperrmsg (logfp, 0, retcode == -1 ? ierrno : 0,
+                     "WARNING: Couldn't add tag %s to %s", targv[i],
+                     rcs->path);
+           error (0, retcode == -1 ? ierrno : 0,
+                  "WARNING: Couldn't add tag %s to %s", targv[i],
+                  rcs->path);
+       }
+    }
+    freevers_ts (&vers);
+    return 0;
+}
+
+/*
+ * Stolen from rcs/src/rcsfnms.c, and adapted/extended.
+ */
+struct compair
+{
+    char *suffix, *comlead;
+};
+
+static const struct compair comtable[] =
+{
+
+/*
+ * comtable pairs each filename suffix with a comment leader. The comment
+ * leader is placed before each line generated by the $Log keyword. This
+ * table is used to guess the proper comment leader from the working file's
+ * suffix during initial ci (see InitAdmin()). Comment leaders are needed for
+ * languages without multiline comments; for others they are optional.
+ *
+ * I believe that the comment leader is unused if you are using RCS 5.7, which
+ * decides what leader to use based on the text surrounding the $Log keyword
+ * rather than a specified comment leader.
+ */
+    {"a", "-- "},                      /* Ada           */
+    {"ada", "-- "},
+    {"adb", "-- "},
+    {"asm", ";; "},                    /* assembler (MS-DOS) */
+    {"ads", "-- "},                    /* Ada           */
+    {"bas", "' "},                     /* Visual Basic code */
+    {"bat", ":: "},                    /* batch (MS-DOS) */
+    {"body", "-- "},                   /* Ada           */
+    {"c", " * "},                      /* C             */
+    {"c++", "// "},                    /* C++ in all its infinite guises */
+    {"cc", "// "},
+    {"cpp", "// "},
+    {"cxx", "// "},
+    {"m", "// "},                      /* Objective-C */
+    {"cl", ";;; "},                    /* Common Lisp   */
+    {"cmd", ":: "},                    /* command (OS/2) */
+    {"cmf", "c "},                     /* CM Fortran    */
+    {"cs", " * "},                     /* C*            */
+    {"csh", "# "},                     /* shell         */
+    {"dlg", " * "},                    /* MS Windows dialog file */
+    {"e", "# "},                       /* efl           */
+    {"epsf", "% "},                    /* encapsulated postscript */
+    {"epsi", "% "},                    /* encapsulated postscript */
+    {"el", "; "},                      /* Emacs Lisp    */
+    {"f", "c "},                       /* Fortran       */
+    {"for", "c "},
+    {"frm", "' "},                     /* Visual Basic form */
+    {"h", " * "},                      /* C-header      */
+    {"hh", "// "},                     /* C++ header    */
+    {"hpp", "// "},
+    {"hxx", "// "},
+    {"in", "# "},                      /* for Makefile.in */
+    {"l", " * "},                      /* lex (conflict between lex and
+                                        * franzlisp) */
+    {"mac", ";; "},                    /* macro (DEC-10, MS-DOS, PDP-11,
+                                        * VMS, etc) */
+    {"mak", "# "},                     /* makefile, e.g. Visual C++ */
+    {"me", ".\\\" "},                  /* me-macros    t/nroff  */
+    {"ml", "; "},                      /* mocklisp      */
+    {"mm", ".\\\" "},                  /* mm-macros    t/nroff  */
+    {"ms", ".\\\" "},                  /* ms-macros    t/nroff  */
+    {"man", ".\\\" "},                 /* man-macros   t/nroff  */
+    {"1", ".\\\" "},                   /* feeble attempt at man pages... */
+    {"2", ".\\\" "},
+    {"3", ".\\\" "},
+    {"4", ".\\\" "},
+    {"5", ".\\\" "},
+    {"6", ".\\\" "},
+    {"7", ".\\\" "},
+    {"8", ".\\\" "},
+    {"9", ".\\\" "},
+    {"p", " * "},                      /* pascal        */
+    {"pas", " * "},
+    {"pl", "# "},                      /* perl (conflict with Prolog) */
+    {"ps", "% "},                      /* postscript    */
+    {"psw", "% "},                     /* postscript wrap */
+    {"pswm", "% "},                    /* postscript wrap */
+    {"r", "# "},                       /* ratfor        */
+    {"rc", " * "},                     /* Microsoft Windows resource file */
+    {"red", "% "},                     /* psl/rlisp     */
+#ifdef sparc
+    {"s", "! "},                       /* assembler     */
+#endif
+#ifdef mc68000
+    {"s", "| "},                       /* assembler     */
+#endif
+#ifdef pdp11
+    {"s", "/ "},                       /* assembler     */
+#endif
+#ifdef vax
+    {"s", "# "},                       /* assembler     */
+#endif
+#ifdef __ksr__
+    {"s", "# "},                       /* assembler     */
+    {"S", "# "},                       /* Macro assembler */
+#endif
+    {"sh", "# "},                      /* shell         */
+    {"sl", "% "},                      /* psl           */
+    {"spec", "-- "},                   /* Ada           */
+    {"tex", "% "},                     /* tex           */
+    {"y", " * "},                      /* yacc          */
+    {"ye", " * "},                     /* yacc-efl      */
+    {"yr", " * "},                     /* yacc-ratfor   */
+    {"", "# "},                                /* default for empty suffix     
 */
+    {NULL, "# "}                       /* default for unknown suffix;   */
+/* must always be last          */
+};
+
+
+
+static char *
+get_comment (const char *user)
+{
+    char *cp, *suffix;
+    char *suffix_path;
+    int i;
+    char *retval;
+
+    suffix_path = xmalloc (strlen (user) + 5);
+    cp = strrchr (user, '.');
+    if (cp != NULL)
+    {
+       cp++;
+
+       /*
+        * Convert to lower-case, since we are not concerned about the
+        * case-ness of the suffix.
+        */
+       (void) strcpy (suffix_path, cp);
+       for (cp = suffix_path; *cp; cp++)
+           if (isupper ((unsigned char) *cp))
+               *cp = tolower (*cp);
+       suffix = suffix_path;
+    }
+    else
+       suffix = "";                    /* will use the default */
+    for (i = 0;; i++)
+    {
+       if (comtable[i].suffix == NULL)
+       {
+           /* Default.  Note we'll always hit this case before we
+              ever return NULL.  */
+           retval = comtable[i].comlead;
+           break;
+       }
+       if (strcmp (suffix, comtable[i].suffix) == 0)
+       {
+           retval = comtable[i].comlead;
+           break;
+       }
+    }
+    free (suffix_path);
+    return retval;
+}
+
+/* Create a new RCS file from scratch.
+ *
+ * This probably should be moved to rcs.c now that it is called from
+ * places outside import.c.
+ *
+ * INPUTS
+ *   message    Log message for the addition.  Not used if add_vhead == NULL.
+ *   rcs        Filename of the RCS file to create.  Note that if 'do_killnew'
+ *             is set, this file should be in the Attic directory, and the
+ *             Attic directory must already exist.
+ *   user       Filename of the file to serve as the contents of the initial
+ *              revision.  Even if add_vhead is NULL, we use this to determine
+ *              the modes to give the new RCS file.
+ *   add_vhead  Revision number of head that we are adding.  Normally 1.1 but
+ *              could be another revision as long as ADD_VBRANCH is a branch
+ *              from it.  If NULL, then just add an empty file without any
+ *              revisions (similar to the one created by "rcs -i").
+ *   key_opt    Keyword expansion mode, e.g., "b" for binary.  NULL means the
+ *              default behavior.
+ *   add_vbranch
+ *              Vendor branch to import to, or NULL if none.  If non-NULL, then
+ *              vtag should also be non-NULL.
+ *   vtag
+ *   targc      Number of elements in TARGV.
+ *   targv      The list of tags to attached to this imported revision.
+ *   desctext   If non-NULL, description for the file.  If NULL, the
+ *              description will be empty.
+ *   desclen    The number of bytes in desctext.
+ *   add_logfp  Write errors to here as well as via error (), or NULL if we
+ *              should use only error ().
+ *   do_killnew        Mark newly-imported files as being dead on the trunk, 
i.e.,
+ *             as being imported only to the vendor branch.
+ *
+ * RETURNS
+ *   Return value is 0 for success, or nonzero for failure (in which
+ *   case an error message will have already been printed).
+ */
+int
+add_rcs_file (const char *message, const char *rcs, const char *user,
+              const char *add_vhead, const char *key_opt,
+              const char *add_vbranch, const char *vtag, int targc,
+              char **targv, const char *desctext, size_t desclen,
+              FILE *add_logfp, bool do_killnew)
+{
+    FILE *fprcs, *fpuser;
+    struct stat sb;
+    struct tm *ftm;
+    time_t now;
+    char altdate1[MAXDATELEN];
+    char *author;
+    int i, ierrno, err = 0;
+    mode_t mode;
+    char *tocvsPath;
+    const char *userfile;
+    char *free_opt = NULL;
+    mode_t file_type;
+    char *dead_revision = NULL;
+
+    if (noexec)
+       return 0;
+
+    if (do_killnew)
+    {
+       char *last_place;
+       int last_number;
+
+       /* If we are marking the newly imported file as dead, we must
+          have a head revision.  */
+       if (add_vhead == NULL)
+           error (1, 0, "killing new file attempted when no head revision is 
being added");
+
+       /* One extra byte for NUL, plus one for carry generated by adding
+          one to the last number in the add_vhead revision.  */
+       dead_revision = xmalloc (strlen (add_vhead) + 2);
+       strcpy (dead_revision, add_vhead);
+
+       /* Find the loacation of the last number, which we will increment
+          and overwrite.  Note that this handles single numbers (w/o
+          dots), which is probably unnecessary.  */
+       if ((last_place = strrchr (dead_revision, '.')) != NULL)
+           last_place++;
+       else
+           last_place = dead_revision;
+       last_number = atoi (last_place);
+       if (++last_number <= 0)
+         error (1, 0, "invalid revision number %s", add_vhead);
+       sprintf (last_place, "%d", last_number);
+    }
+
+    /* Note that as the code stands now, the -k option overrides any
+       settings in wrappers (whether CVSROOT/cvswrappers, -W, or
+       whatever).  Some have suggested this should be the other way
+       around.  As far as I know the documentation doesn't say one way
+       or the other.  Before making a change of this sort, should think
+       about what is best, document it (in cvs.texinfo and NEWS), &c.  */
+
+    if (key_opt == NULL)
+    {
+       if (wrap_name_has (user, WRAP_RCSOPTION))
+       {
+           key_opt = free_opt = wrap_rcsoption (user, 0);
+       }
+    }
+
+    tocvsPath = wrap_tocvs_process_file (user);
+    userfile = (tocvsPath == NULL ? user : tocvsPath);
+
+    /* Opening in text mode is probably never the right thing for the
+       server (because the protocol encodes text files in a fashion
+       which does not depend on what the client or server OS is, as
+       documented in cvsclient.texi), but as long as the server just
+       runs on unix it is a moot point.  */
+
+    /* If PreservePermissions is set, then make sure that the file
+       is a plain file before trying to open it.  Longstanding (although
+       often unpopular) CVS behavior has been to follow symlinks, so we
+       maintain that behavior if PreservePermissions is not on.
+
+       NOTE: this error message used to be `cannot fstat', but is now
+       `cannot lstat'.  I don't see a way around this, since we must
+       stat the file before opening it. -twp */
+
+    if (lstat (userfile, &sb) < 0)
+    {
+       /* not fatal, continue import */
+       if (add_logfp != NULL)
+           fperrmsg (add_logfp, 0, errno,
+                         "ERROR: cannot lstat file %s", userfile);
+       error (0, errno, "cannot lstat file %s", userfile);
+       goto read_error;
+    }
+    file_type = sb.st_mode & S_IFMT;
+
+    fpuser = NULL;
+    if (
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       !config->preserve_perms ||
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+       file_type == S_IFREG)
+    {
+       fpuser = CVS_FOPEN (userfile,
+                           ((key_opt != NULL && strcmp (key_opt, "b") == 0)
+                            ? "rb"
+                            : "r")
+           );
+       if (fpuser == NULL)
+       {
+           /* not fatal, continue import */
+           if (add_logfp != NULL)
+               fperrmsg (add_logfp, 0, errno,
+                         "ERROR: cannot read file %s", userfile);
+           error (0, errno, "ERROR: cannot read file %s", userfile);
+           goto read_error;
+       }
+    }
+
+    fprcs = CVS_FOPEN (rcs, "w+b");
+    if (fprcs == NULL)
+    {
+       ierrno = errno;
+       goto write_error_noclose;
+    }
+
+    /*
+     * putadmin()
+     */
+    if (add_vhead != NULL)
+    {
+       if (fprintf (fprcs, "head     %s;\012",
+                    do_killnew ? dead_revision : add_vhead) < 0)
+           goto write_error;
+    }
+    else
+    {
+       if (fprintf (fprcs, "head     ;\012") < 0)
+           goto write_error;
+    }
+
+    /* This sets the default branch.  If using the 'do_killnew' functionality,
+       where imports don't show up until merged, no default branch should
+       be set.  */
+    if (add_vbranch != NULL && ! do_killnew)
+    {
+       if (fprintf (fprcs, "branch   %s;\012", add_vbranch) < 0)
+           goto write_error;
+    }
+    if (fprintf (fprcs, "access   ;\012") < 0 ||
+       fprintf (fprcs, "symbols  ") < 0)
+    {
+       goto write_error;
+    }
+
+    for (i = targc - 1; i >= 0; i--)
+    {
+       /* RCS writes the symbols backwards */
+       assert (add_vbranch != NULL);
+       if (fprintf (fprcs, "%s:%s.1 ", targv[i], add_vbranch) < 0)
+           goto write_error;
+    }
+
+    if (add_vbranch != NULL)
+    {
+       if (fprintf (fprcs, "%s:%s", vtag, add_vbranch) < 0)
+           goto write_error;
+    }
+    if (fprintf (fprcs, ";\012") < 0)
+       goto write_error;
+
+    if (fprintf (fprcs, "locks    ; strict;\012") < 0 ||
+       /* XXX - make sure @@ processing works in the RCS file */
+       fprintf (fprcs, "comment  @%s@;\012", get_comment (user)) < 0)
+    {
+       goto write_error;
+    }
+
+    if (key_opt != NULL && strcmp (key_opt, "kv") != 0)
+    {
+       if (fprintf (fprcs, "expand   @%s@;\012", key_opt) < 0)
+       {
+           goto write_error;
+       }
+    }
+
+    if (fprintf (fprcs, "\012") < 0)
+      goto write_error;
+
+    /* Write the revision(s), with the date and author and so on
+       (that is "delta" rather than "deltatext" from rcsfile(5)).  */
+
+    if (use_file_modtime)
+       now = sb.st_mtime;
+    else
+       (void) time (&now);
+    ftm = gmtime (&now);
+    (void) sprintf (altdate1, DATEFORM,
+                   ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900),
+                   ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour,
+                   ftm->tm_min, ftm->tm_sec);
+    author = getcaller ();
+
+    if (do_killnew)
+    {
+       if (fprintf (fprcs, "\012%s\012", dead_revision) < 0 ||
+       fprintf (fprcs, "date     %s;  author %s;  state %s;\012",
+                altdate1, author, RCSDEAD) < 0)
+       goto write_error;
+
+       if (fprintf (fprcs, "branches;\012") < 0)
+           goto write_error;
+       if (fprintf (fprcs, "next    %s;\012", add_vhead) < 0)
+           goto write_error;
+
+       if (fprintf (fprcs, "commitid        %s;\012", global_session_id) < 0)
+           goto write_error;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       /* Store initial permissions if necessary. */
+       if (config->preserve_perms)
+       {
+           if (preserve_initial_permissions (fprcs, userfile,
+                                             file_type, sbp))
+               goto write_error;
+       }
+#endif
+    }
+
+    if (add_vhead != NULL)
+    {
+       if (fprintf (fprcs, "\012%s\012", add_vhead) < 0 ||
+       fprintf (fprcs, "date     %s;  author %s;  state Exp;\012",
+                altdate1, author) < 0)
+       goto write_error;
+
+       if (fprintf (fprcs, "branches") < 0)
+           goto write_error;
+       if (add_vbranch != NULL)
+       {
+           if (fprintf (fprcs, " %s.1", add_vbranch) < 0)
+               goto write_error;
+       }
+       if (fprintf (fprcs, ";\012") < 0)
+           goto write_error;
+
+       if (fprintf (fprcs, "next     ;\012") < 0)
+           goto write_error;
+
+       if (fprintf (fprcs, "commitid        %s;\012", global_session_id) < 0)
+           goto write_error;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       /* Store initial permissions if necessary. */
+       if (config->preserve_perms)
+       {
+           if (preserve_initial_permissions (fprcs, userfile,
+                                             file_type, sbp))
+               goto write_error;
+       }
+#endif
+
+       if (add_vbranch != NULL)
+       {
+           if (fprintf (fprcs, "\012%s.1\012", add_vbranch) < 0 ||
+               fprintf (fprcs, "date     %s;  author %s;  state Exp;\012",
+                        altdate1, author) < 0 ||
+               fprintf (fprcs, "branches ;\012") < 0 ||
+               fprintf (fprcs, "next     ;\012") < 0 ||
+               fprintf (fprcs, "commitid        %s;\012", global_session_id) < 
0)
+               goto write_error;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+           /* Store initial permissions if necessary. */
+           if (config->preserve_perms)
+           {
+               if (preserve_initial_permissions (fprcs, userfile,
+                                                 file_type, sbp))
+                   goto write_error;
+           }
+#endif
+
+           if (fprintf (fprcs, "\012") < 0)
+               goto write_error;
+       }
+    }
+
+    /* Now write the description (possibly empty).  */
+    if (fprintf (fprcs, "\012desc\012") < 0 ||
+       fprintf (fprcs, "@") < 0)
+       goto write_error;
+    if (desctext != NULL)
+    {
+       /* The use of off_t not size_t for the second argument is very
+          strange, since we are dealing with something which definitely
+          fits in memory.  */
+       if (expand_at_signs (desctext, (off_t) desclen, fprcs) < 0)
+           goto write_error;
+    }
+    if (fprintf (fprcs, "@\012\012\012") < 0)
+       goto write_error;
+
+    /* Now write the log messages and contents for the revision(s) (that
+       is, "deltatext" rather than "delta" from rcsfile(5)).  */
+
+    if (do_killnew)
+    {
+       if (fprintf (fprcs, "\012%s\012", dead_revision) < 0 ||
+           fprintf (fprcs, "log\012@") < 0)
+           goto write_error;
+       if (fprintf (fprcs, "Revision %s was added on the vendor branch.\012",
+                    add_vhead) < 0)
+           goto write_error;
+       if (fprintf (fprcs, "@\012") < 0 ||
+           fprintf (fprcs, "text\012@") < 0)
+       {
+           goto write_error;
+       }
+
+       /* Now copy over the contents of the file, expanding at signs.  */
+       if (expand_and_copy_contents (fprcs, file_type, user, fpuser))
+           goto write_error;
+
+       if (fprintf (fprcs, "@\012\012") < 0)
+           goto write_error;
+    }
+
+    if (add_vhead != NULL)
+    {
+       if (fprintf (fprcs, "\012%s\012", add_vhead) < 0 ||
+           fprintf (fprcs, "log\012@") < 0)
+           goto write_error;
+       if (add_vbranch != NULL)
+       {
+           /* We are going to put the log message in the revision on the
+              branch.  So putting it here too seems kind of redundant, I
+              guess (and that is what CVS has always done, anyway).  */
+           if (fprintf (fprcs, "Initial revision\012") < 0)
+               goto write_error;
+       }
+       else
+       {
+           if (expand_at_signs (message, (off_t) strlen (message), fprcs) < 0)
+               goto write_error;
+       }
+       if (fprintf (fprcs, "@\012") < 0 ||
+           fprintf (fprcs, "text\012@") < 0)
+       {
+           goto write_error;
+       }
+
+       /* Now copy over the contents of the file, expanding at signs.
+        * If config->preserve_perms is set, do this only for regular files.
+        */
+       if (!do_killnew)
+       {
+            /* Now copy over the contents of the file, expanding at signs,
+              if not done as part of do_killnew handling above.  */
+           if (expand_and_copy_contents (fprcs, file_type, user, fpuser))
+               goto write_error;
+       }
+
+       if (fprintf (fprcs, "@\012\012") < 0)
+           goto write_error;
+
+       if (add_vbranch != NULL)
+       {
+           if (fprintf (fprcs, "\012%s.1\012", add_vbranch) < 0 ||
+               fprintf (fprcs, "log\012@") < 0 ||
+               expand_at_signs (message,
+                                (off_t) strlen (message), fprcs) < 0 ||
+               fprintf (fprcs, "@\012text\012") < 0 ||
+               fprintf (fprcs, "@@\012") < 0)
+               goto write_error;
+       }
+    }
+
+    if (fclose (fprcs) == EOF)
+    {
+       ierrno = errno;
+       goto write_error_noclose;
+    }
+    /* Close fpuser only if we opened it to begin with. */
+    if (fpuser != NULL)
+    {
+       if (fclose (fpuser) < 0)
+           error (0, errno, "cannot close %s", user);
+    }
+
+    /*
+     * Fix the modes on the RCS files.  The user modes of the original
+     * user file are propagated to the group and other modes as allowed
+     * by the repository umask, except that all write permissions are
+     * turned off.
+     */
+    mode = (sb.st_mode |
+           (sb.st_mode & S_IRWXU) >> 3 |
+           (sb.st_mode & S_IRWXU) >> 6) &
+          ~cvsumask &
+          ~(S_IWRITE | S_IWGRP | S_IWOTH);
+    if (chmod (rcs, mode) < 0)
+    {
+       ierrno = errno;
+       if (add_logfp != NULL)
+           fperrmsg (add_logfp, 0, ierrno,
+                     "WARNING: cannot change mode of file %s", rcs);
+       error (0, ierrno, "WARNING: cannot change mode of file %s", rcs);
+       err++;
+    }
+    if (tocvsPath)
+       if (unlink_file_dir (tocvsPath) < 0)
+               error (0, errno, "cannot remove %s", tocvsPath);
+    if (free_opt != NULL)
+       free (free_opt);
+    return err;
+
+write_error:
+    ierrno = errno;
+    if (fclose (fprcs) < 0)
+       error (0, errno, "cannot close %s", rcs);
+write_error_noclose:
+    if (fclose (fpuser) < 0)
+       error (0, errno, "cannot close %s", user);
+    if (add_logfp != NULL)
+       fperrmsg (add_logfp, 0, ierrno, "ERROR: cannot write file %s", rcs);
+    error (0, ierrno, "ERROR: cannot write file %s", rcs);
+    if (ierrno == ENOSPC)
+    {
+       if (CVS_UNLINK (rcs) < 0)
+           error (0, errno, "cannot remove %s", rcs);
+       if (add_logfp != NULL)
+           fperrmsg (add_logfp, 0, 0, "ERROR: out of space - aborting");
+       error (1, 0, "ERROR: out of space - aborting");
+    }
+read_error:
+    if (tocvsPath)
+       if (unlink_file_dir (tocvsPath) < 0)
+           error (0, errno, "cannot remove %s", tocvsPath);
+
+    if (free_opt != NULL)
+       free (free_opt);
+
+    return err + 1;
+}
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+/* Write file permissions and symlink information for a file being
+ * added into its RCS file.
+ *
+ * INPUTS
+ *   fprcs     FILE pointer for the (newly-created) RCS file.  Permisisons
+ *             and symlink information should be written here.
+ *   userfile  Filename of the file being added.  (Used to read symbolic
+ *             link contents, for symlinks.)
+ *   file_type File type of userfile, extracted from sbp->st_mode.
+ *   sbp       'stat' information for userfile.
+ *
+ * RETURNS
+ *   Return value is 0 for success, or nonzero for failure (in which case
+ *   no error message has yet been printed).
+ */
+static int
+preserve_initial_permissions (fprcs, userfile, file_type, sbp)
+    FILE *fprcs;
+    const char *userfile;
+    mode_t file_type;
+    struct stat *sbp;
+{
+    if (file_type == S_IFLNK)
+    {
+       char *link = Xreadlink (userfile, sbp->st_size);
+       if (fprintf (fprcs, "symlink\t@") < 0 ||
+           expand_at_signs (link, strlen (link), fprcs) < 0 ||
+           fprintf (fprcs, "@;\012") < 0)
+           goto write_error;
+       free (link);
+    }
+    else
+    {
+       if (fprintf (fprcs, "owner\t%u;\012", sbp->st_uid) < 0)
+           goto write_error;
+       if (fprintf (fprcs, "group\t%u;\012", sbp->st_gid) < 0)
+           goto write_error;
+       if (fprintf (fprcs, "permissions\t%o;\012",
+                    sbp->st_mode & 07777) < 0)
+           goto write_error;
+       switch (file_type)
+       {
+           case S_IFREG: break;
+           case S_IFCHR:
+           case S_IFBLK:
+#ifdef HAVE_STRUCT_STAT_ST_RDEV
+               if (fprintf (fprcs, "special\t%s %lu;\012",
+                            (file_type == S_IFCHR
+                             ? "character"
+                             : "block"),
+                            (unsigned long) sbp->st_rdev) < 0)
+                   goto write_error;
+#else
+               error (0, 0,
+"can't import %s: unable to import device files on this system",
+userfile);
+#endif
+               break;
+           default:
+               error (0, 0,
+                      "can't import %s: unknown kind of special file",
+                      userfile);
+       }
+    }
+    return 0;
+
+write_error:
+    return 1;
+}
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+
+/* Copy file contents into an RCS file, expanding at signs.
+ *
+ * If config->preserve_perms is set, nothing is copied if the source is not
+ * a regular file.
+ *
+ * INPUTS
+ *   fprcs     FILE pointer for the (newly-created) RCS file.  The expanded
+ *             contents should be written here.
+ *   file_type File type of the data source.  No data is copied if
+ *             preserve_permissions is set and the source is not a
+ *             regular file.
+ *   user      Filename of the data source (used to print error messages).
+ *   fpuser    FILE pointer for the data source, whose data is being
+ *             copied into the RCS file.
+ *
+ * RETURNS
+ *   Return value is 0 for success, or nonzero for failure (in which case
+ *   no error message has yet been printed).
+ */
+static int
+expand_and_copy_contents (fprcs, file_type, user, fpuser)
+    FILE *fprcs, *fpuser;
+    mode_t file_type;
+    const char *user;
+{
+    if (
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       !config->preserve_perms ||
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+       file_type == S_IFREG)
+    {
+       char buf[8192];
+       unsigned int len;
+
+       while (1)
+       {
+           len = fread (buf, 1, sizeof buf, fpuser);
+           if (len == 0)
+           {
+               if (ferror (fpuser))
+                   error (1, errno, "cannot read file %s for copying",
+                          user);
+               break;
+           }
+           if (expand_at_signs (buf, len, fprcs) < 0)
+               goto write_error;
+       }
+    }
+    return 0;
+
+write_error:
+    return 1;
+}
+
+/*
+ * Write SIZE bytes at BUF to FP, expanding @ signs into double @
+ * signs.  If an error occurs, return a negative value and set errno
+ * to indicate the error.  If not, return a nonnegative value.
+ */
+int
+expand_at_signs (const char *buf, size_t size, FILE *fp)
+{
+    register const char *cp, *next;
+
+    cp = buf;
+    while ((next = memchr (cp, '@', size)) != NULL)
+    {
+       size_t len = ++next - cp;
+       if (fwrite (cp, 1, len, fp) != len)
+           return EOF;
+       if (putc ('@', fp) == EOF)
+           return EOF;
+       cp = next;
+       size -= len;
+    }
+
+    if (fwrite (cp, 1, size, fp) != size)
+       return EOF;
+
+    return 1;
+}
+
+/*
+ * Write an update message to (potentially) the screen and the log file.
+ */
+static void
+add_log (int ch, char *fname)
+{
+    if (!really_quiet)                 /* write to terminal */
+    {
+       char buf[2];
+       buf[0] = ch;
+       buf[1] = ' ';
+       cvs_output (buf, 2);
+       if (repos_len)
+       {
+           cvs_output (repository + repos_len + 1, 0);
+           cvs_output ("/", 1);
+       }
+       else if (repository[0] != '\0')
+       {
+           cvs_output (repository, 0);
+           cvs_output ("/", 1);
+       }
+       cvs_output (fname, 0);
+       cvs_output ("\n", 1);
+    }
+
+    if (repos_len)                     /* write to logfile */
+       (void) fprintf (logfp, "%c %s/%s\n", ch,
+                       repository + repos_len + 1, fname);
+    else if (repository[0])
+       (void) fprintf (logfp, "%c %s/%s\n", ch, repository, fname);
+    else
+       (void) fprintf (logfp, "%c %s\n", ch, fname);
+}
+
+/*
+ * This is the recursive function that walks the argument directory looking
+ * for sub-directories that have CVS administration files in them and updates
+ * them recursively.
+ * 
+ * Note that we do not follow symbolic links here, which is a feature!
+ */
+static int
+import_descend_dir (char *message, char *dir, char *vtag, int targc,
+                   char **targv)
+{
+    struct saved_cwd cwd;
+    char *cp;
+    int ierrno, err;
+    char *rcs = NULL;
+
+    if (islink (dir))
+       return 0;
+    if (save_cwd (&cwd))
+    {
+       fperrmsg (logfp, 0, errno, "Failed to save current directory.");
+       return 1;
+    }
+
+    /* Concatenate DIR to the end of REPOSITORY.  */
+    if (repository[0] == '\0')
+    {
+       char *new = xstrdup (dir);
+       free (repository);
+       repository = new;
+    }
+    else
+    {
+       char *new = Xasprintf ("%s/%s", repository, dir);
+       free (repository);
+       repository = new;
+    }
+
+    if (!quiet && !current_parsed_root->isremote)
+       error (0, 0, "Importing %s", repository);
+
+    if (CVS_CHDIR (dir) < 0)
+    {
+       ierrno = errno;
+       fperrmsg (logfp, 0, ierrno, "ERROR: cannot chdir to %s", repository);
+       error (0, ierrno, "ERROR: cannot chdir to %s", repository);
+       err = 1;
+       goto out;
+    }
+    if (!current_parsed_root->isremote && !isdir (repository))
+    {
+       rcs = Xasprintf ("%s%s", repository, RCSEXT);
+       if (isfile (repository) || isfile (rcs))
+       {
+           fperrmsg (logfp, 0, 0,
+                     "ERROR: %s is a file, should be a directory!",
+                     repository);
+           error (0, 0, "ERROR: %s is a file, should be a directory!",
+                  repository);
+           err = 1;
+           goto out;
+       }
+       if (noexec == 0 && CVS_MKDIR (repository, 0777) < 0)
+       {
+           ierrno = errno;
+           fperrmsg (logfp, 0, ierrno,
+                     "ERROR: cannot mkdir %s -- not added", repository);
+           error (0, ierrno,
+                  "ERROR: cannot mkdir %s -- not added", repository);
+           err = 1;
+           goto out;
+       }
+    }
+    err = import_descend (message, vtag, targc, targv);
+  out:
+    if (rcs != NULL)
+       free (rcs);
+    if ((cp = strrchr (repository, '/')) != NULL)
+       *cp = '\0';
+    else
+       repository[0] = '\0';
+    if (restore_cwd (&cwd))
+       error (1, errno, "Failed to restore current directory, `%s'.",
+              cwd.name);
+    free_cwd (&cwd);
+    return err;
+}
Index: ccvs/src/main.c
diff -u /dev/null ccvs/src/main.c:1.262.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/main.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1532 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ *
+ * You may distribute under the terms of the GNU General Public License
+ * as specified in the README file that comes with the CVS source distribution.
+ *
+ * This is the main C driver for the CVS system.
+ *
+ * Credit to Dick Grune, Vrije Universiteit, Amsterdam, for writing
+ * the shell-script CVS system that this is based on.
+ *
+ */
+
+#include "cvs.h"
+
+#include "closeout.h"
+#include "setenv.h"
+#include "strftime.h"
+#include "xgethostname.h"
+
+#include "sign.h"
+
+
+
+const char *program_name;
+const char *program_path;
+const char *cvs_cmd_name;
+
+const char *global_session_id; /* Random session ID */
+
+char *hostname;
+/* FIXME: Perhaps this should be renamed original_hostname or the like?  */
+char *server_hostname;
+
+int use_editor = 1;
+int use_cvsrc = 1;
+int cvswrite = !CVSREAD_DFLT;
+int really_quiet = 0;
+int quiet = 0;
+int trace = 0;
+int noexec = 0;
+int readonlyfs = 0;
+int logoff = 0;
+bool suppress_bases = false;
+
+
+
+/***
+ ***
+ ***   CVSROOT/config options
+ ***
+ ***/
+struct config *config;
+
+
+
+mode_t cvsumask = UMASK_DFLT;
+
+char *CurDir;
+
+/*
+ * Defaults, for the environment variables that are not set
+ */
+char *Editor = EDITOR_DFLT;
+
+
+
+/* Temp dir stuff.  */
+
+/* Temp dir, if set by the user.  */
+static char *tmpdir_cmdline;
+
+
+
+/* Returns in order of precedence:
+ *
+ *     1.  Temp dir as set via the command line.
+ *     2.  Temp dir as set in CVSROOT/config.
+ *     3.  Temp dir as set in $TMPDIR env var.
+ *     4.  Contents of TMPDIR_DFLT preprocessor macro.
+ *
+ * ERRORS
+ *  It is a fatal error if this function would otherwise return NULL or an
+ *  empty string.
+ */
+const char *
+get_cvs_tmp_dir (void)
+{
+    const char *retval;
+    if (tmpdir_cmdline) retval = tmpdir_cmdline;
+    else if (config && config->TmpDir) retval = config->TmpDir;
+    else retval = get_system_temp_dir ();
+    if (!retval) retval = TMPDIR_DFLT;
+
+    if (!retval || !*retval) error (1, 0, "No temp dir specified.");
+
+    return retval;
+}
+
+
+
+/* When our working directory contains subdirectories with different
+   values in CVS/Root files, we maintain a list of them.  */
+List *root_directories = NULL;
+
+static const struct cmd
+{
+    const char *fullname;      /* Full name of the function (e.g. "commit") */
+
+    /* Synonyms for the command, nick1 and nick2.  We supply them
+       mostly for two reasons: (1) CVS has always supported them, and
+       we need to maintain compatibility, (2) if there is a need for a
+       version which is shorter than the fullname, for ease in typing.
+       Synonyms have the disadvantage that people will see "new" and
+       then have to think about it, or look it up, to realize that is
+       the operation they know as "add".  Also, this means that one
+       cannot create a command "cvs new" with a different meaning.  So
+       new synonyms are probably best used sparingly, and where used
+       should be abbreviations of the fullname (preferably consisting
+       of the first 2 or 3 or so letters).
+
+       One thing that some systems do is to recognize any unique
+       abbreviation, for example "annotat" "annota", etc., for
+       "annotate".  The problem with this is that scripts and user
+       habits will expect a certain abbreviation to be unique, and in
+       a future release of CVS it may not be.  So it is better to
+       accept only an explicit list of abbreviations and plan on
+       supporting them in the future as well as now.  */
+
+    const char *nick1;
+    const char *nick2;
+    
+    int (*func) (int, char **);        /* Function takes (argc, argv) 
arguments. */
+    unsigned long attr;                /* Attributes. */
+} cmds[] =
+
+{
+    { "add",      "ad",       "new",       add,       
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "admin",    "adm",      "rcs",       admin,     
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "annotate", "ann",      NULL,        annotate,  CVS_CMD_USES_WORK_DIR },
+    { "checkout", "co",       "get",       checkout,  0 },
+    { "commit",   "ci",       "com",       commit,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "diff",     "di",       "dif",       diff,      CVS_CMD_USES_WORK_DIR },
+    { "edit",     NULL,       NULL,        edit,      
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "editors",  NULL,       NULL,        editors,   CVS_CMD_USES_WORK_DIR },
+    { "export",   "exp",      "ex",        checkout,  CVS_CMD_USES_WORK_DIR },
+    { "history",  "hi",       "his",       history,   CVS_CMD_USES_WORK_DIR },
+    { "import",   "im",       "imp",       import,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR | CVS_CMD_IGNORE_ADMROOT},
+    { "init",     NULL,       NULL,        init,      
CVS_CMD_MODIFIES_REPOSITORY },
+#if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT)
+    { "kserver",  NULL,       NULL,        server,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
+#endif
+    { "log",      "lo",       NULL,        cvslog,    CVS_CMD_USES_WORK_DIR },
+#ifdef AUTH_CLIENT_SUPPORT
+    { "login",    "logon",    "lgn",       login,     0 },
+    { "logout",   NULL,       NULL,        logout,    0 },
+#endif /* AUTH_CLIENT_SUPPORT */
+    { "ls",       "dir",      "list",      ls,        0 },
+#if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && 
defined(SERVER_SUPPORT)
+    { "pserver",  NULL,       NULL,        server,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
+#endif
+    { "rannotate","rann",     "ra",        annotate,  0 },
+    { "rdiff",    "patch",    "pa",        patch,     0 },
+    { "release",  "re",       "rel",       release,   
CVS_CMD_MODIFIES_REPOSITORY },
+    { "remove",   "rm",       "delete",    cvsremove, 
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "rlog",     "rl",       NULL,        cvslog,    0 },
+    { "rls",      "rdir",     "rlist",     ls,        0 },
+    { "rtag",     "rt",       "rfreeze",   cvstag,    
CVS_CMD_MODIFIES_REPOSITORY },
+#ifdef SERVER_SUPPORT
+    { "server",   NULL,       NULL,        server,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+#endif
+    { "status",   "st",       "stat",      cvsstatus, CVS_CMD_USES_WORK_DIR },
+    { "tag",      "ta",       "freeze",    cvstag,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "unedit",   NULL,       NULL,        unedit,    
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "update",   "up",       "upd",       update,    CVS_CMD_USES_WORK_DIR },
+    { "version",  "ve",       "ver",       version,   0 },
+    { "watch",    NULL,       NULL,        watch,     
CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+    { "watchers", NULL,       NULL,        watchers,  CVS_CMD_USES_WORK_DIR },
+    { NULL, NULL, NULL, NULL, 0 },
+};
+
+static const char *const usg[] =
+{
+    /* CVS usage messages never have followed the GNU convention of
+       putting metavariables in uppercase.  I don't know whether that
+       is a good convention or not, but if it changes it would have to
+       change in all the usage messages.  For now, they consistently
+       use lowercase, as far as I know.  Punctuation is pretty funky,
+       though.  Sometimes they use none, as here.  Sometimes they use
+       single quotes (not the TeX-ish `' stuff), as in --help-options.
+       Sometimes they use double quotes, as in cvs -H add.
+
+       Most (not all) of the usage messages seem to have periods at
+       the end of each line.  I haven't tried to duplicate this style
+       in --help as it is a rather different format from the rest.  */
+
+    "Usage: %s [cvs-options] command [command-options-and-arguments]\n",
+    "  where cvs-options are -q, -n, etc.\n",
+    "    (specify --help-options for a list of options)\n",
+    "  where command is add, admin, etc.\n",
+    "    (specify --help-commands for a list of commands\n",
+    "     or --help-synonyms for a list of command synonyms)\n",
+    "  where command-options-and-arguments depend on the specific command\n",
+    "    (specify -H followed by a command name for command-specific help)\n",
+    "  Specify --help to receive this message\n",
+    "\n",
+
+    /* Some people think that a bug-reporting address should go here.  IMHO,
+       the web sites are better because anything else is very likely to go
+       obsolete in the years between a release and when someone might be
+       reading this help.  Besides, we could never adequately discuss
+       bug reporting in a concise enough way to put in a help message.  */
+
+    /* I was going to put this at the top, but usage() wants the %s to
+       be in the first line.  */
+    "The Concurrent Versions System (CVS) is a tool for version control.\n",
+    /* I really don't think I want to try to define "version control"
+       in one line.  I'm not sure one can get more concise than the
+       paragraph in ../cvs.spec without assuming the reader knows what
+       version control means.  */
+
+    "For CVS updates and additional information, see\n",
+    "    the CVS home page at http://www.nongnu.org/cvs/ or\n",
+    "    the CVSNT home page at http://www.cvsnt.org/\n";,
+    NULL,
+};
+
+static const char *const cmd_usage[] =
+{
+    "CVS commands are:\n",
+    "        add          Add a new file/directory to the repository\n",
+    "        admin        Administration front end for rcs\n",
+    "        annotate     Show last revision where each line was modified\n",
+    "        checkout     Checkout sources for editing\n",
+    "        commit       Check files into the repository\n",
+    "        diff         Show differences between revisions\n",
+    "        edit         Get ready to edit a watched file\n",
+    "        editors      See who is editing a watched file\n",
+    "        export       Export sources from CVS, similar to checkout\n",
+    "        history      Show repository access history\n",
+    "        import       Import sources into CVS, using vendor branches\n",
+    "        init         Create a CVS repository if it doesn't exist\n",
+#if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT)
+    "        kserver      Kerberos server mode\n",
+#endif
+    "        log          Print out history information for files\n",
+#ifdef AUTH_CLIENT_SUPPORT
+    "        login        Prompt for password for authenticating server\n",
+    "        logout       Removes entry in .cvspass for remote repository\n",
+#endif /* AUTH_CLIENT_SUPPORT */
+    "        ls           List files available from CVS\n",
+#if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && 
defined(SERVER_SUPPORT)
+    "        pserver      Password server mode\n",
+#endif
+    "        rannotate    Show last revision where each line of module was 
modified\n",
+    "        rdiff        Create 'patch' format diffs between releases\n",
+    "        release      Indicate that a Module is no longer in use\n",
+    "        remove       Remove an entry from the repository\n",
+    "        rlog         Print out history information for a module\n",
+    "        rls          List files in a module\n",
+    "        rtag         Add a symbolic tag to a module\n",
+#ifdef SERVER_SUPPORT
+    "        server       Server mode\n",
+#endif
+    "        status       Display status information on checked out files\n",
+    "        tag          Add a symbolic tag to checked out version of 
files\n",
+    "        unedit       Undo an edit command\n",
+    "        update       Bring work tree in sync with repository\n",
+    "        version      Show current CVS version(s)\n",
+    "        watch        Set watches\n",
+    "        watchers     See who is watching a file\n",
+    "(Specify the --help option for a list of other help options)\n",
+    NULL,
+};
+
+static const char *const opt_usage[] =
+{
+    /* Omit -b because it is just for compatibility.  */
+    "CVS global options (specified before the command name) are:\n",
+    "    -H           Displays usage information for command.\n",
+    "    -Q           Cause CVS to be really quiet.\n",
+    "    -q           Cause CVS to be somewhat quiet.\n",
+    "    -r           Make checked-out files read-only.\n",
+    "    -w           Make checked-out files read-write (default).\n",
+    "    -n           Do not execute anything that will change the disk.\n",
+    "    -t           Show trace of program execution (repeat for more\n",
+    "                 verbosity) -- try with -n.\n",
+    "    -R           Assume repository is read-only, such as CDROM\n",
+    "    -v           CVS version and copyright.\n",
+    "    -T tmpdir    Use 'tmpdir' for temporary files.\n",
+    "    -e editor    Use 'editor' for editing log information.\n",
+    "    -d CVS_root  Overrides $CVSROOT as the root of the CVS tree.\n",
+    "    -f           Do not use the ~/.cvsrc file.\n",
+#ifdef CLIENT_SUPPORT
+    "    -B           Suppress use of base files.\n",
+    "    -z #         Request compression level '#' for net traffic.\n",
+#ifdef ENCRYPTION
+    "    -x           Encrypt all net traffic.\n",
+#endif
+    "    -a           Authenticate all net traffic.\n",
+#endif
+    "    -s VAR=VAL   Set CVS user variable.\n",
+    "\n",
+    "    -g           Force OpenPGP commit signatures (default 
autonegotiates).\n",
+    "    --sign[=(on | off | auto)] | --no-sign\n",
+    "                 Force (or forbid) OpenPGP commit signatures\n",
+    "                 (default autonegotiates).\n",
+    "    -G TEMPLATE\n",
+    "    --sign-template TEMPLATE\n",
+    "                 Use TEMPLATE to generate OpenPGP signatures.\n",
+    "    --sign-arg ARG\n",
+    "                 Pass ARG to OpenPGP TEMPLATE when sigining.\n",
+    "    --textmode ARG\n",
+    "                 Pass ARG to OpenPGP TEMPLATE when verifying or\n",
+    "                 generating signatures.\n",
+    "(Specify the --help option for a list of other help options)\n",
+    NULL
+};
+
+
+static int
+set_root_directory (Node *p, void *ignored)
+{
+    if (current_parsed_root == NULL && p->data != NULL)
+    {
+       current_parsed_root = p->data;
+       original_parsed_root = current_parsed_root;
+       return 1;
+    }
+    return 0;
+}
+
+
+static const char * const*
+cmd_synonyms (void)
+{
+    char ** synonyms;
+    char ** line;
+    const struct cmd *c = &cmds[0];
+    /* Three more for title, "specify --help" line, and NULL.  */
+    int numcmds = 3;
+
+    while (c->fullname != NULL)
+    {
+       numcmds++;
+       c++;
+    }
+    
+    synonyms = xnmalloc (numcmds, sizeof(char *));
+    line = synonyms;
+    *line++ = "CVS command synonyms are:\n";
+    for (c = &cmds[0]; c->fullname != NULL; c++)
+    {
+       if (c->nick1 || c->nick2)
+       {
+           *line = Xasprintf ("        %-12s %s %s\n", c->fullname,
+                              c->nick1 ? c->nick1 : "",
+                              c->nick2 ? c->nick2 : "");
+           line++;
+       }
+    }
+    *line++ = "(Specify the --help option for a list of other help options)\n";
+    *line = NULL;
+    
+    return (const char * const*) synonyms; /* will never be freed */
+}
+
+
+
+unsigned long int
+lookup_command_attribute (const char *cmd_name)
+{
+    const struct cmd *cm;
+
+    for (cm = cmds; cm->fullname; cm++)
+    {
+       if (strcmp (cmd_name, cm->fullname) == 0)
+           break;
+    }
+    if (!cm->fullname)
+       error (1, 0, "unknown command: %s", cmd_name);
+    return cm->attr;
+}
+
+
+
+/*
+ * Exit with an error code and an informative message about the signal
+ * received.  This function, by virtue of causing an actual call to exit(),
+ * causes all the atexit() handlers to be called.
+ *
+ * INPUTS
+ *   sig       The signal recieved.
+ *
+ * ERRORS
+ *   The cleanup routines registered via atexit() and the error function
+ *   itself can potentially change the exit status.  They shouldn't do this
+ *   unless they encounter problems doing their own jobs.
+ *
+ * RETURNS
+ *   Nothing.  This function will always exit.  It should exit with an exit
+ *   status of 1, but might not, as noted in the ERRORS section above.
+ */
+#ifndef DONT_USE_SIGNALS
+static RETSIGTYPE main_cleanup (int) __attribute__ ((__noreturn__));
+#endif /* DONT_USE_SIGNALS */
+static RETSIGTYPE
+main_cleanup (int sig)
+{
+#ifndef DONT_USE_SIGNALS
+    const char *name;
+    char temp[10];
+
+    switch (sig)
+    {
+#ifdef SIGABRT
+    case SIGABRT:
+       name = "abort";
+       break;
+#endif
+#ifdef SIGHUP
+    case SIGHUP:
+       name = "hangup";
+       break;
+#endif
+#ifdef SIGINT
+    case SIGINT:
+       name = "interrupt";
+       break;
+#endif
+#ifdef SIGQUIT
+    case SIGQUIT:
+       name = "quit";
+       break;
+#endif
+#ifdef SIGPIPE
+    case SIGPIPE:
+       name = "broken pipe";
+       break;
+#endif
+#ifdef SIGTERM
+    case SIGTERM:
+       name = "termination";
+       break;
+#endif
+    default:
+       /* This case should never be reached, because we list above all
+          the signals for which we actually establish a signal handler.  */
+       sprintf (temp, "%d", sig);
+       name = temp;
+       break;
+    }
+
+    /* This always exits, which will cause our exit handlers to be called.  */
+    error (1, 0, "received %s signal", name);
+    /* but make the exit explicit to silence warnings when gcc processes the
+     * noreturn attribute.
+     */
+    exit (EXIT_FAILURE);
+#endif /* !DONT_USE_SIGNALS */
+}
+
+
+
+/* From server.c.
+ *
+ * When !defined ALLOW_CONFIG_OVERRIDE, this will never have any value but
+ * NULL.
+ */
+extern char *gConfigPath;
+
+
+
+
+enum {RANDOM_BYTES = 8};
+enum {COMMITID_RAW_SIZE = (sizeof(time_t) + RANDOM_BYTES)};
+
+static char const alphabet[62] =
+  "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+/* Divide BUF by D, returning the remainder.  Replace BUF by the
+   quotient.  BUF[0] is the most significant part of BUF.
+   D must not exceed UINT_MAX >> CHAR_BIT.  */
+static unsigned int
+divide_by (unsigned char buf[COMMITID_RAW_SIZE], unsigned int d)
+{
+    unsigned int carry = 0;
+    int i;
+    for (i = 0; i < COMMITID_RAW_SIZE; i++)
+    {
+       unsigned int byte = buf[i];
+       unsigned int dividend = (carry << CHAR_BIT) + byte;
+       buf[i] = dividend / d;
+       carry = dividend % d;
+    }
+    return carry;
+}
+
+static void
+convert (char const input[COMMITID_RAW_SIZE], char *output)
+{
+    static char const zero[COMMITID_RAW_SIZE] = { 0, };
+    unsigned char buf[COMMITID_RAW_SIZE];
+    size_t o = 0;
+    memcpy (buf, input, COMMITID_RAW_SIZE);
+    while (memcmp (buf, zero, COMMITID_RAW_SIZE) != 0)
+       output[o++] = alphabet[divide_by (buf, sizeof alphabet)];
+    if (! o)
+       output[o++] = '0';
+    output[o] = '\0';
+}
+
+
+int
+main (int argc, char **argv)
+{
+    cvsroot_t *CVSroot_parsed = NULL;
+    bool cvsroot_update_env = true;
+    char *cp, *end;
+    const struct cmd *cm;
+    int c, err = 0;
+    int free_Editor = 0;
+
+    int help = 0;              /* Has the user asked for help?  This
+                                  lets us support the `cvs -H cmd'
+                                  convention to give help for cmd. */
+    static const char short_options[] = "+QBqrwtnRvb:T:e:d:Hfz:s:xag::G:";
+    static struct option long_options[] =
+    {
+        {"help", 0, NULL, 'H'},
+        {"version", 0, NULL, 'v'},
+       {"help-commands", 0, NULL, 1},
+       {"help-synonyms", 0, NULL, 2},
+       {"help-options", 0, NULL, 4},
+       {"sign", optional_argument, NULL, 'g'},
+       {"no-sign", 0, NULL, 5},
+       {"sign-template", required_argument, NULL, 'G'},
+       {"sign-arg", required_argument, NULL, '6'},
+       {"sign-textmode", required_argument, NULL, 7},
+#ifdef SERVER_SUPPORT
+       {"allow-root", required_argument, NULL, 3},
+#endif /* SERVER_SUPPORT */
+        {0, 0, 0, 0}
+    };
+    /* `getopt_long' stores the option index here, but right now we
+        don't use it. */
+    int option_index = 0;
+
+#ifdef SYSTEM_INITIALIZE
+    /* Hook for OS-specific behavior, for example socket subsystems on
+       NT and OS2 or dealing with windows and arguments on Mac.  */
+    SYSTEM_INITIALIZE (&argc, &argv);
+#endif
+
+#ifdef SYSTEM_CLEANUP
+       /* Hook for OS-specific behavior, for example socket subsystems on
+          NT and OS2 or dealing with windows and arguments on Mac.  */
+       cleanup_register (SYSTEM_CLEANUP);
+#endif
+
+#ifdef HAVE_TZSET
+    /* On systems that have tzset (which is almost all the ones I know
+       of), it's a good idea to call it.  */
+    tzset ();
+#endif
+
+    /*
+     * Initialize globals.
+     */
+    /* Just save the last component of the path for error messages.  */
+    program_path = xstrdup (argv[0]);
+#ifdef ARGV0_NOT_PROGRAM_NAME
+    /* On some systems, e.g. VMS, argv[0] is not the name of the command
+       which the user types to invoke the program.  */
+    program_name = "cvs";
+#else
+    program_name = last_component (argv[0]);
+#endif
+
+
+    /*
+     * Query the environment variables up-front, so that
+     * they can be overridden by command line arguments
+     */
+    if ((cp = getenv (EDITOR1_ENV)) != NULL)
+       Editor = cp;
+    else if ((cp = getenv (EDITOR2_ENV)) != NULL)
+       Editor = cp;
+    else if ((cp = getenv (EDITOR3_ENV)) != NULL)
+       Editor = cp;
+    if (getenv (CVSREAD_ENV) != NULL)
+       cvswrite = 0;
+    if (getenv (CVSREADONLYFS_ENV) != NULL) {
+       readonlyfs = 1;
+       logoff = 1;
+    }
+
+    /* Set this to 0 to force getopt initialization.  getopt() sets
+       this to 1 internally.  */
+    optind = 0;
+
+    /* We have to parse the options twice because else there is no
+       chance to avoid reading the global options from ".cvsrc".  Set
+       opterr to 0 for avoiding error messages about invalid options.
+       */
+    opterr = 0;
+
+    while ((c = getopt_long
+            (argc, argv, short_options, long_options, &option_index))
+           != EOF)
+    {
+       if (c == 'f')
+           use_cvsrc = 0;
+    }
+
+#ifdef SERVER_SUPPORT
+    /* Don't try and read a .cvsrc file if we are a server.  */
+    if (optind < argc
+       && (false
+# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
+           || !strcmp (argv[optind], "pserver")
+# endif
+# ifdef HAVE_KERBEROS
+           || !strcmp (argv[optind], "kserver")
+# endif /* HAVE_KERBEROS */
+           || !strcmp (argv[optind], "server")))
+       {
+           /* Avoid any .cvsrc file.  */
+           use_cvsrc = 0;
+           /* Pre-parse the server options to get the config path.  */
+           cvs_cmd_name = argv[optind];
+           parseServerOptions (argc - optind, argv + optind);
+       }
+#endif /* SERVER_SUPPORT */
+
+    /*
+     * Scan cvsrc file for global options.
+     */
+    if (use_cvsrc)
+       read_cvsrc (&argc, &argv, "cvs");
+
+    optind = 0;
+    opterr = 1;
+
+    while ((c = getopt_long
+            (argc, argv, short_options, long_options, &option_index))
+           != EOF)
+    {
+       switch (c)
+       {
+            case 1:
+               /* --help-commands */
+                usage (cmd_usage);
+                break;
+            case 2:
+               /* --help-synonyms */
+                usage (cmd_synonyms());
+                break;
+           case 4:
+               /* --help-options */
+               usage (opt_usage);
+               break;
+           case 'g':
+               /* --sign */
+               if (optarg)
+               {
+                   if (!strcasecmp (optarg, "auto")
+                       || !strcasecmp (optarg, "server"))
+                       set_sign_commits (SIGN_DEFAULT);
+                   else if (!strcasecmp (optarg, "on"))
+                       set_sign_commits (SIGN_ALWAYS);
+                   else if (!strcasecmp (optarg, "off"))
+                       set_sign_commits (SIGN_NEVER);
+                   else
+                       error (1, 0, "Unrecognized argument to sign (`%s')",
+                              optarg);
+               }
+               else
+                   set_sign_commits (SIGN_ALWAYS);
+               break;
+           case 5:
+               /* --no-sign */
+               set_sign_commits (SIGN_NEVER);
+               break;
+           case 'G':
+               /* --sign-template */
+               set_sign_template (optarg);
+               break;
+           case 6:
+               /* --sign-arg */
+               add_sign_arg (optarg);
+               break;
+           case 7:
+               /* --sign-textmode */
+               set_sign_textmode (optarg);
+               break;
+#ifdef SERVER_SUPPORT
+           case 3:
+               /* --allow-root */
+               root_allow_add (optarg, gConfigPath);
+               break;
+#endif /* SERVER_SUPPORT */
+           case 'Q':
+               really_quiet = 1;
+               /* FALL THROUGH */
+           case 'q':
+               quiet = 1;
+               break;
+           case 'r':
+               cvswrite = 0;
+               break;
+           case 'w':
+               cvswrite = 1;
+               break;
+           case 't':
+               trace++;
+               break;
+           case 'R':
+               readonlyfs = -1;
+               logoff = 1;
+               break;
+           case 'n':
+               noexec = 1;
+               logoff = 1;
+               break;
+           case 'v':
+               (void) fputs ("\n", stdout);
+               version (0, NULL);    
+               (void) fputs ("\n", stdout);
+               (void) fputs ("\
+Copyright (C) 2005 Free Software Foundation, Inc.\n\
+\n\
+Senior active maintainers include Larry Jones, Derek R. Price,\n\
+and Mark D. Baushke.  Please see the AUTHORS and README files from the CVS\n\
+distribution kit for a complete list of contributors and copyrights.\n",
+                             stdout);
+               (void) fputs ("\n", stdout);
+               (void) fputs ("CVS may be copied only under the terms of the 
GNU General Public License,\n", stdout);
+               (void) fputs ("a copy of which can be found with the CVS 
distribution kit.\n", stdout);
+               (void) fputs ("\n", stdout);
+
+               (void) fputs ("Specify the --help option for further 
information about CVS\n", stdout);
+
+               exit (0);
+               break;
+           case 'b':
+               /* This option used to specify the directory for RCS
+                  executables.  But since we don't run them any more,
+                  this is a noop.  Silently ignore it so that .cvsrc
+                  and scripts and inetd.conf and such can work with
+                  either new or old CVS.  */
+               break;
+           case 'T':
+               if (tmpdir_cmdline) free (tmpdir_cmdline);
+               tmpdir_cmdline = xstrdup (optarg);
+               break;
+           case 'e':
+               if (free_Editor) free (Editor);
+               Editor = xstrdup (optarg);
+               free_Editor = 1;
+               break;
+           case 'd':
+               if (CVSroot_cmdline != NULL)
+                   free (CVSroot_cmdline);
+               CVSroot_cmdline = xstrdup (optarg);
+               break;
+           case 'H':
+               help = 1;
+               break;
+            case 'f':
+               use_cvsrc = 0; /* unnecessary, since we've done it above */
+               break;
+           case 'z':
+#ifdef CLIENT_SUPPORT
+               gzip_level = strtol (optarg, &end, 10);
+               if (*end != '\0' || gzip_level < 0 || gzip_level > 9)
+                 error (1, 0,
+                        "gzip compression level must be between 0 and 9");
+#endif /* CLIENT_SUPPORT */
+               /* If no CLIENT_SUPPORT, we just silently ignore the gzip
+                * level, so that users can have it in their .cvsrc and not
+                * cause any trouble.
+                *
+                * We still parse the argument to -z for correctness since
+                * one user complained of being bitten by a run of
+                * `cvs -z -n up' which read -n as the argument to -z without
+                * complaining.  */
+               break;
+           case 'B':
+               suppress_bases = true;
+               break;
+           case 's':
+               variable_set (optarg);
+               break;
+           case 'x':
+#ifdef CLIENT_SUPPORT
+               cvsencrypt = 1;
+#endif /* CLIENT_SUPPORT */
+               /* If no CLIENT_SUPPORT, ignore -x, so that users can
+                   have it in their .cvsrc and not cause any trouble.
+                   If no ENCRYPTION, we still accept -x, but issue an
+                   error if we are being run as a client.  */
+               break;
+           case 'a':
+#ifdef CLIENT_SUPPORT
+               cvsauthenticate = 1;
+#endif
+               /* If no CLIENT_SUPPORT, ignore -a, so that users can
+                   have it in their .cvsrc and not cause any trouble.
+                   We will issue an error later if stream
+                   authentication is not supported.  */
+               break;
+           case '?':
+           default:
+                usage (usg);
+       }
+    }
+
+    argc -= optind;
+    argv += optind;
+    if (argc < 1)
+       usage (usg);
+
+    if (readonlyfs && !really_quiet) {
+       error (0, 0,
+              "WARNING: Read-only repository access mode selected via `cvs 
-R'.\n\
+Using this option to access a repository which some users write to may\n\
+cause intermittent sandbox corruption.");
+    }
+
+    /* Calculate the cvs global session ID */
+
+    {
+       char buf[COMMITID_RAW_SIZE] = { 0, };
+       char out[COMMITID_RAW_SIZE * 2];
+       ssize_t len = 0;
+       time_t rightnow = time (NULL);
+       char *startrand = buf + sizeof (time_t);
+       unsigned char *p = (unsigned char *) startrand;
+       size_t randbytes = RANDOM_BYTES;
+       int flags = O_RDONLY;
+       int fd;
+#ifdef O_NOCTTY
+       flags |= O_NOCTTY;
+#endif
+       if (rightnow != (time_t)-1)
+               while (rightnow > 0) {
+                   *--p = rightnow % (UCHAR_MAX + 1);
+                   rightnow /= UCHAR_MAX + 1;
+               }
+       else {
+           /* try to use more random data */
+           randbytes = COMMITID_RAW_SIZE;
+           startrand = buf;
+       }
+       fd = open ("/dev/urandom", flags);
+       if (fd >= 0) {
+           len = read (fd, startrand, randbytes);
+           close (fd);
+       }
+       if (len <= 0) {
+           /* no random data was available so use pid */
+           long int pid = (long int)getpid ();
+           p = (unsigned char *) (startrand + sizeof (pid));
+           while (pid > 0) {
+               *--p = pid % (UCHAR_MAX + 1);
+               pid /= UCHAR_MAX + 1;
+           }
+       }
+       convert(buf, out);
+       global_session_id = strdup (out);
+    }
+
+
+    TRACE (TRACE_FUNCTION, "main: Session ID is %s", global_session_id);
+
+    /* Look up the command name. */
+
+    cvs_cmd_name = argv[0];
+    for (cm = cmds; cm->fullname; cm++)
+    {
+       if (cm->nick1 && !strcmp (cvs_cmd_name, cm->nick1))
+           break;
+       if (cm->nick2 && !strcmp (cvs_cmd_name, cm->nick2))
+           break;
+       if (!strcmp (cvs_cmd_name, cm->fullname))
+           break;
+    }
+
+    if (!cm->fullname)
+    {
+       fprintf (stderr, "Unknown command: `%s'\n\n", cvs_cmd_name);
+       usage (cmd_usage);
+    }
+    else
+       cvs_cmd_name = cm->fullname;    /* Global pointer for later use */
+
+    if (help)
+    {
+       argc = -1;              /* some functions only check for this */
+       err = (*(cm->func)) (argc, argv);
+    }
+    else
+    {
+       /* The user didn't ask for help, so go ahead and authenticate,
+           set up CVSROOT, and the rest of it. */
+
+       short int lock_cleanup_setup = 0;
+
+       /* The UMASK environment variable isn't handled with the
+          others above, since we don't want to signal errors if the
+          user has asked for help.  This won't work if somebody adds
+          a command-line flag to set the umask, since we'll have to
+          parse it before we get here. */
+
+       if ((cp = getenv (CVSUMASK_ENV)) != NULL)
+       {
+           /* FIXME: Should be accepting symbolic as well as numeric mask.  */
+           cvsumask = strtol (cp, &end, 8) & 0777;
+           if (*end != '\0')
+               error (1, errno, "invalid umask value in %s (%s)",
+                      CVSUMASK_ENV, cp);
+       }
+
+       if (getenv (CVSNOBASES_ENV))
+           suppress_bases = true;
+
+       /* HOSTNAME & SERVER_HOSTNAME need to be set before they are
+        * potentially used in gserver_authenticate_connection() (called from
+        * pserver_authenticate_connection, below).
+        */
+       hostname = xgethostname ();
+       if (!hostname)
+       {
+            error (0, errno,
+                   "xgethostname () returned NULL, using \"localhost\"");
+            hostname = xstrdup ("localhost");
+       }
+
+       /* Keep track of this separately since the client can change
+        * HOSTNAME on the server.
+        */
+       server_hostname = xstrdup (hostname);
+
+#ifdef SERVER_SUPPORT
+
+# ifdef HAVE_KERBEROS
+       /* If we are invoked with a single argument "kserver", then we are
+          running as Kerberos server as root.  Do the authentication as
+          the very first thing, to minimize the amount of time we are
+          running as root.  */
+       if (strcmp (cvs_cmd_name, "kserver") == 0)
+       {
+           kserver_authenticate_connection ();
+
+           /* Pretend we were invoked as a plain server.  */
+           cvs_cmd_name = "server";
+       }
+# endif /* HAVE_KERBEROS */
+
+# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
+       if (strcmp (cvs_cmd_name, "pserver") == 0)
+       {
+           /* The reason that --allow-root is not a command option
+              is mainly that it seems easier to make it a global option.  */
+
+           /* Gets username and password from client, authenticates, then
+              switches to run as that user and sends an ACK back to the
+              client. */
+           pserver_authenticate_connection ();
+      
+           /* Pretend we were invoked as a plain server.  */
+           cvs_cmd_name = "server";
+       }
+# endif /* AUTH_SERVER_SUPPORT || HAVE_GSSAPI */
+#endif /* SERVER_SUPPORT */
+
+       server_active = strcmp (cvs_cmd_name, "server") == 0;
+
+#ifdef SERVER_SUPPORT
+       if (server_active)
+       {
+           /* This is only used for writing into the history file.  For
+              remote connections, it might be nice to have hostname
+              and/or remote path, on the other hand I'm not sure whether
+              it is worth the trouble.  */
+           CurDir = xstrdup ("<remote>");
+           cleanup_register (server_cleanup);
+       }
+       else
+#endif
+       {
+           cleanup_register (close_stdout);
+           CurDir = xgetcwd ();
+            if (CurDir == NULL)
+               error (1, errno, "cannot get working directory");
+       }
+
+       {
+           char *val;
+           /* XXX pid < 10^32 */
+           val = Xasprintf ("%ld", (long) getpid ());
+           setenv (CVS_PID_ENV, val, 1);
+           free (val);
+       }
+
+       /* make sure we clean up on error */
+       signals_register (main_cleanup);
+
+#ifdef KLUDGE_FOR_WNT_TESTSUITE
+       /* Probably the need for this will go away at some point once
+          we call fflush enough places (e.g. fflush (stdout) in
+          cvs_outerr).  */
+       (void) setvbuf (stdout, NULL, _IONBF, 0);
+       (void) setvbuf (stderr, NULL, _IONBF, 0);
+#endif /* KLUDGE_FOR_WNT_TESTSUITE */
+
+       if (use_cvsrc)
+           read_cvsrc (&argc, &argv, cvs_cmd_name);
+
+       /* Fiddling with CVSROOT doesn't make sense if we're running
+        * in server mode, since the client will send the repository
+        * directory after the connection is made.
+        */
+       if (!server_active)
+       {
+           /* First check if a root was set via the command line.  */
+           if (CVSroot_cmdline)
+           {
+                if (!(CVSroot_parsed = parse_cvsroot (CVSroot_cmdline)))
+                    error (1, 0, "Bad CVSROOT: `%s'.", CVSroot_cmdline);
+           }
+
+           /* See if we are able to find a 'better' value for CVSroot
+            * in the CVSADM_ROOT directory.
+            *
+            * "cvs import" shouldn't check CVS/Root; in general it
+            * ignores CVS directories and CVS/Root is likely to
+            * specify a different repository than the one we are
+            * importing to, but if this is not import and no root was
+            * specified on the command line, set the root from the
+            * CVS/Root file.
+            */
+           if (!CVSroot_parsed
+               && !(cm->attr & CVS_CMD_IGNORE_ADMROOT)
+              )
+               CVSroot_parsed = Name_Root (NULL, NULL);
+
+           /* Now, if there is no root on the command line and we didn't find
+            * one in a file, set it via the $CVSROOT env var.
+            */
+           if (!CVSroot_parsed)
+           {
+               char *tmp = getenv (CVSROOT_ENV);
+               if (tmp)
+               {
+                   if (!(CVSroot_parsed = parse_cvsroot (tmp)))
+                       error (1, 0, "Bad CVSROOT: `%s'.", tmp);
+                   cvsroot_update_env = false;
+               }
+           }
+
+#ifdef CVSROOT_DFLT
+           if (!CVSroot_parsed)
+           {
+               if (!(CVSroot_parsed = parse_cvsroot (CVSROOT_DFLT)))
+                   error (1, 0, "Bad CVSROOT: `%s'.", CVSROOT_DFLT);
+           }
+#endif /* CVSROOT_DFLT */
+
+           /* Now we've reconciled CVSROOT from the command line, the
+              CVS/Root file, and the environment variable.  Do the
+              last sanity checks on the variable. */
+           if (!CVSroot_parsed)
+           {
+               error (0, 0,
+                      "No CVSROOT specified!  Please use the `-d' option");
+               error (1, 0,
+                      "or set the %s environment variable.", CVSROOT_ENV);
+           }
+       }
+
+       /* Here begins the big loop over unique cvsroot values.  We
+           need to call do_recursion once for each unique value found
+           in CVS/Root.  Prime the list with the current value. */
+
+       /* Create the list. */
+       assert (root_directories == NULL);
+       root_directories = getlist ();
+
+       /* Prime it. */
+       if (CVSroot_parsed)
+       {
+           Node *n;
+           n = getnode ();
+           n->type = NT_UNKNOWN;
+           n->key = xstrdup (CVSroot_parsed->original);
+           n->data = CVSroot_parsed;
+
+           if (addnode (root_directories, n))
+               error (1, 0, "cannot add initial CVSROOT %s", n->key);
+       }
+
+       assert (current_parsed_root == NULL);
+
+       /* If we're running the server, we want to execute this main
+          loop once and only once (we won't be serving multiple roots
+          from this connection, so there's no need to do it more than
+          once).  To get out of the loop, we perform a "break" at the
+          end of things.  */
+
+       while (server_active ||
+              walklist (root_directories, set_root_directory, NULL))
+       {
+           /* Fiddling with CVSROOT doesn't make sense if we're running
+              in server mode, since the client will send the repository
+              directory after the connection is made. */
+
+           if (!server_active)
+           {
+               /* Now we're 100% sure that we have a valid CVSROOT
+                  variable.  Parse it to see if we're supposed to do
+                  remote accesses or use a special access method. */
+
+               TRACE (TRACE_FUNCTION,
+                      "main loop with CVSROOT=%s",
+                      current_parsed_root ? current_parsed_root->directory
+                                          : "(null)");
+
+               /*
+                * Check to see if the repository exists.
+                */
+               if (!current_parsed_root->isremote)
+               {
+                   char *path;
+                   int save_errno;
+
+                   path = Xasprintf ("%s/%s", current_parsed_root->directory,
+                                     CVSROOTADM);
+                   if (!isaccessible (path, R_OK | X_OK))
+                   {
+                       save_errno = errno;
+                       /* If this is "cvs init", the root need not exist yet.
+                        */
+                       if (strcmp (cvs_cmd_name, "init"))
+                           error (1, save_errno, "%s", path);
+                   }
+                   free (path);
+               }
+
+               /* Update the CVSROOT environment variable.  */
+               if (cvsroot_update_env)
+                   setenv (CVSROOT_ENV, current_parsed_root->original, 1);
+           }
+       
+           /* Parse the CVSROOT/config file, but only for local.  For the
+              server, we parse it after we know $CVSROOT.  For the
+              client, it doesn't get parsed at all, obviously.  The
+              presence of the parse_config call here is not meant to
+              predetermine whether CVSROOT/config overrides things from
+              read_cvsrc and other such places or vice versa.  That sort
+              of thing probably needs more thought.  */
+           if (!server_active && !current_parsed_root->isremote)
+           {
+               /* If there was an error parsing the config file, parse_config
+                  already printed an error.  We keep going.  Why?  Because
+                  if we didn't, then there would be no way to check in a new
+                  CVSROOT/config file to fix the broken one!  */
+               if (config) free_config (config);
+               config = parse_config (current_parsed_root->directory, NULL);
+
+               /* Can set TMPDIR in the environment if necessary now, since
+                * if it was set in config, we now know it.
+                */
+               push_env_temp_dir ();
+           }
+
+#ifdef CLIENT_SUPPORT
+           /* Need to check for current_parsed_root != NULL here since
+            * we could still be in server mode before the server function
+            * gets called below and sets the root
+            */
+           if (current_parsed_root != NULL && current_parsed_root->isremote)
+           {
+               /* Create a new list for directory names that we've
+                  sent to the server. */
+               if (dirs_sent_to_server != NULL)
+                   dellist (&dirs_sent_to_server);
+               dirs_sent_to_server = getlist ();
+           }
+#endif
+
+           if (
+#ifdef SERVER_SUPPORT
+               /* Don't worry about lock_cleanup_setup when the server is
+                * active since we can only go through this loop once in that
+                * case anyhow.
+                */
+               server_active ||
+#endif
+               (
+#ifdef CLIENT_SUPPORT
+                !current_parsed_root->isremote &&
+#endif
+                !lock_cleanup_setup))
+           {
+               /* Set up to clean up any locks we might create on exit.  */
+               cleanup_register (Lock_Cleanup);
+               lock_cleanup_setup = 1;
+           }
+
+           /* Call our worker function.  */
+           err = (*(cm->func)) (argc, argv);
+       
+           /* Mark this root directory as done.  When the server is
+               active, our list will be empty -- don't try and
+               remove it from the list. */
+
+           if (!server_active)
+           {
+               Node *n = findnode (root_directories,
+                                   original_parsed_root->original);
+               assert (n != NULL);
+               assert (n->data != NULL);
+               n->data = NULL;
+               current_parsed_root = NULL;
+           }
+
+           if (server_active)
+               break;
+       } /* end of loop for cvsroot values */
+
+       dellist (&root_directories);
+    } /* end of stuff that gets done if the user DOESN'T ask for help */
+
+    root_allow_free ();
+
+    /* This is exit rather than return because apparently that keeps
+       some tools which check for memory leaks happier.  */
+    exit (err ? EXIT_FAILURE : 0);
+       /* Keep picky/stupid compilers (e.g. Visual C++ 5.0) happy.  */
+       return 0;
+}
+
+
+
+char *
+Make_Date (const char *rawdate)
+{
+    struct timespec t;
+
+    if (!get_date (&t, rawdate, NULL))
+       error (1, 0, "Can't parse date/time: `%s'", rawdate);
+
+    /* Truncate nanoseconds.  */
+    return date_from_time_t (t.tv_sec);
+}
+
+
+
+/* Parse a string of the form TAG[:DATE], where TAG could be the empty string.
+ *
+ * INPUTS
+ *   input     The string to be parsed.
+ *
+ * OUTPUTS
+ *   tag       The tag found, if any.  If TAG is the empty string, then leave
+ *             this value unchanged.
+ *   date      The date found, if any.  If DATE is the empty string or is
+ *             missing, leave this value unchanged.
+ *
+ * NOTES
+ *   If either TAG or DATE is replaced for output, the previous value is freed.
+ *
+ * ERRORS
+ *   If either TAG or DATE cannot be parsed, then this function will exit with
+ *   a fatal error message.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+void
+parse_tagdate (char **tag, char **date, const char *input)
+{
+    char *p;
+
+    TRACE (TRACE_FUNCTION, "parse_tagdate (%s, %s, %s)",
+          *tag ? *tag : "(null)", *date ? *date : "(null)",
+          input);
+
+    if ((p = strchr (input, ':')))
+    {
+       /* Parse the tag.  */
+       if (p - input)
+       {
+           /* The tag has > 0 length.  */
+           if (*tag) free (*tag);
+           *tag = xmalloc (p - input + 1);
+           strncpy (*tag, input, p - input);
+           (*tag)[p - input] = '\0';
+       }
+
+       /* Parse the date.  */
+       if (*++p)
+       {
+           if (*date) free (*date);
+           *date = Make_Date (p);
+       }
+    }
+    else if (strlen (input))
+    {
+       /* The tag has > 0 length.  */
+       if (*tag) free (*tag);
+       *tag = xstrdup (input);
+    }
+
+    TRACE (TRACE_DATA, "parse_tagdate: got tag = `%s', date = `%s'",
+          *tag ? *tag : "(null)", *date ? *date : "(null)");
+}
+
+
+
+/* Convert a time_t to an RCS format date.  This is mainly for the
+   use of "cvs history", because the CVSROOT/history file contains
+   time_t format dates; most parts of CVS will want to avoid using
+   time_t's directly, and instead use RCS_datecmp, Make_Date, &c.
+   Assuming that the time_t is in GMT (as it generally should be),
+   then the result will be in GMT too.
+
+   Returns a newly malloc'd string.  */
+
+char *
+date_from_time_t (time_t unixtime)
+{
+    struct tm *ftm;
+    char date[MAXDATELEN];
+    char *ret;
+
+    ftm = gmtime (&unixtime);
+    if (ftm == NULL)
+       /* This is a system, like VMS, where the system clock is in local
+          time.  Hopefully using localtime here matches the "zero timezone"
+          hack I added to get_date (get_date of course being the relevant
+          issue for Make_Date, and for history.c too I think).  */
+       ftm = localtime (&unixtime);
+
+    (void) sprintf (date, DATEFORM,
+                   ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900),
+                   ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour,
+                   ftm->tm_min, ftm->tm_sec);
+    ret = xstrdup (date);
+    return ret;
+}
+
+
+
+/* Convert a date to RFC822/1123 format.  This is used in contexts like
+   dates to send in the protocol; it should not vary based on locale or
+   other such conventions for users.  We should have another routine which
+   does that kind of thing.
+
+   The SOURCE date is in our internal RCS format.  DEST should point to
+   storage managed by the caller, at least MAXDATELEN characters.  */
+void
+date_to_internet (char *dest, const char *source)
+{
+    struct tm date;
+
+    date_to_tm (&date, source);
+    tm_to_internet (dest, &date);
+}
+
+
+
+void
+date_to_tm (struct tm *dest, const char *source)
+{
+    if (sscanf (source, SDATEFORM,
+               &dest->tm_year, &dest->tm_mon, &dest->tm_mday,
+               &dest->tm_hour, &dest->tm_min, &dest->tm_sec)
+           != 6)
+       /* Is there a better way to handle errors here?  I made this
+          non-fatal in case we are called from the code which can't
+          deal with fatal errors.  */
+       error (0, 0, "internal error: bad date %s", source);
+
+    if (dest->tm_year > 100)
+       dest->tm_year -= 1900;
+
+    dest->tm_mon -= 1;
+}
+
+
+
+/* Convert a date to RFC822/1123 format.  This is used in contexts like
+   dates to send in the protocol; it should not vary based on locale or
+   other such conventions for users.  We should have another routine which
+   does that kind of thing.
+
+   The SOURCE date is a pointer to a struct tm.  DEST should point to
+   storage managed by the caller, at least MAXDATELEN characters.  */
+void
+tm_to_internet (char *dest, const struct tm *source)
+{
+    /* Just to reiterate, these strings are from RFC822 and do not vary
+       according to locale.  */
+    static const char *const month_names[] =
+      {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+    
+    sprintf (dest, "%d %s %d %02d:%02d:%02d -0000", source->tm_mday,
+            source->tm_mon < 0 || source->tm_mon > 11
+               ? "???" : month_names[source->tm_mon],
+            source->tm_year + 1900, source->tm_hour, source->tm_min,
+             source->tm_sec);
+}
+
+
+
+/*
+ * Format a date for the current locale.
+ *
+ * INPUT
+ *   UNIXTIME  The UNIX seconds since the epoch.
+ *
+ * RETURNS
+ *   If my_strftime() encounters an error, this function can return NULL.
+ *
+ *   Otherwise, returns a date string in ISO8601 format, e.g.:
+ *
+ *     2004-04-29 13:24:22 -0700
+ *
+ *   It is the responsibility of the caller to return of this string.
+ */
+static char *
+format_time_t (time_t unixtime)
+{
+    static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
+    /* Convert to a time in the local time zone.  */
+    struct tm ltm = *(localtime (&unixtime));
+
+    if (!my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", &ltm, 0, 0))
+       return NULL;
+
+    return xstrdup (buf);
+}
+
+
+
+/* Like format_time_t(), but return time in UTC.
+ */
+char *
+gmformat_time_t (time_t unixtime)
+{
+    static char buf[sizeof ("yyyy-mm-dd HH:MM:SS -HHMM")];
+    /* Convert to a time in the local time zone.  */
+    struct tm ltm = *(gmtime (&unixtime));
+
+    if (!my_strftime (buf, sizeof (buf), "%Y-%m-%d %H:%M:%S %z", &ltm, 0, 0))
+       return NULL;
+
+    return xstrdup (buf);
+}
+
+
+
+/* Format a date in the local timezone using format_time_t() given a date from
+ * an arbitrary timezone in a string.
+ *
+ * INPUT
+ *   DATESTR   A string that looks like anything get_date() can parse, e.g.:
+ *
+ *                      2004-04-29 20:24:22
+ *
+ * ERRORS
+ *   As get_date() & format_time_t().  Prints a warning if either provide
+ *   error return values.  See RETURNS.
+ *
+ * RETURNS
+ *   A freshly allocated string that is a copy of the input string if either
+ *   get_date() or format_time_t() encounter an error and as format_time_t()
+ *   otherwise.
+ */
+char *
+format_date_alloc (char *datestr)
+{
+    struct timespec t;
+    char *buf;
+
+    TRACE (TRACE_FUNCTION, "format_date (%s)", datestr);
+
+    /* Convert the date string to seconds since the epoch. */
+    if (!get_date (&t, datestr, NULL))
+    {
+       error (0, 0, "Can't parse date/time: `%s'.", datestr);
+       goto as_is;
+    }
+
+    /* Get the time into a string, truncating any nanoseconds returned by
+     * getdate.
+     */
+    if ((buf = format_time_t (t.tv_sec)) == NULL)
+    {
+       error (0, 0, "Unable to reformat date `%s'.", datestr);
+       goto as_is;
+    }
+
+    return buf;
+
+ as_is:
+    return xstrdup (datestr);
+}
+
+
+
+void
+usage (register const char *const *cpp)
+{
+    (void) fprintf (stderr, *cpp++, program_name, cvs_cmd_name);
+    for (; *cpp; cpp++)
+       (void) fprintf (stderr, *cpp);
+    exit (EXIT_FAILURE);
+}
+
+/* vim:tabstop=8:shiftwidth=4
+ */
Index: ccvs/src/rcs.c
diff -u /dev/null ccvs/src/rcs.c:1.356.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/rcs.c      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,8996 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * The routines contained in this file do all the rcs file parsing and
+ * manipulation
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "rcs.h"
+
+/* CVS headers.  */
+#include "cvs.h"
+#include "edit.h"
+#include "hardlink.h"
+#include "sign.h"
+
+/* GNULIB headers.  */
+#include "base64.h"
+
+/* These need to be source after cvs.h or HAVE_MMAP won't be set... */
+#ifdef HAVE_MMAP
+# include "getpagesize.h"
+# include <sys/mman.h>
+
+/* Define MAP_FILE when it isn't otherwise.  */
+# ifndef MAP_FILE
+#  define MAP_FILE 0
+# endif
+/* Define MAP_FAILED for old systems which neglect to.  */
+# ifndef MAP_FAILED
+#  define MAP_FAILED ((void *)-1)
+# endif
+#endif
+
+/* The RCS -k options, and a set of enums that must match the array.
+   These come first so that we can use enum kflag in function
+   prototypes.  */
+static const char *const kflags[] =
+  {"kv", "kvl", "k", "v", "o", "b", NULL};
+enum kflag { KFLAG_KV = 0, KFLAG_KVL, KFLAG_K, KFLAG_V, KFLAG_O, KFLAG_B };
+
+/* A structure we use to buffer the contents of an RCS file.  The
+   various fields are only referenced directly by the rcsbuf_*
+   functions.  We declare the struct here so that we can allocate it
+   on the stack, rather than in memory.  */
+
+struct rcsbuffer
+{
+    /* Points to the current position in the buffer.  */
+    char *ptr;
+    /* Points just after the last valid character in the buffer.  */
+    char *ptrend;
+    /* The file.  */
+    FILE *fp;
+    /* The name of the file, used for error messages.  */
+    const char *filename;
+    /* The starting file position of the data in the buffer.  */
+    unsigned long pos;
+    /* The length of the value.  */
+    size_t vlen;
+    /* Whether the value contains an '@' string.  If so, we can not
+       compress whitespace characters.  */
+    int at_string;
+    /* The number of embedded '@' characters in an '@' string.  If
+       this is non-zero, we must search the string for pairs of '@'
+       and convert them to a single '@'.  */
+    int embedded_at;
+};
+
+static RCSNode *RCS_parsercsfile_i (FILE * fp, const char *rcsfile);
+static char *RCS_getdatebranch (RCSNode * rcs, const char *date,
+                                const char *branch);
+static void rcsbuf_open (struct rcsbuffer *, FILE *fp,
+                         const char *filename, unsigned long pos);
+static void rcsbuf_close (struct rcsbuffer *);
+static int rcsbuf_getkey (struct rcsbuffer *, char **keyp, char **valp);
+static int rcsbuf_getrevnum (struct rcsbuffer *, char **revp);
+static char *rcsbuf_fill (struct rcsbuffer *, char *ptr, char **keyp,
+                          char **valp);
+static int rcsbuf_valcmp (struct rcsbuffer *);
+static char *rcsbuf_valcopy (struct rcsbuffer *, char *val, int polish,
+                             size_t *lenp);
+static void rcsbuf_valpolish (struct rcsbuffer *, char *val, int polish,
+                              size_t *lenp);
+static void rcsbuf_valpolish_internal (struct rcsbuffer *, char *to,
+                                       const char *from, size_t *lenp);
+static off_t rcsbuf_ftello (struct rcsbuffer *);
+static void rcsbuf_get_buffered (struct rcsbuffer *, char **datap,
+                                size_t *lenp);
+static void rcsbuf_cache (RCSNode *, struct rcsbuffer *);
+static void rcsbuf_cache_close (void);
+static void rcsbuf_cache_open (RCSNode *, off_t, FILE **, struct rcsbuffer *);
+static int checkmagic_proc (Node *p, void *closure);
+static void do_branches (List * list, char *val);
+static void do_symbols (List * list, char *val);
+static void do_locks (List * list, char *val);
+static void free_rcsnode_contents (RCSNode *);
+static void free_rcsvers_contents (RCSVers *);
+static void rcsvers_delproc (Node * p);
+static char *translate_symtag (RCSNode *, const char *);
+static char *RCS_addbranch (RCSNode *, const char *);
+static char *truncate_revnum_in_place (char *);
+static char *truncate_revnum (const char *);
+static char *printable_date (const char *);
+static char *escape_keyword_value (const char *, int *);
+static void expand_keywords (RCSNode *, RCSVers *, const char *,
+                             const char *, size_t, enum kflag, char *,
+                             size_t, char **, size_t *);
+static void cmp_file_buffer (void *, const char *, size_t);
+
+/* Routines for reading, parsing and writing RCS files. */
+static RCSVers *getdelta (struct rcsbuffer *, char *, char **, char **);
+static Deltatext *RCS_getdeltatext (RCSNode *, FILE *, struct rcsbuffer *);
+static void freedeltatext (Deltatext *);
+
+static void RCS_putadmin (RCSNode *, FILE *);
+static void RCS_putdtree (RCSNode *, char *, FILE *);
+static void RCS_putdesc (RCSNode *, FILE *);
+static void putdelta (RCSVers *, FILE *);
+static int putrcsfield_proc (Node *, void *);
+static int putsymbol_proc (Node *, void *);
+static void RCS_copydeltas (RCSNode *, FILE *, struct rcsbuffer *, FILE *,
+                           Deltatext *, char *);
+static int count_delta_actions (Node *, void *);
+static void putdeltatext (FILE *, Deltatext *);
+
+static FILE *rcs_internal_lockfile (char *);
+static void rcs_internal_unlockfile (FILE *, char *);
+static char *rcs_lockfilename (const char *);
+
+/* The RCS file reading functions are called a lot, and they do some
+   string comparisons.  This macro speeds things up a bit by skipping
+   the function call when the first characters are different.  It
+   evaluates its arguments multiple times.  */
+#define STREQ(a, b) (*(char *)(a) == *(char *)(b) && strcmp ((a), (b)) == 0)
+
+static char * getfullCVSname (char *, char **);
+
+/*
+ * We don't want to use isspace() from the C library because:
+ *
+ * 1. The definition of "whitespace" in RCS files includes ASCII
+ *    backspace, but the C locale doesn't.
+ * 2. isspace is an very expensive function call in some implementations
+ *    due to the addition of wide character support.
+ */
+static const char spacetab[] = {
+        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,        /* 0x00 - 0x0f 
*/
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */
+        1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 - 0x2f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 - 0x3f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 - 0x4f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 - 0x5f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 - 0x8f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 - 0x7f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 - 0x8f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 - 0x9f */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 - 0xaf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 - 0xbf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 - 0xcf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 - 0xdf */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 - 0xef */
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0  /* 0xf0 - 0xff */
+};
+
+#define whitespace(c)  (spacetab[(unsigned char)c] != 0)
+
+static char *rcs_lockfile = NULL;
+static int rcs_lockfd = -1;
+
+
+
+/*
+ * char *
+ * locate_rcs ( const char* file, const char *repository , int *inattic )
+ *
+ * Find an RCS file in the repository, case insensitively when the cased name
+ * doesn't exist, we are running as the server, and a client has asked us to
+ * ignore case.
+ *
+ * Most parts of CVS will want to rely instead on RCS_parse which calls this
+ * function and is called by recurse.c which then puts the result in useful
+ * places like the rcs field of struct file_info.
+ *
+ * INPUTS
+ *
+ *  repository         the repository (including the directory)
+ *  file               the filename within that directory (without RCSEXT).
+ *  inattic            NULL or a pointer to the output boolean
+ *
+ * OUTPUTS
+ *
+ *  inattic            If this input was non-null, the destination will be
+ *                     set to true if the file was found in the attic or
+ *                     false if not.  If no RCS file is found, this value
+ *                     is undefined.
+ *
+ * RETURNS
+ *
+ *  a newly-malloc'd array containing the absolute pathname of the RCS
+ *  file that was found or NULL when none was found.
+ *
+ * ERRORS
+ *
+ *  errno can be set by the return value of the final call to
+ *  locate_file_in_dir().  This should resolve to the system's existence error
+ *  value (sometime ENOENT) if the Attic directory did not exist and ENOENT if
+ *  the Attic was found but no matching files were found in the Attic or its
+ *  parent.
+ */
+static char *
+locate_rcs (const char *repository, const char *file, int *inattic)
+{
+    char *retval;
+
+    /* First, try to find the file as cased. */
+    retval = xmalloc (strlen (repository)
+                      + sizeof (CVSATTIC)
+                      + strlen (file)
+                      + sizeof (RCSEXT)
+                      + 3);
+    sprintf (retval, "%s/%s%s", repository, file, RCSEXT);
+    if (isreadable (retval))
+    {
+       if (inattic)
+           *inattic = 0;
+       return retval;
+    }
+    sprintf (retval, "%s/%s/%s%s", repository, CVSATTIC, file, RCSEXT);
+    if (isreadable (retval))
+    {
+       if (inattic)
+           *inattic = 1;
+       return retval;
+    }
+    free (retval);
+
+    return NULL;
+}
+
+
+
+/* A few generic thoughts on error handling, in particular the
+   printing of unexpected characters that we find in the RCS file
+   (that is, why we use '\x%x' rather than %c or some such).
+
+   * Avoiding %c means we don't have to worry about what is printable
+   and other such stuff.  In error handling, often better to keep it
+   simple.
+
+   * Hex rather than decimal or octal because character set standards
+   tend to use hex.
+
+   * Saying "character 0x%x" might make it sound like we are printing
+   a file offset.  So we use '\x%x'.
+
+   * Would be nice to print the offset within the file, but I can
+   imagine various portability hassles (in particular, whether
+   unsigned long is always big enough to hold file offsets).  */
+
+/* Parse an rcsfile given a user file name and a repository.  If there is
+   an error, we print an error message and return NULL.  If the file
+   does not exist, we return NULL without printing anything (I'm not
+   sure this allows the caller to do anything reasonable, but it is
+   the current behavior).  */
+RCSNode *
+RCS_parse (const char *file, const char *repos)
+{
+    RCSNode *rcs;
+    FILE *fp;
+    RCSNode *retval = NULL;
+    char *rcsfile;
+    int inattic;
+
+    /* We're creating a new RCSNode, so there is no hope of finding it
+       in the cache.  */
+    rcsbuf_cache_close ();
+
+    if (!(rcsfile = locate_rcs (repos, file, &inattic)))
+    {
+       /* Handle the error cases */
+    }
+    else if ((fp = CVS_FOPEN (rcsfile, FOPEN_BINARY_READ))) 
+    {
+       rcs = RCS_parsercsfile_i (fp, rcsfile);
+       if (rcs)
+       {       
+           rcs->flags |= VALID;
+           if (inattic)
+               rcs->flags |= INATTIC;
+       }
+
+       free (rcsfile);
+       retval = rcs;
+    }
+    else if (!existence_error (errno))
+    {
+       error (0, errno, "cannot open `%s'", rcsfile);
+       free (rcsfile);
+    }
+
+    return retval;
+}
+
+
+
+/*
+ * Parse a specific rcsfile.
+ */
+RCSNode *
+RCS_parsercsfile (const char *rcsfile)
+{
+    FILE *fp;
+    RCSNode *rcs;
+
+    /* We're creating a new RCSNode, so there is no hope of finding it
+       in the cache.  */
+    rcsbuf_cache_close ();
+
+    /* open the rcsfile */
+    if ((fp = CVS_FOPEN (rcsfile, FOPEN_BINARY_READ)) == NULL)
+    {
+       error (0, errno, "Couldn't open rcs file `%s'", rcsfile);
+       return NULL;
+    }
+
+    rcs = RCS_parsercsfile_i (fp, rcsfile);
+
+    return rcs;
+}
+
+
+
+/*
+ */ 
+static RCSNode *
+RCS_parsercsfile_i (FILE *fp, const char *rcsfile)
+{
+    RCSNode *rdata;
+    struct rcsbuffer rcsbuf;
+    char *key, *value;
+
+    /* make a node */
+    rdata = xmalloc (sizeof (RCSNode));
+    memset (rdata, 0, sizeof (RCSNode));
+    rdata->refcount = 1;
+    rdata->path = xstrdup (rcsfile);
+    rdata->print_path = xstrdup (primary_root_inverse_translate (rcsfile));
+
+    /* Process HEAD, BRANCH, and EXPAND keywords from the RCS header.
+
+       Most cvs operations on the main branch don't need any more
+       information.  Those that do call RCS_reparsercsfile to parse
+       the rest of the header and the deltas.  */
+
+    rcsbuf_open (&rcsbuf, fp, rcsfile, 0);
+
+    if (! rcsbuf_getkey (&rcsbuf, &key, &value))
+       goto l_error;
+    if (STREQ (key, RCSDESC))
+       goto l_error;
+
+    if (STREQ (RCSHEAD, key) && value != NULL)
+       rdata->head = rcsbuf_valcopy (&rcsbuf, value, 0, NULL);
+
+    if (! rcsbuf_getkey (&rcsbuf, &key, &value))
+       goto l_error;
+    if (STREQ (key, RCSDESC))
+       goto l_error;
+
+    if (STREQ (RCSBRANCH, key) && value != NULL)
+    {
+       char *cp;
+
+       rdata->branch = rcsbuf_valcopy (&rcsbuf, value, 0, NULL);
+       if ((numdots (rdata->branch) & 1) != 0)
+       {
+           /* turn it into a branch if it's a revision */
+           cp = strrchr (rdata->branch, '.');
+           *cp = '\0';
+       }
+    }
+
+    /* Look ahead for expand, stopping when we see desc or a revision
+       number.  */
+    while (1)
+    {
+       char *cp;
+
+       if (STREQ (RCSEXPAND, key))
+       {
+           rdata->expand = rcsbuf_valcopy (&rcsbuf, value, 0, NULL);
+           break;
+       }
+
+       for (cp = key;
+            (isdigit ((unsigned char)*cp) || *cp == '.') && *cp != '\0';
+            cp++)
+           /* do nothing */ ;
+       if (*cp == '\0')
+           break;
+
+       if (STREQ (RCSDESC, key))
+           break;
+
+       if (! rcsbuf_getkey (&rcsbuf, &key, &value))
+           break;
+    }
+
+    rdata->flags |= PARTIAL;
+
+    rcsbuf_cache (rdata, &rcsbuf);
+
+    return rdata;
+
+l_error:
+    error (0, 0, "`%s' does not appear to be a valid rcs file",
+          rcsfile);
+    rcsbuf_close (&rcsbuf);
+    freercsnode (&rdata);
+    fclose (fp);
+    return NULL;
+}
+
+
+
+/* Return a Node type for a newphrase buffer entry.  */
+static Ntype
+rcsbuf_get_node_type (struct rcsbuffer *rcsbuf)
+{
+    if (rcsbuf_valcmp (rcsbuf)) return RCSCMPFLD;
+    /* else */ if (rcsbuf->at_string) return RCSSTRING;
+    /* else */ return RCSFIELD;
+}
+
+
+
+/* Do the real work of parsing an RCS file.
+
+   On error, die with a fatal error; if it returns at all it was successful.
+
+   If PFP is NULL, close the file when done.  Otherwise, leave it open
+   and store the FILE * in *PFP.  */
+void
+RCS_reparsercsfile (RCSNode *rdata, FILE **pfp, struct rcsbuffer *rcsbufp)
+{
+    FILE *fp;
+    char *rcsfile;
+    struct rcsbuffer rcsbuf;
+    Node *q, *kv;
+    RCSVers *vnode;
+    int gotkey;
+    char *cp;
+    char *key, *value;
+
+    assert (rdata != NULL);
+    rcsfile = rdata->path;
+
+    rcsbuf_cache_open (rdata, 0, &fp, &rcsbuf);
+
+    /* make a node */
+    /* This probably shouldn't be done until later: if a file has an
+       empty revision tree (which is permissible), rdata->versions
+       should be NULL. -twp */
+    rdata->versions = getlist ();
+
+    /*
+     * process all the special header information, break out when we get to
+     * the first revision delta
+     */
+    gotkey = 0;
+    for (;;)
+    {
+       /* get the next key/value pair */
+       if (!gotkey)
+       {
+           if (! rcsbuf_getkey (&rcsbuf, &key, &value))
+           {
+               error (1, 0, "`%s' does not appear to be a valid rcs file",
+                      rcsfile);
+           }
+       }
+
+       gotkey = 0;
+
+       /* Skip head, branch and expand tags; we already have them. */
+       if (STREQ (key, RCSHEAD)
+           || STREQ (key, RCSBRANCH)
+           || STREQ (key, RCSEXPAND))
+       {
+           continue;
+       }
+
+       if (STREQ (key, "access"))
+       {
+           if (value != NULL)
+           {
+               /* We pass the POLISH parameter as 1 because
+                   RCS_addaccess expects nothing but spaces.  FIXME:
+                   It would be easy and more efficient to change
+                   RCS_addaccess.  */
+               if (rdata->access)
+               {
+                   error (0, 0,
+                          "Duplicate `access' keyword found in RCS file.");
+                   free (rdata->access);
+               }
+               rdata->access = rcsbuf_valcopy (&rcsbuf, value, 1, NULL);
+           }
+           continue;
+       }
+
+       /* We always save lock information, so that we can handle
+           -kkvl correctly when checking out a file. */
+       if (STREQ (key, "locks"))
+       {
+           if (value != NULL)
+           {
+               if (rdata->locks_data)
+               {
+                   error (0, 0,
+                          "Duplicate `locks' keyword found in RCS file.");
+                   free (rdata->locks_data);
+               }
+               rdata->locks_data = rcsbuf_valcopy (&rcsbuf, value, 0, NULL);
+           }
+           if (! rcsbuf_getkey (&rcsbuf, &key, &value))
+           {
+               error (1, 0, "premature end of file reading %s", rcsfile);
+           }
+           if (STREQ (key, "strict") && value == NULL)
+           {
+               rdata->strict_locks = 1;
+           }
+           else
+               gotkey = 1;
+           continue;
+       }
+
+       if (STREQ (RCSSYMBOLS, key))
+       {
+           if (value != NULL)
+           {
+               if (rdata->symbols_data)
+               {
+                   error (0, 0,
+                          "Duplicate `%s' keyword found in RCS file.",
+                          RCSSYMBOLS);
+                   free (rdata->symbols_data);
+               }
+               rdata->symbols_data = rcsbuf_valcopy (&rcsbuf, value, 0, NULL);
+           }
+           continue;
+       }
+
+       /*
+        * check key for '.''s and digits (probably a rev) if it is a
+        * revision or `desc', we are done with the headers and are down to the
+        * revision deltas, so we break out of the loop
+        */
+       for (cp = key;
+            (isdigit ((unsigned char) *cp) || *cp == '.') && *cp != '\0';
+            cp++)
+            /* do nothing */ ;
+       /* Note that when comparing with RCSDATE, we are not massaging
+           VALUE from the string found in the RCS file.  This is OK
+           since we know exactly what to expect.  */
+       if (*cp == '\0' && strncmp (RCSDATE, value, (sizeof RCSDATE) - 1) == 0)
+           break;
+
+       if (STREQ (key, RCSDESC))
+           break;
+
+       if (STREQ (key, "comment"))
+       {
+           if (rdata->comment)
+           {
+               error (0, 0,
+                      "warning: duplicate key `%s' in RCS file `%s'",
+                      key, rcsfile);
+               free (rdata->comment);
+           }
+           rdata->comment = rcsbuf_valcopy (&rcsbuf, value, 0, NULL);
+           continue;
+       }
+       if (rdata->other == NULL)
+           rdata->other = getlist ();
+       kv = getnode ();
+        kv->type = rcsbuf_get_node_type (&rcsbuf);
+       kv->key = xstrdup (key);
+       kv->data = rcsbuf_valcopy (&rcsbuf, value, kv->type != RCSCMPFLD,
+                                  &kv->len);
+       if (addnode (rdata->other, kv) != 0)
+       {
+           error (0, 0, "warning: duplicate key `%s' in RCS file `%s'",
+                  key, rcsfile);
+           freenode (kv);
+       }
+
+       /* if we haven't grabbed it yet, we didn't want it */
+    }
+
+    /* We got out of the loop, so we have the first part of the first
+       revision delta in KEY (the revision) and VALUE (the date key
+       and its value).  This is what getdelta expects to receive.  */
+
+    while ((vnode = getdelta (&rcsbuf, rcsfile, &key, &value)) != NULL)
+    {
+       /* get the node */
+       q = getnode ();
+       q->type = RCSVERS;
+       q->delproc = rcsvers_delproc;
+       q->data = vnode;
+       q->key = vnode->version;
+
+       /* add the nodes to the list */
+       if (addnode (rdata->versions, q) != 0)
+       {
+#if 0
+               purify_printf("WARNING: Adding duplicate version: %s (%s)\n",
+                        q->key, rcsfile);
+               freenode (q);
+#endif
+       }
+    }
+
+    /* Here KEY and VALUE are whatever caused getdelta to return NULL.  */
+
+    if (STREQ (key, RCSDESC))
+    {
+       if (rdata->desc != NULL)
+       {
+           error (0, 0,
+                  "warning: duplicate key `%s' in RCS file `%s'",
+                  key, rcsfile);
+           free (rdata->desc);
+       }
+       rdata->desc = rcsbuf_valcopy (&rcsbuf, value, 1, NULL);
+    }
+
+    rdata->delta_pos = rcsbuf_ftello (&rcsbuf);
+
+    if (pfp == NULL)
+       rcsbuf_cache (rdata, &rcsbuf);
+    else
+    {
+       *pfp = fp;
+       *rcsbufp = rcsbuf;
+    }
+    rdata->flags &= ~PARTIAL;
+}
+
+
+
+/* Move RCS into or out of the Attic, depending on TOATTIC.  If the
+   file is already in the desired place, return without doing
+   anything.  At some point may want to think about how this relates
+   to RCS_rewrite but that is a bit hairy (if one wants renames to be
+   atomic, or that kind of thing).  If there is an error, print a message
+   and return 1.  On success, return 0.  */
+int
+RCS_setattic (RCSNode *rcs, int toattic)
+{
+    char *newpath;
+    const char *p;
+    char *q;
+
+    /* Some systems aren't going to let us rename an open file.  */
+    rcsbuf_cache_close ();
+
+    /* Could make the pathname computations in this file, and probably
+       in other parts of rcs.c too, easier if the REPOS and FILE
+       arguments to RCS_parse got stashed in the RCSNode.  */
+
+    if (toattic)
+    {
+       mode_t omask;
+
+       if (rcs->flags & INATTIC)
+           return 0;
+
+       /* Example: rcs->path is "/foo/bar/baz,v".  */
+       newpath = xmalloc (strlen (rcs->path) + sizeof CVSATTIC + 5);
+       p = last_component (rcs->path);
+       strncpy (newpath, rcs->path, p - rcs->path);
+       strcpy (newpath + (p - rcs->path), CVSATTIC);
+
+       /* Create the Attic directory if it doesn't exist.  */
+       omask = umask (cvsumask);
+       if (CVS_MKDIR (newpath, 0777) < 0 && errno != EEXIST)
+           error (0, errno, "cannot make directory %s", newpath);
+       (void) umask (omask);
+
+       strcat (newpath, "/");
+       strcat (newpath, p);
+
+       if (CVS_RENAME (rcs->path, newpath) < 0)
+       {
+           int save_errno = errno;
+
+           /* The checks for isreadable look awfully fishy, but
+              I'm going to leave them here for now until I
+              can think harder about whether they take care of
+              some cases which should be handled somehow.  */
+
+           if (isreadable (rcs->path) || !isreadable (newpath))
+           {
+               error (0, save_errno, "cannot rename %s to %s",
+                      rcs->path, newpath);
+               free (newpath);
+               return 1;
+           }
+       }
+    }
+    else
+    {
+       if (!(rcs->flags & INATTIC))
+           return 0;
+
+       newpath = xmalloc (strlen (rcs->path));
+
+       /* Example: rcs->path is "/foo/bar/Attic/baz,v".  */
+       p = last_component (rcs->path);
+       strncpy (newpath, rcs->path, p - rcs->path - 1);
+       newpath[p - rcs->path - 1] = '\0';
+       q = newpath + (p - rcs->path - 1) - (sizeof CVSATTIC - 1);
+       assert (strncmp (q, CVSATTIC, sizeof CVSATTIC - 1) == 0);
+       strcpy (q, p);
+
+       if (CVS_RENAME (rcs->path, newpath) < 0)
+       {
+           error (0, errno, "failed to move `%s' out of the attic",
+                  rcs->path);
+           free (newpath);
+           return 1;
+       }
+    }
+
+    free (rcs->path);
+    rcs->path = newpath;
+
+    return 0;
+}
+
+
+
+/*
+ * Fully parse the RCS file.  Store all keyword/value pairs, fetch the
+ * log messages for each revision, and fetch add and delete counts for
+ * each revision (we could fetch the entire text for each revision,
+ * but the only caller, log_fileproc, doesn't need that information,
+ * so we don't waste the memory required to store it).  The add and
+ * delete counts are stored on the OTHER field of the RCSVERSNODE
+ * structure, under the names ";add" and ";delete", so that we don't
+ * waste the memory space of extra fields in RCSVERSNODE for code
+ * which doesn't need this information.
+ */
+void
+RCS_fully_parse (RCSNode *rcs)
+{
+    FILE *fp;
+    struct rcsbuffer rcsbuf;
+
+    RCS_reparsercsfile (rcs, &fp, &rcsbuf);
+
+    while (1)
+    {
+       char *key, *value;
+       Node *vers;
+       RCSVers *vnode;
+
+       /* Rather than try to keep track of how much information we
+           have read, just read to the end of the file.  */
+       if (!rcsbuf_getrevnum (&rcsbuf, &key))
+           break;
+
+       vers = findnode (rcs->versions, key);
+       if (vers == NULL)
+           error (1, 0,
+                  "mismatch in rcs file %s between deltas and deltatexts (%s)",
+                  rcs->print_path, key);
+
+       vnode = vers->data;
+
+       while (rcsbuf_getkey (&rcsbuf, &key, &value))
+       {
+           if (!STREQ (key, "text"))
+           {
+               Node *kv;
+
+               if (vnode->other == NULL)
+                   vnode->other = getlist ();
+               kv = getnode ();
+               kv->type = rcsbuf_get_node_type (&rcsbuf);
+               kv->key = xstrdup (key);
+               kv->data = rcsbuf_valcopy (&rcsbuf, value,
+                                          kv->type != RCSCMPFLD, NULL);
+               if (addnode (vnode->other, kv) != 0)
+               {
+                   error (0, 0,
+                          "\
+warning: duplicate key `%s' in version `%s' of RCS file `%s'",
+                          key, vnode->version, rcs->print_path);
+                   freenode (kv);
+               }
+
+               continue;
+           }
+
+           if (!STREQ (vnode->version, rcs->head))
+           {
+               unsigned long add, del;
+               char buf[50];
+               Node *kv;
+
+               /* This is a change text.  Store the add and delete
+                   counts.  */
+               add = 0;
+               del = 0;
+               if (value != NULL)
+               {
+                   size_t vallen;
+                   const char *cp;
+
+                   rcsbuf_valpolish (&rcsbuf, value, 0, &vallen);
+                   cp = value;
+                   while (cp < value + vallen)
+                   {
+                       char op;
+                       unsigned long count;
+
+                       op = *cp++;
+                       if (op != 'a' && op  != 'd')
+                           error (1, 0, "\
+unrecognized operation '\\x%x' in %s",
+                                  op, rcs->print_path);
+                       (void) strtoul (cp, (char **) &cp, 10);
+                       if (*cp++ != ' ')
+                           error (1, 0, "space expected in %s revision %s",
+                                  rcs->print_path, vnode->version);
+                       count = strtoul (cp, (char **) &cp, 10);
+                       if (*cp++ != '\012')
+                           error (1, 0, "linefeed expected in %s revision %s",
+                                  rcs->print_path, vnode->version);
+
+                       if (op == 'd')
+                           del += count;
+                       else
+                       {
+                           add += count;
+                           while (count != 0)
+                           {
+                               if (*cp == '\012')
+                                   --count;
+                               else if (cp == value + vallen)
+                               {
+                                   if (count != 1)
+                                       error (1, 0, "\
+premature end of value in %s revision %s",
+                                              rcs->print_path, vnode->version);
+                                   else
+                                       break;
+                               }
+                               ++cp;
+                           }
+                       }
+                   }
+               }
+
+               sprintf (buf, "%lu", add);
+               kv = getnode ();
+               kv->type = RCSFIELD;
+               kv->key = xstrdup (";add");
+               kv->data = xstrdup (buf);
+               if (addnode (vnode->other, kv) != 0)
+               {
+                   error (0, 0,
+                          "\
+warning: duplicate key `%s' in version `%s' of RCS file `%s'",
+                          key, vnode->version, rcs->print_path);
+                   freenode (kv);
+               }
+
+               sprintf (buf, "%lu", del);
+               kv = getnode ();
+               kv->type = RCSFIELD;
+               kv->key = xstrdup (";delete");
+               kv->data = xstrdup (buf);
+               if (addnode (vnode->other, kv) != 0)
+               {
+                   error (0, 0,
+                          "\
+warning: duplicate key `%s' in version `%s' of RCS file `%s'",
+                          key, vnode->version, rcs->print_path);
+                   freenode (kv);
+               }
+           }
+
+           /* We have found the "text" key which ends the data for
+               this revision.  Break out of the loop and go on to the
+               next revision.  */
+           break;
+       }
+    }
+
+    rcsbuf_cache (rcs, &rcsbuf);
+}
+
+
+
+/*
+ * freercsnode - free up the info for an RCSNode
+ */
+void
+freercsnode (RCSNode **rnodep)
+{
+    if (rnodep == NULL || *rnodep == NULL)
+       return;
+
+    ((*rnodep)->refcount)--;
+    if ((*rnodep)->refcount != 0)
+    {
+       *rnodep = NULL;
+       return;
+    }
+    free ((*rnodep)->path);
+    free ((*rnodep)->print_path);
+    if ((*rnodep)->head != NULL)
+       free ((*rnodep)->head);
+    if ((*rnodep)->branch != NULL)
+       free ((*rnodep)->branch);
+    free_rcsnode_contents (*rnodep);
+    free (*rnodep);
+    *rnodep = NULL;
+}
+
+
+
+/*
+ * free_rcsnode_contents - free up the contents of an RCSNode without
+ * freeing the node itself, or the file name, or the head, or the
+ * path.  This returns the RCSNode to the state it is in immediately
+ * after a call to RCS_parse.
+ */
+static void
+free_rcsnode_contents (RCSNode *rnode)
+{
+    dellist (&rnode->versions);
+    if (rnode->symbols != NULL)
+       dellist (&rnode->symbols);
+    if (rnode->symbols_data != NULL)
+       free (rnode->symbols_data);
+    if (rnode->expand != NULL)
+       free (rnode->expand);
+    if (rnode->other != NULL)
+       dellist (&rnode->other);
+    if (rnode->access != NULL)
+       free (rnode->access);
+    if (rnode->locks_data != NULL)
+       free (rnode->locks_data);
+    if (rnode->locks != NULL)
+       dellist (&rnode->locks);
+    if (rnode->comment != NULL)
+       free (rnode->comment);
+    if (rnode->desc != NULL)
+       free (rnode->desc);
+}
+
+
+
+/* free_rcsvers_contents -- free up the contents of an RCSVers node,
+   but also free the pointer to the node itself. */
+/* Note: The `hardlinks' list is *not* freed, since it is merely a
+   pointer into the `hardlist' structure (defined in hardlink.c), and
+   that structure is freed elsewhere in the program. */
+static void
+free_rcsvers_contents (RCSVers *rnode)
+{
+    if (rnode->branches != NULL)
+       dellist (&rnode->branches);
+    if (rnode->date != NULL)
+       free (rnode->date);
+    if (rnode->next != NULL)
+       free (rnode->next);
+    if (rnode->author != NULL)
+       free (rnode->author);
+    if (rnode->state != NULL)
+       free (rnode->state);
+    if (rnode->other != NULL)
+       dellist (&rnode->other);
+    if (rnode->other_delta != NULL)
+       dellist (&rnode->other_delta);
+    if (rnode->text != NULL)
+       freedeltatext (rnode->text);
+    free (rnode);
+}
+
+
+
+/*
+ * rcsvers_delproc - free up an RCSVers type node
+ */
+static void
+rcsvers_delproc (Node *p)
+{
+    free_rcsvers_contents (p->data);
+}
+
+
+
+/* These functions retrieve keys and values from an RCS file using a
+   buffer.  We use this somewhat complex approach because it turns out
+   that for many common operations, CVS spends most of its time
+   reading keys, so it's worth doing some fairly hairy optimization.  */
+
+/* The number of bytes we try to read each time we need more data.  */
+
+#define RCSBUF_BUFSIZE (8192)
+
+/* The buffer we use to store data.  This grows as needed.  */
+
+static char *rcsbuf_buffer = NULL;
+static size_t rcsbuf_buffer_size = 0;
+
+/* Whether rcsbuf_buffer is in use.  This is used as a sanity check.  */
+
+static int rcsbuf_inuse;
+
+/* Set up to start gathering keys and values from an RCS file.  This
+   initializes RCSBUF.  */
+
+static void
+rcsbuf_open (struct rcsbuffer *rcsbuf, FILE *fp, const char *filename,
+            long unsigned int pos)
+{
+    if (rcsbuf_inuse)
+       error (1, 0, "rcsbuf_open: internal error");
+    rcsbuf_inuse = 1;
+
+#ifdef HAVE_MMAP
+    {
+       /* When we have mmap, it is much more efficient to let the system do the
+        * buffering and caching for us
+        */
+       struct stat fs;
+       size_t mmap_off = 0;
+
+       if ( fstat (fileno(fp), &fs) < 0 )
+           error ( 1, errno, "Could not stat RCS archive %s for mapping", 
filename );
+
+       if (pos)
+       {
+           size_t ps = getpagesize ();
+           mmap_off = ( pos / ps ) * ps;
+       }
+
+       /* Map private here since this particular buffer is read only */
+       rcsbuf_buffer = mmap ( NULL, fs.st_size - mmap_off,
+                               PROT_READ | PROT_WRITE,
+                               MAP_PRIVATE, fileno(fp), mmap_off );
+       if ( rcsbuf_buffer == NULL || rcsbuf_buffer == MAP_FAILED )
+           error ( 1, errno, "Could not map memory to RCS archive %s", 
filename );
+
+       rcsbuf_buffer_size = fs.st_size - mmap_off;
+       rcsbuf->ptr = rcsbuf_buffer + pos - mmap_off;
+       rcsbuf->ptrend = rcsbuf_buffer + fs.st_size - mmap_off;
+       rcsbuf->pos = mmap_off;
+    }
+#else /* !HAVE_MMAP */
+    if (rcsbuf_buffer_size < RCSBUF_BUFSIZE)
+       expand_string (&rcsbuf_buffer, &rcsbuf_buffer_size, RCSBUF_BUFSIZE);
+
+    rcsbuf->ptr = rcsbuf_buffer;
+    rcsbuf->ptrend = rcsbuf_buffer;
+    rcsbuf->pos = pos;
+#endif /* HAVE_MMAP */
+    rcsbuf->fp = fp;
+    rcsbuf->filename = filename;
+    rcsbuf->vlen = 0;
+    rcsbuf->at_string = 0;
+    rcsbuf->embedded_at = 0;
+}
+
+
+
+/* Stop gathering keys from an RCS file.  */
+static void
+rcsbuf_close (struct rcsbuffer *rcsbuf)
+{
+    if (! rcsbuf_inuse)
+       error (1, 0, "rcsbuf_close: internal error");
+#ifdef HAVE_MMAP
+    munmap ( rcsbuf_buffer, rcsbuf_buffer_size );
+#endif
+    rcsbuf_inuse = 0;
+}
+
+
+
+/* Read a key/value pair from an RCS file.  This sets *KEYP to point
+   to the key, and *VALUEP to point to the value.  A missing or empty
+   value is indicated by setting *VALUEP to NULL.
+
+   This function returns 1 on success, or 0 on EOF.  If there is an
+   error reading the file, or an EOF in an unexpected location, it
+   gives a fatal error.
+
+   This sets *KEYP and *VALUEP to point to storage managed by
+   rcsbuf_getkey.  Moreover, *VALUEP has not been massaged from the
+   RCS format: it may contain embedded whitespace and embedded '@'
+   characters.  Call rcsbuf_valcopy or rcsbuf_valpolish to do
+   appropriate massaging.  */
+
+/* Note that the extreme hair in rcsbuf_getkey is because profiling
+   statistics show that it was worth it. */
+static int
+rcsbuf_getkey (struct rcsbuffer *rcsbuf, char **keyp, char **valp)
+{
+    register const char * const my_spacetab = spacetab;
+    register char *ptr, *ptrend;
+    char c;
+
+#define my_whitespace(c)       (my_spacetab[(unsigned char)c] != 0)
+
+    rcsbuf->vlen = 0;
+    rcsbuf->at_string = 0;
+    rcsbuf->embedded_at = 0;
+
+    ptr = rcsbuf->ptr;
+    ptrend = rcsbuf->ptrend;
+
+    /* Sanity check.  */
+    assert (ptr >= rcsbuf_buffer && ptr <= rcsbuf_buffer + rcsbuf_buffer_size);
+    assert (ptrend >= rcsbuf_buffer && ptrend <= rcsbuf_buffer + 
rcsbuf_buffer_size);
+
+#ifndef HAVE_MMAP
+    /* If the pointer is more than RCSBUF_BUFSIZE bytes into the
+       buffer, move back to the start of the buffer.  This keeps the
+       buffer from growing indefinitely.  */
+    if (ptr - rcsbuf_buffer >= RCSBUF_BUFSIZE)
+    {
+       int len;
+
+       len = ptrend - ptr;
+
+       /* Sanity check: we don't read more than RCSBUF_BUFSIZE bytes
+           at a time, so we can't have more bytes than that past PTR.  */
+       assert (len <= RCSBUF_BUFSIZE);
+
+       /* Update the POS field, which holds the file offset of the
+           first byte in the RCSBUF_BUFFER buffer.  */
+       rcsbuf->pos += ptr - rcsbuf_buffer;
+
+       memcpy (rcsbuf_buffer, ptr, len);
+       ptr = rcsbuf_buffer;
+       ptrend = ptr + len;
+       rcsbuf->ptrend = ptrend;
+    }
+#endif /* HAVE_MMAP */
+
+    /* Skip leading whitespace.  */
+
+    while (1)
+    {
+       if (ptr >= ptrend)
+       {
+           ptr = rcsbuf_fill (rcsbuf, ptr, NULL, NULL);
+           if (ptr == NULL)
+               return 0;
+           ptrend = rcsbuf->ptrend;
+       }
+
+       c = *ptr;
+       if (! my_whitespace (c))
+           break;
+
+       ++ptr;
+    }
+
+    /* We've found the start of the key.  */
+
+    *keyp = ptr;
+
+    if (c != ';')
+    {
+       while (1)
+       {
+           ++ptr;
+           if (ptr >= ptrend)
+           {
+               ptr = rcsbuf_fill (rcsbuf, ptr, keyp, NULL);
+               if (ptr == NULL)
+                   error (1, 0, "EOF in key in RCS file %s",
+                          primary_root_inverse_translate (rcsbuf->filename));
+               ptrend = rcsbuf->ptrend;
+           }
+           c = *ptr;
+           if (c == ';' || my_whitespace (c))
+               break;
+       }
+    }
+
+    /* Here *KEYP points to the key in the buffer, C is the character
+       we found at the of the key, and PTR points to the location in
+       the buffer where we found C.  We must set *PTR to \0 in order
+       to terminate the key.  If the key ended with ';', then there is
+       no value.  */
+
+    *ptr = '\0';
+    ++ptr;
+
+    if (c == ';')
+    {
+       *valp = NULL;
+       rcsbuf->ptr = ptr;
+       return 1;
+    }
+
+    /* C must be whitespace.  Skip whitespace between the key and the
+       value.  If we find ';' now, there is no value.  */
+
+    while (1)
+    {
+       if (ptr >= ptrend)
+       {
+           ptr = rcsbuf_fill (rcsbuf, ptr, keyp, NULL);
+           if (ptr == NULL)
+               error (1, 0, "EOF while looking for value in RCS file %s",
+                      primary_root_inverse_translate (rcsbuf->filename));
+           ptrend = rcsbuf->ptrend;
+       }
+       c = *ptr;
+       if (c == ';')
+       {
+           *valp = NULL;
+           rcsbuf->ptr = ptr + 1;
+           return 1;
+       }
+       if (! my_whitespace (c))
+           break;
+       ++ptr;
+    }
+
+    /* Now PTR points to the start of the value, and C is the first
+       character of the value.  */
+
+    if (c != '@')
+       *valp = ptr;
+    else
+    {
+       char *pat;
+       size_t vlen;
+
+       /* Optimize the common case of a value composed of a single
+          '@' string.  */
+
+       rcsbuf->at_string = 1;
+
+       ++ptr;
+
+       *valp = ptr;
+
+       while (1)
+       {
+           while ((pat = memchr (ptr, '@', ptrend - ptr)) == NULL)
+           {
+               /* Note that we pass PTREND as the PTR value to
+                   rcsbuf_fill, so that we will wind up setting PTR to
+                   the location corresponding to the old PTREND, so
+                   that we don't search the same bytes again.  */
+               ptr = rcsbuf_fill (rcsbuf, ptrend, keyp, valp);
+               if (ptr == NULL)
+                   error (1, 0,
+                          "EOF while looking for end of string in RCS file %s",
+                          primary_root_inverse_translate (rcsbuf->filename));
+               ptrend = rcsbuf->ptrend;
+           }
+
+           /* Handle the special case of an '@' right at the end of
+               the known bytes.  */
+           if (pat + 1 >= ptrend)
+           {
+               /* Note that we pass PAT, not PTR, here.  */
+               pat = rcsbuf_fill (rcsbuf, pat, keyp, valp);
+               if (pat == NULL)
+               {
+                   /* EOF here is OK; it just means that the last
+                      character of the file was an '@' terminating a
+                      value for a key type which does not require a
+                      trailing ';'.  */
+                   pat = rcsbuf->ptrend - 1;
+
+               }
+               ptrend = rcsbuf->ptrend;
+
+               /* Note that the value of PTR is bogus here.  This is
+                  OK, because we don't use it.  */
+           }
+
+           if (pat + 1 >= ptrend || pat[1] != '@')
+               break;
+
+           /* We found an '@' pair in the string.  Keep looking.  */
+           ++rcsbuf->embedded_at;
+           ptr = pat + 2;
+       }
+
+       /* Here PAT points to the final '@' in the string.  */
+
+       *pat = '\0';
+
+       vlen = pat - *valp;
+       if (vlen == 0)
+           *valp = NULL;
+       rcsbuf->vlen = vlen;
+
+       ptr = pat + 1;
+    }
+
+    /* Certain keywords only have a '@' string.  If there is no '@'
+       string, then the old getrcskey function assumed that they had
+       no value, and we do the same.  */
+
+    {
+       char *k;
+
+       k = *keyp;
+       if (STREQ (k, RCSDESC)
+           || STREQ (k, "text")
+           || STREQ (k, "log"))
+       {
+           if (c != '@')
+               *valp = NULL;
+           rcsbuf->ptr = ptr;
+           return 1;
+       }
+    }
+
+    /* If we've already gathered a '@' string, try to skip whitespace
+       and find a ';'.  */
+    if (c == '@')
+    {
+       while (1)
+       {
+           char n;
+
+           if (ptr >= ptrend)
+           {
+               ptr = rcsbuf_fill (rcsbuf, ptr, keyp, valp);
+               if (ptr == NULL)
+                   error (1, 0, "EOF in value in RCS file %s",
+                          primary_root_inverse_translate (rcsbuf->filename));
+               ptrend = rcsbuf->ptrend;
+           }
+           n = *ptr;
+           if (n == ';')
+           {
+               /* We're done.  We already set everything up for this
+                   case above.  */
+               rcsbuf->ptr = ptr + 1;
+               return 1;
+           }
+           if (! my_whitespace (n))
+               break;
+           ++ptr;
+       }
+
+       /* The value extends past the '@' string.  We need to undo the
+           '@' stripping done in the default case above.  This
+           case never happens in a plain RCS file, but it can happen
+           if user defined phrases are used.  */
+       ((*valp)--)[rcsbuf->vlen++] = '@';
+    }
+
+    /* Here we have a value which is not a simple '@' string.  We need
+       to gather up everything until the next ';', including any '@'
+       strings.  *VALP points to the start of the value.  If
+       RCSBUF->VLEN is not zero, then we have already read an '@'
+       string, and PTR points to the data following the '@' string.
+       Otherwise, PTR points to the start of the value.  */
+
+    while (1)
+    {
+       char *start, *psemi, *pat;
+
+       /* Find the ';' which must end the value.  */
+       start = ptr;
+       while ((psemi = memchr (ptr, ';', ptrend - ptr)) == NULL)
+       {
+           int slen;
+
+           /* Note that we pass PTREND as the PTR value to
+              rcsbuf_fill, so that we will wind up setting PTR to the
+              location corresponding to the old PTREND, so that we
+              don't search the same bytes again.  */
+           slen = start - *valp;
+           ptr = rcsbuf_fill (rcsbuf, ptrend, keyp, valp);
+           if (ptr == NULL)
+               error (1, 0, "EOF in value in RCS file %s",
+                      primary_root_inverse_translate (rcsbuf->filename));
+           start = *valp + slen;
+           ptrend = rcsbuf->ptrend;
+       }
+
+       /* See if there are any '@' strings in the value.  */
+       pat = memchr (start, '@', psemi - start);
+
+       if (pat == NULL)
+       {
+           size_t vlen;
+
+           /* We're done with the value.  Trim any trailing
+               whitespace.  */
+
+           rcsbuf->ptr = psemi + 1;
+
+           start = *valp;
+           while (psemi > start && my_whitespace (psemi[-1]))
+               --psemi;
+           *psemi = '\0';
+
+           vlen = psemi - start;
+           if (vlen == 0)
+               *valp = NULL;
+           rcsbuf->vlen = vlen;
+
+           return 1;
+       }
+
+       /* We found an '@' string in the value.  We set RCSBUF->AT_STRING
+          and RCSBUF->EMBEDDED_AT to indicate that we won't be able to
+          compress whitespace correctly for this type of value.
+          Since this type of value never arises in a normal RCS file,
+          this should not be a big deal.  It means that if anybody
+          adds a phrase which can have both an '@' string and regular
+          text, they will have to handle whitespace compression
+          themselves.  */
+
+       rcsbuf->at_string = 1;
+       rcsbuf->embedded_at = -1;
+
+       ptr = pat + 1;
+
+       while (1)
+       {
+           while ((pat = memchr (ptr, '@', ptrend - ptr)) == NULL)
+           {
+               /* Note that we pass PTREND as the PTR value to
+                   rcsbuff_fill, so that we will wind up setting PTR
+                   to the location corresponding to the old PTREND, so
+                   that we don't search the same bytes again.  */
+               ptr = rcsbuf_fill (rcsbuf, ptrend, keyp, valp);
+               if (ptr == NULL)
+                   error (1, 0,
+                          "EOF while looking for end of string in RCS file %s",
+                          primary_root_inverse_translate (rcsbuf->filename));
+               ptrend = rcsbuf->ptrend;
+           }
+
+           /* Handle the special case of an '@' right at the end of
+               the known bytes.  */
+           if (pat + 1 >= ptrend)
+           {
+               ptr = rcsbuf_fill (rcsbuf, ptr, keyp, valp);
+               if (ptr == NULL)
+                   error (1, 0, "EOF in value in RCS file %s",
+                          primary_root_inverse_translate (rcsbuf->filename));
+               ptrend = rcsbuf->ptrend;
+           }
+
+           if (pat[1] != '@')
+               break;
+
+           /* We found an '@' pair in the string.  Keep looking.  */
+           ptr = pat + 2;
+       }
+
+       /* Here PAT points to the final '@' in the string.  */
+       ptr = pat + 1;
+    }
+
+#undef my_whitespace
+}
+
+
+
+/* Read an RCS revision number from an RCS file.  This sets *REVP to
+   point to the revision number; it will point to space that is
+   managed by the rcsbuf functions, and is only good until the next
+   call to rcsbuf_getkey or rcsbuf_getrevnum.
+
+   This function returns 1 on success, or 0 on EOF.  If there is an
+   error reading the file, or an EOF in an unexpected location, it
+   gives a fatal error.  */
+static int
+rcsbuf_getrevnum (struct rcsbuffer *rcsbuf, char **revp)
+{
+    char *ptr, *ptrend;
+    char c;
+
+    ptr = rcsbuf->ptr;
+    ptrend = rcsbuf->ptrend;
+
+    *revp = NULL;
+
+    /* Skip leading whitespace.  */
+
+    while (1)
+    {
+       if (ptr >= ptrend)
+       {
+           ptr = rcsbuf_fill (rcsbuf, ptr, NULL, NULL);
+           if (ptr == NULL)
+               return 0;
+           ptrend = rcsbuf->ptrend;
+       }
+
+       c = *ptr;
+       if (! whitespace (c))
+           break;
+
+       ++ptr;
+    }
+
+    if (! isdigit ((unsigned char) c) && c != '.')
+       error (1, 0,
+              "\
+unexpected '\\x%x' reading revision number in RCS file %s",
+              c, primary_root_inverse_translate (rcsbuf->filename));
+
+    *revp = ptr;
+
+    do
+    {
+       ++ptr;
+       if (ptr >= ptrend)
+       {
+           ptr = rcsbuf_fill (rcsbuf, ptr, revp, NULL);
+           if (ptr == NULL)
+               error (1, 0,
+                      "unexpected EOF reading revision number in RCS file %s",
+                      primary_root_inverse_translate (rcsbuf->filename));
+           ptrend = rcsbuf->ptrend;
+       }
+
+       c = *ptr;
+    }
+    while (isdigit ((unsigned char) c) || c == '.');
+
+    if (! whitespace (c))
+       error (1, 0, "\
+unexpected '\\x%x' reading revision number in RCS file %s",
+              c, primary_root_inverse_translate (rcsbuf->filename));
+
+    *ptr = '\0';
+
+    rcsbuf->ptr = ptr + 1;
+
+    return 1;
+}
+
+
+
+/* Fill RCSBUF_BUFFER with bytes from the file associated with RCSBUF,
+   updating PTR and the PTREND field.  If KEYP and *KEYP are not NULL,
+   then *KEYP points into the buffer, and must be adjusted if the
+   buffer is changed.  Likewise for VALP.  Returns the new value of
+   PTR, or NULL on error.  */
+static char *
+rcsbuf_fill (struct rcsbuffer *rcsbuf, char *ptr, char **keyp, char **valp)
+{
+#ifdef HAVE_MMAP
+    return NULL;
+#else /* HAVE_MMAP */
+    int got;
+
+    if (rcsbuf->ptrend - rcsbuf_buffer + RCSBUF_BUFSIZE > rcsbuf_buffer_size)
+    {
+       int poff, peoff, koff, voff;
+
+       poff = ptr - rcsbuf_buffer;
+       peoff = rcsbuf->ptrend - rcsbuf_buffer;
+       koff = keyp == NULL ? 0 : *keyp - rcsbuf_buffer;
+       voff = valp == NULL ? 0 : *valp - rcsbuf_buffer;
+
+       expand_string (&rcsbuf_buffer, &rcsbuf_buffer_size,
+                      rcsbuf_buffer_size + RCSBUF_BUFSIZE);
+
+       ptr = rcsbuf_buffer + poff;
+       rcsbuf->ptrend = rcsbuf_buffer + peoff;
+       if (keyp != NULL)
+           *keyp = rcsbuf_buffer + koff;
+       if (valp != NULL)
+           *valp = rcsbuf_buffer + voff;
+    }
+
+    got = fread (rcsbuf->ptrend, 1, RCSBUF_BUFSIZE, rcsbuf->fp);
+    if (got == 0)
+    {
+       if (ferror (rcsbuf->fp))
+           error (1, errno, "cannot read %s", rcsbuf->filename);
+       return NULL;
+    }
+
+    rcsbuf->ptrend += got;
+
+    return ptr;
+#endif /* HAVE_MMAP */
+}
+
+
+
+/* Test whether the last value returned by rcsbuf_getkey is a composite
+   value or not. */
+static int
+rcsbuf_valcmp (struct rcsbuffer *rcsbuf)
+{
+    return rcsbuf->at_string && rcsbuf->embedded_at < 0;
+}
+
+
+
+/* Copy the value VAL returned by rcsbuf_getkey into a memory buffer,
+   returning the memory buffer.  Polish the value like
+   rcsbuf_valpolish, q.v.  */
+static char *
+rcsbuf_valcopy (struct rcsbuffer *rcsbuf, char *val, int polish, size_t *lenp)
+{
+    size_t vlen;
+    int embedded_at;
+    char *ret;
+
+    if (val == NULL)
+    {
+       if (lenp != NULL)
+           *lenp = 0;
+       return NULL;
+    }
+
+    vlen = rcsbuf->vlen;
+    embedded_at = rcsbuf->embedded_at < 0 ? 0 : rcsbuf->embedded_at;
+
+    ret = xmalloc (vlen - embedded_at + 1);
+
+    if (rcsbuf->at_string ? embedded_at == 0 : ! polish)
+    {
+       /* No special action to take.  */
+       memcpy (ret, val, vlen + 1);
+       if (lenp != NULL)
+           *lenp = vlen;
+       return ret;
+    }
+
+    rcsbuf_valpolish_internal (rcsbuf, ret, val, lenp);
+    return ret;
+}
+
+
+
+/* Polish the value VAL returned by rcsbuf_getkey.  The POLISH
+   parameter is non-zero if multiple embedded whitespace characters
+   should be compressed into a single whitespace character.  Note that
+   leading and trailing whitespace was already removed by
+   rcsbuf_getkey.  Within an '@' string, pairs of '@' characters are
+   compressed into a single '@' character regardless of the value of
+   POLISH.  If LENP is not NULL, set *LENP to the length of the value.  */
+static void
+rcsbuf_valpolish (struct rcsbuffer *rcsbuf, char *val, int polish,
+                 size_t *lenp)
+{
+    if (val == NULL)
+    {
+       if (lenp != NULL)
+           *lenp= 0;
+       return;
+    }
+
+    if (rcsbuf->at_string ? rcsbuf->embedded_at == 0 : ! polish)
+    {
+       /* No special action to take.  */
+       if (lenp != NULL)
+           *lenp = rcsbuf->vlen;
+       return;
+    }
+
+    rcsbuf_valpolish_internal (rcsbuf, val, val, lenp);
+}
+
+
+
+/* Internal polishing routine, called from rcsbuf_valcopy and
+   rcsbuf_valpolish.  */
+static void
+rcsbuf_valpolish_internal (struct rcsbuffer *rcsbuf, char *to,
+                          const char *from, size_t *lenp)
+{
+    size_t len;
+
+    len = rcsbuf->vlen;
+
+    if (! rcsbuf->at_string)
+    {
+       char *orig_to;
+       size_t clen;
+
+       orig_to = to;
+
+       for (clen = len; clen > 0; ++from, --clen)
+       {
+           char c;
+
+           c = *from;
+           if (whitespace (c))
+           {
+               /* Note that we know that clen can not drop to zero
+                   while we have whitespace, because we know there is
+                   no trailing whitespace.  */
+               while (whitespace (from[1]))
+               {
+                   ++from;
+                   --clen;
+               }
+               c = ' ';
+           }
+           *to++ = c;
+       }
+
+       *to = '\0';
+
+       if (lenp != NULL)
+           *lenp = to - orig_to;
+    }
+    else
+    {
+       const char *orig_from;
+       char *orig_to;
+       int embedded_at;
+       size_t clen;
+
+       orig_from = from;
+       orig_to = to;
+
+       embedded_at = rcsbuf->embedded_at;
+       assert (embedded_at > 0);
+
+       if (lenp != NULL)
+           *lenp = len - embedded_at;
+
+       for (clen = len; clen > 0; ++from, --clen)
+       {
+           char c;
+
+           c = *from;
+           *to++ = c;
+           if (c == '@')
+           {
+               ++from;
+
+               /* Sanity check.
+                *
+                * FIXME: I restored this to an abort from an assert based on
+                * advice from Larry Jones that asserts should not be used to
+                * confirm the validity of an RCS file...  This leaves two
+                * issues here: 1) I am uncertain that the fact that we will
+                * only find double '@'s hasn't already been confirmed; and:
+                * 2) If this is the proper place to spot the error in the RCS
+                * file, then we should print a much clearer error here for the
+                * user!!!!!!!
+                *
+                *      - DRP
+                */
+               if (*from != '@' || clen == 0)
+                   abort ();
+
+               --clen;
+
+               --embedded_at;
+               if (embedded_at == 0)
+               {
+                   /* We've found all the embedded '@' characters.
+                       We can just memcpy the rest of the buffer after
+                       this '@' character.  */
+                   if (orig_to != orig_from)
+                       memcpy (to, from + 1, clen - 1);
+                   else
+                       memmove (to, from + 1, clen - 1);
+                   from += clen;
+                   to += clen - 1;
+                   break;
+               }
+           }
+       }
+
+       /* Sanity check.  */
+       assert (from == orig_from + len
+           && to == orig_to + (len - rcsbuf->embedded_at));
+
+       *to = '\0';
+    }
+}
+
+
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+
+/* Copy the next word from the value VALP returned by rcsbuf_getkey into a
+   memory buffer, updating VALP and returning the memory buffer.  Return
+   NULL when there are no more words. */
+
+static char *
+rcsbuf_valword (struct rcsbuffer *rcsbuf, char **valp)
+{
+    register const char * const my_spacetab = spacetab;
+    register char *ptr, *pat;
+    char c;
+
+# define my_whitespace(c)      (my_spacetab[(unsigned char)c] != 0)
+
+    if (*valp == NULL)
+       return NULL;
+
+    for (ptr = *valp; my_whitespace (*ptr); ++ptr) ;
+    if (*ptr == '\0')
+    {
+       assert (ptr - *valp == rcsbuf->vlen);
+       *valp = NULL;
+       rcsbuf->vlen = 0;
+       return NULL;
+    }
+
+    /* PTR now points to the start of a value.  Find out whether it is
+       a num, an id, a string or a colon. */
+    c = *ptr;
+    if (c == ':')
+    {
+       rcsbuf->vlen -= ++ptr - *valp;
+       *valp = ptr;
+       return xstrdup (":");
+    }
+
+    if (c == '@')
+    {
+       int embedded_at = 0;
+       size_t vlen;
+
+       pat = ++ptr;
+       while ((pat = strchr (pat, '@')) != NULL)
+       {
+           if (pat[1] != '@')
+               break;
+           ++embedded_at;
+           pat += 2;
+       }
+
+       /* Here PAT points to the final '@' in the string.  */
+       *pat++ = '\0';
+       assert (rcsbuf->at_string);
+       vlen = rcsbuf->vlen - (pat - *valp);
+       rcsbuf->vlen = pat - ptr - 1;
+       rcsbuf->embedded_at = embedded_at;
+       ptr = rcsbuf_valcopy (rcsbuf, ptr, 0, NULL);
+       *valp = pat;
+       rcsbuf->vlen = vlen;
+       if (strchr (pat, '@') == NULL)
+           rcsbuf->at_string = 0;
+       else
+           rcsbuf->embedded_at = -1;
+       return ptr;
+    }
+
+    /* *PTR is neither `:', `;' nor `@', so it should be the start of a num
+       or an id.  Make sure it is not another special character. */
+    if (c == '$' || c == '.' || c == ',')
+       error (1, 0, "invalid special character in RCS field in %s",
+              primary_root_inverse_translate (rcsbuf->filename));
+
+    pat = ptr;
+    while (1)
+    {
+       /* Legitimate ID characters are digits, dots and any `graphic
+           printing character that is not a special.' This test ought
+          to do the trick. */
+       c = *++pat;
+       if (!isprint ((unsigned char) c) ||
+           c == ';' || c == '$' || c == ',' || c == '@' || c == ':')
+           break;
+    }
+
+    /* PAT points to the last non-id character in this word, and C is
+       the character in its memory cell.  Check to make sure that it
+       is a legitimate word delimiter -- whitespace or end. */
+    if (c != '\0' && !my_whitespace (c))
+       error (1, 0, "invalid special character in RCS field in %s",
+              primary_root_inverse_translate (rcsbuf->filename));
+
+    *pat = '\0';
+    rcsbuf->vlen -= pat - *valp;
+    *valp = pat;
+    return xstrdup (ptr);
+
+# undef my_whitespace
+}
+
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+
+
+
+/* Return the current position of an rcsbuf.  */
+static off_t
+rcsbuf_ftello (struct rcsbuffer *rcsbuf)
+{
+    return rcsbuf->pos + rcsbuf->ptr - rcsbuf_buffer;
+}
+
+
+
+/* Return a pointer to any data buffered for RCSBUF, along with the
+   length.  */
+static void
+rcsbuf_get_buffered (struct rcsbuffer *rcsbuf, char **datap, size_t *lenp)
+{
+    *datap = rcsbuf->ptr;
+    *lenp = rcsbuf->ptrend - rcsbuf->ptr;
+}
+
+
+
+/* CVS optimizes by quickly reading some header information from a
+   file.  If it decides it needs to do more with the file, it reopens
+   it.  We speed that up here by maintaining a cache of a single open
+   file, to save the time it takes to reopen the file in the common
+   case.  */
+static RCSNode *cached_rcs;
+static struct rcsbuffer cached_rcsbuf;
+
+/* Cache RCS and RCSBUF.  This takes responsibility for closing
+   RCSBUF->FP.  */
+static void
+rcsbuf_cache (RCSNode *rcs, struct rcsbuffer *rcsbuf)
+{
+    if (cached_rcs != NULL)
+       rcsbuf_cache_close ();
+    cached_rcs = rcs;
+    ++rcs->refcount;
+    cached_rcsbuf = *rcsbuf;
+}
+
+
+
+/* If there is anything in the cache, close it.  */
+static void
+rcsbuf_cache_close (void)
+{
+    if (cached_rcs != NULL)
+    {
+       rcsbuf_close (&cached_rcsbuf);
+       if (fclose (cached_rcsbuf.fp) != 0)
+           error (0, errno, "cannot close %s", cached_rcsbuf.filename);
+       freercsnode (&cached_rcs);
+       cached_rcs = NULL;
+    }
+}
+
+
+
+/* Open an rcsbuffer for RCS, getting it from the cache if possible.
+   Set *FPP to the file, and *RCSBUFP to the rcsbuf.  The file should
+   be put at position POS.  */
+static void
+rcsbuf_cache_open (RCSNode *rcs, off_t pos, FILE **pfp,
+                  struct rcsbuffer *prcsbuf)
+{
+#ifndef HAVE_MMAP
+    if (cached_rcs == rcs)
+    {
+       if (rcsbuf_ftello (&cached_rcsbuf) != pos)
+       {
+           if (fseeko (cached_rcsbuf.fp, pos, SEEK_SET) != 0)
+               error (1, 0, "cannot fseeko RCS file %s",
+                      cached_rcsbuf.filename);
+           cached_rcsbuf.ptr = rcsbuf_buffer;
+           cached_rcsbuf.ptrend = rcsbuf_buffer;
+           cached_rcsbuf.pos = pos;
+       }
+       *pfp = cached_rcsbuf.fp;
+
+       /* When RCS_parse opens a file using fopen_case, it frees the
+           filename which we cached in CACHED_RCSBUF and stores a new
+           file name in RCS->PATH.  We avoid problems here by always
+           copying the filename over.  FIXME: This is hackish.  */
+       cached_rcsbuf.filename = rcs->path;
+
+       *prcsbuf = cached_rcsbuf;
+
+       cached_rcs = NULL;
+
+       /* Removing RCS from the cache removes a reference to it.  */
+       --rcs->refcount;
+       if (rcs->refcount <= 0)
+           error (1, 0, "rcsbuf_cache_open: internal error");
+    }
+    else
+    {
+#endif /* ifndef HAVE_MMAP */
+       /* FIXME:  If these routines can be rewritten to not write to the
+        * rcs file buffer, there would be a considerably larger memory savings
+        * from using mmap since the shared file would never need be copied to
+        * process memory.
+        *
+        * If this happens, cached mmapped buffers would be usable, but don't
+        * forget to make sure rcs->pos < pos here...
+        */
+       if (cached_rcs != NULL)
+           rcsbuf_cache_close ();
+
+       *pfp = CVS_FOPEN (rcs->path, FOPEN_BINARY_READ);
+       if (*pfp == NULL)
+           error (1, 0, "unable to reopen `%s'", rcs->path);
+#ifndef HAVE_MMAP
+       if (pos != 0)
+       {
+           if (fseeko (*pfp, pos, SEEK_SET) != 0)
+               error (1, 0, "cannot fseeko RCS file %s", rcs->path);
+       }
+#endif /* ifndef HAVE_MMAP */
+       rcsbuf_open (prcsbuf, *pfp, rcs->path, pos);
+#ifndef HAVE_MMAP
+    }
+#endif /* ifndef HAVE_MMAP */
+}
+
+
+
+/*
+ * process the symbols list of the rcs file
+ */
+static void
+do_symbols (List *list, char *val)
+{
+    Node *p;
+    char *cp = val;
+    char *tag, *rev;
+
+    assert (cp);
+
+    for (;;)
+    {
+       /* skip leading whitespace */
+       while (whitespace (*cp))
+           cp++;
+
+       /* if we got to the end, we are done */
+       if (*cp == '\0')
+           break;
+
+       /* split it up into tag and rev */
+       tag = cp;
+       cp = strchr (cp, ':');
+       *cp++ = '\0';
+       rev = cp;
+       while (!whitespace (*cp) && *cp != '\0')
+           cp++;
+       if (*cp != '\0')
+           *cp++ = '\0';
+
+       /* make a new node and add it to the list */
+       p = getnode ();
+       p->key = xstrdup (tag);
+       p->data = xstrdup (rev);
+       (void) addnode (list, p);
+    }
+}
+
+
+
+/*
+ * process the locks list of the rcs file
+ * Like do_symbols, but hash entries are keyed backwards: i.e.
+ * an entry like `user:rev' is keyed on REV rather than on USER.
+ */
+static void
+do_locks (List *list, char *val)
+{
+    Node *p;
+    char *cp = val;
+    char *user, *rev;
+
+    assert (cp);
+
+    for (;;)
+    {
+       /* skip leading whitespace */
+       while (whitespace (*cp))
+           cp++;
+
+       /* if we got to the end, we are done */
+       if (*cp == '\0')
+           break;
+
+       /* split it up into user and rev */
+       user = cp;
+       cp = strchr (cp, ':');
+       *cp++ = '\0';
+       rev = cp;
+       while (!whitespace (*cp) && *cp != '\0')
+           cp++;
+       if (*cp != '\0')
+           *cp++ = '\0';
+
+       /* make a new node and add it to the list */
+       p = getnode ();
+       p->key = xstrdup (rev);
+       p->data = xstrdup (user);
+       (void) addnode (list, p);
+    }
+}
+
+
+
+/*
+ * process the branches list of a revision delta
+ */
+static void
+do_branches (List *list, char *val)
+{
+    Node *p;
+    char *cp = val;
+    char *branch;
+
+    for (;;)
+    {
+       /* skip leading whitespace */
+       while (whitespace (*cp))
+           cp++;
+
+       /* if we got to the end, we are done */
+       if (*cp == '\0')
+           break;
+
+       /* find the end of this branch */
+       branch = cp;
+       while (!whitespace (*cp) && *cp != '\0')
+           cp++;
+       if (*cp != '\0')
+           *cp++ = '\0';
+
+       /* make a new node and add it to the list */
+       p = getnode ();
+       p->key = xstrdup (branch);
+       (void) addnode (list, p);
+    }
+}
+
+
+
+/*
+ * Version Number
+ * 
+ * Returns the requested version number of the RCS file, satisfying tags and/or
+ * dates, and walking branches, if necessary.
+ * 
+ * The result is returned; null-string if error.
+ */
+char *
+RCS_getversion (RCSNode *rcs, const char *tag, const char *date,
+                int force_tag_match, int *simple_tag)
+{
+    if (simple_tag != NULL)
+       *simple_tag = 0;
+
+    /* make sure we have something to look at... */
+    assert (rcs != NULL);
+
+    if (tag && date)
+    {
+       char *branch, *rev;
+
+       if (! RCS_nodeisbranch (rcs, tag))
+       {
+           /* We can't get a particular date if the tag is not a
+               branch.  */
+           return NULL;
+       }
+
+       /* Work out the branch.  */
+       if (! isdigit ((unsigned char) tag[0]))
+           branch = RCS_whatbranch (rcs, tag);
+       else
+           branch = xstrdup (tag);
+
+       /* Fetch the revision of branch as of date.  */
+       rev = RCS_getdatebranch (rcs, date, branch);
+       free (branch);
+       return rev;
+    }
+    else if (tag)
+       return RCS_gettag (rcs, tag, force_tag_match, simple_tag);
+    else if (date)
+       return RCS_getdate (rcs, date, force_tag_match);
+    else
+       return RCS_head (rcs);
+
+}
+
+
+
+/*
+ * Get existing revision number corresponding to tag or revision.
+ * Similar to RCS_gettag but less interpretation imposed.
+ * For example:
+ * -- If tag designates a magic branch, RCS_tag2rev
+ *    returns the magic branch number.
+ * -- If tag is a branch tag, returns the branch number, not
+ *    the revision of the head of the branch.
+ * If tag or revision is not valid or does not exist in file,
+ * return NULL.
+ */
+char *
+RCS_tag2rev (RCSNode *rcs, char *tag)
+{
+    char *rev, *pa, *pb;
+    int i;
+
+    assert (rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* If a valid revision, try to look it up */
+    if ( RCS_valid_rev (tag) )
+    {
+       /* Make a copy so we can scribble on it */
+       rev =  xstrdup (tag);
+
+       /* If revision exists, return the copy */
+       if (RCS_exist_rev (rcs, tag))
+           return rev;
+
+       /* Nope, none such. If tag is not a branch we're done. */ 
+       i = numdots (rev);
+       if ((i & 1) == 1 )
+       {
+           pa = strrchr (rev, '.');
+           if (i == 1 || *(pa-1) != RCS_MAGIC_BRANCH || *(pa-2) != '.')
+           {
+               free (rev);
+               error (1, 0, "revision `%s' does not exist", tag);
+           }
+       }
+
+       /* Try for a real (that is, exists in the RCS deltas) branch
+          (RCS_exist_rev just checks for real revisions and revisions
+          which have tags pointing to them).  */
+       pa = RCS_getbranch (rcs, rev, 1);
+       if (pa != NULL)
+       {
+           free (pa);
+           return rev;
+       }
+
+       /* Tag is branch, but does not exist, try corresponding 
+       * magic branch tag.
+       *
+       * FIXME: assumes all magic branches are of       
+       * form "n.n.n ... .0.n".  I'll fix if somebody can
+       * send me a method to get a magic branch tag with
+       * the 0 in some other position -- <address@hidden>
+       */ 
+       pa = strrchr (rev, '.');
+       if (!pa)
+           /* This might happen, for instance, if an RCS file only contained
+            * revisions 2.x and higher, and REV == "1".
+            */
+           error (1, 0, "revision `%s' does not exist", tag);
+
+       *pa++ = 0;
+       pb = Xasprintf ("%s.%d.%s", rev, RCS_MAGIC_BRANCH, pa);
+       free (rev);
+       rev = pb;
+       if (RCS_exist_rev (rcs, rev))
+           return rev;
+       error (1, 0, "revision `%s' does not exist", tag);
+    }
+
+
+    RCS_check_tag (tag); /* exit if not a valid tag */
+
+    /* If tag is "HEAD", special case to get head RCS revision */
+    if (tag && STREQ (tag, TAG_HEAD))
+        return RCS_head (rcs);
+
+    /* If valid tag let translate_symtag say yea or nay. */
+    rev = translate_symtag (rcs, tag);
+
+    if (rev)
+        return rev;
+
+    /* Trust the caller to print warnings. */
+    return NULL;
+}
+
+
+
+/*
+ * Find the revision for a specific tag.
+ * If force_tag_match is set, return NULL if an exact match is not
+ * possible otherwise return RCS_head ().  We are careful to look for
+ * and handle "magic" revisions specially.
+ * 
+ * If the matched tag is a branch tag, find the head of the branch.
+ * 
+ * Returns pointer to newly malloc'd string, or NULL.
+ */
+char *
+RCS_gettag (RCSNode *rcs, const char *symtag, int force_tag_match,
+            int *simple_tag)
+{
+    char *tag;
+
+    if (simple_tag != NULL)
+       *simple_tag = 0;
+
+    /* make sure we have something to look at... */
+    assert (rcs != NULL);
+
+    /* XXX this is probably not necessary, --jtc */
+    if (rcs->flags & PARTIAL) 
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* If symtag is "HEAD", special case to get head RCS revision */
+    if (symtag && STREQ (symtag, TAG_HEAD))
+#if 0 /* This #if 0 is only in the Cygnus code.  Why?  Death support?  */
+       if (force_tag_match && (rcs->flags & VALID) && (rcs->flags & INATTIC))
+           return NULL;        /* head request for removed file */
+       else
+#endif
+           return RCS_head (rcs);
+
+    if (!isdigit ((unsigned char) symtag[0]))
+    {
+       char *version;
+
+       /* If we got a symbolic tag, resolve it to a numeric */
+       version = translate_symtag (rcs, symtag);
+       if (version != NULL)
+       {
+           int dots;
+           char *magic, *branch, *cp;
+
+           tag = version;
+
+           /*
+            * If this is a magic revision, we turn it into either its
+            * physical branch equivalent (if one exists) or into
+            * its base revision, which we assume exists.
+            */
+           dots = numdots (tag);
+           if (dots > 2 && (dots & 1) != 0)
+           {
+               branch = strrchr (tag, '.');
+               cp = branch++ - 1;
+               while (*cp != '.')
+                   cp--;
+
+               /* see if we have .magic-branch. (".0.") */
+               magic = xmalloc (strlen (tag) + 1);
+               (void) sprintf (magic, ".%d.", RCS_MAGIC_BRANCH);
+               if (strncmp (magic, cp, strlen (magic)) == 0)
+               {
+                   /* it's magic.  See if the branch exists */
+                   *cp = '\0';         /* turn it into a revision */
+                   (void) sprintf (magic, "%s.%s", tag, branch);
+                   branch = RCS_getbranch (rcs, magic, 1);
+                   free (magic);
+                   if (branch != NULL)
+                   {
+                       free (tag);
+                       return branch;
+                   }
+                   return tag;
+               }
+               free (magic);
+           }
+       }
+       else
+       {
+           /* The tag wasn't there, so return the head or NULL */
+           if (force_tag_match)
+               return NULL;
+           else
+               return RCS_head (rcs);
+       }
+    }
+    else
+       tag = xstrdup (symtag);
+
+    /* tag is always allocated and numeric now.  */
+
+    /*
+     * numeric tag processing:
+     *         1) revision number - just return it
+     *         2) branch number   - find head of branch
+     */
+
+    /* strip trailing dots */
+    while (tag[strlen (tag) - 1] == '.')
+       tag[strlen (tag) - 1] = '\0';
+
+    if ((numdots (tag) & 1) == 0)
+    {
+       char *branch;
+
+       /* we have a branch tag, so we need to walk the branch */
+       branch = RCS_getbranch (rcs, tag, force_tag_match);
+       free (tag);
+       return branch;
+    }
+    else
+    {
+       Node *p;
+
+       /* we have a revision tag, so make sure it exists */
+       p = findnode (rcs->versions, tag);
+       if (p != NULL)
+       {
+           /* We have found a numeric revision for the revision tag.
+              To support expanding the RCS keyword Name, if
+              SIMPLE_TAG is not NULL, tell the the caller that this
+              is a simple tag which co will recognize.  FIXME: Are
+              there other cases in which we should set this?  In
+              particular, what if we expand RCS keywords internally
+              without calling co?  */
+           if (simple_tag != NULL)
+               *simple_tag = 1;
+           return tag;
+       }
+       else
+       {
+           /* The revision wasn't there, so return the head or NULL */
+           free (tag);
+           if (force_tag_match)
+               return NULL;
+           else
+               return RCS_head (rcs);
+       }
+    }
+}
+
+
+
+/*
+ * Return a "magic" revision as a virtual branch off of REV for the RCS file.
+ * A "magic" revision is one which is unique in the RCS file.  By unique, I
+ * mean we return a revision which:
+ *     - has a branch of 0 (see rcs.h RCS_MAGIC_BRANCH)
+ *     - has a revision component which is not an existing branch off REV
+ *     - has a revision component which is not an existing magic revision
+ *     - is an even-numbered revision, to avoid conflicts with vendor branches
+ * The first point is what makes it "magic".
+ *
+ * As an example, if we pass in 1.37 as REV, we will look for an existing
+ * branch called 1.37.2.  If it did not exist, we would look for an
+ * existing symbolic tag with a numeric part equal to 1.37.0.2.  If that
+ * didn't exist, then we know that the 1.37.2 branch can be reserved by
+ * creating a symbolic tag with 1.37.0.2 as the numeric part.
+ *
+ * This allows us to fork development with very little overhead -- just a
+ * symbolic tag is used in the RCS file.  When a commit is done, a physical
+ * branch is dynamically created to hold the new revision.
+ *
+ * Note: We assume that REV is an RCS revision and not a branch number.
+ */
+static char *check_rev;
+char *
+RCS_magicrev (RCSNode *rcs, char *rev)
+{
+    int rev_num;
+    char *xrev, *test_branch, *local_branch_num;
+
+    xrev = xmalloc (strlen (rev) + 14); /* enough for .0.number */
+    check_rev = xrev;
+
+    local_branch_num = getenv("CVS_LOCAL_BRANCH_NUM");
+    if (local_branch_num)
+    {
+      rev_num = atoi(local_branch_num);
+      if (rev_num < 2)
+       rev_num = 2;
+      else
+       rev_num &= ~1;
+    }
+    else
+      rev_num = 2;
+
+    /* only look at even numbered branches */
+    for ( ; ; rev_num += 2)
+    {
+       /* see if the physical branch exists */
+       (void) sprintf (xrev, "%s.%d", rev, rev_num);
+       test_branch = RCS_getbranch (rcs, xrev, 1);
+       if (test_branch != NULL)        /* it did, so keep looking */
+       {
+           free (test_branch);
+           continue;
+       }
+
+       /* now, create a "magic" revision */
+       (void) sprintf (xrev, "%s.%d.%d", rev, RCS_MAGIC_BRANCH, rev_num);
+
+       /* walk the symbols list to see if a magic one already exists */
+       if (walklist (RCS_symbols(rcs), checkmagic_proc, NULL) != 0)
+           continue;
+
+       /* we found a free magic branch.  Claim it as ours */
+       return xrev;
+    }
+}
+
+
+
+/*
+ * walklist proc to look for a match in the symbols list.
+ * Returns 0 if the symbol does not match, 1 if it does.
+ */
+static int
+checkmagic_proc (Node *p, void *closure)
+{
+    if (STREQ (check_rev, p->data))
+       return 1;
+    else
+       return 0;
+}
+
+
+
+/*
+ * Given an RCSNode, returns non-zero if the specified revision number 
+ * or symbolic tag resolves to a "branch" within the rcs file.
+ *
+ * FIXME: this is the same as RCS_nodeisbranch except for the special 
+ *        case for handling a null rcsnode.
+ */
+int
+RCS_isbranch (RCSNode *rcs, const char *rev)
+{
+    /* numeric revisions are easy -- even number of dots is a branch */
+    if (isdigit ((unsigned char) *rev))
+       return (numdots (rev) & 1) == 0;
+
+    /* assume a revision if you can't find the RCS info */
+    if (rcs == NULL)
+       return 0;
+
+    /* now, look for a match in the symbols list */
+    return RCS_nodeisbranch (rcs, rev);
+}
+
+
+
+/*
+ * Given an RCSNode, returns non-zero if the specified revision number
+ * or symbolic tag resolves to a "branch" within the rcs file.  We do
+ * take into account any magic branches as well.
+ */
+int
+RCS_nodeisbranch (RCSNode *rcs, const char *rev)
+{
+    int dots;
+    char *version;
+
+    assert (rcs != NULL);
+
+    /* numeric revisions are easy -- even number of dots is a branch */
+    if (isdigit ((unsigned char) *rev))
+       return (numdots (rev) & 1) == 0;
+
+    version = translate_symtag (rcs, rev);
+    if (version == NULL)
+       return 0;
+    dots = numdots (version);
+    if ((dots & 1) == 0)
+    {
+       free (version);
+       return 1;
+    }
+
+    /* got a symbolic tag match, but it's not a branch; see if it's magic */
+    if (dots > 2)
+    {
+       char *magic;
+       char *branch = strrchr (version, '.');
+       char *cp = branch - 1;
+       while (*cp != '.')
+           cp--;
+
+       /* see if we have .magic-branch. (".0.") */
+       magic = Xasprintf (".%d.", RCS_MAGIC_BRANCH);
+       if (strncmp (magic, cp, strlen (magic)) == 0)
+       {
+           free (magic);
+           free (version);
+           return 1;
+       }
+       free (magic);
+    }
+    free (version);
+    return 0;
+}
+
+
+
+/*
+ * Returns a pointer to malloc'ed memory which contains the branch
+ * for the specified *symbolic* tag.  Magic branches are handled correctly.
+ */
+char *
+RCS_whatbranch (RCSNode *rcs, const char *rev)
+{
+    char *version;
+    int dots;
+
+    /* assume no branch if you can't find the RCS info */
+    if (rcs == NULL)
+       return NULL;
+
+    /* now, look for a match in the symbols list */
+    version = translate_symtag (rcs, rev);
+    if (version == NULL)
+       return NULL;
+    dots = numdots (version);
+    if ((dots & 1) == 0)
+       return version;
+
+    /* got a symbolic tag match, but it's not a branch; see if it's magic */
+    if (dots > 2)
+    {
+       char *magic;
+       char *branch = strrchr (version, '.');
+       char *cp = branch++ - 1;
+       while (*cp != '.')
+           cp--;
+
+       /* see if we have .magic-branch. (".0.") */
+       magic = xmalloc (strlen (version) + 1);
+       (void) sprintf (magic, ".%d.", RCS_MAGIC_BRANCH);
+       if (strncmp (magic, cp, strlen (magic)) == 0)
+       {
+           /* yep.  it's magic.  now, construct the real branch */
+           *cp = '\0';                 /* turn it into a revision */
+           (void) sprintf (magic, "%s.%s", version, branch);
+           free (version);
+           return magic;
+       }
+       free (magic);
+    }
+    free (version);
+    return NULL;
+}
+
+
+
+/*
+ * Get the head of the specified branch.  If the branch does not exist,
+ * return NULL or RCS_head depending on force_tag_match.
+ * Returns NULL or a newly malloc'd string.
+ */
+char *
+RCS_getbranch (RCSNode *rcs, const char *tag, int force_tag_match)
+{
+    Node *p, *head;
+    RCSVers *vn;
+    char *xtag;
+    char *nextvers;
+    char *cp;
+
+    /* make sure we have something to look at... */
+    assert (rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* find out if the tag contains a dot, or is on the trunk */
+    cp = strrchr (tag, '.');
+
+    /* trunk processing is the special case */
+    if (cp == NULL)
+    {
+       xtag = Xasprintf ("%s.", tag);
+       for (cp = rcs->head; cp != NULL;)
+       {
+           if (strncmp (xtag, cp, strlen (xtag)) == 0)
+               break;
+           p = findnode (rcs->versions, cp);
+           if (p == NULL)
+           {
+               free (xtag);
+               if (force_tag_match)
+                   return NULL;
+               else
+                   return RCS_head (rcs);
+           }
+           vn = p->data;
+           cp = vn->next;
+       }
+       free (xtag);
+       if (cp == NULL)
+       {
+           if (force_tag_match)
+               return NULL;
+           else
+               return RCS_head (rcs);
+       }
+       return xstrdup (cp);
+    }
+
+    /* if it had a `.', terminate the string so we have the base revision */
+    *cp = '\0';
+
+    /* look up the revision this branch is based on */
+    p = findnode (rcs->versions, tag);
+
+    /* put the . back so we have the branch again */
+    *cp = '.';
+
+    if (p == NULL)
+    {
+       /* if the base revision didn't exist, return head or NULL */
+       if (force_tag_match)
+           return NULL;
+       else
+           return RCS_head (rcs);
+    }
+
+    /* find the first element of the branch we are looking for */
+    vn = p->data;
+    if (vn->branches == NULL)
+       return NULL;
+    xtag = Xasprintf ("%s.", tag);
+    head = vn->branches->list;
+    for (p = head->next; p != head; p = p->next)
+       if (strncmp (p->key, xtag, strlen (xtag)) == 0)
+           break;
+    free (xtag);
+
+    if (p == head)
+    {
+       /* we didn't find a match so return head or NULL */
+       if (force_tag_match)
+           return NULL;
+       else
+           return RCS_head (rcs);
+    }
+
+    /* now walk the next pointers of the branch */
+    nextvers = p->key;
+    do
+    {
+       p = findnode (rcs->versions, nextvers);
+       if (p == NULL)
+       {
+           /* a link in the chain is missing - return head or NULL */
+           if (force_tag_match)
+               return NULL;
+           else
+               return RCS_head (rcs);
+       }
+       vn = p->data;
+       nextvers = vn->next;
+    } while (nextvers != NULL);
+
+    /* we have the version in our hand, so go for it */
+    return xstrdup (vn->version);
+}
+
+
+
+/* Returns the head of the branch which REV is on.  REV can be a
+   branch tag or non-branch tag; symbolic or numeric.
+
+   Returns a newly malloc'd string.  Returns NULL if a symbolic name
+   isn't found.  */
+char *
+RCS_branch_head (RCSNode *rcs, char *rev)
+{
+    char *num;
+    char *br;
+    char *retval;
+
+    assert (rcs != NULL);
+
+    if (RCS_nodeisbranch (rcs, rev))
+       return RCS_getbranch (rcs, rev, 1);
+
+    if (isdigit ((unsigned char) *rev))
+       num = xstrdup (rev);
+    else
+    {
+       num = translate_symtag (rcs, rev);
+       if (num == NULL)
+           return NULL;
+    }
+    br = truncate_revnum (num);
+    retval = RCS_getbranch (rcs, br, 1);
+    free (br);
+    free (num);
+    return retval;
+}
+
+
+
+/* Get the branch point for a particular branch, that is the first
+   revision on that branch.  For example, RCS_getbranchpoint (rcs,
+   "1.3.2") will normally return "1.3.2.1".  TARGET may be either a
+   branch number or a revision number; if a revnum, find the
+   branchpoint of the branch to which TARGET belongs.
+
+   Return RCS_head if TARGET is on the trunk or if the root node could
+   not be found (this is sort of backwards from our behavior on a branch;
+   the rationale is that the return value is a revision from which you
+   can start walking the next fields and end up at TARGET).
+   Return NULL on error.  */
+static char *
+RCS_getbranchpoint (RCSNode *rcs, char *target)
+{
+    char *branch, *bp;
+    Node *vp;
+    RCSVers *rev;
+    int dots, isrevnum, brlen;
+
+    dots = numdots (target);
+    isrevnum = dots & 1;
+
+    if (dots == 1)
+       /* TARGET is a trunk revision; return rcs->head. */
+       return RCS_head (rcs);
+
+    /* Get the revision number of the node at which TARGET's branch is
+       rooted.  If TARGET is a branch number, lop off the last field;
+       if it's a revision number, lop off the last *two* fields. */
+    branch = xstrdup (target);
+    bp = strrchr (branch, '.');
+    if (bp == NULL)
+       error (1, 0, "%s: confused revision number %s",
+              rcs->print_path, target);
+    if (isrevnum)
+       while (*--bp != '.')
+           ;
+    *bp = '\0';
+
+    vp = findnode (rcs->versions, branch);
+    if (vp == NULL)
+    {  
+       error (0, 0, "%s: can't find branch point %s", rcs->print_path, target);
+       free (branch);
+       return NULL;
+    }
+    rev = vp->data;
+
+    *bp++ = '.';
+    while (*bp && *bp != '.')
+       ++bp;
+    brlen = bp - branch;
+
+    vp = rev->branches->list->next;
+    while (vp != rev->branches->list)
+    {
+       /* BRANCH may be a genuine branch number, e.g. `1.1.3', or
+          maybe a full revision number, e.g. `1.1.3.6'.  We have
+          found our branch point if the first BRANCHLEN characters
+          of the revision number match, *and* if the following
+          character is a dot. */
+       if (strncmp (vp->key, branch, brlen) == 0 && vp->key[brlen] == '.')
+           break;
+       vp = vp->next;
+    }
+
+    free (branch);
+    if (vp == rev->branches->list)
+    {
+       error (0, 0, "%s: can't find branch point %s", rcs->print_path, target);
+       return NULL;
+    }
+    else
+       return xstrdup (vp->key);
+}
+
+
+
+/*
+ * Get the head of the RCS file.  If branch is set, this is the head of the
+ * branch, otherwise the real head.
+ *
+ * INPUTS
+ *   rcs       The parsed rcs node information.
+ *
+ * RETURNS
+ *   NULL when rcs->branch exists and cannot be found.
+ *   A newly malloc'd string, otherwise.
+ */
+char *
+RCS_head (RCSNode *rcs)
+{
+    /* make sure we have something to look at... */
+    assert (rcs);
+
+    /*
+     * NOTE: we call getbranch with force_tag_match set to avoid any
+     * possibility of recursion
+     */
+    if (rcs->branch)
+       return RCS_getbranch (rcs, rcs->branch, 1);
+    else
+       return xstrdup (rcs->head);
+}
+
+
+
+/*
+ * Get the most recent revision, based on the supplied date, but use some
+ * funky stuff and follow the vendor branch maybe
+ */
+char *
+RCS_getdate (RCSNode *rcs, const char *date, int force_tag_match)
+{
+    char *cur_rev = NULL;
+    char *retval = NULL;
+    Node *p;
+    RCSVers *vers = NULL;
+
+    /* make sure we have something to look at... */
+    assert (rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* if the head is on a branch, try the branch first */
+    if (rcs->branch != NULL)
+    {
+       retval = RCS_getdatebranch (rcs, date, rcs->branch);
+       if (retval != NULL)
+           return retval;
+    }
+
+    /* otherwise if we have a trunk, try it */
+    if (rcs->head)
+    {
+       p = findnode (rcs->versions, rcs->head);
+       if (p == NULL)
+       {
+           error (0, 0, "%s: head revision %s doesn't exist", rcs->print_path,
+                  rcs->head);
+       }
+       while (p != NULL)
+       {
+           /* if the date of this one is before date, take it */
+           vers = p->data;
+           if (RCS_datecmp (vers->date, date) <= 0)
+           {
+               cur_rev = vers->version;
+               break;
+           }
+
+           /* if there is a next version, find the node */
+           if (vers->next != NULL)
+               p = findnode (rcs->versions, vers->next);
+           else
+               p = NULL;
+       }
+    }
+    else
+       error (0, 0, "%s: no head revision", rcs->print_path);
+
+    /*
+     * at this point, either we have the revision we want, or we have the
+     * first revision on the trunk (1.1?) in our hands, or we've come up
+     * completely empty
+     */
+
+    /* if we found what we're looking for, and it's not 1.1 return it */
+    if (cur_rev != NULL)
+    {
+       if (! STREQ (cur_rev, "1.1"))
+           return xstrdup (cur_rev);
+
+       /* This is 1.1;  if the date of 1.1 is not the same as that for the
+          1.1.1.1 version, then return 1.1.  This happens when the first
+          version of a file is created by a regular cvs add and commit,
+          and there is a subsequent cvs import of the same file.  */
+       p = findnode (rcs->versions, "1.1.1.1");
+       if (p)
+       {
+           char *date_1_1 = vers->date;
+
+           vers = p->data;
+           if (RCS_datecmp (vers->date, date_1_1) != 0)
+               return xstrdup ("1.1");
+       }
+    }
+
+    /* look on the vendor branch */
+    retval = RCS_getdatebranch (rcs, date, CVSBRANCH);
+
+    /*
+     * if we found a match, return it; otherwise, we return the first
+     * revision on the trunk or NULL depending on force_tag_match and the
+     * date of the first rev
+     */
+    if (retval != NULL)
+       return retval;
+
+    if (vers && (!force_tag_match || RCS_datecmp (vers->date, date) <= 0))
+       return xstrdup (vers->version);
+    else
+       return NULL;
+}
+
+
+
+/*
+ * Look up the last element on a branch that was put in before or on
+ * the specified date and time (return the rev or NULL)
+ */
+static char *
+RCS_getdatebranch (RCSNode *rcs, const char *date, const char *branch)
+{
+    char *cur_rev = NULL;
+    char *cp;
+    char *xbranch, *xrev;
+    Node *p;
+    RCSVers *vers;
+
+    /* look up the first revision on the branch */
+    xrev = xstrdup (branch);
+    cp = strrchr (xrev, '.');
+    if (cp == NULL)
+    {
+       free (xrev);
+       return NULL;
+    }
+    *cp = '\0';                                /* turn it into a revision */
+
+    assert (rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    p = findnode (rcs->versions, xrev);
+    free (xrev);
+    if (p == NULL)
+       return NULL;
+    vers = p->data;
+
+    /* Tentatively use this revision, if it is early enough.  */
+    if (RCS_datecmp (vers->date, date) <= 0)
+       cur_rev = vers->version;
+
+    /* If no branches list, return now.  This is what happens if the branch
+       is a (magic) branch with no revisions yet.  */
+    if (vers->branches == NULL)
+       return xstrdup (cur_rev);
+
+    /* walk the branches list looking for the branch number */
+    xbranch = Xasprintf ("%s.", branch);
+    for (p = vers->branches->list->next; p != vers->branches->list; p = 
p->next)
+       if (strncmp (p->key, xbranch, strlen (xbranch)) == 0)
+           break;
+    free (xbranch);
+    if (p == vers->branches->list)
+    {
+       /* This is what happens if the branch is a (magic) branch with
+          no revisions yet.  Similar to the case where vers->branches ==
+          NULL, except here there was a another branch off the same
+          branchpoint.  */
+       return xstrdup (cur_rev);
+    }
+
+    p = findnode (rcs->versions, p->key);
+
+    /* walk the next pointers until you find the end, or the date is too late 
*/
+    while (p != NULL)
+    {
+       vers = p->data;
+       if (RCS_datecmp (vers->date, date) <= 0)
+           cur_rev = vers->version;
+       else
+           break;
+
+       /* if there is a next version, find the node */
+       if (vers->next != NULL)
+           p = findnode (rcs->versions, vers->next);
+       else
+           p = NULL;
+    }
+
+    /* Return whatever we found, which may be NULL.  */
+    return xstrdup (cur_rev);
+}
+
+
+
+/*
+ * Compare two dates in RCS format. Beware the change in format on January 1,
+ * 2000, when years go from 2-digit to full format.
+ */
+int
+RCS_datecmp (const char *date1, const char *date2)
+{
+    int length_diff = strlen (date1) - strlen (date2);
+
+    return length_diff ? length_diff : strcmp (date1, date2);
+}
+
+
+
+/* Look up revision REV in RCS and return the date specified for the
+   revision minus FUDGE seconds (FUDGE will generally be one, so that the
+   logically previous revision will be found later, or zero, if we want
+   the exact date).
+
+   The return value is the date being returned as a time_t, or (time_t)-1
+   on error (previously was documented as zero on error; I haven't checked
+   the callers to make sure that they really check for (time_t)-1, but
+   the latter is what this function really returns).  If DATE is non-NULL,
+   then it must point to MAXDATELEN characters, and we store the same
+   return value there in DATEFORM format.  */
+time_t
+RCS_getrevtime (RCSNode *rcs, const char *rev, char *date, int fudge)
+{
+    char *tdate;
+    struct tm xtm, *ftm;
+    struct timespec revdate;
+    Node *p;
+    RCSVers *vers;
+
+    /* make sure we have something to look at... */
+    assert (rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* look up the revision */
+    p = findnode (rcs->versions, rev);
+    if (p == NULL)
+       return -1;
+    vers = p->data;
+
+    /* split up the date */
+    if (sscanf (vers->date, SDATEFORM, &xtm.tm_year, &xtm.tm_mon,
+               &xtm.tm_mday, &xtm.tm_hour, &xtm.tm_min, &xtm.tm_sec) != 6)
+       error (1, 0, "%s: invalid date for revision %s (%s)", rcs->print_path,
+              rev, vers->date);
+
+    /* If the year is from 1900 to 1999, RCS files contain only two
+       digits, and sscanf gives us a year from 0-99.  If the year is
+       2000+, RCS files contain all four digits and we subtract 1900,
+       because the tm_year field should contain years since 1900.  */
+
+    if (xtm.tm_year >= 100 && xtm.tm_year < 2000)
+       error (0, 0, "%s: non-standard date format for revision %s (%s)",
+              rcs->print_path, rev, vers->date);
+    if (xtm.tm_year >= 1900)
+       xtm.tm_year -= 1900;
+
+    /* put the date in a form getdate can grok */
+    tdate = Xasprintf ("%d-%d-%d %d:%d:%d -0000",
+                      xtm.tm_year + 1900, xtm.tm_mon, xtm.tm_mday,
+                      xtm.tm_hour, xtm.tm_min, xtm.tm_sec);
+
+    /* Turn it into seconds since the epoch.
+     *
+     * We use a struct timespec since that is what getdate requires, then
+     * truncate the nanoseconds.
+     */
+    if (!get_date (&revdate, tdate, NULL))
+    {
+       free (tdate);
+       return (time_t)-1;
+    }
+    free (tdate);
+
+    revdate.tv_sec -= fudge;   /* remove "fudge" seconds */
+    if (date)
+    {
+       /* Put an appropriate string into `date', if we were given one. */
+       ftm = gmtime (&revdate.tv_sec);
+       (void) sprintf (date, DATEFORM,
+                       ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900),
+                       ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour,
+                       ftm->tm_min, ftm->tm_sec);
+    }
+
+    return revdate.tv_sec;
+}
+
+
+
+List *
+RCS_getlocks (RCSNode *rcs)
+{
+    assert(rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (rcs->locks_data) {
+       rcs->locks = getlist ();
+       do_locks (rcs->locks, rcs->locks_data);
+       free(rcs->locks_data);
+       rcs->locks_data = NULL;
+    }
+
+    return rcs->locks;
+}
+
+
+
+List *
+RCS_symbols(RCSNode *rcs)
+{
+    assert(rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (rcs->symbols_data) {
+       rcs->symbols = getlist ();
+       do_symbols (rcs->symbols, rcs->symbols_data);
+       free(rcs->symbols_data);
+       rcs->symbols_data = NULL;
+    }
+
+    return rcs->symbols;
+}
+
+
+
+/*
+ * Return the version associated with a particular symbolic tag.
+ * Returns NULL or a newly malloc'd string.
+ */
+static char *
+translate_symtag (RCSNode *rcs, const char *tag)
+{
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (rcs->symbols != NULL)
+    {
+       Node *p;
+
+       /* The symbols have already been converted into a list.  */
+       p = findnode (rcs->symbols, tag);
+       if (p == NULL)
+           return NULL;
+
+       return xstrdup (p->data);
+    }
+
+    if (rcs->symbols_data != NULL)
+    {
+       size_t len;
+       char *cp, *last;
+
+       /* Look through the RCS symbols information.  This is like
+           do_symbols, but we don't add the information to a list.  In
+           most cases, we will only be called once for this file, so
+           generating the list is unnecessary overhead.  */
+
+       len = strlen (tag);
+       cp = rcs->symbols_data;
+       /* Keeping track of LAST below isn't strictly necessary, now that tags
+        * should be parsed for validity before they are accepted, but tags
+        * with spaces used to cause the code below to loop indefintely, so
+        * I have corrected for that.  Now, in the event that I missed
+        * something, the server cannot be hung.  -DRP
+        */
+       last = NULL;
+       while ((cp = strchr (cp, tag[0])) != NULL)
+       {
+           if (cp == last) break;
+           if ((cp == rcs->symbols_data || whitespace (cp[-1]))
+               && strncmp (cp, tag, len) == 0
+               && cp[len] == ':')
+           {
+               char *v, *r;
+
+               /* We found the tag.  Return the version number.  */
+
+               cp += len + 1;
+               v = cp;
+               while (! whitespace (*cp) && *cp != '\0')
+                   ++cp;
+               r = xmalloc (cp - v + 1);
+               strncpy (r, v, cp - v);
+               r[cp - v] = '\0';
+               return r;
+           }
+
+           while (! whitespace (*cp) && *cp != '\0')
+               ++cp;
+           if (*cp == '\0')
+               break;
+           last = cp;
+       }
+    }
+
+    return NULL;
+}
+
+
+
+/*
+ * The argument ARG is the getopt remainder of the -k option specified on the
+ * command line.  This function returns malloc'ed space that can be used
+ * directly in calls to RCS V5, with the -k flag munged correctly.
+ */
+char *
+RCS_check_kflag (const char *arg)
+{
+    static const char *const  keyword_usage[] =
+    {
+      "%s %s: invalid RCS keyword expansion mode\n",
+      "Valid expansion modes include:\n",
+      "   -kkv\tGenerate keywords using the default form.\n",
+      "   -kkvl\tLike -kkv, except locker's name inserted.\n",
+      "   -kk\tGenerate only keyword names in keyword strings.\n",
+      "   -kv\tGenerate only keyword values in keyword strings.\n",
+      "   -ko\tGenerate the old keyword string (no changes from checked in 
file).\n",
+      "   -kb\tGenerate binary file unmodified (merges not allowed) (RCS 
5.7).\n",
+      "(Specify the --help global option for a list of other help options)\n",
+      NULL,
+    };
+    char const *const *cpp = NULL;
+
+    if (arg)
+    {
+       for (cpp = kflags; *cpp != NULL; cpp++)
+       {
+           if (STREQ (arg, *cpp))
+               break;
+       }
+    }
+
+    if (arg == NULL || *cpp == NULL)
+    {
+       usage (keyword_usage);
+    }
+
+    return Xasprintf ("-k%s", *cpp);
+}
+
+
+
+/*
+ * Do some consistency checks on the symbolic tag... These should equate
+ * pretty close to what RCS checks, though I don't know for certain.
+ */
+void
+RCS_check_tag (const char *tag)
+{
+    char *invalid = "$,.:;@";          /* invalid RCS tag characters */
+    const char *cp;
+
+    /*
+     * The first character must be an alphabetic letter. The remaining
+     * characters cannot be non-visible graphic characters, and must not be
+     * in the set of "invalid" RCS identifier characters.
+     */
+    if (isalpha ((unsigned char) *tag))
+    {
+       for (cp = tag; *cp; cp++)
+       {
+           if (!isgraph ((unsigned char) *cp))
+               error (1, 0, "tag `%s' has non-visible graphic characters",
+                      tag);
+           if (strchr (invalid, *cp))
+               error (1, 0, "tag `%s' must not contain the characters `%s'",
+                      tag, invalid);
+       }
+    }
+    else
+       error (1, 0, "tag `%s' must start with a letter", tag);
+}
+
+
+
+/*
+ * TRUE if argument has valid syntax for an RCS revision or 
+ * branch number.  All characters must be digits or dots, first 
+ * and last characters must be digits, and no two consecutive 
+ * characters may be dots.
+ *
+ * Intended for classifying things, so this function doesn't 
+ * call error.
+ */
+int 
+RCS_valid_rev (const char *rev)
+{
+   char last, c;
+   last = *rev++;
+   if (!isdigit ((unsigned char) last))
+       return 0;
+   while ((c = *rev++))   /* Extra parens placate -Wall gcc option */
+   {
+       if (c == '.')
+       {
+           if (last == '.')
+               return 0;
+           continue;
+       }
+       last = c;
+       if (!isdigit ((unsigned char) c))
+           return 0;
+   }
+   if (!isdigit ((unsigned char) last))
+       return 0;
+   return 1;
+}
+
+
+
+/*
+ * Return true if RCS revision with TAG is a dead revision.
+ */
+int
+RCS_isdead (RCSNode *rcs, const char *tag)
+{
+    Node *p;
+    RCSVers *version;
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    p = findnode (rcs->versions, tag);
+    if (p == NULL)
+       return 0;
+
+    version = p->data;
+    return version->dead;
+}
+
+
+
+/* Return the RCS keyword expansion mode.  For example "b" for binary.
+   Returns a pointer into storage which is allocated and freed along with
+   the rest of the RCS information; the caller should not modify this
+   storage.  Returns NULL if the RCS file does not specify a keyword
+   expansion mode; for all other errors, die with a fatal error.  */
+char *
+RCS_getexpand (RCSNode *rcs)
+{
+    /* Since RCS_parsercsfile_i now reads expand, don't need to worry
+       about RCS_reparsercsfile.  */
+    assert (rcs != NULL);
+    return rcs->expand;
+}
+
+
+
+/* Set keyword expansion mode to EXPAND.  For example "b" for binary.  */
+void
+RCS_setexpand (RCSNode *rcs, const char *expand)
+{
+    /* Since RCS_parsercsfile_i now reads expand, don't need to worry
+       about RCS_reparsercsfile.  */
+    assert (rcs != NULL);
+    if (rcs->expand != NULL)
+       free (rcs->expand);
+    rcs->expand = xstrdup (expand);
+}
+
+
+
+/* RCS keywords, and a matching enum.  */
+enum keyword
+{
+    KEYWORD_AUTHOR = 0,
+    KEYWORD_DATE,
+    KEYWORD_CVSHEADER,
+    KEYWORD_HEADER,
+    KEYWORD_ID,
+    KEYWORD_LOCKER,
+    KEYWORD_LOG,
+    KEYWORD_NAME,
+    KEYWORD_RCSFILE,
+    KEYWORD_REVISION,
+    KEYWORD_SOURCE,
+    KEYWORD_STATE,
+    KEYWORD_LOCALID
+};
+struct rcs_keyword
+{
+    const char *string;
+    size_t len;
+    enum keyword expandto;
+    bool expandit;
+};
+
+
+
+static inline struct rcs_keyword *
+new_keywords (void)
+{
+    struct rcs_keyword *new;
+    new = xcalloc (KEYWORD_LOCALID + 2, sizeof (struct rcs_keyword));
+
+#define KEYWORD_INIT(k, i, s) \
+       k[i].string = s; \
+       k[i].len = sizeof s - 1; \
+       k[i].expandto = i; \
+       k[i].expandit = true
+
+    KEYWORD_INIT (new, KEYWORD_AUTHOR, "Author");
+    KEYWORD_INIT (new, KEYWORD_DATE, "Date");
+    KEYWORD_INIT (new, KEYWORD_CVSHEADER, "CVSHeader");
+    KEYWORD_INIT (new, KEYWORD_HEADER, "Header");
+    KEYWORD_INIT (new, KEYWORD_ID, "Id");
+    KEYWORD_INIT (new, KEYWORD_LOCKER, "Locker");
+    KEYWORD_INIT (new, KEYWORD_LOG, "Log");
+    KEYWORD_INIT (new, KEYWORD_NAME, "Name");
+    KEYWORD_INIT (new, KEYWORD_RCSFILE, "RCSfile");
+    KEYWORD_INIT (new, KEYWORD_REVISION, "Revision");
+    KEYWORD_INIT (new, KEYWORD_SOURCE, "Source");
+    KEYWORD_INIT (new, KEYWORD_STATE, "State");
+
+    return new;
+}
+
+
+
+void
+free_keywords (void *keywords)
+{
+    free (keywords);
+}
+
+
+
+/* Convert an RCS date string into a readable string.  This is like
+   the RCS date2str function.  */
+static char *
+printable_date (const char *rcs_date)
+{
+    int year, mon, mday, hour, min, sec;
+    char buf[100];
+
+    (void) sscanf (rcs_date, SDATEFORM, &year, &mon, &mday, &hour, &min,
+                  &sec);
+    if (year < 1900)
+       year += 1900;
+    sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday,
+            hour, min, sec);
+    return xstrdup (buf);
+}
+
+
+
+/* Escape the characters in a string so that it can be included in an
+   RCS value.  */
+static char *
+escape_keyword_value (const char *value, int *free_value)
+{
+    char *ret, *t;
+    const char *s;
+
+    for (s = value; *s != '\0'; s++)
+    {
+       char c;
+
+       c = *s;
+       if (c == '\t'
+           || c == '\n'
+           || c == '\\'
+           || c == ' '
+           || c == '$')
+       {
+           break;
+       }
+    }
+
+    if (*s == '\0')
+    {
+       *free_value = 0;
+       return (char *) value;
+    }
+
+    ret = xmalloc (strlen (value) * 4 + 1);
+    *free_value = 1;
+
+    for (s = value, t = ret; *s != '\0'; s++, t++)
+    {
+       switch (*s)
+       {
+       default:
+           *t = *s;
+           break;
+       case '\t':
+           *t++ = '\\';
+           *t = 't';
+           break;
+       case '\n':
+           *t++ = '\\';
+           *t = 'n';
+           break;
+       case '\\':
+           *t++ = '\\';
+           *t = '\\';
+           break;
+       case ' ':
+           *t++ = '\\';
+           *t++ = '0';
+           *t++ = '4';
+           *t = '0';
+           break;
+       case '$':
+           *t++ = '\\';
+           *t++ = '0';
+           *t++ = '4';
+           *t = '4';
+           break;
+       }
+    }
+
+    *t = '\0';
+
+    return ret;
+}
+
+
+
+/* Search for keywords in the *LEN bytes starting at *START.  Return the
+ * struct rcs_keyword describing the keyword found, or NULL when none is found.
+ * On return, *START will point to the first character after the `$'
+ * introductin the keyword, *END will point to the trailing `$', and *LEN
+ * will be decremented by the number of characters *START was incremented by.
+ *
+ * Not sure how to delcare *START and *END as const here.  I keep getting
+ * warnings.
+ */
+static const struct rcs_keyword *
+next_keyword (char **start, size_t *len, char **end)
+{
+    char *srch, *srch_next, *s = NULL;
+    size_t srch_len;
+    const struct rcs_keyword *keywords, *keyword = NULL;
+
+    if (!config->keywords) config->keywords = new_keywords ();
+    keywords = config->keywords;
+
+    srch = *start;
+    srch_len = *len;
+    TRACE (TRACE_DATA, "next_keyword: searching `%s'", srch);
+    while ((srch_next = memchr (srch, '$', srch_len)))
+    {
+       const char *send;
+       size_t slen;
+
+       srch_len -= (srch_next + 1) - srch;
+       srch = srch_next + 1;
+
+       /* Look for the first non alphabetic character after the '$'.  */
+       send = srch + srch_len;
+       for (s = srch; s < send; s++)
+           if (!isalpha ((unsigned char) *s))
+               break;
+
+       /* If the first non alphabetic character is not '$' or ':',
+           then this is not an RCS keyword.  */
+       if (s == send || (*s != '$' && *s != ':'))
+           continue;
+
+       /* See if this is one of the keywords.  */
+       slen = s - srch;
+       for (keyword = keywords; keyword->string; keyword++)
+       {
+           if (keyword->expandit
+               && keyword->len == slen
+               && !strncmp (keyword->string, srch, slen))
+           {
+               break;
+           }
+       }
+       if (!keyword->string)
+           continue;
+
+       /* If the keyword ends with a ':', then the old value consists
+           of the characters up to the next '$'.  If there is no '$'
+           before the end of the line, though, then this wasn't an RCS
+           keyword after all.  */
+
+       if (*s == ':')
+       {
+           for (; s < send; s++)
+               if (*s == '$' || *s == '\n')
+                   break;
+           if (s == send || *s != '$')
+               /* not resetting this the last time through this loop can cause
+                * erroneous return codes.
+                */
+               keyword = NULL;
+       }
+
+       if (keyword)
+           break;
+    }
+
+    if (keyword && keyword->string)
+    {
+       *start = srch;
+       *end = s;
+       *len = srch_len;
+       TRACE (TRACE_DATA,
+              "next_keyword: returning keyword `%s' and remainder `%s'",
+              keyword->string, s);
+       return keyword;
+    }
+    /* else */ return NULL;
+}
+
+
+
+bool contains_keyword (char *buf, size_t len)
+{
+    char *s;
+    return !!next_keyword (&buf, &len, &s);
+}
+
+
+
+/* Expand RCS keywords in the memory buffer BUF of length LEN.  This
+   applies to file RCS and version VERS.  If NAME is not NULL, and is
+   not a numeric revision, then it is the symbolic tag used for the
+   checkout.  EXPAND indicates how to expand the keywords.  This
+   function sets *RETBUF and *RETLEN to the new buffer and length.
+   This function may modify the buffer BUF.  If BUF != *RETBUF, then
+   RETBUF is a newly allocated buffer.  */
+static void
+expand_keywords (RCSNode *rcs, RCSVers *ver, const char *name, const char *log,
+                size_t loglen, enum kflag expand, char *buf, size_t len,
+                char **retbuf, size_t *retlen)
+{
+    struct expand_buffer
+    {
+       struct expand_buffer *next;
+       char *data;
+       size_t len;
+       int free_data;
+    } *ebufs = NULL;
+    struct expand_buffer *ebuf_last = NULL;
+    size_t ebuf_len = 0;
+    char *locker;
+    char *srch, *s;
+    size_t srch_len;
+    const struct rcs_keyword *keywords, *keyword;
+
+    if (!config /* For `cvs init', config may not be set.  */
+       ||expand == KFLAG_O || expand == KFLAG_B)
+    {
+       *retbuf = buf;
+       *retlen = len;
+       return;
+    }
+
+    if (!config->keywords) config->keywords = new_keywords ();
+    keywords = config->keywords;
+
+    /* If we are using -kkvl, dig out the locker information if any.  */
+    locker = NULL;
+    if (expand == KFLAG_KVL)
+    {
+       Node *lock;
+       lock = findnode (RCS_getlocks(rcs), ver->version);
+       if (lock != NULL)
+           locker = xstrdup (lock->data);
+    }
+
+    /* RCS keywords look like $STRING$ or $STRING: VALUE$.  */
+    srch = buf;
+    srch_len = len;
+    while ((keyword = next_keyword (&srch, &srch_len, &s)))
+    {
+       char *value;
+       int free_value;
+       char *sub;
+       size_t sublen;
+       
+       /* At this point we must replace the string from SRCH to S
+           with the expansion of the keyword KEYWORD.  */
+
+       /* Get the value to use.  */
+       free_value = 0;
+       if (expand == KFLAG_K)
+           value = NULL;
+       else
+       {
+           switch (keyword->expandto)
+           {
+           default:
+               assert (!"unreached");
+
+           case KEYWORD_AUTHOR:
+               value = ver->author;
+               break;
+
+           case KEYWORD_DATE:
+               value = printable_date (ver->date);
+               free_value = 1;
+               break;
+
+           case KEYWORD_CVSHEADER:
+           case KEYWORD_HEADER:
+           case KEYWORD_ID:
+           case KEYWORD_LOCALID:
+               {
+                   const char *path;
+                   int free_path;
+                   char *date;
+                   char *old_path;
+
+                   old_path = NULL;
+                   if (keyword->expandto == KEYWORD_HEADER)
+                       path = rcs->print_path;
+                   else if (keyword->expandto == KEYWORD_CVSHEADER)
+                       path = getfullCVSname (rcs->print_path, &old_path);
+                   else
+                       path = last_component (rcs->print_path);
+                   path = escape_keyword_value (path, &free_path);
+                   date = printable_date (ver->date);
+                   value = Xasprintf ("%s %s %s %s %s%s%s",
+                                      path, ver->version, date, ver->author,
+                                      ver->state,
+                                      locker != NULL ? " " : "",
+                                      locker != NULL ? locker : "");
+                   if (free_path)
+                       /* If free_path is set then we know we allocated path
+                        * and we can discard the const.
+                        */
+                       free ((char *)path);
+                   if (old_path)
+                       free (old_path);
+                   free (date);
+                   free_value = 1;
+               }
+               break;
+
+           case KEYWORD_LOCKER:
+               value = locker;
+               break;
+
+           case KEYWORD_LOG:
+           case KEYWORD_RCSFILE:
+               value = escape_keyword_value (last_component (rcs->print_path),
+                                             &free_value);
+               break;
+
+           case KEYWORD_NAME:
+               if (name != NULL && ! isdigit ((unsigned char) *name))
+                   value = (char *) name;
+               else
+                   value = NULL;
+               break;
+
+           case KEYWORD_REVISION:
+               value = ver->version;
+               break;
+
+           case KEYWORD_SOURCE:
+               value = escape_keyword_value (rcs->print_path, &free_value);
+               break;
+
+           case KEYWORD_STATE:
+               value = ver->state;
+               break;
+           }
+       }
+
+       sub = xmalloc (keyword->len
+                      + (value == NULL ? 0 : strlen (value))
+                      + 10);
+       if (expand == KFLAG_V)
+       {
+           /* Decrement SRCH and increment S to remove the $
+               characters.  */
+           --srch;
+           ++srch_len;
+           ++s;
+           sublen = 0;
+       }
+       else
+       {
+           strcpy (sub, keyword->string);
+           sublen = strlen (keyword->string);
+           if (expand != KFLAG_K)
+           {
+               sub[sublen] = ':';
+               sub[sublen + 1] = ' ';
+               sublen += 2;
+           }
+       }
+       if (value != NULL)
+       {
+           strcpy (sub + sublen, value);
+           sublen += strlen (value);
+       }
+       if (expand != KFLAG_V && expand != KFLAG_K)
+       {
+           sub[sublen] = ' ';
+           ++sublen;
+           sub[sublen] = '\0';
+       }
+
+       if (free_value)
+           free (value);
+
+       /* The Log keyword requires special handling.  This behaviour
+           is taken from RCS 5.7.  The special log message is what RCS
+           uses for ci -k.  */
+       if (keyword->expandto == KEYWORD_LOG
+           && (sizeof "checked in with -k by " <= loglen
+               || log == NULL
+               || strncmp (log, "checked in with -k by ",
+                           sizeof "checked in with -k by " - 1) != 0))
+       {
+           char *start;
+           char *leader;
+           size_t leader_len, leader_sp_len;
+           const char *logend;
+           const char *snl;
+           int cnl;
+           char *date;
+           const char *sl;
+
+           /* We are going to insert the trailing $ ourselves, before
+               the log message, so we must remove it from S, if we
+               haven't done so already.  */
+           if (expand != KFLAG_V)
+               ++s;
+
+           /* CVS never has empty log messages, but old RCS files might.  */
+           if (log == NULL)
+               log = "";
+
+           /* Find the start of the line.  */
+           start = srch;
+           leader_len = 0;
+           while (start > buf && start[-1] != '\n'
+                  && leader_len <= xsum (config->MaxCommentLeaderLength,
+                                         expand != KFLAG_V ? 1 : 0))
+           {
+               --start;
+               ++leader_len;
+           }
+
+           if (expand != KFLAG_V)
+               /* When automagically determined and !KFLAG_V, we wish to avoid
+                * including the leading `$' of the Log keyword in our leader.
+                */
+               --leader_len;
+
+           /* If the automagically determined leader exceeds the limit set in
+            * CVSROOT/config, try to use a fallback.
+            */
+           if (leader_len > config->MaxCommentLeaderLength)
+           {
+               if (config->UseArchiveCommentLeader && rcs->comment)
+               {
+                   leader = xstrdup (rcs->comment);
+                   leader_len = strlen (rcs->comment);
+               }
+               else
+               {
+                   error (0, 0,
+"Skipping `$" "Log$' keyword due to excessive comment leader.");
+                   continue;
+               }
+           }
+           else /* leader_len <= config->MaxCommentLeaderLength */
+           {
+               /* Copy the start of the line to use as a comment leader.  */
+               leader = xmalloc (leader_len);
+               memcpy (leader, start, leader_len);
+           }
+
+           leader_sp_len = leader_len;
+           while (leader_sp_len > 0 && isspace (leader[leader_sp_len - 1]))
+               --leader_sp_len;
+
+           /* RCS does some checking for an old style of Log here,
+              but we don't bother.  RCS issues a warning if it
+              changes anything.  */
+
+           /* Count the number of newlines in the log message so that
+              we know how many copies of the leader we will need.  */
+           cnl = 0;
+           logend = log + loglen;
+           for (snl = log; snl < logend; snl++)
+               if (*snl == '\n')
+                   ++cnl;
+
+           /* If the log message did not end in a newline, increment
+            * the newline count so we have space for the extra leader.
+            * Failure to do so results in a buffer overrun.
+            */
+           if (loglen && snl[-1] != '\n')
+               ++cnl;
+
+           date = printable_date (ver->date);
+           sub = xrealloc (sub,
+                           (sublen
+                            + sizeof "Revision"
+                            + strlen (ver->version)
+                            + strlen (date)
+                            + strlen (ver->author)
+                            + loglen
+                              /* Use CNL + 2 below:  One leader for each log
+                               * line, plus the Revision/Author/Date line,
+                               * plus a trailing blank line.
+                               */
+                            + (cnl + 2) * leader_len
+                            + 20));
+           if (expand != KFLAG_V)
+           {
+               sub[sublen] = '$';
+               ++sublen;
+           }
+           sub[sublen] = '\n';
+           ++sublen;
+           memcpy (sub + sublen, leader, leader_len);
+           sublen += leader_len;
+           sprintf (sub + sublen, "Revision %s  %s  %s\n",
+                    ver->version, date, ver->author);
+           sublen += strlen (sub + sublen);
+           free (date);
+
+           sl = log;
+           while (sl < logend)
+           {
+               if (*sl == '\n')
+               {
+                   memcpy (sub + sublen, leader, leader_sp_len);
+                   sublen += leader_sp_len;
+                   sub[sublen] = '\n';
+                   ++sublen;
+                   ++sl;
+               }
+               else
+               {
+                   const char *slnl;
+
+                   memcpy (sub + sublen, leader, leader_len);
+                   sublen += leader_len;
+                   for (slnl = sl; slnl < logend && *slnl != '\n'; ++slnl)
+                       ;
+                   if (slnl < logend)
+                       ++slnl;
+                   memcpy (sub + sublen, sl, slnl - sl);
+                   sublen += slnl - sl;
+                   if (slnl == logend && slnl[-1] != '\n')
+                   {
+                       /* There was no EOL at the end of the log message.  Add
+                        * one.
+                        */
+                       sub[sublen] = '\n';
+                       ++sublen;
+                   }
+                   sl = slnl;
+               }
+           }
+
+           memcpy (sub + sublen, leader, leader_sp_len);
+           sublen += leader_sp_len;
+
+           free (leader);
+       }
+
+       /* Now SUB contains a string which is to replace the string
+          from SRCH to S.  SUBLEN is the length of SUB.  */
+
+       if (srch + sublen == s)
+       {
+           memcpy (srch, sub, sublen);
+           free (sub);
+       }
+       else
+       {
+           struct expand_buffer *ebuf;
+
+           /* We need to change the size of the buffer.  We build a
+               list of expand_buffer structures.  Each expand_buffer
+               structure represents a portion of the final output.  We
+               concatenate them back into a single buffer when we are
+               done.  This minimizes the number of potentially large
+               buffer copies we must do.  */
+
+           if (ebufs == NULL)
+           {
+               ebufs = xmalloc (sizeof *ebuf);
+               ebufs->next = NULL;
+               ebufs->data = buf;
+               ebufs->free_data = 0;
+               ebuf_len = srch - buf;
+               ebufs->len = ebuf_len;
+               ebuf_last = ebufs;
+           }
+           else
+           {
+               assert (srch >= ebuf_last->data);
+               assert (srch <= ebuf_last->data + ebuf_last->len);
+               ebuf_len -= ebuf_last->len - (srch - ebuf_last->data);
+               ebuf_last->len = srch - ebuf_last->data;
+           }
+
+           ebuf = xmalloc (sizeof *ebuf);
+           ebuf->data = sub;
+           ebuf->len = sublen;
+           ebuf->free_data = 1;
+           ebuf->next = NULL;
+           ebuf_last->next = ebuf;
+           ebuf_last = ebuf;
+           ebuf_len += sublen;
+
+           ebuf = xmalloc (sizeof *ebuf);
+           ebuf->data = s;
+           ebuf->len = srch_len - (s - srch);
+           ebuf->free_data = 0;
+           ebuf->next = NULL;
+           ebuf_last->next = ebuf;
+           ebuf_last = ebuf;
+           ebuf_len += srch_len - (s - srch);
+       }
+
+       srch_len -= (s - srch);
+       srch = s;
+    }
+
+    if (locker != NULL)
+       free (locker);
+
+    if (ebufs == NULL)
+    {
+       *retbuf = buf;
+       *retlen = len;
+    }
+    else
+    {
+       char *ret;
+
+       ret = xmalloc (ebuf_len);
+       *retbuf = ret;
+       *retlen = ebuf_len;
+       while (ebufs != NULL)
+       {
+           struct expand_buffer *next;
+
+           memcpy (ret, ebufs->data, ebufs->len);
+           ret += ebufs->len;
+           if (ebufs->free_data)
+               free (ebufs->data);
+           next = ebufs->next;
+           free (ebufs);
+           ebufs = next;
+       }
+    }
+}
+
+
+
+/* Check out a revision from an RCS file.
+
+   If PFN is not NULL, then ignore WORKFILE and SOUT.  Call PFN zero
+   or more times with the contents of the file.  CALLERDAT is passed,
+   uninterpreted, to PFN.  (The current code will always call PFN
+   exactly once for a non empty file; however, the current code
+   assumes that it can hold the entire file contents in memory, which
+   is not a good assumption, and might change in the future).
+
+   Otherwise, if WORKFILE is not NULL, check out the revision to
+   WORKFILE.  However, if WORKFILE is not NULL, and noexec is set,
+   then don't do anything.
+
+   Otherwise, if WORKFILE is NULL, check out the revision to SOUT.  If
+   SOUT is RUN_TTY, then write the contents of the revision to
+   standard output.  When using SOUT, the output is generally a
+   temporary file; don't bother to get the file modes correct.  When
+   NOEXEC is set, WORKFILEs are not written but SOUTs are.
+
+   REV is the numeric revision to check out.  It may be NULL, which
+   means to check out the head of the default branch.
+
+   If NAMETAG is not NULL, and is not a numeric revision, then it is
+   the tag that should be used when expanding the RCS Name keyword.
+
+   OPTIONS is a string such as "-kb" or "-kv" for keyword expansion
+   options.  It may be NULL to use the default expansion mode of the
+   file, typically "-kkv".
+
+   On an error which prevented checking out the file, either print a
+   nonfatal error and return 1, or give a fatal error.  On success,
+   return 0.  */
+
+/* This function mimics the behavior of `rcs co' almost exactly.  The
+   chief difference is in its support for preserving file ownership,
+   permissions, and special files across checkin and checkout -- see
+   comments in RCS_checkin for some issues about this. -twp */
+int
+RCS_checkout (RCSNode *rcs, const char *workfile, const char *rev,
+              const char *nametag, const char *options, const char *sout,
+              RCSCHECKOUTPROC pfn, void *callerdat)
+{
+    int free_rev = 0;
+    enum kflag expand;
+    FILE *fp,
+        *ofp = NULL; /* Initialize since -Wall doesn't understand that
+                      * error (1, ...) does not return.
+                      */
+    struct stat sb;
+    struct rcsbuffer rcsbuf;
+    char *key;
+    char *value;
+    size_t len;
+    int free_value = 0;
+    char *log = NULL;
+    size_t loglen = 0;
+    Node *vp = NULL;
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    uid_t rcs_owner = (uid_t) -1;
+    gid_t rcs_group = (gid_t) -1;
+    mode_t rcs_mode;
+    int change_rcs_owner_or_group = 0;
+    int change_rcs_mode = 0;
+    int special_file = 0;
+    unsigned long devnum_long;
+    dev_t devnum = 0;
+#endif
+
+    TRACE (TRACE_FUNCTION, "RCS_checkout (%s, %s, %s, %s, %s)",
+          rcs->path,
+          rev != NULL ? rev : "",
+          nametag != NULL ? nametag : "",
+          options != NULL ? options : "",
+          (pfn != NULL ? "(function)"
+           : (workfile != NULL ? workfile
+              : (sout != RUN_TTY ? sout
+                 : "(stdout)"))));
+
+    assert (rev == NULL || isdigit ((unsigned char) *rev));
+
+    if (noexec && !server_active && workfile != NULL)
+       return 0;
+
+    assert (sout == RUN_TTY || workfile == NULL);
+    assert (pfn == NULL || (sout == RUN_TTY && workfile == NULL));
+
+    /* Some callers, such as Checkin or remove_file, will pass us a
+       branch.  */
+    if (rev != NULL && (numdots (rev) & 1) == 0)
+    {
+       rev = RCS_getbranch (rcs, rev, 1);
+       if (rev == NULL)
+           error (1, 0, "internal error: bad branch tag in checkout");
+       free_rev = 1;
+    }
+
+    if (rev == NULL || STREQ (rev, rcs->head))
+    {
+       int gothead;
+
+       /* We want the head revision.  Try to read it directly.  */
+
+       if (rcs->flags & PARTIAL)
+           RCS_reparsercsfile (rcs, &fp, &rcsbuf);
+       else
+           rcsbuf_cache_open (rcs, rcs->delta_pos, &fp, &rcsbuf);
+
+       gothead = 0;
+       if (! rcsbuf_getrevnum (&rcsbuf, &key))
+           error (1, 0, "unexpected EOF reading %s", rcs->print_path);
+       while (rcsbuf_getkey (&rcsbuf, &key, &value))
+       {
+           if (STREQ (key, "log"))
+           {
+               if (log)
+               {
+                   error (0, 0,
+"Duplicate log keyword found for head revision in RCS file.");
+                   free (log);
+               }
+               log = rcsbuf_valcopy (&rcsbuf, value, 0, &loglen);
+           }
+           else if (STREQ (key, "text"))
+           {
+               gothead = 1;
+               break;
+           }
+       }
+
+       if (! gothead)
+       {
+           error (0, 0, "internal error: cannot find head text");
+           if (free_rev)
+               /* It's okay to discard the const when free_rev is set, because
+                * we know we allocated it in this function.
+                */
+               free ((char *)rev);
+           return 1;
+       }
+
+       rcsbuf_valpolish (&rcsbuf, value, 0, &len);
+
+       if (fstat (fileno (fp), &sb) < 0)
+           error (1, errno, "cannot fstat %s", rcs->path);
+
+       rcsbuf_cache (rcs, &rcsbuf);
+    }
+    else
+    {
+       struct rcsbuffer *rcsbufp;
+
+       /* It isn't the head revision of the trunk.  We'll need to
+          walk through the deltas.  */
+
+       fp = NULL;
+       if (rcs->flags & PARTIAL)
+           RCS_reparsercsfile (rcs, &fp, &rcsbuf);
+
+       if (fp == NULL)
+       {
+           /* If RCS_deltas didn't close the file, we could use fstat
+              here too.  Probably should change it thusly....  */
+           if (stat (rcs->path, &sb) < 0)
+               error (1, errno, "cannot stat %s", rcs->path);
+           rcsbufp = NULL;
+       }
+       else
+       {
+           if (fstat (fileno (fp), &sb) < 0)
+               error (1, errno, "cannot fstat %s", rcs->path);
+           rcsbufp = &rcsbuf;
+       }
+
+       RCS_deltas (rcs, fp, rcsbufp, rev, RCS_FETCH, &value, &len,
+                   &log, &loglen);
+       free_value = 1;
+    }
+
+    /* If OPTIONS is NULL or the empty string, then the old code would
+       invoke the RCS co program with no -k option, which means that
+       co would use the string we have stored in rcs->expand.  */
+    if ((options == NULL || options[0] == '\0') && rcs->expand == NULL)
+       expand = KFLAG_KV;
+    else
+    {
+       const char *ouroptions;
+       const char * const *cpp;
+
+       if (options != NULL && options[0] != '\0')
+       {
+           assert (options[0] == '-' && options[1] == 'k');
+           ouroptions = options + 2;
+       }
+       else
+           ouroptions = rcs->expand;
+
+       for (cpp = kflags; *cpp != NULL; cpp++)
+           if (STREQ (*cpp, ouroptions))
+               break;
+
+       if (*cpp != NULL)
+           expand = (enum kflag) (cpp - kflags);
+       else
+       {
+           error (0, 0,
+                  "internal error: unsupported substitution string -k%s",
+                  ouroptions);
+           expand = KFLAG_KV;
+       }
+    }
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    /* Handle special files and permissions, if that is desired. */
+    if (preserve_perms)
+    {
+       RCSVers *vers;
+       Node *info;
+
+       vp = findnode (rcs->versions, rev == NULL ? rcs->head : rev);
+       if (vp == NULL)
+           error (1, 0, "internal error: no revision information for %s",
+                  rev == NULL ? rcs->head : rev);
+       vers = vp->data;
+
+       /* First we look for symlinks, which are simplest to handle. */
+       info = findnode (vers->other_delta, "symlink");
+       if (info != NULL)
+       {
+           char *dest;
+
+           if (pfn != NULL || (workfile == NULL && sout == RUN_TTY))
+               error (1, 0, "symbolic link %s:%s cannot be piped",
+                      rcs->path, vers->version);
+           if (workfile == NULL)
+               dest = sout;
+           else
+               dest = workfile;
+
+           /* Remove `dest', just in case.  It's okay to get ENOENT here,
+              since we just want the file not to be there.  (TODO: decide
+              whether it should be considered an error for `dest' to exist
+              at this point.  If so, the unlink call should be removed and
+              `symlink' should signal the error. -twp) */
+           if (CVS_UNLINK (dest) < 0 && !existence_error (errno))
+               error (1, errno, "cannot remove %s", dest);
+           if (symlink (info->data, dest) < 0)
+               error (1, errno, "cannot create symbolic link from %s to %s",
+                      dest, (char *)info->data);
+           if (free_value)
+               free (value);
+           if (free_rev)
+               /* It's okay to discard the const when free_rev is set, because
+                * we know we allocated it in this function.
+                */
+               free ((char *)rev);
+           return 0;
+       }
+
+       /* Next, we look at this file's hardlinks field, and see whether
+          it is linked to any other file that has been checked out.
+          If so, we don't do anything else -- just link it to that file.
+
+          If we are checking out a file to a pipe or temporary storage,
+          none of this should matter.  Hence the `workfile != NULL'
+          wrapper around the whole thing. -twp */
+
+       if (workfile != NULL)
+       {
+           List *links = vers->hardlinks;
+           if (links != NULL)
+           {
+               Node *uptodate_link;
+
+               /* For each file in the hardlinks field, check to see
+                  if it exists, and if so, if it has been checked out
+                  this iteration.  When walklist returns, uptodate_link
+                  should point to a hardlist node representing a file
+                  in `links' which has recently been checked out, or
+                  NULL if no file in `links' has yet been checked out. */
+
+               uptodate_link = NULL;
+               (void) walklist (links, find_checkedout_proc, &uptodate_link);
+               dellist (&links);
+
+               /* If we've found a file that `workfile' is supposed to be
+                  linked to, and it has been checked out since CVS was
+                  invoked, then simply link workfile to that file and return.
+
+                  If one of these conditions is not met, then
+                  workfile is the first one in its hardlink group to
+                  be checked out, and we must continue with a full
+                  checkout. */
+
+               if (uptodate_link != NULL)
+               {
+                   struct hardlink_info *hlinfo = uptodate_link->data;
+
+                   if (link (uptodate_link->key, workfile) < 0)
+                       error (1, errno, "cannot link %s to %s",
+                              workfile, uptodate_link->key);
+                   hlinfo->checked_out = 1;    /* probably unnecessary */
+                   if (free_value)
+                       free (value);
+                   if (free_rev)
+                       /* It's okay to discard the const when free_rev is set,
+                        * because we know we allocated it in this function.
+                        */
+                       free ((char *)rev);
+                   return 0;
+               }
+           }
+       }
+
+       info = findnode (vers->other_delta, "owner");
+       if (info != NULL)
+       {
+           change_rcs_owner_or_group = 1;
+           rcs_owner = (uid_t) strtoul (info->data, NULL, 10);
+       }
+       info = findnode (vers->other_delta, "group");
+       if (info != NULL)
+       {
+           change_rcs_owner_or_group = 1;
+           rcs_group = (gid_t) strtoul (info->data, NULL, 10);
+       }
+       info = findnode (vers->other_delta, "permissions");
+       if (info != NULL)
+       {
+           change_rcs_mode = 1;
+           rcs_mode = (mode_t) strtoul (info->data, NULL, 8);
+       }
+       info = findnode (vers->other_delta, "special");
+       if (info != NULL)
+       {
+           /* If the size of `devtype' changes, fix the sscanf call also */
+           char devtype[16];
+
+           if (sscanf (info->data, "%15s %lu",
+                       devtype, &devnum_long) < 2)
+               error (1, 0, "%s:%s has bad `special' newphrase %s",
+                      workfile, vers->version, (char *)info->data);
+           devnum = devnum_long;
+           if (STREQ (devtype, "character"))
+               special_file = S_IFCHR;
+           else if (STREQ (devtype, "block"))
+               special_file = S_IFBLK;
+           else
+               error (0, 0, "%s is a special file of unsupported type `%s'",
+                      workfile, (char *)info->data);
+       }
+    }
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+
+    if (expand != KFLAG_O && expand != KFLAG_B)
+    {
+       char *newvalue;
+
+       /* Don't fetch the delta node again if we already have it. */
+       if (vp == NULL)
+       {
+           vp = findnode (rcs->versions, rev == NULL ? rcs->head : rev);
+           if (vp == NULL)
+               error (1, 0, "internal error: no revision information for %s",
+                      rev == NULL ? rcs->head : rev);
+       }
+
+       expand_keywords (rcs, vp->data, nametag, log, loglen,
+                        expand, value, len, &newvalue, &len);
+
+       if (newvalue != value)
+       {
+           if (free_value)
+               free (value);
+           value = newvalue;
+           free_value = 1;
+       }
+    }
+
+    if (free_rev)
+       /* It's okay to discard the const when free_rev is set, because
+        * we know we allocated it in this function.
+        */
+       free ((char *)rev);
+
+    if (log != NULL)
+    {
+       free (log);
+       log = NULL;
+    }
+
+    if (pfn != NULL)
+    {
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       if (special_file)
+           error (1, 0, "special file %s cannot be piped to anything",
+                  rcs->path);
+#endif
+       /* The PFN interface is very simple to implement right now, as
+           we always have the entire file in memory.  */
+       if (len != 0)
+           pfn (callerdat, value, len);
+    }
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    else if (special_file)
+    {
+# ifdef HAVE_MKNOD
+       char *dest;
+
+       /* Can send either to WORKFILE or to SOUT, as long as SOUT is
+          not RUN_TTY. */
+       dest = workfile;
+       if (dest == NULL)
+       {
+           if (sout == RUN_TTY)
+               error (1, 0, "special file %s cannot be written to stdout",
+                      rcs->path);
+           dest = sout;
+       }
+
+       /* Unlink `dest', just in case.  It's okay if this provokes a
+          ENOENT error. */
+       if (CVS_UNLINK (dest) < 0 && existence_error (errno))
+           error (1, errno, "cannot remove %s", dest);
+       if (mknod (dest, special_file, devnum) < 0)
+           error (1, errno, "could not create special file %s",
+                  dest);
+# else
+       error (1, 0,
+"cannot create %s: unable to create special files on this system",
+workfile);
+# endif
+    }
+#endif
+    else
+    {
+       /* Not a special file: write to WORKFILE or SOUT. */
+       if (workfile == NULL)
+       {
+           if (sout == RUN_TTY)
+               ofp = stdout;
+           else
+           {
+               /* Symbolic links should be removed before replacement, so that
+                  `fopen' doesn't follow the link and open the wrong file. */
+               if (islink (sout))
+                   if (unlink_file (sout) < 0)
+                       error (1, errno, "cannot remove %s", sout);
+               ofp = CVS_FOPEN (sout, expand == KFLAG_B ? "wb" : "w");
+               if (ofp == NULL)
+                   error (1, errno, "cannot open %s", sout);
+           }
+       }
+       else
+       {
+           /* Output is supposed to go to WORKFILE, so we should open that
+              file.  Symbolic links should be removed first (see above). */
+           if (islink (workfile))
+               if (unlink_file (workfile) < 0)
+                   error (1, errno, "cannot remove %s", workfile);
+
+           ofp = CVS_FOPEN (workfile, expand == KFLAG_B ? "wb" : "w");
+
+           /* If the open failed because the existing workfile was not
+              writable, try to chmod the file and retry the open.  */
+           if (ofp == NULL && errno == EACCES
+               && isfile (workfile) && !iswritable (workfile))
+           {
+               xchmod (workfile, 1);
+               ofp = CVS_FOPEN (workfile, expand == KFLAG_B ? "wb" : "w");
+           }
+
+           if (ofp == NULL)
+           {
+               error (0, errno, "cannot open %s", workfile);
+               if (free_value)
+                   free (value);
+               return 1;
+           }
+       }
+
+       if (workfile == NULL && sout == RUN_TTY)
+       {
+           if (expand == KFLAG_B)
+               cvs_output_binary (value, len);
+           else
+           {
+               /* cvs_output requires the caller to check for zero
+                  length.  */
+               if (len > 0)
+                   cvs_output (value, len);
+           }
+       }
+       else
+       {
+           /* NT 4.0 is said to have trouble writing 2099999 bytes
+              (for example) in a single fwrite.  So break it down
+              (there is no need to be writing that much at once
+              anyway; it is possible that LARGEST_FWRITE should be
+              somewhat larger for good performance, but for testing I
+              want to start with a small value until/unless a bigger
+              one proves useful).  */
+#define LARGEST_FWRITE 8192
+           size_t nleft = len;
+           size_t nstep = (len < LARGEST_FWRITE ? len : LARGEST_FWRITE);
+           char *p = value;
+
+           while (nleft > 0)
+           {
+               if (fwrite (p, 1, nstep, ofp) != nstep)
+               {
+                   error (0, errno, "cannot write %s",
+                          (workfile != NULL
+                           ? workfile
+                           : (sout != RUN_TTY ? sout : "stdout")));
+                   if (free_value)
+                       free (value);
+                   return 1;
+               }
+               p += nstep;
+               nleft -= nstep;
+               if (nleft < nstep)
+                   nstep = nleft;
+           }
+       }
+    }
+
+    if (free_value)
+       free (value);
+
+    if (workfile != NULL)
+    {
+       int ret;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       if (!special_file && fclose (ofp) < 0)
+       {
+           error (0, errno, "cannot close %s", workfile);
+           return 1;
+       }
+
+       if (change_rcs_owner_or_group)
+       {
+           if (chown (workfile, rcs_owner, rcs_group) < 0)
+               error (0, errno, "could not change owner or group of %s",
+                      workfile);
+       }
+
+       ret = chmod (workfile,
+                    change_rcs_mode
+                    ? rcs_mode
+                    : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
+#else
+       if (fclose (ofp) < 0)
+       {
+           error (0, errno, "cannot close %s", workfile);
+           return 1;
+       }
+
+       ret = chmod (workfile,
+                    sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
+#endif
+       if (ret < 0)
+       {
+           error (0, errno, "cannot change mode of file %s",
+                  workfile);
+       }
+    }
+    else if (sout != RUN_TTY)
+    {
+       if (
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+           !special_file &&
+#endif
+           fclose (ofp) < 0)
+       {
+           error (0, errno, "cannot close %s", sout);
+           return 1;
+       }
+    }
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    /* If we are in the business of preserving hardlinks, then
+       mark this file as having been checked out. */
+    if (preserve_perms && workfile != NULL)
+       update_hardlink_info (workfile);
+#endif
+
+    return 0;
+}
+
+
+
+const char *
+RCS_get_openpgp_signatures (RCSNode *rcs, const char *rev)
+{
+    RCSVers *vers;
+    Node *n;
+
+    n = findnode (rcs->versions, rev);
+    if (!n)
+       error (1, 0, "internal error: no revision information for %s", rev);
+    vers = n->data;
+
+    /* First we look for symlinks, which are simplest to handle. */
+    n = findnode (vers->other_delta, "openpgp-signatures");
+    if (!n)
+       return NULL;
+    /* else */
+
+    return n->data;
+}
+
+
+
+/* Find the delta currently locked by the user.  From the `ci' man page:
+
+       "If rev is omitted, ci tries to  derive  the  new  revision
+        number  from  the  caller's  last lock.  If the caller has
+        locked the tip revision of a branch, the new  revision  is
+        appended  to  that  branch.   The  new  revision number is
+        obtained by incrementing the tip revision number.  If  the
+        caller  locked a non-tip revision, a new branch is started
+        at that revision by incrementing the highest branch number
+        at  that  revision.   The default initial branch and level
+        numbers are 1.
+
+        If rev is omitted and the caller has no lock, but owns the
+        file  and  locking is not set to strict, then the revision
+        is appended to the default branch (normally the trunk; see
+        the -b option of rcs(1))."
+
+   RCS_findlock_or_tip finds the unique revision locked by the caller
+   and returns its delta node.  If the caller has not locked any
+   revisions (and is permitted to commit to an unlocked delta, as
+   described above), return the tip of the default branch. */
+static RCSVers *
+RCS_findlock_or_tip (RCSNode *rcs)
+{
+    char *user = getcaller();
+    Node *lock, *p;
+    List *locklist;
+
+    /* Find unique delta locked by caller. This code is very similar
+       to the code in RCS_unlock -- perhaps it could be abstracted
+       into a RCS_findlock function. */
+    locklist = RCS_getlocks (rcs);
+    lock = NULL;
+    for (p = locklist->list->next; p != locklist->list; p = p->next)
+    {
+       if (STREQ (p->data, user))
+       {
+           if (lock != NULL)
+           {
+               error (0, 0, "\
+%s: multiple revisions locked by %s; please specify one", rcs->print_path, 
user);
+               return NULL;
+           }
+           lock = p;
+       }
+    }
+
+    if (lock != NULL)
+    {
+       /* Found an old lock, but check that the revision still exists. */
+       p = findnode (rcs->versions, lock->key);
+       if (p == NULL)
+       {
+           error (0, 0, "%s: can't unlock nonexistent revision %s",
+                  rcs->print_path,
+                  lock->key);
+           return NULL;
+       }
+       return p->data;
+    }
+
+    /* No existing lock.  The RCS rule is that this is an error unless
+       locking is nonstrict AND the file is owned by the current
+       user.  Trying to determine the latter is a portability nightmare
+       in the face of NT, VMS, AFS, and other systems with non-unix-like
+       ideas of users and owners.  In the case of CVS, we should never get
+       here (as long as the traditional behavior of making sure to call
+       RCS_lock persists).  Anyway, we skip the RCS error checks
+       and just return the default branch or head.  The reasoning is that
+       those error checks are to make users lock before a checkin, and we do
+       that in other ways if at all anyway (e.g. rcslock.pl).  */
+
+    p = findnode (rcs->versions, RCS_getbranch (rcs, rcs->branch, 0));
+    if (!p)
+    {
+       error (0, 0, "RCS file `%s' does not contain its default revision.",
+              rcs->path);
+       return NULL;
+    }
+
+    return p->data;
+}
+
+
+
+/* Revision number string, R, must contain a `.'.
+   Return a newly-malloc'd copy of the prefix of R up
+   to but not including the final `.'.  */
+static char *
+truncate_revnum (const char *r)
+{
+    size_t len;
+    char *new_r;
+    char *dot = strrchr (r, '.');
+
+    assert (dot);
+    len = dot - r;
+    new_r = xmalloc (len + 1);
+    memcpy (new_r, r, len);
+    *(new_r + len) = '\0';
+    return new_r;
+}
+
+
+
+/* Revision number string, R, must contain a `.'.
+   R must be writable.  Replace the rightmost `.' in R with
+   the NUL byte and return a pointer to that NUL byte.  */
+static char *
+truncate_revnum_in_place (char *r)
+{
+    char *dot = strrchr (r, '.');
+    assert (dot);
+    *dot = '\0';
+    return dot;
+}
+
+
+
+/* Revision number strings, R and S, must each contain a `.'.
+   R and S must be writable and must have the same number of dots.
+   Truncate R and S for the comparison, then restored them to their
+   original state.
+   Return the result (see compare_revnums) of comparing R and S
+   ignoring differences in any component after the rightmost `.'.  */
+static int
+compare_truncated_revnums (char *r, char *s)
+{
+    char *r_dot = truncate_revnum_in_place (r);
+    char *s_dot = truncate_revnum_in_place (s);
+    int cmp;
+
+    assert (numdots (r) == numdots (s));
+
+    cmp = compare_revnums (r, s);
+
+    *r_dot = '.';
+    *s_dot = '.';
+
+    return cmp;
+}
+
+
+
+/* Return a malloc'd copy of the string representing the highest branch
+   number on BRANCHNODE.  If there are no branches on BRANCHNODE, return NULL.
+   FIXME: isn't the max rev always the last one?
+   If so, we don't even need a loop.  */
+static char *
+max_rev (const RCSVers *branchnode)
+{
+    Node *head;
+    Node *bp;
+    char *max;
+
+    if (branchnode->branches == NULL)
+    {
+        return NULL;
+    }
+
+    max = NULL;
+    head = branchnode->branches->list;
+    for (bp = head->next; bp != head; bp = bp->next)
+    {
+       if (max == NULL || compare_truncated_revnums (max, bp->key) < 0)
+       {
+           max = bp->key;
+       }
+    }
+    assert (max);
+
+    return truncate_revnum (max);
+}
+
+
+
+/* Create BRANCH in RCS's delta tree.  BRANCH may be either a branch
+   number or a revision number.  In the former case, create the branch
+   with the specified number; in the latter case, create a new branch
+   rooted at node BRANCH with a higher branch number than any others.
+   Return the number of the tip node on the new branch. */
+static char *
+RCS_addbranch (RCSNode *rcs, const char *branch)
+{
+    char *branchpoint, *newrevnum;
+    Node *nodep, *bp;
+    Node *marker;
+    RCSVers *branchnode;
+
+    assert (branch);
+
+    /* Append to end by default.  */
+    marker = NULL;
+
+    branchpoint = xstrdup (branch);
+    if ((numdots (branchpoint) & 1) == 0)
+    {
+       truncate_revnum_in_place (branchpoint);
+    }
+
+    /* Find the branch rooted at BRANCHPOINT. */
+    nodep = findnode (rcs->versions, branchpoint);
+    if (nodep == NULL)
+    {
+       error (0, 0, "%s: can't find branch point %s", rcs->print_path, 
branchpoint);
+       free (branchpoint);
+       return NULL;
+    }
+    free (branchpoint);
+    branchnode = nodep->data;
+
+    /* If BRANCH was a full branch number, make sure it is higher than MAX. */
+    if ((numdots (branch) & 1) == 1)
+    {
+       if (branchnode->branches == NULL)
+       {
+           /* We have to create the first branch on this node, which means
+              appending ".2" to the revision number. */
+           newrevnum = Xasprintf ("%s.2", branch);
+       }
+       else
+       {
+           char *max = max_rev (branchnode);
+           assert (max);
+           newrevnum = increment_revnum (max);
+           free (max);
+       }
+    }
+    else
+    {
+       newrevnum = xstrdup (branch);
+
+       if (branchnode->branches != NULL)
+       {
+           Node *head;
+           Node *bp;
+
+           /* Find the position of this new branch in the sorted list
+              of branches.  */
+           head = branchnode->branches->list;
+           for (bp = head->next; bp != head; bp = bp->next)
+           {
+               char *dot;
+               int found_pos;
+
+               /* The existing list must be sorted on increasing revnum.  */
+               assert (bp->next == head
+                       || compare_truncated_revnums (bp->key,
+                                                     bp->next->key) < 0);
+               dot = truncate_revnum_in_place (bp->key);
+               found_pos = (compare_revnums (branch, bp->key) < 0);
+               *dot = '.';
+
+               if (found_pos)
+               {
+                   break;
+               }
+           }
+           marker = bp;
+       }
+    }
+
+    newrevnum = xrealloc (newrevnum, strlen (newrevnum) + 3);
+    strcat (newrevnum, ".1");
+
+    /* Add this new revision number to BRANCHPOINT's branches list. */
+    if (branchnode->branches == NULL)
+       branchnode->branches = getlist();
+    bp = getnode();
+    bp->key = xstrdup (newrevnum);
+
+    /* Append to the end of the list by default, that is, just before
+       the header node, `list'.  */
+    if (marker == NULL)
+       marker = branchnode->branches->list;
+
+    {
+       int fail;
+       fail = insert_before (branchnode->branches, marker, bp);
+       assert (!fail);
+    }
+
+    return newrevnum;
+}
+
+
+
+/* Check in to RCSFILE with revision REV (which must be greater than
+   the largest revision) and message MESSAGE (which is checked for
+   validity).  If FLAGS & RCS_FLAGS_DEAD, check in a dead revision.
+   If FLAGS & RCS_FLAGS_QUIET, tell ci to be quiet.  If FLAGS &
+   RCS_FLAGS_MODTIME, use the working file's modification time for the
+   checkin time.  WORKFILE is the working file to check in from, or
+   NULL to use the usual RCS rules for deriving it from the RCSFILE.
+   If FLAGS & RCS_FLAGS_KEEPFILE, don't unlink the working file;
+   unlinking the working file is standard RCS behavior, but is rarely
+   appropriate for CVS.
+
+   UPDATE_DIR is used to print the path for the file.  This argument is
+   unnecessary when FLAGS & RCS_FLAGS_QUIET since the path won't be printed
+   anyhow.
+
+   This function should almost exactly mimic the behavior of `rcs ci'.  The
+   principal point of difference is the support here for preserving file
+   ownership and permissions in the delta nodes.  This is not a clean
+   solution -- precisely because it diverges from RCS's behavior -- but
+   it doesn't seem feasible to do this anywhere else in the code. [-twp]
+   
+   Return value is -1 for error (and errno is set to indicate the
+   error), positive for error (and an error message has been printed),
+   or zero for success.  */
+int
+RCS_checkin (RCSNode *rcs, const char *update_dir, const char *workfile_in,
+            const char *message, const char *rev, time_t citime, int flags)
+{
+    RCSVers *delta, *commitpt;
+    Deltatext *dtext;
+    Node *nodep;
+    char *tmpfile, *changefile;
+    int dargc = 0;
+    size_t darg_allocated = 0;
+    char **dargv = NULL;
+    size_t bufsize;
+    int status, checkin_quiet;
+    struct tm *ftm;
+    time_t modtime;
+    int adding_branch = 0;
+    char *workfile = xstrdup (workfile_in);
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    struct stat sb;
+#endif
+    Node *np;
+
+    TRACE (TRACE_FUNCTION, "RCS_checkin (%s, %s, %s, %s, %s)",
+          rcs->print_path, update_dir, workfile_in, message, rev);
+
+    commitpt = NULL;
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* Get basename of working file.  Is there a library function to
+       do this?  I couldn't find one. -twp */
+    if (workfile == NULL)
+    {
+       char *p;
+       int extlen = strlen (RCSEXT);
+       assert (rcs->path);
+       workfile = xstrdup (last_component (rcs->path));
+       p = workfile + (strlen (workfile) - extlen);
+       assert (strncmp (p, RCSEXT, extlen) == 0);
+       *p = '\0';
+    }
+
+    /* If the filename is a symbolic link, follow it and replace it
+       with the destination of the link.  We need to do this before
+       calling rcs_internal_lockfile, or else we won't put the lock in
+       the right place. */
+    resolve_symlink (&(rcs->path));
+
+    checkin_quiet = flags & RCS_FLAGS_QUIET;
+    if (!(checkin_quiet || really_quiet))
+    {
+       cvs_output (rcs->path, 0);
+       cvs_output ("  <--  ", 7);
+       if (update_dir && strlen (update_dir))
+       {
+           cvs_output (update_dir, 0);
+           cvs_output ("/", 1);
+       }
+       cvs_output (workfile, 0);
+       cvs_output ("\n", 1);
+    }
+
+    /* Create new delta node. */
+    delta = xmalloc (sizeof (RCSVers));
+    memset (delta, 0, sizeof (RCSVers));
+    delta->author = xstrdup (getcaller ());
+    if (flags & RCS_FLAGS_MODTIME)
+    {
+       struct stat ws;
+       if (stat (workfile, &ws) < 0)
+       {
+           error (1, errno, "cannot stat %s", workfile);
+       }
+       modtime = ws.st_mtime;
+    }
+    else if (flags & RCS_FLAGS_USETIME)
+       modtime = citime;
+    else
+       (void) time (&modtime);
+    ftm = gmtime (&modtime);
+    delta->date = Xasprintf (DATEFORM,
+                            ftm->tm_year + (ftm->tm_year < 100 ? 0 : 1900),
+                            ftm->tm_mon + 1, ftm->tm_mday, ftm->tm_hour,
+                            ftm->tm_min, ftm->tm_sec);
+    if (flags & RCS_FLAGS_DEAD)
+    {
+       delta->state = xstrdup (RCSDEAD);
+       delta->dead = 1;
+    }
+    else
+       delta->state = xstrdup ("Exp");
+
+    delta->other_delta = getlist();
+
+    /* save the commit ID */
+    np = getnode();
+    np->type = RCSFIELD;
+    np->key = xstrdup ("commitid");
+    np->data = xstrdup(global_session_id);
+    addnode (delta->other_delta, np);
+
+    /* Save the OpenPGP signature.  */
+    if (get_sign_commits (server_active, true)
+       || have_sigfile (server_active, workfile))
+    {
+       char *rawsig;
+       size_t rawlen;
+
+       np = getnode();
+       np->type = RCSSTRING;
+       np->key = xstrdup ("openpgp-signatures");
+       rawsig = get_signature (server_active, "", workfile,
+                               rcs->expand && STREQ (rcs->expand, "b"),
+                               &rawlen);
+       np->len = base64_encode_alloc (rawsig, rawlen, (char **)&np->data);
+       free (rawsig);
+       addnode (delta->other_delta, np);
+    }
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    /* If permissions should be preserved on this project, then
+       save the permission info. */
+    if (preserve_perms)
+    {
+       Node *np;
+       char buf[64];   /* static buffer should be safe: see usage. -twp */
+
+       delta->other_delta = getlist();
+
+       if (lstat (workfile, &sb) < 0)
+           error (1, errno, "cannot lstat %s", workfile);
+
+       if (S_ISLNK (sb.st_mode))
+       {
+           np = getnode();
+           np->type = RCSFIELD;
+           np->key = xstrdup ("symlink");
+           np->data = Xreadlink (workfile, sb.st_size);
+           addnode (delta->other_delta, np);
+       }
+       else
+       {
+           (void) sprintf (buf, "%u", sb.st_uid);
+           np = getnode();
+           np->type = RCSFIELD;
+           np->key = xstrdup ("owner");
+           np->data = xstrdup (buf);
+           addnode (delta->other_delta, np);
+
+           (void) sprintf (buf, "%u", sb.st_gid);
+           np = getnode();
+           np->type = RCSFIELD;
+           np->key = xstrdup ("group");
+           np->data = xstrdup (buf);
+           addnode (delta->other_delta, np);
+           
+           (void) sprintf (buf, "%o", sb.st_mode & 07777);
+           np = getnode();
+           np->type = RCSFIELD;
+           np->key = xstrdup ("permissions");
+           np->data = xstrdup (buf);
+           addnode (delta->other_delta, np);
+
+           /* Save device number. */
+           switch (sb.st_mode & S_IFMT)
+           {
+               case S_IFREG: break;
+               case S_IFCHR:
+               case S_IFBLK:
+# ifdef HAVE_STRUCT_STAT_ST_RDEV
+                   np = getnode();
+                   np->type = RCSFIELD;
+                   np->key = xstrdup ("special");
+                   sprintf (buf, "%s %lu",
+                            ((sb.st_mode & S_IFMT) == S_IFCHR
+                             ? "character" : "block"),
+                            (unsigned long) sb.st_rdev);
+                   np->data = xstrdup (buf);
+                   addnode (delta->other_delta, np);
+# else
+                   error (0, 0,
+"can't preserve %s: unable to save device files on this system",
+workfile);
+# endif
+                   break;
+
+               default:
+                   error (0, 0, "special file %s has unknown type", workfile);
+           }
+
+           /* Save hardlinks. */
+           delta->hardlinks = list_linked_files_on_disk (workfile);
+       }
+    }
+#endif
+
+    /* Create a new deltatext node. */
+    dtext = xmalloc (sizeof (Deltatext));
+    memset (dtext, 0, sizeof (Deltatext));
+
+    dtext->log = make_message_rcsvalid (message);
+
+    /* If the delta tree is empty, then there's nothing to link the
+       new delta into.  So make a new delta tree, snarf the working
+       file contents, and just write the new RCS file. */
+    if (rcs->head == NULL)
+    {
+       char *newrev;
+       FILE *fout;
+
+       /* Figure out what the first revision number should be. */
+       if (rev == NULL || *rev == '\0')
+           newrev = xstrdup ("1.1");
+       else if (numdots (rev) == 0)
+       {
+           newrev = Xasprintf ("%s.1", rev);
+       }
+       else
+           newrev = xstrdup (rev);
+
+       /* Don't need to xstrdup NEWREV because it's already dynamic, and
+          not used for anything else.  (Don't need to free it, either.) */
+       rcs->head = newrev;
+       delta->version = xstrdup (newrev);
+       nodep = getnode();
+       nodep->type = RCSVERS;
+       nodep->delproc = rcsvers_delproc;
+       nodep->data = delta;
+       nodep->key = delta->version;
+       (void) addnode (rcs->versions, nodep);
+
+       dtext->version = xstrdup (newrev);
+       bufsize = 0;
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       if (preserve_perms && !S_ISREG (sb.st_mode))
+           /* Pretend file is empty.  */
+           bufsize = 0;
+       else
+#endif
+       get_file (workfile, workfile,
+                 rcs->expand != NULL && STREQ (rcs->expand, "b") ? "rb" : "r",
+                 &dtext->text, &bufsize, &dtext->len);
+
+       if (!(checkin_quiet || really_quiet))
+       {
+           cvs_output ("initial revision: ", 0);
+           cvs_output (rcs->head, 0);
+           cvs_output ("\n", 1);
+       }
+
+       /* We are probably about to invalidate any cached file.  */
+       rcsbuf_cache_close ();
+
+       fout = rcs_internal_lockfile (rcs->path);
+       RCS_putadmin (rcs, fout);
+       RCS_putdtree (rcs, rcs->head, fout);
+       RCS_putdesc (rcs, fout);
+       rcs->delta_pos = ftello (fout);
+       if (rcs->delta_pos == -1)
+           error (1, errno, "cannot ftello for %s", rcs->path);
+       putdeltatext (fout, dtext);
+       rcs_internal_unlockfile (fout, rcs->path);
+
+       if ((flags & RCS_FLAGS_KEEPFILE) == 0)
+       {
+           if (unlink_file (workfile) < 0)
+               /* FIXME-update-dir: message does not include update_dir.  */
+               error (0, errno, "cannot remove %s", workfile);
+       }
+
+       status = 0;
+       goto checkin_done;
+    }
+
+    /* Derive a new revision number.  From the `ci' man page:
+
+        "If rev  is  a revision number, it must be higher than the
+        latest one on the branch to which  rev  belongs,  or  must
+        start a new branch.
+
+        If  rev is a branch rather than a revision number, the new
+        revision is appended to that branch.  The level number  is
+        obtained  by  incrementing the tip revision number of that
+        branch.  If rev  indicates  a  non-existing  branch,  that
+        branch  is  created  with  the  initial  revision numbered
+        rev.1."
+
+       RCS_findlock_or_tip handles the case where REV is omitted.
+       RCS 5.7 also permits REV to be "$" or to begin with a dot, but
+       we do not address those cases -- every routine that calls
+       RCS_checkin passes it a numeric revision. */
+
+    if (rev == NULL || *rev == '\0')
+    {
+       /* Figure out where the commit point is by looking for locks.
+          If the commit point is at the tip of a branch (or is the
+          head of the delta tree), then increment its revision number
+          to obtain the new revnum.  Otherwise, start a new
+          branch. */
+       commitpt = RCS_findlock_or_tip (rcs);
+       if (commitpt == NULL)
+       {
+           status = 1;
+           goto checkin_done;
+       }
+       else if (commitpt->next == NULL
+                || STREQ (commitpt->version, rcs->head))
+           delta->version = increment_revnum (commitpt->version);
+       else
+           delta->version = RCS_addbranch (rcs, commitpt->version);
+    }
+    else
+    {
+       /* REV is either a revision number or a branch number.  Find the
+          tip of the target branch. */
+       char *branch, *tip, *newrev, *p;
+       int dots, isrevnum;
+
+       assert (isdigit ((unsigned char) *rev));
+
+       newrev = xstrdup (rev);
+       dots = numdots (newrev);
+       isrevnum = dots & 1;
+
+       branch = xstrdup (rev);
+       if (isrevnum)
+       {
+           p = strrchr (branch, '.');
+           *p = '\0';
+       }
+
+       /* Find the tip of the target branch.  If we got a one- or two-digit
+          revision number, this will be the head of the tree.  Exception:
+          if rev is a single-field revision equal to the branch number of
+          the trunk (usually "1") then we want to treat it like an ordinary
+          branch revision. */
+       if (dots == 0)
+       {
+           tip = xstrdup (rcs->head);
+           if (atoi (tip) != atoi (branch))
+           {
+               newrev = xrealloc (newrev, strlen (newrev) + 3);
+               strcat (newrev, ".1");
+               dots = isrevnum = 1;
+           }
+       }
+       else if (dots == 1)
+           tip = xstrdup (rcs->head);
+       else
+           tip = RCS_getbranch (rcs, branch, 1);
+
+       /* If the branch does not exist, and we were supplied an exact
+          revision number, signal an error.  Otherwise, if we were
+          given only a branch number, create it and set COMMITPT to
+          the branch point. */
+       if (tip == NULL)
+       {
+           if (isrevnum)
+           {
+               error (0, 0, "%s: can't find branch point %s",
+                      rcs->print_path, branch);
+               free (branch);
+               free (newrev);
+               status = 1;
+               goto checkin_done;
+           }
+           delta->version = RCS_addbranch (rcs, branch);
+           if (!delta->version)
+           {
+               free (branch);
+               free (newrev);
+               status = 1;
+               goto checkin_done;
+           }
+           adding_branch = 1;
+           p = strrchr (branch, '.');
+           *p = '\0';
+           tip = xstrdup (branch);
+       }
+       else
+       {
+           if (isrevnum)
+           {
+               /* NEWREV must be higher than TIP. */
+               if (compare_revnums (tip, newrev) >= 0)
+               {
+                   error (0, 0,
+                          "%s: revision %s too low; must be higher than %s",
+                          rcs->print_path,
+                          newrev, tip);
+                   free (branch);
+                   free (newrev);
+                   free (tip);
+                   status = 1;
+                   goto checkin_done;
+               }
+               delta->version = xstrdup (newrev);
+           }
+           else
+               /* Just increment the tip number to get the new revision. */
+               delta->version = increment_revnum (tip);
+       }
+
+       nodep = findnode (rcs->versions, tip);
+       commitpt = nodep->data;
+
+       free (branch);
+       free (newrev);
+       free (tip);
+    }
+
+    assert (delta->version != NULL);
+
+    /* If COMMITPT is locked by us, break the lock.  If it's locked
+       by someone else, signal an error. */
+    nodep = findnode (RCS_getlocks (rcs), commitpt->version);
+    if (nodep != NULL)
+    {
+       if (! STREQ (nodep->data, delta->author))
+       {
+           /* If we are adding a branch, then leave the old lock around.
+              That is sensible in the sense that when adding a branch,
+              we don't need to use the lock to tell us where to check
+              in.  It is fishy in the sense that if it is our own lock,
+              we break it.  However, this is the RCS 5.7 behavior (at
+              the end of addbranch in ci.c in RCS 5.7, it calls
+              removelock only if it is our own lock, not someone
+              else's).  */
+
+           if (!adding_branch)
+           {
+               error (0, 0, "%s: revision %s locked by %s",
+                      rcs->print_path,
+                      nodep->key, (char *)nodep->data);
+               status = 1;
+               goto checkin_done;
+           }
+       }
+       else
+           delnode (nodep);
+    }
+
+    dtext->version = xstrdup (delta->version);
+
+    /* Obtain the change text for the new delta.  If DELTA is to be the
+       new head of the tree, then its change text should be the contents
+       of the working file, and LEAFNODE's change text should be a diff.
+       Else, DELTA's change text should be a diff between LEAFNODE and
+       the working file. */
+
+    tmpfile = cvs_temp_name();
+    status = RCS_checkout (rcs, NULL, commitpt->version, NULL,
+                          ((rcs->expand != NULL
+                            && STREQ (rcs->expand, "b"))
+                           ? "-kb"
+                           : "-ko"),
+                          tmpfile,
+                          NULL, NULL);
+    if (status != 0)
+       error (1, 0,
+              "could not check out revision %s of `%s'",
+              commitpt->version, rcs->print_path);
+
+    bufsize = 0;
+    changefile = cvs_temp_name();
+
+    /* Diff options should include --binary if the RCS file has -kb set
+       in its `expand' field. */
+    run_add_arg_p (&dargc, &darg_allocated, &dargv, "-a");
+    run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n");
+    if (rcs->expand != NULL && STREQ (rcs->expand, "b"))
+       run_add_arg_p (&dargc, &darg_allocated, &dargv, "--binary");
+
+    if (STREQ (commitpt->version, rcs->head) &&
+       numdots (delta->version) == 1)
+    {
+       /* If this revision is being inserted on the trunk, the change text
+          for the new delta should be the contents of the working file ... */
+       bufsize = 0;
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+       if (preserve_perms && !S_ISREG (sb.st_mode))
+           /* Pretend file is empty.  */
+           ;
+       else
+#endif
+       get_file (workfile, workfile,
+                 rcs->expand != NULL && STREQ (rcs->expand, "b") ? "rb" : "r",
+                 &dtext->text, &bufsize, &dtext->len);
+
+       /* ... and the change text for the old delta should be a diff. */
+       commitpt->text = xmalloc (sizeof (Deltatext));
+       memset (commitpt->text, 0, sizeof (Deltatext));
+
+       bufsize = 0;
+       switch (diff_exec (workfile, tmpfile, NULL, NULL,
+                          dargc, dargv, changefile))
+       {
+           case 0:
+           case 1:
+               break;
+           case -1:
+               /* FIXME-update-dir: message does not include update_dir.  */
+               error (1, errno, "error diffing %s", workfile);
+               break;
+           default:
+               /* FIXME-update-dir: message does not include update_dir.  */
+               error (1, 0, "error diffing %s", workfile);
+               break;
+       }
+
+       /* OK, the text file case here is really dumb.  Logically
+          speaking we want diff to read the files in text mode,
+          convert them to the canonical form found in RCS files
+          (which, we hope at least, is independent of OS--always
+          bare linefeeds), and then work with change texts in that
+          format.  However, diff_exec both generates change
+          texts and produces output for user purposes (e.g. patch.c),
+          and there is no way to distinguish between the two cases.
+          So we actually implement the text file case by writing the
+          change text as a text file, then reading it as a text file.
+          This should cause no harm, but doesn't strike me as
+          immensely clean.  */
+       get_file (changefile, changefile,
+                 rcs->expand != NULL && STREQ (rcs->expand, "b") ? "rb" : "r",
+                 &commitpt->text->text, &bufsize, &commitpt->text->len);
+
+       /* If COMMITPT->TEXT->TEXT is NULL, it means that CHANGEFILE
+          was empty and that there are no differences between revisions.
+          In that event, we want to force RCS_rewrite to write an empty
+          string for COMMITPT's change text.  Leaving the change text
+          field set NULL won't work, since that means "preserve the original
+          change text for this delta." */
+       if (commitpt->text->text == NULL)
+       {
+           commitpt->text->text = xstrdup ("");
+           commitpt->text->len = 0;
+       }
+    }
+    else
+    {
+       /* This file is not being inserted at the head, but on a side
+          branch somewhere.  Make a diff from the previous revision
+          to the working file. */
+       switch (diff_exec (tmpfile, workfile, NULL, NULL,
+                          dargc, dargv, changefile))
+       {
+           case 0:
+           case 1:
+               break;
+           case -1:
+               /* FIXME-update-dir: message does not include update_dir.  */
+               error (1, errno, "error diffing %s", workfile);
+               break;
+           default:
+               /* FIXME-update-dir: message does not include update_dir.  */
+               error (1, 0, "error diffing %s", workfile);
+               break;
+       }
+       /* See the comment above, at the other get_file invocation,
+          regarding binary vs. text.  */
+       get_file (changefile, changefile, 
+                 rcs->expand != NULL && STREQ (rcs->expand, "b") ? "rb" : "r",
+                 &dtext->text, &bufsize,
+                 &dtext->len);
+       if (dtext->text == NULL)
+       {
+           dtext->text = xstrdup ("");
+           dtext->len = 0;
+       }
+    }
+
+    run_arg_free_p (dargc, dargv);
+    free (dargv);
+
+    /* Update DELTA linkage.  It is important not to do this before
+       the very end of RCS_checkin; if an error arises that forces
+       us to abort checking in, we must not have malformed deltas
+       partially linked into the tree.
+
+       If DELTA and COMMITPT are on different branches, do nothing --
+       DELTA is linked to the tree through COMMITPT->BRANCHES, and we
+       don't want to change `next' pointers.
+
+       Otherwise, if the nodes are both on the trunk, link DELTA to
+       COMMITPT; otherwise, link COMMITPT to DELTA. */
+
+    if (numdots (commitpt->version) == numdots (delta->version))
+    {
+       if (STREQ (commitpt->version, rcs->head))
+       {
+           delta->next = rcs->head;
+           rcs->head = xstrdup (delta->version);
+       }
+       else
+           commitpt->next = xstrdup (delta->version);
+    }
+
+    /* Add DELTA to RCS->VERSIONS. */
+    if (rcs->versions == NULL)
+       rcs->versions = getlist();
+    nodep = getnode();
+    nodep->type = RCSVERS;
+    nodep->delproc = rcsvers_delproc;
+    nodep->data = delta;
+    nodep->key = delta->version;
+    (void) addnode (rcs->versions, nodep);
+       
+    /* Write the new RCS file, inserting the new delta at COMMITPT. */
+    if (!(checkin_quiet || really_quiet))
+    {
+       cvs_output ("new revision: ", 14);
+       cvs_output (delta->version, 0);
+       cvs_output ("; previous revision: ", 21);
+       cvs_output (commitpt->version, 0);
+       cvs_output ("\n", 1);
+    }
+
+    RCS_rewrite (rcs, dtext, commitpt->version);
+
+    if ((flags & RCS_FLAGS_KEEPFILE) == 0)
+    {
+       if (unlink_file (workfile) < 0)
+           /* FIXME-update-dir: message does not include update_dir.  */
+           error (1, errno, "cannot remove %s", workfile);
+    }
+    if (unlink_file (tmpfile) < 0)
+       error (0, errno, "cannot remove %s", tmpfile);
+    free (tmpfile);
+    if (unlink_file (changefile) < 0)
+       error (0, errno, "cannot remove %s", changefile);
+    free (changefile);
+
+ checkin_done:
+    free (workfile);
+
+    if (commitpt != NULL && commitpt->text != NULL)
+    {
+       freedeltatext (commitpt->text);
+       commitpt->text = NULL;
+    }
+
+    freedeltatext (dtext);
+    if (status != 0)
+    {
+       /* If delta has not been added to a List, then freeing the Node key
+        * won't free delta->version.
+        */
+       if (delta->version) free (delta->version);
+       free_rcsvers_contents (delta);
+    }
+
+    return status;
+}
+
+
+
+/* This structure is passed between RCS_cmp_file and cmp_file_buffer.  */
+struct cmp_file_data
+{
+    const char *filename;
+    FILE *fp;
+    int different;
+};
+
+/* Compare the contents of revision REV1 of RCS file RCS with the
+   contents of REV2 if given, otherwise, compare with the contents of
+   the file FILENAME.  OPTIONS is a string for the keyword
+   expansion options.  Return 0 if the contents of the revision are
+   the same as the contents of the file, 1 if they are different.  */
+int
+RCS_cmp_file (RCSNode *rcs, const char *rev1, char **rev1_cache,
+              const char *rev2, const char *options, const char *filename)
+{
+    int binary;
+
+    TRACE (TRACE_FUNCTION, "RCS_cmp_file( %s, %s, %s, %s, %s )",
+           rcs->path ? rcs->path : "(null)",
+          rev1 ? rev1 : "(null)", rev2 ? rev2 : "(null)",
+          options ? options : "(null)", filename ? filename : "(null)");
+
+    if (options != NULL && options[0] != '\0')
+       binary = STREQ (options, "-kb");
+    else
+    {
+       char *expand;
+
+       expand = RCS_getexpand (rcs);
+       if (expand != NULL && STREQ (expand, "b"))
+           binary = 1;
+       else
+           binary = 0;
+    }
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    /* If CVS is to deal properly with special files (when
+       PreservePermissions is on), the best way is to check out the
+       revision to a temporary file and call `xcmp' on the two disk
+       files.  xcmp needs to handle non-regular files properly anyway,
+       so calling it simplifies RCS_cmp_file.  We *could* just yank
+       the delta node out of the version tree and look for device
+       numbers, but writing to disk and calling xcmp is a better
+       abstraction (therefore probably more robust). -twp */
+
+    if (preserve_perms)
+    {
+       char *tmp;
+       int retcode;
+
+       tmp = cvs_temp_name();
+       retcode = RCS_checkout(rcs, NULL, rev, NULL, options, tmp, NULL, NULL);
+       if (retcode != 0)
+           return 1;
+
+       retcode = xcmp (tmp, filename);
+       if (CVS_UNLINK (tmp) < 0)
+           error (0, errno, "cannot remove %s", tmp);
+       free (tmp);
+       return retcode;
+    }
+    else
+#endif
+    {
+       FILE *fp;
+       struct cmp_file_data data;
+       const char *use_file1;
+       char *tmpfile = NULL;
+
+       if (rev2 != NULL)
+       {
+           /* Open & cache rev1 */
+           tmpfile = cvs_temp_name();
+           if (RCS_checkout (rcs, NULL, rev1, NULL, options, tmpfile,
+                             NULL, NULL))
+               error (1, errno,
+                      "cannot check out revision %s of %s",
+                      rev1, rcs->print_path);
+           use_file1 = tmpfile;
+           if (rev1_cache != NULL)
+               *rev1_cache = tmpfile;
+       }
+       else
+           use_file1 = filename;
+
+        fp = CVS_FOPEN (use_file1, binary ? FOPEN_BINARY_READ : "r");
+       if (fp == NULL)
+           /* FIXME-update-dir: should include update_dir in message.  */
+           error (1, errno, "cannot open file %s for comparing", use_file1);
+       
+        data.filename = use_file1;
+        data.fp = fp;
+        data.different = 0;
+       
+        if (RCS_checkout (rcs, NULL, rev2 ? rev2 : rev1, NULL, options,
+                          RUN_TTY, cmp_file_buffer, &data ))
+               error (1, errno,
+                      "cannot check out revision %s of %s",
+                      rev2 ? rev2 : rev1, rcs->print_path);
+
+        /* If we have not yet found a difference, make sure that we are at
+           the end of the file.  */
+        if (!data.different)
+        {
+           if (getc (fp) != EOF)
+               data.different = 1;
+        }
+       
+        fclose (fp);
+       if (rev1_cache == NULL && tmpfile)
+       {
+           if (CVS_UNLINK (tmpfile ) < 0)
+               error (0, errno, "cannot remove %s", tmpfile);
+           free (tmpfile);
+       }
+
+        return data.different;
+    }
+}
+
+
+
+/* This is a subroutine of RCS_cmp_file.  It is passed to
+   RCS_checkout.  */
+#define CMP_BUF_SIZE (8 * 1024)
+
+static void
+cmp_file_buffer (void *callerdat, const char *buffer, size_t len)
+{
+    struct cmp_file_data *data = callerdat;
+    char *filebuf;
+
+    /* If we've already found a difference, we don't need to check
+       further.  */
+    if (data->different)
+       return;
+
+    filebuf = xmalloc (len > CMP_BUF_SIZE ? CMP_BUF_SIZE : len);
+
+    while (len > 0)
+    {
+       size_t checklen;
+
+       checklen = len > CMP_BUF_SIZE ? CMP_BUF_SIZE : len;
+       if (fread (filebuf, 1, checklen, data->fp) != checklen)
+       {
+           if (ferror (data->fp))
+               error (1, errno, "cannot read file %s for comparing",
+                      data->filename);
+           data->different = 1;
+           free (filebuf);
+           return;
+       }
+
+       if (memcmp (filebuf, buffer, checklen) != 0)
+       {
+           data->different = 1;
+           free (filebuf);
+           return;
+       }
+
+       buffer += checklen;
+       len -= checklen;
+    }
+
+    free (filebuf);
+}
+
+
+
+/* For RCS file RCS, make symbolic tag TAG point to revision REV.
+   This validates that TAG is OK for a user to use.  Return value is
+   -1 for error (and errno is set to indicate the error), positive for
+   error (and an error message has been printed), or zero for success.  */
+int
+RCS_settag (RCSNode *rcs, const char *tag, const char *rev)
+{
+    List *symbols;
+    Node *node;
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* FIXME: This check should be moved to RCS_check_tag.  There is no
+       reason for it to be here.  */
+    if (STREQ (tag, TAG_BASE)
+       || STREQ (tag, TAG_HEAD))
+    {
+       /* Print the name of the tag might be considered redundant
+          with the caller, which also prints it.  Perhaps this helps
+          clarify why the tag name is considered reserved, I don't
+          know.  */
+       error (0, 0, "Attempt to add reserved tag name %s", tag);
+       return 1;
+    }
+
+    /* A revision number of NULL means use the head or default branch.
+       If rev is not NULL, it may be a symbolic tag or branch number;
+       expand it to the correct numeric revision or branch head. */
+    if (rev == NULL)
+       rev = rcs->branch ? rcs->branch : rcs->head;
+
+    /* At this point rcs->symbol_data may not have been parsed.
+       Calling RCS_symbols will force it to be parsed into a list
+       which we can easily manipulate.  */
+    symbols = RCS_symbols (rcs);
+    if (symbols == NULL)
+    {
+       symbols = getlist ();
+       rcs->symbols = symbols;
+    }
+    node = findnode (symbols, tag);
+    if (node != NULL)
+    {
+       free (node->data);
+       node->data = xstrdup (rev);
+    }
+    else
+    {
+       node = getnode ();
+       node->key = xstrdup (tag);
+       node->data = xstrdup (rev);
+       (void)addnode_at_front (symbols, node);
+    }
+
+    return 0;
+}
+
+
+
+/* Delete the symbolic tag TAG from the RCS file RCS.  Return 0 if
+   the tag was found (and removed), or 1 if it was not present.  (In
+   either case, the tag will no longer be in RCS->SYMBOLS.) */
+int
+RCS_deltag (RCSNode *rcs, const char *tag)
+{
+    List *symbols;
+    Node *node;
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    symbols = RCS_symbols (rcs);
+    if (symbols == NULL)
+       return 1;
+
+    node = findnode (symbols, tag);
+    if (node == NULL)
+       return 1;
+
+    delnode (node);
+
+    return 0;
+}
+
+
+
+/* Set the default branch of RCS to REV.  */
+int
+RCS_setbranch (RCSNode *rcs, const char *rev)
+{
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (rev && ! *rev)
+       rev = NULL;
+
+    if (rev == NULL && rcs->branch == NULL)
+       return 0;
+    if (rev != NULL && rcs->branch != NULL && STREQ (rev, rcs->branch))
+       return 0;
+
+    if (rcs->branch != NULL)
+       free (rcs->branch);
+    rcs->branch = xstrdup (rev);
+
+    return 0;
+}
+
+
+
+/* Lock revision REV.  LOCK_QUIET is 1 to suppress output.  FIXME:
+   Most of the callers only call us because RCS_checkin still tends to
+   like a lock (a relic of old behavior inherited from the RCS ci
+   program).  If we clean this up, only "cvs admin -l" will still need
+   to call RCS_lock.  */
+
+/* FIXME-twp: if a lock owned by someone else is broken, should this
+   send mail to the lock owner?  Prompt user?  It seems like such an
+   obscure situation for CVS as almost not worth worrying much
+   about. */
+int
+RCS_lock (RCSNode *rcs, const char *rev, int lock_quiet)
+{
+    List *locks;
+    Node *p;
+    char *user;
+    char *xrev = NULL;
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    locks = RCS_getlocks (rcs);
+    if (locks == NULL)
+       locks = rcs->locks = getlist();
+    user = getcaller();
+
+    /* A revision number of NULL means lock the head or default branch. */
+    if (rev == NULL)
+       xrev = RCS_head (rcs);
+    else
+       xrev = RCS_gettag (rcs, rev, 1, NULL);
+
+    /* Make sure that the desired revision exists.  Technically,
+       we can update the locks list without even checking this,
+       but RCS 5.7 did this.  And it can't hurt. */
+    if (xrev == NULL || findnode (rcs->versions, xrev) == NULL)
+    {
+       if (!lock_quiet)
+           error (0, 0, "%s: revision %s absent", rcs->print_path, rev);
+       free (xrev);
+       return 1;
+    }
+
+    /* Is this rev already locked? */
+    p = findnode (locks, xrev);
+    if (p != NULL)
+    {
+       if (STREQ (p->data, user))
+       {
+           /* We already own the lock on this revision, so do nothing. */
+           free (xrev);
+           return 0;
+       }
+
+#if 0
+       /* Well, first of all, "rev" below should be "xrev" to avoid
+          core dumps.  But more importantly, should we really be
+          breaking the lock unconditionally?  What CVS 1.9 does (via
+          RCS) is to prompt "Revision 1.1 is already locked by fred.
+          Do you want to break the lock? [ny](n): ".  Well, we don't
+          want to interact with the user (certainly not at the
+          server/protocol level, and probably not in the command-line
+          client), but isn't it more sensible to give an error and
+          let the user run "cvs admin -u" if they want to break the
+          lock?  */
+
+       /* Break the lock. */       
+       if (!lock_quiet)
+       {
+           cvs_output (rev, 0);
+           cvs_output (" unlocked\n", 0);
+       }
+       delnode (p);
+#else
+       error (1, 0, "Revision %s is already locked by %s",
+               xrev, (char *)p->data);
+#endif
+    }
+
+    /* Create a new lock. */
+    p = getnode();
+    p->key = xrev;     /* already xstrdupped */
+    p->data = xstrdup (getcaller());
+    (void)addnode_at_front (locks, p);
+
+    if (!lock_quiet)
+    {
+       cvs_output (xrev, 0);
+       cvs_output (" locked\n", 0);
+    }
+
+    return 0;
+}
+
+
+
+/* Unlock revision REV.  UNLOCK_QUIET is 1 to suppress output.  FIXME:
+   Like RCS_lock, this can become a no-op if we do the checkin
+   ourselves.
+
+   If REV is not null and is locked by someone else, break their
+   lock and notify them.  It is an open issue whether RCS_unlock
+   queries the user about whether or not to break the lock. */
+int
+RCS_unlock (RCSNode *rcs, char *rev, int unlock_quiet)
+{
+    Node *lock;
+    List *locks;
+    char *user;
+    char *xrev = NULL;
+
+    user = getcaller();
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    /* If rev is NULL, unlock the revision held by the caller; if more
+       than one, make the user specify the revision explicitly.  This
+       differs from RCS which unlocks the latest revision (first in
+       rcs->locks) held by the caller. */
+    if (rev == NULL)
+    {
+       Node *p;
+
+       /* No-ops: attempts to unlock an empty tree or an unlocked file. */
+       if (rcs->head == NULL)
+       {
+           if (!unlock_quiet)
+               cvs_outerr ("can't unlock an empty tree\n", 0);
+           return 0;
+       }
+
+       locks = RCS_getlocks (rcs);
+       if (locks == NULL)
+       {
+           if (!unlock_quiet)
+               cvs_outerr ("No locks are set.\n", 0);
+           return 0;
+       }
+
+       lock = NULL;
+       for (p = locks->list->next; p != locks->list; p = p->next)
+       {
+           if (STREQ (p->data, user))
+           {
+               if (lock != NULL)
+               {
+                   if (!unlock_quiet)
+                       error (0, 0, "\
+%s: multiple revisions locked by %s; please specify one", rcs->print_path, 
user);
+                   return 1;
+               }
+               lock = p;
+           }
+       }
+       if (lock == NULL)
+       {
+           if (!unlock_quiet)
+               error (0, 0, "No locks are set for %s.\n", user);
+           return 0;   /* no lock found, ergo nothing to do */
+       }
+       xrev = xstrdup (lock->key);
+    }
+    else
+    {
+       xrev = RCS_gettag (rcs, rev, 1, NULL);
+       if (xrev == NULL)
+       {
+           error (0, 0, "%s: revision %s absent", rcs->print_path, rev);
+           return 1;
+       }
+    }
+
+    lock = findnode (RCS_getlocks (rcs), xrev);
+    if (lock == NULL)
+    {
+       /* This revision isn't locked. */
+       free (xrev);
+       return 0;
+    }
+
+    if (! STREQ (lock->data, user))
+    {
+        /* If the revision is locked by someone else, notify
+          them.  Note that this shouldn't ever happen if RCS_unlock
+          is called with a NULL revision, since that means "whatever
+          revision is currently locked by the caller." */
+       char *repos, *workfile;
+       if (!unlock_quiet)
+           error (0, 0, "\
+%s: revision %s locked by %s; breaking lock", rcs->print_path, xrev,
+                  (char *)lock->data);
+       repos = xstrdup (rcs->path);
+       workfile = strrchr (repos, '/');
+       *workfile++ = '\0';
+       notify_do ('C', workfile, NULL, user, NULL, NULL, repos);
+       free (repos);
+    }
+
+    delnode (lock);
+    if (!unlock_quiet)
+    {
+       cvs_output (xrev, 0);
+       cvs_output (" unlocked\n", 0);
+    }
+
+    free (xrev);
+    return 0;
+}
+
+
+
+/* Add USER to the access list of RCS.  Do nothing if already present.
+   FIXME-twp: check syntax of USER to make sure it's a valid id. */
+
+void
+RCS_addaccess (RCSNode *rcs, char *user)
+{
+    char *access, *a;
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (rcs->access == NULL)
+       rcs->access = xstrdup (user);
+    else
+    {
+       access = xstrdup (rcs->access);
+       for (a = strtok (access, " "); a != NULL; a = strtok (NULL, " "))
+       {
+           if (STREQ (a, user))
+           {
+               free (access);
+               return;
+           }
+       }
+       free (access);
+       rcs->access = xrealloc (rcs->access,
+                               strlen (rcs->access) + strlen (user) + 2);
+       strcat (rcs->access, " ");
+       strcat (rcs->access, user);
+    }
+}
+
+
+
+/* Remove USER from the access list of RCS. */
+void
+RCS_delaccess (RCSNode *rcs, char *user)
+{
+    char *p, *s;
+    int ulen;
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (rcs->access == NULL)
+       return;
+
+    if (user == NULL)
+    {
+        free (rcs->access);
+        rcs->access = NULL;
+        return;
+    }
+
+    p = rcs->access;
+    ulen = strlen (user);
+    while (p != NULL)
+    {
+       if (strncmp (p, user, ulen) == 0 && (p[ulen] == '\0' || p[ulen] == ' '))
+           break;
+       p = strchr (p, ' ');
+       if (p != NULL)
+           ++p;
+    }
+
+    if (p == NULL)
+       return;
+
+    s = p + ulen;
+    while (*s != '\0')
+       *p++ = *s++;
+    *p = '\0';
+}
+
+
+
+char *
+RCS_getaccess (RCSNode *rcs)
+{
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    return rcs->access;
+}
+
+
+
+/* Return a nonzero value if the revision specified by ARG is found.  */
+static int
+findtag (Node *node, void *arg)
+{
+    char *rev = arg;
+
+    if (STREQ (node->data, rev))
+       return 1;
+    else
+       return 0;
+}
+
+
+
+/* Delete revisions between REV1 and REV2.  The changes between the two
+   revisions must be collapsed, and the result stored in the revision
+   immediately preceding the lower one.  Return 0 for successful completion,
+   1 otherwise.
+
+   Solution: check out the revision preceding REV1 and the revision
+   following REV2.  Use call_diff to find aggregate diffs between
+   these two revisions, and replace the delta text for the latter one
+   with the new aggregate diff.  Alternatively, we could write a
+   function that takes two change texts and combines them to produce a
+   new change text, without checking out any revs or calling diff.  It
+   would be hairy, but so, so cool.
+
+   If INCLUSIVE is set, then TAG1 and TAG2, if non-NULL, tell us to
+   delete that revision as well (cvs admin -o tag1:tag2).  If clear,
+   delete up to but not including that revision (cvs admin -o tag1::tag2).
+   This does not affect TAG1 or TAG2 being NULL; the meaning of the start
+   point in ::tag2 and :tag2 is the same and likewise for end points.  */
+int
+RCS_delete_revs (RCSNode *rcs, char *tag1, char *tag2, int inclusive)
+{
+    char *next;
+    Node *nodep;
+    RCSVers *revp = NULL;
+    RCSVers *beforep;
+    int status, found;
+    int save_noexec;
+
+    char *branchpoint = NULL;
+    char *rev1 = NULL;
+    char *rev2 = NULL;
+    int rev1_inclusive = inclusive;
+    int rev2_inclusive = inclusive;
+    char *before = NULL;
+    char *after = NULL;
+    char *beforefile = NULL;
+    char *afterfile = NULL;
+    char *outfile = NULL;
+
+    if (tag1 == NULL && tag2 == NULL)
+       return 0;
+
+    /* Assume error status until everything is finished. */
+    status = 1;
+
+    /* Make sure both revisions exist. */
+    if (tag1 != NULL)
+    {
+       rev1 = RCS_gettag (rcs, tag1, 1, NULL);
+       if (rev1 == NULL || (nodep = findnode (rcs->versions, rev1)) == NULL)
+       {
+           error (0, 0, "%s: Revision %s doesn't exist.", rcs->print_path, 
tag1);
+           goto delrev_done;
+       }
+    }
+    if (tag2 != NULL)
+    {
+       rev2 = RCS_gettag (rcs, tag2, 1, NULL);
+       if (rev2 == NULL || (nodep = findnode (rcs->versions, rev2)) == NULL)
+       {
+           error (0, 0, "%s: Revision %s doesn't exist.", rcs->print_path, 
tag2);
+           goto delrev_done;
+       }
+    }
+
+    /* If rev1 is on the trunk and rev2 is NULL, rev2 should be
+       RCS->HEAD.  (*Not* RCS_head(rcs), which may return rcs->branch
+       instead.)  We need to check this special case early, in order
+       to make sure that rev1 and rev2 get ordered correctly. */
+    if (rev2 == NULL && numdots (rev1) == 1)
+    {
+       rev2 = xstrdup (rcs->head);
+       rev2_inclusive = 1;
+    }
+
+    if (rev2 == NULL)
+       rev2_inclusive = 1;
+
+    if (rev1 != NULL && rev2 != NULL)
+    {
+       /* A range consisting of a branch number means the latest revision
+          on that branch. */
+       if (RCS_isbranch (rcs, rev1) && STREQ (rev1, rev2))
+       {
+           char *tmp = RCS_getbranch (rcs, rev1, 0);
+           free (rev1);
+           free (rev2);
+           rev1 = rev2 = tmp;
+       }
+       else
+       {
+           /* Make sure REV1 and REV2 are ordered correctly (in the
+              same order as the next field).  For revisions on the
+              trunk, REV1 should be higher than REV2; for branches,
+              REV1 should be lower.  */
+           /* Shouldn't we just be giving an error in the case where
+              the user specifies the revisions in the wrong order
+              (that is, always swap on the trunk, never swap on a
+              branch, in the non-error cases)?  It is not at all
+              clear to me that users who specify -o 1.4:1.2 really
+              meant to type -o 1.2:1.4, and the out of order usage
+              has never been documented, either by cvs.texinfo or
+              rcs(1).  */
+           char *temp;
+           int temp_inclusive;
+           if (numdots (rev1) == 1)
+           {
+               if (compare_revnums (rev1, rev2) <= 0)
+               {
+                   temp = rev2;
+                   rev2 = rev1;
+                   rev1 = temp;
+
+                   temp_inclusive = rev2_inclusive;
+                   rev2_inclusive = rev1_inclusive;
+                   rev1_inclusive = temp_inclusive;
+               }
+           }
+           else if (compare_revnums (rev1, rev2) > 0)
+           {
+               temp = rev2;
+               rev2 = rev1;
+               rev1 = temp;
+
+               temp_inclusive = rev2_inclusive;
+               rev2_inclusive = rev1_inclusive;
+               rev1_inclusive = temp_inclusive;
+           }
+       }
+    }
+
+    /* Basically the same thing; make sure that the ordering is what we
+       need.  */
+    if (rev1 == NULL)
+    {
+       assert (rev2 != NULL);
+       if (numdots (rev2) == 1)
+       {
+           /* Swap rev1 and rev2.  */
+           int temp_inclusive;
+
+           rev1 = rev2;
+           rev2 = NULL;
+
+           temp_inclusive = rev2_inclusive;
+           rev2_inclusive = rev1_inclusive;
+           rev1_inclusive = temp_inclusive;
+       }
+    }
+
+    /* Put the revision number preceding the first one to delete into
+       BEFORE (where "preceding" means according to the next field).
+       If the first revision to delete is the first revision on its
+       branch (e.g. 1.3.2.1), BEFORE should be the node on the trunk
+       at which the branch is rooted.  If the first revision to delete
+       is the head revision of the trunk, set BEFORE to NULL.
+
+       Note that because BEFORE may not be on the same branch as REV1,
+       it is not very handy for navigating the revision tree.  It's
+       most useful just for checking out the revision preceding REV1. */
+    before = NULL;
+    branchpoint = RCS_getbranchpoint (rcs, rev1 != NULL ? rev1 : rev2);
+    if (rev1 == NULL)
+    {
+       rev1 = xstrdup (branchpoint);
+       if (numdots (branchpoint) > 1)
+       {
+           char *bp;
+           bp = strrchr (branchpoint, '.');
+           while (*--bp != '.')
+               ;
+           *bp = '\0';
+           /* Note that this is exclusive, always, because the inclusive
+              flag doesn't affect the meaning when rev1 == NULL.  */
+           before = xstrdup (branchpoint);
+           *bp = '.';
+       }
+    }
+    else if (! STREQ (rev1, branchpoint))
+    {
+       /* Walk deltas from BRANCHPOINT on, looking for REV1. */
+       nodep = findnode (rcs->versions, branchpoint);
+       revp = nodep->data;
+       while (revp->next != NULL && ! STREQ (revp->next, rev1))
+       {
+           revp = nodep->data;
+           nodep = findnode (rcs->versions, revp->next);
+       }
+       if (revp->next == NULL)
+       {
+           error (0, 0, "%s: Revision %s doesn't exist.", rcs->print_path, 
rev1);
+           goto delrev_done;
+       }
+       if (rev1_inclusive)
+           before = xstrdup (revp->version);
+       else
+       {
+           before = rev1;
+           nodep = findnode (rcs->versions, before);
+           rev1 = xstrdup (((RCSVers *)nodep->data)->next);
+       }
+    }
+    else if (!rev1_inclusive)
+    {
+       before = rev1;
+       nodep = findnode (rcs->versions, before);
+       rev1 = xstrdup (((RCSVers *)nodep->data)->next);
+    }
+    else if (numdots (branchpoint) > 1)
+    {
+       /* Example: rev1 is "1.3.2.1", branchpoint is "1.3.2.1".
+          Set before to "1.3".  */
+       char *bp;
+       bp = strrchr (branchpoint, '.');
+       while (*--bp != '.')
+           ;
+       *bp = '\0';
+       before = xstrdup (branchpoint);
+       *bp = '.';
+    }
+
+    /* If any revision between REV1 and REV2 is locked or is a branch point,
+       we can't delete that revision and must abort. */
+    after = NULL;
+    next = rev1;
+    found = 0;
+    while (!found && next != NULL)
+    {
+       nodep = findnode (rcs->versions, next);
+       revp = nodep->data;
+
+       if (rev2 != NULL)
+           found = STREQ (revp->version, rev2);
+       next = revp->next;
+
+       if ((!found && next != NULL) || rev2_inclusive || rev2 == NULL)
+       {
+           if (findnode (RCS_getlocks (rcs), revp->version))
+           {
+               error (0, 0, "%s: can't remove locked revision %s",
+                      rcs->print_path,
+                      revp->version);
+               goto delrev_done;
+           }
+           if (revp->branches != NULL)
+           {
+               error (0, 0, "%s: can't remove branch point %s",
+                      rcs->print_path,
+                      revp->version);
+               goto delrev_done;
+           }
+
+           /* Doing this only for the :: syntax is for compatibility.
+              See cvs.texinfo for somewhat more discussion.  */
+           if (!inclusive
+               && walklist (RCS_symbols (rcs), findtag, revp->version))
+           {
+               /* We don't print which file this happens to on the theory
+                  that the caller will print the name of the file in a
+                  more useful fashion (fullname not rcs->path).  */
+               error (0, 0, "cannot remove revision %s because it has tags",
+                      revp->version);
+               goto delrev_done;
+           }
+
+           /* It's misleading to print the `deleting revision' output
+              here, since we may not actually delete these revisions.
+              But that's how RCS does it.  Bleah.  Someday this should be
+              moved to the point where the revs are actually marked for
+              deletion. -twp */
+           cvs_output ("deleting revision ", 0);
+           cvs_output (revp->version, 0);
+           cvs_output ("\n", 1);
+       }
+    }
+
+    if (rev2 == NULL)
+       ;
+    else if (found)
+    {
+       if (rev2_inclusive)
+           after = xstrdup (next);
+       else
+           after = xstrdup (revp->version);
+    }
+    else if (!inclusive)
+    {
+       /* In the case of an empty range, for example 1.2::1.2 or
+          1.2::1.3, we want to just do nothing.  */
+       status = 0;
+       goto delrev_done;
+    }
+    else
+    {
+       /* This looks fishy in the cases where tag1 == NULL or tag2 == NULL.
+          Are those cases really impossible?  */
+       assert (tag1 != NULL);
+       assert (tag2 != NULL);
+
+       error (0, 0, "%s: invalid revision range %s:%s", rcs->print_path,
+              tag1, tag2);
+       goto delrev_done;
+    }
+
+    if (after == NULL && before == NULL)
+    {
+       /* The user is trying to delete all revisions.  While an
+          RCS file without revisions makes sense to RCS (e.g. the
+          state after "rcs -i"), CVS has never been able to cope with
+          it.  So at least for now we just make this an error.
+
+          We don't include rcs->path in the message since "cvs admin"
+          already printed "RCS file:" and the name.  */
+       error (1, 0, "attempt to delete all revisions");
+    }
+
+    /* The conditionals at this point get really hairy.  Here is the
+       general idea:
+
+       IF before != NULL and after == NULL
+         THEN don't check out any revisions, just delete them
+       IF before == NULL and after != NULL
+         THEN only check out after's revision, and use it for the new deltatext
+       ELSE
+         check out both revisions and diff -n them.  This could use
+        RCS_exec_rcsdiff with some changes, like being able
+        to suppress diagnostic messages and to direct output. */
+
+    if (after != NULL)
+    {
+       char *diffbuf;
+       size_t bufsize, len;
+
+#if defined (WOE32) && !defined (__CYGWIN32__)
+       /* FIXME: This is an awful kludge, but at least until I have
+          time to work on it a little more and test it, I'd rather
+          give a fatal error than corrupt the file.  I think that we
+          need to use "-kb" and "--binary" and "rb" to get_file
+          (probably can do it always, not just for binary files, if
+          we are consistent between the RCS_checkout and the diff).  */
+       {
+           char *expand = RCS_getexpand (rcs);
+           if (expand != NULL && STREQ (expand, "b"))
+               error (1, 0,
+                  "admin -o not implemented yet for binary on this system");
+       }
+#endif /* WOE32 */
+
+       afterfile = cvs_temp_name();
+       status = RCS_checkout (rcs, NULL, after, NULL, "-ko", afterfile,
+                              NULL, NULL);
+       if (status > 0)
+           goto delrev_done;
+
+       if (before == NULL)
+       {
+           /* We are deleting revisions from the head of the tree,
+              so must create a new head. */
+           diffbuf = NULL;
+           bufsize = 0;
+           get_file (afterfile, afterfile, "r", &diffbuf, &bufsize, &len);
+
+           save_noexec = noexec;
+           noexec = 0;
+           if (unlink_file (afterfile) < 0)
+               error (0, errno, "cannot remove %s", afterfile);
+           noexec = save_noexec;
+
+           free (afterfile);
+           afterfile = NULL;
+
+           free (rcs->head);
+           rcs->head = xstrdup (after);
+       }
+       else
+       {
+           int dargc = 0;
+           size_t darg_allocated = 0;
+           char **dargv = NULL;
+
+           beforefile = cvs_temp_name();
+           status = RCS_checkout (rcs, NULL, before, NULL, "-ko", beforefile,
+                                  NULL, NULL);
+           if (status > 0)
+               goto delrev_done;
+
+           outfile = cvs_temp_name();
+           run_add_arg_p (&dargc, &darg_allocated, &dargv, "-a");
+           run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n");
+           status = diff_exec (beforefile, afterfile, NULL, NULL,
+                               dargc, dargv, outfile);
+           run_arg_free_p (dargc, dargv);
+           free (dargv);
+
+           if (status == 2)
+           {
+               /* Not sure we need this message; will diff_exec already
+                  have printed an error?  */
+               error (0, 0, "%s: could not diff", rcs->print_path);
+               status = 1;
+               goto delrev_done;
+           }
+
+           diffbuf = NULL;
+           bufsize = 0;
+           get_file (outfile, outfile, "r", &diffbuf, &bufsize, &len);
+       }
+
+       /* Save the new change text in after's delta node. */
+       nodep = findnode (rcs->versions, after);
+       revp = nodep->data;
+
+       assert (revp->text == NULL);
+
+       revp->text = xmalloc (sizeof (Deltatext));
+       memset (revp->text, 0, sizeof (Deltatext));
+       revp->text->version = xstrdup (revp->version);
+       revp->text->text = diffbuf;
+       revp->text->len = len;
+
+       /* If DIFFBUF is NULL, it means that OUTFILE is empty and that
+          there are no differences between the two revisions.  In that
+          case, we want to force RCS_copydeltas to write an empty string
+          for the new change text (leaving the text field set NULL
+          means "preserve the original change text for this delta," so
+          we don't want that). */
+       if (revp->text->text == NULL)
+           revp->text->text = xstrdup ("");
+    }
+
+    /* Walk through the revisions (again) to mark each one as
+       outdated.  (FIXME: would it be safe to use the `dead' field for
+       this?  Doubtful.) */
+    for (next = rev1;
+        next != NULL && (after == NULL || ! STREQ (next, after));
+        next = revp->next)
+    {
+       nodep = findnode (rcs->versions, next);
+       revp = nodep->data;
+       revp->outdated = 1;
+    }
+
+    /* Update delta links.  If BEFORE == NULL, we're changing the
+       head of the tree and don't need to update any `next' links. */
+    if (before != NULL)
+    {
+       /* If REV1 is the first node on its branch, then BEFORE is its
+          root node (on the trunk) and we have to update its branches
+          list.  Otherwise, BEFORE is on the same branch as AFTER, and
+          we can just change BEFORE's `next' field to point to AFTER.
+          (This should be safe: since findnode manages its lists via
+          the `hashnext' and `hashprev' fields, rather than `next' and
+          `prev', mucking with `next' and `prev' should not corrupt the
+          delta tree's internal structure.  Much. -twp) */
+
+       if (rev1 == NULL)
+           /* beforep's ->next field already should be equal to after,
+              which I think is always NULL in this case.  */
+           ;
+       else if (STREQ (rev1, branchpoint))
+       {
+           nodep = findnode (rcs->versions, before);
+           revp = nodep->data;
+           nodep = revp->branches->list->next;
+           while (nodep != revp->branches->list &&
+                  ! STREQ (nodep->key, rev1))
+               nodep = nodep->next;
+           assert (nodep != revp->branches->list);
+           if (after == NULL)
+               delnode (nodep);
+           else
+           {
+               free (nodep->key);
+               nodep->key = xstrdup (after);
+           }
+       }
+       else
+       {
+           nodep = findnode (rcs->versions, before);
+           beforep = nodep->data;
+           free (beforep->next);
+           beforep->next = xstrdup (after);
+       }
+    }
+
+    status = 0;
+
+ delrev_done:
+    if (rev1 != NULL)
+       free (rev1);
+    if (rev2 && rev2 != rev1)
+       free (rev2);
+    if (branchpoint != NULL)
+       free (branchpoint);
+    if (before != NULL)
+       free (before);
+    if (after != NULL)
+       free (after);
+
+    save_noexec = noexec;
+    noexec = 0;
+    if (beforefile != NULL)
+    {
+       if (unlink_file (beforefile) < 0)
+           error (0, errno, "cannot remove %s", beforefile);
+       free (beforefile);
+    }
+    if (afterfile != NULL)
+    {
+       if (unlink_file (afterfile) < 0)
+           error (0, errno, "cannot remove %s", afterfile);
+       free (afterfile);
+    }
+    if (outfile != NULL)
+    {
+       if (unlink_file (outfile) < 0)
+           error (0, errno, "cannot remove %s", outfile);
+       free (outfile);
+    }
+    noexec = save_noexec;
+
+    return status;
+}
+
+
+
+/*
+ * TRUE if there exists a symbolic tag "tag" in file.
+ */
+int 
+RCS_exist_tag (RCSNode *rcs, char *tag)
+{
+
+    assert (rcs != NULL);
+
+    if (findnode (RCS_symbols (rcs), tag))
+    return 1;
+    return 0;
+
+}
+
+
+
+/*
+ * TRUE if RCS revision number "rev" exists.
+ * This includes magic branch revisions, not found in rcs->versions, 
+ * but only in rcs->symbols, requiring a list walk to find them.
+ * Take advantage of list walk callback function already used by 
+ * RCS_delete_revs, above.
+ */
+int
+RCS_exist_rev (RCSNode *rcs, char *rev)
+{
+
+    assert (rcs != NULL);
+
+    if (rcs->flags & PARTIAL)
+       RCS_reparsercsfile (rcs, NULL, NULL);
+
+    if (findnode(rcs->versions, rev) != 0)
+       return 1;
+
+    if (walklist (RCS_symbols(rcs), findtag, rev) != 0)
+       return 1;
+
+    return 0;
+
+}
+
+
+
+
+/* RCS_deltas and friends.  Processing of the deltas in RCS files.  */
+struct line
+{
+    /* Text of this line.  Part of the same malloc'd block as the struct
+       line itself (we probably should use the "struct hack" (char text[1])
+       and save ourselves sizeof (char *) bytes).  Does not include \n;
+       instead has_newline indicates the presence or absence of \n.  */
+    char *text;
+    /* Length of this line, not counting \n if has_newline is true.  */
+    size_t len;
+    /* Version in which it was introduced.  */
+    RCSVers *vers;
+    /* Nonzero if this line ends with \n.  This will always be true
+       except possibly for the last line.  */
+    int has_newline;
+    /* Number of pointers to this struct line.  */
+    int refcount;
+};
+
+struct linevector
+{
+    /* How many lines in use for this linevector?  */
+    unsigned int nlines;
+    /* How many lines allocated for this linevector?  */
+    unsigned int lines_alloced;
+    /* Pointer to array containing a pointer to each line.  */
+    struct line **vector;
+};
+
+
+
+/* Initialize *VEC to be a linevector with no lines.  */
+static void
+linevector_init (struct linevector *vec)
+{
+    vec->lines_alloced = 0;
+    vec->nlines = 0;
+    vec->vector = NULL;
+}
+
+
+
+/* Given some text TEXT, add each of its lines to VEC before line POS
+   (where line 0 is the first line).  The last line in TEXT may or may
+   not be \n terminated.
+   Set the version for each of the new lines to VERS.  This
+   function returns non-zero for success.  It returns zero if the line
+   number is out of range.
+
+   Each of the lines in TEXT are copied to space which is managed with
+   the linevector (and freed by linevector_free).  So the caller doesn't
+   need to keep TEXT around after the call to this function.  */
+static int
+linevector_add (struct linevector *vec, const char *text, size_t len,
+               RCSVers *vers, unsigned int pos)
+{
+    const char *textend;
+    unsigned int i;
+    unsigned int nnew;
+    const char *p;
+    const char *nextline_text;
+    size_t nextline_len;
+    int nextline_newline;
+    struct line *q;
+
+    if (len == 0)
+       return 1;
+
+    textend = text + len;
+
+    /* Count the number of lines we will need to add.  */
+    nnew = 1;
+    for (p = text; p < textend; ++p)
+       if (*p == '\n' && p + 1 < textend)
+           ++nnew;
+
+    /* Expand VEC->VECTOR if needed.  */
+    if (vec->nlines + nnew >= vec->lines_alloced)
+    {
+       if (vec->lines_alloced == 0)
+           vec->lines_alloced = 10;
+       while (vec->nlines + nnew >= vec->lines_alloced)
+           vec->lines_alloced *= 2;
+       vec->vector = xnrealloc (vec->vector,
+                                vec->lines_alloced, sizeof (*vec->vector));
+    }
+
+    /* Make room for the new lines in VEC->VECTOR.  */
+    for (i = vec->nlines + nnew - 1; i >= pos + nnew; --i)
+       vec->vector[i] = vec->vector[i - nnew];
+
+    if (pos > vec->nlines)
+       return 0;
+
+    /* Actually add the lines, to VEC->VECTOR.  */
+    i = pos;
+    nextline_text = text;
+    nextline_newline = 0;
+    for (p = text; p < textend; ++p)
+       if (*p == '\n')
+       {
+           nextline_newline = 1;
+           if (p + 1 == textend)
+               /* If there are no characters beyond the last newline, we
+                  don't consider it another line.  */
+               break;
+           nextline_len = p - nextline_text;
+           q = xmalloc (sizeof (struct line) + nextline_len);
+           q->vers = vers;
+           q->text = (char *)q + sizeof (struct line);
+           q->len = nextline_len;
+           q->has_newline = nextline_newline;
+           q->refcount = 1;
+           memcpy (q->text, nextline_text, nextline_len);
+           vec->vector[i++] = q;
+
+           nextline_text = (char *)p + 1;
+           nextline_newline = 0;
+       }
+    nextline_len = p - nextline_text;
+    q = xmalloc (sizeof (struct line) + nextline_len);
+    q->vers = vers;
+    q->text = (char *)q + sizeof (struct line);
+    q->len = nextline_len;
+    q->has_newline = nextline_newline;
+    q->refcount = 1;
+    memcpy (q->text, nextline_text, nextline_len);
+    vec->vector[i] = q;
+
+    vec->nlines += nnew;
+
+    return 1;
+}
+
+
+
+/* Remove NLINES lines from VEC at position POS (where line 0 is the
+   first line).  */
+static void
+linevector_delete (struct linevector *vec, unsigned int pos,
+                  unsigned int nlines)
+{
+    unsigned int i;
+    unsigned int last;
+
+    last = vec->nlines - nlines;
+    for (i = pos; i < pos + nlines; ++i)
+    {
+       if (--vec->vector[i]->refcount == 0)
+           free (vec->vector[i]);
+    }
+    for (i = pos; i < last; ++i)
+       vec->vector[i] = vec->vector[i + nlines];
+    vec->nlines -= nlines;
+}
+
+
+
+/* Copy FROM to TO, copying the vectors but not the lines pointed to.  */
+static void
+linevector_copy (struct linevector *to, struct linevector *from)
+{
+    unsigned int ln;
+
+    for (ln = 0; ln < to->nlines; ++ln)
+    {
+       if (--to->vector[ln]->refcount == 0)
+           free (to->vector[ln]);
+    }
+    if (from->nlines > to->lines_alloced)
+    {
+       if (to->lines_alloced == 0)
+           to->lines_alloced = 10;
+       while (from->nlines > to->lines_alloced)
+           to->lines_alloced *= 2;
+       to->vector = xnrealloc (to->vector,
+                               to->lines_alloced,
+                               sizeof (*to->vector));
+    }
+    memcpy (to->vector, from->vector,
+           xtimes (from->nlines, sizeof (*to->vector)));
+    to->nlines = from->nlines;
+    for (ln = 0; ln < to->nlines; ++ln)
+       ++to->vector[ln]->refcount;
+}
+
+
+
+/* Free storage associated with linevector.  */
+static void
+linevector_free (struct linevector *vec)
+{
+    unsigned int ln;
+
+    if (vec->vector != NULL)
+    {
+       for (ln = 0; ln < vec->nlines; ++ln)
+           if (--vec->vector[ln]->refcount == 0)
+               free (vec->vector[ln]);
+
+       free (vec->vector);
+    }
+}
+
+
+
+/* Given a textual string giving the month (1-12), terminated with any
+   character not recognized by atoi, return the 3 character name to
+   print it with.  I do not think it is a good idea to change these
+   strings based on the locale; they are standard abbreviations (for
+   example in rfc822 mail messages) which should be widely understood.
+   Returns a pointer into static readonly storage.  */
+static const char *
+month_printname (const char *month)
+{
+    static const char *const months[] =
+      {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+    int mnum;
+
+    mnum = atoi (month);
+    if (mnum < 1 || mnum > 12)
+       return "???";
+    return months[mnum - 1];
+}
+
+
+
+/* Apply changes to the line vector LINES.  DIFFBUF is a buffer of
+   length DIFFLEN holding the change text from an RCS file (the output
+   of diff -n).  NAME is used in error messages.  The VERS field of
+   any line added is set to ADDVERS.  The VERS field of any line
+   deleted is set to DELVERS, unless DELVERS is NULL, in which case
+   the VERS field of deleted lines is unchanged.  The function returns
+   non-zero if the change text is applied successfully.  It returns
+   zero if the change text does not appear to apply to LINES (e.g., a
+   line number is invalid).  If the change text is improperly
+   formatted (e.g., it is not the output of diff -n), the function
+   calls error with a status of 1, causing the program to exit.  */
+static int
+apply_rcs_changes (struct linevector *lines, const char *diffbuf,
+                  size_t difflen, const char *name, RCSVers *addvers,
+                  RCSVers *delvers)
+{
+    const char *p;
+    const char *q;
+    int op;
+    /* The RCS format throws us for a loop in that the deltafrags (if
+       we define a deltafrag as an add or a delete) need to be applied
+       in reverse order.  So we stick them into a linked list.  */
+    struct deltafrag {
+       enum {FRAG_ADD, FRAG_DELETE} type;
+       unsigned long pos;
+       unsigned long nlines;
+       const char *new_lines;
+       size_t len;
+       struct deltafrag *next;
+    };
+    struct deltafrag *dfhead;
+    struct deltafrag *df;
+    int err;
+
+    dfhead = NULL;
+    for (p = diffbuf; p != NULL && p < diffbuf + difflen; )
+    {
+       op = *p++;
+       if (op != 'a' && op != 'd')
+           /* Can't just skip over the deltafrag, because the value
+              of op determines the syntax.  */
+           error (1, 0, "unrecognized operation '\\x%x' in %s",
+                  op, name);
+       df = xmalloc (sizeof (struct deltafrag));
+       df->next = dfhead;
+       dfhead = df;
+       df->pos = strtoul (p, (char **) &q, 10);
+
+       if (p == q)
+           error (1, 0, "number expected in %s", name);
+       p = q;
+       if (*p++ != ' ')
+           error (1, 0, "space expected in %s", name);
+       df->nlines = strtoul (p, (char **) &q, 10);
+       if (p == q)
+           error (1, 0, "number expected in %s", name);
+       p = q;
+       if (*p++ != '\012')
+           error (1, 0, "linefeed expected in %s", name);
+
+       if (op == 'a')
+       {
+           unsigned int i;
+
+           df->type = FRAG_ADD;
+           i = df->nlines;
+           /* The text we want is the number of lines specified, or
+              until the end of the value, whichever comes first (it
+              will be the former except in the case where we are
+              adding a line which does not end in newline).  */
+           for (q = p; i != 0; ++q)
+               if (*q == '\n')
+                   --i;
+               else if (q == diffbuf + difflen)
+               {
+                   if (i != 1)
+                       error (1, 0, "premature end of change in %s", name);
+                   else
+                       break;
+               }
+
+           /* Stash away a pointer to the text we are adding.  */
+           df->new_lines = p;
+           df->len = q - p;
+
+           p = q;
+       }
+       else
+       {
+           /* Correct for the fact that line numbers in RCS files
+              start with 1.  */
+           --df->pos;
+
+           assert (op == 'd');
+           df->type = FRAG_DELETE;
+       }
+    }
+
+    err = 0;
+    for (df = dfhead; df != NULL;)
+    {
+       unsigned int ln;
+
+       /* Once an error is encountered, just free the rest of the list and
+        * return.
+        */
+       if (!err)
+           switch (df->type)
+           {
+           case FRAG_ADD:
+               if (! linevector_add (lines, df->new_lines, df->len, addvers,
+                                     df->pos))
+                   err = 1;
+               break;
+           case FRAG_DELETE:
+               if (df->pos > lines->nlines
+                   || df->pos + df->nlines > lines->nlines)
+                   return 0;
+               if (delvers != NULL)
+                   for (ln = df->pos; ln < df->pos + df->nlines; ++ln)
+                       lines->vector[ln]->vers = delvers;
+               linevector_delete (lines, df->pos, df->nlines);
+               break;
+           }
+
+       df = df->next;
+       free (dfhead);
+       dfhead = df;
+    }
+
+    return !err;
+}
+
+
+
+/* Apply an RCS change text to a buffer.  The function name starts
+   with rcs rather than RCS because this does not take an RCSNode
+   argument.  NAME is used in error messages.  TEXTBUF is the text
+   buffer to change, and TEXTLEN is the size.  DIFFBUF and DIFFLEN are
+   the change buffer and size.  The new buffer is returned in *RETBUF
+   and *RETLEN.  The new buffer is allocated by xmalloc.
+
+   Return 1 for success.  On failure, call error and return 0.  */
+int
+rcs_change_text (const char *name, char *textbuf, size_t textlen,
+                const char *diffbuf, size_t difflen, char **retbuf,
+                size_t *retlen)
+{
+    struct linevector lines;
+    int ret;
+
+    *retbuf = NULL;
+    *retlen = 0;
+
+    linevector_init (&lines);
+
+    if (! linevector_add (&lines, textbuf, textlen, NULL, 0))
+       error (1, 0, "cannot initialize line vector");
+
+    if (! apply_rcs_changes (&lines, diffbuf, difflen, name, NULL, NULL))
+    {
+       error (0, 0, "invalid change text in %s", name);
+       ret = 0;
+    }
+    else
+    {
+       char *p;
+       size_t n;
+       unsigned int ln;
+
+       n = 0;
+       for (ln = 0; ln < lines.nlines; ++ln)
+           /* 1 for \n */
+           n += lines.vector[ln]->len + 1;
+
+       p = xmalloc (n);
+       *retbuf = p;
+
+       for (ln = 0; ln < lines.nlines; ++ln)
+       {
+           memcpy (p, lines.vector[ln]->text, lines.vector[ln]->len);
+           p += lines.vector[ln]->len;
+           if (lines.vector[ln]->has_newline)
+               *p++ = '\n';
+       }
+
+       *retlen = p - *retbuf;
+       assert (*retlen <= n);
+
+       ret = 1;
+    }
+
+    linevector_free (&lines);
+
+    return ret;
+}
+
+
+
+/* Walk the deltas in RCS to get to revision VERSION.
+
+   If OP is RCS_ANNOTATE, then write annotations using cvs_output.
+
+   If OP is RCS_FETCH, then put the contents of VERSION into a
+   newly-malloc'd array and put a pointer to it in *TEXT.  Each line
+   is \n terminated; the caller is responsible for converting text
+   files if desired.  The total length is put in *LEN.
+
+   If FP is non-NULL, it should be a file descriptor open to the file
+   RCS with file position pointing to the deltas.  We close the file
+   when we are done.
+
+   If LOG is non-NULL, then *LOG is set to the log message of VERSION,
+   and *LOGLEN is set to the length of the log message.
+
+   On error, give a fatal error.  */
+void
+RCS_deltas (RCSNode *rcs, FILE *fp, struct rcsbuffer *rcsbuf,
+            const char *version, enum rcs_delta_op op, char **text,
+            size_t *len, char **log, size_t *loglen)
+{
+    struct rcsbuffer rcsbuf_local;
+    char *branchversion;
+    char *cpversion;
+    char *key;
+    char *value;
+    size_t vallen;
+    RCSVers *vers;
+    RCSVers *prev_vers;
+    RCSVers *trunk_vers;
+    char *next;
+    int ishead, isnext, isversion, onbranch;
+    Node *node;
+    struct linevector headlines;
+    struct linevector curlines;
+    struct linevector trunklines;
+    int foundhead;
+
+    assert (version);
+
+    if (fp == NULL)
+    {
+       rcsbuf_cache_open (rcs, rcs->delta_pos, &fp, &rcsbuf_local);
+       rcsbuf = &rcsbuf_local;
+    }
+
+   if (log) *log = NULL;
+
+    ishead = 1;
+    vers = NULL;
+    prev_vers = NULL;
+    trunk_vers = NULL;
+    next = NULL;
+    onbranch = 0;
+    foundhead = 0;
+
+    linevector_init (&curlines);
+    linevector_init (&headlines);
+    linevector_init (&trunklines);
+
+    /* We set BRANCHVERSION to the version we are currently looking
+       for.  Initially, this is the version on the trunk from which
+       VERSION branches off.  If VERSION is not a branch, then
+       BRANCHVERSION is just VERSION.  */
+    branchversion = xstrdup (version);
+    cpversion = strchr (branchversion, '.');
+    if (cpversion != NULL)
+        cpversion = strchr (cpversion + 1, '.');
+    if (cpversion != NULL)
+        *cpversion = '\0';
+
+    do {
+       if (! rcsbuf_getrevnum (rcsbuf, &key))
+           error (1, 0, "unexpected EOF reading RCS file %s", rcs->print_path);
+
+       if (next != NULL && ! STREQ (next, key))
+       {
+           /* This is not the next version we need.  It is a branch
+               version which we want to ignore.  */
+           isnext = 0;
+           isversion = 0;
+       }
+       else
+       {
+           isnext = 1;
+
+           /* look up the revision */
+           node = findnode (rcs->versions, key);
+           if (node == NULL)
+               error (1, 0,
+                      "mismatch in rcs file %s between deltas and deltatexts 
(%s)",
+                      rcs->print_path, key);
+
+           /* Stash the previous version.  */
+           prev_vers = vers;
+
+           vers = node->data;
+           next = vers->next;
+
+           /* Compare key and trunkversion now, because key points to
+              storage controlled by rcsbuf_getkey.  */
+           if (STREQ (branchversion, key))
+               isversion = 1;
+           else
+               isversion = 0;
+       }
+
+       while (1)
+       {
+           if (! rcsbuf_getkey (rcsbuf, &key, &value))
+               error (1, 0, "%s does not appear to be a valid rcs file",
+                      rcs->print_path);
+
+           if (log != NULL
+               && isversion
+               && STREQ (key, "log")
+               && STREQ (branchversion, version))
+           {
+               if (*log != NULL)
+               {
+                   error (0, 0, "Duplicate `log' keyword in RCS file (`%s').",
+                          rcs->print_path);
+                   free (*log);
+               }
+               *log = rcsbuf_valcopy (rcsbuf, value, 0, loglen);
+           }
+
+           if (STREQ (key, "text"))
+           {
+               rcsbuf_valpolish (rcsbuf, value, 0, &vallen);
+               if (ishead)
+               {
+                   if (! linevector_add (&curlines, value, vallen, NULL, 0))
+                       error (1, 0, "invalid rcs file %s", rcs->print_path);
+
+                   ishead = 0;
+               }
+               else if (isnext)
+               {
+                   if (! apply_rcs_changes (&curlines, value, vallen,
+                                            rcs->path,
+                                            onbranch ? vers : NULL,
+                                            onbranch ? NULL : prev_vers))
+                       error (1, 0, "invalid change text in %s", 
rcs->print_path);
+               }
+               break;
+           }
+       }
+
+       if (isversion)
+       {
+           /* This is either the version we want, or it is the
+               branchpoint to the version we want.  */
+           if (STREQ (branchversion, version))
+           {
+               /* This is the version we want.  */
+               linevector_copy (&headlines, &curlines);
+               foundhead = 1;
+               if (onbranch)
+               {
+                   /* We have found this version by tracking up a
+                       branch.  Restore back to the lines we saved
+                       when we left the trunk, and continue tracking
+                       down the trunk.  */
+                   onbranch = 0;
+                   vers = trunk_vers;
+                   next = vers->next;
+                   linevector_copy (&curlines, &trunklines);
+               }
+           }
+           else
+           {
+               Node *p;
+
+               /* We need to look up the branch.  */
+               onbranch = 1;
+
+               if (numdots (branchversion) < 2)
+               {
+                   unsigned int ln;
+
+                   /* We are leaving the trunk; save the current
+                       lines so that we can restore them when we
+                       continue tracking down the trunk.  */
+                   trunk_vers = vers;
+                   linevector_copy (&trunklines, &curlines);
+
+                   /* Reset the version information we have
+                       accumulated so far.  It only applies to the
+                       changes from the head to this version.  */
+                   for (ln = 0; ln < curlines.nlines; ++ln)
+                       curlines.vector[ln]->vers = NULL;
+               }
+
+               /* The next version we want is the entry on
+                   VERS->branches which matches this branch.  For
+                   example, suppose VERSION is 1.21.4.3 and
+                   BRANCHVERSION was 1.21.  Then we look for an entry
+                   starting with "1.21.4" and we'll put it (probably
+                   1.21.4.1) in NEXT.  We'll advance BRANCHVERSION by
+                   two dots (in this example, to 1.21.4.3).  */
+
+               if (vers->branches == NULL)
+                   error (1, 0, "missing expected branches in %s",
+                          rcs->print_path);
+               if (!cpversion)
+                   error (1, 0, "Invalid revision number in `%s'.",
+                          rcs->print_path);
+               *cpversion = '.';
+               ++cpversion;
+               cpversion = strchr (cpversion, '.');
+               if (cpversion == NULL)
+                   error (1, 0, "version number confusion in %s",
+                          rcs->print_path);
+               for (p = vers->branches->list->next;
+                    p != vers->branches->list;
+                    p = p->next)
+                   if (strncmp (p->key, branchversion,
+                                cpversion - branchversion) == 0)
+                       break;
+               if (p == vers->branches->list)
+                   error (1, 0, "missing expected branch in %s",
+                          rcs->print_path);
+
+               next = p->key;
+
+               cpversion = strchr (cpversion + 1, '.');
+               if (cpversion != NULL)
+                   *cpversion = '\0';
+           }
+       }
+       if (op == RCS_FETCH && foundhead)
+           break;
+    } while (next != NULL);
+
+    free (branchversion);
+
+    rcsbuf_cache (rcs, rcsbuf);
+
+    if (! foundhead)
+        error (1, 0, "could not find desired version %s in %s",
+              version, rcs->print_path);
+
+    /* Now print out or return the data we have just computed.  */
+    switch (op)
+    {
+       case RCS_ANNOTATE:
+           {
+               unsigned int ln;
+
+               for (ln = 0; ln < headlines.nlines; ++ln)
+               {
+                   char *buf;
+                   /* Period which separates year from month in date.  */
+                   char *ym;
+                   /* Period which separates month from day in date.  */
+                   char *md;
+                   RCSVers *prvers;
+
+                   prvers = headlines.vector[ln]->vers;
+                   if (prvers == NULL)
+                       prvers = vers;
+
+                   buf = xmalloc (strlen (prvers->version) + 24);
+                   sprintf (buf, "%-12s (%-8.8s ",
+                            prvers->version,
+                            prvers->author);
+                   cvs_output (buf, 0);
+                   free (buf);
+
+                   /* Now output the date.  */
+                   ym = strchr (prvers->date, '.');
+                   if (ym == NULL)
+                   {
+                       cvs_output ("??", 0);
+                       cvs_output ("-???", 0);
+                       cvs_output ("-??", 0);
+                   }
+                   else
+                   {
+                       md = strchr (ym + 1, '.');
+                       if (md == NULL)
+                           cvs_output ("??", 0);
+                       else
+                           cvs_output (md + 1, 2);
+
+                       cvs_output ("-", 1);
+                       cvs_output (month_printname (ym + 1), 0);
+                       cvs_output ("-", 1);
+                       /* Only output the last two digits of the year.  Our 
output
+                          lines are long enough as it is without printing the
+                          century.  */
+                       cvs_output (ym - 2, 2);
+                   }
+                   cvs_output ("): ", 0);
+                   if (headlines.vector[ln]->len != 0)
+                       cvs_output (headlines.vector[ln]->text,
+                                   headlines.vector[ln]->len);
+                   cvs_output ("\n", 1);
+               }
+           }
+           break;
+       case RCS_FETCH:
+           {
+               char *p;
+               size_t n;
+               unsigned int ln;
+
+               assert (text != NULL);
+               assert (len != NULL);
+
+               n = 0;
+               for (ln = 0; ln < headlines.nlines; ++ln)
+                   /* 1 for \n */
+                   n += headlines.vector[ln]->len + 1;
+               p = xmalloc (n);
+               *text = p;
+               for (ln = 0; ln < headlines.nlines; ++ln)
+               {
+                   memcpy (p, headlines.vector[ln]->text,
+                           headlines.vector[ln]->len);
+                   p += headlines.vector[ln]->len;
+                   if (headlines.vector[ln]->has_newline)
+                       *p++ = '\n';
+               }
+               *len = p - *text;
+               assert (*len <= n);
+           }
+           break;
+    }
+
+    linevector_free (&curlines);
+    linevector_free (&headlines);
+    linevector_free (&trunklines);
+
+    return;
+}
+
+
+
+/* Read the information for a single delta from the RCS buffer RCSBUF,
+   whose name is RCSFILE.  *KEYP and *VALP are either NULL, or the
+   first key/value pair to read, as set by rcsbuf_getkey. Return NULL
+   if there are no more deltas.  Store the key/value pair which
+   terminated the read in *KEYP and *VALP.  */
+static RCSVers *
+getdelta (struct rcsbuffer *rcsbuf, char *rcsfile, char **keyp, char **valp)
+{
+    RCSVers *vnode;
+    char *key, *value, *cp;
+    Node *kv;
+
+    /* Get revision number if it wasn't passed in. This uses
+       rcsbuf_getkey because it doesn't croak when encountering
+       unexpected input.  As a result, we have to play unholy games
+       with `key' and `value'. */
+    if (*keyp != NULL)
+    {
+       key = *keyp;
+       value = *valp;
+    }
+    else
+    {
+       if (! rcsbuf_getkey (rcsbuf, &key, &value))
+           error (1, 0, "%s: unexpected EOF", rcsfile);
+    }
+
+    /* Make sure that it is a revision number and not a cabbage 
+       or something. */
+    for (cp = key;
+        (isdigit ((unsigned char) *cp) || *cp == '.') && *cp != '\0';
+        cp++)
+       /* do nothing */ ;
+    /* Note that when comparing with RCSDATE, we are not massaging
+       VALUE from the string found in the RCS file.  This is OK since
+       we know exactly what to expect.  */
+    if (*cp != '\0' || strncmp (RCSDATE, value, (sizeof RCSDATE) - 1) != 0)
+    {
+       *keyp = key;
+       *valp = value;
+       return NULL;
+    }
+
+    vnode = xmalloc (sizeof (RCSVers));
+    memset (vnode, 0, sizeof (RCSVers));
+
+    vnode->version = xstrdup (key);
+
+    /* Grab the value of the date from value.  Note that we are not
+       massaging VALUE from the string found in the RCS file.  */
+    cp = value + (sizeof RCSDATE) - 1; /* skip the "date" keyword */
+    while (whitespace (*cp))           /* take space off front of value */
+       cp++;
+
+    vnode->date = xstrdup (cp);
+
+    /* Get author field.  */
+    if (! rcsbuf_getkey (rcsbuf, &key, &value))
+    {
+       error (1, 0, "unexpected end of file reading %s", rcsfile);
+    }
+    if (! STREQ (key, "author"))
+       error (1, 0, "\
+unable to parse %s; `author' not in the expected place", rcsfile);
+    vnode->author = rcsbuf_valcopy (rcsbuf, value, 0, NULL);
+
+    /* Get state field.  */
+    if (! rcsbuf_getkey (rcsbuf, &key, &value))
+    {
+       error (1, 0, "unexpected end of file reading %s", rcsfile);
+    }
+    if (! STREQ (key, "state"))
+       error (1, 0, "\
+unable to parse %s; `state' not in the expected place", rcsfile);
+    vnode->state = rcsbuf_valcopy (rcsbuf, value, 0, NULL);
+    /* The value is optional, according to rcsfile(5).  */
+    if (value != NULL && STREQ (value, RCSDEAD))
+    {
+       vnode->dead = 1;
+    }
+
+    /* Note that "branches" and "next" are in fact mandatory, according
+       to doc/RCSFILES.  */
+
+    /* fill in the branch list (if any branches exist) */
+    if (! rcsbuf_getkey (rcsbuf, &key, &value))
+    {
+       error (1, 0, "unexpected end of file reading %s", rcsfile);
+    }
+    if (STREQ (key, RCSDESC))
+    {
+       *keyp = key;
+       *valp = value;
+       /* Probably could/should be a fatal error.  */
+       error (0, 0, "warning: 'branches' keyword missing from %s", rcsfile);
+       return vnode;
+    }
+    if (value != NULL)
+    {
+       vnode->branches = getlist ();
+       /* Note that we are not massaging VALUE from the string found
+           in the RCS file.  */
+       do_branches (vnode->branches, value);
+    }
+
+    /* fill in the next field if there is a next revision */
+    if (! rcsbuf_getkey (rcsbuf, &key, &value))
+    {
+       error (1, 0, "unexpected end of file reading %s", rcsfile);
+    }
+    if (STREQ (key, RCSDESC))
+    {
+       *keyp = key;
+       *valp = value;
+       /* Probably could/should be a fatal error.  */
+       error (0, 0, "warning: 'next' keyword missing from %s", rcsfile);
+       return vnode;
+    }
+    if (value != NULL)
+       vnode->next = rcsbuf_valcopy (rcsbuf, value, 0, NULL);
+
+    /*
+     * XXX - this is where we put the symbolic link stuff???
+     * (into newphrases in the deltas).
+     */
+    while (1)
+    {
+       if (! rcsbuf_getkey (rcsbuf, &key, &value))
+           error (1, 0, "unexpected end of file reading %s", rcsfile);
+
+       /* The `desc' keyword is the end of the deltas. */
+       if (strcmp (key, RCSDESC) == 0)
+           break;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+
+       /* The `hardlinks' value is a group of words, which must
+          be parsed separately and added as a list to vnode->hardlinks. */
+       if (strcmp (key, "hardlinks") == 0)
+       {
+           char *word;
+
+           vnode->hardlinks = getlist();
+           while ((word = rcsbuf_valword (rcsbuf, &value)) != NULL)
+           {
+               Node *n = getnode();
+               n->key = word;
+               addnode (vnode->hardlinks, n);
+           }
+           continue;
+       }
+#endif
+
+       /* Enable use of repositories created by certain obsolete
+          versions of CVS.  This code should remain indefinately;
+          there is no procedure for converting old repositories, and
+          checking for it is harmless.  */
+       if (STREQ (key, RCSDEAD))
+       {
+           vnode->dead = 1;
+           if (vnode->state != NULL)
+               free (vnode->state);
+           vnode->state = xstrdup (RCSDEAD);
+           continue;
+       }
+
+       /* if we have a new revision number, we're done with this delta */
+       for (cp = key;
+            (isdigit ((unsigned char) *cp) || *cp == '.') && *cp != '\0';
+            cp++)
+           /* do nothing */ ;
+       /* Note that when comparing with RCSDATE, we are not massaging
+          VALUE from the string found in the RCS file.  This is OK
+          since we know exactly what to expect.  */
+       if (*cp == '\0' && strncmp (RCSDATE, value, strlen (RCSDATE)) == 0)
+           break;
+
+       /* At this point, key and value represent a user-defined field
+          in the delta node. */
+       if (vnode->other_delta == NULL)
+           vnode->other_delta = getlist ();
+       kv = getnode ();
+       kv->type = rcsbuf_get_node_type (rcsbuf);
+       kv->key = xstrdup (key);
+       kv->data = rcsbuf_valcopy (rcsbuf, value, kv->type != RCSCMPFLD,
+                                  &kv->len);
+       if (addnode (vnode->other_delta, kv) != 0)
+       {
+           /* Complaining about duplicate keys in newphrases seems
+              questionable, in that we don't know what they mean and
+              doc/RCSFILES has no prohibition on several newphrases
+              with the same key.  But we can't store more than one as
+              long as we store them in a List *.  */
+           error (0, 0, "warning: duplicate key `%s' in RCS file `%s'",
+                  key, rcsfile);
+           freenode (kv);
+       }
+    }
+
+    /* Return the key which caused us to fail back to the caller.  */
+    *keyp = key;
+    *valp = value;
+
+    return vnode;
+}
+
+
+
+static void
+freedeltatext (Deltatext *d)
+{
+    if (d->version != NULL)
+       free (d->version);
+    if (d->log != NULL)
+       free (d->log);
+    if (d->text != NULL)
+       free (d->text);
+    if (d->other != NULL)
+       dellist (&d->other);
+    free (d);
+}
+
+static Deltatext *
+RCS_getdeltatext (RCSNode *rcs, FILE *fp, struct rcsbuffer *rcsbuf)
+{
+    char *num;
+    char *key, *value;
+    Node *p;
+    Deltatext *d;
+
+    /* Get the revision number. */
+    if (! rcsbuf_getrevnum (rcsbuf, &num))
+    {
+       /* If num == NULL, it means we reached EOF naturally.  That's
+          fine. */
+       if (num == NULL)
+           return NULL;
+       else
+           error (1, 0, "%s: unexpected EOF", rcs->print_path);
+    }
+
+    p = findnode (rcs->versions, num);
+    if (p == NULL)
+       error (1, 0, "mismatch in rcs file %s between deltas and deltatexts 
(%s)",
+              rcs->print_path, num);
+
+    d = xmalloc (sizeof (Deltatext));
+    d->version = xstrdup (num);
+
+    /* Get the log message. */
+    if (! rcsbuf_getkey (rcsbuf, &key, &value))
+       error (1, 0, "%s, delta %s: unexpected EOF", rcs->print_path, num);
+    if (! STREQ (key, "log"))
+       error (1, 0, "%s, delta %s: expected `log', got `%s'",
+              rcs->print_path, num, key);
+    d->log = rcsbuf_valcopy (rcsbuf, value, 0, NULL);
+
+    /* Get random newphrases. */
+    d->other = getlist();
+    while (1)
+    {
+       if (! rcsbuf_getkey (rcsbuf, &key, &value))
+           error (1, 0, "%s, delta %s: unexpected EOF", rcs->print_path, num);
+
+       if (STREQ (key, "text"))
+           break;
+
+       p = getnode();
+       p->type = rcsbuf_get_node_type (rcsbuf);
+       p->key = xstrdup (key);
+       p->data = rcsbuf_valcopy (rcsbuf, value, p->type != RCSCMPFLD,
+                                 &p->len);
+       if (addnode (d->other, p) < 0)
+       {
+           error (0, 0, "warning: %s, delta %s: duplicate field `%s'",
+                  rcs->print_path, num, key);
+       }
+    }
+
+    /* Get the change text. We already know that this key is `text'. */
+    d->text = rcsbuf_valcopy (rcsbuf, value, 0, &d->len);
+
+    return d;
+}
+
+
+
+/* RCS output functions, for writing RCS format files from RCSNode
+   structures.
+
+   For most of this work, RCS 5.7 uses an `aprintf' function which aborts
+   program upon error.  Instead, these functions check the output status
+   of the stream right before closing it, and aborts if an error condition
+   is found.  The RCS solution is probably the better one: it produces
+   more overhead, but will produce a clearer diagnostic in the case of
+   catastrophic error.  In either case, however, the repository will probably
+   not get corrupted. */
+static int
+putsymbol_proc (Node *symnode, void *fparg)
+{
+    FILE *fp = fparg;
+
+    /* A fiddly optimization: this code used to just call fprintf, but
+       in an old repository with hundreds of tags this can get called
+       hundreds of thousands of times when doing a cvs tag.  Since
+       tagging is a relatively common operation, and using putc and
+       fputs is just as comprehensible, the change is worthwhile.  */
+    putc ('\n', fp);
+    putc ('\t', fp);
+    fputs (symnode->key, fp);
+    putc (':', fp);
+    fputs (symnode->data, fp);
+    return 0;
+}
+
+
+
+/* putlock_proc is like putsymbol_proc, but key and data are reversed. */
+static int
+putlock_proc (Node *symnode, void *fp)
+{
+    return fprintf (fp, "\n\t%s:%s", (char *)symnode->data, symnode->key);
+}
+
+
+
+static int
+putrcsfield_proc (Node *node, void *vfp)
+{
+    FILE *fp = vfp;
+
+    /* Some magic keys used internally by CVS start with `;'. Skip them. */
+    if (node->key[0] == ';')
+       return 0;
+
+    fprintf (fp, "\n%s\t", node->key);
+    if (node->data != NULL)
+    {
+       /* If the field's value may contain evil characters,
+          it must be stringified. */
+       if (node->type != RCSSTRING)
+           fwrite (node->data, 1, node->len ? node->len : strlen (node->data),
+                   fp);
+       else
+       {
+           putc ('@', fp);
+           expand_at_signs (node->data,
+                            node->len ? node->len : strlen (node->data),
+                            fp);
+           putc ('@', fp);
+       }
+    }
+
+    /* desc, log and text fields should not be terminated with semicolon;
+       all other fields should be. */
+    if (! STREQ (node->key, "desc") &&
+       ! STREQ (node->key, "log") &&
+       ! STREQ (node->key, "text"))
+    {
+       putc (';', fp);
+    }
+    return 0;
+}
+
+
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+
+/* Save a filename in a `hardlinks' RCS field.  NODE->KEY will contain
+   a full pathname, but currently only basenames are stored in the RCS
+   node.  Assume that the filename includes nasty characters and
+   @-escape it. */
+
+static int
+puthardlink_proc (node, vfp)
+    Node *node;
+    void *vfp;
+{
+    FILE *fp = vfp;
+    char *basename = strrchr (node->key, '/');
+
+    if (basename == NULL)
+       basename = node->key;
+    else
+       ++basename;
+
+    putc ('\t', fp);
+    putc ('@', fp);
+    (void) expand_at_signs (basename, strlen (basename), fp);
+    putc ('@', fp);
+
+    return 0;
+}
+
+#endif /* PRESERVE_PERMISSIONS_SUPPORT */
+
+
+
+/* Output the admin node for RCS into stream FP. */
+static void
+RCS_putadmin (RCSNode *rcs, FILE *fp)
+{
+    fprintf (fp, "%s\t%s;\n", RCSHEAD, rcs->head ? rcs->head : "");
+    if (rcs->branch)
+       fprintf (fp, "%s\t%s;\n", RCSBRANCH, rcs->branch);
+
+    fputs ("access", fp);
+    if (rcs->access)
+    {
+       char *p, *s;
+       s = xstrdup (rcs->access);
+       for (p = strtok (s, " \n\t"); p != NULL; p = strtok (NULL, " \n\t"))
+           fprintf (fp, "\n\t%s", p);
+       free (s);
+    }
+    fputs (";\n", fp);
+
+    fputs (RCSSYMBOLS, fp);
+    /* If we haven't had to convert the symbols to a list yet, don't
+       force a conversion now; just write out the string.  */
+    if (rcs->symbols == NULL && rcs->symbols_data != NULL)
+    {
+       fputs ("\n\t", fp);
+       fputs (rcs->symbols_data, fp);
+    }
+    else
+       walklist (RCS_symbols (rcs), putsymbol_proc, fp);
+    fputs (";\n", fp);
+
+    fputs ("locks", fp);
+    if (rcs->locks_data)
+       fprintf (fp, "\t%s", rcs->locks_data);
+    else if (rcs->locks)
+       walklist (rcs->locks, putlock_proc, fp);
+    if (rcs->strict_locks)
+       fprintf (fp, "; strict");
+    fputs (";\n", fp);
+
+    if (rcs->comment)
+    {
+       fprintf (fp, "comment\t@");
+       expand_at_signs (rcs->comment, (off_t) strlen (rcs->comment), fp);
+       fputs ("@;\n", fp);
+    }
+    if (rcs->expand && ! STREQ (rcs->expand, "kv"))
+       fprintf (fp, "address@hidden@;\n", RCSEXPAND, rcs->expand);
+
+    walklist (rcs->other, putrcsfield_proc, fp);
+
+    putc ('\n', fp);
+}
+
+
+
+static void
+putdelta (RCSVers *vers, FILE *fp)
+{
+    Node *bp, *start;
+
+    /* Skip if no revision was supplied, or if it is outdated (cvs admin -o) */
+    if (vers == NULL || vers->outdated)
+       return;
+
+    fprintf (fp, "\n%s\n%s\t%s;\t%s %s;\t%s %s;\nbranches",
+            vers->version,
+            RCSDATE, vers->date,
+            "author", vers->author,
+            "state", vers->state ? vers->state : "");
+
+    if (vers->branches != NULL)
+    {
+       start = vers->branches->list;
+       for (bp = start->next; bp != start; bp = bp->next)
+           fprintf (fp, "\n\t%s", bp->key);
+    }
+
+    fprintf (fp, ";\nnext\t%s;", vers->next ? vers->next : "");
+
+    walklist (vers->other_delta, putrcsfield_proc, fp);
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    if (vers->hardlinks)
+    {
+       fprintf (fp, "\nhardlinks");
+       walklist (vers->hardlinks, puthardlink_proc, fp);
+       putc (';', fp);
+    }
+#endif
+    putc ('\n', fp);
+}
+
+
+
+static void
+RCS_putdtree (RCSNode *rcs, char *rev, FILE *fp)
+{
+    RCSVers *versp;
+    Node *p, *branch;
+
+    /* Previously, this function used a recursive implementation, but
+       if the trunk has a huge number of revisions and the program
+       stack is not big, a stack overflow could occur, so this
+       nonrecursive version was developed to be more safe. */
+    Node *branchlist, *onebranch;
+    List *branches;
+    List *onebranchlist;
+
+    if (rev == NULL)
+       return;
+
+    branches = getlist();
+
+    for (; rev != NULL;)
+    {
+       /* Find the delta node for this revision. */
+       p = findnode (rcs->versions, rev);
+       if (p == NULL)
+       {
+           error (1, 0,
+                  "error parsing repository file %s, file may be corrupt.", 
+                  rcs->path);
+       }
+ 
+       versp = p->data;
+
+       /* Print the delta node and go for its `next' node.  This
+          prints the trunk. If there are any branches printed on this
+          revision, mark we have some. */
+       putdelta (versp, fp);
+       /* Store branch information into branch list so to write its
+          trunk afterwards */
+       if (versp->branches != NULL)
+       {
+           branch = getnode();
+           branch->data = versp->branches;
+
+           addnode(branches, branch);
+       }
+
+       rev = versp->next;
+    }
+
+    /* If there are any branches printed on this revision,
+       print those trunks as well. */
+    branchlist = branches->list;
+    for (branch = branchlist->next;
+        branch != branchlist;
+        branch = branch->next)
+    {
+       onebranchlist = (List *)(branch->data);
+       onebranch = onebranchlist->list;
+       for (p = onebranch->next; p != onebranch; p = p->next)
+           RCS_putdtree (rcs, p->key, fp);
+
+       branch->data = NULL; /* so to prevent its freeing on dellist */
+    }
+
+    dellist(&branches);
+}
+
+
+
+static void
+RCS_putdesc (RCSNode *rcs, FILE *fp)
+{
+    fprintf (fp, "\n\n%s\n@", RCSDESC);
+    if (rcs->desc != NULL)
+    {
+       off_t len = (off_t) strlen (rcs->desc);
+       if (len > 0)
+       {
+           expand_at_signs (rcs->desc, len, fp);
+           if (rcs->desc[len-1] != '\n')
+               putc ('\n', fp);
+       }
+    }
+    fputs ("@\n", fp);
+}
+
+
+
+static void
+putdeltatext (FILE *fp, Deltatext *d)
+{
+    fprintf (fp, "\n\n%s\nlog\n@", d->version);
+    if (d->log != NULL)
+    {
+       int loglen = strlen (d->log);
+       expand_at_signs (d->log, (off_t) loglen, fp);
+       if (d->log[loglen-1] != '\n')
+           putc ('\n', fp);
+    }
+    putc ('@', fp);
+
+    walklist (d->other, putrcsfield_proc, fp);
+
+    fputs ("\ntext\n@", fp);
+    if (d->text != NULL)
+       expand_at_signs (d->text, (off_t) d->len, fp);
+    fputs ("@\n", fp);
+}
+
+
+
+/* TODO: the whole mechanism for updating deltas is kludgey... more
+   sensible would be to supply all the necessary info in a `newdeltatext'
+   field for RCSVers nodes. -twp */
+
+/* Copy delta text nodes from FIN to FOUT.  If NEWDTEXT is non-NULL, it
+   is a new delta text node, and should be added to the tree at the
+   node whose revision number is INSERTPT.  (Note that trunk nodes are
+   written in decreasing order, and branch nodes are written in
+   increasing order.) */
+static void
+RCS_copydeltas (RCSNode *rcs, FILE *fin, struct rcsbuffer *rcsbufin,
+               FILE *fout, Deltatext *newdtext, char *insertpt)
+{
+    int actions;
+    RCSVers *dadmin;
+    Node *np;
+    int insertbefore, found;
+    char *bufrest;
+    int nls;
+    size_t buflen;
+#ifndef HAVE_MMAP
+    char buf[8192];
+    int got;
+#endif
+
+    /* Count the number of versions for which we have to do some
+       special operation.  */
+    actions = walklist (rcs->versions, count_delta_actions, NULL);
+
+    /* Make a note of whether NEWDTEXT should be inserted
+       before or after its INSERTPT. */
+    insertbefore = (newdtext != NULL && numdots (newdtext->version) == 1);
+
+    while (actions != 0 || newdtext != NULL)
+    {
+       Deltatext *dtext;
+
+       dtext = RCS_getdeltatext (rcs, fin, rcsbufin);
+
+       /* We shouldn't hit EOF here, because that would imply that
+           some action was not taken, or that we could not insert
+           NEWDTEXT.  */
+       if (dtext == NULL)
+           error (1, 0, "internal error: EOF too early in RCS_copydeltas");
+
+       found = (insertpt != NULL && STREQ (dtext->version, insertpt));
+       if (found && insertbefore)
+       {
+           putdeltatext (fout, newdtext);
+           newdtext = NULL;
+           insertpt = NULL;
+       }
+
+       np = findnode (rcs->versions, dtext->version);
+       dadmin = np->data;
+
+       /* If this revision has been outdated, just skip it. */
+       if (dadmin->outdated)
+       {
+           freedeltatext (dtext);
+           --actions;
+           continue;
+       }
+          
+       /* Update the change text for this delta.  New change text
+          data may come from cvs admin -m, cvs admin -o, or cvs ci. */
+       if (dadmin->text != NULL)
+       {
+           if (dadmin->text->log != NULL || dadmin->text->text != NULL)
+               --actions;
+           if (dadmin->text->log != NULL)
+           {
+               free (dtext->log);
+               dtext->log = dadmin->text->log;
+               dadmin->text->log = NULL;
+           }
+           if (dadmin->text->text != NULL)
+           {
+               free (dtext->text);
+               dtext->text = dadmin->text->text;
+               dtext->len = dadmin->text->len;
+               dadmin->text->text = NULL;
+           }
+       }
+       putdeltatext (fout, dtext);
+       freedeltatext (dtext);
+
+       if (found && !insertbefore)
+       {
+           putdeltatext (fout, newdtext);
+           newdtext = NULL;
+           insertpt = NULL;
+       }
+    }
+
+    /* Copy the rest of the file directly, without bothering to
+       interpret it.  The caller will handle error checking by calling
+       ferror.
+
+       We just wrote a newline to the file, either in putdeltatext or
+       in the caller.  However, we may not have read the corresponding
+       newline from the file, because rcsbuf_getkey returns as soon as
+       it finds the end of the '@' string for the desc or text key.
+       Therefore, we may read three newlines when we should really
+       only write two, and we check for that case here.  This is not
+       an semantically important issue; we only do it to make our RCS
+       files look traditional.  */
+
+    nls = 3;
+
+    rcsbuf_get_buffered (rcsbufin, &bufrest, &buflen);
+    if (buflen > 0)
+    {
+       if (bufrest[0] != '\n'
+           || strncmp (bufrest, "\n\n\n", buflen < 3 ? buflen : 3) != 0)
+       {
+           nls = 0;
+       }
+       else
+       {
+           if (buflen < 3)
+               nls -= buflen;
+           else
+           {
+               ++bufrest;
+               --buflen;
+               nls = 0;
+           }
+       }
+
+       fwrite (bufrest, 1, buflen, fout);
+    }
+#ifndef HAVE_MMAP
+    /* This bit isn't necessary when using mmap since the entire file
+     * will already be available via the RCS buffer.  Besides, the
+     * mmap code doesn't always keep the file pointer up to date, so
+     * this adds some data twice.
+     */
+    while ((got = fread (buf, 1, sizeof buf, fin)) != 0)
+    {
+       if (nls > 0
+           && got >= nls
+           && buf[0] == '\n'
+           && strncmp (buf, "\n\n\n", nls) == 0)
+       {
+           fwrite (buf + 1, 1, got - 1, fout);
+       }
+       else
+       {
+           fwrite (buf, 1, got, fout);
+       }
+
+       nls = 0;
+    }
+#endif /* HAVE_MMAP */
+}
+
+
+
+/* A helper procedure for RCS_copydeltas.  This is called via walklist
+   to count the number of RCS revisions for which some special action
+   is required.  */
+static int
+count_delta_actions (Node *np, void *ignore)
+{
+    RCSVers *dadmin = np->data;
+
+    if (dadmin->outdated)
+       return 1;
+
+    if (dadmin->text != NULL
+       && (dadmin->text->log != NULL || dadmin->text->text != NULL))
+    {
+       return 1;
+    }
+
+    return 0;
+}
+
+
+
+/*
+ * Clean up temporary files.
+ *
+ * NOTES
+ *   This function needs to be reentrant since a call to exit() can cause a
+ *   call to this function, which can then be interrupted by a signal, which
+ *   can cause a second call to this function.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+static void
+rcs_cleanup (void)
+{
+    TRACE (TRACE_FUNCTION, "rcs_cleanup()");
+
+    /* FIXME: Do not perform buffered I/O from an interrupt handler like
+     * this (via error).  However, I'm leaving the error-calling code there
+     * in the hope that on the rare occasion the error call is actually made
+     * (e.g., a fluky I/O error or permissions problem prevents the deletion
+     * of a just-created file) reentrancy won't be an issue.
+     */
+
+    /* We don't want to be interrupted during calls which set globals to NULL,
+     * but we know that by the time we reach this function, interrupts have
+     * already been blocked.
+     */
+    if (rcs_lockfile != NULL)
+    {
+       /* Use a tmp var since any of these functions could call exit, causing
+        * us to be called a second time.
+        */
+       char *tmp = rcs_lockfile;
+       rcs_lockfile = NULL;
+       if (rcs_lockfd >= 0)
+       {
+           if (close (rcs_lockfd) != 0)
+               error (0, errno, "error closing lock file %s", tmp);
+           rcs_lockfd = -1;
+       }
+
+       /* Note that the checks for existence_error are because we can be
+        * called from a signal handler, so we don't know whether the
+        * files got created.
+        */
+       if (unlink_file (tmp) < 0
+           && !existence_error (errno))
+           error (0, errno, "cannot remove %s", tmp);
+    }
+}
+
+
+
+/* RCS_internal_lockfile and RCS_internal_unlockfile perform RCS-style
+   locking on the specified RCSFILE: for a file called `foo,v', open
+   for writing a file called `,foo,'.
+
+   Note that we what do here is quite different from what RCS does.
+   RCS creates the ,foo, file before it reads the RCS file (if it
+   knows that it will be writing later), so that it actually serves as
+   a lock.  We don't; instead we rely on CVS writelocks.  This means
+   that if someone is running RCS on the file at the same time they
+   are running CVS on it, they might lose (we read the file,
+   then RCS writes it, then we write it, clobbering the
+   changes made by RCS).  I believe the current sentiment about this
+   is "well, don't do that".
+
+   A concern has been expressed about whether adopting the RCS
+   strategy would slow us down.  I don't think so, since we need to
+   write the ,foo, file anyway (unless perhaps if O_EXCL is slower or
+   something).
+
+   These do not perform quite the same function as the RCS -l option
+   for locking files: they are intended to prevent competing RCS
+   processes from stomping all over each other's laundry.  Hence,
+   they are `internal' locking functions.
+
+   If there is an error, give a fatal error; if we return we always
+   return a non-NULL value.  */
+static FILE *
+rcs_internal_lockfile (char *rcsfile)
+{
+    struct stat rstat;
+    FILE *fp;
+    static int first_call = 1;
+
+    if (first_call)
+    {
+       first_call = 0;
+       /* Clean up if we get a signal or exit.  */
+       cleanup_register (rcs_cleanup);
+    }
+
+    /* Get the lock file name: `,file,' for RCS file `file,v'. */
+    assert (rcs_lockfile == NULL);
+    assert (rcs_lockfd < 0);
+    rcs_lockfile = rcs_lockfilename (rcsfile);
+
+    /* Use the existing RCS file mode, or read-only if this is a new
+       file.  (Really, this is a lie -- if this is a new file,
+       RCS_checkin uses the permissions from the working copy.  For
+       actually creating the file, we use 0444 as a safe default mode.) */
+    if (stat (rcsfile, &rstat) < 0)
+    {
+       if (existence_error (errno))
+           rstat.st_mode = S_IRUSR | S_IRGRP | S_IROTH;
+       else
+           error (1, errno, "cannot stat %s", rcsfile);
+    }
+
+    /* Try to open exclusively.  POSIX.1 guarantees that O_EXCL|O_CREAT
+       guarantees an exclusive open.  According to the RCS source, with
+       NFS v2 we must also throw in O_TRUNC and use an open mask that makes
+       the file unwriteable.  For extensive justification, see the comments for
+       rcswriteopen() in rcsedit.c, in RCS 5.7.  This is kind of pointless
+       in the CVS case; see comment at the start of this file concerning
+       general ,foo, file strategy.
+
+       There is some sentiment that with NFSv3 and such, that one can
+       rely on O_EXCL these days.  This might be true for unix (I
+       don't really know), but I am still pretty skeptical in the case
+       of the non-unix systems.  */
+    rcs_lockfd = open (rcs_lockfile,
+                      OPEN_BINARY | O_WRONLY | O_CREAT | O_EXCL | O_TRUNC,
+                      S_IRUSR | S_IRGRP | S_IROTH);
+
+    if (rcs_lockfd < 0)
+    {
+       error (1, errno, "could not open lock file `%s'", rcs_lockfile);
+    }
+
+    /* Force the file permissions, and return a stream object. */
+    /* Because we change the modes later, we don't worry about
+       this in the non-HAVE_FCHMOD case.  */
+#ifdef HAVE_FCHMOD
+    if (fchmod (rcs_lockfd, rstat.st_mode) < 0)
+       error (1, errno, "cannot change mode for %s", rcs_lockfile);
+#endif
+    fp = fdopen (rcs_lockfd, FOPEN_BINARY_WRITE);
+    if (fp == NULL)
+       error (1, errno, "cannot fdopen %s", rcs_lockfile);
+
+    return fp;
+}
+
+
+
+static void
+rcs_internal_unlockfile (FILE *fp, char *rcsfile)
+{
+    assert (rcs_lockfile != NULL);
+    assert (rcs_lockfd >= 0);
+
+    /* Abort if we could not write everything successfully to LOCKFILE.
+       This is not a great error-handling mechanism, but should prevent
+       corrupting the repository. */
+
+    if (ferror (fp))
+       /* Using errno here may well be misleanding since the most recent
+          call that set errno may not have anything whatsoever to do with
+          the error that set the flag, but it's better than nothing.  The
+          real solution is to check each call to fprintf rather than waiting
+          until the end like this.  */
+       error (1, errno, "error writing to lock file %s", rcs_lockfile);
+
+    /* Flush and sync the file, or the user may be told the commit completed,
+     * while a server crash/power failure could still cause the data to be
+     * lost.
+     *
+     * Invoking rename(",<file>," , "<file>,v") on Linux and almost all UNIXs
+     * only flushes the inode for the target file to disk, it does not
+     * guarantee flush of the kernel buffers allocated for the ,<file>,.
+     * Depending upon the load on the machine, the Linux kernel's flush daemon
+     * process may not flush for a while.  In the meantime the CVS transaction
+     * could have been declared committed to the end CVS user (CVS process has
+     * returned the final "OK").  If the machine crashes prior to syncing the
+     * changes to disk, the committed transaction can be lost.
+     */
+    if (fflush (fp) != 0)
+       error (1, errno, "error flushing file `%s' to kernel buffers",
+              rcs_lockfile);
+#ifdef HAVE_FSYNC
+    if (fsync (rcs_lockfd) < 0)
+       error (1, errno, "error fsyncing file `%s'", rcs_lockfile);
+#endif
+
+    if (fclose (fp) == EOF)
+       error (1, errno, "error closing lock file %s", rcs_lockfile);
+    rcs_lockfd = -1;
+
+    rename_file (rcs_lockfile, rcsfile);
+
+    {
+       /* Use a temporary to make sure there's no interval
+          (after rcs_lockfile has been freed but before it's set to NULL)
+          during which the signal handler's use of rcs_lockfile would
+          reference freed memory.  */
+       char *tmp = rcs_lockfile;
+       rcs_lockfile = NULL;
+       free (tmp);
+    }
+}
+
+
+
+static char *
+rcs_lockfilename (const char *rcsfile)
+{
+    char *lockfile, *lockp;
+    const char *rcsbase, *rcsp, *rcsend;
+    int rcslen;
+
+    /* Create the lockfile name. */
+    rcslen = strlen (rcsfile);
+    lockfile = xmalloc (rcslen + 10);
+    rcsbase = last_component (rcsfile);
+    rcsend = rcsfile + rcslen - sizeof(RCSEXT);
+    for (lockp = lockfile, rcsp = rcsfile; rcsp < rcsbase; ++rcsp)
+       *lockp++ = *rcsp;
+    *lockp++ = ',';
+    while (rcsp <= rcsend)
+       *lockp++ = *rcsp++;
+    *lockp++ = ',';
+    *lockp = '\0';
+
+    return lockfile;
+}
+
+
+
+/* Rewrite an RCS file.  The basic idea here is that the caller should
+   first call RCS_reparsercsfile, then munge the data structures as
+   desired (via RCS_delete_revs, RCS_settag, &c), then call RCS_rewrite.  */
+void
+RCS_rewrite (RCSNode *rcs, Deltatext *newdtext, char *insertpt)
+{
+    FILE *fin, *fout;
+    struct rcsbuffer rcsbufin;
+
+    if (noexec)
+       return;
+
+    /* Make sure we're operating on an actual file and not a symlink.  */
+    resolve_symlink (&(rcs->path));
+
+    fout = rcs_internal_lockfile (rcs->path);
+
+    RCS_putadmin (rcs, fout);
+    RCS_putdtree (rcs, rcs->head, fout);
+    RCS_putdesc (rcs, fout);
+
+    /* Open the original RCS file and seek to the first delta text. */
+    rcsbuf_cache_open (rcs, rcs->delta_pos, &fin, &rcsbufin);
+
+    /* Update delta_pos to the current position in the output file.
+       Do NOT move these statements: they must be done after fin has
+       been positioned at the old delta_pos, but before any delta
+       texts have been written to fout.
+     */
+    rcs->delta_pos = ftello (fout);
+    if (rcs->delta_pos == -1)
+       error (1, errno, "cannot ftello in RCS file %s", rcs->path);
+
+    RCS_copydeltas (rcs, fin, &rcsbufin, fout, newdtext, insertpt);
+
+    /* We don't want to call rcsbuf_cache here, since we're about to
+       delete the file.  */
+    rcsbuf_close (&rcsbufin);
+    if (ferror (fin))
+       /* The only case in which using errno here would be meaningful
+          is if we happen to have left errno unmolested since the call
+          which produced the error (e.g. fread).  That is pretty
+          fragile even if it happens to sometimes be true.  The real
+          solution is to make sure that all the code which reads
+          from fin checks for errors itself (some does, some doesn't).  */
+       error (0, 0, "warning: ferror set while rewriting RCS file `%s'", 
rcs->path);
+    if (fclose (fin) < 0)
+       error (0, errno, "warning: closing RCS file `%s'", rcs->path);
+
+    rcs_internal_unlockfile (fout, rcs->path);
+}
+
+
+
+/* Abandon changes to an RCS file. */
+void
+RCS_abandon (RCSNode *rcs)
+{
+    free_rcsnode_contents (rcs);
+    rcs->symbols_data = NULL;
+    rcs->expand = NULL;
+    rcs->access = NULL;
+    rcs->locks_data = NULL;
+    rcs->comment = NULL;
+    rcs->desc = NULL;
+    rcs->flags |= PARTIAL;
+}
+
+
+
+/*
+ * For a given file with full pathname PATH and revision number REV,
+ * produce a file label suitable for passing to diff.  The default
+ * file label as used by RCS 5.7 looks like this:
+ *
+ *     FILENAME <tab> YYYY/MM/DD <sp> HH:MM:SS <tab> REVNUM
+ *
+ * The date and time used are the revision's last checkin date and time.
+ * If REV is NULL, use the working copy's mtime instead.
+ *
+ * /dev/null is not statted but assumed to have been created on the Epoch.
+ * At least using the POSIX.2 definition of patch, this should cause creation
+ * of files on platforms such as Windoze where the null IO device isn't named
+ * /dev/null to be parsed by patch properly.
+ */
+char *
+make_file_label (const char *path, const char *rev, RCSNode *rcs)
+{
+    char datebuf[MAXDATELEN + 1];
+    char *label;
+
+    if (rev)
+    {
+       char date[MAXDATELEN + 1];
+       /* revs cannot be attached to /dev/null ... duh. */
+       assert (strcmp(DEVNULL, path));
+       RCS_getrevtime (rcs, rev, datebuf, 0);
+       (void) date_to_internet (date, datebuf);
+       label = Xasprintf ("-L%s\t%s\t%s", path, date, rev);
+    }
+    else
+    {
+       struct stat sb;
+       struct tm *wm;
+
+       if (strcmp(DEVNULL, path))
+       {
+           const char *file = last_component (path);
+           if (stat (file, &sb) < 0)
+               /* Assume that if the stat fails,then the later read for the
+                * diff will too.
+                */
+               error (1, errno, "could not get info for `%s'", path);
+           wm = gmtime (&sb.st_mtime);
+       }
+       else
+       {
+           time_t t = 0;
+           wm = gmtime(&t);
+       }
+
+       (void) tm_to_internet (datebuf, wm);
+       label = Xasprintf ("-L%s\t%s", path, datebuf);
+    }
+    return label;
+}
+
+
+
+/*
+ * Set up a local/custom RCS keyword for expansion.
+ *
+ * INPUTS
+ *   infopath          Path to file being parsed, for error messages.
+ *   ln                        Line number of INFOPATH being processed, for 
error
+ *                     messages.
+ *   keywords_in
+ *   arg
+ *
+ * OUTPUTS
+ *   keywords_in
+ */
+void
+RCS_setlocalid (const char *infopath, unsigned int ln,
+               void **keywords_in, const char *arg)
+{
+    char *copy, *next, *key, *s;
+    struct rcs_keyword *keywords;
+    enum keyword save_expandto;
+
+    if (!*keywords_in)
+       *keywords_in = new_keywords ();
+    keywords = *keywords_in;
+
+    copy = xstrdup (arg);
+    next = copy;
+    key = strtok (next, "=");
+
+    /*
+     * Validate key
+     */
+    for (s = key; *s != '\0'; s++)
+    {
+       if (! isalpha ((unsigned char) *s))
+       {
+           if (!parse_error (infopath, ln))
+                   error (0, 0,
+"%s [%u]: LocalKeyword ignored: Bad character `%c' in key `%s'",
+                          primary_root_inverse_translate (infopath),
+                          ln, *s, key);
+           free (copy);
+           return;
+       }
+    }
+
+    save_expandto = keywords[KEYWORD_LOCALID].expandto;
+
+    /* options? */
+    while ((key = strtok (NULL, ",")) != NULL) {
+       if (!strcmp(key, keywords[KEYWORD_ID].string))
+           keywords[KEYWORD_LOCALID].expandto = KEYWORD_ID;
+       else if (!strcmp(key, keywords[KEYWORD_HEADER].string))
+           keywords[KEYWORD_LOCALID].expandto = KEYWORD_HEADER;
+       else if (!strcmp(key, keywords[KEYWORD_CVSHEADER].string))
+           keywords[KEYWORD_LOCALID].expandto = KEYWORD_CVSHEADER;
+       else
+       {
+           keywords[KEYWORD_LOCALID].expandto = save_expandto;
+           if (!parse_error (infopath, ln))
+               error (0, 0,
+"%s [%u]: LocalKeyword ignored: Unknown LocalId mode: `%s'",
+                      primary_root_inverse_translate (infopath),
+                      ln, key);
+           free (copy);
+           return;
+       }
+    }
+
+    keywords[KEYWORD_LOCALID].string = xstrdup (next);
+    keywords[KEYWORD_LOCALID].len = strlen (next);
+    keywords[KEYWORD_LOCALID].expandit = 1;
+
+    free (copy);
+}
+
+
+
+void
+RCS_setincexc (void **keywords_in, const char *arg)
+{
+    char *key;
+    char *copy, *next;
+    bool include = false;
+    struct rcs_keyword *keyword;
+    struct rcs_keyword *keywords;
+
+    if (!*keywords_in)
+       *keywords_in = new_keywords ();
+    keywords = *keywords_in;
+
+    copy = xstrdup(arg);
+    next = copy;
+    switch (*next++) {
+       case 'e':
+           include = false;
+           break;
+       case 'i':
+           include = true;
+           break;
+       default:
+           free(copy);
+           return;
+    }
+
+    if (include)
+       for (keyword = keywords; keyword->string != NULL; keyword++)
+       {
+           keyword->expandit = false;
+       }
+
+    key = strtok(next, ",");
+    while (key) {
+       for (keyword = keywords; keyword->string != NULL; keyword++) {
+           if (strcmp (keyword->string, key) == 0)
+               keyword->expandit = include;
+       }
+       key = strtok(NULL, ",");
+    }
+    free(copy);
+    return;
+}
+
+
+
+#define ATTIC "/" CVSATTIC
+static char *
+getfullCVSname(char *CVSname, char **pathstore)
+{
+    if (current_parsed_root->directory) {
+       int rootlen;
+       char *c = NULL;
+       int alen = sizeof(ATTIC) - 1;
+
+       *pathstore = xstrdup(CVSname);
+       if ((c = strrchr(*pathstore, '/')) != NULL) {
+           if (c - *pathstore >= alen) {
+               if (!strncmp(c - alen, ATTIC, alen)) {
+                   while (*c != '\0') {
+                       *(c - alen) = *c;
+                       c++;
+                   }
+                   *(c - alen) = '\0';
+               }
+           }
+       }
+
+       rootlen = strlen(current_parsed_root->directory);
+       if (!strncmp(*pathstore, current_parsed_root->directory, rootlen) &&
+           (*pathstore)[rootlen] == '/')
+           CVSname = (*pathstore + rootlen + 1);
+       else
+           CVSname = (*pathstore);
+    }
+    return CVSname;
+}
Index: ccvs/src/rcs.h
diff -u /dev/null ccvs/src/rcs.h:1.82.8.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/rcs.h      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * RCS source control definitions needed by rcs.c and friends
+ */
+
+#ifndef RCS_H
+#define RCS_H
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#include "hash.h"
+
+/* Strings which indicate a conflict if they occur at the start of a line.  */
+#define        RCS_MERGE_PAT_1 "<<<<<<< "
+#define        RCS_MERGE_PAT_2 "=======\n"
+#define        RCS_MERGE_PAT_3 ">>>>>>> "
+
+#define        RCSEXT          ",v"
+#define RCSPAT         "*,v"
+#define        RCSHEAD         "head"
+#define        RCSBRANCH       "branch"
+#define        RCSSYMBOLS      "symbols"
+#define        RCSDATE         "date"
+#define        RCSDESC         "desc"
+#define RCSEXPAND      "expand"
+
+/* Used by the version of death support which resulted from old
+   versions of CVS (e.g. 1.5 if you define DEATH_SUPPORT and not
+   DEATH_STATE).  Only a hacked up RCS (used by those old versions of
+   CVS) will put this into RCS files.  Considered obsolete.  */
+#define RCSDEAD                "dead"
+
+#define        DATEFORM        "%02d.%02d.%02d.%02d.%02d.%02d"
+#define        SDATEFORM       "%d.%d.%d.%d.%d.%d"
+
+/*
+ * Opaque structure definitions used by RCS specific lookup routines
+ */
+#define VALID  0x1                     /* flags field contains valid data */
+#define        INATTIC 0x2                     /* RCS file is located in the 
Attic */
+#define PARTIAL 0x4                    /* RCS file not completly parsed */
+
+/* All the "char *" fields in RCSNode, Deltatext, and RCSVers are
+   '\0'-terminated (except "text" in Deltatext).  This means that we
+   can't deal with fields containing '\0', which is a limitation that
+   RCS does not have.  Would be nice to fix this some day.  */
+
+struct rcsnode
+{
+    /* Reference count for this structure.  Used to deal with the
+       fact that there might be a pointer from the Vers_TS or might
+       not.  Callers who increment this field are responsible for
+       calling freercsnode when they are done with their reference.  */
+    int refcount;
+
+    /* Flags (INATTIC, PARTIAL, &c), see above.  */
+    int flags;
+
+    /* File name of the RCS file.  This is not necessarily the name
+       as specified by the user, but it is a name which can be passed to
+       system calls and a name which is OK to print in error messages
+       (the various names might differ in case).  */
+    char *path;
+
+    /* Use when printing paths.  */
+    char *print_path;
+
+    /* Value for head keyword from RCS header, or NULL if empty.  HEAD may only
+     * be empty in a valid RCS file when the file has no revisions, a state
+     * that should not be able to occur with CVS.
+     */
+    char *head;
+
+    /* Value for branch keyword from RCS header, or NULL if omitted.  */
+    char *branch;
+
+    /* Raw data on symbolic revisions.  The first time that RCS_symbols is
+       called, we parse these into ->symbols, and free ->symbols_data.  */
+    char *symbols_data;
+
+    /* Value for expand keyword from RCS header, or NULL if omitted.  */
+    char *expand;
+
+    /* List of nodes, the key of which is the symbolic name and the data
+       of which is the numeric revision that it corresponds to (malloc'd).  */
+    List *symbols;
+
+    /* List of nodes (type RCSVERS), the key of which the numeric revision
+       number, and the data of which is an RCSVers * for the revision.  */
+    List *versions;
+
+    /* Value for access keyword from RCS header, or NULL if empty.
+       FIXME: RCS_delaccess would also seem to use "" for empty.  We
+       should pick one or the other.  */
+    char *access;
+
+    /* Raw data on locked revisions.  The first time that RCS_getlocks is
+       called, we parse these into ->locks, and free ->locks_data.  */
+    char *locks_data;
+
+    /* List of nodes, the key of which is the numeric revision and the
+       data of which is the user that it corresponds to (malloc'd).  */
+    List *locks;
+
+    /* Set for the strict keyword from the RCS header.  */
+    int strict_locks;
+
+    /* Value for the comment keyword from RCS header (comment leader), or
+       NULL if omitted.  */
+    char *comment;
+
+    /* Value for the desc field in the RCS file, or NULL if empty.  */
+    char *desc;
+
+    /* File offset of the first deltatext node, so we can seek there.  */
+    off_t delta_pos;
+
+    /* Newphrases from the RCS header.  List of nodes, the key of which
+       is the "id" which introduces the newphrase, and the value of which
+       is the value from the newphrase.  */
+    List *other;
+};
+
+typedef struct rcsnode RCSNode;
+
+
+
+/* This is the structure that the recursion processor passes to the
+ * fileproc to tell it about a particular file.
+ *
+ * FIXME: This should be in recurse.h.
+ */
+struct file_info
+{
+    /* Name of the file, without any directory component.  */
+    const char *file;
+
+    /* Name of the directory we are in, relative to the directory in
+       which this command was issued.  We have cd'd to this directory
+       (either in the working directory or in the repository, depending
+       on which sort of recursion we are doing).  If we are in the directory
+       in which the command was issued, this is "".  */
+    const char *update_dir;
+
+    /* update_dir and file put together, with a slash between them as
+       necessary.  This is the proper way to refer to the file in user
+       messages.  */
+    const char *fullname;
+
+    /* Name of the directory corresponding to the repository which contains
+       this file.  */
+    const char *repository;
+
+    /* The pre-parsed entries for this directory.  */
+    List *entries;
+
+    RCSNode *rcs;
+};
+
+
+
+struct deltatext {
+    char *version;
+
+    /* Log message, or NULL if we do not intend to change the log message
+       (that is, RCS_copydeltas should just use the log message from the
+       file).  */
+    char *log;
+
+    /* Change text, or NULL if we do not intend to change the change text
+       (that is, RCS_copydeltas should just use the change text from the
+       file).  Note that it is perfectly valid to have log be NULL and
+       text non-NULL, or vice-versa.  */
+    char *text;
+    size_t len;
+
+    /* Newphrase fields from deltatext nodes.  FIXME: duplicates the
+       other field in the rcsversnode, I think.  */
+    List *other;
+};
+typedef struct deltatext Deltatext;
+
+struct rcsversnode
+{
+    /* Duplicate of the key by which this structure is indexed.  */
+    char *version;
+
+    char *date;
+    char *author;
+    char *state;
+    char *next;
+    int dead;
+    int outdated;
+    Deltatext *text;
+    List *branches;
+    /* Newphrase fields from deltatext nodes.  Also contains ";add" and
+       ";delete" magic fields (see rcs.c, log.c).  I think this is
+       only used by log.c (where it looks up "log").  Duplicates the
+       other field in struct deltatext, I think.  */
+    List *other;
+    /* Newphrase fields from delta nodes.  */
+    List *other_delta;
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    /* Hard link information for each revision. */
+    List *hardlinks;
+#endif
+};
+typedef struct rcsversnode RCSVers;
+
+/*
+ * CVS reserves all even-numbered branches for its own use.  "magic" branches
+ * (see rcs.c) are contained as virtual revision numbers (within symbolic
+ * tags only) off the RCS_MAGIC_BRANCH, which is 0.  CVS also reserves the
+ * ".1" branch for vendor revisions.  So, if you do your own branching, you
+ * should limit your use to odd branch numbers starting at 3.
+ */
+#define        RCS_MAGIC_BRANCH        0
+
+/* The type of a function passed to RCS_checkout.  */
+typedef void (*RCSCHECKOUTPROC) (void *, const char *, size_t);
+
+struct rcsbuffer;
+
+/* What RCS_deltas is supposed to do.  */
+enum rcs_delta_op {RCS_ANNOTATE, RCS_FETCH};
+
+/*
+ * exported interfaces
+ */
+RCSNode *RCS_parse (const char *file, const char *repos);
+RCSNode *RCS_parsercsfile (const char *rcsfile);
+void RCS_fully_parse (RCSNode *);
+void RCS_reparsercsfile (RCSNode *, FILE **, struct rcsbuffer *);
+extern int RCS_setattic (RCSNode *, int);
+
+char *RCS_check_kflag (const char *arg);
+char *RCS_getdate (RCSNode * rcs, const char *date, int force_tag_match);
+char *RCS_gettag (RCSNode * rcs, const char *symtag, int force_tag_match,
+                 int *simple_tag);
+int RCS_exist_rev (RCSNode *rcs, char *rev);
+int RCS_exist_tag (RCSNode *rcs, char *tag);
+char *RCS_tag2rev (RCSNode *rcs, char *tag);
+char *RCS_getversion (RCSNode *rcs, const char *tag, const char *date,
+                     int force_tag_match, int *simple_tag);
+char *RCS_magicrev (RCSNode *rcs, char *rev);
+int RCS_isbranch (RCSNode *rcs, const char *rev);
+int RCS_nodeisbranch (RCSNode *rcs, const char *tag);
+char *RCS_whatbranch (RCSNode *rcs, const char *tag);
+char *RCS_head (RCSNode * rcs);
+int RCS_datecmp (const char *date1, const char *date2);
+time_t RCS_getrevtime (RCSNode * rcs, const char *rev, char *date, int fudge);
+List *RCS_symbols (RCSNode *rcs);
+void RCS_check_tag (const char *tag);
+int RCS_valid_rev (const char *rev);
+List *RCS_getlocks (RCSNode *rcs);
+void freercsnode (RCSNode ** rnodep);
+char *RCS_getbranch (RCSNode *rcs, const char *tag, int force_tag_match);
+char *RCS_branch_head (RCSNode *rcs, char *rev);
+
+int RCS_isdead (RCSNode *, const char *);
+char *RCS_getexpand (RCSNode *);
+void RCS_setexpand (RCSNode *, const char *);
+int RCS_checkout (RCSNode *, const char *, const char *, const char *,
+                  const char *, const char *, RCSCHECKOUTPROC, void *);
+const char *RCS_get_openpgp_signatures (RCSNode *rcs, const char *rev);
+int RCS_checkin (RCSNode *rcs, const char *update_dir, const char *workfile,
+                const char *message, const char *rev, time_t citime,
+                int flags);
+int RCS_cmp_file (RCSNode *, const char *, char **, const char *, const char *,
+                 const char * );
+int RCS_settag (RCSNode *, const char *, const char *);
+int RCS_deltag (RCSNode *, const char *);
+int RCS_setbranch (RCSNode *, const char *);
+int RCS_lock (RCSNode *, const char *, int);
+int RCS_unlock (RCSNode *, char *, int);
+int RCS_delete_revs (RCSNode *, char *, char *, int);
+void RCS_addaccess (RCSNode *, char *);
+void RCS_delaccess (RCSNode *, char *);
+char *RCS_getaccess (RCSNode *);
+void RCS_rewrite (RCSNode *, Deltatext *, char *);
+void RCS_abandon (RCSNode *);
+int rcs_change_text (const char *, char *, size_t, const char *,
+                    size_t, char **, size_t *);
+void RCS_deltas (RCSNode *, FILE *, struct rcsbuffer *, const char *,
+                enum rcs_delta_op, char **, size_t *,
+                char **, size_t *);
+void RCS_setincexc (void **, const char *arg);
+void RCS_setlocalid (const char *, unsigned int, void **, const char *arg);
+char *make_file_label (const char *, const char *, RCSNode *);
+
+extern bool preserve_perms;
+
+/* From import.c.  */
+extern int add_rcs_file (const char *, const char *, const char *,
+                         const char *, const char *, const char *,
+                         const char *, int, char **, const char *, size_t,
+                         FILE *, bool);
+void free_keywords (void *keywords);
+bool contains_keyword (char *buf, size_t len);
+
+#endif /* RCS_H */
Index: ccvs/src/rcscmds.c
diff -u /dev/null ccvs/src/rcscmds.c:1.72.6.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/rcscmds.c  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,344 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * The functions in this file provide an interface for performing 
+ * operations directly on RCS files. 
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Standard headers.  */
+#include <stdio.h>
+
+/* GNULIB */
+#include "quotearg.h"
+
+/* CVS */
+#include "difflib.h"
+#include "cvs.h"
+
+/* This file, rcs.h, and rcs.c, together sometimes known as the "RCS
+   library", are intended to define our interface to RCS files.
+
+   Whether there will also be a version of RCS which uses this
+   library, or whether the library will be packaged for uses beyond
+   CVS or RCS (many people would like such a thing) is an open
+   question.  Some considerations:
+
+   1.  An RCS library for CVS must have the capabilities of the
+   existing CVS code which accesses RCS files.  In particular, simple
+   approaches will often be slow.
+
+   2.  An RCS library should not use code from the current RCS
+   (5.7 and its ancestors).  The code has many problems.  Too few
+   comments, too many layers of abstraction, too many global variables
+   (the correct number for a library is zero), too much intricately
+   interwoven functionality, and too many clever hacks.  Paul Eggert,
+   the current RCS maintainer, agrees.
+
+   3.  More work needs to be done in terms of separating out the RCS
+   library from the rest of CVS (for example, cvs_output should be
+   replaced by a callback, and the declarations should be centralized
+   into rcs.h, and probably other such cleanups).
+
+   4.  To be useful for RCS and perhaps for other uses, the library
+   may need features beyond those needed by CVS.
+
+   5.  Any changes to the RCS file format *must* be compatible.  Many,
+   many tools (not just CVS and RCS) can at least import this format.
+   RCS and CVS must preserve the current ability to import/export it
+   (preferably improved--magic branches are currently a roadblock).
+   See doc/RCSFILES in the CVS distribution for documentation of this
+   file format.
+
+   On a related note, see the comments at diff_exec, later in this file,
+   for more on the diff library.  */
+
+static void RCS_output_diff_options (int, char * const *, const char *,
+                                    const char *, const char *);
+
+
+/* Stuff to deal with passing arguments the way libdiff.a wants to deal
+   with them.  This is a crufty interface; there is no good reason for it
+   to resemble a command line rather than something closer to "struct
+   log_data" in log.c.  */
+
+
+
+/* Diff revisions and/or files.  OPTS controls the format of the diff
+   (it contains options such as "-w -c", &c), or "" for the default.
+   OPTIONS controls keyword expansion, as a string starting with "-k",
+   or "" to use the default.  REV1 is the first revision to compare
+   against; it must be non-NULL.  If REV2 is non-NULL, compare REV1
+   and REV2; if REV2 is NULL compare REV1 with the file in the working
+   directory, whose name is WORKFILE.  LABEL1 and LABEL2 are default
+   file labels, and (if non-NULL) should be added as -L options
+   to diff.  Output goes to stdout.
+
+   Return value is 0 for success, -1 for a failure which set errno,
+   or positive for a failure which printed a message on stderr.
+
+   This used to exec rcsdiff, but now calls RCS_checkout and diff_exec.
+
+   An issue is what timezone is used for the dates which appear in the
+   diff output.  rcsdiff uses the -z flag, which is not presently
+   processed by CVS diff, but I'm not sure exactly how hard to worry
+   about this--any such features are undocumented in the context of
+   CVS, and I'm not sure how important to users.  */
+int
+RCS_exec_rcsdiff (RCSNode *rcsfile, int diff_argc,
+                 char * const *diff_argv, const char *options,
+                  const char *rev1, const char *rev1_cache, const char *rev2,
+                  const char *label1, const char *label2, const char *workfile)
+{
+    char *tmpfile1 = NULL;
+    char *tmpfile2 = NULL;
+    const char *use_file1, *use_file2;
+    int status, retval;
+
+
+    cvs_output ("\
+===================================================================\n\
+RCS file: ", 0);
+    cvs_output (rcsfile->print_path, 0);
+    cvs_output ("\n", 1);
+
+    /* Historically, `cvs diff' has expanded the $Name keyword to the
+       empty string when checking out revisions.  This is an accident,
+       but no one has considered the issue thoroughly enough to determine
+       what the best behavior is.  Passing NULL for the `nametag' argument
+       preserves the existing behavior. */
+
+    cvs_output ("retrieving revision ", 0);
+    cvs_output (rev1, 0);
+    cvs_output ("\n", 1);
+
+    if (rev1_cache != NULL)
+       use_file1 = rev1_cache;
+    else
+    {
+       tmpfile1 = cvs_temp_name();
+       status = RCS_checkout (rcsfile, NULL, rev1, NULL, options, tmpfile1,
+                              NULL, NULL);
+       if (status > 0)
+       {
+           retval = status;
+           goto error_return;
+       }
+       else if (status < 0)
+       {
+           error( 0, errno,
+                  "cannot check out revision %s of %s", rev1, rcsfile->path );
+           retval = 1;
+           goto error_return;
+       }
+       use_file1 = tmpfile1;
+    }
+
+    if (rev2 == NULL)
+    {
+       assert (workfile != NULL);
+       use_file2 = workfile;
+    }
+    else
+    {
+       tmpfile2 = cvs_temp_name ();
+       cvs_output ("retrieving revision ", 0);
+       cvs_output (rev2, 0);
+       cvs_output ("\n", 1);
+       status = RCS_checkout (rcsfile, NULL, rev2, NULL, options,
+                              tmpfile2, NULL, NULL);
+       if (status > 0)
+       {
+           retval = status;
+           goto error_return;
+       }
+       else if (status < 0)
+       {
+           error (0, errno,
+                  "cannot check out revision %s of %s", rev2, rcsfile->path);
+           return 1;
+       }
+       use_file2 = tmpfile2;
+    }
+
+    RCS_output_diff_options (diff_argc, diff_argv, rev1, rev2, workfile);
+    status = diff_exec (use_file1, use_file2, label1, label2,
+                       diff_argc, diff_argv, RUN_TTY);
+    if (status >= 0)
+    {
+       retval = status;
+       goto error_return;
+    }
+    else if (status < 0)
+    {
+       error (0, errno,
+              "cannot diff %s and %s", use_file1, use_file2);
+       retval = 1;
+       goto error_return;
+    }
+
+ error_return:
+    {
+       /* Call CVS_UNLINK() below rather than unlink_file to avoid the check
+        * for noexec.
+        */
+       if( tmpfile1 != NULL )
+       {
+           if( CVS_UNLINK( tmpfile1 ) < 0 )
+           {
+               if( !existence_error( errno ) )
+                   error( 0, errno, "cannot remove temp file %s", tmpfile1 );
+           }
+           free( tmpfile1 );
+       }
+       if( tmpfile2 != NULL )
+       {
+           if( CVS_UNLINK( tmpfile2 ) < 0 )
+           {
+               if( !existence_error( errno ) )
+                   error( 0, errno, "cannot remove temp file %s", tmpfile2 );
+           }
+           free (tmpfile2);
+       }
+    }
+
+    return retval;
+}
+
+
+
+/* Show differences between two files.  This is the start of a diff library.
+
+   Some issues:
+
+   * Should option parsing be part of the library or the caller?  The
+   former allows the library to add options without changing the callers,
+   but it causes various problems.  One is that something like --brief really
+   wants special handling in CVS, and probably the caller should retain
+   some flexibility in this area.  Another is online help (the library could
+   have some feature for providing help, but how does that interact with
+   the help provided by the caller directly?).  Another is that as things
+   stand currently, there is no separate namespace for diff options versus
+   "cvs diff" options like -l (that is, if the library adds an option which
+   conflicts with a CVS option, it is trouble).
+
+   * This isn't required for a first-cut diff library, but if there
+   would be a way for the caller to specify the timestamps that appear
+   in the diffs (rather than the library getting them from the files),
+   that would clean up the kludgy utime() calls in patch.c.
+
+   Show differences between FILE1 and FILE2.  Either one can be
+   DEVNULL to indicate a nonexistent file (same as an empty file
+   currently, I suspect, but that may be an issue in and of itself).
+   OPTIONS is a list of diff options, or "" if none.  At a minimum,
+   CVS expects that -c (update.c, patch.c) and -n (update.c) will be
+   supported.  Other options, like -u, --speed-large-files, &c, will
+   be specified if the user specified them.
+
+   OUT is a filename to send the diffs to, or RUN_TTY to send them to
+   stdout.  Error messages go to stderr.  Return value is 0 for
+   success, -1 for a failure which set errno, 1 for success (and some
+   differences were found), or >1 for a failure which printed a
+   message on stderr.  */
+
+int
+diff_exec (const char *file1, const char *file2, const char *label1,
+           const char *label2, int dargc, char * const *dargv,
+          const char *out)
+{
+    TRACE (TRACE_FUNCTION, "diff_exec (%s, %s, %s, %s, %s)",
+          file1, file2, label1, label2, out);
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    /* If either file1 or file2 are special files, pretend they are
+       /dev/null.  Reason: suppose a file that represents a block
+       special device in one revision becomes a regular file.  CVS
+       must find the `difference' between these files, but a special
+       file contains no data useful for calculating this metric.  The
+       safe thing to do is to treat the special file as an empty file,
+       thus recording the regular file's full contents.  Doing so will
+       create extremely large deltas at the point of transition
+       between device files and regular files, but this is probably
+       very rare anyway.
+
+       There may be ways around this, but I think they are fraught
+       with danger. -twp */
+
+    if (preserve_perms &&
+       strcmp (file1, DEVNULL) != 0 &&
+       strcmp (file2, DEVNULL) != 0)
+    {
+       struct stat sb1, sb2;
+
+       if (lstat (file1, &sb1) < 0)
+           error (1, errno, "cannot get file information for %s", file1);
+       if (lstat (file2, &sb2) < 0)
+           error (1, errno, "cannot get file information for %s", file2);
+
+       if (!S_ISREG (sb1.st_mode) && !S_ISDIR (sb1.st_mode))
+           file1 = DEVNULL;
+       if (!S_ISREG (sb2.st_mode) && !S_ISDIR (sb2.st_mode))
+           file2 = DEVNULL;
+    }
+#endif
+
+    /* The first arg to call_diff_setup is used only for error reporting. */
+    call_diff_setup ("diff", dargc, dargv);
+    if (label1)
+       call_diff_add_arg (label1);
+    if (label2)
+       call_diff_add_arg (label2);
+    call_diff_add_arg ("--");
+    call_diff_add_arg (file1);
+    call_diff_add_arg (file2);
+
+    return call_diff (out);
+}
+
+/* Print the options passed to DIFF, in the format used by rcsdiff.
+   The rcsdiff code that produces this output is extremely hairy, and
+   it is not clear how rcsdiff decides which options to print and
+   which not to print.  The code below reproduces every rcsdiff run
+   that I have seen. */
+
+static void
+RCS_output_diff_options (int diff_argc, char * const *diff_argv,
+                        const char *rev1, const char *rev2,
+                         const char *workfile)
+{
+    int i;
+    
+    cvs_output ("diff", 0);
+    for (i = 0; i < diff_argc; i++)
+    {
+        cvs_output (" ", 1);
+       cvs_output (quotearg_style (shell_quoting_style, diff_argv[i]), 0);
+    }
+    cvs_output (" -r", 3);
+    cvs_output (rev1, 0);
+
+    if (rev2)
+    {
+       cvs_output (" -r", 3);
+       cvs_output (rev2, 0);
+    }
+    else
+    {
+       assert (workfile != NULL);
+       cvs_output (" ", 1);
+       cvs_output (workfile, 0);
+    }
+    cvs_output ("\n", 1);
+}
Index: ccvs/src/root.c
diff -u /dev/null ccvs/src/root.c:1.121.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/root.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1106 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Poritons Copyright (c) 1992, Mark D. Baushke
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Name of Root
+ * 
+ * Determine the path to the CVSROOT and set "Root" accordingly.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "root.h"
+
+#include "cvs.h"
+#include <assert.h>
+#include "getline.h"
+
+#include "stack.h"
+
+/* Printable names for things in the current_parsed_root->method enum variable.
+   Watch out if the enum is changed in cvs.h! */
+
+const char method_names[][16] = {
+    "undefined", "local", "server (rsh)", "pserver",
+    "kserver", "gserver", "ext", "extssh", "fork"
+};
+
+#ifndef DEBUG
+
+cvsroot_t *
+Name_Root (const char *dir, const char *update_dir)
+{
+    FILE *fpin;
+    cvsroot_t *ret;
+    const char *xupdate_dir;
+    char *root = NULL;
+    size_t root_allocated = 0;
+    char *tmp;
+    char *cvsadm;
+    char *cp;
+    int len;
+
+    TRACE (TRACE_FLOW, "Name_Root (%s, %s)",
+          dir ? dir : "(null)",
+          update_dir ? update_dir : "(null)");
+
+    if (update_dir && *update_dir)
+       xupdate_dir = update_dir;
+    else
+       xupdate_dir = ".";
+
+    if (dir != NULL)
+    {
+       cvsadm = Xasprintf ("%s/%s", dir, CVSADM);
+       tmp = Xasprintf ("%s/%s", dir, CVSADM_ROOT);
+    }
+    else
+    {
+       cvsadm = xstrdup (CVSADM);
+       tmp = xstrdup (CVSADM_ROOT);
+    }
+
+    /*
+     * Do not bother looking for a readable file if there is no cvsadm
+     * directory present.
+     *
+     * It is possible that not all repositories will have a CVS/Root
+     * file. This is ok, but the user will need to specify -d
+     * /path/name or have the environment variable CVSROOT set in
+     * order to continue.  */
+    if ((!isdir (cvsadm)) || (!isreadable (tmp)))
+    {
+       ret = NULL;
+       goto out;
+    }
+
+    /*
+     * The assumption here is that the CVS Root is always contained in the
+     * first line of the "Root" file.
+     */
+    fpin = xfopen (tmp, "r");
+
+    if ((len = getline (&root, &root_allocated, fpin)) < 0)
+    {
+       int saved_errno = errno;
+       /* FIXME: should be checking for end of file separately; errno
+          is not set in that case.  */
+       error (0, 0, "in directory %s:", xupdate_dir);
+       error (0, saved_errno, "cannot read %s", CVSADM_ROOT);
+       error (0, 0, "please correct this problem");
+       ret = NULL;
+       goto out;
+    }
+    fclose (fpin);
+    cp = root + len - 1;
+    if (*cp == '\n')
+       *cp = '\0';                     /* strip the newline */
+
+    /*
+     * root now contains a candidate for CVSroot. It must be an
+     * absolute pathname or specify a remote server.
+     */
+
+    ret = parse_cvsroot (root);
+    if (ret == NULL)
+    {
+       error (0, 0, "in directory %s:", xupdate_dir);
+       error (0, 0,
+              "ignoring %s because it does not contain a valid root.",
+              CVSADM_ROOT);
+       goto out;
+    }
+
+    if (!ret->isremote && !isdir (ret->directory))
+    {
+       error (0, 0, "in directory %s:", xupdate_dir);
+       error (0, 0,
+              "ignoring %s because it specifies a non-existent repository %s",
+              CVSADM_ROOT, root);
+       ret = NULL;
+       goto out;
+    }
+
+
+ out:
+    free (cvsadm);
+    free (tmp);
+    if (root != NULL)
+       free (root);
+    return ret;
+}
+
+
+
+/*
+ * Write the CVS/Root file so that the environment variable CVSROOT
+ * and/or the -d option to cvs will be validated or not necessary for
+ * future work.
+ */
+void
+Create_Root (const char *dir, const char *rootdir)
+{
+    FILE *fout;
+    char *tmp;
+
+    if (noexec)
+       return;
+
+    /* record the current cvs root */
+
+    if (rootdir != NULL)
+    {
+        if (dir != NULL)
+           tmp = Xasprintf ("%s/%s", dir, CVSADM_ROOT);
+        else
+           tmp = xstrdup (CVSADM_ROOT);
+
+        fout = xfopen (tmp, "w+");
+        if (fprintf (fout, "%s\n", rootdir) < 0)
+           error (1, errno, "write to %s failed", tmp);
+        if (fclose (fout) == EOF)
+           error (1, errno, "cannot close %s", tmp);
+       free (tmp);
+    }
+}
+
+#endif /* ! DEBUG */
+
+
+
+/* Translate an absolute repository string for a primary server and return it.
+ *
+ * INPUTS
+ *   root_in   The root to be translated.
+ *
+ * RETURNS
+ *   A translated string this function owns, or a pointer to the original
+ *   string passed in if no translation was necessary.
+ *
+ *   If the returned string is the translated one, it may be overwritten
+ *   by the next call to this function.
+ */
+const char *
+primary_root_translate (const char *root_in)
+{
+#ifdef PROXY_SUPPORT
+    char *translated;
+    static char *previous = NULL;
+    static size_t len;
+
+    /* This can happen, for instance, during `cvs init'.  */
+    if (!config) return root_in;
+
+    if (config->PrimaryServer
+        && !strncmp (root_in, config->PrimaryServer->directory,
+                    strlen (config->PrimaryServer->directory))
+        && (ISSLASH (root_in[strlen (config->PrimaryServer->directory)])
+            || root_in[strlen (config->PrimaryServer->directory)] == '\0')
+       )
+    {
+       translated =
+           Xasnprintf (previous, &len,
+                       "%s%s", current_parsed_root->directory,
+                       root_in + strlen (config->PrimaryServer->directory));
+       if (previous && previous != translated)
+           free (previous);
+       return previous = translated;
+    }
+#endif
+
+    /* There is no primary root configured or it didn't match.  */
+    return root_in;
+}
+
+
+
+/* Translate a primary root in reverse for PATHNAMEs in responses.
+ *
+ * INPUTS
+ *   root_in   The root to be translated.
+ *
+ * RETURNS
+ *   A translated string this function owns, or a pointer to the original
+ *   string passed in if no translation was necessary.
+ *
+ *   If the returned string is the translated one, it may be overwritten
+ *   by the next call to this function.
+ */
+const char *
+primary_root_inverse_translate (const char *root_in)
+{
+#ifdef PROXY_SUPPORT
+    char *translated;
+    static char *previous = NULL;
+    static size_t len;
+
+    /* This can happen, for instance, during `cvs init'.  */
+    if (!config) return root_in;
+
+    if (config->PrimaryServer
+        && !strncmp (root_in, current_parsed_root->directory,
+                    strlen (current_parsed_root->directory))
+        && (ISSLASH (root_in[strlen (current_parsed_root->directory)])
+            || root_in[strlen (current_parsed_root->directory)] == '\0')
+       )
+    {
+       translated =
+           Xasnprintf (previous, &len,
+                       "%s%s", config->PrimaryServer->directory,
+                       root_in + strlen (current_parsed_root->directory));
+       if (previous && previous != translated)
+           free (previous);
+       return previous = translated;
+    }
+#endif
+
+    /* There is no primary root configured or it didn't match.  */
+    return root_in;
+}
+
+
+
+/* The root_allow_* stuff maintains a list of valid CVSROOT
+   directories.  Then we can check against them when a remote user
+   hands us a CVSROOT directory.  */
+static List *root_allow;
+
+static void
+delconfig (Node *n)
+{
+    if (n->data) free_config (n->data);
+}
+
+
+
+void
+root_allow_add (const char *arg, const char *configPath)
+{
+    Node *n;
+
+    if (!root_allow) root_allow = getlist();
+    n = getnode();
+    n->key = xstrdup (arg);
+    n->data = parse_config (arg, configPath);
+    n->delproc = delconfig;
+    addnode (root_allow, n);
+}
+
+void
+root_allow_free (void)
+{
+    dellist (&root_allow);
+}
+
+bool
+root_allow_used (void)
+{
+    return root_allow != NULL;
+}
+
+bool
+root_allow_ok (const char *arg)
+{
+    if (!root_allow)
+    {
+       /* Probably someone upgraded from CVS before 1.9.10 to 1.9.10
+          or later without reading the documentation about
+          --allow-root.  Printing an error here doesn't disclose any
+          particularly useful information to an attacker because a
+          CVS server configured in this way won't let *anyone* in.  */
+
+       /* Note that we are called from a context where we can spit
+          back "error" rather than waiting for the next request which
+          expects responses.  */
+       printf ("\
+error 0 Server configuration missing --allow-root in inetd.conf\n");
+       exit (EXIT_FAILURE);
+    }
+
+    if (findnode (root_allow, arg))
+       return true;
+    return false;
+}
+
+
+
+/* Get a config we stored in response to root_allow.
+ *
+ * RETURNS
+ *   The config associated with ARG.
+ */
+struct config *
+get_root_allow_config (const char *arg, const char *configPath)
+{
+    Node *n;
+
+    TRACE (TRACE_FUNCTION, "get_root_allow_config (%s)", arg);
+
+    if (root_allow)
+       n = findnode (root_allow, arg);
+    else
+       n = NULL;
+
+    if (n) return n->data;
+    return parse_config (arg, configPath);
+}
+
+
+
+/* This global variable holds the global -d option.  It is NULL if -d
+   was not used, which means that we must get the CVSroot information
+   from the CVSROOT environment variable or from a CVS/Root file.  */
+char *CVSroot_cmdline;
+
+
+
+/* FIXME - Deglobalize this. */
+cvsroot_t *current_parsed_root = NULL;
+/* Used to save the original root being processed so that we can still find it
+ * in lists and the like after a `Redirect' response.  Also set to mirror
+ * current_parsed_root in server mode so that code which runs on both the
+ * client and server but which wants to use original data on the client can
+ * just always reference the original_parsed_root.
+ */
+const cvsroot_t *original_parsed_root;
+
+
+/* allocate and initialize a cvsroot_t
+ *
+ * We must initialize the strings to NULL so we know later what we should
+ * free
+ *
+ * Some of the other zeroes remain meaningful as, "never set, use default",
+ * or the like
+ */
+/* Functions which allocate memory are not pure.  */
+static cvsroot_t *new_cvsroot_t(void)
+    __attribute__( (__malloc__) );
+static cvsroot_t *
+new_cvsroot_t (void)
+{
+    cvsroot_t *newroot;
+
+    /* gotta store it somewhere */
+    newroot = xmalloc(sizeof(cvsroot_t));
+
+    newroot->original = NULL;
+    newroot->directory = NULL;
+    newroot->method = null_method;
+    newroot->isremote = false;
+    newroot->sign = SIGN_DEFAULT;
+    newroot->sign_template = xstrdup (DEFAULT_SIGN_TEMPLATE);
+    newroot->sign_textmode = xstrdup (DEFAULT_SIGN_TEXTMODE);
+    newroot->sign_args = getlist ();
+#ifdef CLIENT_SUPPORT
+    newroot->username = NULL;
+    newroot->password = NULL;
+    newroot->hostname = NULL;
+    newroot->cvs_rsh = NULL;
+    newroot->cvs_server = NULL;
+    newroot->port = 0;
+    newroot->proxy_hostname = NULL;
+    newroot->proxy_port = 0;
+    newroot->redirect = true;  /* Advertise Redirect support */
+#endif /* CLIENT_SUPPORT */
+
+    return newroot;
+}
+
+
+
+/* Dispose of a cvsroot_t and its component parts.
+ *
+ * NOTE
+ *  It is dangerous for most code to call this function since parse_cvsroot
+ *  maintains a cache of parsed roots.
+ */
+static void
+free_cvsroot_t (cvsroot_t *root)
+{
+    assert (root);
+    if (root->original != NULL)
+       free (root->original);
+    if (root->directory != NULL)
+       free (root->directory);
+    if (root->sign_template)
+       free (root->sign_template);
+    if (root->sign_textmode)
+       free (root->sign_textmode);
+    dellist (&root->sign_args);
+#ifdef CLIENT_SUPPORT
+    if (root->username != NULL)
+       free (root->username);
+    if (root->password != NULL)
+    {
+       /* I like to be paranoid */
+       memset (root->password, 0, strlen (root->password));
+       free (root->password);
+    }
+    if (root->hostname != NULL)
+       free (root->hostname);
+    if (root->cvs_rsh != NULL)
+       free (root->cvs_rsh);
+    if (root->cvs_server != NULL)
+       free (root->cvs_server);
+    if (root->proxy_hostname != NULL)
+       free (root->proxy_hostname);
+#endif /* CLIENT_SUPPORT */
+    free (root);
+}
+
+
+
+/*
+ * Parse a CVSROOT string to allocate and return a new cvsroot_t structure.
+ * Valid specifications are:
+ *
+ *     :(gserver|kserver|pserver):[[user][:address@hidden:[port]]/path
+ *     [:(ext|server):address@hidden:]/path
+ *     [:local:[e:]]/path
+ *     :fork:/path
+ *
+ * INPUTS
+ *     root_in         C String containing the CVSROOT to be parsed.
+ *
+ * RETURNS
+ *     A pointer to a newly allocated cvsroot_t structure upon success and
+ *     NULL upon failure.  The caller should never dispose of this structure,
+ *     as it is stored in a cache, but the caller may rely on it not to
+ *     change.
+ *
+ * NOTES
+ *     This would have been a lot easier to write in Perl.
+ *
+ *     Would it make sense to reimplement the root and config file parsing
+ *     gunk in Lex/Yacc?
+ *
+ * SEE ALSO
+ *     free_cvsroot_t()
+ */
+cvsroot_t *
+parse_cvsroot (const char *root_in)
+{
+    cvsroot_t *newroot;                        /* the new root to be returned 
*/
+    char *cvsroot_save;                        /* what we allocated so we can 
dispose
+                                        * it when finished */
+    char *cvsroot_copy, *p;            /* temporary pointers for parsing */
+#if defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+    char *q;                           /* temporary pointer for parsing */
+    char *firstslash;                  /* save where the path spec starts
+                                        * while we parse
+                                        * [[user][:address@hidden:[port]]
+                                        */
+    int check_hostname, no_port, no_password, no_proxy;
+#endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+    static List *cache = NULL;
+    Node *node;
+
+    assert (root_in != NULL);
+
+    /* This message is TRACE_FLOW since this function is called repeatedly by
+     * the recursion routines.
+     */
+    TRACE (TRACE_FLOW, "parse_cvsroot (%s)", root_in);
+
+    if ((node = findnode (cache, root_in)))
+       return node->data;
+
+    assert (root_in);
+
+    /* allocate some space */
+    newroot = new_cvsroot_t();
+
+    /* save the original string */
+    newroot->original = xstrdup (root_in);
+
+    /* and another copy we can munge while parsing */
+    cvsroot_save = cvsroot_copy = xstrdup (root_in);
+
+    if (*cvsroot_copy == ':')
+    {
+       char *method = ++cvsroot_copy;
+
+       /* Access method specified, as in
+        * "cvs -d 
:(gserver|kserver|pserver):[[user][:address@hidden:[port]]/path",
+        * "cvs -d [:(ext|server):address@hidden:]/path",
+        * "cvs -d :local:e:\path",
+        * "cvs -d :fork:/path".
+        * We need to get past that part of CVSroot before parsing the
+        * rest of it.
+        */
+
+       if (! (p = strchr (method, ':')))
+       {
+           error (0, 0, "No closing `:' on method in CVSROOT.");
+           goto error_exit;
+       }
+       *p = '\0';
+       cvsroot_copy = ++p;
+
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+       /* Look for method options, for instance, proxy, proxyport.
+        * Calling strtok again is saved until after parsing the method.
+        */
+       method = strtok (method, ";");
+       if (!method)
+           /* Could just exit now, but this keeps the error message in sync.
+            */
+           method = "";
+#endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+
+       /* Now we have an access method -- see if it's valid. */
+
+       if (!strcasecmp (method, "local"))
+           newroot->method = local_method;
+       else if (!strcasecmp (method, "pserver"))
+           newroot->method = pserver_method;
+       else if (!strcasecmp (method, "kserver"))
+           newroot->method = kserver_method;
+       else if (!strcasecmp (method, "gserver"))
+           newroot->method = gserver_method;
+       else if (!strcasecmp (method, "server"))
+           newroot->method = server_method;
+       else if (!strcasecmp (method, "ext"))
+           newroot->method = ext_method;
+       else if (!strcasecmp (method, "fork"))
+           newroot->method = fork_method;
+       else
+       {
+           error (0, 0, "Unknown method (`%s') in CVSROOT.", method);
+           goto error_exit;
+       }
+
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+       /* Parse the method options, for instance, proxy, proxyport */
+       while ((p = strtok (NULL, ";")))
+       {
+           char *q = strchr (p, '=');
+           if (!q && (strcasecmp (p, "sign") || strcasecmp (p, "no-sign")))
+           {
+               error (0, 0, "Option (`%s') has no argument in CVSROOT.",
+                       p);
+               goto error_exit;
+           }
+
+           *q++ = '\0';
+           TRACE (TRACE_DATA, "CVSROOT option=`%s' value=`%s'", p, q);
+           if (!strcasecmp (p, "proxy"))
+           {
+               newroot->proxy_hostname = xstrdup (q);
+           }
+           else if (!strcasecmp (p, "proxyport"))
+           {
+               char *r = q;
+               if (*r == '-') r++;
+               while (*r)
+               {
+                   if (!isdigit(*r++))
+                   {
+                       error (0, 0,
+"CVSROOT may only specify a positive, non-zero, integer proxy port (not 
`%s').",
+                              q);
+                       goto error_exit;
+                   }
+               }
+               if ((newroot->proxy_port = atoi (q)) <= 0)
+                   error (0, 0,
+"CVSROOT may only specify a positive, non-zero, integer proxy port (not 
`%s').",
+                          q);
+           }
+           else if (!strcasecmp (p, "sign"))
+           {
+               if (!q)
+                   newroot->sign = SIGN_ALWAYS;
+               else if (!strcasecmp (q, "auto") || !strcasecmp (q, "server"))
+                   newroot->sign = SIGN_DEFAULT;
+               else
+               {
+                   bool on;
+                   if (readBool ("CVSROOT", "sign", q, &on))
+                   {
+                       if (on)
+                           newroot->sign = SIGN_ALWAYS;
+                       else
+                           newroot->sign = SIGN_NEVER;
+                   }
+                   else
+                       goto error_exit;
+               }
+           }
+           else if (!strcasecmp (p, "no-sign"))
+               newroot->sign = SIGN_NEVER;
+           else if (!strcasecmp (p, "sign-template"))
+               newroot->sign_template = xstrdup (q);
+           else if (!strcasecmp (p, "sign-textmode"))
+               newroot->sign_textmode = xstrdup (q);
+           else if (!strcasecmp (p, "sign-arg"))
+               push_string (newroot->sign_args, q);
+           else if (!strcasecmp (p, "CVS_RSH"))
+           {
+               /* override CVS_RSH environment variable */
+               if (newroot->method == ext_method)
+                   newroot->cvs_rsh = xstrdup (q);
+           }
+           else if (!strcasecmp (p, "CVS_SERVER"))
+           {
+               /* override CVS_SERVER environment variable */
+               if (newroot->method == ext_method
+                   || newroot->method == fork_method)
+                   newroot->cvs_server = xstrdup (q);
+           }
+           else if (!strcasecmp (p, "Redirect"))
+               readBool ("CVSROOT", "Redirect", q, &newroot->redirect);
+           else
+           {
+               error (0, 0, "Unknown option (`%s') in CVSROOT.", p);
+               goto error_exit;
+           }
+       }
+#endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+    }
+    else
+    {
+       /* If the method isn't specified, assume EXT_METHOD if the string looks
+          like a relative path and LOCAL_METHOD otherwise.  */
+
+       newroot->method = ((*cvsroot_copy != '/' && strchr (cvsroot_copy, '/'))
+                         ? ext_method
+                         : local_method);
+    }
+
+    /*
+     * There are a few sanity checks we can do now, only knowing the
+     * method of this root.
+     */
+
+    newroot->isremote = (newroot->method != local_method);
+
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+    if (readonlyfs && newroot->isremote)
+       error (1, 0,
+"Read-only repository feature unavailable with remote roots (cvsroot = %s)",
+              cvsroot_copy);
+
+    if ((newroot->method != local_method)
+       && (newroot->method != fork_method)
+       )
+    {
+       /* split the string into [[user][:address@hidden:[port]] & /path
+        *
+        * this will allow some characters such as '@' & ':' to remain unquoted
+        * in the path portion of the spec
+        */
+       if ((p = strchr (cvsroot_copy, '/')) == NULL)
+       {
+           error (0, 0, "CVSROOT requires a path spec:");
+           error (0, 0,
+":(gserver|kserver|pserver):[[user][:address@hidden:[port]]/path");
+           error (0, 0, "[:(ext|server):address@hidden:]/path");
+           goto error_exit;
+       }
+       firstslash = p;         /* == NULL if '/' not in string */
+       *p = '\0';
+
+       /* Check to see if there is a username[:password] in the string. */
+       if ((p = strchr (cvsroot_copy, '@')) != NULL)
+       {
+           *p = '\0';
+           /* check for a password */
+           if ((q = strchr (cvsroot_copy, ':')) != NULL)
+           {
+               *q = '\0';
+               newroot->password = xstrdup (++q);
+               /* Don't check for *newroot->password == '\0' since
+                * a user could conceivably wish to specify a blank password
+                *
+                * (newroot->password == NULL means to use the
+                * password from .cvspass)
+                */
+           }
+
+           /* copy the username */
+           if (*cvsroot_copy != '\0')
+               /* a blank username is impossible, so leave it NULL in that
+                * case so we know to use the default username
+                */
+               newroot->username = xstrdup (cvsroot_copy);
+
+           cvsroot_copy = ++p;
+       }
+
+       /* now deal with host[:[port]] */
+
+       /* the port */
+       if ((p = strchr (cvsroot_copy, ':')) != NULL)
+       {
+           *p++ = '\0';
+           if (strlen(p))
+           {
+               q = p;
+               if (*q == '-') q++;
+               while (*q)
+               {
+                   if (!isdigit(*q++))
+                   {
+                       error (0, 0,
+"CVSROOT may only specify a positive, non-zero, integer port (not `%s').",
+                               p);
+                       error (0, 0,
+                               "Perhaps you entered a relative pathname?");
+                       goto error_exit;
+                   }
+               }
+               if ((newroot->port = atoi (p)) <= 0)
+               {
+                   error (0, 0,
+"CVSROOT may only specify a positive, non-zero, integer port (not `%s').",
+                           p);
+                   error (0, 0, "Perhaps you entered a relative pathname?");
+                   goto error_exit;
+               }
+           }
+       }
+
+       /* copy host */
+       if (*cvsroot_copy != '\0')
+           /* blank hostnames are invalid, but for now leave the field NULL
+            * and catch the error during the sanity checks later
+            */
+           newroot->hostname = xstrdup (cvsroot_copy);
+
+       /* restore the '/' */
+       cvsroot_copy = firstslash;
+       *cvsroot_copy = '/';
+    }
+#endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+
+    /*
+     * Parse the path for all methods.
+     */
+    /* Here & local_cvsroot() should be the only places this needs to be
+     * called on a CVSROOT now.  cvsroot->original is saved for error messages
+     * and, otherwise, we want no trailing slashes.
+     */
+    Sanitize_Repository_Name (cvsroot_copy);
+    newroot->directory = xstrdup (cvsroot_copy);
+
+    /*
+     * Do various sanity checks.
+     */
+
+#if defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+    if (newroot->username && ! newroot->hostname)
+    {
+       error (0, 0, "Missing hostname in CVSROOT.");
+       goto error_exit;
+    }
+
+    /* We won't have attempted to parse these without CLIENT_SUPPORT or
+     * SERVER_SUPPORT.
+     */
+    check_hostname = 0;
+    no_password = 1;
+    no_proxy = 1;
+    no_port = 0;
+#endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+    switch (newroot->method)
+    {
+    case local_method:
+#if defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+       if (newroot->username || newroot->hostname)
+       {
+           error (0, 0, "Can't specify hostname and username in CVSROOT");
+           error (0, 0, "when using local access method.");
+           goto error_exit;
+       }
+#endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+       /* cvs.texinfo has always told people that CVSROOT must be an
+          absolute pathname.  Furthermore, attempts to use a relative
+          pathname produced various errors (I couldn't get it to work),
+          so there would seem to be little risk in making this a fatal
+          error.  */
+       if (!ISABSOLUTE (newroot->directory))
+       {
+           error (0, 0, "CVSROOT must be an absolute pathname (not `%s')",
+                  newroot->directory);
+           error (0, 0, "when using local access method.");
+           goto error_exit;
+       }
+#if defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+       /* We don't need to check for these in :local: mode, really, since
+        * we shouldn't be able to hit the code above which parses them, but
+        * I'm leaving them here in lieu of assertions.
+        */
+       no_port = 1;
+       /* no_password already set */
+#endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+       break;
+#if defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+    case fork_method:
+       /* We want :fork: to behave the same as other remote access
+           methods.  Therefore, don't check to see that the repository
+           name is absolute -- let the server do it.  */
+       if (newroot->username || newroot->hostname)
+       {
+           error (0, 0, "Can't specify hostname and username in CVSROOT");
+           error (0, 0, "when using fork access method.");
+           goto error_exit;
+       }
+       newroot->hostname = xstrdup("server");  /* for error messages */
+       if (!ISABSOLUTE (newroot->directory))
+       {
+           error (0, 0, "CVSROOT must be an absolute pathname (not `%s')",
+                  newroot->directory);
+           error (0, 0, "when using fork access method.");
+           goto error_exit;
+       }
+       no_port = 1;
+       /* no_password already set */
+       break;
+    case kserver_method:
+       check_hostname = 1;
+       /* no_password already set */
+       break;
+    case gserver_method:
+       check_hostname = 1;
+       no_proxy = 0;
+       /* no_password already set */
+       break;
+    case server_method:
+    case ext_method:
+       no_port = 1;
+       /* no_password already set */
+       check_hostname = 1;
+       break;
+    case pserver_method:
+       no_password = 0;
+       no_proxy = 0;
+       check_hostname = 1;
+       break;
+#endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+    default:
+       error (1, 0, "Invalid method found in parse_cvsroot");
+    }
+
+#if defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+    if (no_password && newroot->password)
+    {
+       error (0, 0, "CVSROOT password specification is only valid for");
+       error (0, 0, "pserver connection method.");
+       goto error_exit;
+    }
+    if (no_proxy && (newroot->proxy_hostname || newroot->proxy_port))
+    {
+       error (0, 0,
+"CVSROOT proxy specification is only valid for gserver and");
+       error (0, 0, "pserver connection methods.");
+       goto error_exit;
+    }
+
+    if (!newroot->proxy_hostname && newroot->proxy_port)
+    {
+       error (0, 0, "Proxy port specified in CVSROOT without proxy host.");
+       goto error_exit;
+    }
+
+    if (check_hostname && !newroot->hostname)
+    {
+       error (0, 0, "Didn't specify hostname in CVSROOT.");
+       goto error_exit;
+    }
+
+    if (no_port && newroot->port)
+    {
+        error (0, 0,
+"CVSROOT port specification is only valid for gserver, kserver,");
+        error (0, 0, "and pserver connection methods.");
+        goto error_exit;
+    }
+#endif /* defined(CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+
+    if (*newroot->directory == '\0')
+    {
+       error (0, 0, "Missing directory in CVSROOT.");
+       goto error_exit;
+    }
+    
+    /* Hooray!  We finally parsed it! */
+    free (cvsroot_save);
+
+    if (!cache) cache = getlist();
+    node = getnode();
+    node->key = xstrdup (newroot->original);
+    node->data = newroot;
+    addnode (cache, node);
+    return newroot;
+
+error_exit:
+    free (cvsroot_save);
+    free_cvsroot_t (newroot);
+    return NULL;
+}
+
+
+
+#ifdef AUTH_CLIENT_SUPPORT
+/* Use root->username, root->hostname, root->port, and root->directory
+ * to create a normalized CVSROOT fit for the .cvspass file
+ *
+ * username defaults to the result of getcaller()
+ * port defaults to the result of get_cvs_port_number()
+ *
+ * FIXME - we could cache the canonicalized version of a root inside the
+ * cvsroot_t, but we'd have to un'const the input here and stop expecting the
+ * caller to be responsible for our return value
+ *
+ * ASSUMPTIONS
+ *   ROOT->method == pserver_method
+ */
+char *
+normalize_cvsroot (const cvsroot_t *root)
+{
+    char *cvsroot_canonical;
+    char *p, *hostname;
+
+    assert (root && root->hostname && root->directory);
+
+    /* use a lower case hostname since we know hostnames are case insensitive 
*/
+    /* Some logic says we should be tacking our domain name on too if it isn't
+     * there already, but for now this works.  Reverse->Forward lookups are
+     * almost certainly too much since that would make CVS immune to some of
+     * the DNS trickery that makes life easier for sysadmins when they want to
+     * move a repository or the like
+     */
+    p = hostname = xstrdup (root->hostname);
+    while (*p)
+    {
+       *p = tolower (*p);
+       p++;
+    }
+
+    cvsroot_canonical = Xasprintf (":pserver:address@hidden:%d%s",
+                                   root->username ? root->username
+                                                  : getcaller(),
+                                   hostname, get_cvs_port_number (root),
+                                   root->directory);
+
+    free (hostname);
+    return cvsroot_canonical;
+}
+#endif /* AUTH_CLIENT_SUPPORT */
+
+
+
+#ifdef PROXY_SUPPORT
+/* A walklist() function to walk the root_allow list looking for a 
PrimaryServer
+ * configuration with a directory matching the requested directory.
+ *
+ * If found, replace it.
+ */
+static bool get_local_root_dir_done;
+static int
+get_local_root_dir (Node *p, void *root_in)
+{
+    struct config *c = p->data;
+    char **r = root_in;
+
+    if (get_local_root_dir_done)
+       return 0;
+
+    if (c->PrimaryServer && !strcmp (*r, c->PrimaryServer->directory))
+    {
+       free (*r);
+       *r = xstrdup (p->key);
+       get_local_root_dir_done = true;
+    }
+    return 0;
+}
+#endif /* PROXY_SUPPORT */
+
+
+
+/* allocate and return a cvsroot_t structure set up as if we're using the local
+ * repository DIR.  */
+cvsroot_t *
+local_cvsroot (const char *dir)
+{
+    cvsroot_t *newroot = new_cvsroot_t();
+
+    newroot->original = xstrdup(dir);
+    newroot->method = local_method;
+    newroot->directory = xstrdup(dir);
+    /* Here and parse_cvsroot() should be the only places this needs to be
+     * called on a CVSROOT now.  cvsroot->original is saved for error messages
+     * and, otherwise, we want no trailing slashes.
+     */
+    Sanitize_Repository_Name (newroot->directory);
+
+#ifdef PROXY_SUPPORT
+    /* Translate the directory to a local one in the case that we are
+     * configured as a secondary.  If root_allow has not been initialized,
+     * nothing happens.
+     */
+    get_local_root_dir_done = false;
+    walklist (root_allow, get_local_root_dir, &newroot->directory);
+#endif /* PROXY_SUPPORT */
+
+    return newroot;
+}
+
+
+
+#ifdef DEBUG
+/* This is for testing the parsing function.  Use
+
+     gcc -I. -I.. -I../lib -DDEBUG root.c -o root
+
+   to compile.  */
+
+#include <stdio.h>
+
+char *program_name = "testing";
+char *cvs_cmd_name = "parse_cvsroot";          /* XXX is this used??? */
+
+void
+main (int argc, char *argv[])
+{
+    program_name = argv[0];
+
+    if (argc != 2)
+    {
+       fprintf (stderr, "Usage: %s <CVSROOT>\n", program_name);
+       exit (2);
+    }
+  
+    if ((current_parsed_root = parse_cvsroot (argv[1])) == NULL)
+    {
+       fprintf (stderr, "%s: Parsing failed.\n", program_name);
+       exit (1);
+    }
+    printf ("CVSroot: %s\n", argv[1]);
+    printf ("current_parsed_root->method: %s\n",
+           method_names[current_parsed_root->method]);
+    printf ("current_parsed_root->username: %s\n",
+           current_parsed_root->username
+             ? current_parsed_root->username : "NULL");
+    printf ("current_parsed_root->hostname: %s\n",
+           current_parsed_root->hostname
+             ? current_parsed_root->hostname : "NULL");
+    printf ("current_parsed_root->directory: %s\n",
+           current_parsed_root->directory);
+
+   exit (0);
+   /* NOTREACHED */
+}
+#endif
Index: ccvs/src/root.h
diff -u /dev/null ccvs/src/root.h:1.23.2.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/root.h     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS kit.
+ */
+
+/* CVSroot data structures */
+
+#ifndef ROOT_H
+#define ROOT_H
+
+#include <stdbool.h>
+
+#include "sign.h"
+
+/* Access method specified in CVSroot. */
+typedef enum {
+    null_method = 0,
+    local_method,
+    server_method,
+    pserver_method,
+    kserver_method,
+    gserver_method,
+    ext_method,
+    extssh_method,
+    fork_method
+} CVSmethod;
+extern const char method_names[][16];  /* change this in root.c if you change
+                                          the enum above */
+
+typedef struct cvsroot_s {
+    char *original;            /* The complete source CVSroot string. */
+    CVSmethod method;          /* One of the enum values above. */
+    char *directory;           /* The directory name. */
+    bool isremote;             /* True if we are doing remote access. */
+    sign_state sign;           /* Whether to sign commits.  */
+    char *sign_template;       /* The template to use to launch the external
+                                * program to produce GPG signatures.
+                                */
+    char *sign_textmode;       /* The arg GPG needs for text files.  */
+    List *sign_args;           /* Keep track of any additional arguments for
+                                * the sign tool.
+                                */
+
+/* The following is required for servers now to allow Redirects to be sent
+ * for remote roots when client support is disabled.
+ */
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+    char *username;            /* The username or NULL if method == local. */
+    char *password;            /* The password or NULL if method == local. */
+    char *hostname;            /* The hostname or NULL if method == local. */
+    char *cvs_rsh;             /* The $CVS_RSH or NULL if method != ext. */
+    char *cvs_server;          /* The $CVS_SERVER or NULL if
+                                * method != ext and method != fork. */
+    int port;                  /* The port or zero if method == local. */
+    char *proxy_hostname;      /* The hostname of the proxy server, or NULL
+                                * when method == local or no proxy will be
+                                * used.
+                                */
+    int proxy_port;            /* The port of the proxy or zero, as above. */
+    bool redirect;             /* False if we are to disable redirects. */
+#endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+} cvsroot_t;
+
+extern cvsroot_t *current_parsed_root;
+extern const cvsroot_t *original_parsed_root;
+
+cvsroot_t *Name_Root (const char *dir, const char *update_dir);
+cvsroot_t *parse_cvsroot (const char *root)
+       __attribute__ ((__malloc__));
+cvsroot_t *local_cvsroot (const char *dir)
+       __attribute__ ((__malloc__));
+void Create_Root (const char *dir, const char *rootdir);
+void root_allow_add (const char *, const char *configPath);
+void root_allow_free (void);
+bool root_allow_used (void);
+bool root_allow_ok (const char *);
+struct config *get_root_allow_config (const char *arg, const char *configPath);
+const char *primary_root_translate (const char *root_in);
+const char *primary_root_inverse_translate (const char *root_in);
+
+#endif /* ROOT_H */
Index: ccvs/src/run.c
diff -u /dev/null ccvs/src/run.c:1.62.4.1
--- /dev/null   Wed Dec 21 13:25:12 2005
+++ ccvs/src/run.c      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,630 @@
+/* run.c --- routines for executing subprocesses.
+   
+   This file is part of GNU CVS.
+
+   GNU CVS 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.
+
+   This program 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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* CONFIG_H */
+
+/* Verify interface.  */
+#include "run.h"
+
+/* GNULIB headers.  */
+#include "wait.h"
+
+/* CVS headers.  */
+#include "cvs.h"
+
+
+
+/*
+ * To exec a program under CVS, first call run_setup() to setup initial
+ * arguments.  The argument to run_setup will be parsed into whitespace 
+ * separated words and added to the global run_argv list.
+ * 
+ * Then, optionally call run_add_arg() for each additional argument that you'd
+ * like to pass to the executed program.
+ * 
+ * Finally, call run_exec() to execute the program with the specified 
arguments.
+ * The execvp() syscall will be used, so that the PATH is searched correctly.
+ * File redirections can be performed in the call to run_exec().
+ */
+static char **run_argv;
+static int run_argc;
+static size_t run_arg_allocated;
+
+
+
+void
+run_arg_free_p (int argc, char **argv)
+{
+    int i;
+    for (i = 0; i < argc; i++)
+       free (argv[i]);
+}
+
+
+
+/* VARARGS */
+void 
+run_setup (const char *prog)
+{
+    char *run_prog;
+    char *buf, *d, *s;
+    size_t length;
+    size_t doff;
+    char inquotes;
+    int dolastarg;
+
+    /* clean out any malloc'ed values from run_argv */
+    run_arg_free_p (run_argc, run_argv);
+    run_argc = 0;
+
+    run_prog = xstrdup (prog);
+
+    s = run_prog;
+    d = buf = NULL;
+    length = 0;
+    dolastarg = 1;
+    inquotes = '\0';
+    doff = d - buf;
+    expand_string(&buf, &length, doff + 1);
+    d = buf + doff;
+    while ((*d = *s++) != '\0')
+    {
+       switch (*d)
+       {
+           case '\\':
+               if (*s) *d = *s++;
+               d++;
+               break;
+           case '"':
+           case '\'':
+               if (inquotes == *d) inquotes = '\0';
+               else inquotes = *d;
+               break;
+           case ' ':
+           case '\t':
+               if (inquotes) d++;
+               else
+               {
+                   *d = '\0';
+                   run_add_arg (buf);
+                   d = buf;
+                   while (isspace(*s)) s++;
+                   if (!*s) dolastarg = 0;
+               }
+               break;
+           default:
+               d++;
+               break;
+       }
+       doff = d - buf;
+       expand_string(&buf, &length, doff + 1);
+       d = buf + doff;
+    }
+    if (dolastarg) run_add_arg (buf);
+    /* put each word into run_argv, allocating it as we go */
+    if (buf) free (buf);
+    free (run_prog);
+}
+
+
+
+void
+run_add_arg_p (int *iargc, size_t *iarg_allocated, char ***iargv,
+              const char *s)
+{
+    /* allocate more argv entries if we've run out */
+    if (*iargc >= *iarg_allocated)
+    {
+       *iarg_allocated += 50;
+       *iargv = xnrealloc (*iargv, *iarg_allocated, sizeof (char **));
+    }
+
+    if (s)
+       (*iargv)[(*iargc)++] = xstrdup (s);
+    else
+       (*iargv)[*iargc] = NULL;        /* not post-incremented on purpose! */
+}
+
+
+
+void
+run_add_arg (const char *s)
+{
+    run_add_arg_p (&run_argc, &run_arg_allocated, &run_argv, s);
+}
+
+
+
+int
+run_exec (const char *stin, const char *stout, const char *sterr, int flags)
+{
+    int shin, shout, sherr;
+    int mode_out, mode_err;
+    int status;
+    int rc = -1;
+    int rerrno = 0;
+    int pid, w;
+
+#ifdef POSIX_SIGNALS
+    sigset_t sigset_mask, sigset_omask;
+    struct sigaction act, iact, qact;
+
+#else
+#ifdef BSD_SIGNALS
+    int mask;
+    struct sigvec vec, ivec, qvec;
+
+#else
+    RETSIGTYPE (*istat) (), (*qstat) ();
+#endif
+#endif
+
+    if (trace)
+    {
+       cvs_outerr (
+#ifdef SERVER_SUPPORT
+                   server_active ? "S" :
+#endif
+                   " ", 1);
+       cvs_outerr (" -> system (", 0);
+       run_print (stderr);
+       cvs_outerr (")\n", 0);
+    }
+    if (noexec && (flags & RUN_REALLY) == 0)
+       return 0;
+
+    /* make sure that we are null terminated, since we didn't calloc */
+    run_add_arg (NULL);
+
+    /* setup default file descriptor numbers */
+    shin = 0;
+    shout = 1;
+    sherr = 2;
+
+    /* set the file modes for stdout and stderr */
+    mode_out = mode_err = O_WRONLY | O_CREAT;
+    mode_out |= ((flags & RUN_STDOUT_APPEND) ? O_APPEND : O_TRUNC);
+    mode_err |= ((flags & RUN_STDERR_APPEND) ? O_APPEND : O_TRUNC);
+
+    if (stin && (shin = open (stin, O_RDONLY)) == -1)
+    {
+       rerrno = errno;
+       error (0, errno, "cannot open %s for reading (prog %s)",
+              stin, run_argv[0]);
+       goto out0;
+    }
+    if (stout && (shout = open (stout, mode_out, 0666)) == -1)
+    {
+       rerrno = errno;
+       error (0, errno, "cannot open %s for writing (prog %s)",
+              stout, run_argv[0]);
+       goto out1;
+    }
+    if (sterr && (flags & RUN_COMBINED) == 0)
+    {
+       if ((sherr = open (sterr, mode_err, 0666)) == -1)
+       {
+           rerrno = errno;
+           error (0, errno, "cannot open %s for writing (prog %s)",
+                  sterr, run_argv[0]);
+           goto out2;
+       }
+    }
+
+    /* Make sure we don't flush this twice, once in the subprocess.  */
+    cvs_flushout();
+    cvs_flusherr();
+
+    /* The output files, if any, are now created.  Do the fork and dups.
+
+       We use vfork not so much for a performance boost (the
+       performance boost, if any, is modest on most modern unices),
+       but for the sake of systems without a memory management unit,
+       which find it difficult or impossible to implement fork at all
+       (e.g. Amiga).  The other solution is spawn (see
+       windows-NT/run.c).  */
+
+#ifdef HAVE_VFORK
+    pid = vfork ();
+#else
+    pid = fork ();
+#endif
+    if (pid == 0)
+    {
+       if (shin != 0)
+       {
+           (void) dup2 (shin, 0);
+           (void) close (shin);
+       }
+       if (shout != 1)
+       {
+           (void) dup2 (shout, 1);
+           (void) close (shout);
+       }
+       if (flags & RUN_COMBINED)
+           (void) dup2 (1, 2);
+       else if (sherr != 2)
+       {
+           (void) dup2 (sherr, 2);
+           (void) close (sherr);
+       }
+
+#ifdef SETXID_SUPPORT
+       /*
+       ** This prevents a user from creating a privileged shell
+       ** from the text editor when the SETXID_SUPPORT option is selected.
+       */
+       if (!strcmp (run_argv[0], Editor) && setegid (getgid ()))
+       {
+           error (0, errno, "cannot set egid to gid");
+           _exit (127);
+       }
+#endif
+
+       /* dup'ing is done.  try to run it now */
+       (void) execvp (run_argv[0], run_argv);
+       error (0, errno, "cannot exec %s", run_argv[0]);
+       _exit (127);
+    }
+    else if (pid == -1)
+    {
+       rerrno = errno;
+       goto out;
+    }
+
+    /* the parent.  Ignore some signals for now */
+#ifdef POSIX_SIGNALS
+    if (flags & RUN_SIGIGNORE)
+    {
+       act.sa_handler = SIG_IGN;
+       (void) sigemptyset (&act.sa_mask);
+       act.sa_flags = 0;
+       (void) sigaction (SIGINT, &act, &iact);
+       (void) sigaction (SIGQUIT, &act, &qact);
+    }
+    else
+    {
+       (void) sigemptyset (&sigset_mask);
+       (void) sigaddset (&sigset_mask, SIGINT);
+       (void) sigaddset (&sigset_mask, SIGQUIT);
+       (void) sigprocmask (SIG_SETMASK, &sigset_mask, &sigset_omask);
+    }
+#else
+#ifdef BSD_SIGNALS
+    if (flags & RUN_SIGIGNORE)
+    {
+       memset (&vec, 0, sizeof vec);
+       vec.sv_handler = SIG_IGN;
+       (void) sigvec (SIGINT, &vec, &ivec);
+       (void) sigvec (SIGQUIT, &vec, &qvec);
+    }
+    else
+       mask = sigblock (sigmask (SIGINT) | sigmask (SIGQUIT));
+#else
+    istat = signal (SIGINT, SIG_IGN);
+    qstat = signal (SIGQUIT, SIG_IGN);
+#endif
+#endif
+
+    /* wait for our process to die and munge return status */
+#ifdef POSIX_SIGNALS
+    while ((w = waitpid (pid, &status, 0)) == -1 && errno == EINTR)
+       ;
+#else
+    while ((w = wait (&status)) != pid)
+    {
+       if (w == -1 && errno != EINTR)
+           break;
+    }
+#endif
+
+    if (w == -1)
+    {
+       rc = -1;
+       rerrno = errno;
+    }
+#ifndef VMS /* status is return status */
+    else if (WIFEXITED (status))
+       rc = WEXITSTATUS (status);
+    else if (WIFSIGNALED (status))
+    {
+       if (WTERMSIG (status) == SIGPIPE)
+           error (1, 0, "broken pipe");
+       rc = 2;
+    }
+    else
+       rc = 1;
+#else /* VMS */
+    rc = WEXITSTATUS (status);
+#endif /* VMS */
+
+    /* restore the signals */
+#ifdef POSIX_SIGNALS
+    if (flags & RUN_SIGIGNORE)
+    {
+       (void) sigaction (SIGINT, &iact, NULL);
+       (void) sigaction (SIGQUIT, &qact, NULL);
+    }
+    else
+       (void) sigprocmask (SIG_SETMASK, &sigset_omask, NULL);
+#else
+#ifdef BSD_SIGNALS
+    if (flags & RUN_SIGIGNORE)
+    {
+       (void) sigvec (SIGINT, &ivec, NULL);
+       (void) sigvec (SIGQUIT, &qvec, NULL);
+    }
+    else
+       (void) sigsetmask (mask);
+#else
+    (void) signal (SIGINT, istat);
+    (void) signal (SIGQUIT, qstat);
+#endif
+#endif
+
+    /* cleanup the open file descriptors */
+  out:
+    if (sterr)
+       (void) close (sherr);
+    else
+       /* ensure things are received by the parent in the correct order
+        * relative to the protocol pipe
+        */
+       cvs_flusherr();
+  out2:
+    if (stout)
+       (void) close (shout);
+    else
+       /* ensure things are received by the parent in the correct order
+        * relative to the protocol pipe
+        */
+       cvs_flushout();
+  out1:
+    if (stin)
+       (void) close (shin);
+
+  out0:
+    if (rerrno)
+       errno = rerrno;
+    return rc;
+}
+
+
+
+void
+run_print (FILE *fp)
+{
+    int i;
+    void (*outfn) (const char *, size_t);
+
+    if (fp == stderr)
+       outfn = cvs_outerr;
+    else if (fp == stdout)
+       outfn = cvs_output;
+    else
+    {
+       error (1, 0, "internal error: bad argument to run_print");
+       /* Solely to placate gcc -Wall.
+          FIXME: it'd be better to use a function named `fatal' that
+          is known never to return.  Then kludges wouldn't be necessary.  */
+       outfn = NULL;
+    }
+
+    for (i = 0; i < run_argc; i++)
+    {
+       (*outfn) ("'", 1);
+       (*outfn) (run_argv[i], 0);
+       (*outfn) ("'", 1);
+       if (i != run_argc - 1)
+           (*outfn) (" ", 1);
+    }
+}
+
+
+
+/* Return value is NULL for error, or if noexec was set.  If there was an
+   error, return NULL and I'm not sure whether errno was set (the Red Hat
+   Linux 4.1 popen manpage was kind of vague but discouraging; and the noexec
+   case complicates this even aside from popen behavior).  */
+FILE *
+run_popen (const char *cmd, const char *mode)
+{
+    TRACE (TRACE_FUNCTION, "run_popen (%s,%s)", cmd, mode);
+    if (noexec)
+       return NULL;
+
+    return popen (cmd, mode);
+}
+
+
+
+/* Work around an OpenSSH problem: it can put its standard file
+   descriptors into nonblocking mode, which will mess us up if we
+   share file descriptions with it.  The simplest workaround is
+   to create an intervening process between OpenSSH and the
+   actual stderr.  */
+
+static void
+work_around_openssh_glitch (void)
+{
+    pid_t pid;
+    int stderr_pipe[2];
+    struct stat sb;
+
+    /* Do nothing unless stderr is a file that is affected by
+       nonblocking mode.  */
+    if (!(fstat (STDERR_FILENO, &sb) == 0
+          && (S_ISFIFO (sb.st_mode) || S_ISSOCK (sb.st_mode)
+              || S_ISCHR (sb.st_mode) || S_ISBLK (sb.st_mode))))
+       return;
+
+    if (pipe (stderr_pipe) < 0)
+       error (1, errno, "cannot create pipe");
+    pid = fork ();
+    if (pid < 0)
+       error (1, errno, "cannot fork");
+    if (pid != 0)
+    {
+       /* Still in child of original process.  Act like "cat -u".  */
+       char buf[1 << 13];
+       ssize_t inbytes;
+       pid_t w;
+       int status;
+
+       if (close (stderr_pipe[1]) < 0)
+           error (1, errno, "cannot close pipe");
+
+       while ((inbytes = read (stderr_pipe[0], buf, sizeof buf)) != 0)
+       {
+           size_t outbytes = 0;
+
+           if (inbytes < 0)
+           {
+               if (errno == EINTR)
+                   continue;
+               error (1, errno, "reading from pipe");
+           }
+
+           do
+           {
+               ssize_t w = write (STDERR_FILENO,
+                                  buf + outbytes, inbytes - outbytes);
+               if (w < 0)
+               {
+                   if (errno == EINTR)
+                     w = 0;
+                   if (w < 0)
+                     _exit (1);
+               }
+               outbytes += w;
+           }
+           while (inbytes != outbytes);
+       }
+
+       /* Done processing output from grandchild.  Propagate
+          its exit status back to the parent.  */
+       while ((w = waitpid (pid, &status, 0)) == -1 && errno == EINTR)
+           continue;
+       if (w < 0)
+           error (1, errno, "waiting for child");
+       if (!WIFEXITED (status))
+       {
+           if (WIFSIGNALED (status))
+               raise (WTERMSIG (status));
+           error (1, errno, "child did not exit cleanly");
+       }
+       _exit (WEXITSTATUS (status));
+    }
+
+    /* Grandchild of original process.  */
+    if (close (stderr_pipe[0]) < 0)
+       error (1, errno, "cannot close pipe");
+
+    if (stderr_pipe[1] != STDERR_FILENO)
+    {
+       if (dup2 (stderr_pipe[1], STDERR_FILENO) < 0)
+           error (1, errno, "cannot dup2 pipe");
+       if (close (stderr_pipe[1]) < 0)
+           error (1, errno, "cannot close pipe");
+    }
+}
+
+
+
+int
+piped_child (char *const *command, int *tofdp, int *fromfdp, bool fix_stderr)
+{
+    int pid;
+    int to_child_pipe[2];
+    int from_child_pipe[2];
+
+    if (pipe (to_child_pipe) < 0)
+       error (1, errno, "cannot create pipe");
+    if (pipe (from_child_pipe) < 0)
+       error (1, errno, "cannot create pipe");
+
+#ifdef USE_SETMODE_BINARY
+    setmode (to_child_pipe[0], O_BINARY);
+    setmode (to_child_pipe[1], O_BINARY);
+    setmode (from_child_pipe[0], O_BINARY);
+    setmode (from_child_pipe[1], O_BINARY);
+#endif
+
+    pid = fork ();
+    if (pid < 0)
+       error (1, errno, "cannot fork");
+    if (pid == 0)
+    {
+       /* The child.  */
+
+       /* The parent uses these ends of the pipes.  */
+       if (close (to_child_pipe[1]) < 0)
+           error (1, errno, "cannot close pipe");
+       if (close (from_child_pipe[0]) < 0)
+           error (1, errno, "cannot close pipe");
+
+       /* Fool an unwitting child into reading from and writing to
+        * the pipes.
+        */
+       if (dup2 (to_child_pipe[0], STDIN_FILENO) < 0)
+           error (1, errno, "cannot dup2 pipe");
+       if (dup2 (from_child_pipe[1], STDOUT_FILENO) < 0)
+           error (1, errno, "cannot dup2 pipe");
+
+       /* Don't need these fds after the dup2.  */
+       if (close (to_child_pipe[0]) < 0)
+           error (1, errno, "cannot close pipe");
+       if (close (from_child_pipe[1]) < 0)
+           error (1, errno, "cannot close pipe");
+
+        if (fix_stderr)
+           work_around_openssh_glitch ();
+
+       /* Okay to cast out const below - execvp don't return nohow.  */
+       execvp ((char *)command[0], (char **)command);
+       error (1, errno, "cannot exec %s", command[0]);
+    }
+
+    /* The parent.  */
+    if (close (to_child_pipe[0]) < 0)
+       error (1, errno, "cannot close pipe");
+    if (close (from_child_pipe[1]) < 0)
+       error (1, errno, "cannot close pipe");
+
+    *tofdp = to_child_pipe[1];
+    *fromfdp = from_child_pipe[0];
+    return pid;
+}
+
+
+
+int
+run_piped (int *tofdp, int *fromfdp)
+{
+    run_add_arg (NULL);
+    return piped_child (run_argv, tofdp, fromfdp, false);
+}
+
+
+
+void
+close_on_exec (int fd)
+{
+#ifdef F_SETFD
+    if (fcntl (fd, F_SETFD, 1) == -1)
+       error (1, errno, "can't set close-on-exec flag on %d", fd);
+#endif
+}
Index: ccvs/src/run.h
diff -u /dev/null ccvs/src/run.h:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/run.h      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef RUN_H
+#define RUN_H
+
+#include <stdbool.h>
+#include <stdio.h>
+
+/* flags for run_exec(), the fast system() for CVS */
+#define        RUN_NORMAL            0x0        /* no special behaviour */
+#define        RUN_COMBINED          (0x1 << 0) /* stdout is duped to stderr */
+#define        RUN_REALLY            (0x1 << 1) /* do the exec, even if noexec 
is on */
+#define        RUN_STDOUT_APPEND     (0x1 << 2) /* append to stdout, don't 
truncate */
+#define        RUN_STDERR_APPEND     (0x1 << 3) /* append to stderr, don't 
truncate */
+#define        RUN_SIGIGNORE         (0x1 << 4) /* ignore interrupts for 
command */
+#define        RUN_TTY               NULL
+
+void run_add_arg_p (int *, size_t *, char ***, const char *s);
+void run_arg_free_p (int, char **);
+void run_add_arg (const char *s);
+void run_print (FILE * fp);
+void run_setup (const char *prog);
+int run_exec (const char *stin, const char *stout, const char *sterr,
+              int flags);
+int run_piped (int *, int *);
+FILE *run_popen (const char *, const char *);
+int piped_child (char *const *, int *, int *, bool);
+void close_on_exec (int);
+
+
+#endif /* RUN_H */
Index: ccvs/src/sanity.config.sh.in
diff -u /dev/null ccvs/src/sanity.config.sh.in:1.3.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/sanity.config.sh.in        Wed Dec 21 13:25:10 2005
@@ -0,0 +1,2 @@
address@hidden@
address@hidden@
Index: ccvs/src/sanity.sh
diff -u /dev/null ccvs/src/sanity.sh:1.1105.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/sanity.sh  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,35826 @@
+#! /bin/sh
+:
+#      sanity.sh -- a growing testsuite for cvs.
+#
+# The copyright notice said: "Copyright (C) 1992, 1993 Cygnus Support"
+# I'm not adding new copyright notices for new years as our recent 
+# practice has been to include copying terms without copyright notices.
+#
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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.
+#
+# Original Author: K. Richard Pixley
+
+# usage:
+usage ()
+{
+    echo "Usage: `basename $0` --help"
+    echo "Usage: `basename $0` [--eklr] [-c CONFIG-FILE] [-f FROM-TEST] \\"
+    echo "                 [-h HOSTNAME] [-s CVS-FOR-CVS-SERVER] CVS-TO-TEST 
\\"
+    echo "                 [TESTS-TO-RUN...]"
+}
+
+exit_usage ()
+{
+    usage 1>&2
+    exit 2
+}
+
+exit_help ()
+{
+    usage
+    echo
+    echo "-H|--help    display this text"
+    echo "-q            Reduce verbosity."
+    echo "-c CONFIG-FILE"
+    echo "--config=CONFIG_FILE"
+    echo "             use an alternate test suite config file (defaults to"
+    echo "             \`sanity.config.sh' in the same directory as"
+    echo "             CVS-TO-TEST is found in)"
+    echo "-e|--skipfail Treat tests that would otherwise be nonfatally skipped"
+    echo "              for reasons like missing tools as failures, exiting"
+    echo "              with an error message.  Also treat warnings as"
+    echo "             failures."
+    echo "-f FROM-TEST"
+    echo "--from-test=FROM-TEST"
+    echo "             run TESTS-TO-RUN, skipping all tests in the list before"
+    echo "             FROM-TEST"
+    echo "-h HOSTNAME"
+    echo "--hostname HOSTNAME"
+    echo "              Use :ext:HOSTNAME to run remote tests rather than"
+    echo "              :fork:.  Implies --remote and assumes that \$TESTDIR"
+    echo "              resolves to the same directory on both the client and"
+    echo "              the server."
+    echo "-k|--keep    try to keep directories created by individual tests"
+    echo "             around, exiting after the first test which supports"
+    echo "             --keep"
+    echo "-l|--link-root"
+    echo "             test CVS using a symlink to a real CVSROOT"
+    echo "-n|--noredirect"
+    echo "              test a secondary/primary CVS server (writeproxy)"
+    echo "              configuration with the Redirect response disabled"
+    echo "              (implies --proxy)."
+    echo "-p|--proxy   test a secondary/primary CVS server (writeproxy)"
+    echo "              configuration (implies --remote)."
+    echo "-r|--remote  test client/server, as opposed to local, CVS"
+    echo "-s CVS-FOR-CVS-SERVER"
+    echo "--server=CVS-FOR-CVS-SERVER"
+    echo "             use CVS-FOR-CVS-SERVER as the path to the CVS SERVER"
+    echo "             executable to be tested (defaults to CVS-TO-TEST and"
+    echo "             implies --remote)"
+    echo "-B|--no-bases suppress use of Base files."
+    echo
+    echo "CVS-TO-TEST  the path to the CVS executable to be tested; used as"
+    echo "             the path to the CVS client when CVS-FOR-CVS-SERVER is"
+    echo "             specified"
+    echo "TESTS-TO-RUN the names of the tests to run (defaults to all tests)"
+    exit 2
+}
+
+checklongoptarg()
+{
+    if test "x$1" != xoptional && test -z "$OPTARG"; then
+       echo "option \`--$LONGOPT' requires an argument" >&2
+       exit_usage
+    fi
+}
+
+# See TODO list at end of file.
+
+# required to make this script work properly.
+unset CVSREAD
+
+# We want to invoke a predictable set of i18n behaviors, not whatever
+# the user running this script might have set.
+# In particular:
+#   'sort' and tabs and spaces (LC_COLLATE).
+#   Messages from getopt (LC_MESSAGES) (in the future, CVS itself might 
+#     also alter its messages based on LC_MESSAGES).
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+
+# And a few tests want a predictable umask.
+umask 0002
+
+#
+# Initialize the test counts.
+#
+passed=0
+skipped=0
+warnings=0
+
+
+
+#
+# read our options
+#
+unset configfile
+unset fromtest
+unset remotehost
+unset rootoptions
+unset CVSNOBASES
+keep=false
+linkroot=false
+noredirect=false
+proxy=false
+quiet=false
+remote=false
+servercvs=false
+skipfail=false
+while getopts BHc:ef:h:klnpqrs:-: option ; do
+    # convert the long opts to short opts
+    if test x$option = x-;  then
+       # remove any argument
+       if echo "$OPTARG" |grep = >/dev/null; then
+           LONGOPT=`echo "$OPTARG" |sed 's/=.*$//'`
+           OPTARG=`echo "$OPTARG" |sed -e 's/^.*=//'`
+       else
+           LONGOPT=$OPTARG
+           OPTARG=
+       fi
+       # Convert LONGOPT to lower case
+       LONGOPT=`echo "$LONGOPT" |sed 
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+       case "$LONGOPT" in
+           c|co|con|conf|confi|config)
+               option=c
+               checklongoptarg
+               ;;
+           f|fr|fro|from|from-|from-t|from-te|from-tes|from-test)
+               option=f
+               checklongoptarg
+               ;;
+           h)
+               echo "\`--h' is ambiguous.  Could mean \`--help' or 
\`--hostname'" >&2
+               exit_usage
+               ;;
+           he|hel|help)
+               option=H
+               OPTARG=
+               ;;
+           ho|hos|host|hostn|hostna|hostnam|hostname)
+               option=h
+               checklongoptarg
+               ;;
+           k|ke|kee|keep)
+               option=k
+               OPTARG=
+               ;;
+           l|li|lin|link|link-|link-r]|link-ro|link-roo|link-root)
+               option=l
+               OPTARG=
+               ;;
+           n|no|nor|nore|nored|noredi|noredir|noredire|noredirec|noredirect)
+               option=n
+               OPTARG=
+               ;;
+           p|pr|pro|prox|proxy)
+               option=p
+               OPTARG=
+               ;;
+           r|re|rem|remo|remot|remote)
+               option=r
+               OPTARG=
+               ;;
+           s)
+               echo "\`--s' is ambiguous.  Could mean \`--server' or 
\`--skipfail'" >&2
+               exit_usage
+               ;;
+           se|ser|serv|serve|server)
+               option=s
+               checklongoptarg
+               ;;
+           sk|ski|skip|skipf|skipfa|skipfai|skipfail)
+               option=e
+               OPTARG=
+               ;;
+           *)
+               option=\?
+               OPTARG=
+       esac
+    fi
+    case "$option" in
+       B)
+           export CVSNOBASES=:
+           ;;
+       c)
+           configfile="$OPTARG"
+           ;;
+       e)
+           skipfail=:
+           ;;
+       f)
+           fromtest="$OPTARG"
+           ;;
+       h)
+           # Set a remotehost to run the remote tests on via :ext:
+           # Implies `-r' and assumes that $TESTDIR resolves to the same
+           # directory on the client and the server.
+           remotehost="$OPTARG"
+           remote=:
+           ;;
+       H)
+           exit_help
+           ;;
+       k)
+           # The -k (keep) option will eventually cause all the tests to
+           # leave around the contents of the /tmp directory; right now only
+           # some implement it.  Not originally intended to be useful with
+           # more than one test, but this should work if each test uses a
+           # uniquely named dir (use the name of the test).
+           keep=:
+           ;;
+       l)
+           linkroot=:
+           ;;
+        n)
+           proxy=:
+           noredirect=:
+           remote=:
+           ;;
+        p)
+           proxy=:
+           remote=:
+           ;;
+       q)
+           quiet=:
+           ;;
+       r)
+           remote=:
+           ;;
+        s)
+           servercvs="$OPTARG"
+           remote=:
+           ;;
+       \?)
+           exit_usage
+           ;;
+    esac
+done
+
+# boot the arguments we used above
+while test $OPTIND -gt 1 ; do
+    shift
+    OPTIND=`expr $OPTIND - 1`
+done
+
+# Use full path for CVS executable, so that CVS_SERVER gets set properly
+# for remote.
+case $1 in
+"")
+  exit_usage
+  ;;
+/*)
+  testcvs=$1
+  ;;
+*)
+  testcvs=`pwd`/$1
+  ;;
+esac
+shift
+
+# Verify that $testcvs looks like CVS.
+# we can't use test -x since BSD 4.3 doesn't support it.
+if test ! -f $testcvs || test ! -r $testcvs; then
+  echo "No such file or file not readable: $testcvs" >&2
+  exit 1
+fi
+if $testcvs --version </dev/null 2>/dev/null |
+     grep '^Concurrent Versions System' >/dev/null 2>&1; then :; else
+  echo "Not a CVS executable: $testcvs" >&2
+  exit 1
+fi
+
+# If $remotehost is set, warn if $TESTDIR isn't since we are pretty sure
+# that its default value of `/tmp/cvs-sanity' will not resolve to the same
+# directory on two different machines.
+if test -n "$remotehost" && test -z "$TESTDIR"; then
+    echo "WARNING: CVS server hostname is set and \$TESTDIR is not.  If" >&2
+    echo "$remotehost is not the local machine, then it is unlikely that" >&2
+    echo "the default value assigned to \$TESTDIR will resolve to the same" >&2
+    echo "directory on both this client and the CVS server." >&2
+fi
+
+# Read our config file if we can find it.
+#
+# The config file should always be located in the same directory as the CVS
+# executable, unless we are testing an executable outside of the build
+# directory.  In this case, we echo a warning and attempt to assume the most
+# portable configuration.
+if test -z "$configfile"; then
+       configfile=`dirname $testcvs`/sanity.config.sh
+fi
+if test -r "$configfile"; then
+       . "$configfile"
+else
+       echo "WARNING: Failed to locate test suite config file" >&2
+       echo "         \`$configfile'." >&2
+fi
+
+
+
+# Set a default value for $CVS_RSH. The sanity.config.sh file will
+# have the configured value in the RSH_DFLT variable.
+#
+: ${CVS_RSH=${RSH_DFLT:-ssh}}; export CVS_RSH
+
+if test -n "$remotehost"; then
+    # Verify that $CVS_RSH $remotehost works.
+    result=`$CVS_RSH $remotehost 'echo test'`
+    if test $? != 0 || test "x$result" != "xtest"; then
+       echo "\`$CVS_RSH $remotehost' failed." >&2
+       exit 1
+    fi
+fi
+
+case "$servercvs" in
+"")
+  exit_usage
+  ;;
+false)
+  ;;
+/*)
+  ;;
+*)
+  servercvs=`pwd`/$servercvs
+  ;;
+esac
+
+if test false != $servercvs; then
+  # Allow command line to override $CVS_SERVER
+  CVS_SERVER=$servercvs
+else
+  # default $CVS_SERVER to ${testcvs}
+  : ${CVS_SERVER=$testcvs}
+  # With the previous command, effectively defaults $servercvs to $CVS_SERVER,
+  # then $testcvs
+  servercvs=$CVS_SERVER
+fi
+export CVS_SERVER
+servercvs_orig=$servercvs
+
+# Fail in client/server mode if our ${servercvs} does not contain server
+# support.
+if $remote; then
+  if test -n "$remotehost"; then
+    if $CVS_RSH $remotehost "test ! -f ${servercvs} || test ! -r ${servercvs}"
+    then
+      echo "No such file or file not readable: $remotehost:${testcvs}" >&2
+      exit 1
+    fi
+    if $CVS_RSH $remotehost "${servercvs} --version </dev/null 2>/dev/null |
+         grep '^Concurrent Versions System' >/dev/null 2>&1"; then :; else
+      echo "Not a CVS executable: $remotehost:${servercvs}" >&2
+      exit 1
+    fi
+    if $CVS_RSH $remotehost "${servercvs} --version </dev/null |
+         grep '^Concurrent.*(.*server)$' >/dev/null 2>&1"; then :; else
+      echo "CVS executable \`$remotehost:${servercvs}' does not contain server 
support." >&2
+      exit 1
+    fi
+  else
+    if test ! -f ${servercvs} || test ! -r ${servercvs}; then
+      echo "No such file or file not readable: ${testcvs}" >&2
+      exit 1
+    fi
+    if ${servercvs} --version </dev/null 2>/dev/null |
+         grep '^Concurrent Versions System' >/dev/null 2>&1; then :; else
+      echo "Not a CVS executable: ${servercvs}" >&2
+      exit 1
+    fi
+    if ${servercvs} --version </dev/null |
+         grep '^Concurrent.*(.*server)$' >/dev/null 2>&1; then :; else
+      echo "CVS executable \`${servercvs}' does not contain server support." 
>&2
+      exit 1
+    fi
+  fi
+fi
+
+# Fail in client/server mode if our ${testcvs} does not contain client
+# support.
+if $remote; then
+  if ${testcvs} --version </dev/null |
+       grep '^Concurrent.*(client.*)$' >/dev/null 2>&1; then :; else
+    echo "CVS executable \`${testcvs}' does not contain client support." >&2
+    exit 1
+  fi
+fi
+
+# For the "fork" tests.
+if ${testcvs} --version </dev/null |
+     grep '^Concurrent.*(.*server)$' >/dev/null 2>&1
+then
+  testcvs_server_support=:
+else
+  testcvs_server_support=false
+fi
+
+
+
+dokeep() 
+{ 
+    if ${keep}; then
+      echo "Keeping ${TESTDIR} for test case \`${what}' and exiting due to 
--keep"
+      exit 0
+    fi
+}
+
+
+
+###
+### GUTS
+###
+
+# "debugger"
+#set -x
+
+if $quiet; then :; else
+  cat <<EOF
+This test should produce no other output than this message, and a final "OK".
+(Note that the test can take an hour or more to run and periodically stops
+for as long as one minute.  Do not assume there is a problem just because
+nothing seems to happen for a long time.  If you cannot live without
+running status, try the command: \`tail -f check.log' from another window.)
+EOF
+fi
+
+# Regexp to match what the CVS client will call itself in output that it 
prints.
+# FIXME: we don't properly quote this--if the name contains . we'll
+# just spuriously match a few things; if the name contains other regexp
+# special characters we are probably in big trouble.
+CPROG=`basename ${testcvs} |sed 's/\.exe$//'`
+# And the regexp for the CVS server when we have one.  In local mode, this
+# defaults to $CPROG since $servercvs already did.
+# FIXCVS: There are a few places in error messages where CVS suggests a command
+# and outputs $SPROG as the suggested executable.  This could hopefully use
+# MT (tagged text - see doc/cvs-client.texi) to request that the client print
+# its own name.
+SPROG=`basename ${servercvs} |sed 's/\.exe$//'`
+
+
+# Match the hostname
+hostname="[-_.a-zA-Z0-9]*"
+
+# Regexp to match a commitid
+commitid="[a-zA-Z0-9]*"
+
+# Regexp to match the name of a temporary file (from cvs_temp_name).
+# This appears in certain diff output.
+tempfile="cvs[-a-zA-Z0-9.%_]*"
+# $tempname set after $TMPDIR, below.
+
+# Regexp to match a date in RFC822 format (as amended by RFC1123).
+RFCDATE="[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000"
+RFCDATE_EPOCH="1 Jan 1970 00:00:00 -0000"
+
+# Special times used in touch -t commands and the regular expresions
+# to match them. Now that the tests set TZ=UTC0, it
+# should be easier to be more exact in their regexp.
+TOUCH1971="197107040343"
+# This date regexp was 1971/07/0[3-5] [0-9][0-9]:43:[0-9][0-9]
+ISO8601DATE1971="1971-07-04 03:43:[0-9][0-9] [+-]0000"
+
+TOUCH2034="203412251801"
+# This date regexp was 2034/12/2[4-6] [0-9][0-9]:01:[0-9][0-9]
+ISO8601DATE2034="2034-12-25 18:01:[0-9][0-9] [+-]0000"
+
+# Used in admin tests for exporting RCS files.
+# The RAWRCSDATE..... format is for internal ,v files and
+# the ISO8601DATE..... format is to allow for a regular expression in
+# 'cvs log' output patterns. The tests that use this set of specific
+# ${ISO8601DATE.....} variables also force TZ=UTC0 for the test.
+RAWRCSDATE2000A="2000.11.24.15.58.37"
+RAWRCSDATE1996A="96.11.24.15.57.41"
+RAWRCSDATE1996B="96.11.24.15.56.05"
+ISO8601DATE2000A="2000-11-24 15:58:37 [+-]0000"
+ISO8601DATE1996A="1996-11-24 15:57:41 [+-]0000"
+ISO8601DATE1996B="1996-11-24 15:56:05 [+-]0000"
+
+# Regexp to match the date in cvs log command output
+# This format has been enhanced in the future to accept either
+# old-style cvs log output dates or new-style ISO8601 timezone
+# information similar to the ISODATE format. The RCSKEYDATE is
+# similar, but uses '/' instead of '-' to sepearate year/month/day
+# and does not include the optional timezone offset.
+ISO8601DATE="[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9] 
[0-2][0-9]:[0-6][0-9]:[0-6][0-9] [-+][0-1][0-9][0-6][0-9]"
+
+# Regexp to match the dates found in rcs keyword strings
+RCSKEYDATE="[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] 
[0-9][0-9]:[0-9][0-9]:[0-9][0-9]"
+
+# Regexp to match the date in the delta section of rcs format files.
+# Dates in very old RCS files may not have included the century.
+RCSDELTADATE="[0-9][0-9]*\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]"
+
+# Regexp to match a date in standard Unix format as used by rdiff
+# FIXCVS: There's no reason for rdiff to use a different date format
+# than diff does
+DATE="[a-zA-Z]* [a-zA-Z]* [ 1-3][0-9] [0-9:]* [0-9]*"
+# ISO 8601 format "yyyy-mm-dd hh:mm -0000"
+ISODATE="[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] 
[+-][0-9][0-9][0-9][0-9]"
+# %p format is not well defined (nil) and hex digits are common. Using
+# ..* is a bad idea as the tests take a very long time to run due to
+# the complexity of the expressions.  If you run into any other characters
+# that are used in a %p format, add them here.
+PFMT="[0-9a-zA-Z()][0-9a-zA-Z()]*"
+
+# Which directories should Which and find_tool search for executables?
+SEARCHPATH=$PATH:/usr/local/bin:/usr/contrib/bin:/usr/contrib:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin:/sw/bin:/usr/pkg/bin
+
+# Do not assume that `type -p cmd` is portable
+# Usage: Which [-a] [-x|-f|-r] prog [$SEARCHPATH:/with/directories:/to/search]
+Which() {
+  # Optional first argument for file type, defaults to -x.
+  # Second argument is the file or directory to be found.
+  # Third argument is the PATH to search.
+  # By default, print only the first file that matches,
+  # -a will cause all matches to be printed.
+  notevery=:
+  if [ "x$1" = "x-a" ]; then notevery=false; shift; fi
+  case "$1" in
+    -*) t=$1; shift ;;
+    *) t=-x ;;
+  esac
+  case "$1" in
+    # FIXME: Someday this may need to be fixed
+    # to deal better with C:\some\path\to\ssh values...
+    /*) test $t $1 && echo $1 ;;
+    *) for d in `IFS=:; echo ${2-$SEARCHPATH}`
+       do
+         test $t $d/$1 && { echo $d/$1; if $notevery; then break; fi; }
+       done
+       ;;
+  esac
+}
+
+
+# On cygwin32, we may not have /bin/sh.
+if test -r /bin/sh; then
+  TESTSHELL="/bin/sh"
+else
+  TESTSHELL=`Which -f sh`
+  if test ! -r "$TESTSHELL"; then
+    TESTSHELL="/bin/sh"
+  fi
+fi
+
+# FIXME: try things (what things? checkins?) without -m.
+#
+# Some of these tests are written to expect -Q.  But testing with
+# -Q is kind of bogus, it is not the way users actually use CVS (usually).
+# So new tests probably should invoke ${testcvs} directly, rather than ${CVS}.
+# and then they've obviously got to do something with the output....
+#
+CVS="${testcvs} -Q"
+
+LOGFILE=`pwd`/check.log
+
+# Save the previous log in case the person running the tests decides
+# they want to look at it.  The extension ".plog" is chosen for consistency
+# with dejagnu.
+test -f check.plog && mv check.plog check.plog~
+test -f check.log && mv check.log check.plog
+
+# Create the log file so check.log can be tailed almost immediately after
+# this script is started.  Otherwise it can take up to a minute or two before
+# the log file gets created when $remotehost is specified on some systems,
+# which makes for a lot of failed `tail -f' attempts.
+touch check.log
+
+# Workaround any X11Forwarding by ssh. Otherwise this text:
+#   Warning: No xauth data; using fake authentication data for X11 forwarding.
+# has been known to end up in the test results below
+# causing the test to fail.
+[ -n "$DISPLAY" ] && unset DISPLAY
+  
+# The default value of /tmp/cvs-sanity for TESTDIR is dubious,
+# because it loses if two people/scripts try to run the tests
+# at the same time.  Some possible solutions:
+# 1.  Use /tmp/cvs-test$$.  One disadvantage is that the old
+#     cvs-test* directories would pile up, because they wouldn't
+#     necessarily get removed.
+# 2.  Have everyone/everything running the testsuite set
+#     TESTDIR to some appropriate directory.
+# 3.  Have the default value of TESTDIR be some variation of
+#     `pwd`/cvs-sanity.  The biggest problem here is that we have
+#     been fairly careful to test that CVS prints in messages the
+#     actual pathnames that we pass to it, rather than a different
+#     pathname for the same directory, as may come out of `pwd`.
+#     So this would be lost if everything was `pwd`-based.  I suppose
+#     if we wanted to get baroque we could start making symlinks
+#     to ensure the two are different.
+if test -n "$remotehost"; then
+        # We need to set $tmp on the server since $TMPDIR is compared against
+       # messages generated by the server.
+       tmp=`$CVS_RSH $remotehost 'cd /tmp; /bin/pwd || pwd' 2>/dev/null`
+       if test $? != 0; then
+           echo "$CVS_RSH $remotehost failed." >&2
+           exit 1
+       fi
+else
+       tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null`
+fi
+
+# Now:
+#      1) Set TESTDIR if it's not set already
+#      2) Remove any old test remnants
+#      3) Create $TESTDIR
+#      4) Normalize TESTDIR with `cd && (/bin/pwd || pwd)`
+#         (This will match CVS output later)
+: ${TESTDIR=$tmp/cvs-sanity}
+# clean any old remnants (we need the chmod because some tests make
+# directories read-only)
+if test -d $TESTDIR; then
+    chmod -R a+wx $TESTDIR
+    rm -rf $TESTDIR
+fi
+# These exits are important.  The first time I tried this, if the `mkdir && cd`
+# failed then the build directory would get blown away.  Some people probably
+# wouldn't appreciate that.
+mkdir $TESTDIR || exit 1
+cd $TESTDIR || exit 1
+# Ensure $TESTDIR is absolute
+if echo "$TESTDIR" |grep '^[^/]'; then
+    # Don't resolve this unless we have to.  This keeps symlinks intact.  This
+    # is important at least when testing using -h $remotehost, because the same
+    # value for $TESTDIR must resolve to the same directory on the client and
+    # the server and we likely used Samba, and possibly symlinks, to do this.
+    TESTDIR=`(/bin/pwd || pwd) 2>/dev/null`
+fi
+
+if test -z "$TESTDIR" || echo "$TESTDIR" |grep '^[^/]'; then
+    echo "Unable to resolve TESTDIR to an absolute directory." >&2
+    exit 1
+fi
+cd $TESTDIR
+
+
+
+: ${TIMING=false}
+if $remote; then
+    # Now override our CVS_RSH in order to forward variables which affect the
+    # test suite through.  This always needs to be done when $remotehost is
+    # set, needs to be done in $proxy mode for the crerepos tests, and needs to
+    # be done in $remote mode for the writeproxy-ssh tests.
+    if $TIMING; then
+       time="/usr/bin/time -ao'$TESTDIR/time.out'"
+    else
+       time=
+    fi
+    cat >$TESTDIR/ssh-wrapper-env <<EOF
+#! $TESTSHELL
+while [ \$# -gt 0 ]
+do
+  case "\$1" in
+    *=*)
+      eval "\$1"
+      var=\`echo "\$1" | sed 's/^\\(.*\\)=.*\$/\\1/'\`
+      export \$var
+      ;;
+    *) break;;
+  esac
+  shift
+done
+exec \${1+"\$@"}
+EOF
+    chmod a+x $TESTDIR/ssh-wrapper-env
+    cat >$TESTDIR/ssh-wrapper <<EOF
+#! $TESTSHELL
+hostname=\$1
+shift
+exec \
+$CVS_RSH \
+        \$hostname \
+        $TESTDIR/ssh-wrapper-env \
+        "CVS_SERVER='\$CVS_SERVER'" \
+        "CVS_SERVER_SLEEP='\$CVS_SERVER_SLEEP'" \
+        "CVS_PARENT_SERVER_SLEEP='\$CVS_PARENT_SERVER_SLEEP'" \
+        "CVS_SERVER_LOG='\$CVS_SERVER_LOG'" \
+        "CVS_SECONDARY_LOG='\$CVS_SECONDARY_LOG'" \
+        "TMPDIR='\$TMPDIR'" \
+        "CVS_RSH='$TESTDIR/ssh-wrapper'" \
+        "CVSUMASK='\$CVSUMASK'" \
+        "CVS_PID='\$CVS_PID'" \
+        $time \
+        \${1+"\$@"}
+EOF
+    chmod a+x $TESTDIR/ssh-wrapper
+    CVS_RSH=$TESTDIR/ssh-wrapper
+fi # $remotehost
+
+
+
+# Now set $TMPDIR if the user hasn't overridden it.
+#
+# We use a $TMPDIR under $TESTDIR by default so that two tests may be run at
+# the same time without bumping heads without requiring the user to specify
+# more than $TESTDIR.  See the test for leftover cvs-serv* directories near the
+# end of this script at the end of "The big loop".
+: ${TMPDIR=$TESTDIR/tmp}
+export TMPDIR
+if test -d $TMPDIR; then :; else
+    mkdir $TMPDIR
+fi
+
+
+# Regexp to match the the full path to a temporary file (from cvs_temp_name).
+# This appears in certain diff output.
+tempname=$TMPDIR/$tempfile
+
+# Make sure various tools work the way we expect, or try to find
+# versions that do.
+: ${AWK=awk}
+: ${DIFF=diff}
+: ${EXPR=expr}
+: ${ID=id}
+: ${TR=tr}
+
+# Keep track of tools that are found, but do NOT work as we hope
+# in order to avoid them in future
+badtools=
+set_bad_tool ()
+{
+   badtools=$badtools:$1
+}
+is_bad_tool ()
+{
+   case ":$badtools:" in *:$1:*) return 0 ;; *) return 1 ; esac
+}
+
+version_test ()
+{
+  vercmd=$1
+  verbad=:
+  if RES=`$vercmd --version </dev/null 2>&1`; then
+    if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
+      echo "$RES"
+      verbad=false
+    fi
+  fi
+  if $verbad; then
+    echo "The command \`$vercmd' does not support the --version option."
+  fi
+  # It does not really matter that --version is not supported
+  return 0
+}
+
+# Try to find a tool that satisfies all of the tests.
+# Usage: list:of:colon:separated:alternatives test1 test2 test3 test4...
+# Example: find_tool awk:gawk:nawk awk_tooltest1 awk_tooltest2
+find_tool ()
+{
+  dTn=$1
+  default_TOOL=$2
+  echo find_tool: ${1+"$@"} >>$LOGFILE
+  cmds="`IFS=:; echo $2`"; shift; shift; tooltests="address@hidden"
+  if test -z "$tooltests"; then tooltests=version_test; fi
+  clist=; for cmd in $cmds; do clist="$clist `Which -a $cmd`"; done
+  # Make sure the default tool is just the first real command name
+  for default_TOOL in $clist `IFS=:; echo $default_TOOL`; do break; done
+  TOOL=""
+  TEST_MARGINALS=0
+  for trytool in $clist ; do
+    pass=:
+    MARGINALS=0
+    for tooltest in $tooltests; do
+      result=`eval $tooltest $trytool 2>&1`
+      rc=$?
+      echo "Running $tooltest $trytool" >>$LOGFILE
+      if test -n "$result"; then
+       echo "$result" >>$LOGFILE
+      fi
+      if test "$rc" = "0"; then
+        echo "PASS: $tooltest $trytool" >>$LOGFILE
+      elif test "$rc" = "77"; then
+        echo "MARGINAL: $tooltest $trytool; rc=$rc" >>$LOGFILE
+       MARGINALS=`expr $MARGINALS + 1`
+       pass=false
+      else
+        set_bad_tool $trytool
+        echo "FAIL: $tooltest $trytool; rc=$rc" >>$LOGFILE
+       pass=false
+      fi
+    done
+    if $pass; then
+      echo $trytool
+      return 0
+    fi
+    if test $MARGINALS -gt 0 \
+       && (test -z "$TOOL" || test $MARGINALS -lt $TEST_MARGINALS); then
+      if is_bad_tool $trytool; then
+       # Ignore tools with some MARGINAL results and some FAIL
+       :
+      else
+       TOOL=$trytool
+       TEST_MARGINALS=$MARGINALS
+      fi
+    fi
+  done
+  if test -n "$TOOL"; then
+    echo "Notice: The default version of $dTn (\`$default_TOOL')" >>$LOGFILE
+    echo "is defective.  Using \`$TOOL' and hoping for the best." >>$LOGFILE
+    echo "Notice: The default version of $dTn (\`$default_TOOL')" >&2
+    echo "is defective.  Using \`$TOOL' and hoping for the best." >&2
+    echo $TOOL
+  else
+    echo $default_TOOL
+  fi
+}
+
+id_tool_test ()
+{
+  id=$1
+  if $id -u >/dev/null 2>&1 && $id -un >/dev/null 2>&1; then
+    return 0
+  else
+    echo "Running these tests requires an \`id' program that understands the"
+    echo "-u and -n flags.  Make sure that such an id (GNU, or many but not"
+    echo "all vendor-supplied versions) is in your path."
+    return 1
+  fi
+}
+
+ID=`find_tool id id version_test id_tool_test`
+echo "Using ID=$ID" >>$LOGFILE
+
+# You can't run CVS as root; print a nice error message here instead
+# of somewhere later, after making a mess.
+for pass in false :; do
+  case "`$ID -u 2>/dev/null`" in
+    "0")
+      echo "Test suite does not work correctly when run as root" >&2
+      exit 1
+      ;;
+
+    *)
+      break
+      ;;
+  esac
+done
+
+
+
+# Test if diff supports the -u option, falling back on -c, then no arguments.
+#
+# Set $diff_u to `$1 -u' if $1 -u works, `$1 -c' if not and $1 -c
+# works, and `$1' otherwise.
+#
+# $diff_u is intended to be used for tests expecting no differences, since the
+# non-matching output is going to vary depending on what version of diff is
+# found.  Used in tests which expect no differences, output will always mean
+# errors and will make the error log more verbose, and correspondingly more
+# readable by a human, regardless of the source.
+diff_u_test()
+{
+  diff=$1
+  touch sanity.1 sanity.2
+  if output=`$diff -u sanity.1 sanity.2 2>&1` && test -z "$output"; then
+    diff_u="$diff -u"
+    retval=0
+  elif output=`$diff -c sanity.1 sanity.2 2>&1` && test -z "$output"; then
+    diff_u="$diff -c"
+    retval=77
+  elif output=`$diff sanity.1 sanity.2 2>&1` && test -z "$output"; then
+    echo "A diff that supports the -u or -c options and which does not output"
+    echo "text when files are identical can make the output of some of this"
+    echo "script's tests more readable on failure."
+    diff_u=$diff
+    retval=77
+  else
+    echo "This test suite requires either \`diff' or \`cmp' to run."
+    retval=1
+  fi
+  rm sanity.1 sanity.2
+  return $retval
+}
+
+
+
+# Test if diff supports the -u, --recursive, && --exclude options.
+diff_recursive_test()
+{
+  diff=$1
+  mkdir sanitydir.1
+  mkdir sanitydir.2
+  mkdir sanitydir.1/CVS
+  mkdir sanitydir.2/CVS
+  touch sanitydir.1/sanity.1 sanitydir.1/sanity.2 sanitydir.1/CVS/fileX \
+        sanitydir.2/sanity.1 sanitydir.2/sanity.2 sanitydir.2/CVS/fileY
+
+  if $diff -u --recursive --exclude=CVS sanitydir.1 sanitydir.2 \
+          >/dev/null 2>&1; then
+    retval=0
+  else
+    echo "GNU diff can make the output of some tests more readable."
+    retval=77
+  fi
+  rm -r sanitydir.1 sanitydir.2
+  return $retval
+}
+
+DIFF=`find_tool diff $DIFF:gdiff:cmp \
+               version_test diff_u_test diff_recursive_test`
+# Make sure $diff_u is set based on the tool find_tool returned.
+diff_u_test $DIFF
+
+
+
+# Cause NextStep 3.3 users to lose in a more graceful fashion.
+expr_tooltest1 ()
+{
+expr=$1
+if $expr 'abc
+def' : 'abc
+def' >/dev/null; then
+  # good, it works
+  return 0
+else
+  echo 'Running these tests requires an "expr" program that can handle'
+  echo 'multi-line patterns.  Make sure that such an expr (GNU, or many but'
+  echo 'not all vendor-supplied versions) is in your path.'
+  return 1
+fi
+}
+
+# Warn SunOS, SysVr3.2, etc., users that they may be partially losing
+# if we can't find a GNU expr to ease their troubles...
+expr_tooltest2 ()
+{
+expr=$1
+if $expr 'a
+b' : 'a
+c' >/dev/null; then
+  echo 'Warning: you are using a version of expr that does not correctly'
+  echo 'match multi-line patterns.  Some tests may spuriously pass or fail.'
+  echo 'You may wish to make sure GNU expr is in your path.'
+  return 1
+else
+  return 0
+fi
+}
+
+expr_create_bar ()
+{
+echo 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' >${TESTDIR}/foo
+cat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar
+cat ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar ${TESTDIR}/bar >${TESTDIR}/foo
+cat ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo ${TESTDIR}/foo >${TESTDIR}/bar
+rm -f ${TESTDIR}/foo
+}
+
+expr_tooltest3 ()
+{
+expr=$1
+# More SunOS lossage...
+test ! -f ${TESTDIR}/bar && expr_create_bar
+if $expr "`cat ${TESTDIR}/bar`" : "`cat ${TESTDIR}/bar`" >/dev/null; then
+  : good, it works
+else
+  echo 'Warning: you are using a version of expr that does not correctly'
+  echo 'match large patterns.  Some tests may spuriously pass or fail.'
+  echo 'You may wish to make sure GNU expr is in your path.'
+  return 1
+fi
+if $expr "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev/null; then
+  echo 'Warning: you are using a version of expr that does not correctly'
+  echo 'match large patterns.  Some tests may spuriously pass or fail.'
+  echo 'You may wish to make sure GNU expr is in your path.'
+  return 1
+fi
+# good, it works
+return 0
+}
+
+# That we should have to do this is total bogosity, but GNU expr
+# version 1.9.4-1.12 uses the emacs definition of "$" instead of the unix
+# (e.g. SunOS 4.1.3 expr) one.  Rumor has it this will be fixed in the
+# next release of GNU expr after 1.12 (but we still have to cater to the old
+# ones for some time because they are in many linux distributions).
+ENDANCHOR="$"
+expr_set_ENDANCHOR ()
+{
+expr=$1
+ENDANCHOR="$"
+if $expr 'abc
+def' : 'abc$' >/dev/null; then
+  ENDANCHOR='\'\'
+   echo "Notice: An ENDANCHOR of dollar does not work."
+   echo "Using a workaround for GNU expr versions 1.9.4 thru 1.12"
+fi
+return 0
+}
+
+# Work around another GNU expr (version 1.10-1.12) bug/incompatibility.
+# "." doesn't appear to match a newline (it does with SunOS 4.1.3 expr).
+# Note that the workaround is not a complete equivalent of .* because
+# the first parenthesized expression in the regexp must match something
+# in order for expr to return a successful exit status.
+# Rumor has it this will be fixed in the
+# next release of GNU expr after 1.12 (but we still have to cater to the old
+# ones for some time because they are in many linux distributions).
+DOTSTAR='.*'
+expr_set_DOTSTAR ()
+{
+expr=$1
+DOTSTAR='.*'
+if $expr 'abc
+def' : "a${DOTSTAR}f" >/dev/null; then
+  : good, it works
+else
+  DOTSTAR='\(.\|
+\)*'
+  echo "Notice: DOTSTAR changed from sane \`.*' value to \`$DOTSTAR\`"
+  echo "to workaround GNU expr version 1.10 thru 1.12 bug where \`.'"
+  echo "does not match a newline."
+fi
+return 0
+}
+
+# Now that we have DOTSTAR, make sure it works with big matches
+expr_tooltest_DOTSTAR ()
+{
+expr=$1
+test ! -f ${TESTDIR}/bar && expr_create_bar
+if $expr "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; 
then
+  # good, it works
+  return 0
+else
+  echo 'Warning: you are using a version of expr that does not correctly'
+  echo 'match large patterns.  Some tests may spuriously pass or fail.'
+  echo 'You may wish to make sure GNU expr is in your path.'
+  return 77
+fi
+}
+
+EXPR=`find_tool expr ${EXPR}:gexpr \
+  version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \
+expr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR`
+
+# Set the ENDANCHOR and DOTSTAR for the chosen expr version.
+expr_set_ENDANCHOR ${EXPR} >/dev/null
+expr_tooltest_DOTSTAR ${EXPR} >/dev/null
+
+echo "Using EXPR=$EXPR" >>$LOGFILE
+echo "Using ENDANCHOR=$ENDANCHOR" >>$LOGFILE
+echo "Using DOTSTAR=$DOTSTAR" >>$LOGFILE
+
+# Cleanup
+rm -f ${TESTDIR}/bar
+
+# Work around yet another GNU expr (version 1.10) bug/incompatibility.
+# "+" is a special character, yet for unix expr (e.g. SunOS 4.1.3)
+# it is not.  I doubt that POSIX allows us to use \+ and assume it means
+# (non-special) +, so here is another workaround
+# Rumor has it this will be fixed in the
+# next release of GNU expr after 1.12 (but we still have to cater to the old
+# ones for some time because they are in many linux distributions).
+PLUS='+'
+if $EXPR 'a +b' : "a ${PLUS}b" >/dev/null; then
+  : good, it works
+else
+  PLUS='\+'
+fi
+
+# Likewise, for ?
+QUESTION='?'
+if $EXPR 'a?b' : "a${QUESTION}b" >/dev/null; then
+  : good, it works
+else
+  QUESTION='\?'
+fi
+
+# Now test the username to make sure it contains only valid characters
+username=`$ID -un`
+if $EXPR "${username}" : "${username}" >/dev/null; then
+  : good, it works
+else
+  echo "Test suite does not work correctly when run by a username" >&2
+  echo "containing regular expression meta-characters." >&2
+  exit 1
+fi
+
+# Only 8 characters of $username appear in some output.
+if test `echo $username |wc -c` -gt 8; then
+  username8=`echo $username |sed 's/^\(........\).*/\1/'`
+else
+  username8=$username
+fi
+
+# Rarely, we need to match any username, not just the name of the user
+# running this test.  This variable usually shouldn't be used.  $username
+# contains the name of the user actually running this test.
+#
+# I believe this only ever actually gets compared to usernames created by this
+# test.  It used to be compared to the username of the user running this test,
+# but this hasn't been true for a long time.  Regardless, I tried to get the
+# allowed character set right, based on a list in a private email from Mark
+# Baushke, basically the allowed names from Linux systems (plus `.', which is
+# only allowed on Gentoo Linux as of 2005-09-13).
+anyusername="[_a-zA-Z0-9][-_.$a-zA-Z0-9]*"
+
+# now make sure that tr works on NULs
+tr_tooltest1 ()
+{
+tr=$1
+if $EXPR `echo "123" | $tr '2' '\0'` : "123" >/dev/null 2>&1; then
+  echo 'Warning: you are using a version of tr which does not correctly'
+  echo 'handle NUL bytes.  Some tests may spuriously pass or fail.'
+  echo 'You may wish to make sure GNU tr is in your path.'
+  return 77
+fi
+# good, it works
+return 0
+}
+
+TR=`find_tool tr ${TR}:gtr version_test tr_tooltest1`
+echo "Using TR=$TR" >>$LOGFILE
+
+# MacOS X (10.2.8) has a /bin/ls that does not work correctly in that
+# it will return true even if the wildcard argument does not match any
+# files.
+ls_tooltest ()
+{
+ls=$1
+# Force cleanup
+if test -d $TESTDIR/ls-test; then
+    chmod -R a+wx $TESTDIR/ls-test
+    rm -rf $TESTDIR/ls-test
+fi
+if $ls $TESTDIR/ls-test >/dev/null 2>&1; then
+  echo "Notice: \`$ls' is defective."
+  echo 'This is a version of ls which does not correctly'
+  echo 'return false for files that do not exist. Some tests may'
+  echo 'spuriously pass or fail.'
+  echo 'You may wish to put a an ls from GNU coreutils into your path.'
+  return 77
+else
+  return 0
+fi
+}
+LS=`find_tool ls ls:gls version_test ls_tooltest`
+echo "Using LS=$LS" >>$LOGFILE
+
+# Awk testing
+
+awk_tooltest1 ()
+{
+awk=$1
+$awk 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' </dev/null >abc
+if $EXPR "`cat abc`" : \
+'one
+two
+three
+four
+five
+six'; then
+  rm abc
+  return 0
+else
+  rm abc
+  echo "Notice: awk BEGIN clause or printf is not be working properly."
+  return 1
+fi
+}
+
+# Format item %c check
+awk_tooltest2 ()
+{
+awk=$1
+$awk 'BEGIN { printf "%c%c%c", 2, 3, 4 }' </dev/null \
+  | ${TR} '\002\003\004' '123' >abc
+if $EXPR "`cat abc`" : "123" ; then
+  : good, found it
+else
+  echo "Notice: awk format %c string may not be working properly."
+  rm abc
+  return 77
+fi
+rm abc
+return 0
+}
+
+AWK=`find_tool awk gawk:nawk:awk version_test awk_tooltest1 awk_tooltest2`
+echo "Using AWK=$AWK" >>$LOGFILE
+
+
+###
+### Functions used by tests.
+###
+
+# Execute a command on the repository, syncing when done if necessary.
+#
+# Syntax is as `eval'.
+modify_repo ()
+{
+    eval "$*"
+    if $proxy; then
+       # And now resync the secondary.
+       $TESTDIR/sync-secondary "repo modification" modify_repo ALL "$@"
+    fi
+}
+
+# Restore changes to CVSROOT admin files.
+restore_adm ()
+{
+    modify_repo rm -rf $CVSROOT_DIRNAME/CVSROOT
+    modify_repo cp -Rp $TESTDIR/CVSROOT.save $CVSROOT_DIRNAME/CVSROOT
+}
+
+# Test that $RSYNC supports the options we need or try to find a
+# replacement. If $RSYNC works or we replace it, and return 0.
+# Otherwise, set $skipreason and return 77.
+require_rsync ()
+{
+  rsyncworks=false
+  # rsync is NOT a GNU tool, so do NOT use find_tool for name munging.
+  for rsync in ${RSYNC} `Which -a rsync`;
+  do
+
+    if is_bad_tool `Which $rsync` ; then continue ; fi
+    # Make some data to test rsync on.
+    mkdir $TESTDIR/rsync-test
+    mkdir $TESTDIR/rsync-test/Attic && touch $TESTDIR/rsync-test/Attic/6
+    mkdir $TESTDIR/rsync-test/otherdir && touch $TESTDIR/rsync-test/otherdir/7
+    for file in 1 2 3 4 5; do
+      touch $TESTDIR/rsync-test/$file
+    done
+  
+    if test -f "$rsync" && test -r "$rsync" \
+      && $rsync -rglop --delete $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy \
+             >/dev/null 2>&1 \
+      && $rsync -rglop --delete --include Attic --exclude '*/' \
+             $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy2 \
+             >/dev/null 2>&1 \
+      && test -f $TESTDIR/rsync-test/5 \
+      && mv $TESTDIR/rsync-test/5 $TESTDIR/rsync-test/Attic/5 \
+      && test -f $TESTDIR/rsync-test-copy/Attic/6 \
+      && $rsync -rglop --delete $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy \
+             >/dev/null 2>&1 \
+      && $rsync -rglop --delete --include Attic --exclude '*/' \
+             $TESTDIR/rsync-test/ $TESTDIR/rsync-test-copy2 \
+             >/dev/null 2>&1 \
+      && test ! -f $TESTDIR/rsync-test-copy/5 \
+      && test ! -f $TESTDIR/rsync-test-copy2/5 \
+      && test -f $TESTDIR/rsync-test-copy2/Attic/5 \
+      && test ! -f $TESTDIR/rsync-test-copy2/otherdir/7
+    then
+      # good, it works
+      rsyncworks=:
+      RSYNC=$rsync
+    else
+      # Only use Which because of ${RSYNC} in the for loop.
+      set_bad_tool `Which $rsync`
+    fi
+  
+    rm -rf $TESTDIR/rsync-test $TESTDIR/rsync-test-copy \
+       $TESTDIR/rsync-test-copy2
+
+    if $rsyncworks; then
+      return 0
+    else
+      (echo $rsync failed to work properly;\
+       echo "$rsync --version"; $rsync --version) >>$LOGFILE 2>&1
+    fi
+  done
+
+  unset RSYNC
+  skipreason="unusable or no rsync found"
+  return 77
+}
+
+# Test that $1 works as a remote shell.  If so, set $host, $CVS_RSH, &
+# $save_CVS_RSH to match and return 0.  Otherwise, set $skipreason and return
+# 77.
+require_rsh ()
+{
+  host=${remotehost-"`hostname`"}
+  result=`$1 $host 'echo test'`
+  rc=$?
+  if test $? != 0 || test "x$result" != "xtest"; then
+    skipreason="\`$1 $host' failed rc=$rc result=$result"
+    return 77
+  fi
+
+  save_CVS_RSH=$CVS_RSH
+  CVS_RSH=$1; export CVS_RSH
+  return 0
+}
+
+# Find a usable SSH.  When a usable ssh is found, set $host, $CVS_RSH, and
+# $save_CVS_RSH and return 0.  Otherwise, set $skipreason and return 77.
+require_ssh ()
+{
+  case "$CVS_RSH" in
+    *ssh*|*putty*)
+      tryssh=`Which $CVS_RSH`
+      if [ ! -n "$tryssh" ]; then
+       skipreason="Unable to find CVS_RSH=$CVS_RSH executable"
+       return 77
+      elif [ ! -x "$tryssh" ]; then
+       skipreason="Unable to execute $tryssh program"
+       return 77
+      fi
+      ;;
+    *)
+      # Look in the user's PATH for "ssh"
+      tryssh=`Which ssh`
+      if test ! -r "$tryssh"; then
+       skipreason="Unable to find ssh program"
+       return 77
+      fi
+      ;;
+  esac
+
+  require_rsh "$tryssh"
+  return $?
+}
+
+pass ()
+{
+  echo "PASS: $1" >>${LOGFILE}
+  passed=`expr $passed + 1`
+}
+
+# Like skip(), but don't fail when $skipfail is set.
+skip_always ()
+{
+  echo "SKIP: $1${2+ ($2)}" >>$LOGFILE
+  skipped=`expr $skipped + 1`
+}
+
+skip ()
+{
+  if $skipfail; then
+    # exits
+    fail "$1${2+ ($2)}"
+  fi
+
+  skip_always ${1+"$@"}
+}
+
+# Convenience function for skipping tests run only in remote mode.
+remoteonly ()
+{
+  skip_always $1 "only tested in remote mode"
+}
+
+# Convenience function for skipping tests not run in proxy mode.
+notproxy ()
+{
+  skip_always $1 "not tested in proxy mode"
+}
+
+# Convenience function for skipping tests not run in proxy mode.
+notnoredirect ()
+{
+  skip_always $1 "not tested in proxy-noredirect mode"
+}
+
+warn ()
+{
+  if $skipfail; then
+    fail "$1${2+ ($2)}"
+  else
+    echo "WARNING: $1${2+ ($2)}" >>$LOGFILE
+  fi
+  warnings=`expr $warnings + 1`
+}
+
+fail ()
+{
+  echo "FAIL: $1" | tee -a ${LOGFILE}
+  echo "*** Please see the \`TESTS' and \`check.log' files for more 
information." >&2
+  # This way the tester can go and see what remnants were left
+  exit 1
+}
+
+verify_tmp_empty ()
+{
+  # Test our temp directory for cvs-serv* directories and cvsXXXXXX temp
+  # files.  We would like to not leave any behind.
+  if $remote && $LS $TMPDIR/cvs-serv* >/dev/null 2>&1; then
+    # A true value means ls found files/directories with these names.
+    # Give the server some time to finish, then retry.
+    sleep 1
+    if $LS $TMPDIR/cvs-serv* >/dev/null 2>&1; then
+      warn "$1" "Found cvs-serv* directories in $TMPDIR."
+      # The above will exit if $skipfail
+      rm -rf $TMPDIR/cvs-serv*
+    fi
+  fi
+  if $LS $TMPDIR/cvs?????? >/dev/null 2>&1; then
+    # A true value means ls found files/directories with these names.
+    warn "$1" "Found cvsXXXXXX temp files in $TMPDIR."
+    # The above will exit if $skipfail
+    rm -f ls $TMPDIR/cvs??????
+  fi
+}
+
+# See dotest and dotest_fail for explanation (this is the parts
+# of the implementation common to the two).
+dotest_internal ()
+{
+  if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$3${ENDANCHOR}" >/dev/null; then
+    # Why, I hear you ask, do we write this to the logfile
+    # even when the test passes?  The reason is that the test
+    # may give us the regexp which we were supposed to match,
+    # but sometimes it may be useful to look at the exact
+    # text which was output.  For example, suppose one wants
+    # to grep for a particular warning, and make _sure_ that
+    # CVS never hits it (even in cases where the tests might
+    # match it with .*).  Or suppose one wants to see the exact
+    # date format output in a certain case (where the test will
+    # surely use a somewhat non-specific pattern).
+    cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+    pass "$1"
+    verify_tmp_empty "$1"
+  # expr can't distinguish between "zero characters matched" and "no match",
+  # so special-case it.
+  elif test -z "$3" && test ! -s ${TESTDIR}/dotest.tmp; then
+    pass "$1"
+    verify_tmp_empty "$1"
+  elif test x"$4" != x; then
+    if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$4${ENDANCHOR}" >/dev/null; then
+      cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+      pass "$1"
+      verify_tmp_empty "$1"
+    else
+      echo "** expected: " >>${LOGFILE}
+      echo "$3" >>${LOGFILE}
+      echo "$3" > ${TESTDIR}/dotest.ex1
+      echo "** or: " >>${LOGFILE}
+      echo "$4" >>${LOGFILE}
+      echo "$4" > ${TESTDIR}/dotest.ex2
+      echo "** got: " >>${LOGFILE}
+      cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+      fail "$1"
+    fi
+  else
+    echo "** expected: " >>${LOGFILE}
+    echo "$3" >>${LOGFILE}
+    echo "$3" > ${TESTDIR}/dotest.exp
+    echo "** got: " >>${LOGFILE}
+    cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+    fail "$1"
+  fi
+}
+
+dotest_all_in_one ()
+{
+  if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
+         "`cat ${TESTDIR}/dotest.exp`" >/dev/null; then
+    return 0
+  fi
+  return 1
+}
+
+# WARNING: this won't work with REs that match newlines....
+#
+dotest_line_by_line ()
+{
+  line=1
+  while [ $line -le `wc -l <${TESTDIR}/dotest.tmp` ] ; do
+    if $EXPR "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" : \
+       "`sed -n ${line}p ${TESTDIR}/dotest.exp`" >/dev/null; then
+      :
+    elif test -z "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" &&
+       test -z "`sed -n ${line}p ${TESTDIR}/dotest.exp`"; then
+      :
+    else
+      echo "Line $line:" >> ${LOGFILE}
+      echo "**** expected: " >>${LOGFILE}
+      sed -n ${line}p ${TESTDIR}/dotest.exp >>${LOGFILE}
+      echo "**** got: " >>${LOGFILE}
+      sed -n ${line}p ${TESTDIR}/dotest.tmp >>${LOGFILE}
+      unset line
+      return 1
+    fi
+    line=`expr $line + 1`
+  done
+  unset line
+  return 0
+}
+
+# If you are having trouble telling which line of a multi-line
+# expression is not being matched, replace calls to dotest_internal()
+# with calls to this function:
+#
+dotest_internal_debug ()
+{
+  if test -z "$3"; then
+    if test -s ${TESTDIR}/dotest.tmp; then
+      echo "** expected: " >>${LOGFILE}
+      echo "$3" >>${LOGFILE}
+      echo "$3" > ${TESTDIR}/dotest.exp
+      rm -f ${TESTDIR}/dotest.ex2
+      echo "** got: " >>${LOGFILE}
+      cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+      fail "$1"
+    else
+      pass "$1"
+      verify_tmp_empty "$1"
+    fi
+  else
+    echo "$3" > ${TESTDIR}/dotest.exp
+    if dotest_line_by_line "$1" "$2"; then
+      pass "$1"
+      verify_tmp_empty "$1"
+    else
+      if test x"$4" != x; then
+       mv ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.ex1
+       echo "$4" > ${TESTDIR}/dotest.exp
+       if dotest_line_by_line "$1" "$2"; then
+         pass "$1"
+         verify_tmp_empty "$1"
+       else
+         mv ${TESTDIR}/dotest.exp ${TESTDIR}/dotest.ex2
+         echo "** expected: " >>${LOGFILE}
+         echo "$3" >>${LOGFILE}
+         echo "** or: " >>${LOGFILE}
+         echo "$4" >>${LOGFILE}
+         echo "** got: " >>${LOGFILE}
+         cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+         fail "$1"
+       fi
+      else
+       echo "** expected: " >>${LOGFILE}
+       echo "$3" >>${LOGFILE}
+       echo "** got: " >>${LOGFILE}
+       cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+       fail "$1"
+      fi
+    fi
+  fi
+}
+
+# This function allows the test output to be filtered before being verified.
+# The dotest_* functions all call this function, which runs the command
+# in the env var $TEST_FILTER on its argument if $TEST_FILTER is set.  If
+# $TEST_FILTER is not set, this function does nothing.
+#
+# I found this primarily useful when running the test suite on a CVS
+# executable linked with memory and function profilers which can generate
+# spurious output.
+run_filter ()
+{
+  if test -n "$TEST_FILTER"; then
+    # Make sure there is an EOL
+    echo >>$1
+    sed '${/^$/d}' <$1 >$1.filter1
+    # Run the filter
+    eval "$TEST_FILTER" <$1.filter1 >$1.filter2
+    $diff_u $1 $1.filter2 \
+           >$1.diff
+    mv $1.filter2 $1
+    rm $1.filter1
+  fi
+}
+
+# Usage:
+#  dotest TESTNAME COMMAND OUTPUT [OUTPUT2]
+# TESTNAME is the name used in the log to identify the test.
+# COMMAND is the command to run; for the test to pass, it exits with
+# exitstatus zero.
+# OUTPUT is a regexp which is compared against the output (stdout and
+# stderr combined) from the test.  It is anchored to the start and end
+# of the output, so should start or end with ".*" if that is what is desired.
+# Trailing newlines are stripped from the command's actual output before
+# matching against OUTPUT.
+# If OUTPUT2 is specified and the output matches it, then it is also
+# a pass (partial workaround for the fact that some versions of expr
+# lack \|).
+dotest ()
+{
+  rm -f $TESTDIR/dotest.ex? 2>&1
+  eval "$2" >$TESTDIR/dotest.tmp 2>&1
+  status=$?
+  run_filter $TESTDIR/dotest.tmp
+  if test "$status" != 0; then
+    cat $TESTDIR/dotest.tmp >>$LOGFILE
+    echo "exit status was $status" >>${LOGFILE}
+    fail "$1"
+  fi
+  dotest_internal "$@"
+}
+
+# Like dotest except only 2 args and result must exactly match stdin
+dotest_lit ()
+{
+  rm -f $TESTDIR/dotest.ex? 2>&1
+  eval "$2" >$TESTDIR/dotest.tmp 2>&1
+  status=$?
+  run_filter $TESTDIR/dotest.tmp
+  if test "$status" != 0; then
+    cat $TESTDIR/dotest.tmp >>$LOGFILE
+    echo "exit status was $status" >>$LOGFILE
+    fail "$1"
+  fi
+  cat >$TESTDIR/dotest.exp
+  if cmp $TESTDIR/dotest.exp $TESTDIR/dotest.tmp >/dev/null 2>&1; then
+    pass "$1"
+    verify_tmp_empty "$1"
+  else
+    echo "** expected: " >>$LOGFILE
+    cat $TESTDIR/dotest.exp >>$LOGFILE
+    echo "** got: " >>$LOGFILE
+    cat $TESTDIR/dotest.tmp >>$LOGFILE
+    fail "$1"
+  fi
+}
+
+# Like dotest except exitstatus should be nonzero.
+dotest_fail ()
+{
+  rm -f $TESTDIR/dotest.ex? 2>&1
+  eval "$2" >$TESTDIR/dotest.tmp 2>&1
+  status=$?
+  run_filter $TESTDIR/dotest.tmp
+  if test "$status" = 0; then
+    cat $TESTDIR/dotest.tmp >>$LOGFILE
+    echo "exit status was $status" >>$LOGFILE
+    fail "$1"
+  fi
+  dotest_internal "$@"
+}
+
+# Like dotest except output is sorted.
+dotest_sort ()
+{
+  rm -f $TESTDIR/dotest.ex? 2>&1
+  eval "$2" >$TESTDIR/dotest.tmp1 2>&1
+  status=$?
+  run_filter $TESTDIR/dotest.tmp1
+  if test "$status" != 0; then
+    cat $TESTDIR/dotest.tmp1 >>$LOGFILE
+    echo "exit status was $status" >>$LOGFILE
+    fail "$1"
+  fi
+  $TR '        ' ' ' < $TESTDIR/dotest.tmp1 | sort > $TESTDIR/dotest.tmp
+  dotest_internal "$@"
+}
+
+# Like dotest_fail except output is sorted.
+dotest_fail_sort ()
+{
+  rm -f $TESTDIR/dotest.ex? 2>&1
+  eval "$2" >$TESTDIR/dotest.tmp1 2>&1
+  status=$?
+  run_filter $TESTDIR/dotest.tmp1
+  if test "$status" = 0; then
+    cat $TESTDIR/dotest.tmp1 >>$LOGFILE
+    echo "exit status was $status" >>$LOGFILE
+    fail "$1"
+  fi
+  $TR '        ' ' ' < $TESTDIR/dotest.tmp1 | sort > $TESTDIR/dotest.tmp
+  dotest_internal "$@"
+}
+
+# A function for fetching the timestamp of a revison of a file
+getrlogdate () {
+    ${testcvs} -n rlog -N ${1+"$@"} |
+    while read token value; do
+       case "$token" in
+       date:)
+           echo $value | sed "s,;.*,,"
+           break;
+            ;;
+       esac
+    done
+}
+
+# Avoid picking up any stray .cvsrc, etc., from the user running the tests
+mkdir home
+HOME=$TESTDIR/home; export HOME
+
+# If $GPG is set, create a key for /uu
+OPENPGP_PHRASE=
+if test x"$GPG" != xgpg; then
+  $GPG --list-keys >>$LOGFILE 2>&1
+  $GPG --import - <<EOF >>$LOGFILE 2>&1
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+mQGiBENKukgRBADJERMkgpE7Uo+ZahIZ8rsgnhyiRtn96SQFumeBuclUcRIbT/XK
+2Qt1vvzd/QtunFP+U/V2sZHpt4e4dkXUNMssmTO8bZZgJJnhHkVTzEtMVY+qIfvC
+lgZw99aGAHthTjpn2NFRRFlU8dOlCeoEYMsQ9kG7lC2DWfr8QF6Wv537VwCg5a+q
+2Tp0OdnPzdx9ZczHeRPLyosD/2IWoMuz76O3M2WqWV07S0OwGFBWS9NulwSZafgz
+6AzWcgJN4DvXruSCHUg/89zE8gMkM+jCBABi9jUT5O/zCMccRfOyzprwP+Darfp/
+83s3OerU+nvZkG6fTkoUJt4oZkhJ+034aac6SiCE8vD4KvNZ+ZQyq9AQjXHGTfq/
+SUhzA/9MsX9FwkruhbMti9nOuSBV9tqsEM+8vWjSJ+hlSviWCkFWV0De8yHiTq6m
+7Bfymk4/mR336C0gSWVucA6qSfH5bYC+0jfqpc9poc/slxZA6T4gd9JZ41WvBqPj
+BOs4lsvBnTKk9f7Jyg5BzrXT9ukVPfeyTVi3I49+1TV/BMk2ubRuQ1ZTIFRlc3Qg
+U2NyaXB0IChUaGlzIHNlY3JldCBrZXkgaXMgcHVibGljIGFuZCB1c2VkIGZvciB0
+ZXN0aW5nIHNpZ25lZCBjb21taXRzIHdpdGggQ1ZTLikgPGJ1Zy1jdnNAbm9uZ251
+Lm9yZz6IYAQTEQIAIAUCQ0q6SAIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ
+EI4MLH7xM73pnmQAn36k+iNEi+fdfFxoWNdB8DPIzOY8AKCWVfBZa/jAH64FaQYL
+ls1jFXLbELkCDQRDSrpbEAgAm3FjA6iU71Dm/iJy+RoI5T7MIZeiz6vpIg1IA0Ch
+h2lSaEbPxNAImRQyz+KNyMPofIA/DsS5rAHmMfTXFQf5JWrnotaVokHY3ucnPU7y
+vZGiYR+DJNbSThCRW+sgxYSUQLXPsIGQ4/MnI2rJO+y8RIRvGQYi63OpkTzsGAAO
+vfi42ui6SAfEvKQ73KvzF/lf5a9NokmM+nDkFzOJCfSFitY4KD/UmL62fq5TadGT
+mPscQF+DZ+V1txxN+xcnXJAG3OiOkDsKRap8sY4kG8WSG0vPCVdm+O4xzTQY/JQe
+aCs4le1J5nR4OKcmEnojlOZqPA4oZ52mXGFxBLHevvzokwADBQf/TJVH/iFqjbKx
+28Sw7aB4iYmE5P7+mCQcDmJERR1DJI8/awU/5kLSIETGKsXuAA/V9NPPAyd/AKve
+ulwLqjFEFNyFU3Vm1CAL6EcSw+Km2MseaUqA8MJCEyCd3NKc66Evarf+0G7iFV7h
+xJDnzUfhhaZBULPDBVgJ6AqNjC7tQm0EsBuGKxDIlxBQ+skO/nrI9vX6dwbEtBDs
+ClnpLOGebqZZArGsv0xEpfjMq/qPnwy53jEQYk5hxvLUHy4wZlIHD0SE9Q+kAElp
+9NE6IxKOqRR6vLs3m9833BMeGsIIbY8oBPAOd6BVbdGxLsGMX/FVGRhvExZX8k6C
+iqU/6EnlkYhJBBgRAgAJBQJDSrpbAhsMAAoJEI4MLH7xM73p/wMAnRvt70NgB6st
+B0RRhW3h2s/P7BCMAKDKqifj54oz/mJotQABGP13nW/gOA==
+=7ufq
+-----END PGP PUBLIC KEY BLOCK-----
+EOF
+  $GPG --allow-secret-key-import --import - <<EOF >>$LOGFILE 2>&1
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+lQG7BENKukgRBADJERMkgpE7Uo+ZahIZ8rsgnhyiRtn96SQFumeBuclUcRIbT/XK
+2Qt1vvzd/QtunFP+U/V2sZHpt4e4dkXUNMssmTO8bZZgJJnhHkVTzEtMVY+qIfvC
+lgZw99aGAHthTjpn2NFRRFlU8dOlCeoEYMsQ9kG7lC2DWfr8QF6Wv537VwCg5a+q
+2Tp0OdnPzdx9ZczHeRPLyosD/2IWoMuz76O3M2WqWV07S0OwGFBWS9NulwSZafgz
+6AzWcgJN4DvXruSCHUg/89zE8gMkM+jCBABi9jUT5O/zCMccRfOyzprwP+Darfp/
+83s3OerU+nvZkG6fTkoUJt4oZkhJ+034aac6SiCE8vD4KvNZ+ZQyq9AQjXHGTfq/
+SUhzA/9MsX9FwkruhbMti9nOuSBV9tqsEM+8vWjSJ+hlSviWCkFWV0De8yHiTq6m
+7Bfymk4/mR336C0gSWVucA6qSfH5bYC+0jfqpc9poc/slxZA6T4gd9JZ41WvBqPj
+BOs4lsvBnTKk9f7Jyg5BzrXT9ukVPfeyTVi3I49+1TV/BMk2uQAAn2yLGViOPcBN
+n3q8J05O/mgSJII1CMq0bkNWUyBUZXN0IFNjcmlwdCAoVGhpcyBzZWNyZXQga2V5
+IGlzIHB1YmxpYyBhbmQgdXNlZCBmb3IgdGVzdGluZyBzaWduZWQgY29tbWl0cyB3
+aXRoIENWUy4pIDxidWctY3ZzQG5vbmdudS5vcmc+iGAEExECACAFAkNKukgCGwMG
+CwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCODCx+8TO96Z5kAJ9+pPojRIvn3Xxc
+aFjXQfAzyMzmPACgllXwWWv4wB+uBWkGC5bNYxVy2xCdAj0EQ0q6WxAIAJtxYwOo
+lO9Q5v4icvkaCOU+zCGXos+r6SINSANAoYdpUmhGz8TQCJkUMs/ijcjD6HyAPw7E
+uawB5jH01xUH+SVq56LWlaJB2N7nJz1O8r2RomEfgyTW0k4QkVvrIMWElEC1z7CB
+kOPzJyNqyTvsvESEbxkGIutzqZE87BgADr34uNroukgHxLykO9yr8xf5X+WvTaJJ
+jPpw5BcziQn0hYrWOCg/1Ji+tn6uU2nRk5j7HEBfg2fldbccTfsXJ1yQBtzojpA7
+CkWqfLGOJBvFkhtLzwlXZvjuMc00GPyUHmgrOJXtSeZ0eDinJhJ6I5TmajwOKGed
+plxhcQSx3r786JMAAwUH/0yVR/4hao2ysdvEsO2geImJhOT+/pgkHA5iREUdQySP
+P2sFP+ZC0iBExirF7gAP1fTTzwMnfwCr3rpcC6oxRBTchVN1ZtQgC+hHEsPiptjL
+HmlKgPDCQhMgndzSnOuhL2q3/tBu4hVe4cSQ581H4YWmQVCzwwVYCegKjYwu7UJt
+BLAbhisQyJcQUPrJDv56yPb1+ncGxLQQ7ApZ6Szhnm6mWQKxrL9MRKX4zKv6j58M
+ud4xEGJOYcby1B8uMGZSBw9EhPUPpABJafTROiMSjqkUery7N5vfN9wTHhrCCG2P
+KATwDnegVW3RsS7BjF/xVRkYbxMWV/JOgoqlP+hJ5ZEAAVICdnxl8jck88Pp3iBR
+9KOIKN6r1zfz4/9rlkHXH5yiNCTYxwPx2qLMH2LbGJ+ISQQYEQIACQUCQ0q6WwIb
+DAAKCRCODCx+8TO96f8DAJ9CnJg/ewM3MoWqO1AY+KSSMJkCGgCeI8vv810E1G+C
+B2xyFA1/6G+hv7k=
+=k49u
+-----END PGP PRIVATE KEY BLOCK-----
+EOF
+
+  # Some tests check the content of the RCS file and whether there is a
+  # signature phrase or not depends on whether they were being generated.
+  # The trailing EOL is important.
+  OPENPGP_PHRASE='openpgp-signatures   @[a-zA-Z0-9/+]*=*@;
+'
+  gpg=:
+else # GPG not set
+  echo "No working GPG was found.  This test suite will run, but OpenPGP" >&2
+  echo "commit signatures will not be tested." >&2
+  gpg=false
+fi # GPG set
+
+
+# Make sure this variable is not defined to anything that would
+# change the format of rcs dates.  Otherwise people using e.g.,
+# RCSINIT=-zLT get lots of spurious failures.
+RCSINIT=; export RCSINIT
+
+# Remaining arguments are the names of tests to run.
+#
+# The testsuite is broken up into (hopefully manageably-sized)
+# independently runnable tests, so that one can quickly get a result
+# from a cvs or testsuite change, and to facilitate understanding the
+# tests.
+
+if test x"$*" = x; then
+       # Basic/miscellaneous functionality
+       tests="version basica basicb basicc basic1 deep basic2 ls"
+       tests="$tests parseroot parseroot2 parseroot3 files spacefiles"
+       tests="${tests} commit-readonly commit-add-missing"
+       tests="${tests} status"
+       # Branching, tagging, removing, adding, multiple directories
+       tests="${tests} rdiff rdiff-short"
+       tests="${tests} rdiff2 diff diffnl death death2"
+       tests="${tests} rm-update-message rmadd rmadd2 rmadd3 resurrection"
+       tests="${tests} dirs dirs2 branches branches2 branches3"
+       tests="${tests} branches4 tagc tagf tag-space"
+       tests="${tests} rcslib multibranch import importb importc importX"
+       tests="$tests importX2 import-CVS import-quirks"
+       tests="${tests} update-p import-after-initial branch-after-import"
+       tests="${tests} join join2 join3 join4 join5 join6 join7"
+       tests="${tests} join-readonly-conflict join-admin join-admin-2"
+       tests="${tests} join-rm"
+       tests="${tests} new newb conflicts conflicts2 conflicts3"
+       tests="${tests} clean"
+       tests="${tests} keywordexpand"
+       # Checking out various places (modules, checkout -d, &c)
+       tests="${tests} modules modules2 modules3 modules4 modules5 modules6"
+       tests="${tests} modules7 mkmodules co-d"
+       tests="${tests} cvsadm emptydir abspath abspath2 toplevel toplevel2"
+        tests="${tests} rstar-toplevel trailingslashes checkout_repository"
+       # Log messages, error messages.
+       tests="${tests} mflag editor env errmsg1 errmsg2 adderrmsg opterrmsg"
+       tests="$tests errmsg3 errmsg4"
+       tests="${tests} close-stdout"
+       tests="$tests debug-log-nonfatal"
+       # Watches, binary files, history browsing, &c.
+       tests="${tests} devcom devcom2 devcom3 watch4 watch5 watch6-0 watch6"
+        tests="${tests} edit-check"
+       tests="${tests} unedit-without-baserev"
+       tests="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3"
+       tests="${tests} binwrap binwrap2"
+       tests="${tests} binwrap3 mwrap info taginfo posttag"
+       tests="$tests config config2 config3 config4 compression"
+       tests="${tests} serverpatch log log2 logopt ann ann-id"
+       # Repository Storage (RCS file format, CVS lock files, creating
+       # a repository without "cvs init", &c).
+       tests="${tests} crerepos rcs rcs2 rcs3 rcs4 rcs5"
+       tests="$tests lockfiles backuprecover"
+       tests="${tests} sshstdio"
+       # More history browsing, &c.
+       tests="${tests} history"
+       tests="${tests} big modes modes2 modes3 stamps"
+       # PreservePermissions stuff: permissions, symlinks et al.
+       # tests="${tests} perms symlinks symlinks2 hardlinks"
+       # More tag and branch tests, keywords.
+       tests="${tests} sticky keyword keywordlog keywordname keyword2"
+       tests="${tests} head tagdate multibranch2 tag8k"
+       # "cvs admin", reserved checkouts.
+       tests="${tests} admin reserved"
+       # Nuts and bolts of diffing/merging (diff library, &c)
+       tests="${tests} diffmerge1 diffmerge2"
+       # Release of multiple directories
+       tests="${tests} release"
+       tests="${tests} recase"
+       # Multiple root directories and low-level protocol tests.
+       tests="${tests} multiroot multiroot2 multiroot3 multiroot4"
+       tests="${tests} rmroot reposmv pserver server server2 client"
+       tests="${tests} dottedroot fork commit-d template"
+       tests="${tests} writeproxy writeproxy-noredirect writeproxy-ssh"
+       tests="${tests} writeproxy-ssh-noredirect"
+else
+       tests="$*"
+fi
+
+# Now check the -f argument for validity.
+if test -n "$fromtest"; then
+       # Don't allow spaces - they are our delimiters in tests
+       count=0
+       for sub in $fromtest; do
+         count=`expr $count + 1`
+       done
+       if test $count != 1; then
+               echo "No such test \`$fromtest'." >&2
+               exit 2
+       fi
+       # make sure it is in $tests
+       case " $tests " in
+               *" $fromtest "*)
+                       ;;
+               *)
+                       echo "No such test \`$fromtest'." >&2
+                       exit 2
+                       ;;
+       esac
+fi
+
+
+
+if diff_recursive_test $DIFF >/dev/null 2>&1; then
+  directory_cmp ()
+  {
+    $DIFF -u --recursive --exclude=CVS $1 $2
+  }
+else
+  # a simple function to compare directory contents
+  #
+  # Returns: 0 for same, 1 for different
+  #
+  directory_cmp ()
+  {
+    OLDPWD=`pwd`
+    DIR_1=$1
+    DIR_2=$2
+
+    cd $DIR_1
+    find . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d1
+
+    # go back where we were to avoid symlink hell...
+    cd $OLDPWD
+    cd $DIR_2
+    find . -print | fgrep -v /CVS | sort > $TESTDIR/dc$$d2
+
+    if $diff_u $TESTDIR/dc$$d1 $TESTDIR/dc$$d2
+    then
+      :
+    else
+      echo "directory_cmp: file lists of \`$DIR_1' & \`$DIR_2' differ" >&2
+      return 1
+    fi
+    cd $OLDPWD
+    while read a
+    do
+      if test -f $DIR_1/"$a" ; then
+       cmp $DIR_1/"$a" $DIR_2/"$a"
+       if test $? -ne 0 ; then
+         return 1
+       fi
+      fi
+    done < $TESTDIR/dc$$d1
+    rm -f $TESTDIR/dc$$*
+    return 0
+  }
+fi
+
+
+
+#
+# The following 4 functions are used by the diffmerge1 test case.  They set up,
+# respectively, the four versions of the files necessary:
+#
+#      1.  Ancestor revisions.
+#      2.  "Your" changes.
+#      3.  "My" changes.
+#      4.  Expected merge result.
+#
+
+# Create ancestor revisions for diffmerge1
+diffmerge_create_older_files() {
+         # This test case was supplied by Noah Friedman:
+         cat >testcase01 <<EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+  /* Instantiates a Button with origin (0, 0) and zero width and height.
+   * You must call an initializer method to properly initialize the Button.
+   */
+  public Button ()
+  {
+    super ();
+
+    _titleColor = Color.black;
+    _disabledTitleColor = Color.gray;
+    _titleFont = Font.defaultFont ();
+  }
+
+  /* Convenience constructor for instantiating a Button with
+   * bounds x, y, width, and height.  Equivalent to
+   *     foo = new Button ();
+   *     foo.init (x, y, width, height);
+   */
+  public Button (int x, int y, int width, int height)
+  {
+    this ();
+    init (x, y, width, height);
+  }
+}
+EOF
+
+         # This test case was supplied by Jacob Burckhardt:
+         cat >testcase02 <<EOF
+a
+a
+a
+a
+a
+EOF
+
+         # This test case was supplied by Karl Tomlinson who also wrote the
+         # patch which lets CVS correctly handle this and several other cases:
+         cat >testcase03 <<EOF
+x
+s
+a
+b
+s
+y
+EOF
+
+         # This test case was supplied by Karl Tomlinson:
+         cat >testcase04 <<EOF
+s
+x
+m
+m
+x
+s
+v
+s
+x
+m
+m
+x
+s
+EOF
+
+         # This test case was supplied by Karl Tomlinson:
+         cat >testcase05 <<EOF
+s
+x
+m
+m
+x
+x
+x
+x
+x
+x
+x
+x
+x
+x
+s
+s
+s
+s
+s
+s
+s
+s
+s
+s
+v
+EOF
+
+         # This test case was supplied by Jacob Burckhardt:
+         cat >testcase06 <<EOF
+g
+
+
+
+
+
+
+
+
+
+
+
+i
+EOF
+
+         # This test is supposed to verify that the horizon lines are the same
+         # for both 2-way diffs, but unfortunately, it does not fail with the
+         # old version of cvs.  However, Karl Tomlinson still thought it would
+         # be good to test it anyway:
+         cat >testcase07 <<EOF
+h
+f
+
+
+
+
+
+
+
+
+
+g
+r
+
+
+
+i
+
+
+
+
+
+
+
+
+
+
+i
+EOF
+
+         # This test case was supplied by Jacob Burckhardt:
+         cat >testcase08 <<EOF
+Both changes move this line to the end of the file.
+
+no
+changes
+here
+
+First change will delete this line.
+
+First change will also delete this line.
+
+    no
+    changes
+    here
+
+Second change will change it here.
+
+        no
+        changes
+        here
+EOF
+
+         # This test case was supplied by Jacob Burckhardt.  Note that I do not
+         # think cvs has ever failed with this case, but I include it anyway,
+         # since I think it is a hard case.  It is hard because Peter Miller's
+         # fmerge utility fails on it:
+         cat >testcase09 <<EOF
+m
+a
+{
+}
+b
+{
+}
+EOF
+
+         # This test case was supplied by Martin Dorey and simplified by Jacob
+         # Burckhardt:
+         cat >testcase10 <<EOF
+
+    petRpY ( MtatRk );
+    fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+    MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+    OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, 
nRVVep );
+
+    Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+    fV ( Y < 16 )
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                      Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+    elke
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                 ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+
+}
+
+
+/****************************************************************************
+*                                                                           *
+*   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+*                                                                           *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+    MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+
+    petRpY ( MtatRk );
+
+}
+    HfkQipfte ( waYdle,                 /*  waYdle                         */
+                waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                0,                      /*  MRrepVlRoRk KfxoYfkL           */
+                beYgtz                  /*  nEtek to Apfte                 */
+              );
+
+    petRpY ( Zy );
+}
+EOF
+}
+
+# Create "your" revisions for diffmerge1
+diffmerge_create_your_files() {
+         # remove the Button() method
+         cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+  /* Instantiates a Button with origin (0, 0) and zero width and height.
+   * You must call an initializer method to properly initialize the Button.
+   */
+  public Button ()
+  {
+    super ();
+
+    _titleColor = Color.black;
+    _disabledTitleColor = Color.gray;
+    _titleFont = Font.defaultFont ();
+  }
+}
+EOF
+
+         cat >testcase02 <<\EOF
+y
+a
+a
+a
+a
+EOF
+
+         cat >testcase03 <<\EOF
+x
+s
+a
+b
+s
+b
+s
+y
+EOF
+
+         cat >testcase04 <<\EOF
+s
+m
+s
+v
+s
+m
+s
+EOF
+
+         cat >testcase05 <<\EOF
+v
+s
+m
+s
+s
+s
+s
+s
+s
+s
+s
+s
+s
+v
+EOF
+
+         # Test case 6 and test case 7 both use the same input files, but they
+         # order the input files differently.  In one case, a certain file is
+         # used as the older file, but in the other test case, that same file
+         # is used as the file which has changes.  I could have put echo
+         # commands here, but since the echo lines would be the same as those
+         # in the previous function, I decided to save space and avoid 
repeating
+         # several lines of code.  Instead, I merely swap the files:
+         mv testcase07 tmp
+         mv testcase06 testcase07
+         mv tmp testcase06
+
+         # Make the date newer so that cvs thinks that the files are changed:
+         touch testcase06 testcase07
+
+         cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change has now added this in.
+
+    no
+    changes
+    here
+
+Second change will change it here.
+
+        no
+        changes
+        here
+
+Both changes move this line to the end of the file.
+EOF
+
+         cat >testcase09 <<\EOF
+
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+         cat >testcase10 <<\EOF
+
+    fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+
+    petRpY ( MtatRk );
+    fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+    fV ( jfle_Uecopd_KRLIep < 16 )
+    {
+        MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep 
);
+    }
+    elke
+    {
+        MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, 
qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+        fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+        MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+        OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, 
nRVVep );
+
+    Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+    fV ( Y < 16 )
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                      Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+    elke
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                 ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+
+    petRpY ( MtatRk );
+
+}
+
+
+/****************************************************************************
+*                                                                           *
+*   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+*                                                                           *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+    MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+
+    petRpY ( MtatRk );
+
+}
+    HfkQipfte ( waYdle,                 /*  waYdle                         */
+                waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                0,                      /*  MRrepVlRoRk KfxoYfkL           */
+                beYgtz                  /*  nEtek to Apfte                 */
+              );
+
+    petRpY ( Zy );
+}
+
+EOF
+}
+
+# Create "my" revisions for diffmerge1
+diffmerge_create_my_files() {
+          # My working copy still has the Button() method, but I
+         # comment out some code at the top of the class.
+         cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+  /* Instantiates a Button with origin (0, 0) and zero width and height.
+   * You must call an initializer method to properly initialize the Button.
+   */
+  public Button ()
+  {
+    super ();
+
+    // _titleColor = Color.black;
+    // _disabledTitleColor = Color.gray;
+    // _titleFont = Font.defaultFont ();
+  }
+
+  /* Convenience constructor for instantiating a Button with
+   * bounds x, y, width, and height.  Equivalent to
+   *     foo = new Button ();
+   *     foo.init (x, y, width, height);
+   */
+  public Button (int x, int y, int width, int height)
+  {
+    this ();
+    init (x, y, width, height);
+  }
+}
+EOF
+
+         cat >testcase02 <<\EOF
+a
+a
+a
+a
+m
+EOF
+
+         cat >testcase03 <<\EOF
+x
+s
+c
+s
+b
+s
+y
+EOF
+
+         cat >testcase04 <<\EOF
+v
+s
+x
+m
+m
+x
+s
+v
+s
+x
+m
+m
+x
+s
+v
+EOF
+
+         # Note that in test case 5, there are no changes in the "mine"
+         # section, which explains why there is no command here which writes to
+         # file testcase05.
+
+         # no changes for testcase06
+
+         # The two branches make the same changes:
+         cp ../yours/testcase07 .
+
+         cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change will delete this line.
+
+First change will also delete this line.
+
+    no
+    changes
+    here
+
+Second change has now changed it here.
+
+        no
+        changes
+        here
+
+Both changes move this line to the end of the file.
+EOF
+
+         cat >testcase09 <<\EOF
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+         cat >testcase10 <<\EOF
+
+    petRpY ( MtatRk );
+    fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+    MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+    OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, 
nRVVep );
+
+    Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+    fV ( Y < 16 )
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                      Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+    elke
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                 ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+
+}
+
+
+/****************************************************************************
+*                                                                           *
+*   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+*                                                                           *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+    MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+
+    petRpY ( MtatRk );
+
+}
+    HfkQipfte ( waYdle,                 /*  waYdle                         */
+                waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                beYgtz                  /*  nEtek to Apfte                 */
+              );
+
+    petRpY ( Zy );
+}
+
+EOF
+}
+
+# Create expected results of merge for diffmerge1
+diffmerge_create_expected_files() {
+         cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+  /* Instantiates a Button with origin (0, 0) and zero width and height.
+   * You must call an initializer method to properly initialize the Button.
+   */
+  public Button ()
+  {
+    super ();
+
+    // _titleColor = Color.black;
+    // _disabledTitleColor = Color.gray;
+    // _titleFont = Font.defaultFont ();
+  }
+}
+EOF
+
+         cat >testcase02 <<\EOF
+y
+a
+a
+a
+m
+EOF
+
+         cat >testcase03 <<\EOF
+x
+s
+c
+s
+b
+s
+b
+s
+y
+EOF
+
+         cat >testcase04 <<\EOF
+v
+s
+m
+s
+v
+s
+m
+s
+v
+EOF
+
+         # Since there are no changes in the "mine" section, just take exactly
+         # the version in the "yours" section:
+         cp ../yours/testcase05 .
+
+         cp ../yours/testcase06 .
+
+         # Since the two branches make the same changes, the result should be
+         # the same as both branches.  Here, I happen to pick yours to copy 
from,
+         # but I could have also picked mine, since the source of the copy is
+         # the same in either case.  However, the mine has already been
+         # altered by the update command, so don't use it.  Instead, use the
+         # yours section which has not had an update on it and so is unchanged:
+         cp ../yours/testcase07 .
+
+         cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change has now added this in.
+
+    no
+    changes
+    here
+
+Second change has now changed it here.
+
+        no
+        changes
+        here
+
+Both changes move this line to the end of the file.
+EOF
+
+         cat >testcase09 <<\EOF
+
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+         cat >testcase10 <<\EOF
+
+    fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+
+    petRpY ( MtatRk );
+    fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+    fV ( jfle_Uecopd_KRLIep < 16 )
+    {
+        MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep 
);
+    }
+    elke
+    {
+        MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, 
qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+        fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+        MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * 
jfle_Uecopd_MfJe_fY_nEtek );
+        OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, 
nRVVep );
+
+    Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+    fV ( Y < 16 )
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                      Y * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+    elke
+    {
+        petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * 
noot_Uecopd.MectopkFepBlRktep +
+                                                 ( Y - 16 ) * 
jfle_Uecopd_MfJe_fY_Mectopk,
+                                jfle_Uecopd_MfJe_fY_Mectopk,
+                                nRVVep ) );
+    }
+
+    petRpY ( MtatRk );
+
+}
+
+
+/****************************************************************************
+*                                                                           *
+*   Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY )                      *
+*                                                                           *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+    MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, 
KRL_Mectopk, nRVVep );
+
+    petRpY ( MtatRk );
+
+}
+    HfkQipfte ( waYdle,                 /*  waYdle                         */
+                waYdleFok,              /*  ZVVket VpoL ktapt oV dfkQ      */
+                (coYkt RfYt8*) nRVVep,  /*  nRVVep                         */
+                beYgtz                  /*  nEtek to Apfte                 */
+              );
+
+    petRpY ( Zy );
+}
+
+EOF
+}
+
+
+
+# Echo a new CVSROOT based on $1, $remote, and $remotehost
+newroot() {
+  if $remote; then
+    if test -n "$remotehost"; then
+      echo :ext$rootoptions:$remotehost$1
+    else
+      echo :fork$rootoptions:$1
+    fi
+  else
+    echo $1
+  fi
+}
+
+
+
+# Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
+#
+# Currently we test :fork: and :ext: (see crerepos test).  There is a
+# known difference between the two in modes-15 (see comments there).
+#
+# :ext: can be tested against a remote machine if:
+#
+#    1. $remotehost is set using the `-h' option to this script.
+#    2. ${CVS_RSH=rsh} $remotehost works.
+#    3. The path to $TESTDIR is the same on both machines (symlinks are okay)
+#    4. The path to $testcvs is the same on both machines (symlinks are okay)
+#       or $CVS_SERVER is overridden in this script's environment to point to
+#       a working CVS exectuable on the remote machine.
+#
+# Testing :pserver: would be hard (inetd issues).  (How about using tcpserver
+# and some high port number?  DRP)
+
+if $linkroot; then
+    mkdir ${TESTDIR}/realcvsroot
+    ln -s realcvsroot ${TESTDIR}/cvsroot
+fi
+CVSROOT_DIRNAME=${TESTDIR}/cvsroot
+CVSROOT=`newroot $CVSROOT_DIRNAME`; export CVSROOT
+
+
+
+###
+### Initialize the repository
+###
+dotest init-1 "$testcvs init"
+
+# Now hide the primary root behind a secondary if requested.
+if $proxy; then
+    # Save the primary root.
+    PRIMARY_CVSROOT=$CVSROOT
+    PRIMARY_CVSROOT_DIRNAME=$CVSROOT_DIRNAME
+    # Where the secondary root will be
+    SECONDARY_CVSROOT_DIRNAME=$TESTDIR/secondary_cvsroot
+    if $noredirect; then
+       rootoptions=";Redirect=no"
+       SECONDARY_CVSROOT=`newroot $PRIMARY_CVSROOT_DIRNAME`
+    else
+       SECONDARY_CVSROOT=`newroot $SECONDARY_CVSROOT_DIRNAME`
+    fi
+    # Now set the global CVSROOT to use the secondary.
+    CVSROOT=$SECONDARY_CVSROOT; export CVSROOT
+
+    require_rsync
+    if test $? -eq 77; then
+       echo "Unable to test in proxy mode: $skipreason" >&2
+       skip all "missing or broken rsync command."
+       exit 0
+    fi
+
+    if $noredirect; then
+       # Wrap the CVS server to allow --primary-root to be set by the
+       # secondary.
+       cat <<EOF >$TESTDIR/secondary-wrapper
+#! $TESTSHELL
+CVS_SERVER=$TESTDIR/primary-wrapper
+export CVS_SERVER
+
+# No need to check the PID of the last client since we are testing with
+# Redirect disabled.
+proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME 
--allow-root=$PRIMARY_CVSROOT_DIRNAME"
+exec $CVS_SERVER \$proot_arg "\$@"
+EOF
+       cat <<EOF >$TESTDIR/primary-wrapper
+#! $TESTSHELL
+if test -n "$CVS_SERVER_LOG"; then
+  CVS_SERVER_LOG=`dirname "$CVS_SERVER_LOG"`/cvsprimarylog
+  export CVS_SERVER_LOG
+fi
+exec $CVS_SERVER "\$@"
+EOF
+
+       CVS_SERVER_secondary=$TESTDIR/secondary-wrapper
+       CVS_SERVER=$CVS_SERVER_secondary
+
+       chmod a+x $TESTDIR/secondary-wrapper \
+                 $TESTDIR/primary-wrapper
+    fi
+
+    # Script to sync the secondary root.
+    cat >$TESTDIR/sync-secondary <<EOF
+#! $TESTSHELL
+# date >>$TESTDIR/update-log
+
+ps=\$1
+cmd=\$2
+dir=\$3
+shift
+shift
+shift
+
+# echo "updating from \$ps for command \\\`\$cmd' in dir \\\`\$dir'" 
\${1+"\$@"} \\
+#      >>$TESTDIR/update-log
+
+# If multiple CVS executables could attempt to access the repository, we would
+# Need to lock for this sync and sleep
+case "\$dir" in
+  ALL)
+    # This is a hack to allow a few of the tests to play with the
+    # UseNewInfoFmtStrings key in CVSROOT/config.  It's inefficient, but there
+    # aren't many tests than need it and the alternative is an awful lot of
+    # special casing.
+    $RSYNC -rglop --delete --exclude '#cvs.*' \\
+           $PRIMARY_CVSROOT_DIRNAME/ \\
+           $SECONDARY_CVSROOT_DIRNAME
+    ;;
+
+  *)
+    # For the majority of the tests we will only sync the directories that
+    # were written to.
+    case "\$cmd" in
+      add|import)
+       # For \`add', we need a recursive update due to quirks in rsync syntax,
+       # but it shouldn't affect efficiency since any new dir should be empty.
+       #
+       # For \`import', a recursive update is necessary since subdirs may have
+       # been added underneath the root dir we were passed. 
+        $RSYNC -rglop \\
+              $PRIMARY_CVSROOT_DIRNAME/"\$dir" \\
+              $SECONDARY_CVSROOT_DIRNAME/\`dirname -- "\$dir"\`
+        ;;
+
+      tag)
+       # \`tag' may have changed CVSROOT/val-tags too.
+        $RSYNC -glop \\
+               $PRIMARY_CVSROOT_DIRNAME/CVSROOT/val-tags \\
+               $SECONDARY_CVSROOT_DIRNAME/CVSROOT
+       # Otherwise it is identical to other write commands.
+        $RSYNC -rglop --delete \\
+               --include Attic --include CVS \
+               --exclude '#cvs.*' --exclude '*/' \\
+               $PRIMARY_CVSROOT_DIRNAME/"\$dir"/ \\
+               $SECONDARY_CVSROOT_DIRNAME/"\$dir"
+        ;;
+
+      *)
+       # By default, sync just what changed.
+        $RSYNC -rglop --delete \\
+               --include Attic --include CVS \
+               --exclude '#cvs.*' --exclude '*/' \\
+               $PRIMARY_CVSROOT_DIRNAME/"\$dir"/ \\
+               $SECONDARY_CVSROOT_DIRNAME/"\$dir"
+        ;;
+    esac # \$cmd
+
+    # And keep the history file up to date for all commands.
+    $RSYNC -glop \\
+           $PRIMARY_CVSROOT_DIRNAME/CVSROOT/history \\
+           $SECONDARY_CVSROOT_DIRNAME/CVSROOT
+    ;; # \$dir = *
+esac # \$dir
+
+# Avoid timestamp comparison issues with rsync.
+sleep 1
+EOF
+    chmod a+x $TESTDIR/sync-secondary
+
+    # And now init the secondary.
+    $TESTDIR/sync-secondary "- no, before - create secondary root" \
+                            sanity-setup ALL
+
+    # Initialize the primary repository
+    mkdir proxy-init; cd proxy-init
+    dotest proxy-init-1 "$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
+    cd CVSROOT
+    cat >>config <<EOF
+PrimaryServer=$PRIMARY_CVSROOT
+EOF
+    cat >>loginfo <<EOF
+ALL $TESTDIR/sync-secondary loginfo %c %p %{sVv}
+EOF
+    cat >>postadmin <<EOF
+ALL $TESTDIR/sync-secondary postadmin %c %p
+EOF
+    cat >>posttag <<EOF
+ALL $TESTDIR/sync-secondary posttag %c %p %o %b %t %{sVv}
+EOF
+    cat >>postwatch <<EOF
+ALL $TESTDIR/sync-secondary postwatch %c %p
+EOF
+    dotest proxy-init-2 \
+"$testcvs -Q ci -mconfigure-writeproxy"
+
+    # Save these files for later reference
+    cp config $TESTDIR/config-clean
+    cp loginfo $TESTDIR/loginfo-clean
+    cp postadmin $TESTDIR/postadmin-clean
+    cp posttag $TESTDIR/posttag-clean
+    cp postwatch $TESTDIR/postwatch-clean
+
+    # done in here
+    cd ../..
+    rm -rf proxy-init
+else # !$proxy
+    # Set this even when not testing $proxy to match messages, like $SPROG.
+    SECONDARY_CVSROOT_DIRNAME=$CVSROOT_DIRNAME
+fi # $proxy
+
+# Save a copy of the initial repository so that it may be restored after the
+# tests that alter it.
+cp -Rp $CVSROOT_DIRNAME/CVSROOT $TESTDIR/CVSROOT.save
+
+
+###
+### The tests
+###
+dotest init-2 "$testcvs init"
+
+
+
+###
+### The big loop
+###
+for what in $tests; do
+       if test -n "$fromtest" ; then
+           if test $fromtest = $what ; then
+               unset fromtest
+           else
+               continue
+           fi
+       fi
+       case $what in
+
+       version)
+         # We've had cases where the version command started dumping core,
+         # so we might as well test it
+         dotest version-1 "${testcvs} --version" \
+'
+Concurrent Versions System (CVS) [0-9.]*.*
+
+Copyright (C) [0-9]* Free Software Foundation, Inc.
+
+Senior active maintainers include Larry Jones, Derek R. Price,
+and Mark D. Baushke.  Please see the AUTHORS and README files from the CVS
+distribution kit for a complete list of contributors and copyrights.
+
+CVS may be copied only under the terms of the GNU General Public License,
+a copy of which can be found with the CVS distribution kit.
+
+Specify the --help option for further information about CVS'
+
+# Maybe someday...
+#        if $proxy; then
+#              dotest version-2r "${testcvs} version" \
+#'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*)
+#Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)
+#Secondary Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)'
+         if $remote; then
+               dotest version-2r "${testcvs} version" \
+'Client: Concurrent Versions System (CVS) [0-9p.]* (client.*)
+Server: Concurrent Versions System (CVS) [0-9p.]* (.*server)'
+         else
+               dotest version-2 "${testcvs} version" \
+'Concurrent Versions System (CVS) [0-9.]*.*'
+         fi
+         ;;
+
+
+
+       basica)
+         # Similar in spirit to some of the basic1, and basic2
+         # tests, but hopefully a lot faster.  Also tests operating on
+         # files two directories down *without* operating on the parent dirs.
+
+         # Tests basica-0a and basica-0b provide the equivalent of the:
+         #    mkdir ${CVSROOT_DIRNAME}/first-dir
+         # used by many of the tests.  It is "more official" in the sense
+         # that is does everything through CVS; the reason most of the
+         # tests don't use it is mostly historical.
+         mkdir 1; cd 1
+         dotest basica-0a "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest basica-0b "$testcvs add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd ..
+         rm -r 1
+
+         dotest basica-1 "$testcvs -q co first-dir" ''
+         cd first-dir
+
+         # Test a few operations, to ensure they gracefully do
+         # nothing in an empty directory.
+         dotest basica-1a0 "$testcvs -q update"
+         dotest basica-1a1 "$testcvs -q diff -c"
+         dotest basica-1a2 "$testcvs -q status"
+         dotest basica-1a3 "$testcvs -q update ."
+         dotest basica-1a4 "$testcvs -q update ./"
+
+         mkdir sdir
+         # Remote CVS gives the "cannot open CVS/Entries" error, which is
+         # clearly a bug, but not a simple one to fix.
+         dotest basica-1a10 "$testcvs -n add sdir" \
+"Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository" \
+"$SPROG add: cannot open CVS/Entries for reading: No such file or directory
+Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository"
+         dotest_fail basica-1a11 \
+           "test -d $CVSROOT_DIRNAME/first-dir/sdir"
+         dotest basica-2 "$testcvs add sdir" \
+"Directory $CVSROOT_DIRNAME/first-dir/sdir added to the repository"
+         cd sdir
+         mkdir ssdir
+         dotest basica-3 "$testcvs add ssdir" \
+"Directory $CVSROOT_DIRNAME/first-dir/sdir/ssdir added to the repository"
+         cd ssdir
+         echo ssfile >ssfile
+
+         # Trying to commit it without a "cvs add" should be an error.
+         # The "use `cvs add' to create an entry" message is the one
+         # that I consider to be more correct, but local cvs prints the
+         # "nothing known" message and noone has gotten around to fixing it.
+         dotest_fail basica-notadded "${testcvs} -q ci ssfile" \
+"${CPROG} commit: use .${CPROG} add. to create an entry for \`ssfile'
+${CPROG}"' \[commit aborted\]: correct above errors first!' \
+"${CPROG}"' commit: nothing known about `ssfile'\''
+'"${CPROG}"' \[commit aborted\]: correct above errors first!'
+
+         dotest basica-4 "${testcvs} add ssfile" \
+"${SPROG}"' add: scheduling file `ssfile'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest_fail basica-4a "${testcvs} tag tag0 ssfile" \
+"${SPROG} tag: nothing known about ssfile
+${SPROG} "'\[tag aborted\]: correct the above errors first!'
+         cd ../..
+
+         dotest basica-5 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  sdir/ssdir/ssfile
+initial revision: 1\.1"
+         dotest_fail basica-5a \
+           "${testcvs} -q tag BASE sdir/ssdir/ssfile" \
+"${SPROG} tag: Attempt to add reserved tag name BASE
+${SPROG} \[tag aborted\]: failed to set tag BASE to revision 1\.1 in 
${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v"
+         dotest basica-5b "${testcvs} -q tag NOT_RESERVED" \
+'T sdir/ssdir/ssfile'
+
+         dotest basica-6 "${testcvs} -q update" ''
+         echo "ssfile line 2" >>sdir/ssdir/ssfile
+         dotest_fail basica-6.2 "${testcvs} -q diff -c" \
+"Index: sdir/ssdir/ssfile
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+retrieving revision 1\.1
+diff -c -r1\.1 ssfile
+\*\*\* sdir/ssdir/ssfile       ${RFCDATE}      1\.1
+--- sdir/ssdir/ssfile  ${RFCDATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+  ssfile
+${PLUS} ssfile line 2"
+         dotest_fail basica-6.3 "${testcvs} -q diff -c -rBASE" \
+"Index: sdir/ssdir/ssfile
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+retrieving revision 1\.1
+diff -c -r1\.1 ssfile
+\*\*\* sdir/ssdir/ssfile       ${RFCDATE}      1\.1
+--- sdir/ssdir/ssfile  ${RFCDATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+  ssfile
+${PLUS} ssfile line 2"
+         dotest_fail basica-6.4 "${testcvs} -q diff -c -rBASE -C3isacrowd" \
+"Index: sdir/ssdir/ssfile
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+retrieving revision 1\.1
+diff -c -C 3isacrowd -r1\.1 ssfile
+${SPROG} diff: invalid context length argument"
+         dotest basica-7 "${testcvs} -q ci -m modify-it" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  sdir/ssdir/ssfile
+new revision: 1\.2; previous revision: 1\.1"
+         dotest_fail basica-nonexist "${testcvs} -q ci nonexist" \
+"${CPROG}"' commit: nothing known about `nonexist'\''
+'"${CPROG}"' \[commit aborted\]: correct above errors first!'
+         dotest basica-8 "${testcvs} -q update ." ''
+
+         # Test the -f option to ci
+         cd sdir/ssdir
+         dotest basica-8a0 "${testcvs} -q ci -m not-modified ssfile" ''
+         dotest basica-8a "${testcvs} -q ci -f -m force-it" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 1\.3; previous revision: 1\.2"
+         dotest basica-8a1 "${testcvs} -q ci -m bump-it -r 2.0" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.0; previous revision: 1\.3"
+         dotest basica-8a1a "${testcvs} -q ci -m bump-it -r 2.9" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.9; previous revision: 2\.0"
+         # Test string-based revion number increment rollover
+         dotest basica-8a1b "${testcvs} -q ci -m bump-it -f -r 2" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.10; previous revision: 2\.9"
+         dotest basica-8a1c "${testcvs} -q ci -m bump-it -r 2.99" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.99; previous revision: 2\.10"
+         # Test string-based revion number increment rollover
+         dotest basica-8a1d "${testcvs} -q ci -m bump-it -f -r 2" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.100; previous revision: 2\.99"
+         dotest basica-8a1e "${testcvs} -q ci -m bump-it -r 2.1099" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.1099; previous revision: 2\.100"
+         # Test string-based revion number increment rollover
+         dotest basica-8a1f "${testcvs} -q ci -m bump-it -f -r 2" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 2\.1100; previous revision: 2\.1099"
+         # -f should not be necessary, but it should be harmless.
+         # Also test the "-r 3" (rather than "-r 3.0") usage.
+         dotest basica-8a2 "${testcvs} -q ci -m bump-it -f -r 3" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 3\.1; previous revision: 2\.1100"
+
+         # Test using -r to create a branch
+         dotest_fail basica-8a3 "${testcvs} -q ci -m bogus -r 3.0.0" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+$SPROG commit: $CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v: can't find 
branch point 3\.0
+$SPROG commit: could not check in ssfile"
+         dotest basica-8a4 "${testcvs} -q ci -m valid -r 3.1.2" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 3\.1\.2\.1; previous revision: 3\.1"
+         # now get rid of the sticky tag and go back to the trunk
+         dotest basica-8a5 "${testcvs} -q up -A ./" "U ssfile"
+
+         cd ../..
+         dotest basica-8b "${testcvs} -q diff -r1.2 -r1.3"
+
+         dotest basica-8b1 "${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd"
+
+         # The .* here will normally be "No such file or directory",
+         # but if memory serves some systems (AIX?) have a different message.
+:        dotest_fail basica-9 \
+           "${testcvs} -q -d ${TESTDIR}/nonexist update" \
+"${SPROG}: cannot access cvs root ${TESTDIR}/nonexist: .*"
+         dotest_fail basica-9a \
+           "${testcvs} -q -d ${TESTDIR}/nonexist update" \
+"${CPROG} \[update aborted\]: ${TESTDIR}/nonexist/CVSROOT: .*"
+
+         dotest basica-10 "${testcvs} annotate" \
+'
+Annotations for sdir/ssdir/ssfile
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile
+1\.2          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile line 2'
+
+         # Test resurrecting with strange revision numbers
+         cd sdir/ssdir
+         dotest basica-r1 "${testcvs} rm -f ssfile" \
+"${SPROG} remove: scheduling .ssfile. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest basica-r2 "${testcvs} -q ci -m remove" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: delete; previous revision: 3\.1"
+         dotest basica-r3 "${testcvs} -q up -p -r 3.1 ./ssfile >ssfile" ""
+         dotest basica-r4 "${testcvs} add ssfile" \
+"${SPROG} add: Re-adding file .ssfile. after dead revision 3\.2\.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest basica-r5 "${testcvs} -q ci -m resurrect" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  ssfile
+new revision: 3\.3; previous revision: 3\.2"
+         cd ../..
+
+         # As long as we have a file with a few revisions, test
+         # a few "cvs admin -o" invocations.
+         cd sdir/ssdir
+         dotest_fail basica-o1 "${testcvs} admin -o 1.2::1.2" \
+"${CPROG} admin: while processing more than one file:
+${CPROG} \[admin aborted\]: attempt to specify a numeric revision"
+         dotest basica-o2 "${testcvs} admin -o 1.2::1.2 ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+done"
+         dotest basica-o2a "${testcvs} admin -o 1.1::NOT_RESERVED ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+done"
+         dotest_fail basica-o2b "${testcvs} admin -o 1.1::NOT_EXIST ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision 
NOT_EXIST doesn't exist.
+${SPROG} admin: RCS file for .ssfile. not modified\."
+         dotest basica-o3 "${testcvs} admin -o 1.2::1.3 ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+done"
+         dotest basica-o4 "${testcvs} admin -o 3.1:: ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+deleting revision 3\.3
+deleting revision 3\.2
+done"
+         dotest basica-o5 "${testcvs} admin -o ::1.1 ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+done"
+         dotest basica-o5a "${testcvs} -n admin -o 1.2::3.1 ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+deleting revision 2\.1100
+deleting revision 2\.1099
+deleting revision 2\.100
+deleting revision 2\.99
+deleting revision 2\.10
+deleting revision 2\.9
+deleting revision 2\.0
+deleting revision 1\.3
+done"
+         dotest basica-o6 "${testcvs} admin -o 1.2::3.1 ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+deleting revision 2\.1100
+deleting revision 2\.1099
+deleting revision 2\.100
+deleting revision 2\.99
+deleting revision 2\.10
+deleting revision 2\.9
+deleting revision 2\.0
+deleting revision 1\.3
+done"
+         dotest basica-o6a "${testcvs} admin -o 3.1.2: ssfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+deleting revision 3\.1\.2\.1
+done"
+         dotest basica-o7 "${testcvs} log -N ssfile" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+Working file: ssfile
+head: 3\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 3\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+bump-it
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-it
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add-it
+============================================================================="
+         dotest basica-o8 "${testcvs} -q update -p -r 1.1 ./ssfile" "ssfile"
+         cd ../..
+
+         cd ..
+
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf first-dir
+         ;;
+
+
+
+       basicb)
+         # More basic tests, including non-branch tags and co -d.
+         mkdir 1; cd 1
+         dotest basicb-0a "${testcvs} -q co -l ." ''
+         touch topfile
+         dotest basicb-0b "${testcvs} add topfile" \
+"${SPROG} add: scheduling file .topfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest basicb-0c "${testcvs} -q ci -m add-it topfile" \
+"$CVSROOT_DIRNAME/topfile,v  <--  topfile
+initial revision: 1\.1"
+         cd ..
+         rm -r 1
+         mkdir 2; cd 2
+         dotest basicb-0d "${testcvs} -q co -l ." "U topfile"
+         # Now test the ability to run checkout on an existing working
+         # directory without having it lose its mind.  I don't know
+         # whether this is tested elsewhere in sanity.sh.  A more elaborate
+         # test might also have modified files, make sure it works if
+         # the modules file was modified to add new directories to the
+         # module, and such.
+         dotest basicb-0d0 "${testcvs} -q co -l ." ""
+         mkdir first-dir
+         dotest basicb-0e "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd ..
+         rm -rf 2
+
+         dotest basicb-1 "${testcvs} -q co first-dir" ''
+
+         # The top-level CVS directory is not created by default.
+         # I'm leaving basicb-1a and basicb-1b untouched, mostly, in
+         # case we decide that the default should be reversed...
+
+         dotest_fail basicb-1a "test -d CVS" ''
+
+         dotest basicb-1c "cat first-dir/CVS/Repository" "first-dir"
+
+         cd first-dir
+         # Note that the name Emptydir is chosen to test that CVS just
+         # treats it like any other directory name.  It should be
+         # special only when it is directly in $CVSROOT/CVSROOT.
+         mkdir Emptydir sdir2
+         dotest basicb-2 "${testcvs} add Emptydir sdir2" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository"
+         cd Emptydir
+         echo sfile1 starts >sfile1
+         dotest basicb-2a10 "${testcvs} -n add sfile1" \
+"${SPROG} add: scheduling file .sfile1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest basicb-2a11 "${testcvs} status sfile1" \
+"${SPROG} status: use \`${SPROG} add' to create an entry for \`sfile1'
+===================================================================
+File: sfile1                   Status: Unknown
+
+   Working revision:   No entry for sfile1
+   Repository revision:        No revision control file"
+         dotest basicb-3 "${testcvs} add sfile1" \
+"${SPROG} add: scheduling file .sfile1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest basicb-3a1 "${testcvs} status sfile1" \
+"===================================================================
+File: sfile1                   Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         cd ../sdir2
+         echo sfile2 starts >sfile2
+         dotest basicb-4 "${testcvs} add sfile2" \
+"${SPROG} add: scheduling file .sfile2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest basicb-4a "${testcvs} -q ci CVS" \
+"${CPROG} commit: warning: directory CVS specified in argument
+${CPROG} commit: but CVS uses CVS for its own purposes; skipping CVS directory"
+         cd ..
+         dotest basicb-5 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/Emptydir/sfile1,v  <--  Emptydir/sfile1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/sdir2/sfile2,v  <--  sdir2/sfile2
+initial revision: 1\.1"
+         echo sfile1 develops >Emptydir/sfile1
+         dotest basicb-6 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/Emptydir/sfile1,v  <--  Emptydir/sfile1
+new revision: 1\.2; previous revision: 1\.1"
+         dotest basicb-7 "${testcvs} -q tag release-1" 'T Emptydir/sfile1
+T sdir2/sfile2'
+         echo not in time for release-1 >sdir2/sfile2
+         dotest basicb-8 "${testcvs} -q ci -m modify-2" \
+"$CVSROOT_DIRNAME/first-dir/sdir2/sfile2,v  <--  sdir2/sfile2
+new revision: 1\.2; previous revision: 1\.1"
+         # See if CVS can correctly notice when an invalid numeric
+         # revision is specified.
+         # Commented out until we get around to fixing CVS
+:        dotest basicb-8a0 "${testcvs} diff -r 1.5 -r 1.7 sfile2" 'error msg'
+         cd ..
+
+         # Test that we recurse into the correct directory when checking
+         # for existing files, even if co -d is in use.
+         touch first-dir/extra
+         dotest basicb-cod-1 "${testcvs} -q co -d first-dir1 first-dir" \
+'U first-dir1/Emptydir/sfile1
+U first-dir1/sdir2/sfile2'
+         rm -rf first-dir1
+
+         rm -r first-dir
+
+         # FIXME? basicb-9 used to check things out like this:
+         #   U newdir/Emptydir/sfile1
+         #   U newdir/sdir2/sfile2
+         # but that's difficult to do.  The whole "shorten" thing
+         # is pretty bogus, because it will break on things
+         # like "cvs co foo/bar baz/quux".  Unless there's some
+         # pretty detailed expansion and analysis of the command-line
+         # arguments, we shouldn't do "shorten" stuff at all.
+
+         dotest basicb-9 \
+"${testcvs} -q co -d newdir -r release-1 first-dir/Emptydir first-dir/sdir2" \
+'U newdir/first-dir/Emptydir/sfile1
+U newdir/first-dir/sdir2/sfile2'
+
+         # basicb-9a and basicb-9b: see note about basicb-1a
+
+         dotest_fail basicb-9a "test -d CVS" ''
+
+         dotest basicb-9c "cat newdir/CVS/Repository" "\."
+         dotest basicb-9d "cat newdir/first-dir/CVS/Repository" \
+"${CVSROOT_DIRNAME}/first-dir" \
+"first-dir"
+         dotest basicb-9e "cat newdir/first-dir/Emptydir/CVS/Repository" \
+"${CVSROOT_DIRNAME}/first-dir/Emptydir" \
+"first-dir/Emptydir"
+         dotest basicb-9f "cat newdir/first-dir/sdir2/CVS/Repository" \
+"${CVSROOT_DIRNAME}/first-dir/sdir2" \
+"first-dir/sdir2"
+
+         dotest basicb-10 "cat newdir/first-dir/Emptydir/sfile1 
newdir/first-dir/sdir2/sfile2" \
+"sfile1 develops
+sfile2 starts"
+
+         rm -rf newdir
+
+         # Hmm, this might be a case for CVSNULLREPOS, but CVS doesn't
+         # seem to deal with it...
+         if false; then
+         dotest basicb-11 "${testcvs} -q co -d sub1/sub2 first-dir" \
+"U sub1/sub2/Emptydir/sfile1
+U sub1/sub2/sdir2/sfile2"
+         cd sub1
+         dotest basicb-12 "${testcvs} -q update ./." ''
+         touch xx
+         dotest basicb-13 "${testcvs} add xx" fixme
+         cd ..
+         rm -r sub1
+         # to test: sub1/sub2/sub3
+         fi # end of tests commented out.
+
+         # Create a second directory.
+         mkdir 1
+         cd 1
+         dotest basicb-14 "${testcvs} -q co -l ." 'U topfile'
+         mkdir second-dir
+         dotest basicb-15 "${testcvs} add second-dir" \
+"Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
+         cd second-dir
+         touch aa
+         dotest basicb-16 "${testcvs} add aa" \
+"${SPROG} add: scheduling file .aa. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest basicb-17 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/second-dir/aa,v  <--  aa
+initial revision: 1\.1"
+         cd ..
+
+         # Try to remove all revisions in a file.
+         dotest_fail basicb-o1 "${testcvs} admin -o1.1 topfile" \
+"RCS file: ${CVSROOT_DIRNAME}/topfile,v
+deleting revision 1\.1
+${SPROG} \[admin aborted\]: attempt to delete all revisions"
+         dotest basicb-o2 "${testcvs} -q update -d first-dir" \
+"U first-dir/Emptydir/sfile1
+U first-dir/sdir2/sfile2"
+         dotest_fail basicb-o3 \
+"${testcvs} admin -o1.1:1.2 first-dir/sdir2/sfile2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v
+deleting revision 1\.2
+deleting revision 1\.1
+${SPROG} \[admin aborted\]: attempt to delete all revisions"
+         cd ..
+         rm -rf 1
+
+         mkdir 1; cd 1
+         # Note that -H is an invalid option.
+         # I suspect that the choice between "illegal" and "invalid"
+         # depends on the user's environment variables, the phase
+         # of the moon (weirdness with optind), and who knows what else.
+         # I've been seeing "illegal"...
+         # And I switched it to "invalid". -DRP
+         # POSIX 1003.2 specifies the format should be 'illegal option'
+         # many other folks are still using the older 'invalid option'
+         # lib/getopt.c will use POSIX when __posixly_correct
+         # otherwise the other, so accept both of them. -- mdb
+         dotest_fail basicb-21 "${testcvs} -q admin -H" \
+"admin: invalid option -- H
+${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information" \
+"admin: illegal option -- H
+${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information"
+         cd ..
+         rmdir 1
+
+         if $keep; then
+           echo Keeping ${TESTDIR} and exiting due to --keep
+           exit 0
+         fi
+
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         modify_repo rm -f $CVSROOT_DIRNAME/topfile,v
+         ;;
+
+
+
+       basicc)
+         # More tests of basic/miscellaneous functionality.
+         mkdir 1; cd 1
+         dotest_fail basicc-1 "$testcvs diff" \
+"$CPROG diff: in directory \.:
+$CPROG \[diff aborted\]: there is no version here; run .$CPROG checkout. first"
+         dotest basicc-2 "$testcvs -q co -l ."
+         mkdir first-dir second-dir
+         dotest basicc-3 "${testcvs} add first-dir second-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
+         # Old versions of CVS often didn't create this top-level CVS
+         # directory in the first place.  I think that maybe the only
+         # way to get it to work currently is to let CVS create it,
+         # and then blow it away (don't complain if it does not
+         # exist).  But that is perfectly valid; people who are used
+         # to the old behavior especially may be interested.
+         # FIXME: this test is intended for the TopLevelAdmin=yes case;
+         # should adjust/move it accordingly.
+         rm -rf CVS
+         dotest basicc-4 "echo *" "first-dir second-dir"
+         dotest basicc-5 "${testcvs} update" \
+"${SPROG} update: Updating first-dir
+${SPROG} update: Updating second-dir" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating first-dir
+${SPROG} update: Updating second-dir"
+
+         cd first-dir
+         dotest basicc-6 "${testcvs} release -d" ""
+         dotest basicc-7 "test -d ../first-dir" ""
+         # The Linux 2.2 kernel lets you delete ".".  That's OK either way,
+         # the point is that CVS must not mess with anything *outside* "."
+         # the way that CVS 1.10 and older tried to.
+         dotest basicc-8 "${testcvs} -Q release -d ." \
+"" "${CPROG} release: deletion of directory \. failed: .*"
+         dotest basicc-9 "test -d ../second-dir" ""
+         # For CVS to make a syntactic check for "." wouldn't suffice.
+         # On Linux 2.2 systems, the cwd may be gone, so we recreate it
+          # to allow basicc-11 to actually happen 
+         if test ! -d ../first-dir; then
+           # Apparently `cd ..' doesn't work with Linux 2.2 & Bash 2.05b.
+           cd $TESTDIR/1
+           mkdir ./first-dir
+            cd ./first-dir
+         fi
+         dotest basicc-11 "${testcvs} -Q release -d ./." \
+"" "${CPROG} release: deletion of directory \./\. failed: .*"
+         dotest basicc-11a "test -d ../second-dir" ""
+
+         cd ../..
+
+         mkdir 2; cd 2
+         dotest basicc-12 "${testcvs} -Q co ." ""
+         # actual entries can be in either Entries or Entries.log, do
+         # an update to get them consolidated into Entries
+         dotest basicc-12a "${testcvs} -Q up" ""
+         dotest basicc-12b "cat CVS/Entries" \
+"D/CVSROOT////
+D/first-dir////
+D/second-dir////"
+         dotest basicc-13 "echo *" "CVS CVSROOT first-dir second-dir"
+         dotest basicc-14 "${testcvs} -Q release first-dir second-dir" ""
+         # a normal release shouldn't affect the Entries file
+         dotest basicc-14b "cat CVS/Entries" \
+"D/CVSROOT////
+D/first-dir////
+D/second-dir////"
+         # FIXCVS: but release -d probably should
+         dotest basicc-15 "${testcvs} -Q release -d first-dir second-dir" ""
+         dotest basicc-16 "echo *" "CVS CVSROOT"
+         dotest basicc-17 "cat CVS/Entries" \
+"D/CVSROOT////
+D/first-dir////
+D/second-dir////"
+         # FIXCVS: if not, update should notice the missing directories
+         # and update Entries accordingly
+         dotest basicc-18 "${testcvs} -Q up" ""
+         dotest basicc-19 "cat CVS/Entries" \
+"D/CVSROOT////
+D/first-dir////
+D/second-dir////"
+
+         cd ..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       basic1)
+         # first dive - add a files, first singly, then in a group.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir basic1; cd basic1
+         # check out an empty directory
+         dotest basic1-1 "${testcvs} -q co first-dir" ''
+
+         cd first-dir
+         echo file2 >file2
+         echo file3 >file3
+         echo file4 >file4
+         echo file5 >file5
+
+         dotest basic1-14-add-add "${testcvs} add file2 file3 file4 file5" \
+"${SPROG} add: scheduling file \`file2' for addition
+${SPROG} add: scheduling file \`file3' for addition
+${SPROG} add: scheduling file \`file4' for addition
+${SPROG} add: scheduling file \`file5' for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest basic1-15-add-add \
+"${testcvs} -q update file2 file3 file4 file5" \
+"A file2
+A file3
+A file4
+A file5"
+         dotest basic1-16-add-add "${testcvs} -q update" \
+"A file2
+A file3
+A file4
+A file5"
+         dotest basic1-17-add-add "${testcvs} -q status" \
+"===================================================================
+File: file2                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file4                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file5                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest basic1-18-add-add "${testcvs} -q log" \
+"${SPROG} log: file2 has been added, but not committed
+${SPROG} log: file3 has been added, but not committed
+${SPROG} log: file4 has been added, but not committed
+${SPROG} log: file5 has been added, but not committed"
+         cd ..
+         dotest basic1-21-add-add "${testcvs} -q update" \
+"A first-dir/file2
+A first-dir/file3
+A first-dir/file4
+A first-dir/file5"
+         # FIXCVS?  Shouldn't this read first-dir/file2 instead of file2?
+         dotest basic1-22-add-add "${testcvs} log first-dir" \
+"${SPROG} log: Logging first-dir
+${SPROG} log: file2 has been added, but not committed
+${SPROG} log: file3 has been added, but not committed
+${SPROG} log: file4 has been added, but not committed
+${SPROG} log: file5 has been added, but not committed"
+         dotest basic1-23-add-add "${testcvs} status first-dir" \
+"${SPROG} status: Examining first-dir
+===================================================================
+File: file2                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file4                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file5                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest basic1-24-add-add "${testcvs} update first-dir" \
+"${SPROG} update: Updating first-dir
+A first-dir/file2
+A first-dir/file3
+A first-dir/file4
+A first-dir/file5"
+         dotest basic1-27-add-add "${testcvs} co first-dir" \
+"${SPROG} checkout: Updating first-dir
+A first-dir/file2
+A first-dir/file3
+A first-dir/file4
+A first-dir/file5"
+         cd first-dir
+         dotest basic1-14-add-ci \
+"$testcvs commit -m test file2 file3 file4 file5" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+initial revision: 1\.1"
+         dotest basic1-15-add-ci \
+"${testcvs} -q update file2 file3 file4 file5" ''
+         dotest basic1-16-add-ci "${testcvs} -q update" ''
+         dotest basic1-17-add-ci "${testcvs} -q status" \
+"===================================================================
+File: file2                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file4                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file4,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file5                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file5,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         # The "log" tests and friends probably already test the output 
+         # from log quite adequately.
+         # Note: using dotest fails here.  It seems to be related
+         # to the output being sufficiently large (Red Hat 4.1).
+         # dotest basic1-18-add-ci "${testcvs} log" "${DOTSTAR}"
+         if ${testcvs} -q log >>${LOGFILE}; then
+           pass basic1-18-add-ci
+         else
+           pass basic1-18-add-ci
+         fi
+         cd ..
+         dotest basic1-21-add-ci "${testcvs} -q update" ''
+         # See test basic1-18-add-ci for explanation of non-use of dotest.
+         if ${testcvs} -q log first-dir >>${LOGFILE}; then
+           pass basic1-22-add-ci
+         else
+           pass basic1-22-add-ci
+         fi
+         # At least for the moment I am going to consider 17-add-ci
+         # an adequate test of the output here.
+         # See test basic1-18-add-ci for explanation of non-use of dotest.
+         if ${testcvs} -q status first-dir >>${LOGFILE}; then
+           pass basic1-23-add-ci
+         else
+           pass basic1-23-add-ci
+         fi
+         dotest basic1-24-add-ci "${testcvs} -q update first-dir" ''
+         dotest basic1-27-add-ci "${testcvs} -q co first-dir" ''
+
+         cd first-dir
+         rm file2 file3 file4 file5
+         dotest basic1-14-rm-rm "${testcvs} rm file2 file3 file4 file5" \
+"${SPROG} remove: scheduling .file2. for removal
+${SPROG} remove: scheduling .file3. for removal
+${SPROG} remove: scheduling .file4. for removal
+${SPROG} remove: scheduling .file5. for removal
+${SPROG} remove: use .${SPROG} commit. to remove these files permanently"
+         # 15-rm-rm was commented out.  Why?
+         dotest basic1-15-rm-rm \
+"${testcvs} -q update file2 file3 file4 file5" \
+"R file2
+R file3
+R file4
+R file5"
+         dotest basic1-16-rm-rm "${testcvs} -q update" \
+"R file2
+R file3
+R file4
+R file5"
+         dotest basic1-17-rm-rm "${testcvs} -q status" \
+"===================================================================
+File: no file file2            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: no file file3            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: no file file4            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file4,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: no file file5            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file5,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         # Would be nice to test that real logs appear (with dead state
+         # and all), either here or someplace like log2 tests.
+         if ${testcvs} -q log >>${LOGFILE}; then
+           pass basic1-18-rm-rm
+         else
+           fail basic1-18-rm-rm
+         fi
+         cd ..
+         dotest basic1-21-rm-rm "${testcvs} -q update" \
+"R first-dir/file2
+R first-dir/file3
+R first-dir/file4
+R first-dir/file5"
+         if ${testcvs} -q log first-dir >>${LOGFILE}; then
+           pass basic1-22-rm-rm
+         else
+           fail basic1-22-rm-rm
+         fi
+         if ${testcvs} -q status first-dir >>${LOGFILE}; then
+           pass basic1-23-rm-rm
+         else
+           fail basic1-23-rm-rm
+         fi
+         dotest basic1-24-rm-rm "${testcvs} -q update first-dir" \
+"R first-dir/file2
+R first-dir/file3
+R first-dir/file4
+R first-dir/file5"
+         dotest basic1-27-rm-rm "${testcvs} -q co first-dir" \
+"R first-dir/file2
+R first-dir/file3
+R first-dir/file4
+R first-dir/file5"
+         cd first-dir
+         dotest basic1-14-rm-ci "${testcvs} -q commit -m test" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+new revision: delete; previous revision: 1\.1"
+         dotest basic1-15-rm-ci \
+"${testcvs} -q update file2 file3 file4 file5" ''
+         dotest basic1-16-rm-ci "${testcvs} -q update" ''
+         dotest basic1-17-rm-ci "${testcvs} -q status" ''
+         # Would be nice to test that real logs appear (with dead state
+         # and all), either here or someplace like log2 tests.
+         if ${testcvs} -q log >>${LOGFILE}; then
+           pass basic1-18-rm-ci
+         else
+           fail basic1-18-rm-ci
+         fi
+         cd ..
+         dotest basic1-21-rm-ci "${testcvs} -q update" ''
+         if ${testcvs} -q log first-dir >>${LOGFILE}; then
+           pass basic1-22-rm-ci
+         else
+           fail basic1-22-rm-ci
+         fi
+         if ${testcvs} -q status first-dir >>${LOGFILE}; then
+           pass basic1-23-rm-ci
+         else
+           fail basic1-23-rm-ci
+         fi
+         dotest basic1-24-rm-ci "${testcvs} -q update first-dir" ''
+         dotest basic1-27-rm-ci "${testcvs} -q co first-dir" ''
+         cd first-dir
+         # All the files are removed, so nothing gets tagged.
+         dotest basic1-28 "${testcvs} -q tag first-dive" ''
+         cd ..
+         cd ..
+
+         if $keep; then
+           echo Keeping ${TESTDIR} and exiting due to --keep
+           exit 0
+         fi
+
+         rm -r basic1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       deep)
+         # Test the ability to operate on directories nested rather deeply.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest deep-1 "${testcvs} -q co first-dir" ''
+         cd first-dir
+         for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do
+           mkdir $i
+           dotest deep-2-$i "${testcvs} add $i" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository"
+           cd $i
+           echo file1 >file1
+           dotest deep-3-$i "${testcvs} add file1" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         done
+         cd ../../../../../../../../..
+         dotest_lit deep-4 "$testcvs -q ci -m add-them first-dir" <<HERE
+$CVSROOT_DIRNAME/first-dir/dir1/file1,v  <--  first-dir/dir1/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/file1,v  <--  first-dir/dir1/dir2/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/file1,v  <--  
first-dir/dir1/dir2/dir3/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/file1,v  <--  
first-dir/dir1/dir2/dir3/dir4/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v  <--  
first-dir/dir1/dir2/dir3/dir4/dir5/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v  <--  
first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v  <--  
first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v  
<--  first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1
+initial revision: 1.1
+HERE
+
+         cd first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8
+         rm file1
+         dotest deep-4a0 "$testcvs rm file1" \
+"$SPROG remove: scheduling .file1. for removal
+$SPROG remove: use .$SPROG commit. to remove this file permanently"
+         dotest deep-4a1 "$testcvs -q ci -m rm-it" \
+"$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v  
<--  file1
+new revision: delete; previous revision: 1\.1"
+         cd ../../..
+         dotest deep-4a2 "${testcvs} -q update -P dir6/dir7" ''
+         # Should be using "test -e", but it's not portable enough -
+         # Solaris 2.5 does not have it.
+         dotest_fail deep-4a3 "test -d dir6/dir7/dir8" ''
+
+         # Test that if we remove the working directory, CVS does not
+         # recreate it.  (I realize that this behavior is what the
+         # users expect, but in the longer run we might want to
+         # re-think it.  The corresponding behavior for a file is that
+         # CVS *will* recreate it, and we might want to make it so
+         # that "cvs release -d" is the way to delete the directory
+         # and have it stay gone -kingdon, Oct1996).
+         rm -r dir6
+         dotest deep-4b0a "${testcvs} -q diff"
+         dotest deep-4b0b "${testcvs} -q ci"
+         dotest deep-4b1 "${testcvs} -q update"
+         dotest deep-4b2 "${testcvs} -q update -d -P" \
+'U dir6/file1
+U dir6/dir7/file1'
+
+         # Test what happens if one uses -P when there are files removed
+         # but not committed.
+         cd dir6/dir7
+         dotest deep-rm1 "${testcvs} rm -f file1" \
+"${SPROG} remove: scheduling .file1. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         cd ..
+         dotest deep-rm2 "${testcvs} -q update -d -P" 'R dir7/file1'
+         dotest deep-rm3 "test -d dir7" ''
+         dotest deep-rm4 "$testcvs -q ci -m rm-it" \
+"$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v  <--  
dir7/file1
+new revision: delete; previous revision: 1\.1"
+         dotest deep-rm5 "${testcvs} -q update -d -P" ''
+         dotest_fail deep-rm6 "test -d dir7" ''
+
+         # Test rm -f -R.
+         cd ../..
+         dotest deep-rm7 "${testcvs} rm -f -R dir5" \
+"${SPROG} remove: Removing dir5
+${SPROG} remove: scheduling .dir5/file1. for removal
+${SPROG} remove: Removing dir5/dir6
+${SPROG} remove: scheduling .dir5/dir6/file1. for removal
+${SPROG} remove: use .${SPROG} commit. to remove these files permanently"
+         dotest deep-rm8 "${testcvs} -q ci -m rm-it" \
+"$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v  <--  dir5/file1
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v  <--  
dir5/dir6/file1
+new revision: delete; previous revision: 1\.1"
+         dotest deep-rm9 "${testcvs} -q update -d -P" ''
+         dotest_fail deep-rm10 "test -d dir5"
+
+         cd ../../../../..
+
+         if echo "yes" | $testcvs release -d first-dir >>$LOGFILE 2>&1; then
+           pass deep-5
+         else
+           fail deep-5
+         fi
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       basic2)
+               # Test rtag, import, history, various miscellaneous operations
+
+               # NOTE: this section has reached the size and
+               # complexity where it is getting to be a good idea to
+               # add new tests to a new section rather than
+               # continuing to piggyback them onto the tests here.
+
+               # First empty the history file
+               modify_repo rm -rf $CVSROOT_DIRNAME/CVSROOT/history
+               modify_repo touch $CVSROOT_DIRNAME/CVSROOT/history
+
+               modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+               dotest basic2-1 "$testcvs -q co first-dir"
+               for i in first-dir dir1 dir2 ; do
+                       if test ! -d $i ; then
+                               mkdir $i
+                               dotest basic2-2-$i "${testcvs} add $i" \
+"Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository"
+                       fi
+
+                       cd $i
+
+                       for j in file6 file7; do
+                               echo $j > $j
+                       done
+
+                       dotest basic2-3-$i "${testcvs} add file6 file7" \
+"${SPROG} add: scheduling file .file6. for addition
+${SPROG} add: scheduling file .file7. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+
+               done
+               cd ../../..
+               dotest basic2-4 "${testcvs} update first-dir" \
+"${SPROG} update: Updating first-dir
+A first-dir/file6
+A first-dir/file7
+${SPROG} update: Updating first-dir/dir1
+A first-dir/dir1/file6
+A first-dir/dir1/file7
+${SPROG} update: Updating first-dir/dir1/dir2
+A first-dir/dir1/dir2/file6
+A first-dir/dir1/dir2/file7"
+
+               # fixme: doesn't work right for added files.
+               dotest basic2-5 "${testcvs} log first-dir" \
+"${SPROG} log: Logging first-dir
+${SPROG} log: file6 has been added, but not committed
+${SPROG} log: file7 has been added, but not committed
+${SPROG} log: Logging first-dir/dir1
+${SPROG} log: file6 has been added, but not committed
+${SPROG} log: file7 has been added, but not committed
+${SPROG} log: Logging first-dir/dir1/dir2
+${SPROG} log: file6 has been added, but not committed
+${SPROG} log: file7 has been added, but not committed"
+
+               dotest basic2-6 "${testcvs} status first-dir" \
+"${SPROG} status: Examining first-dir
+===================================================================
+File: file6                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file7                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+${SPROG} status: Examining first-dir/dir1
+===================================================================
+File: file6                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file7                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+${SPROG} status: Examining first-dir/dir1/dir2
+===================================================================
+File: file6                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file7                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+# XXX why is this commented out???
+#              if ${CVS} diff -u first-dir   >> ${LOGFILE} || test $? = 1 ; 
then
+#                  pass 34
+#              else
+#                  fail 34
+#              fi
+
+               dotest basic2-8 "${testcvs} -q ci -m 'second dive' first-dir" \
+"$CVSROOT_DIRNAME/first-dir/file6,v  <--  first-dir/file6
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file7,v  <--  first-dir/file7
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir1/file6,v  <--  first-dir/dir1/file6
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir1/file7,v  <--  first-dir/dir1/file7
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/file6,v  <--  first-dir/dir1/dir2/file6
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir1/dir2/file7,v  <--  first-dir/dir1/dir2/file7
+initial revision: 1\.1"
+
+               dotest basic2-9 "${testcvs} tag second-dive first-dir" \
+"${SPROG} tag: Tagging first-dir
+T first-dir/file6
+T first-dir/file7
+${SPROG} tag: Tagging first-dir/dir1
+T first-dir/dir1/file6
+T first-dir/dir1/file7
+${SPROG} tag: Tagging first-dir/dir1/dir2
+T first-dir/dir1/dir2/file6
+T first-dir/dir1/dir2/file7"
+
+               # third dive - in bunch o' directories, add bunch o' files,
+               # delete some, change some.
+
+               for i in first-dir dir1 dir2 ; do
+                       cd $i
+
+                       # modify a file
+                       echo file6 >>file6
+
+                       # delete a file
+                       rm file7
+
+                       dotest basic2-10-$i "${testcvs} rm file7" \
+"${SPROG} remove: scheduling .file7. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+
+                       # and add a new file
+                       echo file14 >file14
+
+                       dotest basic2-11-$i "${testcvs} add file14" \
+"${SPROG} add: scheduling file .file14. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+               done
+
+               cd ../../..
+               dotest basic2-12 "${testcvs} update first-dir" \
+"${SPROG} update: Updating first-dir
+A first-dir/file14
+M first-dir/file6
+R first-dir/file7
+${SPROG} update: Updating first-dir/dir1
+A first-dir/dir1/file14
+M first-dir/dir1/file6
+R first-dir/dir1/file7
+${SPROG} update: Updating first-dir/dir1/dir2
+A first-dir/dir1/dir2/file14
+M first-dir/dir1/dir2/file6
+R first-dir/dir1/dir2/file7"
+
+               # FIXME: doesn't work right for added files
+               dotest basic2-13 "${testcvs} log first-dir" \
+"${SPROG} log: Logging first-dir
+${SPROG} log: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
+Working file: first-dir/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
+Working file: first-dir/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+second dive
+=============================================================================
+${SPROG} log: Logging first-dir/dir1
+${SPROG} log: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+Working file: first-dir/dir1/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+Working file: first-dir/dir1/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+second dive
+=============================================================================
+${SPROG} log: Logging first-dir/dir1/dir2
+${SPROG} log: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+Working file: first-dir/dir1/dir2/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+Working file: first-dir/dir1/dir2/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+second dive
+============================================================================="
+
+               dotest basic2-14 "${testcvs} status first-dir" \
+"${SPROG} status: Examining first-dir
+===================================================================
+File: file14                   Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file6                    Status: Locally Modified
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file6,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: no file file7            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file7,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+${SPROG} status: Examining first-dir/dir1
+===================================================================
+File: file14                   Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file6                    Status: Locally Modified
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: no file file7            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+${SPROG} status: Examining first-dir/dir1/dir2
+===================================================================
+File: file14                   Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file6                    Status: Locally Modified
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: no file file7            Status: Locally Removed
+
+   Working revision:   -1\.1.*
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)${DOTSTAR}"
+
+# XXX why is this commented out?
+#              if ${CVS} diff -u first-dir  >> ${LOGFILE} || test $? = 1 ; then
+#                  pass 42
+#              else
+#                  fail 42
+#              fi
+
+               dotest basic2-16 "${testcvs} ci -m 'third dive' first-dir" \
+"${CPROG} commit: Examining first-dir
+${CPROG} commit: Examining first-dir/dir1
+${CPROG} commit: Examining first-dir/dir1/dir2
+${CVSROOT_DIRNAME}/first-dir/file14,v  <--  first-dir/file14
+initial revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/file6,v  <--  first-dir/file6
+new revision: 1\.2; previous revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/file7,v  <--  first-dir/file7
+new revision: delete; previous revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/dir1/file14,v  <--  first-dir/dir1/file14
+initial revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/dir1/file6,v  <--  first-dir/dir1/file6
+new revision: 1\.2; previous revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/dir1/file7,v  <--  first-dir/dir1/file7
+new revision: delete; previous revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v  <--  
first-dir/dir1/dir2/file14
+initial revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v  <--  first-dir/dir1/dir2/file6
+new revision: 1\.2; previous revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v  <--  first-dir/dir1/dir2/file7
+new revision: delete; previous revision: 1\.1"
+               dotest basic2-17 "${testcvs} -q update first-dir" ''
+
+               dotest basic2-18 "${testcvs} tag third-dive first-dir" \
+"${SPROG} tag: Tagging first-dir
+T first-dir/file14
+T first-dir/file6
+${SPROG} tag: Tagging first-dir/dir1
+T first-dir/dir1/file14
+T first-dir/dir1/file6
+${SPROG} tag: Tagging first-dir/dir1/dir2
+T first-dir/dir1/dir2/file14
+T first-dir/dir1/dir2/file6"
+
+               dotest basic2-19 "echo yes | ${testcvs} release -d first-dir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .first-dir.: "
+
+               # end of third dive
+               dotest_fail basic2-20 "test -d first-dir" ""
+
+               # now try some rtags
+
+               # rtag HEADS
+               dotest basic2-21 "${testcvs} rtag rtagged-by-head first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: Tagging first-dir/dir1
+${SPROG} rtag: Tagging first-dir/dir1/dir2"
+
+               dotest basic2-21b "${testcvs} co -p -r rtagged-by-head 
first-dir/file6" \
+"===================================================================
+Checking out first-dir/file6
+RCS:  $CVSROOT_DIRNAME/first-dir/file6,v
+VERS: 1\.2
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+file6
+file6"
+               # see what happens when val-tags is removed
+               modify_repo mv $CVSROOT_DIRNAME/CVSROOT/val-tags \
+                               $CVSROOT_DIRNAME/CVSROOT/val-tags.save
+               # The output for this used to be something like:
+               # "${SPROG} checkout: cannot open CVS/Entries for reading: No 
such file or directory
+               # ${SPROG} \[checkout aborted\]: no such tag \`rtagged-by-head'"
+
+               dotest basic2-21c \
+"${testcvs} co -p -r rtagged-by-head first-dir/file6" \
+"===================================================================
+Checking out first-dir/file6
+RCS:  $CVSROOT_DIRNAME/first-dir/file6,v
+VERS: 1\.2
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+file6
+file6"
+               modify_repo mv $CVSROOT_DIRNAME/CVSROOT/val-tags.save \
+                               $CVSROOT_DIRNAME/CVSROOT/val-tags
+
+               # tag by tag
+               dotest basic2-22 "${testcvs} rtag -r rtagged-by-head 
rtagged-by-tag first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: Tagging first-dir/dir1
+${SPROG} rtag: Tagging first-dir/dir1/dir2"
+
+               # tag by revision
+               dotest basic2-23 "${testcvs} rtag -r1.1 rtagged-by-revision 
first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: Tagging first-dir/dir1
+${SPROG} rtag: Tagging first-dir/dir1/dir2"
+
+               # rdiff by revision
+               dotest basic2-24 "${testcvs} rdiff -r1.1 -rrtagged-by-head 
first-dir" \
+"${SPROG} rdiff: Diffing first-dir
+Index: first-dir/file6
+diff -c first-dir/file6:1\.1 first-dir/file6:1\.2
+\*\*\* first-dir/file6:1\.1    ${DATE}
+--- first-dir/file6    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+  file6
+${PLUS} file6
+Index: first-dir/file7
+diff -c first-dir/file7:1\.1 first-dir/file7:removed
+\*\*\* first-dir/file7:1.1     ${DATE}
+--- first-dir/file7    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----
+${SPROG} rdiff: Diffing first-dir/dir1
+Index: first-dir/dir1/file6
+diff -c first-dir/dir1/file6:1\.1 first-dir/dir1/file6:1\.2
+\*\*\* first-dir/dir1/file6:1\.1       ${DATE}
+--- first-dir/dir1/file6       ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+  file6
+${PLUS} file6
+Index: first-dir/dir1/file7
+diff -c first-dir/dir1/file7:1\.1 first-dir/dir1/file7:removed
+\*\*\* first-dir/dir1/file7:1\.1       ${DATE}
+--- first-dir/dir1/file7       ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----
+${SPROG} rdiff: Diffing first-dir/dir1/dir2
+Index: first-dir/dir1/dir2/file6
+diff -c first-dir/dir1/dir2/file6:1\.1 first-dir/dir1/dir2/file6:1\.2
+\*\*\* first-dir/dir1/dir2/file6:1\.1  ${DATE}
+--- first-dir/dir1/dir2/file6  ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+  file6
+${PLUS} file6
+Index: first-dir/dir1/dir2/file7
+diff -c first-dir/dir1/dir2/file7:1\.1 first-dir/dir1/dir2/file7:removed
+\*\*\* first-dir/dir1/dir2/file7:1\.1  ${DATE}
+--- first-dir/dir1/dir2/file7  ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----"
+               dotest basic2-24a "${testcvs} rdiff -l -r1.1 -rrtagged-by-head 
first-dir" \
+"${SPROG} rdiff: Diffing first-dir
+Index: first-dir/file6
+diff -c first-dir/file6:1\.1 first-dir/file6:1\.2
+\*\*\* first-dir/file6:1\.1    ${DATE}
+--- first-dir/file6    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+  file6
+${PLUS} file6
+Index: first-dir/file7
+diff -c first-dir/file7:1\.1 first-dir/file7:removed
+\*\*\* first-dir/file7:1.1     ${DATE}
+--- first-dir/file7    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----"
+               # now export by rtagged-by-head and rtagged-by-tag and compare.
+               dotest basic2-25 "${testcvs} export -r rtagged-by-head -d 1dir 
first-dir" \
+"${SPROG} export: Updating 1dir
+U 1dir/file14
+U 1dir/file6
+${SPROG} export: Updating 1dir/dir1
+U 1dir/dir1/file14
+U 1dir/dir1/file6
+${SPROG} export: Updating 1dir/dir1/dir2
+U 1dir/dir1/dir2/file14
+U 1dir/dir1/dir2/file6"
+               dotest_fail basic2-25a "test -d 1dir/CVS"
+               dotest_fail basic2-25b "test -d 1dir/dir1/CVS"
+               dotest_fail basic2-25c "test -d 1dir/dir1/dir2/CVS"
+
+               dotest basic2-26 "${testcvs} export -r rtagged-by-tag 
first-dir" \
+"${SPROG} export: Updating first-dir
+U first-dir/file14
+U first-dir/file6
+${SPROG} export: Updating first-dir/dir1
+U first-dir/dir1/file14
+U first-dir/dir1/file6
+${SPROG} export: Updating first-dir/dir1/dir2
+U first-dir/dir1/dir2/file14
+U first-dir/dir1/dir2/file6"
+               dotest_fail basic2-26a "test -d first-dir/CVS"
+               dotest_fail basic2-26b "test -d first-dir/dir1/CVS"
+               dotest_fail basic2-26c "test -d first-dir/dir1/dir2/CVS"
+
+               dotest basic2-27 "directory_cmp 1dir first-dir"
+               rm -r 1dir first-dir
+
+               # checkout by revision vs export by rtagged-by-revision and 
compare.
+               mkdir export-dir
+               dotest basic2-28 "${testcvs} export -rrtagged-by-revision -d 
export-dir first-dir" \
+"${SPROG} export: Updating export-dir
+U export-dir/file14
+U export-dir/file6
+U export-dir/file7
+${SPROG} export: Updating export-dir/dir1
+U export-dir/dir1/file14
+U export-dir/dir1/file6
+U export-dir/dir1/file7
+${SPROG} export: Updating export-dir/dir1/dir2
+U export-dir/dir1/dir2/file14
+U export-dir/dir1/dir2/file6
+U export-dir/dir1/dir2/file7"
+               dotest_fail basic2-28a "test -d export-dir/CVS"
+               dotest_fail basic2-28b "test -d export-dir/dir1/CVS"
+               dotest_fail basic2-28c "test -d export-dir/dir1/dir2/CVS"
+
+               dotest basic2-29 "${testcvs} co -r1.1 first-dir" \
+"${SPROG} checkout: Updating first-dir
+U first-dir/file14
+U first-dir/file6
+U first-dir/file7
+${SPROG} checkout: Updating first-dir/dir1
+U first-dir/dir1/file14
+U first-dir/dir1/file6
+U first-dir/dir1/file7
+${SPROG} checkout: Updating first-dir/dir1/dir2
+U first-dir/dir1/dir2/file14
+U first-dir/dir1/dir2/file6
+U first-dir/dir1/dir2/file7"
+
+               # directory copies are done in an oblique way in order to avoid 
a bug in sun's tmp filesystem.
+               mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd 
../first-dir.cpy ; tar xf -))
+
+               dotest basic2-30 "directory_cmp first-dir export-dir"
+
+               # interrupt, while we've got a clean 1.1 here, let's import it
+               # into a couple of other modules.
+               cd export-dir
+               dotest_sort basic2-31 \
+"$testcvs import -m first-import second-dir first-immigration immigration1 
immigration1_0" \
+"
+
+N second-dir/dir1/dir2/file14
+N second-dir/dir1/dir2/file6
+N second-dir/dir1/dir2/file7
+N second-dir/dir1/file14
+N second-dir/dir1/file6
+N second-dir/dir1/file7
+N second-dir/file14
+N second-dir/file6
+N second-dir/file7
+No conflicts created by this import
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2"
+               cd ..
+
+               dotest basic2-32 "${testcvs} export -r HEAD second-dir" \
+"${SPROG} export: Updating second-dir
+U second-dir/file14
+U second-dir/file6
+U second-dir/file7
+${SPROG} export: Updating second-dir/dir1
+U second-dir/dir1/file14
+U second-dir/dir1/file6
+U second-dir/dir1/file7
+${SPROG} export: Updating second-dir/dir1/dir2
+U second-dir/dir1/dir2/file14
+U second-dir/dir1/dir2/file6
+U second-dir/dir1/dir2/file7"
+
+               dotest basic2-33 "directory_cmp first-dir second-dir"
+
+               rm -rf first-dir second-dir
+               rm -r export-dir
+               mkdir first-dir
+               (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -))
+
+               # update the top, cancelling sticky tags, retag, update other 
copy, compare.
+               cd first-dir
+               dotest basic2-34 "${testcvs} update -A -l *file*" \
+"U file6
+${SPROG} update: \`file7' is no longer in the repository"
+
+               # If we don't delete the tag first, cvs won't retag it.
+               # This would appear to be a feature.
+               dotest basic2-35 "${testcvs} tag -l -d rtagged-by-revision" \
+"${SPROG} tag: Untagging \.
+D file14
+D file6"
+               dotest basic2-36 "${testcvs} tag -l rtagged-by-revision" \
+"${SPROG} tag: Tagging \.
+T file14
+T file6"
+
+               cd ..
+               mv first-dir 1dir
+               mv first-dir.cpy first-dir
+               cd first-dir
+
+               dotest basic2-37 "${testcvs} -q diff -u" ''
+
+               dotest basic2-38 "${testcvs} update" \
+"${SPROG} update: Updating .
+${SPROG} update: Updating dir1
+${SPROG} update: Updating dir1/dir2"
+
+               cd ..
+
+               #### FIXME: is this expected to work???  Need to investigate
+               #### and fix or remove the test.
+#              dotest basic2-39 "directory_cmp 1dir first-dir"
+
+               rm -rf 1dir first-dir
+
+               # Test the cvs history command.
+               #
+               # Just skip these in write proxy mode for now.  We should only
+               # see write commands and maybe the last few reads in the
+               # secondary history file the way we currently sync, but I'm not
+               # going to try and test this yet.
+               if $proxy; then :; else
+
+               # The reason that there are two patterns rather than using
+               # \(${TESTDIR}\|<remote>\) is that we are trying to
+               # make this portable.  Perhaps at some point we should
+               # ditch that notion and require GNU expr (or dejagnu or....)
+               # since it seems to be so painful.
+
+               dotest basic2-64 "${testcvs} his -x TOFWUPCGMAR -a" \
+"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir           =first-dir= 
${TESTDIR}/\*
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir           
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir           
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir/dir1      
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir/dir1      
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir/dir1/dir2 
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir/dir1/dir2 
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14    first-dir           
== ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir           
== ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir           
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14    first-dir/dir1      
== ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir/dir1      
== ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir/dir1      
== ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14    first-dir/dir1/dir2 
== ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir/dir1/dir2 
== ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir/dir1/dir2 
== ${TESTDIR}
+F [0-9-]* [0-9:]* ${PLUS}0000 ${username}                     =first-dir= 
${TESTDIR}/\*
+T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
+T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir 
\[rtagged-by-tag:rtagged-by-head\]
+T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir 
\[rtagged-by-revision:1\.1\]
+O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir           
=first-dir= ${TESTDIR}/\*
+U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir           
== ${TESTDIR}/first-dir
+W [0-9-]* [0-9:]* ${PLUS}0000 ${username}     file7     first-dir           == 
${TESTDIR}/first-dir" \
+"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir           =first-dir= 
<remote>/\*
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir           
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir           
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir/dir1      
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir/dir1      
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir/dir1/dir2 
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir/dir1/dir2 
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14    first-dir           
== <remote>
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir           
== <remote>
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir           
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14    first-dir/dir1      
== <remote>
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir/dir1      
== <remote>
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir/dir1      
== <remote>
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14    first-dir/dir1/dir2 
== <remote>
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir/dir1/dir2 
== <remote>
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir/dir1/dir2 
== <remote>
+F [0-9-]* [0-9:]* ${PLUS}0000 ${username}                     =first-dir= 
<remote>/\*
+T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
+T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir 
\[rtagged-by-tag:rtagged-by-head\]
+T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir 
\[rtagged-by-revision:1\.1\]
+O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir           
=first-dir= <remote>/\*
+[UP] [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir          
 == <remote>
+W [0-9-]* [0-9:]* ${PLUS}0000 ${username}     file7     first-dir           == 
<remote>"
+         fi
+
+         dokeep
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       ls)
+         # Test the ls & rls commands.  There are some tests of
+         # Interaction of ls, rls, and branches in branches2.
+         mkdir ls; cd ls
+         dotest ls-init-1 "$testcvs -Q co -dtop ."
+         cd top
+         dotest ls-1 "$testcvs ls CVSROOT" \
+"checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+postadmin
+postproxy
+posttag
+postwatch
+preproxy
+rcsinfo
+taginfo
+verifymsg"
+         dotest ls-2 "$testcvs ls -R" \
+"\.:
+CVSROOT
+
+CVSROOT:
+checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+postadmin
+postproxy
+posttag
+postwatch
+preproxy
+rcsinfo
+taginfo
+verifymsg"
+         # This used to cause a fatal error.
+         modify_repo mkdir $CVSROOT_DIRNAME/notcheckedout
+         dotest ls-3 "$testcvs ls -RP" \
+"\.:
+CVSROOT
+notcheckedout
+
+CVSROOT:
+checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+postadmin
+postproxy
+posttag
+postwatch
+preproxy
+rcsinfo
+taginfo
+verifymsg"
+
+         # Make sure the previous command did not create the notcheckedout
+         # directory.
+         dotest_fail ls-4 "test -d notcheckedout"
+
+         dotest ls-5 "$testcvs ls -R" \
+"\.:
+CVSROOT
+notcheckedout
+
+CVSROOT:
+checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+postadmin
+postproxy
+posttag
+postwatch
+preproxy
+rcsinfo
+taginfo
+verifymsg
+
+notcheckedout:"
+         dotest_fail ls-6 "test -d notcheckedout"
+
+         # Several test for ls -d, which shows dead revisions
+
+         # Set up the dead files
+         mkdir cemetery
+         dotest ls-d-init-1 "$testcvs -Q add cemetery"
+         cd cemetery
+         touch dead living
+         dotest ls-d-init-2 "$testcvs -Q add dead living"
+         dotest ls-d-init-3 "$testcvs -Q ci -mm dead living"
+         dotest ls-d-init-4 "$testcvs -Q tag -b branch"
+         dotest ls-d-init-5 "$testcvs -Q up -A"
+         rm dead
+         dotest ls-d-init-6 "$testcvs -Q rm dead"
+         dotest ls-d-init-7 "$testcvs -Q ci -mm dead"
+         dotest ls-d-init-8 "$testcvs -Q up -r branch"
+         rm dead
+         dotest ls-d-init-9 "$testcvs -Q rm dead"
+         dotest ls-d-init-10 "$testcvs -Q ci -mm dead"
+
+         # Possible output
+         output_living="living"
+         output_dead="dead
+living"
+
+         # The basic test is to make sure that dead revisions are shown if and
+         # only if -d is speficified (and that live revisions are always
+         # shown).  The following test cases cover all combinations of these
+         # factors:
+         #
+         #    + Working directory is on branch or trunk
+         #    + ls or rls
+         #    + implicit branch, explicit trunk, or explicit branch
+         #    + -d present or absent
+
+         # Working directory on trunk
+         $testcvs -Q up -A
+
+         ## ls
+         dotest ls-d-1 "$testcvs ls" "$output_living"
+         dotest ls-d-2 "$testcvs ls -d" "$output_dead"
+
+         dotest ls-d-3 "$testcvs ls -rHEAD" "$output_living"
+         dotest ls-d-4 "$testcvs ls -drHEAD" "$output_dead"
+
+         dotest ls-d-5 "$testcvs ls -rbranch" "$output_living"
+         dotest ls-d-6 "$testcvs ls -drbranch" "$output_dead"
+
+         ## rls
+         dotest ls-d-7 "$testcvs rls cemetery" \
+"$SPROG rls: Listing module: \`cemetery'
+$output_living"
+         dotest ls-d-8 "$testcvs rls -d cemetery" \
+"$SPROG rls: Listing module: \`cemetery'
+$output_dead"
+
+         dotest ls-d-9 "$testcvs -q rls -rHEAD cemetery" "$output_living"
+         dotest ls-d-10 "$testcvs -q rls -drHEAD cemetery" "$output_dead"
+
+         dotest ls-d-11 "$testcvs -q rls -rbranch cemetery" "$output_living"
+         dotest ls-d-12 "$testcvs -q rls -drbranch cemetery" "$output_dead"
+
+         # Working directory on branch
+         $testcvs -Q up -r branch
+
+         ## ls
+         dotest ls-d-13 "$testcvs ls" "$output_living"
+         dotest ls-d-14 "$testcvs ls -d" "$output_dead"
+
+         dotest ls-d-15 "$testcvs ls -r HEAD" "$output_living"
+         dotest ls-d-16 "$testcvs ls -d -r HEAD" "$output_dead"
+
+         dotest ls-d-17 "$testcvs ls -r branch" "$output_living"
+         dotest ls-d-18 "$testcvs ls -d -r branch" "$output_dead"
+
+         ## rls
+         dotest ls-d-19 "$testcvs -q rls cemetery" "$output_living"
+         dotest ls-d-20 "$testcvs -q rls -d cemetery" "$output_dead"
+
+         dotest ls-d-21 "$testcvs -q rls -rHEAD cemetery" "$output_living"
+         dotest ls-d-22 "$testcvs -q rls -drHEAD cemetery" "$output_dead"
+
+         dotest ls-d-23 "$testcvs -q rls -rbranch cemetery" "$output_living"
+         dotest ls-d-24 "$testcvs -q rls -drbranch cemetery" "$output_dead"
+
+         # Some tests to cover specifying a file name as an option
+         # Combinations of factors:
+         #
+         #  + file in CVS/Entries or not
+         #  + current directory or subdirectory
+         #  + file dead or not
+
+         # Switch back to the trunk
+         $testcvs -Q up -A
+
+         ## file in CVS/Entries
+         dotest ls-filename-1 "$testcvs ls dead"
+
+         # ls'ing a file that already exists once caused an assertion failure.
+         dotest ls-filename-2 "$testcvs ls living" "living"
+
+         cd ..
+         dotest ls-filename-3 "$testcvs ls cemetery/dead"
+
+         # ls'ing a file that already exists once caused an assertion failure.
+         dotest ls-filename-4 "$testcvs ls cemetery/living" "cemetery/living"
+         cd cemetery
+
+         ## file not in CVS/Entries
+         echo D > CVS/Entries
+
+         dotest ls-filename-5 "$testcvs ls dead"
+
+         # ls'ing a file that already exists once caused an assertion failure.
+         dotest ls-filename-6 "$testcvs ls living" "living"
+
+         cd ..
+         dotest ls-filename-7 "$testcvs ls cemetery/dead"
+
+         # ls'ing a file that already exists once caused an assertion failure.
+         dotest ls-filename-8 "$testcvs ls cemetery/living" "cemetery/living"
+
+         cd cemetery
+
+         # Test the -D date option to cvs ls
+
+         # try and list a file before it's created, during an old revision, in
+         # a period when it was dead and in the future
+         time_prebirth=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
+         touch dated
+         dotest ls-D-init-1 "$testcvs -Q add dated"
+         dotest ls-D-init-2 "$testcvs -Q ci -mm dated"
+         time_newborn=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
+         echo mm >> dated
+         dotest ls-D-init-2 "$testcvs -Q ci -mm dated"
+         time_predeath=`date '+%Y-%m-%d %H:%M:%S'` ; sleep 1
+         rm dated
+         dotest ls-D-init-3 "$testcvs -Q rm dated"
+         dotest ls-D-init-4 "$testcvs -Q ci -mm dated"
+         time_postdeath=`date '+%Y-%m-%d %H:%M:%S'`
+
+         dotest ls-D-1 "$testcvs ls -D '$time_prebirth' -e dated"
+
+         # ls'ing a file that already exists once caused an assertion failure.
+         dotest ls-D-2 "$testcvs ls -D '$time_newborn' -e dated" \
+"/dated/1\.1/.*"
+
+         # ls'ing a file that already exists once caused an assertion failure.
+         dotest ls-D-3 "$testcvs ls -D '$time_predeath' -e dated" \
+"/dated/1.2/.*"
+
+         dotest ls-D-4 "$testcvs ls -D '$time_postdeath' -e dated"
+
+         dokeep
+         cd ../../..
+         rm -rf ls
+         modify_repo rm -rf $CVSROOT_DIRNAME/notcheckedout \
+                            $CVSROOT_DIRNAME/cemetery
+         unset output_living output_dead
+         ;;
+
+
+
+       parseroot)
+         mkdir 1; cd 1
+         # Test odd cases involving CVSROOT.  At the moment, that means we
+         # are testing roots with '/'s on the end, which CVS should parse off.
+         CVSROOT_save=${CVSROOT}
+         CVSROOT="${CVSROOT}/////"
+         dotest parseroot-1 "${testcvs} -q co CVSROOT/modules" \
+"U CVSROOT/modules"
+         dotest parseroot-2 "${testcvs} -q ci -fmnull-change CVSROOT/modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.2; previous revision: 1\.1
+$SPROG commit: Rebuilding administrative file database"
+
+         if $remote; then
+           # I only test these when testing remote in case CVS was compiled
+           # without client support.
+
+           # logout does not try to contact the server.
+           CVSROOT=":pserver;proxy=localhost;proxyport=8080:localhost/dev/null"
+           dotest parseroot-3r "$testcvs -d'$CVSROOT' logout" \
+"Logging out of :pserver:address@hidden:2401/dev/null
+$CPROG logout: warning: failed to open $HOME/\.cvspass for reading: No such 
file or directory
+$CPROG logout: Entry not found."
+           CVSROOT=":pserver;proxyport=8080:localhost/dev/null"
+           dotest_fail parseroot-4r "$testcvs -d'$CVSROOT' logout" \
+"$CPROG logout: Proxy port specified in CVSROOT without proxy host\.
+$CPROG \[logout aborted\]: Bad CVSROOT: 
\`:pserver;proxyport=8080:localhost/dev/null'\."
+           CVSROOT=":pserver;optionnoarg:localhost/dev/null"
+           dotest_fail parseroot-5r "$testcvs -d'$CVSROOT' logout" \
+"$CPROG logout: Option (\`optionnoarg') has no argument in CVSROOT\.
+$CPROG \[logout aborted\]: Bad CVSROOT: 
\`:pserver;optionnoarg:localhost/dev/null'\."
+           CVSROOT=":pserver;notanoption=anything:localhost/dev/null"
+           dotest_fail parseroot-6r "$testcvs -d'$CVSROOT' logout" \
+"$CPROG logout: Unknown option (\`notanoption') in CVSROOT\.
+$CPROG \[logout aborted\]: Bad CVSROOT: 
\`:pserver;notanoption=anything:localhost/dev/null'\."
+           CVSROOT=":local;proxy=localhost:/dev/null"
+           dotest_fail parseroot-7r "$testcvs -d'$CVSROOT' logout" \
+"$CPROG logout: CVSROOT proxy specification is only valid for gserver and
+$CPROG logout: pserver connection methods\.
+$CPROG \[logout aborted\]: Bad CVSROOT: \`:local;proxy=localhost:/dev/null'\."
+           CVSROOT="::address@hidden@test.org:/cvs"
+           dotest_fail parseroot-8r "$testcvs -d'$CVSROOT' co test" \
+"$CPROG checkout: Unknown method (\`') in CVSROOT\.
+$CPROG \[checkout aborted\]: Bad CVSROOT: \`$CVSROOT'\."
+         fi
+
+         dokeep
+
+         # Clean up
+         CVSROOT=$CVSROOT_save
+         cd ..
+         rm -rf 1
+         ;;
+
+
+
+       files)
+         # Test of how we specify files on the command line
+         # (recurse.c and that sort of thing).  Vaguely similar to
+         # tests like basic* and deep.  See modules and such tests
+         # for what happens when we throw in modules and co -d, &c.
+
+         # This particular test is fairly carefully crafted, to spot
+         # one particular issue with remote.
+         mkdir 1; cd 1
+         dotest files-1 "${testcvs} -q co -l ." ""
+         mkdir first-dir
+         dotest files-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch tfile
+         dotest files-3 "${testcvs} add tfile" \
+"${SPROG} add: scheduling file .tfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest files-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/tfile,v  <--  tfile
+initial revision: 1\.1"
+         dotest files-5 "${testcvs} -q tag -b C" "T tfile"
+         dotest files-6 "${testcvs} -q update -r C" ""
+         mkdir dir
+         dotest files-7 "${testcvs} add dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository
+--> Using per-directory sticky tag .C'"
+         cd dir
+         touch .file
+         dotest files-7b "${testcvs} add .file" \
+"${SPROG} add: scheduling file .\.file' for addition on branch .C.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         mkdir sdir
+         dotest files-7c "${testcvs} add sdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository
+--> Using per-directory sticky tag .C'"
+         cd sdir
+         mkdir ssdir
+         dotest files-8 "${testcvs} add ssdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir added to the repository
+--> Using per-directory sticky tag .C'"
+         cd ssdir
+         touch .file
+         dotest files-9 "${testcvs} add .file" \
+"${SPROG} add: scheduling file .\.file' for addition on branch .C.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         cd ../..
+         dotest files-10 "${testcvs} -q ci -m test" \
+"$CVSROOT_DIRNAME/first-dir/dir/Attic/\.file,v  <--  \.file
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir/sdir/ssdir/Attic/\.file,v  <--  
sdir/ssdir/\.file
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         dotest files-11 \
+"${testcvs} commit -m test -f ./.file ./sdir/ssdir/.file" \
+"${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v  <--  \.file
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v  <--  
\./sdir/ssdir/\.file
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+         if $remote; then
+           # FIXCVS:
+           # This is a bug, looks like that toplevel_repos cruft in
+           # client.c is coming back to haunt us.
+           # May want to think about the whole issue, toplevel_repos
+           # has always been crufty and trying to patch it up again
+           # might be a mistake.
+           dotest files-12r \
+"$testcvs commit -f -m test ./sdir/ssdir/.file ./.file" \
+"$CVSROOT_DIRNAME/first-dir/dir/sdir/ssdir/Attic/\.file,v  <--  
\./sdir/ssdir/\.file
+new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2"
+
+           # Sync up the version numbers so that the rest of the
+           # tests don't need to expect different numbers based
+           # local or remote.
+           dotest files-12rworkaround \
+"$testcvs commit -f -m test .file" \
+"$CVSROOT_DIRNAME/first-dir/dir/Attic/\.file,v  <--  \.file
+new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2"
+         else
+           dotest files-12 \
+"${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file" \
+"${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v  <--  
\./sdir/ssdir/\.file
+new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v  <--  \.file
+new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2"
+         fi
+         dotest files-13 \
+"${testcvs} commit -fmtest ./sdir/../sdir/ssdir/..///ssdir/.file" \
+"${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v  <--  
\./sdir/\.\./sdir/ssdir/\.\.///ssdir/\.file
+new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3"
+         dotest files-14 \
+"${testcvs} commit -fmtest ../../first-dir/dir/.file" \
+"${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v  <--  
\.\./\.\./first-dir/dir/\.file
+new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3"
+
+         dokeep
+         cd ../../..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       spacefiles)
+         # More filename tests, in particular spaces in file names.
+         # (it might be better to just change a few of the names in
+         # basica or some other test instead, always good to keep the
+         # testsuite concise).
+
+         mkdir 1; cd 1
+         dotest spacefiles-1 "${testcvs} -q co -l ." ""
+         touch ./-c
+         dotest spacefiles-2 "${testcvs} add -- -c" \
+"${SPROG} add: scheduling file .-c. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest spacefiles-3 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/-c,v  <--  -c
+initial revision: 1\.1"
+         mkdir 'first dir'
+         dotest spacefiles-4 "${testcvs} add 'first dir'" \
+"Directory ${CVSROOT_DIRNAME}/first dir added to the repository"
+         mkdir ./-b
+         dotest spacefiles-5 "${testcvs} add -- -b" \
+"Directory ${CVSROOT_DIRNAME}/-b added to the repository"
+         cd 'first dir'
+         touch 'a file'
+         dotest spacefiles-6 "${testcvs} add 'a file'" \
+"${SPROG} add: scheduling file .a file. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest spacefiles-7 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first dir/a file,v  <--  a file
+initial revision: 1\.1"
+         dotest spacefiles-8 "${testcvs} -q tag new-tag" "T a file"
+         cd ../..
+
+         mkdir 2; cd 2
+         dotest spacefiles-10 "${testcvs} co -- -b" \
+"${SPROG} checkout: Updating -b"
+         dotest spacefiles-11 "${testcvs} -q co -- -c" "U \./-c"
+         rm ./-c
+         dotest spacefiles-13 "${testcvs} -q co 'first dir'" \
+"U first dir/a file"
+         cd ..
+
+         mkdir 3; cd 3
+         dotest spacefiles-14 "${testcvs} -q co 'first dir/a file'" \
+"U first dir/a file"
+         cd ..
+
+         rm -rf 1 2 3
+         modify_repo rm -rf "'$CVSROOT_DIRNAME/first dir'" \
+                            $CVSROOT_DIRNAME/-b $CVSROOT_DIRNAME/-c,v
+         ;;
+
+
+
+       commit-readonly)
+         mkdir 1; cd 1
+         module=x
+
+         : > junk
+         dotest commit-readonly-1 "$testcvs -Q import -m . $module X Y" ''
+         dotest commit-readonly-2 "$testcvs -Q co $module" ''
+         cd $module
+
+         file=m
+
+         # Include an rcs keyword to be expanded.
+         echo '$Id''$' > $file
+
+         dotest commit-readonly-3 "$testcvs add $file" \
+"$SPROG add: scheduling file .$file. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest commit-readonly-4 "$testcvs -Q ci -m . $file"
+
+         echo line2 >> $file
+         # Make the file read-only.
+         chmod a-w $file
+
+         dotest commit-readonly-5 "$testcvs -Q ci -m . $file"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/"$module"
+         ;;
+
+
+
+       status)
+               # This tests for a bug in the status command which failed to
+               # notice resolved conflicts.
+               mkdir status; cd status
+               dotest status-init-1 "$testcvs -q co -l ."
+               mkdir first-dir
+               dotest status-init-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+               cd first-dir
+               echo a line >tfile
+               dotest status-init-3 "${testcvs} add tfile" \
+"${SPROG} add: scheduling file .tfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+               dotest status-init-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/tfile,v  <--  tfile
+initial revision: 1\.1"
+               cd ..
+               dotest status-init-5 "${testcvs} -q co -dsecond-dir first-dir" \
+"U second-dir/tfile"
+               cd second-dir
+               echo some junk >>tfile
+               dotest status-init-6 "${testcvs} -q ci -maline" \
+"$CVSROOT_DIRNAME/first-dir/tfile,v  <--  tfile
+new revision: 1\.2; previous revision: 1\.1"
+               cd ../first-dir
+               echo force a conflict >>tfile
+               dotest status-init-7 "$testcvs -q up" \
+"Merging differences between 1\.1 and 1\.2 into \`tfile'
+$CPROG update: conflicts during merge
+C tfile"
+
+               # Now note our status
+               dotest status-1 "${testcvs} status tfile" \
+"===================================================================
+File: tfile                    Status: Unresolved Conflict
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/tfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+               # touch the file, leaving conflict markers in place
+               # and note our status
+               touch tfile
+               dotest status-2 "${testcvs} status tfile" \
+"===================================================================
+File: tfile                    Status: File had conflicts on merge
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/tfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+               # resolve the conflict
+               echo resolution >tfile
+               dotest status-3 "${testcvs} status tfile" \
+"===================================================================
+File: tfile                    Status: Locally Modified
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/tfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+               # Check that there are no problems just using CVS/Root too.
+               save_CVSROOT=$CVSROOT
+               unset CVSROOT
+               dotest status-3a "${testcvs} status tfile" \
+"===================================================================
+File: tfile                    Status: Locally Modified
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/tfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+               CVSROOT=$save_CVSROOT
+               export CVSROOT
+
+               # FIXCVS:
+               # Update is supposed to re-Register() the file when it
+               # finds resolved conflicts:
+               dotest status-4 "grep 'Result of merge' CVS/Entries" \
+"/tfile/1\.2/Result of merge${PLUS}[a-zA-Z0-9 :]*//"
+
+                cd ..
+                mkdir fourth-dir
+                dotest status-init-8 "$testcvs add fourth-dir" \
+"Directory $CVSROOT_DIRNAME/fourth-dir added to the repository"
+                cd fourth-dir
+                echo yet another line >t3file
+                dotest status-init-9 "$testcvs add t3file" \
+"$SPROG add: scheduling file .t3file. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+                dotest status-init-10 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/fourth-dir/t3file,v  <--  t3file
+initial revision: 1\.1"
+                cd ../first-dir
+                mkdir third-dir
+                dotest status-init-11 "$testcvs add third-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir/third-dir added to the repository"
+                cd third-dir
+                echo another line >t2file
+                dotest status-init-12 "$testcvs add t2file" \
+"$SPROG add: scheduling file .t2file. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+                dotest status-init-13 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/third-dir/t2file,v  <--  t2file
+initial revision: 1\.1"
+                dotest status-5 "$testcvs status ../tfile" \
+"===================================================================
+File: tfile                    Status: Locally Modified
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    $CVSROOT_DIRNAME/first-dir/tfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+                dotest status-6 "$testcvs status ../../fourth-dir/t3file" \
+"===================================================================
+File: t3file                   Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/fourth-dir/t3file,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+               dokeep
+               cd ../../..
+               rm -rf status
+               modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                                  $CVSROOT_DIRNAME/fourth-dir
+               ;;
+
+
+
+       commit-readonlyfs)
+         mkdir 1; cd 1
+         module=x
+         : > junk
+         dotest commit-readonlyfs-1 "${testcvs} -Q import -m . $module X Y" ''
+         if $remote; then
+           dotest_fail commit-readonlyfs-2r1 "${testcvs} -Q -R co $module" \
+"${CPROG} \[checkout aborted\]: Read-only repository feature unavailable with 
remote roots (cvsroot = ${CVSROOT_DIRNAME})"
+           dotest commit-readonlyfs-2r2 "${testcvs} -Q co $module" ''
+          else
+           dotest commit-readonlyfs-2 "${testcvs} -Q -R co $module" ''
+           rm -rf $module
+           dotest commit-readonlyfs-2r3 "${testcvs} -q -R co $module" \
+"U $module/junk"
+           rm -rf $module
+           dotest commit-readonlyfs-2r4 "${testcvs} -R co $module" \
+"${SPROG}: WARNING: Read-only repository access mode selected via \`cvs -R'\.
+Using this option to access a repository which some users write to may
+cause intermittent sandbox corruption\.
+${SPROG} checkout: Updating $module
+U $module/junk"
+          fi
+         cd $module
+         echo test > junk
+         if $remote; then
+           dotest_fail commit-readonlyfs-3r "${testcvs} -Q -R ci -m. junk" \
+"${SPROG} \[commit aborted\]: Read-only repository feature unavailable with 
remote roots (cvsroot = ${CVSROOT_DIRNAME})"
+         else
+           dotest_fail commit-readonlyfs-3 "${testcvs} -Q -R ci -m. junk" \
+"${SPROG} commit: write lock failed\.
+WARNING: Read-only repository access mode selected via \`cvs -R'\.
+Attempting to write to a read-only filesystem is not allowed\.
+${SPROG} \[commit aborted\]: lock failed - giving up"
+          fi
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/"$module"
+         ;;
+
+
+
+       rdiff)
+               # Test rdiff
+               # XXX for now this is just the most essential test...
+               cd ${TESTDIR}
+
+               mkdir testimport
+               cd testimport
+               echo '$''Id$' > foo
+               echo '$''Name$' >> foo
+               echo '$''Id$' > bar
+               echo '$''Name$' >> bar
+               dotest_sort rdiff-1 \
+                 "${testcvs} import -I ! -m test-import-with-keyword trdiff 
TRDIFF T1" \
+'
+
+N trdiff/bar
+N trdiff/foo
+No conflicts created by this import'
+               dotest rdiff-2 \
+                 "${testcvs} co -ko trdiff" \
+"${SPROG} checkout: Updating trdiff
+U trdiff/bar
+U trdiff/foo"
+               cd trdiff
+               echo something >> foo
+               dotest rdiff-3 "$testcvs -Q ci -m added-something foo"
+               echo '#ident    "@(#)trdiff:$''Name$:$''Id$"' > new
+               echo "new file" >> new
+               dotest rdiff-4 \
+                 "${testcvs} add -m new-file-description new" \
+"${SPROG} add: scheduling file \`new' for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+               dotest rdiff-5 "$testcvs -Q commit -m added-new-file new"
+               dotest rdiff-6 \
+                 "${testcvs} tag local-v0" \
+"${SPROG} tag: Tagging .
+T bar
+T foo
+T new"
+               dotest rdiff-7 \
+                 "${testcvs} status -v foo" \
+"===================================================================
+File: foo                      Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/trdiff/foo,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -ko
+
+   Existing Tags:
+       local-v0                        (revision: 1\.2)
+       T1                              (revision: 1\.1\.1\.1)
+       TRDIFF                          (branch: 1\.1\.1)"
+
+               cd ..
+               rm -rf trdiff
+
+               dotest rdiff-8 \
+                 "${testcvs} rdiff -r T1 -r local-v0 trdiff" \
+"${SPROG}"' rdiff: Diffing trdiff
+Index: trdiff/foo
+diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2
+\*\*\* trdiff/foo:1\.1\.1\.1   '"${DATE}"'
+--- trdiff/foo '"${DATE}"'
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1,2 \*\*\*\*
+! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$
+! \$''Name: T1 \$
+--- 1,3 ----
+! \$''Id: foo,v 1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$
+! \$''Name: local-v0 \$
+! something
+Index: trdiff/new
+diff -c /dev/null trdiff/new:1\.1
+\*\*\* /dev/null       '"${DATE}"'
+--- trdiff/new '"${DATE}"'
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1,2 ----
+'"${PLUS}"' #ident     "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 
[0-9/]* [0-9:]* '"${username}"' Exp \$"
+'"${PLUS}"' new file'
+
+               dokeep
+               cd ..
+               rm -r testimport
+               modify_repo rm -rf $CVSROOT_DIRNAME/trdiff
+               ;;
+
+
+
+       rdiff-short)
+         # Test that the short patch behaves as expected
+         #   1) Added file.
+         #   2) Removed file.
+         #   3) Different revision number with no difference.
+         #   4) Different revision number with changes.
+         #   5) Against trunk.
+         #   6) Same revision number (no difference).
+         mkdir rdiff-short; cd rdiff-short
+         mkdir abc
+         dotest rdiff-short-init-1 \
+"${testcvs} -q import -I ! -m initial-import abc vendor initial" \
+'
+No conflicts created by this import'
+
+         dotest rdiff-short-init-2 "${testcvs} -q get abc" ''
+         cd abc
+         echo "abc" >file1.txt
+         dotest rdiff-short-init-3 "${testcvs} add file1.txt" \
+"${SPROG} add: scheduling file .file1\.txt' for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest rdiff-short-init-4 \
+"${testcvs} commit -madd-file1 file1.txt" \
+"${CVSROOT_DIRNAME}/abc/file1\.txt,v  <--  file1\.txt
+initial revision: 1\.1"
+         echo def >>file1.txt
+         dotest rdiff-short-init-5 \
+"${testcvs} commit -mchange-file1 file1.txt" \
+"${CVSROOT_DIRNAME}/abc/file1\.txt,v  <--  file1\.txt
+new revision: 1\.2; previous revision: 1\.1"
+         echo "abc" >file1.txt
+         dotest rdiff-short-init-6 \
+"${testcvs} commit -mrestore-file1-rev1 file1.txt" \
+"${CVSROOT_DIRNAME}/abc/file1\.txt,v  <--  file1\.txt
+new revision: 1\.3; previous revision: 1\.2"
+         dotest rdiff-short-init-7 \
+"${testcvs} tag -r 1.1 tag1 file1.txt" \
+"T file1\.txt"
+         dotest rdiff-short-init-8 \
+"${testcvs} tag -r 1.2 tag2 file1.txt" \
+"T file1\.txt"
+         dotest rdiff-short-init-9 \
+"${testcvs} tag -r 1.3 tag3 file1.txt" \
+"T file1\.txt"
+         echo "abc" >file2.txt
+         dotest rdiff-short-init-10 \
+"${testcvs} add file2.txt" \
+"${SPROG} add: scheduling file .file2\.txt' for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest rdiff-add-remove-nodiff-init-11 \
+"${testcvs} commit -madd-file2 file2.txt" \
+"${CVSROOT_DIRNAME}/abc/file2\.txt,v  <--  file2\.txt
+initial revision: 1\.1"
+         dotest rdiff-short-init-12 \
+"${testcvs} tag -r 1.1 tag4 file2.txt" \
+"T file2\.txt"
+         dotest rdiff-short-init-13 \
+"${testcvs} tag -r 1.1 tag5 file2.txt" \
+"T file2\.txt"
+         cd ../..
+         rm -fr rdiff-short
+
+         # 3) Different revision number with no difference.
+         dotest rdiff-short-no-real-change \
+"${testcvs} -q rdiff -s -r tag1 -r tag3 abc"
+
+         # 4) Different revision number with changes.
+         dotest rdiff-short-real-change \
+"${testcvs} -q rdiff -s -r tag1 -r tag2 abc" \
+'File abc/file1.txt changed from revision 1\.1 to 1\.2'
+
+         # 1) Added file.
+         # 2) Removed file.
+         dotest_sort rdiff-short-remove-add \
+"${testcvs} -q rdiff -s -r tag2 -r tag4 abc" \
+'File abc/file1\.txt is removed; tag2 revision 1\.2
+File abc/file2\.txt is new; tag4 revision 1\.1'
+
+         # 6) Same revision number (no difference).
+         dotest rdiff-short-no-change \
+"${testcvs} -q rdiff -s -r tag4 -r tag5 abc"
+
+         # 5) Against trunk.
+         # Check that the messages change when we diff against the trunk
+         # rather than a tag or date.
+         dotest rdiff-short-against-trunk-1 \
+"${testcvs} -q rdiff -s -rtag4 abc" \
+"File abc/file1\.txt is new; current revision 1\.3"
+
+         dotest rdiff-short-against-trunk-2 \
+"${testcvs} -q rdiff -s -rtag2 abc" \
+"File abc/file1\.txt changed from revision 1\.2 to 1\.3
+File abc/file2\.txt is new; current revision 1\.1"
+
+         modify_repo rm -rf $CVSROOT_DIRNAME/abc
+         ;;
+
+
+
+       rdiff2)
+         # Test for the segv problem reported by James Cribb
+         # Somewhere to work
+         mkdir rdiff2; cd rdiff2         
+         # Create a module "m" with files "foo" and "d/bar"
+         mkdir m; cd m
+         echo foo >foo
+         mkdir d
+         echo bar >d/bar
+         dotest_sort  rdiff2-1 \
+"${testcvs} -q import -I ! -m initial-import m vendor initial" \
+'
+
+N m/d/bar
+N m/foo
+No conflicts created by this import'
+
+         cd ..
+         rm -r m
+         
+         # Remove "foo"
+         dotest rdiff2-2 "${testcvs} get m" \
+"${SPROG} checkout: Updating m
+U m/foo
+${SPROG} checkout: Updating m/d
+U m/d/bar"
+         cd m
+         dotest rdiff2-3 "${testcvs} rm -f foo" \
+"${SPROG} remove: scheduling .foo. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+
+         dotest rdiff2-4 "${testcvs} commit -m Removed foo" \
+"${CVSROOT_DIRNAME}/m/foo,v  <--  foo
+new revision: delete; previous revision: 1\.1\.1\.1"
+
+         # Modify "d/bar"
+         echo foo >d/bar
+         dotest rdiff2-5 "${testcvs} commit -m Changed d/bar" \
+"${CVSROOT_DIRNAME}/m/d/bar,v  <--  d/bar
+new revision: 1\.2; previous revision: 1\.1"
+         
+         # Crash before showing d/bar diffs
+         dotest_fail rdiff2-6 "${testcvs} rdiff -t m" \
+"${SPROG} rdiff: Diffing m
+${SPROG} rdiff: Diffing m/d
+Index: m/d/bar
+diff -c m/d/bar:1\.1\.1\.1 m/d/bar:1\.2
+\*\*\* m/d/bar:1\.1\.1\.1      ${DATE}
+--- m/d/bar    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+! bar
+--- 1 ----
+! foo"
+
+         dokeep
+         cd ../..
+         rm -rf rdiff2
+         modify_repo rm -rf $CVSROOT_DIRNAME/m
+         ;;
+
+
+
+       diff)
+         # Various tests specific to the "cvs diff" command.
+         # Related tests:
+         #   death2: -N
+         #   rcslib: cvs diff and $Name.
+         #   rdiff: cvs rdiff.
+         #   diffmerge*: nuts and bolts (stuff within diff library)
+         mkdir 1; cd 1
+         dotest diff-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest diff-2 "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+         cd first-dir
+
+         # diff is anomalous.  Most CVS commands print the "nothing
+         # known" message (or worse yet, no message in some cases) but
+         # diff says "I know nothing".  Shrug.
+         dotest_fail diff-3 "${testcvs} diff xyzpdq" \
+"${SPROG} diff: I know nothing about xyzpdq"
+         touch abc
+         dotest diff-4 "${testcvs} add abc" \
+"${SPROG} add: scheduling file .abc. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest diff-5 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/abc,v  <--  abc
+initial revision: 1\.1"
+         echo "extern int gethostname ();" >abc
+         dotest diff-6 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/abc,v  <--  abc
+new revision: 1\.2; previous revision: 1\.1"
+         echo "#include <winsock.h>" >abc
+         # check the behavior of the --ifdef=MACRO option
+         dotest_fail diff-7 "${testcvs} -q diff --ifdef=HAVE_WINSOCK_H" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.2
+diff --ifdef HAVE_WINSOCK_H -r1\.2 abc
+#ifndef HAVE_WINSOCK_H
+extern int gethostname ();
+#else /\* HAVE_WINSOCK_H \*/
+#include <winsock\.h>
+#endif /\* HAVE_WINSOCK_H \*/"
+
+         dokeep
+         cd ../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -r 1
+         ;;
+
+
+
+       diffnl)
+         # Test handling of 'cvs diff' of files without newlines
+         mkdir 1; cd 1
+         dotest diffnl-000 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest diffnl-001 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+
+         ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nfive\nsix")}' 
</dev/null >abc
+         dotest diffnl-002 "${testcvs} add abc" \
+"${SPROG} add: scheduling file .abc. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+          dotest diffnl-003 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/abc,v  <--  abc
+initial revision: 1\.1"
+
+         # change to line near EOF
+         ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nsix")}' </dev/null >abc
+         dotest_fail diffnl-100 "${testcvs} diff abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.1
+diff -r1\.1 abc
+5d4
+< five"
+          dotest_fail diffnl-101 "${testcvs} diff -u abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.1
+diff -u -r1\.1 abc
+--- abc        ${RFCDATE}      1\.1
++++ abc        ${RFCDATE}
+@@ -2,5 +2,4 @@
+ two
+ three
+ four
+-five
+ six
+\\\\ No newline at end of file"
+          dotest diffnl-102 "${testcvs} -q ci -mtest abc" \
+"$CVSROOT_DIRNAME/first-dir/abc,v  <--  abc
+new revision: 1\.2; previous revision: 1\.1"
+
+          # Change to last line
+         ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev/null 
>abc
+          dotest_fail diffnl-200 "${testcvs} diff abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.2
+diff -r1\.2 abc
+5c5
+< six
+\\\\ No newline at end of file
+---
+> seven
+\\\\ No newline at end of file"
+         dotest_fail diffnl-201 "${testcvs} diff -u abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.2
+diff -u -r1\.2 abc
+--- abc        ${RFCDATE}      1\.2
++++ abc        ${RFCDATE}
+@@ -2,4 +2,4 @@
+ two
+ three
+ four
+-six
+\\\\ No newline at end of file
++seven
+\\\\ No newline at end of file"
+         dotest diffnl-202 "${testcvs} ci -mtest abc" \
+"${CVSROOT_DIRNAME}/first-dir/abc,v  <--  abc
+new revision: 1\.3; previous revision: 1\.2"
+
+         # Addition of newline
+         echo "one
+two
+three
+four
+seven" > abc
+         dotest_fail diffnl-300 "${testcvs} diff abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.3
+diff -r1\.3 abc
+5c5
+< seven
+\\\\ No newline at end of file
+---
+> seven"
+         dotest_fail diffnl-301 "${testcvs} diff -u abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.3
+diff -u -r1\.3 abc
+--- abc        ${RFCDATE}      1\.3
++++ abc        ${RFCDATE}
+@@ -2,4 +2,4 @@
+ two
+ three
+ four
+-seven
+\\\\ No newline at end of file
++seven"
+         dotest diffnl-302 "${testcvs} ci -mtest abc" \
+"${CVSROOT_DIRNAME}/first-dir/abc,v  <--  abc
+new revision: 1\.4; previous revision: 1\.3"
+
+         # Removal of newline
+         ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev/null 
>abc
+         dotest_fail diffnl-400 "${testcvs} diff abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.4
+diff -r1\.4 abc
+5c5
+< seven
+---
+> seven
+\\\\ No newline at end of file"
+         dotest_fail diffnl-401 "${testcvs} diff -u abc" \
+"Index: abc
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
+retrieving revision 1\.4
+diff -u -r1\.4 abc
+--- abc        ${RFCDATE}      1\.4
++++ abc        ${RFCDATE}
+@@ -2,4 +2,4 @@
+ two
+ three
+ four
+-seven
++seven
+\\\\ No newline at end of file"
+
+         dokeep
+         cd ../..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       death)
+               # next dive.  test death support.
+
+               # NOTE: this section has reached the size and
+               # complexity where it is getting to be a good idea to
+               # add new death support tests to a new section rather
+               # than continuing to piggyback them onto the tests here.
+
+               modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+               dotest death-init-1 "$testcvs -Q co first-dir"
+
+               cd first-dir
+
+               # Create a directory with only dead files, to make sure CVS
+               # doesn't get confused by it.
+               mkdir subdir
+               dotest 65a0 "${testcvs} add subdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
+               cd subdir
+               echo file in subdir >sfile
+               dotest 65a1 "${testcvs} add sfile" \
+"${SPROG}"' add: scheduling file `sfile'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+               dotest 65a2 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/subdir/sfile,v  <--  sfile
+initial revision: 1\.1"
+               rm sfile
+               dotest 65a3 "${testcvs} rm sfile" \
+"${SPROG}"' remove: scheduling `sfile'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
+               dotest 65a4 "${testcvs} -q ci -m remove-it" \
+"$CVSROOT_DIRNAME/first-dir/subdir/sfile,v  <--  sfile
+new revision: delete; previous revision: 1\.1"
+               cd ..
+               dotest 65a5 "${testcvs} -q update -P" ''
+               dotest_fail 65a6 "test -d subdir" ''
+
+               # add a file.
+               touch file1
+               if ${CVS} add file1  2>> ${LOGFILE}; then
+                   pass 66
+               else
+                   fail 66
+               fi
+
+               # commit
+               if ${CVS} ci -m test  >> ${LOGFILE} 2>&1; then
+                   pass 67
+               else
+                   fail 67
+               fi
+
+               # remove
+               rm file1
+               if ${CVS} rm file1  2>> ${LOGFILE}; then
+                   pass 68
+               else
+                   fail 68
+               fi
+
+               # commit
+               if ${CVS} ci -m test  >>${LOGFILE} ; then
+                   pass 69
+               else
+                   fail 69
+               fi
+
+               dotest_fail 69a0 "test -f file1" ''
+               # get the old contents of file1 back
+               if ${testcvs} update -p -r 1.1 file1 >file1 2>>${LOGFILE}; then
+                 pass 69a1
+               else
+                 fail 69a1
+               fi
+               dotest 69a2 "cat file1" ''
+
+               # create second file
+               touch file2
+               if ${CVS} add file1 file2  2>> ${LOGFILE}; then
+                   pass 70
+               else
+                   fail 70
+               fi
+
+               # commit
+               if ${CVS} ci -m test  >> ${LOGFILE} 2>&1; then
+                   pass 71
+               else
+                   fail 71
+               fi
+
+               # log
+               if ${CVS} log file1  >> ${LOGFILE}; then
+                   pass 72
+               else
+                   fail 72
+               fi
+
+               # file4 will be dead at the time of branching and stay dead.
+               echo file4 > file4
+               dotest death-file4-add "${testcvs} add file4" \
+"${SPROG}"' add: scheduling file `file4'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+               dotest death-file4-ciadd "${testcvs} -q ci -m add file4" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+initial revision: 1\.1"
+               rm file4
+               dotest death-file4-rm "${testcvs} remove file4" \
+"${SPROG}"' remove: scheduling `file4'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
+               dotest death-file4-cirm "${testcvs} -q ci -m remove file4" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: delete; previous revision: 1\.1"
+
+               # Tag the branchpoint.
+               dotest death-72a "${testcvs} -q tag bp_branch1" 'T file1
+T file2'
+
+               # branch1
+               if ${CVS} tag -b branch1  ; then
+                   pass 73
+               else
+                   fail 73
+               fi
+
+               # and move to the branch.
+               if ${CVS} update -r branch1  ; then
+                   pass 74
+               else
+                   fail 74
+               fi
+
+               dotest_fail death-file4-3 "test -f file4" ''
+
+               # add a file in the branch
+               echo line1 from branch1 >> file3
+               if ${CVS} add file3  2>> ${LOGFILE}; then
+                   pass 75
+               else
+                   fail 75
+               fi
+
+               # commit
+               if ${CVS} ci -m test  >> ${LOGFILE} 2>&1; then
+                   pass 76
+               else
+                   fail 76
+               fi
+
+               dotest death-76a0 \
+"${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \
+"Index: first-dir/file3
+diff -c /dev/null first-dir/file3:1\.1\.2\.1
+\*\*\* /dev/null       ${DATE}
+--- first-dir/file3    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
+${PLUS} line1 from branch1"
+               dotest death-76a1 \
+"${testcvs} -q rdiff -r branch1 -r bp_branch1 first-dir" \
+"Index: first-dir/file3
+diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed
+\*\*\* first-dir/file3:1\.1\.2\.1      ${DATE}
+--- first-dir/file3    ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- line1 from branch1
+--- 0 ----"
+
+               # remove
+               rm file3
+               if ${CVS} rm file3  2>> ${LOGFILE}; then
+                   pass 77
+               else
+                   fail 77
+               fi
+
+               # commit
+               if ${CVS} ci -m test  >>${LOGFILE} ; then
+                   pass 78
+               else
+                   fail 78
+               fi
+
+               # add again
+               echo line1 from branch1 >> file3
+               if ${CVS} add file3  2>> ${LOGFILE}; then
+                   pass 79
+               else
+                   fail 79
+               fi
+
+               # commit
+               dotest death-80 "$testcvs -Q ci -m test"
+
+               # change the first file
+               echo line2 from branch1 >> file1
+
+               # commit
+               dotest death-81 "$testcvs -Q ci -m test"
+
+               # remove the second
+               rm file2
+               dotest death-82 "$testcvs -Q rm file2"
+
+               # commit
+               dotest death-83 "$testcvs -Q ci -m test"
+
+               # back to the trunk.
+               dotest death-84 "$testcvs -Q update -A"
+
+               dotest_fail death-file4-4 "test -f file4" ''
+
+               dotest_fail death-85 "test -f file3"
+
+               # join
+               dotest death-86 "$testcvs -q update -j branch1" \
+"$SPROG update: Replacing \`file1' with contents of revision 1\.3\.2\.1\.
+M file1
+$SPROG update: scheduling \`file2' for removal
+$SPROG update: scheduling addition from revision 1\.1\.2\.3 of \`file3'\."
+               dotest_fail death-file4-5 "test -f file4"
+
+               dotest death-87 "test -f file3"
+
+               # Make sure that we joined the correct change to file1
+               dotest death-87a "echo line2 from branch1 |$diff_u - file1"
+
+               # update
+               dotest death-88 "$testcvs -q update" \
+"M file1
+R file2
+A file3"
+
+               # commit
+               dotest death-89 "$testcvs -q ci -m test" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.4; previous revision: 1\.3
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+new revision: 1\.2; previous revision: 1\.1"
+               cd ..
+               mkdir 2
+               cd 2
+               dotest death-89a "$testcvs -q co first-dir" \
+'U first-dir/file1
+U first-dir/file3'
+               cd ..
+               rm -rf 2
+               cd first-dir
+
+               # remove first file.
+               rm file1
+               dotest death-90 "$testcvs -Q rm file1"
+
+               # commit
+               dotest death-91 "$testcvs -Q ci -m test"
+               dotest_fail death-92 "test -f file1"
+
+               # typo; try to get to the branch and fail
+               dotest_fail 92.1a "$testcvs update -r brnach1" \
+                 "$SPROG \[update aborted\]: no such tag \`brnach1'"
+               # Make sure we are still on the trunk
+               dotest_fail death-92.1b "test -f file1"
+               dotest death-92.1c "test -f file3"
+
+               # back to branch1
+               dotest death-93 "$testcvs -q update -r branch1" \
+"U file1
+U file3"
+
+               dotest_fail death-file4-6 "test -f file4"
+               dotest death-94 "test -f file1"
+
+               # and join
+               dotest death-95 "$testcvs -q update -j HEAD" \
+"$SPROG update: file file1 has been modified, but has been removed in revision 
HEAD
+$SPROG update: file file3 exists, but has been added in revision HEAD"
+
+               dotest_fail death-file4-7 "test -f file4"
+
+               # file2 should not have been recreated.  It was
+               # deleted on the branch, and has not been modified on
+               # the trunk.  That means that there have been no
+               # changes between the greatest common ancestor (the
+               # trunk version) and HEAD.
+               dotest_fail death-file2-1 "test -f file2"
+
+               dokeep
+               cd ..
+               rm -rf first-dir
+               modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+               ;;
+
+
+
+       death2)
+         # More tests of death support.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest death2-1 "$testcvs -q co first-dir"
+
+         cd first-dir
+
+         # Add two files on the trunk.
+         echo "first revision" > file1
+         echo "file4 first revision" > file4
+         dotest death2-2 "${testcvs} add file1 file4" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: scheduling file `file4'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+
+         dotest death2-3 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+initial revision: 1\.1"
+
+         # Make a branch and a non-branch tag.
+         dotest death2-4 "${testcvs} -q tag -b branch" \
+'T file1
+T file4'
+         dotest death2-5 "${testcvs} -q tag tag" \
+'T file1
+T file4'
+
+         # Switch over to the branch.
+         dotest death2-6 "${testcvs} -q update -r branch" ''
+
+         # Delete the file on the branch.
+         rm file1
+         dotest death2-7 "${testcvs} rm file1" \
+"${SPROG} remove: scheduling .file1. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+
+         # Test diff of the removed file before it is committed.
+         dotest_fail death2-diff-1 "${testcvs} -q diff file1" \
+"${SPROG} diff: file1 was removed, no comparison available"
+
+         dotest_fail death2-diff-2 "${testcvs} -q diff -N -c file1" \
+"Index: file1
+===================================================================
+RCS file: file1
+diff -N file1
+\*\*\* file1   ${RFCDATE}      [0-9.]*
+--- /dev/null  ${RFCDATE_EPOCH}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- first revision
+--- 0 ----"
+
+         dotest death2-8 "${testcvs} -q ci -m removed" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.1"
+
+         # Test diff of a dead file.
+         dotest_fail death2-diff-3 \
+"${testcvs} -q diff -r1.1 -rbranch -c file1" \
+"${SPROG} diff: Tag branch refers to a dead (removed) revision in file 
.file1.\.
+${SPROG} diff: No comparison available\.  Pass .-N. to .${SPROG} 
diff.${QUESTION}"
+         # and in reverse
+         dotest_fail death2-diff-3a \
+"${testcvs} -q diff -rbranch -r1.1 -c file1" \
+"${SPROG} diff: Tag branch refers to a dead (removed) revision in file 
.file1.\.
+${SPROG} diff: No comparison available\.  Pass .-N. to .${SPROG} 
diff.${QUESTION}"
+
+         dotest_fail death2-diff-4 \
+"${testcvs} -q diff -r1.1 -rbranch -N -c file1" \
+"Index: file1
+===================================================================
+RCS file: file1
+diff -N file1
+\*\*\* file1   ${RFCDATE}      [0-9.]*
+--- /dev/null  ${RFCDATE_EPOCH}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- first revision
+--- 0 ----"
+         # and in reverse
+         dotest_fail death2-diff-4a \
+"${testcvs} -q diff -rbranch -r1.1 -N -c file1" \
+"Index: file1
+===================================================================
+RCS file: file1
+diff -N file1
+\*\*\* /dev/null       ${RFCDATE_EPOCH}
+--- file1      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
++ first revision"
+
+
+         dotest_fail death2-diff-5 "${testcvs} -q diff -rtag -c ." \
+"${SPROG} diff: file1 no longer exists, no comparison available"
+
+         dotest_fail death2-diff-6 "${testcvs} -q diff -rtag -N -c ." \
+"Index: file1
+===================================================================
+RCS file: file1
+diff -N file1
+\*\*\* file1   [-a-zA-Z0-9: ]* [0-9.]*
+--- /dev/null  ${RFCDATE_EPOCH}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- first revision
+--- 0 ----"
+
+         # Test rdiff of a dead file.
+         dotest death2-rdiff-1 \
+"${testcvs} -q rtag -rbranch rdiff-tag first-dir" ''
+
+         dotest death2-rdiff-2 "${testcvs} -q rdiff -rtag -rbranch first-dir" \
+"Index: first-dir/file1
+diff -c first-dir/file1:1\.1 first-dir/file1:removed
+\*\*\* first-dir/file1:1\.1    [a-zA-Z0-9: ]*
+--- first-dir/file1    [a-zA-Z0-9: ]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- first revision
+--- 0 ----"
+
+         # Readd the file to the branch.
+         echo "second revision" > file1
+         dotest death2-9 "${testcvs} add file1" \
+"${SPROG} add: Re-adding file \`file1' on branch \`branch' after dead revision 
1\.1\.2\.1\.
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+
+         # Test diff of the added file before it is committed.
+         dotest_fail death2-diff-7 "${testcvs} -q diff file1" \
+"${SPROG} diff: file1 is a new entry, no comparison available"
+
+         dotest_fail death2-diff-8 "${testcvs} -q diff -N -c file1" \
+"Index: file1
+===================================================================
+RCS file: file1
+diff -N file1
+\*\*\* /dev/null       ${RFCDATE_EPOCH}
+--- file1      ${RFCDATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
+${PLUS} second revision"
+
+         dotest death2-10 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+
+         # Delete file4 from the branch
+         dotest death2-10a "${testcvs} rm -f file4" \
+"${SPROG} remove: scheduling .file4. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest death2-10b "${testcvs} -q ci -m removed" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: delete; previous revision: 1\.1"
+
+         # Back to the trunk.
+         dotest death2-11 "${testcvs} -q update -A" \
+"U file1
+U file4"
+
+         # Add another file on the trunk.
+         echo "first revision" > file2
+         dotest death2-12 "${testcvs} add file2" \
+"${SPROG}"' add: scheduling file `file2'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest death2-13 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+         # Modify file4 on the trunk.
+         echo "new file4 revision" > file4
+         dotest death2-13a "${testcvs} -q commit -m mod" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.2; previous revision: 1\.1"
+
+         # Back to the branch.
+         # The ``no longer in the repository'' message doesn't really
+         # look right to me, but that's what CVS currently prints for
+         # this case.
+         dotest death2-14 "${testcvs} -q update -r branch" \
+"U file1
+${SPROG} update: \`file2' is no longer in the repository
+${SPROG} update: \`file4' is no longer in the repository"
+
+         # Add a file on the branch with the same name.
+         echo "branch revision" > file2
+         dotest death2-15 "${testcvs} add file2" \
+"${SPROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest death2-16 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+
+         # Add a new file on the branch.
+         echo "first revision" > file3
+         dotest death2-17 "${testcvs} add file3" \
+"${SPROG}"' add: scheduling file `file3'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest death2-18 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/Attic/file3,v  <--  file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # Test diff of a nonexistent tag
+         dotest_fail death2-diff-9 "$testcvs -q diff -rtag -c file3" \
+"$SPROG diff: tag tag is not in file file3"
+
+         dotest_fail death2-diff-10 "${testcvs} -q diff -rtag -N -c file3" \
+"Index: file3
+===================================================================
+RCS file: file3
+diff -N file3
+\*\*\* /dev/null       ${RFCDATE_EPOCH}
+--- file3      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
+${PLUS} first revision"
+
+         dotest_fail death2-diff-11 "${testcvs} -q diff -rtag -c ." \
+"Index: file1
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+retrieving revision 1\.1
+retrieving revision 1\.1\.2\.2
+diff -c -r1\.1 -r1\.1\.2\.2
+\*\*\* file1   ${RFCDATE}      [0-9.]*
+--- file1      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+! first revision
+--- 1 ----
+! second revision
+${SPROG} diff: tag tag is not in file file2
+${SPROG} diff: tag tag is not in file file3
+${SPROG} diff: file4 no longer exists, no comparison available"
+
+         dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \
+"Index: file1
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+retrieving revision 1\.1
+retrieving revision 1\.1\.2\.2
+diff -c -r1\.1 -r1\.1\.2\.2
+\*\*\* file1   ${RFCDATE}      [0-9.]*
+--- file1      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+! first revision
+--- 1 ----
+! second revision
+Index: file2
+===================================================================
+RCS file: file2
+diff -N file2
+\*\*\* /dev/null       ${RFCDATE_EPOCH}
+--- file2      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
+${PLUS} branch revision
+Index: file3
+===================================================================
+RCS file: file3
+diff -N file3
+\*\*\* /dev/null       ${RFCDATE_EPOCH}
+--- file3      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
+${PLUS} first revision
+Index: file4
+===================================================================
+RCS file: file4
+diff -N file4
+\*\*\* file4   ${RFCDATE}      [0-9.]*
+--- /dev/null  ${RFCDATE_EPOCH}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file4 first revision
+--- 0 ----"
+
+         # Switch to the nonbranch tag.
+         dotest death2-19 "${testcvs} -q update -r tag" \
+"U file1
+${SPROG} update: \`file2' is no longer in the repository
+${SPROG} update: \`file3' is no longer in the repository
+U file4"
+
+         dotest_fail death2-20 "test -f file2"
+
+         # Make sure diff only reports appropriate files.
+         dotest_fail death2-diff-13 "${testcvs} -q diff -r rdiff-tag" \
+"${SPROG} diff: Tag rdiff-tag refers to a dead (removed) revision in file 
.file1.\.
+${SPROG} diff: No comparison available\.  Pass .-N. to .${SPROG} 
diff.${QUESTION}"
+
+         dotest_fail death2-diff-14 "${testcvs} -q diff -r rdiff-tag -c -N" \
+"Index: file1
+===================================================================
+RCS file: file1
+diff -N file1
+\*\*\* /dev/null       ${RFCDATE_EPOCH}
+--- file1      ${RFCDATE}      [0-9.]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 0 \*\*\*\*
+--- 1 ----
+${PLUS} first revision"
+
+         # now back to the trunk
+         dotest death2-21 "${testcvs} -q update -A" \
+"U file2
+U file4"
+
+         # test merging with a dead file
+         dotest death2-22 "${testcvs} -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2
+U first-dir/file4"
+
+         cd first-dir
+         dotest death2-23 "${testcvs} rm -f file4" \
+"${SPROG} remove: scheduling .file4. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest death2-24 "${testcvs} -q ci -m removed file4" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: delete; previous revision: 1\.2"
+         cd ..
+         echo "new stuff" >file4
+         dotest_fail death2-25 "${testcvs} up file4" \
+"${SPROG} update: conflict: \`file4' is modified but no longer in the 
repository
+C file4"
+
+         dokeep
+         cd ..
+         rm -rf first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       rm-update-message)
+         # FIXME
+         # local CVS prints a warning message when update notices a missing
+         # file and client/server CVS doesn't.  These should be identical.
+         mkdir rm-update-message; cd rm-update-message
+         modify_repo mkdir $CVSROOT_DIRNAME/rm-update-message
+         dotest rm-update-message-setup-1 "$testcvs -q co rm-update-message" ''
+         cd rm-update-message
+         file=x
+         echo >$file
+         dotest rm-update-message-setup-2 "$testcvs -q add $file" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest rm-update-message-setup-3 "$testcvs -q ci -mcreate $file" \
+"$CVSROOT_DIRNAME/rm-update-message/$file,v  <--  $file
+initial revision: 1\.1"
+
+         rm $file
+         dotest rm-update-message-1 "$testcvs up $file" \
+"${SPROG} update: warning: \`$file' was lost
+U $file"
+
+         dokeep
+         cd ../..
+         rm -rf rm-update-message
+         modify_repo rm -rf $CVSROOT_DIRNAME/rm-update-message
+         ;;
+
+
+
+       rmadd)
+         # More tests of adding and removing files.
+         # In particular ci -r.
+         # Other ci -r tests:
+         #   * editor-9: checking in a modified file,
+         #     where "ci -r" means a branch.
+         #   * basica-8a1: checking in a modified file with numeric revision.
+         #   * basica-8a2: likewise.
+         #   * keywordlog-4: adding a new file with numeric revision.
+         mkdir 1; cd 1
+         dotest rmadd-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest rmadd-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         echo first file1 >file1
+         dotest rmadd-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         dotest_fail rmadd-4 "${testcvs} -q ci -r 1.2.2.4 -m add" \
+"${SPROG} commit: cannot add file .file1' with revision .1\.2\.2\.4'; must be 
on trunk
+${SPROG} \[commit aborted\]: correct above errors first!"
+         dotest_fail rmadd-5 "${testcvs} -q ci -r 1.2.2 -m add" \
+"${SPROG} commit: cannot add file .file1' with revision .1\.2\.2'; must be on 
trunk
+${SPROG} \[commit aborted\]: correct above errors first!"
+         dotest_fail rmadd-6 "$testcvs -q ci -r mybranch -m add" \
+"$SPROG \[commit aborted\]: no such tag \`mybranch'"
+
+         # The thing with the trailing periods strikes me as a very
+         # bizarre behavior, but it would seem to be intentional
+         # (see commit.c).  It probably could go away....
+         dotest rmadd-7 "${testcvs} -q ci -r 7.... -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 7\.1"
+         if $remote; then
+           # I guess remote doesn't set a sticky tag in this case.
+           # Kind of odd, in the sense that rmadd-24a does set one
+           # both local and remote.
+           dotest_fail rmadd-7a "test -f CVS/Tag"
+           echo T7 >CVS/Tag
+         else
+           dotest rmadd-7a "cat CVS/Tag" "T7"
+         fi
+
+         dotest rmadd-8 "${testcvs} -q tag -b mybranch" "T file1"
+         dotest rmadd-9 "${testcvs} -q tag mynonbranch" "T file1"
+
+         touch file2
+         # The previous "cvs ci -r" set a sticky tag of '7'.  Seems a
+         # bit odd, and I guess commit.c (findmaxrev) makes '7' sticky
+         # tags unnecessary (?).  I kind of suspect that it should be
+         # saying "sticky tag is not a branch" like keywordlog-4b.
+         # Or something.
+         dotest rmadd-10 "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition on branch .7'
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         # As in the previous example, CVS is confused....
+         dotest rmadd-11 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 7\.1"
+
+         dotest rmadd-12 "${testcvs} -q update -A" ""
+         touch file3
+         dotest rmadd-13 "${testcvs} add file3" \
+"${SPROG} add: scheduling file .file3. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         # Huh?  file2 is not up to date?  Seems buggy to me....
+         dotest_fail rmadd-14 "${testcvs} -q ci -r mybranch -m add" \
+"${SPROG} commit: Up-to-date check failed for .file2'
+${SPROG} \[commit aborted\]: correct above errors first!"
+         # Whatever, let's not let file2 distract us....
+         dotest rmadd-15 "${testcvs} -q ci -r mybranch -m add file3" \
+"$CVSROOT_DIRNAME/first-dir/Attic/file3,v  <--  file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         touch file4
+         dotest rmadd-16 "${testcvs} add file4" \
+"${SPROG} add: scheduling file .file4. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         # Prior to CVS 1.12.10, this would fail with a, "no such tag" message
+         # since val-tags used to be updated the first time the tag was used
+         # rather than when it was created.
+
+         # Try to make CVS write val-tags.
+         if $proxy; then :; else
+           # First remove the tag.
+           grep -v mynonbranch $CVSROOT_DIRNAME/CVSROOT/val-tags \
+                >$CVSROOT_DIRNAME/CVSROOT/val-tags-tmp
+           mv $CVSROOT_DIRNAME/CVSROOT/val-tags-tmp \
+              $CVSROOT_DIRNAME/CVSROOT/val-tags
+
+           dotest rmadd-18 "$testcvs -q update -p -r mynonbranch file1" \
+"first file1"
+           # Oops, -p suppresses writing val-tags (probably a questionable
+           # behavior).
+           dotest_fail rmadd-19 \
+"$testcvs -q ci -r mynonbranch -m add file4" \
+"$SPROG \[commit aborted\]: no such tag \`mynonbranch'"
+           # Now make CVS write val-tags for real.
+           dotest rmadd-20 "$testcvs -q update -r mynonbranch file1"
+         fi # !$proxy
+
+         # Oops - CVS isn't distinguishing between a branch tag and
+         # a non-branch tag.
+         dotest rmadd-21 \
+"${testcvs} -q ci -r mynonbranch -m add file4" \
+"$CVSROOT_DIRNAME/first-dir/Attic/file4,v  <--  file4
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # OK, we add this one in a vanilla way, but then check in
+         # a modification with ci -r and sniff around for sticky tags.
+         echo file5 >file5
+         dotest rmadd-22 "${testcvs} add file5" \
+"${SPROG} add: scheduling file .file5. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         if $remote; then
+           # Interesting bug (or missing feature) here.  findmaxrev
+           # gets the major revision from the Entries.  Well, remote
+           # doesn't send the entries for files which are not involved.
+           dotest rmadd-23r "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+initial revision: 1\.1"
+           dotest rmadd-23-workaroundr \
+"${testcvs} -q ci -r 7 -m bump-it file5" \
+"$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+new revision: 7\.1; previous revision: 1\.1"
+         else
+           dotest rmadd-23 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+initial revision: 7\.1"
+         fi
+         echo change it >file5
+         dotest_fail rmadd-24 "$testcvs -q ci -r 4.8 -m change file5" \
+"$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+$SPROG commit: $CVSROOT_DIRNAME/first-dir/file5,v: revision 4\.8 too low; must 
be higher than 7\.1
+$SPROG commit: could not check in file5"
+         dotest rmadd-24a "${testcvs} -q ci -r 8.4 -m change file5" \
+"$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+new revision: 8\.4; previous revision: 7\.1"
+         # I'm not really sure that a sticky tag make sense here.
+         # It seems to be longstanding behavior for what that is worth.
+         dotest rmadd-25 "${testcvs} status file5" \
+"===================================================================
+File: file5                    Status: Up-to-date
+
+   Working revision:   8\.4.*
+   Repository revision:        8\.4    ${CVSROOT_DIRNAME}/first-dir/file5,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         8\.4
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         # now try forced revision with recursion
+         mkdir sub
+         dotest rmadd-26 "${testcvs} -q add sub" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sub added to the repository"
+         echo hello >sub/subfile
+         dotest rmadd-27 "${testcvs} -q add sub/subfile" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         dotest rmadd-28 "${testcvs} -q ci -m. sub" \
+"$CVSROOT_DIRNAME/first-dir/sub/subfile,v  <--  sub/subfile
+initial revision: 1\.1"
+
+         # lose the branch
+         dotest rmadd-29 "${testcvs} -q up -A" \
+"${SPROG} update: \`file3' is no longer in the repository
+${SPROG} update: \`file4' is no longer in the repository"
+
+         # -f disables recursion
+         dotest rmadd-30 "${testcvs} -q ci -f -r9 -m." \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 9\.1; previous revision: 7\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 9\.1; previous revision: 7\.1
+$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+new revision: 9\.1; previous revision: 8\.4"
+
+         # add -R to force recursion
+         dotest rmadd-31 "${testcvs} -q ci -f -r9 -R -m." \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 9\.2; previous revision: 9\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 9\.2; previous revision: 9\.1
+$CVSROOT_DIRNAME/first-dir/file5,v  <--  file5
+new revision: 9\.2; previous revision: 9\.1
+$CVSROOT_DIRNAME/first-dir/sub/subfile,v  <--  sub/subfile
+new revision: 9\.1; previous revision: 1\.1"
+
+         if $remote; then
+           # as noted above, remote doesn't set a sticky tag
+           :
+         else
+           dotest rmadd-32 "cat CVS/Tag" "T9"
+           dotest rmadd-33 "cat sub/CVS/Tag" "T9"
+         fi
+
+         dokeep
+         cd ../..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       rmadd2)
+         # Tests of undoing commits, including in the presence of
+         # adding and removing files.  See join for a list of -j tests.
+         mkdir 1; cd 1
+         dotest rmadd2-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest rmadd2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         echo 'initial contents' >file1
+         dotest rmadd2-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest rmadd2-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest rmadd2-4a "${testcvs} -Q tag tagone" ""
+         dotest rmadd2-5 "${testcvs} rm -f file1" \
+"${SPROG} remove: scheduling .file1. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest rmadd2-6 "${testcvs} -q ci -m remove" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.1"
+         dotest rmadd2-7 "$testcvs -q update -j 1.2 -j 1.1 file1" \
+"$SPROG update: scheduling addition from revision 1\.1 of \`file1'\."
+         dotest rmadd2-8 "${testcvs} -q ci -m readd" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+         echo 'new contents' >file1
+         dotest rmadd2-9 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.4; previous revision: 1\.3"
+         dotest rmadd2-10 "$testcvs -q update -j 1.4 -j 1.3 file1" \
+"$SPROG update: Replacing \`file1' with contents of revision 1\.3\.
+M file1"
+         dotest rmadd2-11 "${testcvs} -q ci -m undo" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.5; previous revision: 1\.4"
+         dotest rmadd2-12 "cat file1" "initial contents"
+         dotest rmadd2-13 "${testcvs} -q update -p -r 1.3" "initial contents"
+
+         # Hmm, might be a bit odd that this works even if 1.3 is not
+         # the head.
+         dotest rmadd2-14 "${testcvs} -q update -j 1.3 -j 1.2 file1" \
+"${SPROG} update: scheduling \`file1' for removal"
+
+         # Check that -p can get arbitrary revisions of a removed file
+         dotest rmadd2-14a "${testcvs} -q update -p" "initial contents"
+         dotest rmadd2-14b "${testcvs} -q update -p -r 1.5" "initial contents"
+         dotest rmadd2-14c "${testcvs} -q update -p -r 1.3" "initial contents"
+
+         dotest rmadd2-15 "${testcvs} -q ci -m re-remove" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.5"
+         dotest rmadd2-16 "${testcvs} log -h file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+Working file: file1
+head: 1\.6
+branch:
+locks: strict
+access list:
+symbolic names:
+       tagone: 1\.1
+keyword substitution: kv
+total revisions: 6
+============================================================================="
+         dotest rmadd2-17 "${testcvs} status -v file1" \
+"===================================================================
+File: no file file1            Status: Up-to-date
+
+   Working revision:   No entry for file1
+   Repository revision:        1\.6    
${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+   Commit Identifier:  ${commitid}
+
+   Existing Tags:
+       tagone                          (revision: 1.1)"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       rmadd3)
+          # This test demonstrates that CVS notices that file1 exists rather
+         # that deleting or writing over it after:
+         #
+         #   cvs remove -f file1; touch file1; cvs add file1.
+         #
+          # According to the manual, this should work for:
+         #
+         #   rm file1; cvs remove file1; cvs add file1
+         #
+         # but in past version of CVS, new content in file1 would be
+         # erroneously deleted when file1 reappeared between the remove and
+         # the add.
+         #
+         # Later versions of CVS would refuse to perform the add, but still
+         # allow a subsequent local commit to erase the file from the
+         # workspace, possibly losing data.
+         mkdir 1; cd 1
+         dotest rmadd3-init1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest rmadd3-init2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+
+         echo initial content for file1 >file1
+         dotest rmadd3-init3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file \`file1' for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest rmadd3-init4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+         # Here begins the guts of this test, as detailed above.
+         dotest rmadd3-1 "${testcvs} rm -f file1" \
+"${SPROG} remove: scheduling \`file1' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
+
+          # Now recreate the file:
+         echo desired future contents for file1 >file1
+
+         # And attempt to resurrect it at the same time:
+         dotest_fail rmadd3-2 "${testcvs} add file1" \
+"${SPROG} add: \`file1' should be removed and is still there (or is back 
again)"
+
+         # Now prove that commit knows that it shouldn't erase files.
+         dotest_fail rmadd3-3 "${testcvs} -q ci -m." \
+"$CPROG commit: \`file1' should be removed and is still there (or is back 
again)
+$CPROG \[commit aborted\]: correct above errors first!"
+
+         # Then these should pass too:
+         dotest rmadd3-4 "test -f file1"
+         dotest rmadd3-5 "cat file1" "desired future contents for file1"
+
+         if $keep; then
+           echo Keeping ${TESTDIR} and exiting due to --keep
+           exit 0
+         fi
+
+         dokeep
+         cd ../..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       resurrection)
+         # This test tests a few file resurrection scenarios.
+         mkdir 1; cd 1
+         dotest resurrection-init1 "$testcvs -q co -l ." ''
+         mkdir first-dir
+         dotest resurrection-init2 "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+         cd first-dir
+
+         echo initial content for file1 >file1
+         dotest resurrection-init3 "$testcvs add file1" \
+"$SPROG add: scheduling file \`file1' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+         dotest resurrection-init4 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+         dotest resurrection-init5 "$testcvs -Q rm -f file1"
+
+         # The first test is that `cvs add' will resurrect a file before its
+         # removal has been committed.
+         dotest_sort resurrection-1 "$testcvs add file1" \
+"U file1
+$SPROG add: \`file1', version 1\.1, resurrected"
+         dotest resurrection-2 "$testcvs -Q diff file1" ""
+
+         dotest resurrection-init6 "$testcvs -Q tag -b resurrection"
+         dotest resurrection-init7 "$testcvs -Q rm -f file1"
+         dotest resurrection-init8 "$testcvs -Q ci -mrm"
+
+         # The next test is that CVS will resurrect a committed removal.
+         dotest_sort resurrection-3 "$testcvs add file1" \
+"U file1
+$SPROG add: Re-adding file \`file1' after dead revision 1\.2\.
+$SPROG add: Resurrecting file \`file1' from revision 1\.1\.
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+         dotest resurrection-4 "$testcvs -q diff -r1.1 file1"
+         dotest resurrection-5 "$testcvs -q ci -mreadd" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+
+         dotest resurrection-init9 "$testcvs -Q up -rresurrection"
+         dotest resurrection-init10 "$testcvs -Q rm -f file1"
+         dotest resurrection-init11 "$testcvs -Q ci -mrm-on-resurrection"
+
+         # The next test is that CVS will resurrect a committed removal to a
+         # branch.
+         dotest_sort resurrection-6 "$testcvs -r add file1" \
+"U file1
+$SPROG add: Re-adding file \`file1' on branch \`resurrection' after dead 
revision 1\.1\.2\.1\.
+$SPROG add: Resurrecting file \`file1' from revision 1\.1\.
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+         # If the file is modified, it had better be read-write
+         # regardless of what the user has requested with the CVSREAD
+         # environment variable or the global -r switch
+          dotest resurrection-6b 'test -w file1' ''
+         dotest resurrection-7 "$testcvs -Q diff -r1.1 file1" ""
+         dotest resurrection-8 "$testcvs -q ci -mreadd" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+
+         # The next few tests verify that an attempted resurrection of a file
+         # with no previous revision on the trunk fails.
+         touch file2
+         dotest resurrection-9 "$testcvs -Q add file2"
+         dotest resurrection-10 "$testcvs -Q ci -mnew-file2"
+         dotest resurrection-11 "$testcvs -Q up -A"
+
+         # This command once caused an assertion failure.
+         dotest resurrection-12 "$testcvs add file2" \
+"$SPROG add: File \`file2' has no previous revision to resurrect\."
+
+         # Check what 'cvs -r add' does with resurrected files.
+         dotest resurrection-13 "$testcvs -Q rm -f file1"
+         dotest_sort resurrection-14 "$testcvs -r add file1" \
+"U file1
+$SPROG add: \`file1', version 1\.3, resurrected"
+         dotest_fail resurrection-15 'test -w file1'
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       dirs)
+         # Tests related to removing and adding directories.
+         # See also:
+         #   conflicts (especially dir1 in conflicts-130): What happens if
+         #     directory exists in repository and a non-CVS-controlled
+         #     directory in the working directory?
+         #   conflicts3-15.  More cases, especially where CVS directory
+         #     exists but without CVS/Repository and friends.
+         #   conflicts3-22.  Similar to conflicts-130 but there is a file
+         #     in the directory.
+         #   dirs2.  Sort of similar to conflicts3-22 but somewhat different.
+         mkdir imp-dir; cd imp-dir
+         echo file1 >file1
+         mkdir sdir
+         echo sfile >sdir/sfile
+         dotest_sort dirs-1 \
+"${testcvs} import -m import-it dir1 vend rel" "
+
+N dir1/file1
+N dir1/sdir/sfile
+No conflicts created by this import
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/dir1/sdir"
+         cd ..
+
+         mkdir 1; cd 1
+         dotest dirs-2 "$testcvs -Q co dir1" ""
+
+         # Various CVS administrators are in the habit of removing
+         # the repository directory for things they don't want any
+         # more.  I've even been known to do it myself (on rare
+         # occasions).  Not the usual recommended practice, but we want
+         # to try to come up with some kind of reasonable/documented/sensible
+         # behavior.
+         modify_repo rm -rf $CVSROOT_DIRNAME/dir1/sdir
+
+         dotest dirs-3 "${testcvs} update" \
+"${SPROG} update: Updating dir1
+${SPROG} update: Updating dir1/sdir
+${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such 
file or directory
+${SPROG} update: skipping directory dir1/sdir"
+         dotest dirs-3a "${testcvs} update -d" \
+"${SPROG} update: Updating dir1
+${SPROG} update: Updating dir1/sdir
+${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such 
file or directory
+${SPROG} update: skipping directory dir1/sdir"
+
+         # If we say "yes", then CVS gives errors about not being able to
+         # create lock files.
+         # The fact that it says "skipping directory " rather than
+         # "skipping directory dir1/sdir" is some kind of bug.
+         dotest dirs-4 "echo no | ${testcvs} release -d dir1/sdir" \
+"${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such 
file or directory
+${SPROG} update: skipping directory 
+You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .dir1/sdir': .. 
.release' aborted by user choice."
+
+         # OK, if "cvs release" won't help, we'll try it the other way...
+         rm -rf dir1/sdir
+
+         dotest dirs-5 "cat dir1/CVS/Entries" \
+"/file1/1.1.1.1/[a-zA-Z0-9 :]*//
+D/sdir////"
+         dotest dirs-6 "${testcvs} update" "${SPROG} update: Updating dir1"
+         dotest dirs-7 "cat dir1/CVS/Entries" \
+"/file1/1.1.1.1/[a-zA-Z0-9 :]*//
+D/sdir////"
+         dotest dirs-8 "${testcvs} update -d dir1" \
+"${SPROG} update: Updating dir1"
+
+         dokeep
+         cd ..
+         rm -rf imp-dir 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/dir1
+         ;;
+
+
+
+       dirs2)
+         # See "dirs" for a list of tests involving adding and
+         # removing directories.
+         mkdir 1; cd 1
+         dotest dirs2-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest dirs2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         mkdir sdir
+         dotest dirs2-3 "${testcvs} add sdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
+         touch sdir/file1
+         dotest dirs2-4 "${testcvs} add sdir/file1" \
+"${SPROG} add: scheduling file .sdir/file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest dirs2-5 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/sdir/file1,v  <--  sdir/file1
+initial revision: 1\.1"
+         rm -r sdir/CVS
+         if $remote; then
+           # This is just like conflicts3-23
+           dotest_fail dirs2-6r "${testcvs} update -d" \
+"${QUESTION} sdir
+${SPROG} update: Updating \.
+${SPROG} update: Updating sdir
+${CPROG} update: move away \`sdir/file1'; it is in the way
+C sdir/file1"
+           rm sdir/file1
+           rm -rf sdir/CVS
+
+           # This is where things are not just like conflicts3-23
+           dotest dirs2-7r "${testcvs} update -d" \
+"${QUESTION} sdir
+${SPROG} update: Updating \.
+${SPROG} update: Updating sdir
+U sdir/file1"
+         else
+           dotest dirs2-6 "${testcvs} update -d" \
+"${CPROG} update: Updating \.
+${QUESTION} sdir"
+           rm sdir/file1
+           dotest dirs2-7 "${testcvs} update -d" \
+"${CPROG} update: Updating \.
+${QUESTION} sdir"
+         fi
+         cd ../..
+
+         # Now, the same thing (more or less) on a branch.
+         mkdir 2; cd 2
+         dotest dirs2-8 "${testcvs} -q co first-dir" 'U first-dir/sdir/file1'
+         cd first-dir
+         dotest dirs2-9 "${testcvs} -q tag -b br" "T sdir/file1"
+         rm -rf sdir/CVS
+
+         if $remote; then
+           # val-tags used to have a cute little quirk; if an update didn't
+           # recurse into the directories where the tag is defined, val-tags
+           # wouldn't get updated.  This is no longer a problem as of 1.12.10.
+           dotest_fail dirs2-10-againr "$testcvs update -d -r br" \
+"$QUESTION sdir
+$SPROG update: Updating \.
+$SPROG update: Updating sdir
+$CPROG update: move away \`sdir/file1'; it is in the way
+C sdir/file1"
+         else
+           dotest dirs2-10 "${testcvs} update -d -r br" \
+"$SPROG update: Updating \.
+$QUESTION sdir"
+# This is what used to happen.  I'm not sure why it changed with 1.12.10, but
+# as near as I can tell from the comments in update_direntproc, the new
+# behavior was the intended behavior.
+#"$CPROG update: in directory \`sdir':
+#$CPROG \[update aborted\]: there is no version here; do \`$CPROG checkout' 
first"
+         fi
+         cd ../..
+
+         # OK, the above tests make the situation somewhat harder
+         # than it might be, in the sense that they actually have a
+         # file which is alive on the branch we are updating.  Let's
+         # try it where it is just a directory where all the files
+         # have been removed.
+         mkdir 3; cd 3
+         dotest dirs2-11 "${testcvs} -q co -r br first-dir" \
+"U first-dir/sdir/file1"
+         cd first-dir
+         # Hmm, this doesn't mention the branch like add does.  That's
+         # an odd non-orthogonality.
+         dotest dirs2-12 "${testcvs} rm -f sdir/file1" \
+"${SPROG} remove: scheduling .sdir/file1. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest dirs2-13 "${testcvs} -q ci -m remove" \
+"$CVSROOT_DIRNAME/first-dir/sdir/file1,v  <--  sdir/file1
+new revision: delete; previous revision: 1\.1"
+         cd ../../2/first-dir
+         if $remote; then
+           dotest dirs2-14r "${testcvs} update -d -r br" \
+"${QUESTION} sdir/file1
+${SPROG} update: Updating \.
+${SPROG} update: Updating sdir"
+         else
+           dotest dirs2-14 "${testcvs} update -d -r br" \
+"${CPROG} update: Updating \.
+${QUESTION} sdir"
+         fi
+
+         dokeep
+         cd ../..
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       branches)
+         # More branch tests, including branches off of branches
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest branches-1 "$testcvs -q co first-dir"
+         cd first-dir
+         echo 1:ancest >file1
+         echo 2:ancest >file2
+         echo 3:ancest >file3
+         echo 4:trunk-1 >file4
+         dotest branches-2 "${testcvs} add file1 file2 file3 file4" \
+"$SPROG add: scheduling file \`file1' for addition
+$SPROG add: scheduling file \`file2' for addition
+$SPROG add: scheduling file \`file3' for addition
+$SPROG add: scheduling file \`file4' for addition
+$SPROG add: use .$SPROG commit. to add these files permanently"
+         dotest branches-2a "$testcvs -n -q ci -m dont-commit"
+         dotest_lit branches-3 "$testcvs -q ci -m add-it" <<HERE
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1.1
+${CVSROOT_DIRNAME}/first-dir/file3,v  <--  file3
+initial revision: 1.1
+${CVSROOT_DIRNAME}/first-dir/file4,v  <--  file4
+initial revision: 1.1
+HERE
+         echo 4:trunk-2 >file4
+         dotest branches-3.2 "${testcvs} -q ci -m trunk-before-branch" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.2; previous revision: 1\.1"
+         # The "cvs log file4" in test branches-14.3 will test that we
+         # didn't really add the tag.
+         dotest branches-3.3 "${testcvs} -qn tag dont-tag" \
+"T file1
+T file2
+T file3
+T file4"
+         # Modify this file before branching, to deal with the case where
+         # someone is hacking along, says "oops, I should be doing this on
+         # a branch", and only then creates the branch.
+         echo 1:br1 >file1
+         dotest branches-4 "${testcvs} tag -b br1" "${SPROG}"' tag: Tagging \.
+T file1
+T file2
+T file3
+T file4'
+         dotest branches-5 "${testcvs} update -r br1" \
+"${SPROG} update: Updating \.
+M file1"
+         echo 2:br1 >file2
+         echo 4:br1 >file4
+         dotest branches-6 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.2\.2\.1; previous revision: 1\.2"
+         dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1
+T file2
+T file3
+T file4'
+         dotest branches-8 "${testcvs} -q update -r brbr" ''
+         echo 1:brbr >file1
+         echo 4:brbr >file4
+         dotest branches-9 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1\.2\.1; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.2\.2\.1\.2\.1; previous revision: 1\.2\.2\.1"
+         dotest branches-10 "cat file1 file2 file3 file4" '1:brbr
+2:br1
+3:ancest
+4:brbr'
+         dotest branches-11 "${testcvs} -q update -r br1" \
+'U file1
+U file4'
+         dotest branches-12 "cat file1 file2 file3 file4" '1:br1
+2:br1
+3:ancest
+4:br1'
+         echo 4:br1-2 >file4
+         dotest branches-12.2 "${testcvs} -q ci -m change-on-br1" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1"
+         dotest branches-13 "${testcvs} -q update -A" 'U file1
+U file2
+U file4'
+         dotest branches-14 "cat file1 file2 file3 file4" '1:ancest
+2:ancest
+3:ancest
+4:trunk-2'
+         echo 4:trunk-3 >file4
+         dotest branches-14.2 \
+           "${testcvs} -q ci -m trunk-change-after-branch" \
+"$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.3; previous revision: 1\.2"
+         dotest branches-14.3 "${testcvs} log file4" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
+Working file: file4
+head: 1\.3
+branch:
+locks: strict
+access list:
+symbolic names:
+       brbr: 1\.2\.2\.1\.0\.2
+       br1: 1\.2\.0\.2
+keyword substitution: kv
+total revisions: 6;    selected revisions: 6
+description:
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+trunk-change-after-branch
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+branches:  1\.2\.2;
+trunk-before-branch
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add-it
+----------------------------
+revision 1\.2\.2\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+change-on-br1
+----------------------------
+revision 1\.2\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+branches:  1\.2\.2\.1\.2;
+modify
+----------------------------
+revision 1\.2\.2\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+modify
+============================================================================="
+         dotest_fail branches-14.4 \
+           "${testcvs} diff -c -r 1.1 -r 1.3 file4" \
+"Index: file4
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
+retrieving revision 1\.1
+retrieving revision 1\.3
+diff -c -r1\.1 -r1\.3
+\*\*\* file4   ${RFCDATE}      1\.1
+--- file4      ${RFCDATE}      1\.3
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+! 4:trunk-1
+--- 1 ----
+! 4:trunk-3"
+         dotest_fail branches-14.5 \
+           "${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \
+"Index: file4
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
+retrieving revision 1\.1
+retrieving revision 1\.2\.2\.1
+diff -c -r1\.1 -r1\.2\.2\.1
+\*\*\* file4   ${RFCDATE}      1\.1
+--- file4      ${RFCDATE}      1\.2\.2\.1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+! 4:trunk-1
+--- 1 ----
+! 4:br1"
+         dotest branches-15 \
+           "$testcvs update -j 1.1.2.1 -j 1.1.2.1.2.1 file1" \
+"Merging differences between 1\.1\.2\.1 and 1\.1\.2\.1\.2\.1 into \`file1'
+$CPROG update: conflicts during merge
+C file1"
+         dotest branches-16 "cat file1" '<<<<<<< file1
+1:ancest
+[=]======
+1:brbr
+[>]>>>>>> 1\.1\.2\.1\.2\.1'
+
+         dotest branches-o1 "${testcvs} -q admin -o ::brbr" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
+done"
+
+         dokeep
+         cd ..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf first-dir
+         ;;
+
+
+
+       branches2)
+         # More branch tests.
+         # Test that when updating a new subdirectory in a directory
+         # which was checked out on a branch, the new subdirectory is
+         # created on the appropriate branch.  Test this when joining
+         # as well.
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir trunk; cd trunk
+
+         # Create a file.
+         dotest branches2-1 "${testcvs} -q co first-dir"
+         cd first-dir
+         echo "file1 first revision" > file1
+         dotest branches2-2 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest branches2-3 "${testcvs} commit -m add file1" \
+"${CVSROOT_DIRNAME}/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+         # Tag the file.
+         dotest branches2-4 "${testcvs} -q tag tag1" 'T file1'
+
+         # Make two branches.
+         dotest branches2-5 "${testcvs} -q rtag -b -r tag1 b1 first-dir" ''
+         dotest branches2-6 "${testcvs} -q rtag -b -r tag1 b2 first-dir" ''
+
+         # Create some files and a subdirectory on branch b1.
+         cd ../..
+         mkdir b1; cd b1
+         dotest branches2-7 "${testcvs} -q co -r b1 first-dir" \
+"U first-dir/file1"
+         cd first-dir
+         echo "file2 first revision" > file2
+         dotest branches2-8 "${testcvs} add file2" \
+"${SPROG}"' add: scheduling file `file2'\'' for addition on branch `b1'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         mkdir dir1
+         dotest branches2-9 "${testcvs} add dir1" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository
+--> Using per-directory sticky tag "'`'"b1'"
+         echo "file3 first revision" > dir1/file3
+         dotest branches2-10 "${testcvs} add dir1/file3" \
+"${SPROG}"' add: scheduling file `dir1/file3'\'' for addition on branch `b1'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest branches2-11 "${testcvs} -q ci -madd ." \
+"$CVSROOT_DIRNAME/first-dir/Attic/file2,v  <--  file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir1/Attic/file3,v  <--  dir1/file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # Check out the second branch, and update the working
+         # directory to the first branch, to make sure the right
+         # happens with dir1.
+         cd ../..
+         mkdir b2; cd b2
+         dotest branches2-12 "${testcvs} -q co -r b2 first-dir" \
+'U first-dir/file1'
+         cd first-dir
+         dotest branches2-13 "${testcvs} update -d -r b1 dir1" \
+"${SPROG} update: Updating dir1
+U dir1/file3"
+         dotest branches2-14 "${testcvs} -q status" \
+"===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         b2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1.*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         b1 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         # Test some calls to rls here because we can.  These should probably
+         # be somewhere else, but we already have some directories set up.
+          dotest branches2-14-rls-1 "$testcvs rls" \
+"$SPROG rls: Listing module: \`.'
+CVSROOT
+first-dir"
+          dotest branches2-14-rls-2 "$testcvs rls -R" \
+"$SPROG rls: Listing module: \`.'
+\.:
+CVSROOT
+first-dir
+
+CVSROOT:
+checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+postadmin
+postproxy
+posttag
+postwatch
+preproxy
+rcsinfo
+taginfo
+verifymsg
+Emptydir
+
+CVSROOT/Emptydir:
+
+first-dir:
+file1
+dir1
+
+first-dir/dir1:"
+          dotest branches2-14-rls-3 "$testcvs rls -l -R" \
+"$SPROG rls: Listing module: \`.'
+\.:
+d--- $ISO8601DATE            CVSROOT
+d--- $ISO8601DATE            first-dir
+
+CVSROOT:
+---- $ISO8601DATE 1\.[0-9][0-9]*        checkoutlist
+---- $ISO8601DATE 1\.[0-9][0-9]*        commitinfo
+---- $ISO8601DATE 1\.[0-9][0-9]*        config
+---- $ISO8601DATE 1\.[0-9][0-9]*        cvswrappers
+---- $ISO8601DATE 1\.[0-9][0-9]*        loginfo
+---- $ISO8601DATE 1\.[0-9][0-9]*        modules
+---- $ISO8601DATE 1\.[0-9][0-9]*        notify
+---- $ISO8601DATE 1\.[0-9][0-9]*        postadmin
+---- $ISO8601DATE 1\.[0-9][0-9]*        postproxy
+---- $ISO8601DATE 1\.[0-9][0-9]*        posttag
+---- $ISO8601DATE 1\.[0-9][0-9]*        postwatch
+---- $ISO8601DATE 1\.[0-9][0-9]*        preproxy
+---- $ISO8601DATE 1\.[0-9][0-9]*        rcsinfo
+---- $ISO8601DATE 1\.[0-9][0-9]*        taginfo
+---- $ISO8601DATE 1\.[0-9][0-9]*        verifymsg
+d--- $ISO8601DATE            Emptydir
+
+CVSROOT/Emptydir:
+
+first-dir:
+---- $ISO8601DATE 1\.1        file1
+d--- $ISO8601DATE            dir1
+
+first-dir/dir1:"
+          dotest branches2-14-rls-4 "$testcvs rls -eR" \
+"$SPROG rls: Listing module: \`.'
+\.:
+D/CVSROOT////
+D/first-dir////
+
+CVSROOT:
+/checkoutlist/1\.[0-9][0-9]*/$DATE//
+/commitinfo/1\.[0-9][0-9]*/$DATE//
+/config/1\.[0-9][0-9]*/$DATE//
+/cvswrappers/1\.[0-9][0-9]*/$DATE//
+/loginfo/1\.[0-9][0-9]*/$DATE//
+/modules/1\.[0-9][0-9]*/$DATE//
+/notify/1\.[0-9][0-9]*/$DATE//
+/postadmin/1\.[0-9][0-9]*/$DATE//
+/postproxy/1\.[0-9][0-9]*/$DATE//
+/posttag/1\.[0-9][0-9]*/$DATE//
+/postwatch/1\.[0-9][0-9]*/$DATE//
+/preproxy/1\.[0-9][0-9]*/$DATE//
+/rcsinfo/1\.[0-9][0-9]*/$DATE//
+/taginfo/1\.[0-9][0-9]*/$DATE//
+/verifymsg/1\.[0-9][0-9]*/$DATE//
+D/Emptydir////
+
+CVSROOT/Emptydir:
+
+first-dir:
+/file1/1\.1/$DATE//
+D/dir1////
+
+first-dir/dir1:"
+          dotest branches2-14-rls-5 "$testcvs -q rls -R" \
+"\.:
+CVSROOT
+first-dir
+
+CVSROOT:
+checkoutlist
+commitinfo
+config
+cvswrappers
+loginfo
+modules
+notify
+postadmin
+postproxy
+posttag
+postwatch
+preproxy
+rcsinfo
+taginfo
+verifymsg
+Emptydir
+
+CVSROOT/Emptydir:
+
+first-dir:
+file1
+dir1
+
+first-dir/dir1:"
+          dotest branches2-14-rls-6 "$testcvs -q rls -lRrb1" \
+"\.:
+d--- $ISO8601DATE            CVSROOT
+d--- $ISO8601DATE            first-dir
+
+CVSROOT:
+d--- $ISO8601DATE            Emptydir
+
+CVSROOT/Emptydir:
+
+first-dir:
+---- $ISO8601DATE 1\.1        file1
+---- $ISO8601DATE 1\.1\.2\.1    file2
+d--- $ISO8601DATE            dir1
+
+first-dir/dir1:
+---- $ISO8601DATE 1\.1\.2\.1    file3"
+          dotest branches2-14-rls-7 "$testcvs -q rls -lRrb2" \
+"\.:
+d--- $ISO8601DATE            CVSROOT
+d--- $ISO8601DATE            first-dir
+
+CVSROOT:
+d--- $ISO8601DATE            Emptydir
+
+CVSROOT/Emptydir:
+
+first-dir:
+---- $ISO8601DATE 1\.1        file1
+d--- $ISO8601DATE            dir1
+
+first-dir/dir1:"
+
+         # Now some calls to ls.  These are more appropriate here.
+         dotest branches2-14-ls-1 "$testcvs ls" \
+"file1
+dir1"
+         dotest branches2-14-ls-2 "$testcvs ls -e" \
+"/file1/1\.1/$DATE//
+D/dir1////"
+         dotest branches2-14-ls-3 "$testcvs ls -R" \
+"\.:
+file1
+dir1
+
+dir1:
+file3"
+         dotest branches2-14-ls-4 "$testcvs ls -eRrHEAD" \
+"\.:
+/file1/1\.1/$DATE//THEAD
+D/dir1////
+
+dir1:"
+         dotest branches2-14-ls-5 "$testcvs ls -eRrb1" \
+"\.:
+/file1/1\.1/$DATE//Tb1
+/file2/1\.1\.2\.1/$DATE//Tb1
+D/dir1////
+
+dir1:
+/file3/1\.1\.2\.1/$DATE//Tb1"
+         dotest branches2-14-ls-6 "$testcvs ls -eRrb2" \
+"\.:
+/file1/1.1/$DATE//Tb2
+D/dir1////
+
+dir1:"
+         # Nonexistant tags used to cause assertion failures.
+         dotest_fail branches2-14-ls-7 "$testcvs ls -eRrnosuchtag" \
+"$SPROG \[ls aborted\]: no such tag \`nosuchtag'"
+
+         # FIXME: Just clobbering the directory like this is a bit
+         # tacky, although people generally expect it to work.  Maybe
+         # we should release it instead.  We do it a few other places
+         # below as well.
+         rm -rf dir1
+         dotest branches2-15 "$testcvs update -d -j b1 dir1" \
+"$SPROG update: Updating dir1
+$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`dir1/file3'\."
+
+         # FIXCVS: The `No revision control file' stuff seems to be
+         # CVS's way of telling us that we're adding the file on a
+         # branch, and the file is not on that branch yet.  This
+         # should be nicer.
+         dotest branches2-16 "${testcvs} -q status" \
+"===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         b2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         b2 - MISSING from RCS file!
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         cd ../../trunk/first-dir
+         dotest branches2-17 "${testcvs} update -d -P dir1" \
+"${SPROG} update: Updating dir1"
+         dotest_fail branches2-18 "test -d dir1"
+         dotest branches2-19 "${testcvs} update -d -P -r b1 dir1" \
+"${SPROG} update: Updating dir1
+U dir1/file3"
+         dotest branches2-20 "${testcvs} -q status" \
+"===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1.*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         b1 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         rm -rf dir1
+         dotest branches2-21 "$testcvs update -d -P -j b1 dir1" \
+"$SPROG update: Updating dir1
+$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`dir1/file3'\."
+         dotest branches2-22 "${testcvs} -q status" \
+"===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         cd ../..
+         rm -rf b1 b2
+
+         # Check out branch b1 twice.  Crate a new directory in one
+         # working directory, then do a cvs update in the other
+         # working directory and see if the tags are right.
+         mkdir b1a
+         mkdir b1b
+         cd b1b
+         dotest branches2-23 "${testcvs} -q co -r b1 first-dir" \
+'U first-dir/file1
+U first-dir/file2
+U first-dir/dir1/file3'
+         cd ../b1a
+         dotest branches2-24 "${testcvs} -q co -r b1 first-dir" \
+'U first-dir/file1
+U first-dir/file2
+U first-dir/dir1/file3'
+         cd first-dir
+         mkdir dir2
+         dotest branches2-25 "${testcvs} add dir2" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository
+--> Using per-directory sticky tag "'`'"b1'"
+         echo "file4 first revision" > dir2/file4
+         dotest branches2-26 "${testcvs} add dir2/file4" \
+"${SPROG}"' add: scheduling file `dir2/file4'\'' for addition on branch `b1'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest branches2-27 "${testcvs} -q commit -madd" \
+"$CVSROOT_DIRNAME/first-dir/dir2/Attic/file4,v  <--  dir2/file4
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         cd ../../b1b/first-dir
+         dotest branches2-28 "${testcvs} update -d dir2" \
+"${SPROG} update: Updating dir2
+U dir2/file4"
+         cd dir2
+         dotest branches2-29 "${testcvs} -q status" \
+"===================================================================
+File: file4                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1.*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         b1 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest branches2-30 "cat CVS/Tag" 'Tb1'
+
+         # Test update -A on a subdirectory
+         cd ..
+         rm -rf dir2
+         dotest branches2-31 "${testcvs} update -A -d dir2" \
+"${SPROG} update: Updating dir2"
+         cd dir2
+         dotest branches2-32 "${testcvs} -q status" ''
+         dotest_fail branches2-33 "test -f CVS/Tag"
+
+         # Add a file on the trunk.
+         echo "file5 first revision" > file5
+         dotest branches2-34 "${testcvs} add file5" \
+"${SPROG}"' add: scheduling file `file5'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest branches2-35 "${testcvs} -q commit -madd" \
+"$CVSROOT_DIRNAME/first-dir/dir2/file5,v  <--  file5
+initial revision: 1\.1"
+
+         cd ../../../trunk/first-dir
+         dotest branches2-36 "${testcvs} -q update -d dir2" 'U dir2/file5'
+         cd dir2
+         dotest branches2-37 "${testcvs} -q status" \
+"===================================================================
+File: file5                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/dir2/file5,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest_fail branches2-38 "test -f CVS/status"
+
+          dotest branches2-39 "$testcvs rls -rb1 -l -R first-dir" \
+"$SPROG rls: Listing module: \`first-dir'
+first-dir:
+---- $ISO8601DATE 1\.1        file1
+---- $ISO8601DATE 1\.1\.2\.1    file2
+d--- $ISO8601DATE            dir1
+d--- $ISO8601DATE            dir2
+
+first-dir/dir1:
+---- $ISO8601DATE 1\.1\.2\.1    file3
+
+first-dir/dir2:
+---- $ISO8601DATE 1\.1\.2\.1    file4"
+
+         dokeep
+         cd ../../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf trunk b1a b1b
+         ;;
+
+
+
+       branches3)
+         # test local branch number support
+
+         # This test is skipped in $remotehost mode since the
+         # CVS_LOCAL_BRANCH_NUM is not inherited by the server process as it
+         # is with :fork:, for hopefully obvious reasons.
+         #
+         # FIXCVS?  Is this correct?  Should CVS_LOCAL_BRANCH_NUM be sent as
+         # a protocol extension or is it reasonable to only want this set on
+         # the server?
+
+         if test -n "$remotehost"; then :;else
+           modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+           mkdir branches3; cd branches3
+
+           dotest branches3-1 "$testcvs -q co first-dir"
+           cd first-dir
+           echo "file1 first revision" > file1
+           dotest branches3-2 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+           dotest branches3-3 "${testcvs} commit -m add file1" \
+"${CVSROOT_DIRNAME}/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+           # Tag the file using a CVS_LOCAL_BRANCH_NUM of 1000
+           CVS_LOCAL_BRANCH_NUM=1000; export CVS_LOCAL_BRANCH_NUM
+           dotest branches3-4 "${testcvs} -q tag -b tag1" 'T file1'
+           unset CVS_LOCAL_BRANCH_NUM
+           dotest branches3-5 "${testcvs} -q log file1" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       tag1: 1\.1\.0\.1000
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add
+============================================================================="
+
+           dokeep
+           cd ../..
+           modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+           rm -r branches3
+         fi # !$remotehost
+         ;;
+
+
+
+       branches4)
+         # test where a tag is a branch tag in some files and a revision
+         # tag in others
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir branches4; cd branches4
+
+         dotest branches4-1 "$testcvs -q co first-dir"
+         cd first-dir
+         mkdir branches mixed mixed2 versions
+         dotest branches4-2 "${testcvs} -q add branches mixed mixed2 versions" 
\
+"Directory ${CVSROOT_DIRNAME}/first-dir/branches added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/mixed added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/mixed2 added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/versions added to the repository"
+
+         echo file1 >branches/file1
+         echo file2 >branches/file2
+         echo file3 >branches/file3
+         echo file4 >branches/file4
+         cp branches/file* mixed
+         cp branches/file* mixed2
+         cp branches/file* versions
+
+         dotest branches4-3 "${testcvs} -q add */file*" \
+"${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest branches4-3a "${testcvs} -Q ci -m."
+
+         dotest branches4-4 "${testcvs} -q tag xxx versions/file* mixed*/file1 
mixed*/file3" \
+"T versions/file1
+T versions/file2
+T versions/file3
+T versions/file4
+T mixed/file1
+T mixed/file3
+T mixed2/file1
+T mixed2/file3"
+
+         dotest branches4-5 "${testcvs} -q tag -b xxx branches/file* 
mixed*/file2 mixed*/file4" \
+"T branches/file1
+T branches/file2
+T branches/file3
+T branches/file4
+T mixed/file2
+T mixed/file4
+T mixed2/file2
+T mixed2/file4"
+
+         # make sure we get the appropriate warnings when updating       
+         dotest branches4-6 "${testcvs} update -r xxx" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating branches
+${SPROG} update: Updating mixed
+${SPROG} update: warning: xxx is a branch tag in some files and a revision tag 
in others\.
+${SPROG} update: Updating mixed2
+${SPROG} update: warning: xxx is a branch tag in some files and a revision tag 
in others\.
+${SPROG} update: Updating versions"
+
+         # make sure we don't get warned in quiet modes
+         dotest branches4-7 "${testcvs} -q update -A"
+         dotest branches4-8 "${testcvs} -q update -r xxx"
+         dotest branches4-9 "${testcvs} -q update -A"
+         dotest branches4-10 "${testcvs} -Q update -r xxx"
+
+         # make sure the Tag files are correct
+         dotest branches4-11 "cat branches/CVS/Tag" "Txxx"
+         dotest branches4-12 "cat mixed/CVS/Tag" "Nxxx"
+         dotest branches4-13 "cat mixed2/CVS/Tag" "Nxxx"
+         dotest branches4-14 "cat versions/CVS/Tag" "Nxxx"
+
+         # We only warn if there's mixed usage in a single directory.
+         # We may want to consider changing that in the future.
+         dotest branches4-15 "${testcvs} update -r xxx branches versions" \
+"${SPROG} update: Updating branches
+${SPROG} update: Updating versions"
+
+         dokeep
+         cd ../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -r branches4
+         ;;
+
+
+
+       tagc)
+         # Test the tag -c option.
+         mkdir 1; cd 1
+         dotest tagc-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest tagc-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch file1 file2
+         dotest tagc-3 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest tagc-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         dotest tagc-5 "${testcvs} -q tag -c tag1" \
+"T file1
+T file2"
+         touch file1 file2
+         dotest tagc-6 "${testcvs} -q tag -c tag2" \
+"T file1
+T file2"
+         # Avoid timestamp granularity bugs (FIXME: CVS should be
+         # doing the sleep, right?).
+         sleep 1
+         echo myedit >>file1
+         dotest tagc-6a "${testcvs} rm -f file2" \
+"${SPROG} remove: scheduling .file2. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         touch file3
+         dotest tagc-6b "${testcvs} add file3" \
+"${SPROG} add: scheduling file .file3. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest_fail tagc-7 "${testcvs} -q tag -c tag3" \
+"${SPROG} tag: file1 is locally modified
+${SPROG} tag: file2 is locally modified
+${SPROG} tag: file3 is locally modified
+${SPROG} \[tag aborted\]: correct the above errors first!"
+         cd ../..
+         mkdir 2
+         cd 2
+         dotest tagc-8 "${testcvs} -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2"
+         cd ../1/first-dir
+         dotest tagc-9 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+initial revision: 1\.1"
+         cd ../../2/first-dir
+         dotest tagc-10 "${testcvs} -q tag -c tag4" \
+"${SPROG} tag: \`file2' is no longer in the repository
+T file1
+T file2"
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       update-p)
+         # Make sure `cvs update -p -rT FILE' works from a branch when
+         # FILE is already on the trunk and is being added to that branch.
+
+         mkdir 1; cd 1
+         module=x
+
+         echo > unused-file
+
+         # Create the module.
+         dotest update-p-1 \
+           "$testcvs -Q import -m. $module X Y" ''
+
+         file=F
+         # Check it out and tag it.
+         dotest update-p-2 "$testcvs -Q co $module" ''
+         cd $module
+         dotest update-p-3 "$testcvs -Q tag -b B" ''
+         echo v1 > $file
+         dotest update-p-4 "$testcvs -Q add $file" ''
+         dotest update-p-5 "$testcvs -Q ci -m. $file"
+         dotest update-p-6 "$testcvs -Q tag T $file" ''
+         dotest update-p-7 "$testcvs -Q update -rB" ''
+
+         # This merge effectively adds file F on branch B.
+         dotest update-p-8 "$testcvs -Q update -jT" ''
+
+         # Before the fix that prompted the addition of this test,
+         # the following command would fail with this diagnostic:
+         # cvs update: conflict: F created independently by second party
+         dotest update-p-9 "$testcvs update -p -rT $file" \
+"===================================================================
+Checking out $file
+RCS:  ${CVSROOT_DIRNAME}/$module/$file,v
+VERS: 1\.1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+v1"
+
+         # Repeat the above, but with $file removed.
+         # This exercises a slightly different code path.
+         rm $file
+         # Before the fix that prompted the addition of this test,
+         # the following command would fail with this diagnostic:
+         # cvs update: warning: new-born \`F' has disappeared
+         dotest update-p-10 "$testcvs update -p -rT $file" \
+"===================================================================
+Checking out $file
+RCS:  ${CVSROOT_DIRNAME}/$module/$file,v
+VERS: 1\.1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+v1"
+
+         # Exercise yet another code path:
+         # the one that involves reviving a `dead' file.
+         # And a little more, for good measure...
+         touch new
+         dotest update-p-a1 "$testcvs -Q add new" ''
+         dotest update-p-a2 "$testcvs -Q update -p new" ''
+         dotest update-p-a3 "$testcvs -Q rm -f new" ''
+
+         # Both an update -A, *and* the following update are required
+         # to return to the state of being on the trunk with a $file
+         # that we can then remove.
+         dotest update-p-undead-0 "$testcvs update -A" \
+"${SPROG} update: Updating \.
+${SPROG} update: warning: new-born \`$file' has disappeared"
+         dotest update-p-undead-1 "$testcvs update" \
+"${SPROG} update: Updating \.
+U $file"
+         dotest update-p-undead-2 "$testcvs -Q update -p -rT $file" v1
+         dotest update-p-undead-3 "$testcvs -Q rm -f $file" ''
+         dotest update-p-undead-4 "$testcvs -Q update -p -rT $file" v1
+         dotest update-p-undead-5 "$testcvs -Q ci -m. $file"
+         dotest update-p-undead-6 "$testcvs -Q update -p -rT $file" v1
+         echo v2 > $file
+         dotest update-p-undead-7 "$testcvs -Q update -p -rT $file" v1
+         dotest update-p-undead-8 "$testcvs add $file" \
+"$SPROG add: Re-adding file .$file. after dead revision 1\.2\.
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+
+         dotest update-p-undead-9 "$testcvs -Q update -p -rT $file" v1
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       tagf)
+         # More tagging tests, including using tag -F -B to convert a
+         # branch tag to a regular tag and recovering thereof.
+
+         # Setup; check in first-dir/file1
+         mkdir 1; cd 1
+         dotest tagf-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest tagf-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch file1 file2
+         dotest tagf-3 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest tagf-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+         # Now create a branch and commit a revision there.
+         dotest tagf-5 "${testcvs} -q tag -b br" "T file1
+T file2"
+         dotest tagf-6 "${testcvs} -q update -r br" ""
+         echo brmod >> file1
+         echo brmod >> file2
+         dotest tagf-7 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         # Here we try to make it a non-branch tag, but will
+         # succeed in getting only warnings, even with -F 
+         # because converting a branch tag to non-branch 
+         # is potentially catastrophic.
+         dotest tagf-8a "${testcvs} -q tag -F br" \
+"${SPROG} tag: file1: Not moving branch tag .br. from 1\.1\.2\.1 to 
1\.1\\.2\.1\.
+${SPROG} tag: file2: Not moving branch tag .br. from 1\.1\.2\.1 to 
1\.1\.2\.1\."
+         # however, if we *really* are sure we want to move a branch tag,
+         # "-F -B" will do the trick
+         dotest tagf-8 "${testcvs} -q tag -F -B br" "T file1
+T file2"
+         echo moremod >> file1
+         echo moremod >> file2
+         dotest tagf-9 "${testcvs} -q status -v file1" \
+"===================================================================
+File: file1                    Status: Locally Modified
+
+   Working revision:   1\.1\.2\.1.*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br (revision: 1\.1\.2\.1)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       br                              (revision: 1\.1\.2\.1)"
+
+         # Now, how do we recover?
+         dotest tagf-10 "${testcvs} -q tag -d br" "D file1
+D file2"
+         # This creates a new branch, 1.1.4.  See the code in RCS_magicrev
+         # which will notice that there is a (non-magic) 1.1.2 and thus
+         # skip that number.
+         dotest tagf-11 "${testcvs} -q tag -r 1.1 -b br file1" "T file1"
+         # Fix it with admin -n (cf admin-18, admin-26-4).
+         dotest tagf-12 "${testcvs} -q admin -nbr:1.1.2 file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         # Another variation on the file2 test would be to use two working
+         # directories so that the update -r br would need to
+         # a merge to get from 1.1.2.1 to the head of the 1.1.2 branch.
+         dotest tagf-13 "${testcvs} -q update -r br" \
+"Merging differences between 1\.1\.2\.1 and 1\.1 into \`file1'
+$CPROG update: conflicts during merge
+C file1
+M file2"
+         # CVS is giving a conflict because we are trying to get back to
+         # 1.1.4.  I'm not sure why it is a conflict rather than just
+         # "M file1".
+         dotest tagf-14 "cat file1" \
+"<<<<<<< file1
+brmod
+moremod
+[=]======
+[>]>>>>>> 1\.1"
+         echo resolve >file1
+         dotest tagf-15 "${testcvs} -q ci -m recovered" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.4\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+         # try accidentally deleting branch tag, "tag -d"
+         dotest_fail tagf-16 "${testcvs} tag -d br" \
+"${SPROG} tag: Untagging \.
+${SPROG} tag: Not removing branch tag .br. from 
.${CVSROOT_DIRNAME}/first-dir/file1,v.\.
+${SPROG} tag: Not removing branch tag .br. from 
.${CVSROOT_DIRNAME}/first-dir/file2,v.\."
+         # try accidentally deleting branch tag, "rtag -d"
+         dotest_fail tagf-17 "${testcvs} rtag -d br first-dir" \
+"${SPROG} rtag: Untagging first-dir
+${SPROG} rtag: Not removing branch tag .br. from 
.${CVSROOT_DIRNAME}/first-dir/file1,v.\.
+${SPROG} rtag: Not removing branch tag .br. from 
.${CVSROOT_DIRNAME}/first-dir/file2,v.\."
+         # try accidentally converting branch tag to non-branch tag "tag -F"
+         dotest tagf-18 "${testcvs} tag -r1.1 -F br file1" \
+"${SPROG} tag: file1: Not moving branch tag .br. from 1\.1\.4\.1 to 1\.1\."
+         # try accidentally converting branch tag to non-branch tag "rtag -F"
+         dotest tagf-19 "${testcvs} rtag -r1.1 -F br first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: first-dir/file1: Not moving branch tag .br. from 1\.1\.4\.1 to 
1\.1\.
+${SPROG} rtag: first-dir/file2: Not moving branch tag .br. from 1\.1\.2\.2 to 
1\.1\."
+         # create a non-branch tag
+         dotest tagf-20 "${testcvs} rtag regulartag first-dir" \
+"${SPROG} rtag: Tagging first-dir"
+         # try accidentally converting non-branch tag to branch tag (tag -F -B 
-b)
+         dotest tagf-21 "${testcvs} tag -F -B -b regulartag file1" \
+"${SPROG} tag: file1: Not moving non-branch tag .regulartag. from 1\.1 to 
1\.1\.4\.1\.0\.2 due to .-B. option\."
+         # try accidentally converting non-branch tag to branch rtag (rtag -F 
-B -b)
+         dotest tagf-22 "${testcvs} rtag -F -B -b regulartag first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 
1\.1 to 1\.1\.0\.6 due to .-B. option\.
+${SPROG} rtag: first-dir/file2: Not moving non-branch tag .regulartag. from 
1\.1 to 1\.1\.0\.4 due to .-B. option\."
+         # Try accidentally deleting non-branch: (tag -d -B)
+         dotest_fail tagf-23 "${testcvs} tag -d -B regulartag file1" \
+"${SPROG} tag: Not removing non-branch tag .regulartag. from 
.${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\."
+         # Try accidentally deleting non-branch: (rtag -d -B)
+         dotest_fail tagf-24 \
+               "${testcvs} rtag -d -B regulartag first-dir" \
+"${SPROG} rtag: Untagging first-dir
+${SPROG} rtag: Not removing non-branch tag .regulartag. from 
.${CVSROOT_DIRNAME}/first-dir/file1,v. due to .-B. option\.
+${SPROG} rtag: Not removing non-branch tag .regulartag. from 
.${CVSROOT_DIRNAME}/first-dir/file2,v. due to .-B. option\."
+
+         # the following tests (throught the next commit) keep moving the same
+         # tag back and forth between 1.1.6 & 1.1.8  in file1 and between
+         # 1.1.4 and 1.1.6 in file2 since nothing was checked in on some of
+         # these branches and CVS only tracks branches via tags unless they 
contain data.
+
+         # try intentionally converting non-branch tag to branch tag (tag -F 
-b)
+         dotest tagf-25a "${testcvs} tag -F -b regulartag file1" "T file1"
+         # try intentionally moving a branch tag to a newly created branch 
(tag -F -b -B)
+         dotest tagf-25b "${testcvs} tag -F -B -b -r1.1 regulartag file1" \
+"T file1"
+         # try intentionally converting mixed tags to branch tags (rtag -F -b)
+         dotest tagf-26a "${testcvs} rtag -F -b regulartag first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: first-dir/file1: Not moving branch tag .regulartag. from 1\.1 
to 1\.1\.0\.8\."
+         # try intentionally converting a branch to a new branch tag (rtag -F 
-b -B)
+         dotest tagf-26b "${testcvs} rtag -F -B -b -r1.1 regulartag first-dir" 
\
+"${SPROG} rtag: Tagging first-dir"
+         # update to our new branch
+         dotest tagf-27 "${testcvs} update -r regulartag" \
+"${SPROG} update: Updating \.
+U file1
+U file2"
+         # commit some changes and see that all rev numbers look right
+         echo changes >> file1
+         echo changes >> file2
+         dotest tagf-28 "${testcvs} ci -m changes" \
+"${CPROG} commit: Examining \.
+${CVSROOT_DIRNAME}/first-dir/file1,v  <--  file1
+new revision: 1\.1\.8\.1; previous revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/file2,v  <--  file2
+new revision: 1\.1\.6\.1; previous revision: 1\.1"
+         # try intentional branch to non-branch (tag -F -B)
+         dotest tagf-29 "${testcvs} tag -F -B -r1.1 regulartag file1" \
+"T file1"
+         # try non-branch to non-branch (tag -F -B)
+         dotest tagf-29a "${testcvs} tag -F -B -r br regulartag file1" \
+"${SPROG} tag: file1: Not moving non-branch tag .regulartag. from 1\.1 to 
1\.1\.4\.1 due to .-B. option\."
+         # try mixed-branch to non-branch (rtag -F -B )
+         dotest tagf-29b "${testcvs} rtag -F -B -r br regulartag first-dir" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: first-dir/file1: Not moving non-branch tag .regulartag. from 
1\.1 to 1\.1\.4\.1 due to .-B. option\."
+         # at this point, regulartag is a regular tag within
+         # file1 and file2
+
+         # try intentional branch to non-branch (rtag -F -B)
+         dotest tagf-30 "${testcvs} rtag -F -B -r1.1 br first-dir"  \
+"${SPROG} rtag: Tagging first-dir"
+         # create a branch tag so we can try to delete it.
+         dotest tagf-31 "${testcvs} rtag -b brtag first-dir"  \
+"${SPROG} rtag: Tagging first-dir"
+       
+         # try intentinal deletion of branch tag (tag -d -B)
+         dotest tagf-32 "${testcvs} tag -d -B brtag file1" "D file1"
+         # try intentinal deletion of branch tag (rtag -d -B)
+         dotest tagf-33 "${testcvs} rtag -d -B brtag first-dir" \
+"${SPROG} rtag: Untagging first-dir"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       tag-space)
+         # Test tags with spaces in the names.
+         #
+         # Prior to releases 1.11.18 & 1.12.10, some commands used with
+         # tags with spaces in the names could hang CVS.
+
+         # Setup; check in first-dir/file1
+         mkdir 1; cd 1
+         dotest tag-space-init-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest tag-space-init-2 "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+         cd first-dir
+         touch file1
+         dotest tag-space-init-3 "$testcvs add file1" \
+"$SPROG add: scheduling file \`file1' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+         dotest tag-space-init-4 "$testcvs -Q ci -m add"
+
+         # Reportedly, the following two tags make it past WinCVS.
+         dotest_fail tag-space-1 "$testcvs tag ' spacetag '" \
+"$SPROG \[tag aborted\]: tag \` spacetag ' must start with a letter"
+         dotest_fail tag-space-2 "$testcvs tag 'spacetag '" \
+"$SPROG \[tag aborted\]: tag \`spacetag ' has non-visible graphic characters"
+
+         if $remote; then
+           # Verify that this isn't a client check.
+           dotest tag-space-3 "$testcvs server" \
+"E $SPROG \[tag aborted\]: tag \` spacetag ' must start with a letter
+error  " <<EOF
+Root $CVSROOT_DIRNAME
+UseUnchanged
+Argument --
+Argument  spacetag 
+Directory .
+$CVSROOT_DIRNAME/first-dir
+Entry /file1/1.1///
+Unchanged file1
+tag
+EOF
+
+           dotest tag-space-4 "$testcvs server" \
+"E $SPROG \[tag aborted\]: tag \`spacetag ' has non-visible graphic characters
+error  " <<EOF
+Root $CVSROOT_DIRNAME
+UseUnchanged
+Argument --
+Argument spacetag 
+Directory .
+$CVSROOT_DIRNAME/first-dir
+Entry /file1/1.1///
+Unchanged file1
+tag
+EOF
+         fi # $remote
+
+         # Any number of normal tags and branches were handled correctly.
+         dotest tag-space-5 "$testcvs -Q tag t1"
+         dotest tag-space-5b "$testcvs -Q tag t2"
+         dotest tag-space-5c "$testcvs -Q tag -b b1"
+
+         cd ../..
+         mkdir 2; cd 2
+
+         # But once a vendor branch exists, it's all over.
+         mkdir project; cd project
+         touch file1
+         dotest tag-space-init-4 \
+"$testcvs -Q import -mimport second-dir VENDOR RELEASE"
+
+         cd ..
+
+         dotest_fail tag-space-6 "$testcvs -Q co -r ' spacetag ' first-dir" \
+"$SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter"
+
+         # But when any files were imported, this test hung prior to CVS
+         # versions 1.11.18 & 1.12.10.
+         dotest_fail tag-space-7 "$testcvs -Q co -r ' spacetag ' second-dir" \
+"$SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter"
+
+         if $remote; then
+           # I based the client input in the next two tests on actual input
+           # from WinCVS 1.2.
+           dotest tag-space-8 "$testcvs server" \
+"E $SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter
+error  " <<EOF
+Root $CVSROOT_DIRNAME
+Argument -P
+Argument -r
+Argument  spacetag 
+Argument first-dir
+Directory .
+$CVSROOT_DIRNAME
+co
+EOF
+
+           # Verify the test is not on the client side.
+           dotest tag-space-9 "$testcvs server" \
+"E $SPROG \[checkout aborted\]: tag \` spacetag ' must start with a letter
+error  " <<EOF
+Root $CVSROOT_DIRNAME
+Argument -P
+Argument -r
+Argument  spacetag 
+Argument second-dir
+Directory .
+$CVSROOT_DIRNAME
+co
+EOF
+         fi # $remote
+
+         dotest tag-space-10 "$testcvs -Q co second-dir"
+         cd second-dir
+
+         # This test would also hang.
+         dotest_fail tag-space-11 "$testcvs -Q up -r ' spacetag '" \
+"$SPROG \[update aborted\]: tag \` spacetag ' must start with a letter"
+
+         if $remote; then
+           dotest tag-space-12 "$testcvs server" \
+"E $SPROG \[update aborted\]: tag \` spacetag ' must start with a letter
+error  " <<EOF
+Root $CVSROOT_DIRNAME
+Argument -r
+Argument  spacetag 
+Argument -u
+Argument --
+Directory .
+$CVSROOT_DIRNAME
+Unchanged file1
+update
+EOF
+         fi # $remote
+
+         # I'm skipping tests for other commands that may have had the same
+         # problem.  Hopefully, if a new issue arises, one of the above tests
+         # will catch the problem.
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       rcslib)
+         # Test librarification of RCS.
+         # First: test whether `cvs diff' handles $Name expansion
+         # correctly.  We diff two revisions with their symbolic tags;
+         # neither tag should be expanded in the output.  Also diff
+         # one revision with the working copy.
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest rcslib-diff1 "${testcvs} -q co first-dir" ''
+         cd first-dir
+         echo "I am the first foo, and my name is $""Name$." > foo.c
+         dotest rcslib-diff2 "${testcvs} add -m new-file foo.c" \
+"${SPROG} add: scheduling file .foo\.c. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest rcsdiff-3 "$testcvs -Q commit -m rev1 foo.c"
+         dotest rcsdiff-4 "${testcvs} tag first foo.c" "T foo\.c"
+         dotest rcsdiff-5 "${testcvs} update -p -r first foo.c" \
+"===================================================================
+Checking out foo\.c
+RCS:  ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
+VERS: 1\.1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+I am the first foo, and my name is \$""Name: first \$\."
+
+         echo "I am the second foo, and my name is $""Name$." > foo.c
+         dotest rcsdiff-6 "$testcvs -Q commit -m rev2 foo.c"
+         dotest rcsdiff-7 "${testcvs} tag second foo.c" "T foo\.c"
+         dotest rcsdiff-8 "${testcvs} update -p -r second foo.c" \
+"===================================================================
+Checking out foo\.c
+RCS:  ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
+VERS: 1\.2
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+I am the second foo, and my name is \$""Name: second \$\."
+
+       dotest_fail rcslib-diff9 "${testcvs} diff -r first -r second" \
+"${SPROG} diff: Diffing \.
+Index: foo\.c
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+diff -r1\.1 -r1\.2
+1c1
+< I am the first foo, and my name is \$""Name:  \$\.
+---
+> I am the second foo, and my name is \$""Name:  \$\."
+
+         echo "I am the once and future foo, and my name is $""Name$." > foo.c
+         dotest_fail rcslib-diff10 "${testcvs} diff -r first" \
+"${SPROG} diff: Diffing \.
+Index: foo\.c
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
+retrieving revision 1\.1
+diff -r1\.1 foo\.c
+1c1
+< I am the first foo, and my name is \$""Name:  \$\.
+---
+> I am the once and future foo, and my name is \$""Name\$\."
+
+         # Test handling of libdiff options.  diff gets quite enough
+         # of a workout elsewhere in sanity.sh, so we assume that it's
+         # mostly working properly if it passes all the other tests.
+         # The main one we want to try is regex handling, since we are
+         # using CVS's regex matcher and not diff's.
+
+         cat >rgx.c <<EOF
+test_regex (whiz, bang)
+{
+foo;
+bar;
+baz;
+grumble;
+}
+EOF
+
+         dotest rcslib-diffrgx-1 "${testcvs} -q add -m '' rgx.c" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest rcslib-diffrgx-2 "${testcvs} -q ci -m '' rgx.c" \
+"$CVSROOT_DIRNAME/first-dir/rgx\.c,v  <--  rgx\.c
+initial revision: 1\.1"
+         cat >rgx.c <<EOF
+test_regex (whiz, bang)
+{
+foo;
+bar;
+baz;
+mumble;
+}
+EOF
+         # Use dotest_fail because exit status from `cvs diff' must be 1.
+         #
+         # Incidentally test that CVS no longer splits diff arguments on
+         # spaces.
+         dotest_fail rcslib-diffrgx-3 "$testcvs diff -c -F'.* (' rgx.c" \
+"Index: rgx\.c
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
+retrieving revision 1\.1
+diff -c -F '\.\* (' -r1\.1 rgx\.c
+\*\*\* rgx\.c  ${RFCDATE}      1\.1
+--- rgx\.c     ${RFCDATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* test_regex (whiz, bang)
+\*\*\* 3,7 \*\*\*\*
+  foo;
+  bar;
+  baz;
+! grumble;
+  }
+--- 3,7 ----
+  foo;
+  bar;
+  baz;
+! mumble;
+  }"
+
+         # Tests of rcsmerge/diff3.  Merge operations get a good general
+         # workout elsewhere; we want to make sure that options are still
+         # handled properly.  Try merging two branches with -kv, to test
+         # both -j and -k switches.
+
+         cd ..
+
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf first-dir
+
+         mkdir 1; cd 1
+         dotest rcslib-merge-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest rcslib-merge-2 "$testcvs -q add first-dir" \
+"Directory $CVSROOT_DIRNAME.*/first-dir added to the repository"
+         cd ..; rm -r 1
+
+         dotest rcslib-merge-3 "$testcvs -q co first-dir" ""
+         cd first-dir
+
+         echo '$''Revision$' > file1
+         echo '2' >> file1
+         echo '3' >> file1
+         dotest rcslib-merge-4 "${testcvs} -q add file1" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest rcslib-merge-5 "$testcvs -Q commit -mr1 file1"
+         sed -e 's/2/two/' file1 > f; mv f file1
+         dotest rcslib-merge-6 "$testcvs -Q commit -mr2 file1"
+         dotest rcslib-merge-7 "${testcvs} -q tag -b -r 1.1 patch1" "T file1"
+         dotest rcslib-merge-8 "${testcvs} -q update -r patch1" "U file1"
+         dotest rcslib-merge-9 "${testcvs} -q status" \
+"===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         patch1 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest rcslib-merge-10 "cat file1" \
+'$''Revision: 1\.1 $
+2
+3'
+         sed -e 's/3/three/' file1 > f; mv f file1
+         dotest rcslib-merge-11 "$testcvs -Q commit -mb1 file1"
+         dotest rcslib-merge-12 "$testcvs -q update -kv -j1.2" \
+"U file1
+Merging differences between 1\.1 and 1\.2 into \`file1'
+$CPROG update: conflicts during merge
+C file1"
+         dotest rcslib-merge-13 "cat file1" \
+"<<<<<<< file1
+1\.1\.2\.1
+2
+three
+[=]======
+1\.2
+two
+3
+[>]>>>>>> 1\.2"
+
+         # Test behavior of symlinks in the repository.
+         if test -n "$remotehost"; then
+           # Create the link on the remote system.  This is because Cygwin's
+           # Windows support creates *.lnk files for Windows.  When creating
+           # these in an SMB share from UNIX, these links won't work from the
+           # UNIX side.
+           modify_repo $CVS_RSH $remotehost "'ln -s file1,v 
$CVSROOT_DIRNAME/first-dir/file2,v'"
+         else
+           modify_repo ln -s file1,v $CVSROOT_DIRNAME/first-dir/file2,v
+         fi
+         dotest rcslib-symlink-2 "$testcvs update file2" "U file2"
+         echo "This is a change" >> file2
+         dotest rcslib-symlink-3 "$testcvs -Q ci -m b2 file2"
+
+         # Switch as for rcslib-symlink-1
+         if test -n "$remotehost"; then
+           dotest rcslib-symlink-4 "$CVS_RSH $remotehost 'ls -l 
$CVSROOT_DIRNAME/first-dir/file2,v'" \
+".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v"
+         else
+           dotest rcslib-symlink-4 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \
+".*$CVSROOT_DIRNAME/first-dir/file2,v -> file1,v"
+         fi
+
+         # CVS was failing to check both the symlink and the file
+         # for timestamp changes for a while.  Test that.
+         rm file1
+         dotest rcslib-symlink-3a "${testcvs} -q up file1" \
+"${SPROG} update: warning: \`file1' was lost
+U file1"
+         echo "This is a change" >> file1
+         dotest rcslib-symlink-3b "${testcvs} ci -m because file1" \
+"${CVSROOT_DIRNAME}/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.[0-9]*; previous revision: 1\.1\.2\.[0-9]*"
+         dotest rcslib-symlink-3c "${testcvs} update file2" "U file2"
+
+         echo some new text >file3
+         dotest rcslib-symlink-3d "${testcvs} -Q add file3" ''
+         dotest rcslib-symlink-3e "$testcvs -Q ci -mtest file3"
+
+         rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v
+         # As for rcslib-symlink-1
+         if test -n "$remotehost"; then
+           modify_repo "$CVS_RSH $remotehost 'ln -s Attic/file3,v 
$CVSROOT_DIRNAME/first-dir/file2,v'"
+         else
+           modify_repo ln -s Attic/file3,v $CVSROOT_DIRNAME/first-dir/file2,v
+         fi
+         if $remote && test -z "$CVSNOBASES"; then
+           dotest_fail rcslib-symlink-3gr "$testcvs update file2" \
+"$SPROG \[update aborted\]: could not find desired version 1\.1\.2\.3 in 
$CVSROOT_DIRNAME/first-dir/file2,v"
+         else
+           # FIXCVS?  Local mode silently overwrites what it thinks is
+           # revision 1.1.2.3 of file2 with revision 1.1.2.1 of file2 when
+           # the later revisions disappear.  This doesn't sound right.
+           dotest rcslib-symlink-3g "$testcvs update file2" "U file2"
+         fi
+
+         if test -n "$remotehost"; then
+           modify_repo "$CVS_RSH $remotehost 'ln -s Attic/file3,v 
$CVSROOT_DIRNAME/first-dir/file4,v'"
+         else
+           modify_repo ln -s Attic/file3,v $CVSROOT_DIRNAME/first-dir/file4,v
+         fi
+         dotest rcslib-symlink-3g-2 "$testcvs update file4" "U file4"
+
+         # restore the link to file1 for the following tests
+         dotest rcslib-symlink-3i "$testcvs -Q rm -f file3"
+         dotest rcslib-symlink-3j "$testcvs -Q ci -mwhatever file3"
+         dotest rcslib-symlink-3k "$testcvs -Q up file2"
+         rm -f $CVSROOT_DIRNAME/first-dir/file2,v
+         rm -f $CVSROOT_DIRNAME/first-dir/file4,v
+         rm -f $CVSROOT_DIRNAME/first-dir/Attic/file3,v
+         # As for rcslib-symlink-1
+         if test -n "$remotehost"; then
+           modify_repo "$CVS_RSH $remotehost 'ln -s file1,v 
$CVSROOT_DIRNAME/first-dir/file4,v'"
+         else
+           modify_repo ln -s file1,v $CVSROOT_DIRNAME/first-dir/file4,v
+         fi
+
+         # Test 5 reveals a problem with having symlinks in the
+         # repository.  CVS will try to tag both of the files
+         # separately.  After processing one, it will do the same
+         # operation to the other, which is actually the same file,
+         # so the tag will already be there.  FIXME: do we bother
+         # changing operations to notice cases like this?  This
+         # strikes me as a difficult problem.  -Noel
+         dotest rcslib-symlink-5 "$testcvs tag the_tag" \
+"$SPROG tag: Tagging .
+T file1
+W file4 : the_tag already exists on version 1.1.2.3 : NOT MOVING tag to 
version 1.1.2.1"
+         # As for rcslib-symlink-1
+         if test -n "$remotehost"; then
+           dotest rcslib-symlink-6 "$CVS_RSH $remotehost 'ls -l 
$CVSROOT_DIRNAME/first-dir/file4,v'" \
+".*$CVSROOT_DIRNAME/first-dir/file4,v -> file1,v"
+         else
+           dotest rcslib-symlink-6 "ls -l $CVSROOT_DIRNAME/first-dir/file4,v" \
+".*$CVSROOT_DIRNAME/first-dir/file4,v -> file1,v"
+         fi
+
+         # Restore file2 link for the next few tests.
+         rm -f $CVSROOT_DIRNAME/first-dir/file4,v
+         dotest rcslib-symlink-6b "$testcvs -Q up file4"
+         # As for rcslib-symlink-1
+         if test -n "$remotehost"; then
+           modify_repo "$CVS_RSH $remotehost 'ln -s file1,v 
$CVSROOT_DIRNAME/first-dir/file2,v'"
+         else
+           modify_repo ln -s file1,v $CVSROOT_DIRNAME/first-dir/file2,v
+         fi
+
+         # Symlinks tend to interact poorly with the Attic.
+         cd ..
+         mkdir 2; cd 2
+         dotest rcslib-symlink-7 "$testcvs -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2"
+         cd first-dir
+         dotest rcslib-symlink-8 "$testcvs rm -f file2" \
+"$SPROG remove: scheduling .file2. for removal
+$SPROG remove: use .$SPROG commit. to remove this file permanently"
+         dotest rcslib-symlink-9 "$testcvs -q ci -m rm-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file2
+new revision: delete; previous revision: 1\.2"
+         # OK, why this message happens twice is relatively clear
+         # (the check_* and rtag_* calls to start_recursion).
+         # Why it happens a third time I didn't try to find out.
+         #
+         # DRP: One of the error messages disappeared while I was making
+         # proxy modifications.  Until I detect a deeper issue, I'm not
+         # going to stress over it.
+         #
+         # DRP: Both messages disappear starting with glibc 2.3.3 due to a bug
+         # in the glob function which causes it to fail to return broken
+         # symlinks.  I'm submitting a bug fix to glibc which will hopefully
+         # be released with glibc 2.3.6.  Once it is released and versions
+         # 2.3.3-2.3.5 of glibc become uncommon, the first, empty case below
+         # should be removed again.
+         dotest rcslib-symlink-10 \
+"$testcvs -q rtag -b -r the_tag brtag first-dir" "" \
+"$SPROG rtag: could not read RCS file for first-dir/file2
+$SPROG rtag: could not read RCS file for first-dir/file2"
+
+         # Restore file1 for the next test.
+         dotest rcslib-long-symlink-init-1 "$testcvs -Q up -A"
+         dotest rcslib-long-symlink-init-2 "$testcvs -Q add file1"
+         dotest rcslib-long-symlink-init-3 "$testcvs -Q ci -mback"
+
+         cd ../..  # $TESTDIR
+
+         # CVS has a hard-coded default link path size of 127 characters.
+         # Make sure it knows how to exceed that.
+         longpath=$CVSROOT_DIRNAME
+         count=0
+         while test $count -lt 10; do
+           # 10 * 30 characters + len $CVSROOT_DIRNAME
+           count=`expr $count + 1`
+           longpath=$longpath/123456789012345678901234567890
+           modify_repo mkdir $longpath
+         done
+         modify_repo cp $CVSROOT_DIRNAME/first-dir/file1,v $longpath
+         modify_repo mkdir $CVSROOT_DIRNAME/second-dir
+
+         # Switch as for rcslib-symlink-1
+         if test -n "$remotehost"; then
+           modify_repo $CVS_RSH $remotehost \
+           'ln -s $longpath/file1,v $CVSROOT_DIRNAME/second-dir/fileX,v'
+         else
+           modify_repo ln -s $longpath/file1,v \
+                             $CVSROOT_DIRNAME/second-dir/fileX,v
+         fi
+
+         dotest rcslib-long-symlink-2 "$testcvs co second-dir" \
+"$SPROG checkout: Updating second-dir
+U second-dir/fileX"
+
+         cd second-dir
+         echo change-it >>fileX
+
+         # Writes actually cause symlinks to be resolved.
+         # $DOTSTAR here accounts for the keyword-in-signed-file warning.
+         dotest rcslib-long-symlink-3 "$testcvs -q ci -mwrite-it" \
+"$DOTSTAR$CVSROOT_DIRNAME/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/123456789012345678901234567890/file1,v
  <--  fileX
+new revision: 1\.5; previous revision: 1\.4"
+
+         dokeep
+         cd ..
+
+         # Must remove the symlink first.  Samba doesn't appear to show
+         # broken symlink across the SMB share, and rm -rf by itself
+         # will remove file1,v first and leave file2,v a broken link and the
+         # rm -rf will fail since it doesn't find file2,v and it still gets
+         # directory not empty errors removing cvsroot/first-dir.
+         #
+         # I'm not sure why I need to do this on $remotehost.  The rm above
+         # rcslib-symlink-3j works fine, but the next one doesn't unless run
+         # remotely under Cygwin and using a TESTDIR on a Samba share.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost \
+"rm -f $CVSROOT_DIRNAME/first-dir/file2,v $CVSROOT_DIRNAME/second-dir/fileX,v"
+         fi
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir \
+                            $CVSROOT_DIRNAME/123456789012345678901234567890
+         rm -rf first-dir second-dir 2
+         ;;
+
+
+
+       multibranch)
+         # Test the ability to have several branchpoints coming off the
+         # same revision.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest multibranch-1 "${testcvs} -q co first-dir" ''
+         cd first-dir
+         echo 1:trunk-1 >file1
+         dotest multibranch-2 "${testcvs} add file1" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest_lit multibranch-3 "${testcvs} -q ci -m add-it" <<HERE
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1.1
+HERE
+         dotest multibranch-4 "${testcvs} tag -b br1" \
+"${SPROG} tag: Tagging \.
+T file1"
+         dotest multibranch-5 "${testcvs} tag -b br2" \
+"${SPROG} tag: Tagging \.
+T file1"
+         dotest multibranch-6 "${testcvs} -q update -r br1" ''
+         echo on-br1 >file1
+         dotest multibranch-7 "${testcvs} -q ci -m modify-on-br1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         dotest multibranch-8 "${testcvs} -q update -r br2" 'U file1'
+         echo br2 adds a line >>file1
+         dotest multibranch-9 "${testcvs} -q ci -m modify-on-br2" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.4\.1; previous revision: 1\.1"
+         dotest multibranch-10 "${testcvs} -q update -r br1" 'U file1'
+         dotest multibranch-11 "cat file1" 'on-br1'
+         dotest multibranch-12 "${testcvs} -q update -r br2" 'U file1'
+         dotest multibranch-13 "cat file1" '1:trunk-1
+br2 adds a line'
+
+         dotest multibranch-14 "${testcvs} log file1" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       br2: 1\.1\.0\.4
+       br1: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;  1\.1\.4;
+add-it
+----------------------------
+revision 1\.1\.4\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-on-br2
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+modify-on-br1
+============================================================================="
+
+         dokeep
+         cd ..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf first-dir
+         ;;
+
+
+
+       import) # test death after import
+               # Tests of "cvs import":
+               # basic2
+               # rdiff  -- imports with keywords
+               # import  -- more tests of imports with keywords
+               # importb  -- -b option.
+               # importc -- bunch o' files in bunch o' directories
+               # importX  -- -X option.
+               # importX2 -- CVSROOT/config ImportNewFilesToVendorBranchOnly
+               #             flag
+               # modules3
+               # mflag -- various -m messages
+               # ignore  -- import and cvsignore
+               # binwrap -- import and -k wrappers
+               # info -- imports which are rejected by verifymsg
+               # head -- intended to test vendor branches and HEAD,
+               #   although it doesn't really do it yet.
+               # import-CVS -- refuse to import directories named "CVS".
+               # import-quirks -- short tests of import quirks.
+
+               # import
+               mkdir import-dir ; cd import-dir
+
+               for i in 1 2 3 4 ; do
+                 echo imported file"$i" > imported-f"$i"
+               done
+
+               # This directory should be on the default ignore list,
+               # so it shouldn't get imported.
+               mkdir RCS
+               echo ignore.me >RCS/ignore.me
+
+               echo 'import should not expand $''Id$' >>imported-f2
+               cp imported-f2 ../imported-f2-orig.tmp
+
+               dotest_sort import-96 \
+"${testcvs} import -m first-import first-dir vendor-branch junk-1_0" \
+"
+
+I first-dir/RCS
+N first-dir/imported-f1
+N first-dir/imported-f2
+N first-dir/imported-f3
+N first-dir/imported-f4
+No conflicts created by this import"
+
+               dotest import-96.5 "$diff_u ../imported-f2-orig.tmp imported-f2"
+
+               cd ..
+
+               # co
+               dotest import-97 "${testcvs} -q co first-dir" \
+"U first-dir/imported-f1
+U first-dir/imported-f2
+U first-dir/imported-f3
+U first-dir/imported-f4"
+
+               cd first-dir
+
+               for i in 1 2 3 4 ; do
+                 dotest import-98-$i "test -f imported-f$i" ''
+               done
+               dotest_fail import-98.5 "test -d RCS" ''
+
+               # remove
+               rm imported-f1
+               dotest import-99 "${testcvs} rm imported-f1" \
+"${SPROG}"' remove: scheduling `imported-f1'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
+
+               # change
+               echo local-change >> imported-f2
+
+               # commit
+               # $DOTSTAR accounts for the keyword-in-signed-file warning.
+               dotest import-100 "$testcvs ci -m local-changes" \
+"$CPROG commit: Examining .
+$DOTSTAR$CVSROOT_DIRNAME/first-dir/imported-f1,v  <--  imported-f1
+new revision: delete; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/first-dir/imported-f2,v  <--  imported-f2
+new revision: 1\.2; previous revision: 1\.1"
+
+               # log
+               dotest import-101 "${testcvs} log imported-f1" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/imported-f1,v
+Working file: imported-f1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       junk-1_0: 1\.1\.1\.1
+       vendor-branch: 1\.1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: dead;  lines: ${PLUS}0 -0; 
 commitid: ${commitid};
+local-changes
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;
+Initial revision
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+first-import
+============================================================================="
+
+               # update into the vendor branch.
+               dotest import-102 "${testcvs} update -rvendor-branch" \
+"${SPROG} update: Updating .
+U imported-f1
+U imported-f2"
+
+               # remove file4 on the vendor branch
+               rm imported-f4
+               dotest import-103 "${testcvs} rm imported-f4" \
+"${SPROG}"' remove: scheduling `imported-f4'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
+
+               # commit
+               dotest import-104 \
+"${testcvs} ci -m vendor-removed imported-f4" \
+"${CVSROOT_DIRNAME}/first-dir/imported-f4,v  <--  imported-f4
+new revision: delete; previous revision: 1\.1\.1\.1"
+
+               # update to main line
+               dotest import-105 "${testcvs} -q update -A" \
+"${SPROG} update: \`imported-f1' is no longer in the repository
+U imported-f2"
+
+               # second import - file4 deliberately unchanged
+               cd ../import-dir
+               for i in 1 2 3 ; do
+                 echo rev 2 of file $i >> imported-f"$i"
+               done
+               cp imported-f2 ../imported-f2-orig.tmp
+
+               dotest_sort import-106 \
+"${testcvs} import -m second-import first-dir vendor-branch junk-2_0" \
+"
+
+
+ ${CPROG} checkout -j<prev_rel_tag> -jjunk-2_0 first-dir
+2 conflicts created by this import.
+C first-dir/imported-f1
+C first-dir/imported-f2
+I first-dir/RCS
+U first-dir/imported-f3
+U first-dir/imported-f4
+Use the following command to help the merge:"
+
+               dotest import-106.5 "$diff_u ../imported-f2-orig.tmp 
imported-f2"
+
+               cd ..
+
+               rm imported-f2-orig.tmp
+
+               # co
+               dotest import-107 "${testcvs} co first-dir" \
+"${SPROG} checkout: Updating first-dir
+U first-dir/imported-f3
+U first-dir/imported-f4"
+
+               cd first-dir
+
+               dotest_fail import-108 "test -f imported-f1" ''
+
+               for i in 2 3 ; do
+                 dotest import-109-$i "test -f imported-f$i" ''
+               done
+
+               # check vendor branch for file4
+               dotest import-110 "${testcvs} -q update -rvendor-branch" \
+"U imported-f1
+U imported-f2"
+
+               dotest import-111 "test -f imported-f4" ''
+
+               # update to main line
+               dotest import-112 "${testcvs} -q update -A" \
+"${SPROG} update: \`imported-f1' is no longer in the repository
+U imported-f2"
+
+               cd ..
+
+               dotest import-113 \
+"$testcvs -q co -jjunk-1_0 -jjunk-2_0 first-dir" \
+"$SPROG checkout: file first-dir/imported-f1 does not exist, but is present in 
revision junk-2_0
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into 
\`first-dir/imported-f2'
+$CPROG checkout: conflicts during merge
+C first-dir/imported-f2"
+
+               cd first-dir
+
+               dotest_fail import-114 "test -f imported-f1" ''
+
+               for i in 2 3 ; do
+                 dotest import-115-$i "test -f imported-f$i" ''
+               done
+
+               dotest import-116 'cat imported-f2' \
+'imported file2
+[<]<<<<<< imported-f2
+import should not expand \$''Id: imported-f2,v 1\.2 [0-9/]* [0-9:]* 
'"${username}"' Exp \$
+local-change
+[=]======
+import should not expand \$''Id: imported-f2,v 1\.1\.1\.2 [0-9/]* [0-9:]* 
'"${username}"' Exp \$
+rev 2 of file 2
+[>]>>>>>> 1\.1\.1\.2'
+
+               dokeep
+               cd ..
+               rm -rf first-dir
+               modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+               rm -r import-dir
+               ;;
+
+
+
+       importb)
+         # More cvs import tests, especially -b option.
+
+         # OK, first we get some sources from the NetMunger project, and
+         # import them into the 1.1.1 vendor branch.
+         mkdir imp-dir
+         cd imp-dir
+         echo 'OpenMunger sources' >file1
+         echo 'OpenMunger sources' >file2
+         dotest_sort importb-1 \
+"${testcvs} import -m add first-dir openmunger openmunger-1_0" \
+"
+
+N first-dir/file1
+N first-dir/file2
+No conflicts created by this import"
+         cd ..
+         rm -r imp-dir
+
+         # Now we put the sources we get from FreeMunger into 1.1.3
+         mkdir imp-dir
+         cd imp-dir
+         echo 'FreeMunger sources' >file1
+         echo 'FreeMunger sources' >file2
+         # Not completely sure how the conflict detection is supposed to
+         # be working here (haven't really thought about it).
+         # We use an explicit -d option to test that it is reflected
+         # in the suggested checkout.
+         dotest_sort importb-2 \
+"$testcvs -d '$CVSROOT' import -m add -b 1.1.3 \
+          first-dir freemunger freemunger-1_0" \
+"
+
+
+ ${CPROG} -d ${CVSROOT} checkout -j<prev_rel_tag> -jfreemunger-1_0 first-dir
+2 conflicts created by this import.
+C first-dir/file1
+C first-dir/file2
+Use the following command to help the merge:"
+         cd ..
+         rm -r imp-dir
+
+         # Now a test of main branch import (into second-dir, not first-dir).
+         mkdir imp-dir
+         cd imp-dir
+         echo 'my own stuff' >mine1.c
+         echo 'my own stuff' >mine2.c
+         dotest_fail importb-3 \
+"${testcvs} import -m add -b 1 second-dir dummy really_dumb_y" \
+"$CPROG \[import aborted\]: Only numeric branch specifications with two dots 
are
+supported by import, not \`1'\.  For example: \`1\.1\.1'\."
+         : when we implement main-branch import, should be \
+"N second-dir/mine1\.c
+N second-dir/mine2\.c
+
+No conflicts created by this import"
+         cd ..
+         rm -r imp-dir
+
+         mkdir 1
+         cd 1
+         # when we implement main branch import, will want to 
+         # add "second-dir" here.
+         dotest importb-4 "${testcvs} -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2"
+         cd first-dir
+         dotest importb-5 "${testcvs} -q log file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch: 1\.1\.1
+locks: strict
+access list:
+symbolic names:
+       freemunger-1_0: 1\.1\.3\.1
+       freemunger: 1\.1\.3
+       openmunger-1_0: 1\.1\.1\.1
+       openmunger: 1\.1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;  1\.1\.3;
+Initial revision
+----------------------------
+revision 1\.1\.3\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+add
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+add
+============================================================================="
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       importc)
+         # Test importing a bunch o' files in a bunch o' directories.
+         # Also the -d option.
+
+         # Set a predictable time zone for these tests.
+         save_TZ=$TZ
+         TZ=UTC0; export TZ
+
+         mkdir 1; cd 1
+         mkdir adir bdir cdir
+         mkdir adir/sub1 adir/sub2
+         mkdir adir/sub1/ssdir
+         mkdir bdir/subdir
+         touch adir/sub1/file1 adir/sub2/file2 adir/sub1/ssdir/ssfile
+         touch -t ${TOUCH1971} bdir/subdir/file1
+         touch -t ${TOUCH2034} cdir/cfile
+         dotest_sort importc-1 \
+"${testcvs} import -d -m import-it first-dir vendor release" \
+"
+
+N first-dir/adir/sub1/file1
+N first-dir/adir/sub1/ssdir/ssfile
+N first-dir/adir/sub2/file2
+N first-dir/bdir/subdir/file1
+N first-dir/cdir/cfile
+No conflicts created by this import
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/first-dir/cdir"
+         cd ..
+         mkdir 2; cd 2
+         dotest importc-2 "${testcvs} -q co first-dir" \
+"U first-dir/adir/sub1/file1
+U first-dir/adir/sub1/ssdir/ssfile
+U first-dir/adir/sub2/file2
+U first-dir/bdir/subdir/file1
+U first-dir/cdir/cfile"
+         cd first-dir
+         dotest importc-3 "${testcvs} update adir/sub1" \
+"${SPROG} update: Updating adir/sub1
+${SPROG} update: Updating adir/sub1/ssdir"
+         dotest importc-4 "${testcvs} update adir/sub1 bdir/subdir" \
+"${SPROG} update: Updating adir/sub1
+${SPROG} update: Updating adir/sub1/ssdir
+${SPROG} update: Updating bdir/subdir"
+
+         echo modify >>cdir/cfile
+         dotest importc-5 \
+"${testcvs} -q rtag -b -r release wip_test first-dir" ""
+         dotest importc-6 "${testcvs} -q update -r wip_test" "M cdir/cfile"
+
+         # This used to fail in local mode
+         dotest importc-7 "${testcvs} -q ci -m modify -r wip_test" \
+"$CVSROOT_DIRNAME/first-dir/cdir/cfile,v  <--  cdir/cfile
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1"
+
+         # TODO: should also be testing "import -d" when we update
+         # an existing file.
+         dotest importc-8 "${testcvs} -q log cdir/cfile" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v
+Working file: cdir/cfile
+head: 1\.1
+branch: 1\.1\.1
+locks: strict
+access list:
+symbolic names:
+       wip_test: 1\.1\.1\.1\.0\.2
+       release: 1\.1\.1\.1
+       vendor: 1\.1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE2034};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;
+Initial revision
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE2034};  author: ${username};  state: Exp;  lines: ${PLUS}0 
-0;  commitid: ${commitid};
+branches:  1\.1\.1\.1\.2;
+import-it
+----------------------------
+revision 1\.1\.1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify
+============================================================================="
+
+         dotest importc-9 "${testcvs} -q log bdir/subdir/file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/bdir/subdir/file1,v
+Working file: bdir/subdir/file1
+head: 1\.1
+branch: 1\.1\.1
+locks: strict
+access list:
+symbolic names:
+       wip_test: 1\.1\.1\.1\.0\.2
+       release: 1\.1\.1\.1
+       vendor: 1\.1\.1
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE1971};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;
+Initial revision
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE1971};  author: ${username};  state: Exp;  lines: ${PLUS}0 
-0;  commitid: ${commitid};
+import-it
+============================================================================="
+         cd ..
+
+         # Now tests of absolute pathnames and .. as repository directory.
+         cd ../1
+         dotest_fail importc-10 \
+"${testcvs} import -m imp ../other vendor release2" \
+"${CPROG} \[import aborted\]: directory \.\./other not relative within the 
repository"
+         dotest_fail importc-11 \
+"${testcvs} import -m imp ${TESTDIR}/other vendor release3" \
+"${CPROG} \[import aborted\]: directory ${TESTDIR}/other not relative within 
the repository"
+         dotest_fail importc-12 "test -d ${TESTDIR}/other" ""
+
+         dokeep
+         TZ=$save_TZ
+         cd ..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       importX)
+         # More cvs import tests, especially -X option.
+
+         # OK, first we get some sources from the Munger version 0.9,
+         # and import them into the 1.1.1 vendor branch (w/o -X).  (This
+         # will be used to test subsequent imports of the same file
+         # with -X.)
+         mkdir imp-dir
+         cd imp-dir
+         echo 'Munger sources 0.9' >file0
+         dotest_sort importX-1 \
+"${testcvs} import -m add first-dir munger munger-0_9" \
+"
+
+N first-dir/file0
+No conflicts created by this import"
+         cd ..
+         rm -r imp-dir
+
+         # Now we put the sources we get from Munger version 1.0 on
+         # to the 1.1.1 vendor branch using -X.  (This imports a new
+         # version of file0, and imports all-new files file1 and file2.)
+         mkdir imp-dir
+         cd imp-dir
+         echo 'Munger sources' >file0
+         echo 'Munger sources' >file1
+         echo 'Munger sources' >file2
+         dotest_sort importX-2 \
+"${testcvs} import -X -m add first-dir munger munger-1_0" \
+"
+
+
+ ${CPROG} checkout -j<prev_rel_tag> -jmunger-1_0 first-dir
+N first-dir/file1
+N first-dir/file2
+No conflicts created by this import.
+U first-dir/file0
+Use the following command to help the merge:"
+         cd ..
+         rm -r imp-dir
+
+         # Now we put the sources we get from Munger version 1.1 on
+         # to the 1.1.1 vendor branch using -X.  (This imports unchanged
+         # versions of file0 and file2, a changed version of file1, and
+         # an all-new file3.)
+         mkdir imp-dir
+         cd imp-dir
+         echo 'Munger sources' >file0
+         echo 'Munger sources 1.1' >file1
+         echo 'Munger sources' >file2
+         echo 'Munger sources 1.1' >file3
+         dotest_sort importX-3 \
+"$testcvs -d '$CVSROOT' import -X -m add first-dir munger munger-1_1" \
+"
+
+
+ ${CPROG} -d ${CVSROOT} checkout -j<prev_rel_tag> -jmunger-1_1 first-dir
+1 conflicts created by this import.
+C first-dir/file1
+N first-dir/file3
+U first-dir/file0
+U first-dir/file2
+Use the following command to help the merge:"
+         cd ..
+         rm -r imp-dir
+
+         mkdir 1
+         cd 1
+         # only file0 should be checked out
+         dotest importX-4 "${testcvs} -q co first-dir" \
+"U first-dir/file0"
+         cd first-dir
+
+         dotest importX-5 "${testcvs} -q log file0" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file0,v
+Working file: file0
+head: 1\.1
+branch: 1\.1\.1
+locks: strict
+access list:
+symbolic names:
+       munger-1_1: 1\.1\.1\.2
+       munger-1_0: 1\.1\.1\.2
+       munger-0_9: 1\.1\.1\.1
+       munger: 1\.1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;
+Initial revision
+----------------------------
+revision 1\.1\.1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+add
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+add
+============================================================================="
+
+         dotest importX-6 "${testcvs} -q log file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+Working file: file1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       munger-1_1: 1\.1\.1\.2
+       munger-1_0: 1\.1\.1\.1
+       munger: 1\.1\.1
+keyword substitution: kv
+total revisions: 4;    selected revisions: 4
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: dead;  lines: ${PLUS}0 -0; 
 commitid: ${commitid};
+Revision 1\.1 was added on the vendor branch\.
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;
+Initial revision
+----------------------------
+revision 1\.1\.1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+add
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+add
+============================================================================="
+
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf ${CVSROOT_DIRNAME}/first-dir
+         ;;
+
+
+
+       importX2)
+         # Test ImportNewFilesToVendorBranchOnly config file option.
+
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir wnt
+         cd wnt
+
+         dotest importX2-1 "${testcvs} -q co CVSROOT" "U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+          echo "ImportNewFilesToVendorBranchOnly=yes" >> config
+
+         dotest importX2-2 "$testcvs -q ci -m force-cvs-import-X" \
+"$TESTDIR/cvsroot/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ../..
+
+         # Import a sources file, but do NOT specify -X.  The new file
+         # should be killed, anyway (because of the config option).
+         mkdir imp-dir
+         cd imp-dir
+         echo 'source' >file1
+         dotest_sort importX2-3 \
+"${testcvs} import -m add first-dir source source-1_0" \
+"
+
+
+ ${CPROG} checkout -j<prev_rel_tag> -jsource-1_0 first-dir
+N first-dir/file1
+No conflicts created by this import.
+Use the following command to help the merge:"
+         cd ..
+         rm -r imp-dir
+
+         mkdir 1
+         cd 1
+         # **nothing** should be checked out**
+         dotest importX2-4 "${testcvs} -q co first-dir" ""
+
+         cd first-dir
+         dotest importX2-5 "${testcvs} -q log file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+Working file: file1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       source-1_0: 1\.1\.1\.1
+       source: 1\.1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: dead;  lines: ${PLUS}0 -0; 
 commitid: ${commitid};
+Revision 1\.1 was added on the vendor branch\.
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.1;
+Initial revision
+----------------------------
+revision 1\.1\.1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+add
+============================================================================="
+
+         dokeep
+         cd ../..
+         restore_adm
+         rm -r 1
+         rm -rf wnt
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       import-CVS)
+         mkdir import-CVS
+         cd import-CVS
+         touch file1 file2 file3
+         dotest_fail import-CVS-1 "$testcvs import CVS vtag rtag" \
+"$CPROG import: The word \`CVS' is reserved by CVS and may not be used
+$CPROG \[import aborted\]: as a directory in a path or as a file name\."
+         mkdir sdir
+         mkdir sdir/CVS
+         touch sdir/CVS/file4 sdir/CVS/file5 sdir/file6 sdir/file7
+         # Calling the imported directory import-CVS is dual purpose in the
+         # following test.  It makes sure the path test which matched above
+         # wasn't too strict.
+         dotest_sort import-CVS-2 \
+"$testcvs import -I! -mimport import-CVS vtag rtag" \
+"
+
+I import-CVS/sdir/CVS
+N import-CVS/file1
+N import-CVS/file2
+N import-CVS/file3
+N import-CVS/sdir/file6
+N import-CVS/sdir/file7
+No conflicts created by this import
+$SPROG import: Importing $CVSROOT_DIRNAME/import-CVS/sdir"
+
+         dokeep
+         cd ..
+         rm -r import-CVS
+         modify_repo rm -rf $CVSROOT_DIRNAME/import-CVS
+         ;;
+
+
+
+       import-quirks)
+         # Short tests of quirky import behavior.
+         #
+         # For a list of other import tests with short descriptions, see the
+         # comment header of the "import" test.
+         mkdir import-quirks
+         cd import-quirks
+         touch file1 file2 file3
+
+         # CVS prior to 1.11.18 and 1.12.10 used to happily import to
+         # "branch 1.1", creating RCS archives with revisions like,
+         # "1.1..1".  That double-dot is *not* a typo.
+         dotest_fail import-quirks-1 \
+"$testcvs import -b1.1. -mbad-bad-bad import-quirks VB RT" \
+"$CPROG \[import aborted\]: Only numeric branch specifications with two dots 
are
+supported by import, not \`1\.1\.'\.  For example: \`1\.1\.1'\."
+
+         dotest_fail import-quirks-2 \
+"$testcvs import -b1.1.1.. -mbad-bad-bad import-quirks VB RT" \
+"$CPROG \[import aborted\]: Only numeric branch specifications with two dots 
are
+supported by import, not \`1\.1\.1\.\.'\.  For example: \`1\.1\.1'\."
+
+         # Try a few odd numbers.  This is hardly comprehensive.
+         dotest_sort import-quirks-2 \
+"$testcvs import -b10.10.101 -mthis-ones-ok import-quirks-2 VB RT" \
+"
+
+N import-quirks-2/file1
+N import-quirks-2/file2
+N import-quirks-2/file3
+No conflicts created by this import"
+
+         dotest_sort import-quirks-3 \
+"$testcvs import -b2345678901.2345678901.2345678901 -mthis-ones-ok 
import-quirks-3 VB RT" \
+"
+
+N import-quirks-3/file1
+N import-quirks-3/file2
+N import-quirks-3/file3
+No conflicts created by this import"
+
+         dotest_sort import-quirks-4 \
+"$testcvs import -b1.1.2 -mthis-ones-ok import-quirks-4 VB RT" \
+"
+
+N import-quirks-4/file1
+N import-quirks-4/file2
+N import-quirks-4/file3
+No conflicts created by this import"
+
+         dokeep
+         cd ..
+         rm -r import-quirks
+         rm -rf $CVSROOT_DIRNAME/import-quirks-2 \
+                $CVSROOT_DIRNAME/import-quirks-3 \
+                $CVSROOT_DIRNAME/import-quirks-4
+         ;;
+
+
+
+       import-after-initial)
+         # Properly handle the case in which the first version of a
+         # file is created by a regular cvs add and commit, and there
+         # is a subsequent cvs import of the same file.  cvs update with
+         # a date tag must resort to searching the vendor branch only if
+         # the initial version of the file was created at the same time
+         # as the initial version on the vendor branch.
+
+         mkdir 1; cd 1
+         module=x
+
+         echo > unused-file
+
+         # Create the module.
+         dotest import-after-initial-1 \
+           "$testcvs -Q import -m. $module X Y" ''
+
+         file=m
+         # Check it out and add a file.
+         dotest import-after-initial-2 "$testcvs -Q co $module" ''
+         cd $module
+         echo original > $file
+         dotest import-after-initial-3 "${testcvs} -Q add $file" ""
+         dotest import-after-initial-4 "$testcvs -Q ci -m. $file"
+
+         # Delay a little so the following import isn't done in the same
+         # second as the preceding commit.
+         sleep 2
+
+         # Do the first import of $file *after* $file already has an
+         # initial version.
+         mkdir sub
+         cd sub
+         echo newer-via-import > $file
+         dotest import-after-initial-5 \
+           "$testcvs -Q import -m. $module X Y2" ''
+         cd ..
+
+         # Sleep a second so we're sure to be after the second of the import.
+         sleep 1
+
+         dotest import-after-initial-6 \
+           "$testcvs -Q update -p -D now $file" 'original'
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+        branch-after-import)
+         # Test branching after an import via both cvs tag -b and
+         # cvs add to verify that the HEAD remains at 1.1.1.1
+         # This was a FreeBSD bug documented at the URL:
+         # http://www.freebsd.org/cgi/query-pr.cgi?pr=4033
+
+         mkdir branch-after-import
+         cd branch-after-import
+
+         # OK, first we get some sources from the NetMunger project,
+         # and import them into the 1.1.1 vendor branch.
+         mkdir imp-dir
+         cd imp-dir
+         echo 'OpenMunger sources' >file1
+         echo 'OpenMunger sources' >file2
+         dotest_sort branch-after-import-1 \
+"${testcvs} import -m add first-dir openmunger openmunger-1_0" \
+'
+
+N first-dir/file1
+N first-dir/file2
+No conflicts created by this import'
+         cd ..
+
+         # Next checkout the new module
+         dotest branch-after-import-2 \
+"${testcvs} -q co first-dir" \
+'U first-dir/file1
+U first-dir/file2'
+         cd first-dir
+         # Branch tag the file1 and cvs add file2,
+         # the branch should remain the same in both cases
+         # such that a new import will not require a conflict
+         # resolution.
+         dotest branch-after-import-3 \
+"${testcvs} tag -b TESTTOTRON file1" \
+'T file1'
+         dotest branch-after-import-4 \
+"${testcvs} -q update -r TESTTOTRON" \
+"${SPROG} update: \`file2' is no longer in the repository"
+
+         cp ../imp-dir/file2 .
+         dotest branch-after-import-5 \
+"${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition on branch .TESTTOTRON.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         dotest branch-after-import-6 \
+"$testcvs commit -m cvs-add file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.1\.1\.2\.2; previous revision: 1\.1\.1\.1\.2\.1"
+
+         dokeep
+         cd ../..
+         rm -rf branch-after-import
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       join)
+         # Test doing joins which involve adding and removing files.
+         #   Variety of scenarios (see list below), in the context of:
+         #     * merge changes from T1 to T2 into the main line
+         #     * merge changes from branch 'branch' into the main line
+         #     * merge changes from branch 'branch' into branch 'br2'.
+         # See also binfile2, which does similar things with binary files.
+         # See also join2, which tests joining (and update -A) on only
+         # a single file, rather than a directory.
+         # See also rmadd2, which tests -j cases not involving branches
+         #   (e.g. undoing a commit)
+         # See also join3, which tests some cases involving the greatest
+         # common ancestor.  Here is a list of tests according to branch
+         # topology:
+         #
+         # --->bp---->trunk          too many to mention
+         #     \----->branch
+         #
+         #     /----->branch1
+         # --->bp---->trunk          multibranch, multibranch2
+         #     \----->branch2
+         #
+         # --->bp1----->bp2---->trunk   join3
+         #     \->br1   \->br2
+         #
+         # --->bp1----->trunk
+         #     \----bp2---->branch                branches
+         #          \------>branch-of-branch
+
+         # We check merging changes from T1 to T2 into the main line.
+         # Here are the interesting cases I can think of:
+         #   1) File added between T1 and T2, not on main line.
+         #      File should be marked for addition.
+         #   2) File added between T1 and T2, also added on main line.
+         #      Conflict.
+         #   3) File removed between T1 and T2, unchanged on main line.
+         #      File should be marked for removal.
+         #   4) File removed between T1 and T2, modified on main line.
+         #      If mod checked in, file should be marked for removal.
+         #      If mod still in working directory, conflict.
+         #   5) File removed between T1 and T2, was never on main line.
+         #      Nothing should happen.
+         #   6) File removed between T1 and T2, also removed on main line.
+         #      Nothing should happen.
+         #   7) File not added between T1 and T2, added on main line.
+         #      Nothing should happen.
+         #   8) File not modified between T1 and T2, removed on main line.
+         #      Nothing should happen.
+         #   9) File modified between T1 and T2, removed on main line.
+         #      Conflict.
+         #  10) File was never on branch, removed on main line.
+         #      Nothing should happen.
+
+         # We also check merging changes from a branch into the main
+         # line.  Here are the interesting cases:
+         #   1) File added on branch, not on main line.
+         #      File should be marked for addition.
+         #   2) File added on branch, also added on main line.
+         #      Conflict.
+         #   3) File removed on branch, unchanged on main line.
+         #      File should be marked for removal.
+         #   4) File removed on branch, modified on main line.
+         #      Conflict.
+         #   5) File removed on branch, was never on main line.
+         #      Nothing should happen.
+         #   6) File removed on branch, also removed on main line.
+         #      Nothing should happen.
+         #   7) File added on main line, not added on branch.
+         #      Nothing should happen.
+         #   8) File removed on main line, not modified on branch.
+         #      Nothing should happen.
+         #   9) File modified on branch, removed on main line.
+         #      Conflict.
+         #  10) File was never on branch, removed on main line.
+         #      Nothing should happen.
+
+         # In the tests below, fileN represents case N in the above
+         # lists.
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+         dotest join-1 "$testcvs -q co first-dir"
+
+         cd first-dir
+
+         # Add two files.
+         echo 'first revision of file3' > file3
+         echo 'first revision of file4' > file4
+         echo 'first revision of file6' > file6
+         echo 'first revision of file8' > file8
+         echo 'first revision of file9' > file9
+         dotest join-2 "${testcvs} add file3 file4 file6 file8 file9" \
+"${SPROG}"' add: scheduling file `file3'\'' for addition
+'"${SPROG}"' add: scheduling file `file4'\'' for addition
+'"${SPROG}"' add: scheduling file `file6'\'' for addition
+'"${SPROG}"' add: scheduling file `file8'\'' for addition
+'"${SPROG}"' add: scheduling file `file9'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+
+         dotest join-3 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file6,v  <--  file6
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file8,v  <--  file8
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file9,v  <--  file9
+initial revision: 1\.1"
+
+         # Make a branch.
+         dotest join-4 "${testcvs} -q tag -b branch ." \
+'T file3
+T file4
+T file6
+T file8
+T file9'
+
+         # Add file2, file7, and file10, modify file4, and remove
+         # file6, file8, and file9.
+         echo 'first revision of file2' > file2
+         echo 'second revision of file4' > file4
+         echo 'first revision of file7' > file7
+         rm file6 file8 file9
+         echo 'first revision of file10' > file10
+         dotest join-5 "${testcvs} add file2 file7 file10" \
+"${SPROG}"' add: scheduling file `file2'\'' for addition
+'"${SPROG}"' add: scheduling file `file7'\'' for addition
+'"${SPROG}"' add: scheduling file `file10'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+         dotest join-6 "${testcvs} rm file6 file8 file9" \
+"${SPROG}"' remove: scheduling `file6'\'' for removal
+'"${SPROG}"' remove: scheduling `file8'\'' for removal
+'"${SPROG}"' remove: scheduling `file9'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files 
permanently'
+         dotest join-7 "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/file10,v  <--  file10
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file6,v  <--  file6
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file7,v  <--  file7
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file8,v  <--  file8
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file9,v  <--  file9
+new revision: delete; previous revision: 1\.1"
+
+         # Remove file10
+         dotest join-7a "${testcvs} rm -f file10" \
+"${SPROG}"' remove: scheduling `file10'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove this file permanently'
+         dotest join-7b "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/file10,v  <--  file10
+new revision: delete; previous revision: 1\.1"
+
+         # Check out the branch.
+         cd ../..
+         mkdir 2
+         cd 2
+         dotest join-8 "${testcvs} -q co -r branch first-dir" \
+'U first-dir/file3
+U first-dir/file4
+U first-dir/file6
+U first-dir/file8
+U first-dir/file9'
+
+         cd first-dir
+
+         # Modify the files on the branch, so that T1 is not an
+         # ancestor of the main line, and add file5
+         echo 'first branch revision of file3' > file3
+         echo 'first branch revision of file4' > file4
+         echo 'first branch revision of file5' > file5
+         echo 'first branch revision of file6' > file6
+         echo 'first branch revision of file9' > file9
+         dotest join-9 "${testcvs} add file5" \
+"${SPROG}"' add: scheduling file `file5'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest join-10 "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file5,v  <--  file5
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file6,v  <--  file6
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file9,v  <--  file9
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # Tag the current revisions on the branch.
+         dotest join-11 "${testcvs} -q tag T1 ." \
+'T file3
+T file4
+T file5
+T file6
+T file8
+T file9'
+
+         # Add file1 and file2, modify file9, and remove the other files.
+         echo 'first branch revision of file1' > file1
+         echo 'first branch revision of file2' > file2
+         echo 'second branch revision of file9' > file9
+         rm file3 file4 file5 file6
+         dotest join-12 "${testcvs} add file1 file2" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+         dotest join-13 "${testcvs} rm file3 file4 file5 file6" \
+"${SPROG}"' remove: scheduling `file3'\'' for removal
+'"${SPROG}"' remove: scheduling `file4'\'' for removal
+'"${SPROG}"' remove: scheduling `file5'\'' for removal
+'"${SPROG}"' remove: scheduling `file6'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files 
permanently'
+         dotest join-14 "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/Attic/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file5,v  <--  file5
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file6,v  <--  file6
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file9,v  <--  file9
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+
+         # Tag the current revisions on the branch.
+         dotest join-15 "${testcvs} -q tag T2 ." \
+'T file1
+T file2
+T file8
+T file9'
+
+         # Do a checkout with a merge.
+         cd ../..
+         mkdir 3
+         cd 3
+         dotest join-16 "$testcvs -q co -jT1 -jT2 first-dir" \
+"$SPROG checkout: scheduling addition from revision 1\.1\.2\.1 of 
\`first-dir/file1'\.
+U first-dir/file2
+$SPROG checkout: file first-dir/file2 exists, but has been added in revision T2
+U first-dir/file3
+$SPROG checkout: scheduling \`first-dir/file3' for removal
+U first-dir/file4
+$SPROG checkout: scheduling \`first-dir/file4' for removal
+U first-dir/file7
+$SPROG checkout: file first-dir/file9 does not exist, but is present in 
revision T2"
+
+         # Verify that the right changes have been scheduled.
+         cd first-dir
+         dotest join-17 "${testcvs} -q update" \
+'A file1
+R file3
+R file4'
+
+         # Modify file4 locally, and do an update with a merge.
+         cd ../../1/first-dir
+         echo 'third revision of file4' > file4
+         dotest join-18 "${testcvs} -q update -jT1 -jT2 ." \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`file1'\.
+$SPROG update: file file2 exists, but has been added in revision T2
+$SPROG update: scheduling \`file3' for removal
+M file4
+$SPROG update: file file4 is locally modified, but has been removed in 
revision T2
+$SPROG update: file file9 does not exist, but is present in revision T2"
+
+         # Verify that the right changes have been scheduled.
+         dotest join-19 "${testcvs} -q update" \
+'A file1
+R file3
+M file4'
+
+         # Do a checkout with a merge from a single revision.
+
+         # FIXME: CVS currently gets this wrong.  file2 has been
+         # added on both the branch and the main line, and so should
+         # be regarded as a conflict.  However, given the way that
+         # CVS sets up the RCS file, there is no way to distinguish
+         # this case from the case of file2 having existed before the
+         # branch was made.  This could be fixed by reserving
+         # a revision somewhere, perhaps 1.1, as an always dead
+         # revision which can be used as the source for files added
+         # on branches.
+         cd ../../3
+         rm -rf first-dir
+         dotest join-20 "$testcvs -q co -jbranch first-dir" \
+"$SPROG checkout: scheduling addition from revision 1\.1\.2\.1 of 
\`first-dir/file1'\.
+U first-dir/file2
+Merging differences between 1\.1 and 1\.1\.2\.2 into \`first-dir/file2'
+M first-dir/file2
+U first-dir/file3
+$SPROG checkout: scheduling \`first-dir/file3' for removal
+U first-dir/file4
+$SPROG checkout: file first-dir/file4 has been modified, but has been removed 
in revision branch
+U first-dir/file7
+$SPROG checkout: file first-dir/file9 does not exist, but is present in 
revision branch"
+
+         # Verify that the right changes have been scheduled.
+         # The M file2 line is a bug; see above join-20.
+         cd first-dir
+         dotest join-21 "${testcvs} -q update" \
+'A file1
+M file2
+R file3'
+
+         # Checkout the main line again.
+         cd ../../1
+         rm -rf first-dir
+         dotest join-22 "${testcvs} -q co first-dir" \
+'U first-dir/file2
+U first-dir/file3
+U first-dir/file4
+U first-dir/file7'
+
+         # Modify file4 locally, and do an update with a merge from a
+         # single revision.
+         # The file2 handling is a bug; see above join-20.
+         cd first-dir
+         echo 'third revision of file4' > file4
+         dotest join-23 "${testcvs} -q update -jbranch ." \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`file1'\.
+$SPROG update: Replacing \`file2' with contents of revision 1\.1\.2\.2\.
+M file2
+$SPROG update: scheduling \`file3' for removal
+M file4
+$SPROG update: file file4 is locally modified, but has been removed in 
revision branch
+$SPROG update: file file9 does not exist, but is present in revision branch"
+
+         # Verify that the right changes have been scheduled.
+         # The M file2 line is a bug; see above join-20
+         dotest join-24 "${testcvs} -q update" \
+'A file1
+M file2
+R file3
+M file4'
+
+         cd ..
+
+         # Checkout the main line again and make a new branch which we
+         # merge to.
+         rm -rf first-dir
+         dotest join-25 "${testcvs} -q co first-dir" \
+'U first-dir/file2
+U first-dir/file3
+U first-dir/file4
+U first-dir/file7'
+         cd first-dir
+         dotest join-26 "${testcvs} -q tag -b br2" \
+"T file2
+T file3
+T file4
+T file7"
+         dotest join-27 "${testcvs} -q update -r br2" ""
+         # The handling of file8 and file9 here look fishy to me.  I don't
+         # see why it should be different from the case where we merge to
+         # the trunk (e.g. join-23).
+         dotest join-28 "$testcvs -q update -j branch" \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`file1'\.
+$SPROG update: Replacing \`file2' with contents of revision 1\.1\.2\.2\.
+M file2
+$SPROG update: scheduling \`file3' for removal
+$SPROG update: file file4 has been modified, but has been removed in revision 
branch
+$SPROG update: scheduling addition from revision 1\.1 of \`file8'\.
+$SPROG update: scheduling addition from revision 1\.1\.2\.2 of \`file9'\."
+         # Verify that the right changes have been scheduled.
+         dotest join-29 "${testcvs} -q update" \
+"A file1
+M file2
+R file3
+A file8
+A file9"
+
+         # Checkout the mainline again to try updating and merging between two
+         # branches in the same step
+         # this seems a likely scenario - the user finishes up on branch and
+         # updates to br2 and merges in the same step - and there was a bug
+         # once that if the file was removed in the update then it wouldn't be
+         # readded in the merge
+         cd ..
+         rm -rf first-dir
+         dotest join-twobranch-1 "${testcvs} -q co -rbranch first-dir" \
+'U first-dir/file1
+U first-dir/file2
+U first-dir/file8
+U first-dir/file9'
+         cd first-dir
+         dotest join-twobranch-2 "$testcvs -q update -rbr2 -jbranch" \
+"$SPROG update: \`file1' is no longer in the repository
+$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`file1'\.
+U file2
+$SPROG update: Replacing \`file2' with contents of revision 1\.1\.2\.2\.
+M file2
+U file3
+$SPROG update: scheduling \`file3' for removal
+U file4
+$SPROG update: file file4 has been modified, but has been removed in revision 
branch
+U file7
+$SPROG update: \`file8' is no longer in the repository
+$SPROG update: scheduling addition from revision 1\.1 of \`file8'\.
+$SPROG update: \`file9' is no longer in the repository
+$SPROG update: scheduling addition from revision 1\.1\.2\.2 of \`file9'\."
+         # Verify that the right changes have been scheduled.
+         dotest join-twobranch-3 "${testcvs} -q update" \
+"A file1
+M file2
+R file3
+A file8
+A file9"
+
+         # Checkout the mainline again to try merging from the trunk
+         # to a branch.
+         cd ..
+         rm -rf first-dir
+         dotest join-30 "${testcvs} -q co first-dir" \
+'U first-dir/file2
+U first-dir/file3
+U first-dir/file4
+U first-dir/file7'
+         cd first-dir
+
+         # Tag the current revisions on the trunk.
+         dotest join-31 "${testcvs} -q tag T3 ." \
+'T file2
+T file3
+T file4
+T file7'
+
+         # Modify file7.
+         echo 'second revision of file7' > file7
+         dotest join-32 "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/file7,v  <--  file7
+new revision: 1\.2; previous revision: 1\.1"
+
+         # And Tag again.
+         dotest join-33 "${testcvs} -q tag T4 ." \
+'T file2
+T file3
+T file4
+T file7'
+
+         # Now update branch to T3.
+         cd ../../2/first-dir
+         dotest join-34 "$testcvs -q up -jT3" \
+"$SPROG update: file file4 does not exist, but is present in revision T3
+$SPROG update: scheduling addition from revision 1\.1 of \`file7'\."
+
+         # Verify that the right changes have been scheduled.
+         dotest join-35 "${testcvs} -q update" \
+'A file7'
+
+         # Now update to T4.
+         # This is probably a bug, although in this particular case it just
+         # happens to do the right thing; see above join-20.
+         dotest join-36 "${testcvs} -q up -j T3 -j T4" \
+"A file7
+Merging differences between 1\.1 and 1\.2 into \`file7'
+M file7"
+
+         # Verify that the right changes have been scheduled.
+         dotest join-37 "${testcvs} -q update" \
+'A file7'
+
+         dokeep
+         cd ../..
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       join2)
+         # More joining tests.
+
+         # First the usual setup; create a directory first-dir, a file
+         # first-dir/file1, and a branch br1.
+         mkdir 1; cd 1
+         dotest join2-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest join2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+         echo 'initial contents of file1' >file1
+         dotest join2-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest join2-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest join2-5 "${testcvs} -q tag -b br1" "T file1"
+         dotest join2-6 "${testcvs} -q update -r br1" ""
+         echo 'modify on branch' >>file1
+         touch bradd
+         dotest join2-6a "${testcvs} add bradd" \
+"${SPROG} add: scheduling file .bradd. for addition on branch .br1.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest join2-7 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/Attic/bradd,v  <--  bradd
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # Here is the unusual/pathological part.  We switch back to
+         # the trunk *for file1 only*, not for the whole directory.
+         dotest join2-8 "${testcvs} -q update -A file1" 'U file1'
+         dotest join2-9 "${testcvs} -q status file1" \
+"===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest join2-10 "cat CVS/Tag" "Tbr1"
+
+         dotest join2-11 "${testcvs} -q update -j br1 file1" \
+"$SPROG update: Replacing \`file1' with contents of revision 1\.1\.2\.1\.
+M file1"
+         dotest join2-12 "cat file1" "initial contents of file1
+modify on branch"
+         # We should have no sticky tag on file1
+         dotest join2-13 "${testcvs} -q status file1" \
+"===================================================================
+File: file1                    Status: Locally Modified
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest join2-14 "cat CVS/Tag" "Tbr1"
+         # And the checkin should go to the trunk
+         dotest join2-15 "${testcvs} -q ci -m modify file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+
+         # OK, the above is all well and good and has worked for some
+         # time.  Now try the case where the file had been added on
+         # the branch.
+         dotest join2-16 "${testcvs} -q update -r br1" "U file1"
+         # The workaround is to update the whole directory.
+         # The non-circumvented version won't work.  The reason is that
+         # update removes the entry from CVS/Entries, so of course we get
+         # the tag from CVS/Tag and not Entries.  I suppose maybe
+         # we could invent some new format in Entries which would handle
+         # this, but doing so, and handling it properly throughout
+         # CVS, would be a lot of work and I'm not sure this case justifies
+         # it.
+         dotest join2-17-circumvent "${testcvs} -q update -A" \
+"${SPROG} update: \`bradd' is no longer in the repository
+U file1"
+:        dotest join2-17 "${testcvs} -q update -A bradd" \
+"${SPROG} update: warning: \`bradd' is not (any longer) pertinent"
+         dotest join2-18 "$testcvs -q update -j br1 bradd" \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`bradd'\."
+         dotest join2-19 "${testcvs} -q status bradd" \
+"===================================================================
+File: bradd                    Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        1\.1    
${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest join2-20 "${testcvs} -q ci -m modify bradd" \
+"$CVSROOT_DIRNAME/first-dir/bradd,v  <--  bradd
+new revision: 1\.2; previous revision: 1\.1"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       join3)
+         # See "join" for a list of other joining/branching tests.
+         # First the usual setup; create a directory first-dir, a file
+         # first-dir/file1, and a branch br1.
+         mkdir 1; cd 1
+         dotest join3-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest join3-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         echo 'initial contents of file1' >file1
+         dotest join3-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest join3-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest join3-5 "${testcvs} -q tag -b br1" "T file1"
+         dotest join3-6 "${testcvs} -q update -r br1" ""
+         echo 'br1:line1' >>file1
+         dotest join3-7 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # Now back to the trunk for:
+         # another revision and another branch for file1.
+         # add file2, which will exist on trunk and br2 but not br1.
+         dotest join3-8 "${testcvs} -q update -A" "U file1"
+         echo 'trunk:line1' > file2
+         dotest join3-8a "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         echo 'trunk:line1' >>file1
+         dotest join3-9 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         dotest join3-10 "${testcvs} -q tag -b br2" "T file1
+T file2"
+
+         # Before we actually have any revision on br2, let's try a join
+         dotest join3-11 "${testcvs} -q update -r br1" "U file1
+${SPROG} update: \`file2' is no longer in the repository"
+         dotest join3-12 "$testcvs -q update -j br2" \
+"Merging differences between 1\.1 and 1\.2 into \`file1'
+$CPROG update: conflicts during merge
+C file1
+$SPROG update: scheduling addition from revision 1\.1 of \`file2'\."
+         dotest join3-13 "cat file1" \
+"initial contents of file1
+[<]<<<<<< file1
+br1:line1
+[=]======
+trunk:line1
+[>]>>>>>> 1\.2"
+         rm file1
+
+         # OK, we'll try the same thing with a revision on br2.
+         dotest join3-14 "$testcvs -q update -r br2 file1" \
+"$SPROG update: warning: \`file1' was lost
+U file1" "U file1"
+         echo 'br2:line1' >>file1
+         dotest join3-15 "${testcvs} -q ci -m modify file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2\.2\.1; previous revision: 1\.2"
+
+         # OK, now we can join br2 to br1
+         dotest join3-16 "${testcvs} -q update -r br1 file1" "U file1"
+         # It may seem odd, to merge a higher branch into a lower
+         # branch, but in fact CVS defines the ancestor as 1.1
+         # and so it merges both the 1.1->1.2 and 1.2->1.2.2.1 changes.
+         # This seems like a reasonably plausible behavior.
+         dotest join3-17 "${testcvs} -q update -j br2 file1" \
+"Merging differences between 1\.1 and 1\.2\.2\.1 into \`file1'
+$CPROG update: conflicts during merge
+C file1"
+         dotest join3-18 "cat file1" \
+"initial contents of file1
+[<]<<<<<< file1
+br1:line1
+[=]======
+trunk:line1
+br2:line1
+[>]>>>>>> 1\.2\.2\.1"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       join4)
+         # Like join, but with local (uncommitted) modifications.
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+         dotest join4-1 "${testcvs} -q co first-dir" ''
+
+         cd first-dir
+
+         # Add two files.
+         echo 'first revision of file3' > file3
+         echo 'first revision of file4' > file4
+         echo 'first revision of file6' > file6
+         echo 'first revision of file8' > file8
+         echo 'first revision of file9' > file9
+         dotest join4-2 "${testcvs} add file3 file4 file6 file8 file9" \
+"${SPROG}"' add: scheduling file `file3'\'' for addition
+'"${SPROG}"' add: scheduling file `file4'\'' for addition
+'"${SPROG}"' add: scheduling file `file6'\'' for addition
+'"${SPROG}"' add: scheduling file `file8'\'' for addition
+'"${SPROG}"' add: scheduling file `file9'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+
+         dotest join4-3 "${testcvs} -q commit -m add" \
+"$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file6,v  <--  file6
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file8,v  <--  file8
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file9,v  <--  file9
+initial revision: 1\.1"
+
+         # Make a branch.
+         dotest join4-4 "${testcvs} -q tag -b branch ." \
+'T file3
+T file4
+T file6
+T file8
+T file9'
+
+         # Add file10
+         echo 'first revision of file10' > file10
+         dotest join4-7a "${testcvs} add file10" \
+"${SPROG}"' add: scheduling file `file10'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest join4-7b "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/file10,v  <--  file10
+initial revision: 1\.1"
+
+         # Add file2 and file7, modify file4, and remove
+         # file6, file8, file9, and file10.
+         echo 'first revision of file2' > file2
+         echo 'second revision of file4' > file4
+         echo 'first revision of file7' > file7
+         rm file6 file8 file9 file10
+         dotest join4-5 "${testcvs} add file2 file7" \
+"${SPROG}"' add: scheduling file `file2'\'' for addition
+'"${SPROG}"' add: scheduling file `file7'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+         dotest join4-6 "${testcvs} rm file6 file8 file9 file10" \
+"${SPROG}"' remove: scheduling `file6'\'' for removal
+'"${SPROG}"' remove: scheduling `file8'\'' for removal
+'"${SPROG}"' remove: scheduling `file9'\'' for removal
+'"${SPROG}"' remove: scheduling `file10'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files 
permanently'
+
+         # Check out the branch.
+         cd ../..
+         mkdir 2
+         cd 2
+         dotest join4-8 "${testcvs} -q co -r branch first-dir" \
+'U first-dir/file3
+U first-dir/file4
+U first-dir/file6
+U first-dir/file8
+U first-dir/file9'
+
+         cd first-dir
+
+         # Modify the files on the branch, so that T1 is not an
+         # ancestor of the main line, and add file5
+         echo 'first branch revision of file3' > file3
+         echo 'first branch revision of file4' > file4
+         echo 'first branch revision of file5' > file5
+         echo 'first branch revision of file6' > file6
+         echo 'first branch revision of file9' > file9
+         dotest join4-9 "${testcvs} add file5" \
+"${SPROG}"' add: scheduling file `file5'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest join4-10 "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file5,v  <--  file5
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file6,v  <--  file6
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file9,v  <--  file9
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # Tag the current revisions on the branch.
+         dotest join4-11 "${testcvs} -q tag T1 ." \
+'T file3
+T file4
+T file5
+T file6
+T file8
+T file9'
+
+         # Add file1 and file2, modify file9, and remove the other files.
+         echo 'first branch revision of file1' > file1
+         echo 'first branch revision of file2' > file2
+         echo 'second branch revision of file9' > file9
+         rm file3 file4 file5 file6
+         dotest join4-12 "${testcvs} add file1 file2" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: scheduling file `file2'\'' for addition on branch `branch'\''
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+         dotest join4-13 "${testcvs} rm file3 file4 file5 file6" \
+"${SPROG}"' remove: scheduling `file3'\'' for removal
+'"${SPROG}"' remove: scheduling `file4'\'' for removal
+'"${SPROG}"' remove: scheduling `file5'\'' for removal
+'"${SPROG}"' remove: scheduling `file6'\'' for removal
+'"${SPROG}"' remove: use .'"${SPROG}"' commit. to remove these files 
permanently'
+         dotest join4-14 "${testcvs} -q ci -mx ." \
+"$CVSROOT_DIRNAME/first-dir/Attic/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file2,v  <--  file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file3,v  <--  file3
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/file4,v  <--  file4
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file5,v  <--  file5
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/file6,v  <--  file6
+new revision: delete; previous revision: 1\.1\.2\.1
+$CVSROOT_DIRNAME/first-dir/file9,v  <--  file9
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+
+         # Tag the current revisions on the branch.
+         dotest join4-15 "${testcvs} -q tag T2 ." \
+'T file1
+T file2
+T file8
+T file9'
+
+         # Modify file4 locally, and do an update with a merge.
+         cd ../../1/first-dir
+         echo 'third revision of file4' > file4
+         dotest join4-18 "$testcvs -q update -jT1 -jT2 ." \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.1 of \`file1'\.
+R file10
+A file2
+$SPROG update: file file2 exists, but has been added in revision T2
+$SPROG update: scheduling \`file3' for removal
+M file4
+$SPROG update: file file4 is locally modified, but has been removed in 
revision T2
+R file6
+A file7
+R file8
+R file9
+${SPROG} update: file file9 does not exist, but is present in revision T2"
+
+         # Verify that the right changes have been scheduled.
+         dotest join4-19 "${testcvs} -q update" \
+'A file1
+R file10
+A file2
+R file3
+M file4
+R file6
+A file7
+R file8
+R file9'
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       join5)
+         # This test verifies that CVS can handle filenames starting with a
+         # dash (`-') properly.  What used to happen was that CVS handled it
+         # just fine, until it went to pass them as arguments to the diff
+         # library, at which point it neglected to pass `--' before the file
+         # list, causing the diff library to attempt to interpret the file
+         # name as an argument.
+         mkdir join5; cd join5
+         mkdir 1; cd 1
+         dotest join5-init-1 "${testcvs} -Q co -l ."
+         mkdir join5
+         dotest join5-init-2 "${testcvs} -Q add join5"
+         cd join5
+         echo "there once was a file from harrisburg" >-file
+         echo "who's existance it seems was quiteabsurd" >>-file
+         dotest join5-init-3 "${testcvs} -Q add -- -file"
+         dotest join5-init-4 "${testcvs} -q ci -minitial" \
+"$CVSROOT_DIRNAME/join5/-file,v  <--  -file
+initial revision: 1\.1"
+         cd ../..
+
+         mkdir 2; cd 2
+         dotest join5-init-5 "${testcvs} -Q co join5"
+         cd join5
+         echo "it tested for free" >>-file
+         echo "when paid it should be" >>-file
+         dotest join5-init-4 "${testcvs} -q ci -msecond" \
+"$CVSROOT_DIRNAME/join5/-file,v  <--  -file
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../..
+
+         cd 1/join5
+         echo "but maybe it could charge bytheword" >>-file
+         # This is the test that used to spew complaints from diff3:
+         dotest join5-1 "$testcvs up" \
+"$SPROG update: Updating \.
+Merging differences between 1\.1 and 1\.2 into \`-file'
+$CPROG update: conflicts during merge
+C -file"
+
+         dokeep
+         cd ../../..
+         rm -rf join5
+         modify_repo rm -rf $CVSROOT_DIRNAME/join5
+         ;;
+
+
+
+        join6)
+         mkdir join6; cd join6
+          mkdir 1; cd 1
+         dotest join6-init-1 "${testcvs} -Q co -l ."
+         mkdir join6
+         dotest join6-init-2 "${testcvs} -Q add join6"
+         cd join6
+          echo aaa >temp.txt
+         echo bbb >>temp.txt
+         echo ccc >>temp.txt
+         dotest join6-1 "${testcvs} -Q add temp.txt"
+         dotest join6-2 "${testcvs} -q commit -minitial temp.txt" \
+"$CVSROOT_DIRNAME/join6/temp\.txt,v  <--  temp\.txt
+initial revision: 1\.1"
+         cp temp.txt temp2.txt
+         echo ddd >>temp.txt
+         dotest join6-3 "${testcvs} -q commit -madd temp.txt" \
+"$CVSROOT_DIRNAME/join6/temp.txt,v  <--  temp\.txt
+new revision: 1\.2; previous revision: 1\.1"
+
+         # The case where the merge target is up-to-date and its base revision
+         # matches the second argument to -j: CVS doesn't bother attempting
+         # the merge since it already knows that the target contains the
+         # change.
+         dotest join6-3.3 "$testcvs update -j1.1 -j1.2 temp.txt" \
+"\`temp\.txt' already contains the differences between 1\.1 and 1\.2"
+         dotest join6-3.4 "$testcvs diff temp.txt"
+
+         # The case where the merge target is modified but already contains
+         # the change.
+         echo bbb >temp.txt
+         echo ccc >>temp.txt
+         echo ddd >>temp.txt
+         dotest join6-3.5 "${testcvs} update -j1.1 -j1.2 temp.txt" \
+"M temp\.txt
+Merging differences between 1\.1 and 1\.2 into \`temp\.txt'
+\`temp\.txt' already contains the differences between 1\.1 and 1\.2
+M temp\.txt"
+         dotest_fail join6-3.6 "${testcvs} diff temp.txt" \
+"Index: temp\.txt
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
+retrieving revision 1\.2
+diff -r1\.2 temp.txt
+1d0
+< aaa"
+
+         cp temp2.txt temp.txt
+         dotest_fail join6-4 "${testcvs} diff temp.txt" \
+"Index: temp.txt
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
+retrieving revision 1\.2
+diff -r1\.2 temp\.txt
+4d3
+< ddd"
+
+         dotest join6-5 "${testcvs} update -j1.1 -j1.2 temp.txt" \
+"M temp\.txt
+Merging differences between 1\.1 and 1\.2 into \`temp\.txt'"
+         dotest join6-6 "${testcvs} diff temp.txt" ""
+         mv temp.txt temp3.txt
+         dotest join6-7 "sed 's/ddd/dddd/' < temp3.txt > temp.txt" ""
+         dotest join6-8 "${testcvs} update -j1.1 -j1.2 temp.txt" \
+"M temp\.txt
+Merging differences between 1\.1 and 1\.2 into \`temp\.txt'
+$CPROG update: conflicts during merge
+C temp\.txt"
+         dotest_fail join6-9 "${testcvs} diff temp.txt" \
+"Index: temp\.txt
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
+retrieving revision 1\.2
+diff -r1\.2 temp\.txt
+3a4,6
+> <<<<<<< temp\.txt
+> dddd
+> =======
+4a8
+> >>>>>>> 1\.2"
+         cp temp2.txt temp.txt
+         dotest join6-10 "${testcvs} -q ci -m del temp.txt" \
+"$CVSROOT_DIRNAME/join6/temp.txt,v  <--  temp\.txt
+new revision: 1\.3; previous revision: 1\.2"
+          cp temp3.txt temp.txt
+         dotest_fail join6-11 "${testcvs} diff temp.txt" \
+"Index: temp\.txt
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
+retrieving revision 1\.3
+diff -r1\.3 temp\.txt
+3a4
+> ddd"
+         dotest join6-12 "$testcvs update -j1.2 -j1.3 temp.txt" \
+"M temp\.txt
+Merging differences between 1\.2 and 1\.3 into \`temp\.txt'"
+         dotest join6-13 "${testcvs} diff temp.txt" ""
+
+         # The case where the merge target wasn't created until after the
+         # first tag was applied
+         rm temp2.txt temp3.txt
+         dotest join6-20 "${testcvs} -q tag -r1.1 t1" \
+"T temp.txt"
+         echo xxx >temp2.txt
+         dotest join6-21 "${testcvs} -Q add temp2.txt"
+         dotest join6-22 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/join6/temp2\.txt,v  <--  temp2\.txt
+initial revision: 1\.1"
+         dotest join6-23 "${testcvs} -q tag t2" \
+"T temp.txt
+T temp2.txt"
+         echo xxx >>temp.txt
+         dotest join6-24 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/join6/temp.txt,v  <--  temp\.txt
+new revision: 1\.4; previous revision: 1\.3"
+         dotest join6-25 "$testcvs -q up -jt1 -jt2" \
+"Merging differences between 1\.1 and 1\.3 into \`temp.txt'"
+         dotest join6-25-2 "$testcvs -q up"
+
+         # Now for my next trick: delete the file, recreate it, and
+         # try to merge
+         dotest join6-30 "${testcvs} -q rm -f temp2.txt" \
+"${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest join6-31 "${testcvs} -q ci -m. temp2.txt" \
+"$CVSROOT_DIRNAME/join6/temp2\.txt,v  <--  temp2\.txt
+new revision: delete; previous revision: 1\.1"
+         echo new >temp2.txt
+         dotest_fail join6-32 "$testcvs up -jt1 -jt2" \
+"? temp2\.txt
+$SPROG update: Updating \.
+Merging differences between 1\.1 and 1\.3 into \`temp.txt'
+\`temp.txt' already contains the differences between 1\.1 and 1\.3
+$SPROG update: scheduling addition from revision 1\.1 of \`temp2\.txt'\.
+$CPROG update: move away \`temp2\.txt'; it is in the way
+C temp2.txt" \
+"$SPROG update: Updating \.
+Merging differences between 1\.1 and 1\.3 into \`temp.txt'
+\`temp.txt' already contains the differences between 1\.1 and 1\.3
+$SPROG update: use \`cvs add' to create an entry for \`temp2\.txt'
+$SPROG update: scheduling addition from revision 1\.1 of \`temp2\.txt'\.
+$CPROG update: move away \`temp2\.txt'; it is in the way
+C temp2.txt"
+
+         dotest join6-33 "$testcvs -q up" "? temp2\.txt"
+
+         dokeep
+         cd ../../..
+         rm -rf join6
+         modify_repo rm -rf $CVSROOT_DIRNAME/join6
+         ;;
+
+
+
+       join7)
+         # This test deals with joins that happen with the -n switch
+         mkdir join7; cd join7
+         mkdir impdir; cd impdir
+          echo aaa >temp.txt
+         echo bbb >>temp.txt
+         echo ccc >>temp.txt
+         dotest join7-1 \
+"${testcvs} -Q import -minitial join7 vendor vers-1" \
+""
+         cd ..
+         dotest join7-2 "${testcvs} -Q co join7" ""
+         cd join7
+         echo ddd >> temp.txt
+         dotest join7-3 "${testcvs} -Q ci -madded-line temp.txt" ""
+         cd ../impdir
+         echo aaaa >temp.txt
+         echo bbbb >>temp.txt
+         echo ccc >>temp.txt
+         echo eee >>temp.txt
+         dotest join7-4 \
+"${testcvs} -Q import -minitial join7 vendor vers-2" \
+""
+         cd ../join7
+         dotest join7-5 \
+"$testcvs -n update -jvers-1 -jvers-2 temp.txt" \
+"Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into \`temp\.txt'
+$CPROG update: conflicts during merge
+C temp\.txt"
+         touch temp.txt
+         dotest join7-6 "$testcvs -n update -jvers-1 -jvers-2 temp.txt" \
+"Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into \`temp.txt'
+$CPROG update: conflicts during merge
+C temp\.txt"
+
+         dokeep
+         cd ../..
+         rm -rf join7
+         modify_repo rm -rf $CVSROOT_DIRNAME/join7
+         ;;
+
+
+
+       join-readonly-conflict)
+         # Previously, only tests 1 & 11 were being tested.  I added the
+         # intermediate dotest's to try and diagnose a different failure
+         #
+         # Demonstrate that cvs-1.9.29 can fail on 2nd and subsequent
+         # conflict-evoking join attempts.
+         # Even with that version of CVS, This test failed only in
+         # client-server mode, and would have been noticed in normal
+         # operation only for files that were read-only (either due to
+         # use of cvs' global -r option, setting the CVSREAD envvar,
+         # or use of watch lists).
+         mkdir join-readonly-conflict; cd join-readonly-conflict
+         dotest join-readonly-conflict-1 "$testcvs -q co -l ." ''
+         module=join-readonly-conflict
+         mkdir $module
+         $testcvs -q add $module >>$LOGFILE 2>&1
+         cd $module
+
+         file=m
+         echo trunk > $file
+         dotest join-readonly-conflict-2 "$testcvs -Q add $file" ''
+
+         dotest join-readonly-conflict-3 "$testcvs -q ci -m . $file" \
+"$CVSROOT_DIRNAME/$module/$file,v  <--  $file
+initial revision: 1\.1"
+
+         dotest join-readonly-conflict-4 "$testcvs tag -b B $file" "T $file"
+         dotest join-readonly-conflict-5 "$testcvs -q update -rB $file" ''
+         echo branch B > $file
+         dotest join-readonly-conflict-6 "$testcvs -q ci -m . $file" \
+"$CVSROOT_DIRNAME/$module/$file,v  <--  $file
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         rm $file
+         dotest join-readonly-conflict-7 "$testcvs -Q update -A $file" ''
+         # Make sure $file is read-only.  This can happen more realistically
+         # via patch -- which could be used to apply a delta, yet would
+         # preserve a file's read-only permissions.
+         echo conflict > $file; chmod u-w $file
+         dotest join-readonly-conflict-8 "$testcvs update -r B $file" \
+"Merging differences between 1\.1 and 1\.1\.2\.1 into \`$file'
+$CPROG update: conflicts during merge
+C $file"
+
+         # restore to the trunk
+         rm -f $file
+         dotest join-readonly-conflict-9 "$testcvs -Q update -A $file" ''
+
+         # This one would fail because cvs couldn't open the existing
+         # (and read-only) .# file for writing.
+         echo conflict > $file
+
+         # verify that the backup file is not writable
+         if test -w ".#$file.1.1"; then
+           fail "join-readonly-conflict-10 : .#$file.1.1 is writable"
+         else
+           pass "join-readonly-conflict-10"
+         fi
+         dotest join-readonly-conflict-11 "$testcvs update -r B $file" \
+"Merging differences between 1\.1 and 1\.1\.2\.1 into \`$file'
+$CPROG update: conflicts during merge
+C $file"
+
+         dokeep
+         cd ../..
+         rm -rf join-readonly-conflict
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       join-admin)
+         mkdir 1; cd 1
+         dotest join-admin-0-1 "$testcvs -q co -l ."
+         module=x
+         mkdir $module
+         dotest join-admin-0-2 "$testcvs -q add $module" \
+"Directory $CVSROOT_DIRNAME/$module added to the repository"
+         cd $module
+
+         # Create a file so applying the first tag works.
+         echo foo > a
+         dotest join-admin-0-3 "$testcvs -Q add a" ''
+         dotest join-admin-0-4 "$testcvs -Q ci -m. a" ''
+
+         dotest join-admin-0-5 "$testcvs -Q tag -b B" ''
+         dotest join-admin-0-6 "$testcvs -Q tag -b M1" ''
+         echo '$''Id$' > b
+         dotest join-admin-0-7 "$testcvs -Q add b" ''
+         dotest join-admin-0-8 "$testcvs -Q ci -m. b" ''
+         dotest join-admin-0-9 "$testcvs -Q tag -b M2" ''
+
+         dotest join-admin-0-10 "$testcvs -Q update -r B" ''
+         dotest join-admin-0-11 "$testcvs -Q update -kk -jM1 -jM2"
+         dotest join-admin-0-12 "$testcvs -Q ci -m. b"
+
+         dotest join-admin-0-13 "$testcvs -Q update -A" ''
+
+         # Verify that the -kk flag from the update did not
+         # propagate to the repository.
+         dotest join-admin-1 "$testcvs status b" \
+"===================================================================
+File: b                        Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/x/b,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       join-admin-2)
+         # Show that when a merge (via update -kk -jtag1 -jtag2) first
+         # removes a file, then modifies another containing an $Id...$ line,
+         # the resulting file contains the unexpanded `$Id.$' string, as
+         # -kk requires.
+         mkdir 1; cd 1
+         dotest join-admin-2-1 "$testcvs -q co -l ." ''
+         module=x
+         mkdir $module
+         dotest join-admin-2-2 "$testcvs -q add $module" \
+"Directory ${CVSROOT_DIRNAME}/x added to the repository"
+         cd $module
+
+         # Create a file so applying the first tag works.
+         echo '$''Id$' > e0
+         cp e0 e
+         dotest join-admin-2-3 "$testcvs -Q add e"
+         dotest join-admin-2-4 "$testcvs -Q ci -m. e"
+
+         dotest join-admin-2-5 "$testcvs -Q tag -b T" '' "${QUESTION} e0"
+         dotest join-admin-2-6 "$testcvs -Q update -r T" '' "${QUESTION} e0"
+         cp e0 e
+         dotest join-admin-2-7 "$testcvs -Q ci -m. e"
+
+         dotest join-admin-2-8 "$testcvs -Q update -A" '' "${QUESTION} e0"
+         dotest join-admin-2-9 "$testcvs -Q tag -b M1" '' "${QUESTION} e0"
+
+         echo '$''Id$' > b
+         dotest join-admin-2-10 "$testcvs -Q add b" ''
+         cp e0 e
+         dotest join-admin-2-11 "$testcvs -Q ci -m. b e"
+
+         dotest join-admin-2-12 "$testcvs -Q tag -b M2" '' "${QUESTION} e0"
+
+         dotest join-admin-2-13 "$testcvs -Q update -r T" '' "${QUESTION} e0"
+         dotest join-admin-2-14 "$testcvs update -kk -jM1 -jM2" \
+"$SPROG update: Updating .
+$SPROG update: scheduling addition from revision 1\.1 of \`b'\.
+U e
+Merging differences between 1\.1 and 1\.2 into \`e'
+\`e' already contains the differences between 1\.1 and 1\.2
+$QUESTION e0" \
+"$QUESTION e0
+$SPROG update: Updating .
+$SPROG update: scheduling addition from revision 1\.1 of \`b'\.
+U e
+Merging differences between 1\.1 and 1\.2 into \`e'
+\`e' already contains the differences between 1\.1 and 1\.2"
+
+         # Verify that the $Id.$ string is not expanded.
+         dotest join-admin-2-15 "cat e" '$''Id$'
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       join-rm)
+         # This first half of this test checks that a single-argument merge
+         # from a branch is capable of removing files.
+         #
+         # The second half verifies that an update to another location with an
+         # uncommitted removal will transfer the destination branch of the
+         # removal.
+
+         module=join-rm
+         mkdir $module; cd $module
+
+         dotest join-rm-init-1 "$testcvs -q co -l ." ''
+         mkdir $module
+         dotest join-rm-init-2 "$testcvs -q add $module" \
+"Directory $CVSROOT_DIRNAME/$module added to the repository"
+         cd $module
+
+         # add some files.
+         touch a b c d e f g
+         dotest join-rm-init-3 "$testcvs -Q add a b c d e f g"
+         dotest join-rm-init-4 "$testcvs -Q ci -m add-em"
+         
+         # create the branch and update to it
+         dotest join-rm-init-5 "$testcvs -Q tag -b br"
+         dotest join-rm-init-6 "$testcvs -Q up -rbr"
+
+         # remove a few files from the branch
+         dotest join-rm-init-7 "$testcvs -Q rm -f b d g"
+         dotest join-rm-init-8 "$testcvs -Q ci -mrm"
+
+         # update to the trunk
+         dotest join-rm-init-9 "$testcvs -Q up -A"
+
+         # now for the test - try and merge the removals.
+         dotest join-rm-1 "$testcvs -q up -jbr" \
+"$SPROG update: scheduling \`b' for removal
+$SPROG update: scheduling \`d' for removal
+$SPROG update: scheduling \`g' for removal"
+
+         # And make sure the merge took
+         dotest join-rm-2 "$testcvs -qn up" \
+"R b
+R d
+R g"
+
+         dotest join-rm-3 "$testcvs -q ci -m 'save the merge'" \
+"$CVSROOT_DIRNAME/join-rm/b,v  <--  b
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/join-rm/d,v  <--  d
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/join-rm/g,v  <--  g
+new revision: delete; previous revision: 1\.1"
+
+         # and verify that it was the head revision which was removed.
+         dotest join-rm-4 "$testcvs -q log b"  "
+RCS file: $CVSROOT_DIRNAME/join-rm/Attic/b,v
+Working file: b
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       br: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: $username;  state: dead;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+save the merge
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+branches:  1.1.2;
+add-em
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: $username;  state: dead;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+rm
+============================================================================="
+
+         # go back to the branch to set up for the second set of tests
+         dotest join-rm-init-10 "$testcvs -Q up -rbr"
+         dotest join-rm-init-11 "$testcvs -Q rm -f a"
+         dotest join-rm-init-12 "$testcvs -Q ci -m rma"
+
+         # now the test: update to the trunk
+         #
+         # FIXCVS: This update should merge the removal to the trunk.  It does
+         # not.
+         dotest join-rm-5 "$testcvs -q up -A" "U a"
+
+         # and verify that there is no sticky tag
+         dotest join-rm-6 "$testcvs status a" \
+"===================================================================
+File: a                        Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/join-rm/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         dokeep
+         cd ../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         rm -rf $module
+         ;;
+
+
+
+       new) # look for stray "no longer pertinent" messages.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest new-init-1 "$testcvs -Q co first-dir"
+
+         cd first-dir
+         touch a
+
+         dotest new-1 "$testcvs -Q add a"
+
+         dotest new-2 "$testcvs -Q ci -m added"
+         rm a
+
+         dotest new-3 "$testcvs -Q rm a"
+         dotest new-4 "$testcvs -Q ci -m removed"
+         dotest new-5 "$testcvs -Q update -A"
+         dotest new-6 "$testcvs -Q update -rHEAD"
+
+         dokeep
+         cd ..
+         rm -r first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       newb)
+         # Test removing a file on a branch and then checking it out.
+
+         # We call this "newb" only because it, like the "new" tests,
+         # has something to do with "no longer pertinent" messages.
+         # Not necessarily the most brilliant nomenclature.
+
+         # Create file 'a'.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest newb-123a "${testcvs} -q co first-dir" ''
+         cd first-dir
+         touch a
+         dotest newb-123b "${testcvs} add a" \
+"${SPROG} add: scheduling file .a. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest newb-123c "${testcvs} -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+initial revision: 1\.1"
+
+         # Make a branch.
+         dotest newb-123d "${testcvs} -q tag -b branch" "T a"
+
+         # Check out the branch.
+         cd ..
+         rm -r first-dir
+         mkdir 1
+         cd 1
+         dotest newb-123e "${testcvs} -q co -r branch first-dir" \
+"U first-dir/a"
+
+         # Remove 'a' on another copy of the branch.
+         cd ..
+         mkdir 2
+         cd 2
+         dotest newb-123f "${testcvs} -q co -r branch first-dir" \
+"U first-dir/a"
+         cd first-dir
+         rm a
+         dotest newb-123g "${testcvs} rm a" \
+"${SPROG} remove: scheduling .a. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest newb-123h "${testcvs} -q ci -m removed" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+new revision: delete; previous revision: 1\.1"
+
+         # Check out the file on the branch.  This used to report
+         # that the file is not pertinent, but this only makes sense on
+         # update.
+         cd ..
+         rm -r first-dir
+         dotest newb-123i "$testcvs -q co -r branch first-dir/a"
+
+         # Update the other copy, and make sure that a is removed.
+         cd ../1/first-dir
+         # "Entry Invalid" is a rather strange output here.  Something like
+         # "Removed in Repository" would make more sense.
+         dotest newb-123j0 "${testcvs} status a" \
+"${SPROG} status: \`a' is no longer in the repository
+===================================================================
+File: a                        Status: Entry Invalid
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1\.2\.1      ${CVSROOT_DIRNAME}/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         branch (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)${DOTSTAR}"
+         dotest newb-123j "${testcvs} -q update" \
+"${SPROG} update: \`a' is no longer in the repository"
+
+         if test -f a; then
+           fail newb-123k
+         else
+           pass newb-123k
+         fi
+
+         dokeep
+         cd ../..
+         rm -r 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       conflicts)
+               modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+
+               mkdir 1
+               cd 1
+
+               dotest conflicts-124 "${testcvs} -q co first-dir" ''
+
+               cd first-dir
+               touch a
+
+               dotest conflicts-125 "${testcvs} add a" \
+"${SPROG} add: scheduling file .a. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+               dotest conflicts-126 "${testcvs} -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+initial revision: 1\.1"
+
+               cd ../..
+               mkdir 2
+               cd 2
+
+               dotest conflicts-126.5 "${testcvs} co -p first-dir" \
+"${SPROG} checkout: Updating first-dir
+===================================================================
+Checking out first-dir/a
+RCS:  ${CVSROOT_DIRNAME}/first-dir/a,v
+VERS: 1\.1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
+               dotest conflicts-127 "${testcvs} -Q co first-dir" ''
+               cd first-dir
+               dotest conflicts-127a "test -f a" ''
+
+               cd ../../1/first-dir
+               echo add a line >>a
+               mkdir dir1
+               dotest conflicts-127b "${testcvs} add dir1" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
+               dotest conflicts-128 "${testcvs} -q ci -m changed" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+new revision: 1\.2; previous revision: 1\.1"
+               cd ../..
+
+               # Similar to conflicts-126.5, but now the file has nonempty
+               # contents.
+               mkdir 3
+               cd 3
+               dotest conflicts-128.5 "${testcvs} co -p -l first-dir" \
+"${SPROG} checkout: Updating first-dir
+===================================================================
+Checking out first-dir/a
+RCS:  ${CVSROOT_DIRNAME}/first-dir/a,v
+VERS: 1\.2
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+add a line"
+               cd ..
+               rmdir 3
+
+               # Now go over the to the other working directory and
+               # start testing conflicts
+               cd 2/first-dir
+               echo add a conflicting line >>a
+               dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \
+"${SPROG}"' commit: Up-to-date check failed for `a'\''
+'"${SPROG}"' \[commit aborted\]: correct above errors first!'
+               mkdir dir1
+               mkdir sdir
+               dotest conflicts-status-0 "${testcvs} status a" \
+"===================================================================
+File: a                        Status: Needs Merge
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+               dotest conflicts-129a "$testcvs -nq update a" \
+"Merging differences between 1\.1 and 1\.2 into \`a'
+$CPROG update: conflicts during merge
+C a"
+               dotest conflicts-130 "$testcvs -q update" \
+"Merging differences between 1\.1 and 1\.2 into \`a'
+$CPROG update: conflicts during merge
+C a
+$QUESTION dir1
+$QUESTION sdir" \
+"$QUESTION dir1
+$QUESTION sdir
+Merging differences between 1\.1 and 1\.2 into \`a'
+$CPROG update: conflicts during merge
+C a"
+               rmdir dir1 sdir
+
+               dotest conflicts-status-1 "${testcvs} status a" \
+"===================================================================
+File: a                        Status: Unresolved Conflict
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+               dotest_fail conflicts-131 "${testcvs} -q ci -m try" \
+"${SPROG} commit: file .a. had a conflict and has not been modified
+${SPROG} \[commit aborted\]: correct above errors first!"
+
+               # Try to check in the file with the conflict markers in it.
+               # Make sure we detect any one of the three conflict markers
+               mv a aa
+               grep '^<<<<<<<' aa >a
+               dotest conflicts-status-2 "${testcvs} -nq ci -m try a" \
+"${SPROG} commit: warning: file .a. seems to still contain conflict indicators"
+
+               grep '^=======' aa >a
+               dotest conflicts-status-3 "${testcvs} -nq ci -m try a" \
+"${SPROG} commit: warning: file .a. seems to still contain conflict indicators"
+
+               grep '^>>>>>>>' aa >a
+               dotest conflicts-status-4 "${testcvs} -qn ci -m try a" \
+"${SPROG} commit: warning: file .a. seems to still contain conflict indicators"
+
+               mv aa a
+               echo lame attempt at resolving it >>a
+               dotest conflicts-status-5 "${testcvs} status a" \
+"===================================================================
+File: a                        Status: File had conflicts on merge
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+               dotest conflicts-132 "$testcvs -q ci -m try" \
+"$SPROG commit: warning: file .a. seems to still contain conflict indicators
+$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+new revision: 1\.3; previous revision: 1\.2"
+
+               # OK, the user saw the warning (good user), and now
+               # resolves it for real.
+               echo resolve conflict >a
+               dotest conflicts-status-6 "${testcvs} status a" \
+"===================================================================
+File: a                        Status: Locally Modified
+
+   Working revision:   1\.3.*
+   Repository revision:        1\.3    ${CVSROOT_DIRNAME}/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+               dotest conflicts-133 "${testcvs} -q ci -m resolved" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+new revision: 1\.4; previous revision: 1\.3"
+               dotest conflicts-status-7 "${testcvs} status a" \
+"===================================================================
+File: a                        Status: Up-to-date
+
+   Working revision:   1\.4.*
+   Repository revision:        1\.4    ${CVSROOT_DIRNAME}/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+               # Now test that we can add a file in one working directory
+               # and have an update in another get it.
+               cd ../../1/first-dir
+               echo abc >abc
+               if ${testcvs} add abc >>${LOGFILE} 2>&1; then
+                   pass 134
+               else
+                   fail 134
+               fi
+               if ${testcvs} ci -m 'add abc' abc >>${LOGFILE} 2>&1; then
+                   pass 135
+               else
+                   fail 135
+               fi
+               cd ../../2
+               mkdir first-dir/dir1 first-dir/sdir
+               dotest conflicts-136 "${testcvs} -q update first-dir" \
+'U first-dir/abc
+'"${QUESTION}"' first-dir/dir1
+'"${QUESTION}"' first-dir/sdir' \
+''"${QUESTION}"' first-dir/dir1
+'"${QUESTION}"' first-dir/sdir
+U first-dir/abc'
+               dotest conflicts-137 'test -f first-dir/abc' ''
+               rmdir first-dir/dir1 first-dir/sdir
+
+               # Now test something similar, but in which the parent directory
+               # (not the directory in question) has the Entries.Static flag
+               # set.
+               cd ../1/first-dir
+               mkdir subdir
+               dotest conflicts-138 "${testcvs} add subdir" "${DOTSTAR}"
+               cd ../..
+               mkdir 3
+               cd 3
+               dotest conflicts-139 \
+"${testcvs} -q co first-dir/abc first-dir/subdir" "${DOTSTAR}"
+               cd ../1/first-dir/subdir
+               echo sss >sss
+               dotest conflicts-140 "${testcvs} add sss" "${DOTSTAR}"
+               dotest conflicts-140a "${testcvs} ci -m adding sss" \
+"${DOTSTAR}"
+               cd ../../../3/first-dir
+               dotest conflicts-141 "${testcvs} -q update" "${DOTSTAR}"
+               dotest conflicts-142 "test -f subdir/sss"
+
+               dokeep
+               cd ../..
+               rm -rf 1 2 3
+               modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+               restore_adm
+               ;;
+
+
+
+       conflicts2)
+         # More conflicts tests; separate from conflicts to keep each
+         # test a manageable size.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+
+         mkdir 1
+         cd 1
+
+         dotest conflicts2-142a1 "${testcvs} -q co first-dir" ''
+
+         cd first-dir
+         touch a abc
+
+         dotest conflicts2-142a2 "${testcvs} add a abc" \
+"${SPROG} add: scheduling file .a. for addition
+${SPROG} add: scheduling file .abc. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest conflicts2-142a3 "${testcvs} -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+initial revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/abc,v  <--  abc
+initial revision: 1\.1"
+
+         cd ../..
+         mkdir 2
+         cd 2
+
+         dotest conflicts2-142a4 "${testcvs} -q co first-dir" 'U first-dir/a
+U first-dir/abc'
+         cd ..
+
+         # BEGIN TESTS USING THE FILE A
+         # FIXME: would be cleaner to separate them out into their own
+         # tests; conflicts2 is getting long.
+         # Now test that if one person modifies and commits a
+         # file and a second person removes it, it is a
+         # conflict
+         cd 1/first-dir
+         echo modify a >>a
+         dotest conflicts2-142b2 "${testcvs} -q ci -m modify-a" \
+"$CVSROOT_DIRNAME/first-dir/a,v  <--  a
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../../2/first-dir
+         rm a
+         dotest conflicts2-142b3 "${testcvs} rm a" \
+"${SPROG} remove: scheduling .a. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest_fail conflicts2-142b4 "${testcvs} -q update" \
+"${SPROG} update: conflict: removed \`a' was modified by second party
+C a"
+         # Resolve the conflict by deciding not to remove the file
+         # after all.
+         dotest_sort conflicts2-142b5 "$testcvs add a" "U a
+${SPROG} add: \`a', version 1\.1, resurrected"
+         dotest conflicts2-142b5b1 "$testcvs status a" \
+"===================================================================
+File: a                        Status: Needs Patch
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.2    $CVSROOT_DIRNAME/first-dir/a,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest conflicts2-142b6 "$testcvs -q update" 'U a'
+
+         # Now one level up.
+         cd ..
+         dotest conflicts2-142b7 "${testcvs} rm -f first-dir/a" \
+"${SPROG} remove: scheduling \`first-dir/a' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
+
+         if $remote; then
+           # Haven't investigated this one.
+           dotest_fail conflicts2-142b8r "$testcvs add first-dir/a" \
+"${CPROG} add: in directory \`\.':
+${CPROG} \[add aborted\]: there is no version here; do \`${CPROG} checkout' 
first"
+           cd first-dir
+         else
+           dotest conflicts2-142b8 "${testcvs} add first-dir/a" \
+"U first-dir/a
+$SPROG add: \`first-dir/a', version 1\.2, resurrected"
+           cd first-dir
+           # Now recover from the damage that the 142b8 test did.
+           dotest conflicts2-142b9 "${testcvs} rm -f a" \
+"${SPROG} remove: scheduling \`a' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
+         fi
+
+         # As before, 1.2 instead of 1.1 is a bug.
+         dotest_sort conflicts2-142b10 "$testcvs add a" "U a
+${SPROG} add: \`a', version 1\.2, resurrected"
+         # As with conflicts2-142b6, check that things are normal again.
+         dotest conflicts2-142b11 "${testcvs} -q update" ''
+         cd ../..
+         # END TESTS USING THE FILE A
+
+         # Now test that if one person removes a file and
+         # commits it, and a second person removes it, is it
+         # not a conflict.
+         cd 1/first-dir
+         rm abc
+         dotest conflicts2-142c0 "${testcvs} rm abc" \
+"${SPROG} remove: scheduling \`abc' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
+         dotest conflicts2-142c1 "${testcvs} -q ci -m remove-abc" \
+"$CVSROOT_DIRNAME/first-dir/abc,v  <--  abc
+new revision: delete; previous revision: 1\.1"
+         cd ../../2/first-dir
+         rm abc
+         dotest conflicts2-142c2 "${testcvs} rm abc" \
+"${SPROG} remove: scheduling \`abc' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
+         dotest conflicts2-142c3 "${testcvs} update" \
+"${SPROG} update: Updating \."
+         cd ../..
+
+         # conflicts2-142d*: test that if one party adds a file, and another
+         # party has a file of the same name, cvs notices
+         cd 1/first-dir
+         touch aa.c
+         echo 'contents unchanged' >same.c
+         dotest conflicts2-142d0 "${testcvs} add aa.c same.c" \
+"${SPROG} add: scheduling file .aa\.c. for addition
+${SPROG} add: scheduling file .same\.c. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest conflicts2-142d1 "${testcvs} -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/aa\.c,v  <--  aa\.c
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/same\.c,v  <--  same\.c
+initial revision: 1\.1"
+
+         # Test the case where the second user manages the add before the
+         # first commits
+         touch bb.c
+         dotest conflicts2-142d1a "$testcvs add bb.c" \
+"$SPROG add: scheduling file .bb\.c. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         cd ../../2/first-dir
+         echo "don't you dare obliterate this text" >bb.c
+         dotest conflicts2-142d1b "$testcvs add bb.c" \
+"$SPROG add: scheduling file .bb\.c. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         cd ../../1/first-dir
+         dotest conflicts2-142d1c "$testcvs -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/bb\.c,v  <--  bb\.c
+initial revision: 1\.1"
+
+         cd ../../2/first-dir
+         echo "don't you dare obliterate this text either" >aa.c
+         echo 'contents unchanged' >same.c
+         # Note the discrepancy between local and remote in the handling
+         # of same.c.  I kind
+         # of suspect that the local CVS behavior is the more useful one
+         # although I do sort of wonder whether we should make people run
+         # cvs add just to get them in that habit (also, trying to implement
+         # the local CVS behavior for remote without the cvs add seems 
+         # pretty difficult).
+         if $remote; then
+           dotest_fail conflicts2-142d2r "$testcvs -q update" \
+"$QUESTION aa\.c
+$QUESTION same\.c
+$CPROG update: move away \`aa\.c'; it is in the way
+C aa\.c
+$SPROG update: conflict: \`bb\.c' created independently by second party
+C bb\.c
+$CPROG update: move away \`same\.c'; it is in the way
+C same\.c"
+         else
+           dotest_fail conflicts2-142d2 "${testcvs} -q update" \
+"${CPROG} update: move away \`aa\.c'; it is in the way
+C aa\.c
+${CPROG} update: conflict: \`bb\.c' created independently by second party
+C bb\.c
+U same\.c"
+         fi
+         dotest conflicts2-142d3 "${testcvs} -q status aa.c" \
+"${SPROG} status: move away \`aa\.c'; it is in the way
+===================================================================
+File: aa\.c                    Status: Unresolved Conflict
+
+   Working revision:   No entry for aa\.c
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/aa\.c,v
+   Commit Identifier:  ${commitid}"
+         dotest conflicts2-142d3a "${testcvs} -q status bb.c" \
+"${SPROG} status: conflict: \`bb\.c' created independently by second party
+===================================================================
+File: bb\.c                    Status: Unresolved Conflict
+
+   Working revision:   New file!
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/bb\.c,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         # FIXCVS
+         # This message seems somewhat bogus.  I mean, parallel development
+         # means that we get to work in parallel if we choose, right?  And
+         # then at commit time it would be a conflict.
+         #
+         # Well, the status is "Unresolved conflict" before _and_ after
+         # the update/merge (when conflicts happen, not at commit time).
+         # It is possible that this message could be changed to something
+         # more infomrative to novice users, like "File of same name exists
+         # in repository", or "File of same name committed independantly by
+         # second party", but these two messages look too long for the Status
+         # field and the move away & added independantly error messages _are_
+         # displayed.  Still, we get a lot of questions about this on the
+         # email lists.  Somehow we need to get more information to users
+         # via these messages and the ones generated by update. -DRP
+         dotest_fail conflicts2-142d4 "${testcvs} -q add aa.c" \
+"${SPROG} add: \`aa.c' added independently by second party"
+
+         # The user might want to see just what the conflict is.
+         # Don't bother, diff seems to kind of lose its mind, with or
+         # without -N.  This is a CVS bug(s).
+         #dotest conflicts2-142d5 \
+         #"${testcvs} -q diff -r HEAD -N aa.c" FIXCVS THEN FIXME
+
+         # Now: "how can the user resolve this conflict", I hear you cry.
+         # Well, one way is to forget about the file in the working
+         # directory.
+         # Since it didn't let us do the add in conflicts2-142d4, there
+         # is no need to run cvs rm here.
+         #dotest conflicts2-142d6 "${testcvs} -q rm -f aa.c" fixme
+         dotest conflicts2-142d6 "rm aa.c" ''
+         dotest conflicts2-142d7 "${testcvs} -q update aa.c" "U aa\.c"
+         dotest conflicts2-142d8 "cat aa.c" ''
+
+         # The other way is to use the version from the working directory
+         # instead of the version from the repository.  Unfortunately,
+         # there doesn't seem to be any particularly clear way to do
+         # this (?).
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       conflicts3)
+         # More tests of conflicts and/or multiple working directories
+         # in general.
+
+         mkdir 1; cd 1
+         dotest conflicts3-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest conflicts3-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd ..
+         mkdir 2; cd 2
+         dotest conflicts3-3 "${testcvs} -q co -l first-dir" ''
+         cd ../1/first-dir
+         touch file1 file2
+         dotest conflicts3-4 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest conflicts3-5 "${testcvs} -q ci -m add-them" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         cd ../../2/first-dir
+         # Check that -n doesn't make CVS lose its mind as it creates
+         # (or rather, doesn't) a new file.
+         dotest conflicts3-6 "${testcvs} -nq update" \
+"U file1
+U file2"
+         dotest_fail conflicts3-7 "test -f file1" ''
+         dotest conflicts3-8 "${testcvs} -q update" \
+"U file1
+U file2"
+         dotest conflicts3-9 "test -f file2" ''
+
+         # OK, now remove two files at once
+         dotest conflicts3-10 "${testcvs} rm -f file1 file2" \
+"${SPROG} remove: scheduling .file1. for removal
+${SPROG} remove: scheduling .file2. for removal
+${SPROG} remove: use .${SPROG} commit. to remove these files permanently"
+         dotest conflicts3-11 "${testcvs} -q ci -m remove-them" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: delete; previous revision: 1\.1"
+         cd ../../1/first-dir
+         dotest conflicts3-12 "${testcvs} -n -q update" \
+"${SPROG} update: \`file1' is no longer in the repository
+${SPROG} update: \`file2' is no longer in the repository"
+         dotest conflicts3-13 "${testcvs} -q update" \
+"${SPROG} update: \`file1' is no longer in the repository
+${SPROG} update: \`file2' is no longer in the repository"
+
+         # OK, now add a directory to both working directories
+         # and see that CVS doesn't lose its mind.
+         mkdir sdir
+         dotest conflicts3-14 "${testcvs} add sdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
+         touch sdir/sfile
+         dotest conflicts3-14a "${testcvs} add sdir/sfile" \
+"${SPROG} add: scheduling file .sdir/sfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest conflicts3-14b "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/sdir/sfile,v  <--  sdir/sfile
+initial revision: 1\.1"
+
+         cd ../../2/first-dir
+
+         # Create a CVS directory without the proper administrative
+         # files in it.  This can happen for example if you hit ^C
+         # in the middle of a checkout.
+         mkdir sdir
+         mkdir sdir/CVS
+         # OK, in the local case CVS sees that the directory exists
+         # in the repository and recurses into it.  In the remote case
+         # CVS can't see the repository and has no way of knowing
+         # that sdir is even a directory (stat'ing everything would be
+         # too slow).  The remote behavior makes more sense to me (but
+         # would this affect other cases?).
+         if $remote; then
+           dotest conflicts3-15 "${testcvs} -q update" \
+"${QUESTION} sdir"
+         else
+           dotest conflicts3-15 "${testcvs} -q update" \
+"${QUESTION} sdir
+${SPROG} update: ignoring sdir (CVS/Repository missing)"
+           touch sdir/CVS/Repository
+           dotest conflicts3-16 "${testcvs} -q update" \
+"${QUESTION} sdir
+${SPROG} update: ignoring sdir (CVS/Entries missing)"
+           cd ..
+           dotest conflicts3-16a "${testcvs} -q update first-dir" \
+"${QUESTION} first-dir/sdir
+${SPROG} update: ignoring first-dir/sdir (CVS/Entries missing)"
+           cd first-dir
+         fi
+         rm -r sdir
+
+         # OK, now the same thing, but the directory doesn't exist
+         # in the repository.
+         mkdir newdir
+         mkdir newdir/CVS
+         dotest conflicts3-17 "${testcvs} -q update" "${QUESTION} newdir"
+         echo "D/newdir////" >> CVS/Entries
+         dotest conflicts3-18 "${testcvs} -q update" \
+"${CPROG} update: ignoring newdir (CVS/Repository missing)"
+         touch newdir/CVS/Repository
+         dotest conflicts3-19 "${testcvs} -q update" \
+"${CPROG} update: ignoring newdir (CVS/Entries missing)"
+         cd ..
+         dotest conflicts3-20 "${testcvs} -q update first-dir" \
+"${CPROG} update: ignoring first-dir/newdir (CVS/Entries missing)"
+         cd first-dir
+         rm -r newdir
+
+         # The previous tests have left CVS/Entries in something of a mess.
+         # While we "should" be able to deal with that (maybe), for now
+         # we just start over.
+         cd ..
+         rm -r first-dir
+         dotest conflicts3-20a "${testcvs} -q co -l first-dir" ''
+         cd first-dir
+
+         dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile"
+         rm -rf sdir/CVS
+         dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir"
+         if $remote; then
+           dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \
+"${QUESTION} sdir
+${CPROG} update: move away \`sdir/sfile'; it is in the way
+C sdir/sfile"
+         else
+           dotest conflicts3-23 "${testcvs} -q update -PdA" \
+"${QUESTION} sdir"
+         fi
+
+         # Not that it should really affect much, but let's do the case
+         # where sfile has been removed.  For example, suppose that sdir
+         # had been a CVS-controlled directory which was then removed
+         # by removing each file (and using update -P or some such).  Then
+         # suppose that the build process creates an sdir directory which
+         # is not supposed to be under CVS.
+         rm -rf sdir
+         dotest conflicts3-24 "${testcvs} -q update -d sdir" "U sdir/sfile"
+         rm sdir/sfile
+         dotest conflicts3-25 "${testcvs} rm sdir/sfile" \
+"${SPROG} remove: scheduling .sdir/sfile. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest conflicts3-26 "${testcvs} ci -m remove sdir/sfile" \
+"${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v  <--  sdir/sfile
+new revision: delete; previous revision: 1\.1"
+         rm -r sdir/CVS
+         dotest conflicts3-27 "${testcvs} -q update" "${QUESTION} sdir"
+         dotest conflicts3-28 "${testcvs} -q update -PdA" \
+"${QUESTION} sdir"
+
+         dokeep
+         cd ../..
+         rm -r 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       clean)
+         # Test update -C (overwrite local mods w/ repository copies)
+         mkdir 1; cd 1
+         dotest clean-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest clean-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         echo "The usual boring test text." > cleanme.txt
+          dotest clean-3 "${testcvs} add cleanme.txt" \
+"${SPROG} add: scheduling file .cleanme\.txt. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest clean-4 "${testcvs} -q ci -m clean-3" \
+"$CVSROOT_DIRNAME/first-dir/cleanme\.txt,v  <--  cleanme\.txt
+initial revision: 1\.1"
+          # Okay, preparation is done, now test.
+          # Check that updating an unmodified copy works.
+         dotest clean-5 "${testcvs} -q update" ''
+          # Check that updating -C an unmodified copy works.
+         dotest clean-6 "${testcvs} -q update -C" ''
+          # Check that updating a modified copy works.
+         echo "fish" >> cleanme.txt
+         dotest clean-7 "${testcvs} -q update" 'M cleanme\.txt'
+          # Check that updating -C a modified copy works.
+         dotest clean-8 "${testcvs} -q update -C" \
+"(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
+U cleanme\.txt"
+         # And check that the backup copy really was made.
+         dotest clean-9 "cat .#cleanme.txt.1.1" \
+"The usual boring test text\.
+fish"
+
+          # Do it all again, this time naming the file explicitly.
+         rm .#cleanme.txt.1.1
+         dotest clean-10 "${testcvs} -q update cleanme.txt" ''
+         dotest clean-11 "${testcvs} -q update -C cleanme.txt" ''
+         echo "bluegill" >> cleanme.txt
+         dotest clean-12 "${testcvs} -q update cleanme.txt" 'M cleanme\.txt'
+         dotest clean-13 "${testcvs} -q update -C cleanme.txt" \
+"(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
+U cleanme\.txt"
+         # And check that the backup copy really was made.
+         dotest clean-14 "cat .#cleanme.txt.1.1" \
+"The usual boring test text\.
+bluegill"
+
+         # Now try with conflicts
+         cd ..
+         dotest clean-15 "${testcvs} -q co -d second-dir first-dir" \
+'U second-dir/cleanme\.txt'
+         cd second-dir
+         echo "conflict test" >> cleanme.txt
+         dotest clean-16 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/first-dir/cleanme\.txt,v  <--  cleanme\.txt
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../first-dir
+         echo "fish" >> cleanme.txt
+         dotest clean-17 "$testcvs -nq update" \
+"Merging differences between 1\.1 and 1\.2 into \`cleanme\.txt'
+$CPROG update: conflicts during merge
+C cleanme\.txt"
+         dotest clean-18 "${testcvs} -q update -C" \
+"(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
+U cleanme\.txt"
+         dotest clean-19 "cat .#cleanme.txt.1.1" \
+"The usual boring test text\.
+fish"
+         
+          # Done.  Clean up.
+         dokeep
+         cd ../..
+          rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       keywordexpand)
+         # Tests of the original *BSD tag= and keywordexpand= features
+         # are done via the LocalKeyword= and KeywordExpand features.
+
+         # Skip this in noredirect mode because it is too easy for the primary
+         # and secondary error messages to get out of sync when the
+         # CVSROOT/config files are broken.  This is intentional, since it is
+         # possible and even likely that an administrator might want to set up
+         # different configurations on the two servers and the paths to the
+         # config files on the secondary and primary were intentionally left
+         # intact even though they might be different.
+         if $noredirect; then
+            notnoredirect keywordexpand
+           continue
+         fi
+
+         mkdir keywordexpand; cd keywordexpand
+
+         dotest keywordexpand-1 "${testcvs} -q co CVSROOT" \
+'U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg'
+         cd CVSROOT
+         echo LocalKeyword=MyBSD=CVSHeader >> config
+         # First do not expand any keywords
+         echo KeywordExpand=i >> config
+         dotest keywordexpand-2 "${testcvs} -Q ci -mkeywordexpand config"
+
+         cd ..
+
+         mkdir testimport; cd testimport
+         echo '$''Author$' > file1
+         echo '$''Date$' >> file1
+         echo '$''CVSHeader$' >> file1
+         echo '$''Header$' >> file1
+         echo '$''Id$' >> file1
+         echo '$''Locker$' >> file1
+         echo '$''Log$' >> file1
+         echo '$''Name$' >> file1
+         echo '$''RCSfile$' >> file1
+         echo '$''Revision$' >> file1
+         echo '$''Source$' >> file1
+         echo '$''State$' >> file1
+         echo '$''MyBSD$' >> file1
+         dotest keywordexpand-3 \
+"${testcvs} -Q import -I ! -m test-import-with-bsd-keyword keywordexpand 
vendor v1" \
+''
+         cd ..
+
+         dotest keywordexpand-4 "${testcvs} -Q checkout keywordexpand" ''
+         cd keywordexpand
+         dotest keywordexpand-5 "cat file1" \
+"\$""Author\$
+\$""Date\$
+\$""CVSHeader\$
+\$""Header\$
+\$""Id\$
+\$""Locker\$
+\$""Log\$
+\$""Name\$
+\$""RCSfile\$
+\$""Revision\$
+\$""Source\$
+\$""State\$
+\$MyBSD\$"
+         cd ../CVSROOT
+         # Now expand just the MyBSD and Id keywords
+         mv config config.old
+         sed -e 's/KeywordExpand=i/KeywordExpand=iMyBSD,Id/' < config.old > 
config
+         rm -f config.old
+         dotest keywordexpand-6 "${testcvs} -Q ci -mkeywordexpand config"
+         cd ../keywordexpand
+         echo 'a change' >> file1
+         dotest keywordexpand-7 "${testcvs} -Q ci -madd"
+         dotest keywordexpand-8 "cat file1" \
+"\$""Author\$
+\$""Date\$
+\$""CVSHeader\$
+\$""Header\$
+\$""Id: file1,v 1\.2 [0-9/]* [0-9:]* ${username} Exp \$
+\$""Locker\$
+\$""Log\$
+\$""Name\$
+\$""RCSfile\$
+\$""Revision\$
+\$""Source\$
+\$""State\$
+\$MyBSD: keywordexpand/file1,v 1\.2 [0-9/]* [0-9:]* ${username} Exp \$
+a change"
+
+         cd ../CVSROOT
+         mv config config.old
+         sed -e 's/LocalKeyword=MyBSD/LocalKeyword=My_BSD/' \
+             <config.old >config
+         dotest keywordexpand-9 "$testcvs -Q ci -minvalidlocalkeyword config"
+         dotest keywordexpand-10 "$testcvs -Q update config" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
LocalKeyword ignored: Bad character \`_' in key \`My_BSD'"
+         cp config.old config
+         dotest keywordexpand-11 "$testcvs -Q ci -mfixit config" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
LocalKeyword ignored: Bad character \`_' in key \`My_BSD'" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
LocalKeyword ignored: Bad character \`_' in key \`My_BSD'
+$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword 
ignored: Bad character \`_' in key \`My_BSD'"
+         dotest keywordexpand-12 "$testcvs -Q update config"
+         sed -e 's/LocalKeyword=MyBSD=CVSHeader/LocalKeyword=MyBSD=Name/' \
+             <config.old >config
+         dotest keywordexpand-13 \
+"$testcvs -Q ci -minvalidlocalkeyword2 config"
+         dotest keywordexpand-14 "$testcvs -Q update config" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
LocalKeyword ignored: Unknown LocalId mode: \`Name'"
+         cp config.old config
+         dotest keywordexpand-15 "$testcvs -Q ci -mfixit2 config" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
LocalKeyword ignored: Unknown LocalId mode: \`Name'" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
LocalKeyword ignored: Unknown LocalId mode: \`Name'
+$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: LocalKeyword 
ignored: Unknown LocalId mode: \`Name'"
+         dotest keywordexpand-16 "$testcvs -Q update config"
+
+         dokeep
+         # Done. Clean up.
+         cd ../..
+         rm -rf $TESTDIR/keywordexpand
+          modify_repo rm -rf $CVSROOT_DIRNAME/keywordexpand
+         restore_adm
+         ;;
+
+
+
+       modules)
+         # Tests of various ways to define and use modules.
+         # Roadmap to various modules tests:
+         # -a:
+         #   error on incorrect placement: modules
+         #   error combining with other options: modules2-a*
+         #   infinite loops: modules148a1.1 - modules148a1.2
+         #   use to specify a file more than once: modules3
+         #   use with ! feature: modules4
+         # regular modules: modules, modules2, cvsadm
+         # ampersand modules: modules2
+         # -s: modules.
+         # -d: modules, modules3, cvsadm
+         # -i, -o, -u, -e, -t: modules5
+         # slashes in module names: modules3
+         # invalid module definitions: modules6
+
+         ############################################################
+         # These tests are to make sure that administrative files get
+         # rebuilt, regardless of how and where files are checked
+         # out.
+         ############################################################
+         # Check out the whole repository
+         mkdir 1; cd 1
+         dotest modules-1 "${testcvs} -q co ." 'U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg'
+         echo "# made a change" >>CVSROOT/modules
+         dotest modules-1d "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+         rm -rf 1
+
+         ############################################################
+         # Check out CVSROOT
+         mkdir 1; cd 1
+         dotest modules-2 "${testcvs} -q co CVSROOT" 'U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg'
+         echo "# made a change" >>CVSROOT/modules
+         dotest modules-2d "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+         rm -rf 1
+
+         ############################################################
+         # Check out CVSROOT in some other directory
+         modify_repo mkdir $CVSROOT_DIRNAME/somedir
+         mkdir 1; cd 1
+         dotest modules-3 "${testcvs} -q co somedir" ''
+         cd somedir
+         dotest modules-3d "${testcvs} -q co CVSROOT" 'U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg'
+         echo "# made a change" >>CVSROOT/modules
+         dotest modules-3g "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/somedir
+         ############################################################
+         # end rebuild tests
+         ############################################################
+
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+
+         mkdir 1
+         cd 1
+
+         dotest modules-143 "${testcvs} -q co first-dir" ""
+
+         cd first-dir
+         mkdir subdir
+         dotest modules-143a "${testcvs} add subdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
+
+         cd subdir
+         mkdir ssdir
+         dotest modules-143b "${testcvs} add ssdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
+
+         touch a b
+
+         dotest modules-144 "${testcvs} add a b" \
+"${SPROG} add: scheduling file .a. for addition
+${SPROG} add: scheduling file .b. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+
+         dotest modules-145 "$testcvs ci -m added" \
+"$CPROG commit: Examining .
+$CPROG commit: Examining ssdir
+$CVSROOT_DIRNAME/first-dir/subdir/a,v  <--  a
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/subdir/b,v  <--  b
+initial revision: 1\.1"
+
+         cd ..
+         dotest modules-146 "$testcvs -q co CVSROOT" \
+"U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg"
+
+         # Here we test that CVS can deal with CVSROOT (whose repository
+         # is at top level) in the same directory as subdir (whose repository
+         # is a subdirectory of first-dir).  TODO: Might want to check that
+         # files can actually get updated in this state.
+         dotest modules-147 "$testcvs -q update"
+
+         cat >CVSROOT/modules <<EOF
+realmodule first-dir/subdir a
+dirmodule first-dir/subdir
+namedmodule -d nameddir first-dir/subdir
+aliasmodule -a first-dir/subdir/a
+aliasnested -a first-dir/subdir/ssdir
+topfiles -a first-dir/file1 first-dir/file2
+world -a .
+statusmod -s Mungeable
+# Check for ability to block infinite loops.
+infinitealias -a infinitealias
+# Prior to 1.11.12 & 1.12.6, the infinite alias loop check didn't strip
+# slashes or work if a module called a module which then called itself
+# (A -> A was blocked, but not A -> B -> A or deeper).
+infinitealias2 -a infinitealias2/
+infinitealias3 -a infinitealias4/
+infinitealias4 -a aliasmodule infinitealias5
+infinitealias5 -a infinitealias3/
+# Options must come before arguments.  It is possible this should
+# be relaxed at some point (though the result would be bizarre for
+# -a); for now test the current behavior.
+bogusalias first-dir/subdir/a -a
+EOF
+         dotest modules-148 "$testcvs ci -m 'add modules' CVSROOT/modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ..
+         # The "statusmod" module contains an error; trying to use it
+         # will produce "modules file missing directory" I think.
+         # However, that shouldn't affect the ability of "cvs co -c" or
+         # "cvs co -s" to do something reasonable with it.
+         dotest modules-148a0 "$testcvs co -c" \
+'aliasmodule  -a first-dir/subdir/a
+aliasnested  -a first-dir/subdir/ssdir
+bogusalias   first-dir/subdir/a -a
+dirmodule    first-dir/subdir
+infinitealias -a infinitealias
+infinitealias2 -a infinitealias2/
+infinitealias3 -a infinitealias4/
+infinitealias4 -a aliasmodule infinitealias5
+infinitealias5 -a infinitealias3/
+namedmodule  -d nameddir first-dir/subdir
+realmodule   first-dir/subdir a
+statusmod    -s Mungeable
+topfiles     -a first-dir/file1 first-dir/file2
+world        -a \.'
+         # There is code in modules.c:save_d which explicitly skips
+         # modules defined with -a, which is why aliasmodule is not
+         # listed.
+         dotest modules-148a1 "${testcvs} co -s" \
+'statusmod    Mungeable  
+bogusalias   NONE        first-dir/subdir/a -a
+dirmodule    NONE        first-dir/subdir
+namedmodule  NONE        first-dir/subdir
+realmodule   NONE        first-dir/subdir a'
+
+         # Check that infinite loops are avoided
+         dotest modules-148a1.1 "${testcvs} co infinitealias" \
+"$CPROG checkout: module \`infinitealias' in modules file contains infinite 
loop" \
+"$SPROG server: module \`infinitealias' in modules file contains infinite loop
+$SPROG checkout: module \`infinitealias' in modules file contains infinite 
loop"
+         # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not
+         # strip slashes.
+         dotest modules-148a1.2 "${testcvs} co infinitealias2" \
+"$CPROG checkout: module \`infinitealias2' in modules file contains infinite 
loop" \
+"$SPROG server: module \`infinitealias2' in modules file contains infinite loop
+$SPROG checkout: module \`infinitealias2' in modules file contains infinite 
loop"
+         # Prior to 1.11.12 & 1.12.6, the inifinte alias loop check did not
+         # notice when A -> B -> A, it only noticed A -> A.
+         dotest modules-148a1.3 "${testcvs} co infinitealias3/" \
+"$CPROG checkout: module \`infinitealias3' in modules file contains infinite 
loop" \
+"$SPROG server: module \`infinitealias3' in modules file contains infinite loop
+$SPROG checkout: module \`infinitealias3' in modules file contains infinite 
loop"
+
+         # Test that real modules check out to realmodule/a, not subdir/a.
+         dotest modules-149a1 "${testcvs} co realmodule" "U realmodule/a"
+         dotest modules-149a2 "test -d realmodule && test -f realmodule/a" ""
+         dotest_fail modules-149a3 "test -f realmodule/b" ""
+         dotest modules-149a4 "${testcvs} -q co realmodule" ""
+         dotest modules-149a5 "echo yes | ${testcvs} release -d realmodule" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .realmodule.: "
+
+         dotest_fail modules-149b1 "${testcvs} co realmodule/a" \
+"${SPROG}"' checkout: module `realmodule/a'\'' is a request for a file in a 
module which is not a directory' \
+"${SPROG}"' server: module `realmodule/a'\'' is a request for a file in a 
module which is not a directory
+'"${CPROG}"' \[checkout aborted\]: cannot expand modules'
+
+         # Now test the ability to check out a single file from a directory
+         dotest modules-150c "${testcvs} co dirmodule/a" "U dirmodule/a"
+         dotest modules-150d "test -d dirmodule && test -f dirmodule/a" ""
+         dotest_fail modules-150e "test -f dirmodule/b" ""
+         dotest modules-150f "echo yes | ${testcvs} release -d dirmodule" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .dirmodule.: "
+         # Now test the ability to correctly reject a non-existent filename.
+         # For maximum studliness we would check that an error message is
+         # being output.
+         # We accept a zero exit status because it is what CVS does
+         # (Dec 95).  Probably the exit status should be nonzero,
+         # however.
+         dotest modules-150g1 "$testcvs co dirmodule/nonexist" \
+"$SPROG checkout: nothing known about \`dirmodule/nonexist'"
+         # We tolerate the creation of the dirmodule directory, since that
+         # is what CVS does, not because we view that as preferable to not
+         # creating it.
+         dotest_fail modules-150g2 "test -f dirmodule/a || test -f dirmodule/b"
+         rm -r dirmodule
+
+         # Now test that a module using -d checks out to the specified
+         # directory.
+         dotest modules-150h1 "${testcvs} -q co namedmodule" \
+'U nameddir/a
+U nameddir/b'
+         dotest modules-150h2 "test -f nameddir/a && test -f nameddir/b" ""
+         echo add line >>nameddir/a
+         dotest modules-150h3 "${testcvs} -q co namedmodule" 'M nameddir/a'
+         rm nameddir/a
+         dotest modules-150h4 "${testcvs} -q co namedmodule" 'U nameddir/a'
+         dotest modules-150h99 "echo yes | ${testcvs} release -d nameddir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .nameddir.: "
+
+         # Now test that alias modules check out to subdir/a, not
+         # aliasmodule/a.
+         dotest modules-151 "${testcvs} co aliasmodule" ""
+         dotest_fail modules-152 "test -d aliasmodule" ""
+         echo abc >>first-dir/subdir/a
+         dotest modules-153 "$testcvs -q co aliasmodule" "M first-dir/subdir/a"
+
+         cd ..
+         rm -rf 1
+
+         mkdir 2
+         cd 2
+         dotest modules-155a0 "${testcvs} co aliasnested" \
+"${SPROG} checkout: Updating first-dir/subdir/ssdir"
+         dotest modules-155a1 "test -d first-dir" ''
+         dotest modules-155a2 "test -d first-dir/subdir" ''
+         dotest modules-155a3 "test -d first-dir/subdir/ssdir" ''
+         # Test that nothing extraneous got created.
+         dotest modules-155a4 "ls" "first-dir" \
+"CVS
+first-dir"
+         cd ..
+         rm -r 2
+
+         # Test checking out everything.
+         mkdir 1
+         cd 1
+         dotest modules-155b "${testcvs} -q co world" \
+"U CVSROOT/${DOTSTAR}
+U first-dir/subdir/a
+U first-dir/subdir/b"
+         cd ..
+         rm -rf 1
+
+         # Test checking out a module which lists at least two
+         # specific files twice.  At one time, this failed over
+         # remote CVS.
+         mkdir 1
+         cd 1
+         dotest modules-155c1 "${testcvs} -q co first-dir" \
+"U first-dir/subdir/a
+U first-dir/subdir/b"
+
+         cd first-dir
+         echo 'first revision' > file1
+         echo 'first revision' > file2
+         dotest modules-155c2 "${testcvs} add file1 file2" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: scheduling file `file2'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add these files permanently'
+         dotest modules-155c3 "$testcvs -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+         cd ..
+         rm -rf first-dir
+         dotest modules-155c4 "${testcvs} -q co topfiles" \
+"U first-dir/file1
+U first-dir/file2"
+         dotest modules-155c5 "${testcvs} -q co topfiles" ""
+
+         # Make sure the right thing happens if we remove a file.
+         cd first-dir
+         dotest modules-155c6 "${testcvs} -q rm -f file1" \
+"${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest modules-155c7 "${testcvs} -q ci -m remove-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.1"
+         cd ..
+         rm -rf first-dir
+         dotest modules-155c8 "$testcvs -q co topfiles" \
+"U first-dir/file2"
+
+         dokeep
+         cd ..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       modules2)
+         # More tests of modules, in particular the & feature.
+         mkdir 1; cd 1
+         dotest modules2-setup-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir second-dir third-dir
+         dotest modules2-setup-2 \
+"${testcvs} add first-dir second-dir third-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/third-dir added to the repository"
+         cd third-dir
+         touch file3
+         dotest modules2-setup-3 "${testcvs} add file3" \
+"${SPROG} add: scheduling file .file3. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest modules2-setup-4 "${testcvs} -q ci -m add file3" \
+"$CVSROOT_DIRNAME/third-dir/file3,v  <--  file3
+initial revision: 1\.1"
+         cd ../..
+         rm -r 1
+
+         mkdir 1
+         cd 1
+
+         dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \
+'U CVSROOT/modules'
+         cd CVSROOT
+         cat >> modules << EOF
+ampermodule &first-dir &second-dir
+combmodule third-dir file3 &first-dir
+ampdirmod -d newdir &first-dir &second-dir
+badmod -d newdir
+messymod first-dir &messymodchild
+messymodchild -d sdir/child second-dir
+EOF
+         # Depending on whether the user also ran the modules test
+         # we will be checking in revision 1.2 or 1.3.
+         dotest modules2-2 "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ..
+
+         dotest modules2-3 "${testcvs} -q co ampermodule" ''
+         dotest modules2-4 "test -d ampermodule/first-dir" ''
+         dotest modules2-5 "test -d ampermodule/second-dir" ''
+
+         # Test ability of cvs release to handle multiple arguments
+         # See comment at "release" for list of other cvs release tests.
+         cd ampermodule
+         if ${testcvs} release -d first-dir second-dir <<EOF >>${LOGFILE}
+yes
+yes
+EOF
+         then
+           pass modules2-6
+         else
+           fail modules2-6
+         fi
+         dotest_fail modules2-7 "test -d first-dir" ''
+         dotest_fail modules2-8 "test -d second-dir" ''
+
+         cd ..
+
+         # There used to be a nasty-hack that made CVS skip creation of the
+         # module dir (in this case ampermodule) when -n was specified
+         dotest modules2-ampermod-1 "${testcvs} -q co -n ampermodule" ''
+         dotest modules2-ampermod-2 "test -d ampermodule/first-dir" ''
+         dotest modules2-ampermod-3 "test -d ampermodule/second-dir" ''
+
+         # Test release of a module
+         if echo yes |${testcvs} release -d ampermodule >>${LOGFILE}; then
+           pass modules2-ampermod-release-1
+         else
+           fail modules2-ampermod-release-1
+         fi
+         dotest_fail modules2-ampermod-release-2 "test -d ampermodule" ''
+
+         # and the '-n' test again, but in conjunction with '-d'
+         dotest modules2-ampermod-4 "${testcvs} -q co -n -d newname 
ampermodule" ''
+         dotest modules2-ampermod-5 "test -d newname/first-dir" ''
+         dotest modules2-ampermod-6 "test -d newname/second-dir" ''
+         rm -rf newname
+
+         # Now we create another directory named first-dir and make
+         # sure that CVS doesn't get them mixed up.
+         mkdir first-dir
+         # Note that this message should say "Updating ampermodule/first-dir"
+         # I suspect.  This is a long-standing behavior/bug....
+         dotest modules2-9 "${testcvs} co ampermodule" \
+"${SPROG} checkout: Updating first-dir
+${SPROG} checkout: Updating second-dir"
+         touch ampermodule/first-dir/amper1
+         cd ampermodule
+         dotest modules2-10 "${testcvs} add first-dir/amper1" \
+"${SPROG} add: scheduling file .first-dir/amper1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         cd ..
+
+         # As with the "Updating xxx" message, the "U first-dir/amper1"
+         # message (instead of "U ampermodule/first-dir/amper1") is
+         # rather fishy.
+         dotest modules2-12 "${testcvs} co ampermodule" \
+"${SPROG} checkout: Updating first-dir
+A first-dir/amper1
+${SPROG} checkout: Updating second-dir"
+
+         if $remote; then
+           dotest modules2-13r "$testcvs -q ci -m add-it ampermodule" \
+"$CVSROOT_DIRNAME/first-dir/amper1,v  <--  ampermodule/first-dir/amper1
+initial revision: 1\.1"
+         else
+           # Trying this as above led to a "protocol error" message.
+           # Work around this bug.
+           cd ampermodule
+           dotest modules2-13 "$testcvs -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/amper1,v  <--  first-dir/amper1
+initial revision: 1\.1"
+           cd ..
+         fi
+         cd ..
+         rm -r 1
+
+         # Now test the "combmodule" module (combining regular modules
+         # and ampersand modules in the same module definition).
+         mkdir 1; cd 1
+         dotest modules2-14 "${testcvs} co combmodule" \
+"U combmodule/file3
+${SPROG} checkout: Updating first-dir
+U first-dir/amper1"
+         dotest modules2-15 "test -f combmodule/file3" ""
+         dotest modules2-16 "test -f combmodule/first-dir/amper1"
+         cd combmodule
+         rm -rf first-dir
+         # At least for now there is no way to tell CVS that
+         # some files/subdirectories come from one repository directory,
+         # and others from another.
+         # This seems like a pretty sensible behavior to me, in the
+         # sense that first-dir doesn't "really" exist within
+         # third-dir, so CVS just acts as if there is nothing there
+         # to do.
+         dotest modules2-17 "${testcvs} update -d" \
+"${SPROG} update: Updating \."
+
+         cd ..
+         dotest modules2-18 "${testcvs} -q co combmodule" \
+"U first-dir/amper1"
+         dotest modules2-19 "test -f combmodule/first-dir/amper1" ""
+         cd ..
+         rm -rf 1
+
+         # Now test the "ampdirmod" and "badmod" modules to be sure that
+         # options work with ampersand modules but don't prevent the
+         # "missing directory" error message.
+         mkdir 1; cd 1
+         dotest modules2-20 "${testcvs} co ampdirmod" \
+"${SPROG} checkout: Updating first-dir
+U first-dir/amper1
+${SPROG} checkout: Updating second-dir"
+         dotest modules2-21 "test -f newdir/first-dir/amper1" ""
+         dotest modules2-22 "test -d newdir/second-dir" ""
+         dotest_fail modules2-23 "${testcvs} co badmod" \
+"${SPROG} checkout: modules file missing directory for module badmod" \
+"${SPROG} server: modules file missing directory for module badmod
+${CPROG} \[checkout aborted\]: cannot expand modules"
+         cd ..
+         rm -rf 1
+
+         # Confirm that a rename with added depth nested in an ampersand
+         # module works.
+         mkdir 1; cd 1
+         dotest modules2-nestedrename-1 "${testcvs} -q co messymod" \
+"U messymod/amper1"
+         dotest modules2-nestedrename-2 "test -d messymod/sdir" ''
+         dotest modules2-nestedrename-3 "test -d messymod/sdir/CVS" ''
+         dotest modules2-nestedrename-4 "test -d messymod/sdir/child" ''
+         dotest modules2-nestedrename-5 "test -d messymod/sdir/child/CVS" ''
+         cd ..; rm -rf 1
+
+         # FIXME:  client/server has a bug.  It should be working like a local
+         # repository in this case, but fails to check out the second module
+         # in the list when a branch is specified.
+         mkdir 1; cd 1
+         dotest modules2-ampertag-setup-1 \
+"${testcvs} -Q rtag tag first-dir second-dir third-dir" \
+''
+         dotest modules2-ampertag-1 "${testcvs} -q co -rtag ampermodule" \
+"U first-dir/amper1"
+         if $remote; then
+           dotest_fail modules2-ampertag-2r "test -d ampermodule/second-dir" ''
+           dotest_fail modules2-ampertag-3r "test -d 
ampermodule/second-dir/CVS" ''
+         else
+           dotest modules2-ampertag-2 "test -d ampermodule/second-dir" ''
+           dotest modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
+         fi
+         cd ..; rm -rf 1
+
+         # Test for tag files when an ampermod is renamed with more path
+         # elements than it started with.
+         #
+         # FIXME: This is currently broken in the remote case, possibly only
+         # because the messymodchild isn't being checked out at all.
+         mkdir 1; cd 1
+#        dotest modules2-tagfiles-setup-1 \
+#"${testcvs} -Q rtag -b branch first-dir second-dir" \
+#''
+         dotest modules2-tagfiles-1 "${testcvs} -q co -rtag messymod" \
+"U messymod/amper1"
+         if $remote; then
+           dotest_fail modules2-tagfiles-2r "test -d messymod/sdir" ''
+         else
+           dotest modules2-tagfiles-2 "cat messymod/sdir/CVS/Tag" 'Ttag'
+         fi
+         cd ..; rm -rf 1
+
+         # Test that CVS gives an error if one combines -a with
+         # other options.
+         # Probably would be better to break this out into a separate
+         # test.  Although it is short, it shares no files/state with
+         # the rest of the modules2 tests.
+         mkdir 1; cd 1
+         dotest modules2-a0.5 "${testcvs} -q co CVSROOT/modules" \
+'U CVSROOT/modules'
+         cd CVSROOT
+         echo 'aliasopt -a -d onedir first-dir' >modules
+         dotest modules2-a0 "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+         dotest_fail modules2-a1 "${testcvs} -q co aliasopt" \
+"${SPROG} checkout: -a cannot be specified in the modules file along with 
other options" \
+"${SPROG} server: -a cannot be specified in the modules file along with other 
options
+${CPROG} \[checkout aborted\]: cannot expand modules"
+         cd ..;  rm -r 1
+
+         # Clean up.
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir \
+                            $CVSROOT_DIRNAME/third-dir
+         ;;
+
+
+
+       modules3)
+         # More tests of modules, in particular what happens if several
+         # modules point to the same file.
+
+         # First just set up a directory first-dir and a file file1 in it.
+         mkdir 1; cd 1
+
+         dotest modules3-0 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest modules3-1 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+
+         cd first-dir
+         echo file1 >file1
+         dotest modules3-2 "${testcvs} add file1" \
+"${SPROG} add: scheduling file \`file1' for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest modules3-3 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ..
+
+         dotest modules3-4 "${testcvs} -q update -d CVSROOT" \
+"U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+         cat >modules <<EOF
+mod1 -a first-dir/file1
+bigmod -a mod1 first-dir/file1
+namednest -d src/sub/dir first-dir
+nestdeeper -d src/sub1/sub2/sub3/dir first-dir
+nestshallow -d src/dir second-dir/suba/subb
+path/in/modules &mod1
+another/path/test -d another/path/test first-dir
+EOF
+         dotest modules3-5 "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+
+         dotest modules3-6 "${testcvs} -q co bigmod" ''
+         rm -r first-dir
+         dotest modules3-7 "${testcvs} -q co bigmod" 'U first-dir/file1'
+         cd ..
+         rm -rf 1
+
+         mkdir 1; cd 1
+         mkdir suba
+         mkdir suba/subb
+         # This fails to work remote (it doesn't notice the directories,
+         # I suppose because they contain no files).  Bummer, especially
+         # considering this is a documented technique and everything.
+         dotest modules3-7a \
+"${testcvs} import -m add-dirs second-dir tag1 tag2" \
+"${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/suba
+${SPROG} import: Importing ${CVSROOT_DIRNAME}/second-dir/suba/subb
+
+No conflicts created by this import" "
+No conflicts created by this import"
+         cd ..; rm -r 1
+         mkdir 1; cd 1
+         dotest modules3-7b "${testcvs} co second-dir" \
+"${SPROG} checkout: Updating second-dir
+${SPROG} checkout: Updating second-dir/suba
+${SPROG} checkout: Updating second-dir/suba/subb" \
+"${SPROG} checkout: Updating second-dir"
+
+         if $remote; then
+           cd second-dir
+           mkdir suba
+           dotest modules3-7-workaround1 "${testcvs} add suba" \
+"Directory ${CVSROOT_DIRNAME}/second-dir/suba added to the repository"
+           cd suba
+           mkdir subb
+           dotest modules3-7-workaround2 "${testcvs} add subb" \
+"Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb added to the repository"
+           cd ../..
+         fi
+
+         cd second-dir/suba/subb
+         touch fileb
+         dotest modules3-7c "${testcvs} add fileb" \
+"${SPROG} add: scheduling file .fileb. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest modules3-7d "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/second-dir/suba/subb/fileb,v  <--  fileb
+initial revision: 1\.1"
+         cd ../../..
+         cd ..; rm -r 1
+
+         mkdir 1
+         cd 1
+         dotest modules3-8 "${testcvs} -q co namednest" \
+'U src/sub/dir/file1'
+         dotest modules3-9 "test -f src/sub/dir/file1" ''
+         cd ..
+         rm -rf 1
+
+         # Try the same thing, but with the directories nested even
+         # deeper (deeply enough so they are nested more deeply than
+         # the number of directories from / to ${TESTDIR}).
+         mkdir 1
+         cd 1
+         dotest modules3-10 "${testcvs} -q co nestdeeper" \
+'U src/sub1/sub2/sub3/dir/file1'
+         dotest modules3-11 "test -f src/sub1/sub2/sub3/dir/file1" ''
+
+         # While we are doing things like twisted uses of '/' (e.g.
+         # modules3-12), try this one.
+         if $remote; then
+           dotest_fail modules3-11br \
+"${testcvs} -q update ${TESTDIR}/1/src/sub1/sub2/sub3/dir/file1" \
+"absolute pathnames invalid for server (specified 
.${TESTDIR}/1/src/sub1/sub2/sub3/dir.)"
+         fi # end of remote-only tests
+
+         cd ..
+         rm -rf 1
+
+         # This one is almost too twisted for words.  The pathname output
+         # in the message from "co" doesn't include the "path/in/modules",
+         # but those directories do get created (with no CVSADM except
+         # in "modules" which has a CVSNULLREPOS).
+         # I'm not sure anyone is relying on this nonsense or whether we
+         # need to keep doing it, but it is what CVS currently does...
+         # Skip it for remote; the remote code has the good sense to
+         # not deal with it (on the minus side it gives
+         # "internal error: repository string too short." (CVS 1.9) or
+         # "warning: server is not creating directories one at a time" (now)
+         # instead of a real error).
+         # I'm tempted to just make it a fatal error to have '/' in a
+         # module name.  But see comments at modules3-16.
+         if $remote; then :; else
+           mkdir 1; cd 1
+           dotest modules3-12 "${testcvs} -q co path/in/modules" \
+"U first-dir/file1"
+           dotest modules3-13 "test -f path/in/modules/first-dir/file1" ''
+           cd ..; rm -rf 1
+         fi # end of tests skipped for remote
+
+         # Now here is where it used to get seriously bogus.
+         mkdir 1; cd 1
+         dotest modules3-14 \
+"${testcvs} -q rtag tag1 path/in/modules" ''
+         # CVS used to create this even though rtag should *never* affect
+         # the directory current when it is called!
+         dotest_fail modules3-15 "test -d path/in/modules" ''
+         # Just for trivia's sake, rdiff was not similarly vulnerable
+         # because it passed 0 for run_module_prog to do_module.
+         cd ..; rm -r 1
+
+         # Some people seem to want this to work.  I still suspect there
+         # are dark corners in slashes in module names.  This probably wants
+         # more thought before we start hacking on CVS (one way or the other)
+         # or documenting this.
+         mkdir 2; cd 2
+         dotest modules3-16 "${testcvs} -q co another/path/test" \
+"U another/path/test/file1"
+         dotest modules3-17 "cat another/path/test/file1" 'file1'
+
+         dokeep
+         cd ..; rm -rf 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       modules4)
+         # Some tests using the modules file with aliases that
+         # exclude particular directories.
+
+         mkdir 1; cd 1
+
+         dotest modules4-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest modules4-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+
+         cd first-dir
+          mkdir subdir subdir_long
+          dotest modules4-3 "${testcvs} add subdir subdir_long" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/subdir_long added to the repository"
+
+         echo file1 > file1
+         dotest modules4-4 "${testcvs} add file1" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+
+         echo file2 > subdir/file2
+         dotest modules4-5 "${testcvs} add subdir/file2" \
+"${SPROG}"' add: scheduling file `subdir/file2'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+
+         echo file3 > subdir_long/file3
+         dotest modules4-6 "${testcvs} add subdir_long/file3" \
+"${SPROG}"' add: scheduling file `subdir_long/file3'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+
+         dotest modules4-7 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/subdir/file2,v  <--  subdir/file2
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/subdir_long/file3,v  <--  subdir_long/file3
+initial revision: 1\.1"
+
+         cd ..
+
+         dotest modules4-8 "${testcvs} -q update -d CVSROOT" \
+"U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+         cat >modules <<EOF
+all -a first-dir
+some -a !first-dir/subdir first-dir
+other -a !first-dir/subdir !first-dir/subdir_long first-dir
+somewhat -a first-dir !first-dir/subdir
+EOF
+         dotest modules4-9 "${testcvs} -q ci -m add-modules" \
+"$CVSROOT_DIRNAME/CVSROOT/modules,v  <--  modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+
+         cd ..
+         mkdir 2; cd 2
+
+         dotest modules4-10 "${testcvs} -q co all" \
+"U first-dir/file1
+U first-dir/subdir/file2
+U first-dir/subdir_long/file3"
+         rm -rf first-dir
+
+         dotest modules4-11 "${testcvs} -q co some" \
+"U first-dir/file1
+U first-dir/subdir_long/file3"
+         dotest_fail modules4-12 "test -d first-dir/subdir" ''
+         dotest modules4-13 "test -d first-dir/subdir_long" ''
+         rm -rf first-dir
+
+         if $remote; then
+           # But remote seems to do it the other way.
+           dotest modules4-14r-1 "${testcvs} -q co somewhat" \
+"U first-dir/file1
+U first-dir/subdir_long/file3"
+           dotest_fail modules4-14r-2 "test -d first-dir/subdir" ''
+           dotest modules4-14r-3 "test -d first-dir/subdir_long" ''
+         else
+           # This is strange behavior, in that the order of the
+           # "!first-dir/subdir" and "first-dir" matter, and it isn't
+           # clear that they should.  I suspect it is long-standing
+           # strange behavior but I haven't verified that.
+           dotest modules4-14-1 "${testcvs} -q co somewhat" \
+"U first-dir/file1
+U first-dir/subdir/file2
+U first-dir/subdir_long/file3"
+           dotest modules4-14-2 "test -d first-dir/subdir" ''
+           dotest modules4-14-3 "test -d first-dir/subdir_long" ''
+         fi
+         rm -rf first-dir
+
+         dotest modules4-15 "${testcvs} -q co other" \
+"U first-dir/file1"
+         dotest_fail modules4-16 "test -d first-dir/subdir" ''
+         dotest_fail modules4-17 "test -d first-dir/subdir_long" ''
+         rm -rf first-dir
+
+         cd ..
+         rm -r 2
+
+         dotest modules4-18 "${testcvs} rtag tag some" \
+"${SPROG} rtag: Tagging first-dir
+${SPROG} rtag: Ignoring first-dir/subdir
+${SPROG} rtag: Tagging first-dir/subdir_long"
+
+         cd 1/first-dir/subdir
+         dotest modules4-19 "${testcvs} log file2" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v
+Working file: file2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add-it
+============================================================================="
+
+         dokeep
+         cd ../../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       modules5)
+         # Test module programs
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+         dotest modules5-1 "$testcvs -q co first-dir"
+         cd first-dir
+         mkdir subdir
+         dotest modules5-2 "${testcvs} add subdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
+         cd subdir
+         mkdir ssdir
+         dotest modules5-3 "${testcvs} add ssdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
+         touch a b
+         dotest modules5-4 "${testcvs} add a b" \
+"${SPROG} add: scheduling file .a. for addition
+${SPROG} add: scheduling file .b. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+
+         dotest modules5-5 "${testcvs} ci -m added" \
+"${CPROG} commit: Examining .
+${CPROG} commit: Examining ssdir
+${CVSROOT_DIRNAME}/first-dir/subdir/a,v  <--  a
+initial revision: 1\.1
+${CVSROOT_DIRNAME}/first-dir/subdir/b,v  <--  b
+initial revision: 1\.1"
+
+         cd ..
+         dotest modules5-6 "${testcvs} -q co CVSROOT" \
+"U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg"
+
+         # FIXCVS: The sleep in the following script helps avoid out of
+         # order messages, but we really need to figure out how to fix
+         # cvs to prevent them in the first place.
+         for i in checkout export tag; do
+           cat >> ${CVSROOT_DIRNAME}/$i.sh <<EOF
+#! $TESTSHELL
+sleep 1
+echo "$i script invoked in \`pwd\`"
+echo "args: \$@"
+EOF
+           # Cygwin doesn't set premissions correctly over the Samba share.
+           if test -n "$remotehost"; then
+             $CVS_RSH $remotehost "chmod +x ${CVSROOT_DIRNAME}/$i.sh"
+           else
+             chmod +x ${CVSROOT_DIRNAME}/$i.sh
+           fi
+         done
+
+         OPTS="-o${CVSROOT_DIRNAME}/checkout.sh -e 
${CVSROOT_DIRNAME}/export.sh -t${CVSROOT_DIRNAME}/tag.sh"
+         cat >CVSROOT/modules <<EOF
+realmodule ${OPTS} first-dir/subdir a
+dirmodule ${OPTS} first-dir/subdir
+namedmodule -d nameddir ${OPTS} first-dir/subdir
+EOF
+
+         dotest modules5-7 "$testcvs -Q ci -m 'add modules' CVSROOT/modules"
+
+         cd ..
+         rm -rf first-dir
+
+         # Test that real modules check out to realmodule/a, not subdir/a.
+         if $remote; then
+           # FIXCVS?
+           # Mac OSX 10.3 (Darwin ppc-osx1 5.5) fails here when $TMPDIR
+           # contains a symlink (it does not fail the local modules5-8).
+           # Since no other platforms are exhibiting the same problem, I
+           # suspect an issue with OSX and fork() or the like dereferencing
+           # the symlink, but it is possible it is something that could be
+           # fixed or worked around in CVS.
+           dotest modules5-8r "$testcvs co realmodule" \
+"U realmodule/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: realmodule"
+         else
+           dotest modules5-8 "${testcvs} co realmodule" \
+"U realmodule/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
+checkout script invoked in ${TESTDIR}/1
+args: realmodule"
+         fi
+         dotest modules5-9 "test -d realmodule && test -f realmodule/a" ""
+         dotest_fail modules5-10 "test -f realmodule/b" ""
+         if $remote; then
+           dotest modules5-11 "${testcvs} -q co realmodule" \
+"checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: realmodule"
+           dotest modules5-12 "${testcvs} -q update" ''
+           echo "change" >>realmodule/a
+           dotest modules5-13 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/first-dir/subdir/a,v  <--  realmodule/a
+new revision: 1\.2; previous revision: 1\.1"
+         else
+           dotest modules5-11 "${testcvs} -q co realmodule" \
+"checkout script invoked in ${TESTDIR}/1
+args: realmodule"
+           dotest modules5-12 "${testcvs} -q update" ''
+           echo "change" >>realmodule/a
+           dotest modules5-13 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/first-dir/subdir/a,v  <--  realmodule/a
+new revision: 1\.2; previous revision: 1\.1"
+         fi
+         dotest modules5-14 "echo yes | ${testcvs} release -d realmodule" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .realmodule.: "
+         dotest modules5-15 "${testcvs} -q rtag -Dnow MYTAG realmodule" \
+"tag script invoked in ${TESTDIR}/1
+args: realmodule MYTAG" \
+"tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: realmodule MYTAG"
+         if $remote; then
+           dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \
+"U realmodule/a
+export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: realmodule"
+         else
+           dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \
+"U realmodule/a
+export script invoked in ${TESTDIR}/1
+args: realmodule"
+         fi
+         rm -r realmodule
+
+         dotest_fail modules5-17 "${testcvs} co realmodule/a" \
+"${SPROG}"' checkout: module `realmodule/a'\'' is a request for a file in a 
module which is not a directory' \
+"${SPROG}"' server: module `realmodule/a'\'' is a request for a file in a 
module which is not a directory
+'"${CPROG}"' \[checkout aborted\]: cannot expand modules'
+
+         # Now test the ability to check out a single file from a directory
+         if $remote; then
+           dotest modules5-18 "${testcvs} co dirmodule/a" \
+"U dirmodule/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: dirmodule"
+         else
+           dotest modules5-18 "${testcvs} co dirmodule/a" \
+"U dirmodule/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule..
+checkout script invoked in ${TESTDIR}/1
+args: dirmodule"
+         fi
+         dotest modules5-19 "test -d dirmodule && test -f dirmodule/a" ""
+         dotest_fail modules5-20 "test -f dirmodule/b" ""
+         dotest modules5-21 "echo yes | ${testcvs} release -d dirmodule" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .dirmodule.: "
+
+         # Now test the ability to correctly reject a non-existent filename.
+         # For maximum studliness we would check that an error message is
+         # being output.
+         # We accept a zero exit status because it is what CVS does
+         # (Dec 95).  Probably the exit status should be nonzero,
+         # however.
+         if $remote; then
+           dotest modules5-22r "$testcvs co dirmodule/nonexist" \
+"$SPROG checkout: nothing known about \`dirmodule/nonexist'
+$SPROG checkout: Executing ..$CVSROOT_DIRNAME/checkout\.sh. .dirmodule..
+checkout script invoked in $TMPDIR/cvs-serv[0-9a-z]*
+args: dirmodule"
+         else
+           dotest modules5-22 "$testcvs co dirmodule/nonexist" \
+"$SPROG checkout: nothing known about \`dirmodule/nonexist'
+$SPROG checkout: Executing ..$CVSROOT_DIRNAME/checkout\.sh. .dirmodule..
+checkout script invoked in $TESTDIR/1
+args: dirmodule"
+         fi
+         # We tolerate the creation of the dirmodule directory, since that
+         # is what CVS does, not because we view that as preferable to not
+         # creating it.
+         dotest_fail modules5-23 "test -f dirmodule/a || test -f dirmodule/b" 
""
+         rm -r dirmodule
+
+         # Now test that a module using -d checks out to the specified
+         # directory.
+         if $remote; then
+           dotest modules5-24 "${testcvs} -q co namedmodule" \
+"U nameddir/a
+U nameddir/b
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: nameddir"
+         else
+           dotest modules5-24 "${testcvs} -q co namedmodule" \
+"U nameddir/a
+U nameddir/b
+checkout script invoked in ${TESTDIR}/1
+args: nameddir"
+         fi
+         dotest modules5-25 "test -f nameddir/a && test -f nameddir/b" ""
+         echo add line >>nameddir/a
+         # This seems suspicious: when we checkout an existing directory,
+         # the checkout script gets executed in addition to the update
+         # script.  Is that by design or accident?
+         if $remote; then
+           dotest modules5-26 "${testcvs} -q co namedmodule" \
+"M nameddir/a
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: nameddir"
+         else
+           dotest modules5-26 "${testcvs} -q co namedmodule" \
+"M nameddir/a
+checkout script invoked in ${TESTDIR}/1
+args: nameddir"
+         fi
+         rm nameddir/a
+
+         if $remote; then
+           dotest modules5-27 "${testcvs} -q co namedmodule" \
+"U nameddir/a
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: nameddir"
+         else
+           dotest modules5-27 "${testcvs} -q co namedmodule" \
+"U nameddir/a
+checkout script invoked in ${TESTDIR}/1
+args: nameddir"
+         fi
+         dotest modules5-28 "echo yes | ${testcvs} release -d nameddir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .nameddir.: "
+
+         # Now try the same tests with -d on command line
+         # FIXCVS?  The manual says the modules programs get the module name,
+         # but they really get the directory name.
+         if $remote; then
+           dotest modules5-29 "${testcvs} co -d mydir realmodule" \
+"U mydir/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-29 "${testcvs} co -d mydir realmodule" \
+"U mydir/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
+checkout script invoked in ${TESTDIR}/1
+args: mydir"
+         fi
+         dotest modules5-30 "test -d mydir && test -f mydir/a" ""
+         dotest_fail modules5-31 "test -d realmodule || test -f mydir/b" ""
+         if $remote; then
+           dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \
+"checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+           dotest modules5-33 "${testcvs} -q update" ''
+           echo "change" >>mydir/a
+           dotest modules5-34 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/first-dir/subdir/a,v  <--  mydir/a
+new revision: 1\.3; previous revision: 1\.2"
+         else
+           dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \
+"checkout script invoked in ${TESTDIR}/1
+args: mydir"
+           dotest modules5-33 "${testcvs} -q update" ''
+           echo "change" >>mydir/a
+           dotest modules5-34 "${testcvs} -q ci -m." \
+"$CVSROOT_DIRNAME/first-dir/subdir/a,v  <--  mydir/a
+new revision: 1\.3; previous revision: 1\.2"
+         fi
+         dotest modules5-35 "echo yes | ${testcvs} release -d mydir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .mydir.: "
+         if $remote; then
+           dotest modules5-36 "${testcvs} -q rtag -Dnow MYTAG2 realmodule" \
+"tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: realmodule MYTAG2"
+           dotest modules5-37 "${testcvs} -q export -r MYTAG2 -d mydir 
realmodule" \
+"U mydir/a
+export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-36 "${testcvs} -q rtag -Dnow MYTAG2 realmodule" \
+"tag script invoked in ${TESTDIR}/1
+args: realmodule MYTAG2"
+           dotest modules5-37 "${testcvs} -q export -r MYTAG2 -d mydir 
realmodule" \
+"U mydir/a
+export script invoked in ${TESTDIR}/1
+args: mydir"
+         fi
+         rm -r mydir
+
+         # Now test the ability to check out a single file from a directory
+         if $remote; then
+           dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \
+"U mydir/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \
+"U mydir/a
+${SPROG} checkout: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir..
+checkout script invoked in ${TESTDIR}/1
+args: mydir"
+         fi
+         dotest modules5-39 "test -d mydir && test -f mydir/a" ""
+         dotest_fail modules5-40 "test -d dirmodule || test -f mydir/b" ""
+         dotest modules5-41 "echo yes | ${testcvs} release -d mydir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .mydir.: "
+
+         # Now test the ability to correctly reject a non-existent filename.
+         # For maximum studliness we would check that an error message is
+         # being output.
+         # We accept a zero exit status because it is what CVS does
+         # (Dec 95).  Probably the exit status should be nonzero,
+         # however.
+         if $remote; then
+           dotest modules5-42r "$testcvs co -d mydir dirmodule/nonexist" \
+"$SPROG checkout: nothing known about \`mydir/nonexist'
+$SPROG checkout: Executing ..$CVSROOT_DIRNAME/checkout\.sh. .mydir..
+checkout script invoked in $TMPDIR/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-42 "$testcvs co -d mydir dirmodule/nonexist" \
+"$SPROG checkout: nothing known about \`mydir/nonexist'
+$SPROG checkout: Executing ..$CVSROOT_DIRNAME/checkout\.sh. .mydir..
+checkout script invoked in $TESTDIR/1
+args: mydir"
+         fi
+         # We tolerate the creation of the mydir directory, since that
+         # is what CVS does, not because we view that as preferable to not
+         # creating it.
+         dotest_fail modules5-43 "test -f mydir/a || test -f mydir/b" ""
+         rm -r mydir
+
+         if $remote; then
+           dotest modules5-44 "${testcvs} -q co -d mydir namedmodule" \
+"U mydir/a
+U mydir/b
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-44 "${testcvs} -q co -d mydir namedmodule" \
+"U mydir/a
+U mydir/b
+checkout script invoked in ${TESTDIR}/1
+args: mydir"
+         fi
+         dotest modules5-45 "test -f mydir/a && test -f mydir/b" ""
+         dotest_fail modules5-46 "test -d namedir"
+         echo add line >>mydir/a
+         # This seems suspicious: when we checkout an existing directory,
+         # the checkout script gets executed in addition to the update
+         # script.  Is that by design or accident?
+         if $remote; then
+           dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \
+"M mydir/a
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \
+"M mydir/a
+checkout script invoked in ${TESTDIR}/1
+args: mydir"
+         fi
+         rm mydir/a
+
+         if $remote; then
+           dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \
+"U mydir/a
+checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*
+args: mydir"
+         else
+           dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \
+"U mydir/a
+checkout script invoked in ${TESTDIR}/1
+args: mydir"
+         fi
+         dotest modules5-49 "echo yes | ${testcvs} release -d mydir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .mydir.: "
+
+         dokeep
+         cd ..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/*.sh
+         ;;
+
+
+
+       modules6)
+         #
+         # Test invalid module definitions
+         #
+         # See the header comment for the `modules' test for an index of
+         # the complete suite of modules tests.
+         #
+
+         #
+         # There was a bug in CVS through 1.11.1p1 where a bad module name
+         # would cause the previous line to be parsed as the module
+         # definition.  This test proves this doesn't happen anymore.
+         #
+         mkdir modules6
+         cd modules6
+         dotest module6-setup-1 "${testcvs} -Q co CVSROOT" ""
+         cd CVSROOT
+         echo "longmodulename who cares" >modules
+         echo "badname" >>modules
+         # This test almost isn't setup since it generates the error message
+         # we are looking for if `-Q' isn't specified, but I want to test the
+         # filename in the message later.
+         dotest modules6-setup-2 "$testcvs -Q ci -mbad-modules"
+
+         # Here's where CVS would report not being able to find `lename'
+         cd ..
+         dotest_fail modules6-1 "${testcvs} -q co badname" \
+"${SPROG} checkout: warning: NULL value for key .badname. at line 2 of 
.${CVSROOT_DIRNAME}/CVSROOT/modules.
+${SPROG} checkout: cannot find module .badname. - ignored" \
+"${SPROG} server: warning: NULL value for key .badname. at line 2 of 
.${CVSROOT_DIRNAME}/CVSROOT/modules.
+${SPROG} server: cannot find module .badname. - ignored
+${CPROG} \[checkout aborted\]: cannot expand modules"
+
+         dokeep
+         restore_adm
+         cd ..
+         rm -rf modules6
+         ;;
+
+
+
+       modules7)
+         #
+         # Test tag problems vs an empty CVSROOT/val-tags file
+         #
+         # See the header comment for the `modules' test for an index of
+         # the complete suite of modules tests.
+         #
+         mkdir modules7
+         cd modules7
+         dotest modules7-1 "$testcvs -Q co -d top ."
+         cd top
+         mkdir zero one
+         dotest modules7-2 "$testcvs -Q add zero one"
+         cd one
+         echo 'file1 contents' > file1
+         dotest modules7-2 "$testcvs -Q add file1"
+         dotest modules7-3 "$testcvs -Q ci -mnew file1"
+         dotest modules7-4 "$testcvs -Q tag mytag file1"
+         cd ../CVSROOT
+         echo 'all -a zero one' > modules
+         dotest modules7-5 "$testcvs -Q ci -mall-module"
+         cd ../..
+         mkdir myexport
+         cd myexport
+
+         # This failed prior to CVS version 1.12.10.
+         dotest modules7-7 "$testcvs export -rmytag all" \
+"$SPROG export: Updating zero
+$SPROG export: Updating one
+U one/file1"
+         dotest modules7-8 'cat one/file1' 'file1 contents'
+
+         dokeep
+
+         # cleanup
+         restore_adm
+         cd ../..
+         rm -fr modules7
+         rm -rf $CVSROOT_DIRNAME/zero $CVSROOT_DIRNAME/one
+         ;;
+
+
+
+       mkmodules)
+         # When a file listed in checkoutlist doesn't exist, cvs-1.10.4
+         # would fail to remove the CVSROOT/.#[0-9]* temporary file it
+         # creates while mkmodules is in the process of trying to check
+         # out the missing file.
+
+         mkdir 1; cd 1
+         dotest mkmodules-temp-file-removal-1 "${testcvs} -Q co CVSROOT" ''
+         cd CVSROOT
+         echo no-such-file >> checkoutlist
+         dotest mkmodules-temp-file-removal-2 "$testcvs -Q ci -m. checkoutlist"
+
+         dotest mkmodules-temp-file-removal-3 \
+"echo $CVSROOT_DIRNAME/CVSROOT/.#[0-9]*" \
+"$CVSROOT_DIRNAME/CVSROOT/\.#\[0-9\]\*"
+
+         # Versions 1.11.6 & 1.12.1 and earlier of CVS printed most of the
+         # white space included before error messages in checkoutlist.
+         echo "no-such-file     Failed to update no-such-file." >checkoutlist
+         dotest mkmodules-error-message-1 "$testcvs -Q ci -m. checkoutlist" \
+"$SPROG commit: Failed to update no-such-file\."
+
+         # Versions 1.11.6 & 1.12.1 and earlier of CVS used the error string
+         # from the checkoutlist file as the format string passed to error()'s
+         # printf.  Check that this is no longer the case by verifying that
+         # printf format patterns remain unchanged.
+         echo "no-such-file     Failed to update %s %lx times because %s 
happened %d times." >checkoutlist
+         dotest mkmodules-error-message-2 "$testcvs -Q ci -m. checkoutlist" \
+"$SPROG commit: Failed to update %s %lx times because %s happened %d times\."
+
+         dotest mkmodules-cleanup-1 \
+"$testcvs -Q up -pr1.1 checkoutlist >checkoutlist"
+         dotest mkmodules-cleanup-2 "$testcvs -Q ci -m. checkoutlist"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         ;;
+
+
+
+       co-d)
+         # Some tests of various permutations of co-d when directories exist
+         # and checkouts lengthen.
+         #
+         # Interestingly enough, these same tests pass when the directory
+         # lengthening happens via the modules file.  Go figure.
+         module=co-d
+         mkdir $module; cd $module
+         mkdir top; cd top
+         dotest co-d-init-1 "$testcvs -Q co -l ."
+         mkdir $module
+         dotest co-d-init-2 "$testcvs -Q add $module"
+         cd $module
+         echo content >file1
+         echo different content >file2
+         dotest co-d-init-3 "$testcvs -Q add file1 file2"
+         dotest co-d-init-4 "$testcvs -Q ci -madd-em"
+         cd ../..
+
+         mkdir 2; cd 2
+         dotest co-d-1 "$testcvs -q co -d dir $module" \
+"U dir/file1
+U dir/file2"
+         dotest co-d-1.2 "cat dir/CVS/Repository" "$module"
+
+         dotest co-d-2 "$testcvs -q co -d dir2/sdir $module" \
+"U dir2/sdir/file1
+U dir2/sdir/file2"
+         dotest co-d-2.2 "cat dir2/CVS/Repository" "."
+         dotest co-d-2.3 "cat dir2/sdir/CVS/Repository" "$module"
+
+         dotest co-d-2.4 "$testcvs -q co -d dir2.4/sdir/sdir2 $module" \
+"U dir2.4/sdir/sdir2/file1
+U dir2.4/sdir/sdir2/file2"
+         dotest co-d-2.4.2 "cat dir2.4/CVS/Repository" "CVSROOT/Emptydir"
+         dotest co-d-2.4.3 "cat dir2.4/sdir/CVS/Repository" "."
+         dotest co-d-2.4.3 "cat dir2.4/sdir/sdir2/CVS/Repository" "$module"
+
+         mkdir dir3
+         dotest co-d-3 "$testcvs -q co -d dir3 $module" \
+"U dir3/file1
+U dir3/file2"
+         dotest co-d-3.2 "cat dir3/CVS/Repository" "$module"
+
+         mkdir dir4
+         dotest co-d-4 "$testcvs -q co -d dir4/sdir $module" \
+"U dir4/sdir/file1
+U dir4/sdir/file2"
+
+         # CVS is only supposed to create administration directories in
+         # directories it also creates, and in the directory specified by
+         # the last portion of the path passed to -d regardless.  This is
+         #
+         # FIXCVS:
+         # This is broken in client/server mode because the server does not
+         # know the client's directory structure and has to create
+         # everything.
+         if $remote; then
+           dotest co-d-4.2r "cat dir4/CVS/Repository" "."
+         else
+           dotest_fail co-d-4.2 "test -d dir4/CVS"
+         fi
+
+         dotest co-d-4.3 "cat dir4/sdir/CVS/Repository" "$module"
+
+         mkdir dir5
+         mkdir dir5/sdir
+         dotest co-d-5 "$testcvs -q co -d dir5/sdir $module" \
+"U dir5/sdir/file1
+U dir5/sdir/file2"
+           # FIXCVS as for co-d-4.2r.
+         if $remote; then
+           dotest co-d-5.2 "cat dir5/CVS/Repository" "."
+         else
+           dotest_fail co-d-5.2 "test -d dir5/CVS"
+         fi
+
+         dotest co-d-5.3 "cat dir5/sdir/CVS/Repository" "$module"
+
+         # clean up
+         dokeep
+         cd ../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         rm -rf $module
+         ;;
+
+
+
+       cvsadm)
+         # These test check the content of CVS' administrative
+         # files as they are checked out in various configurations.
+         # (As a side note, I'm not using the "-q" flag in any of
+         # this code, which should provide some extra checking for
+          # those messages which don't seem to be checked thoroughly
+         # anywhere else.)  To do a thorough test, we need to make
+         # a bunch of modules in various configurations.
+         #
+         # <1mod> is a directory at the top level of cvsroot
+         #    ``foo bar''
+         # <2mod> is a directory at the second level of cvsroot
+         #    ``foo bar/baz''
+         # <1d1mod> is a directory at the top level which is
+         #   checked out into another directory
+         #     ``foo -d bar baz''
+         # <1d2mod> is a directory at the second level which is
+         #   checked out into another directory
+         #     ``foo -d bar baz/quux''
+         # <2d1mod> is a directory at the top level which is
+         #   checked out into a directory that is two deep
+         #     ``foo -d bar/baz quux''
+         # <2d2mod> is a directory at the second level which is
+         #   checked out into a directory that is two deep
+         #     ``foo -d bar/baz quux''
+         #
+         # The tests do each of these types separately and in twos.
+         # We also repeat each test -d flag for 1-deep and 2-deep
+         # directories.
+         #
+         # Each test should check the output for the Repository
+         # file, since that is the one which varies depending on 
+         # the directory and how it was checked out.
+         #
+         # Yes, this is verbose, but at least it's very thorough.
+
+         # convenience variables
+         REP=${CVSROOT}
+
+         # First, set TopLevelAdmin=yes so we're sure to get
+         # top-level CVS directories.
+         mkdir 1; cd 1
+         dotest cvsadm-setup-1 "${testcvs} -q co CVSROOT/config" \
+"U CVSROOT/config"
+         cd CVSROOT
+         echo "TopLevelAdmin=yes" >>config
+         dotest cvsadm-setup-2 "${testcvs} -q ci -m yes-top-level" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../..
+         rm -r 1
+
+         # Second, check out the modules file and edit it.
+         mkdir 1; cd 1
+         dotest cvsadm-1 "${testcvs} co CVSROOT/modules" \
+"U CVSROOT/modules"
+
+         # Test CVS/Root once.  Since there is only one part of
+         # the code which writes CVS/Root files (Create_Admin),
+         # there is no point in testing this every time.
+         dotest cvsadm-1a "cat CVS/Root" ${REP}
+         dotest cvsadm-1b "cat CVS/Repository" "\."
+         dotest cvsadm-1c "cat CVSROOT/CVS/Root" ${REP}
+         dotest cvsadm-1d "cat CVSROOT/CVS/Repository" "CVSROOT"
+          # All of the defined module names begin with a number.
+         # All of the top-level directory names begin with "dir".
+         # All of the subdirectory names begin with "sub".
+         # All of the top-level modules begin with "mod".
+         echo "# Module defs for cvsadm tests" > CVSROOT/modules
+         echo "1mod mod1" >> CVSROOT/modules
+         echo "1mod-2 mod1-2" >> CVSROOT/modules
+         echo "2mod mod2/sub2" >> CVSROOT/modules
+         echo "2mod-2 mod2-2/sub2-2" >> CVSROOT/modules
+         echo "1d1mod -d dir1d1 mod1" >> CVSROOT/modules
+         echo "1d1mod-2 -d dir1d1-2 mod1-2" >> CVSROOT/modules
+         echo "1d2mod -d dir1d2 mod2/sub2" >> CVSROOT/modules
+         echo "1d2mod-2 -d dir1d2-2 mod2-2/sub2-2" >> CVSROOT/modules
+         echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules
+         echo "2d1mod-2 -d dir2d1-2/sub2d1-2 mod1-2" >> CVSROOT/modules
+         echo "2d2mod -d dir2d2/sub2d2 mod2/sub2" >> CVSROOT/modules
+         echo "2d2mod-2 -d dir2d2-2/sub2d2-2 mod2-2/sub2-2" >> CVSROOT/modules
+         dotest cvsadm-1e "${testcvs} ci -m add-modules" \
+"${CPROG} commit: Examining .
+${CPROG} commit: Examining CVSROOT
+${CVSROOT_DIRNAME}/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+${SPROG} commit: Rebuilding administrative file database" \
+"${CPROG} commit: Examining .
+${CPROG} commit: Examining CVSROOT"
+         rm -rf CVS CVSROOT;
+
+         # Create the various modules
+         dotest cvsadm-2 "${testcvs} -q co -l ." ''
+         mkdir mod1
+         mkdir mod1-2
+         mkdir mod2
+         mkdir mod2/sub2
+         mkdir mod2-2
+         mkdir mod2-2/sub2-2
+         dotest cvsadm-2a "${testcvs} add mod1 mod1-2 mod2 mod2/sub2 mod2-2 
mod2-2/sub2-2" \
+"Directory ${CVSROOT_DIRNAME}/mod1 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod1-2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2/sub2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2-2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2-2/sub2-2 added to the repository"
+
+         # Populate the directories for the halibut
+         echo "file1" > mod1/file1
+         echo "file1-2" > mod1-2/file1-2
+         echo "file2" > mod2/sub2/file2
+         echo "file2-2" > mod2-2/sub2-2/file2-2
+         dotest cvsadm-2aa "${testcvs} add mod1/file1 mod1-2/file1-2 
mod2/sub2/file2 mod2-2/sub2-2/file2-2" \
+"${SPROG} add: scheduling file .mod1/file1. for addition
+${SPROG} add: scheduling file .mod1-2/file1-2. for addition
+${SPROG} add: scheduling file .mod2/sub2/file2. for addition
+${SPROG} add: scheduling file .mod2-2/sub2-2/file2-2. for addition
+${SPROG} add: use \`${SPROG} commit' to add these files permanently"
+
+         dotest cvsadm-2b "${testcvs} ci -m yup mod1 mod1-2 mod2 mod2-2" \
+"${CPROG} commit: Examining mod1
+${CPROG} commit: Examining mod1-2
+${CPROG} commit: Examining mod2
+${CPROG} commit: Examining mod2/sub2
+${CPROG} commit: Examining mod2-2
+${CPROG} commit: Examining mod2-2/sub2-2
+${CVSROOT_DIRNAME}/mod1/file1,v  <--  mod1/file1
+initial revision: 1.1
+${CVSROOT_DIRNAME}/mod1-2/file1-2,v  <--  mod1-2/file1-2
+initial revision: 1.1
+${CVSROOT_DIRNAME}/mod2/sub2/file2,v  <--  mod2/sub2/file2
+initial revision: 1.1
+${CVSROOT_DIRNAME}/mod2-2/sub2-2/file2-2,v  <--  mod2-2/sub2-2/file2-2
+initial revision: 1.1"
+         # Finished creating the modules -- clean up.
+         rm -rf CVS mod1 mod1-2 mod2 mod2-2
+         # Done.
+
+         ##################################################
+         ## Start the dizzying array of possibilities.
+         ## Begin with each module type separately.
+         ##################################################
+         
+         # Pattern -- after each checkout, first check the top-level
+         # CVS directory.  Then, check the directories in numerical
+         # order.
+
+         dotest cvsadm-3 "${testcvs} co 1mod" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1"
+         dotest cvsadm-3b "cat CVS/Repository" "\."
+         dotest cvsadm-3d "cat 1mod/CVS/Repository" "mod1"
+         rm -rf CVS 1mod
+
+         dotest cvsadm-4 "${testcvs} co 2mod" \
+"${SPROG} checkout: Updating 2mod
+U 2mod/file2"
+         dotest cvsadm-4b "cat CVS/Repository" "\."
+         dotest cvsadm-4d "cat 2mod/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 2mod
+
+         dotest cvsadm-5 "${testcvs} co 1d1mod" \
+"${SPROG} checkout: Updating dir1d1
+U dir1d1/file1"
+         dotest cvsadm-5b "cat CVS/Repository" "\."
+         dotest cvsadm-5d "cat dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS dir1d1
+
+         dotest cvsadm-6 "${testcvs} co 1d2mod" \
+"${SPROG} checkout: Updating dir1d2
+U dir1d2/file2"
+         dotest cvsadm-6b "cat CVS/Repository" "\."
+         dotest cvsadm-6d "cat dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir1d2
+
+         dotest cvsadm-7 "${testcvs} co 2d1mod" \
+"${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+         dotest cvsadm-7b "cat CVS/Repository" "\."
+         dotest cvsadm-7d "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir2d1
+
+         dotest cvsadm-8 "${testcvs} co 2d2mod" \
+"${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         dotest cvsadm-8b "cat CVS/Repository" "\."
+         dotest cvsadm-8d "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir2d2
+
+         ##################################################
+         ## You are in a shell script of twisted little
+         ## module combination statements, all alike.
+         ##################################################
+
+         ### 1mod
+         
+         dotest cvsadm-9 "${testcvs} co 1mod 1mod-2" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1
+${SPROG} checkout: Updating 1mod-2
+U 1mod-2/file1-2"
+         # the usual for the top level
+         dotest cvsadm-9b "cat CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-9d "cat 1mod/CVS/Repository" "mod1"
+         # the usual for 1mod copy
+         dotest cvsadm-9f "cat 1mod-2/CVS/Repository" "mod1-2"
+         rm -rf CVS 1mod 1mod-2
+
+         # 1mod 2mod redmod bluemod
+         dotest cvsadm-10 "${testcvs} co 1mod 2mod" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1
+${SPROG} checkout: Updating 2mod
+U 2mod/file2"
+         # the usual for the top level
+         dotest cvsadm-10b "cat CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-10d "cat 1mod/CVS/Repository" "mod1"
+         # the usual for 2dmod
+         dotest cvsadm-10f "cat 2mod/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 1mod 2mod
+
+         dotest cvsadm-11 "${testcvs} co 1mod 1d1mod" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1
+${SPROG} checkout: Updating dir1d1
+U dir1d1/file1"
+         # the usual for the top level
+         dotest cvsadm-11b "cat CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-11d "cat 1mod/CVS/Repository" "mod1"
+         # the usual for 1d1mod
+         dotest cvsadm-11f "cat dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS 1mod dir1d1
+
+         dotest cvsadm-12 "${testcvs} co 1mod 1d2mod" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1
+${SPROG} checkout: Updating dir1d2
+U dir1d2/file2"
+         # the usual for the top level
+         dotest cvsadm-12b "cat CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-12d "cat 1mod/CVS/Repository" "mod1"
+         # the usual for 1d2mod
+         dotest cvsadm-12f "cat dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 1mod dir1d2
+
+         dotest cvsadm-13 "${testcvs} co 1mod 2d1mod" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1
+${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+         # the usual for the top level
+         dotest cvsadm-13b "cat CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-13d "cat 1mod/CVS/Repository" "mod1"
+         # the usual for 2d1mod
+         dotest cvsadm-13f "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS 1mod dir2d1
+
+         dotest cvsadm-14 "${testcvs} co 1mod 2d2mod" \
+"${SPROG} checkout: Updating 1mod
+U 1mod/file1
+${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         # the usual for the top level
+         dotest cvsadm-14b "cat CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-14d "cat 1mod/CVS/Repository" "mod1"
+         # the usual for 2d2mod
+         dotest cvsadm-14f "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 1mod dir2d2
+
+
+         ### 2mod
+         
+         dotest cvsadm-15 "${testcvs} co 2mod 2mod-2" \
+"${SPROG} checkout: Updating 2mod
+U 2mod/file2
+${SPROG} checkout: Updating 2mod-2
+U 2mod-2/file2-2"
+         # the usual for the top level
+         dotest cvsadm-15b "cat CVS/Repository" "\."
+         # the usual for 2mod
+         dotest cvsadm-15d "cat 2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 2mod copy
+         dotest cvsadm-15f "cat 2mod-2/CVS/Repository" "mod2-2/sub2-2"
+         rm -rf CVS 2mod 2mod-2
+
+
+         dotest cvsadm-16 "${testcvs} co 2mod 1d1mod" \
+"${SPROG} checkout: Updating 2mod
+U 2mod/file2
+${SPROG} checkout: Updating dir1d1
+U dir1d1/file1"
+         # the usual for the top level
+         dotest cvsadm-16b "cat CVS/Repository" "\."
+         # the usual for 2mod
+         dotest cvsadm-16d "cat 2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 1d1mod
+         dotest cvsadm-16f "cat dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS 2mod dir1d1
+
+         dotest cvsadm-17 "${testcvs} co 2mod 1d2mod" \
+"${SPROG} checkout: Updating 2mod
+U 2mod/file2
+${SPROG} checkout: Updating dir1d2
+U dir1d2/file2"
+         # the usual for the top level
+         dotest cvsadm-17b "cat CVS/Repository" "\."
+         # the usual for 2mod
+         dotest cvsadm-17d "cat 2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 1d2mod
+         dotest cvsadm-17f "cat dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 2mod dir1d2
+
+         dotest cvsadm-18 "${testcvs} co 2mod 2d1mod" \
+"${SPROG} checkout: Updating 2mod
+U 2mod/file2
+${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+         # the usual for the top level
+         dotest cvsadm-18b "cat CVS/Repository" "\."
+         # the usual for 2mod
+         dotest cvsadm-18d "cat 2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 2d1mod
+         dotest cvsadm-18f "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS 2mod dir2d1
+
+         dotest cvsadm-19 "${testcvs} co 2mod 2d2mod" \
+"${SPROG} checkout: Updating 2mod
+U 2mod/file2
+${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         # the usual for the top level
+         dotest cvsadm-19b "cat CVS/Repository" "\."
+         # the usual for 2mod
+         dotest cvsadm-19d "cat 2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 2d2mod
+         dotest cvsadm-19f "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 2mod dir2d2
+
+
+         ### 1d1mod
+
+         dotest cvsadm-20 "${testcvs} co 1d1mod 1d1mod-2" \
+"${SPROG} checkout: Updating dir1d1
+U dir1d1/file1
+${SPROG} checkout: Updating dir1d1-2
+U dir1d1-2/file1-2"
+         # the usual for the top level
+         dotest cvsadm-20b "cat CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-20d "cat dir1d1/CVS/Repository" "mod1"
+         # the usual for 1d1mod copy
+         dotest cvsadm-20f "cat dir1d1-2/CVS/Repository" "mod1-2"
+         rm -rf CVS dir1d1 dir1d1-2
+
+         dotest cvsadm-21 "${testcvs} co 1d1mod 1d2mod" \
+"${SPROG} checkout: Updating dir1d1
+U dir1d1/file1
+${SPROG} checkout: Updating dir1d2
+U dir1d2/file2"
+         # the usual for the top level
+         dotest cvsadm-21b "cat CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-21d "cat dir1d1/CVS/Repository" "mod1"
+         # the usual for 1d2mod
+         dotest cvsadm-21f "cat dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir1d1 dir1d2
+
+         dotest cvsadm-22 "${testcvs} co 1d1mod 2d1mod" \
+"${SPROG} checkout: Updating dir1d1
+U dir1d1/file1
+${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+         # the usual for the top level
+         dotest cvsadm-22b "cat CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-22d "cat dir1d1/CVS/Repository" "mod1"
+         # the usual for 2d1mod
+         dotest cvsadm-22f "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir1d1 dir2d1
+
+         dotest cvsadm-23 "${testcvs} co 1d1mod 2d2mod" \
+"${SPROG} checkout: Updating dir1d1
+U dir1d1/file1
+${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         # the usual for the top level
+         dotest cvsadm-23b "cat CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-23d "cat dir1d1/CVS/Repository" "mod1"
+         # the usual for 2d2mod
+         dotest cvsadm-23f "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir1d1 dir2d2
+
+
+         ### 1d2mod
+
+         dotest cvsadm-24 "${testcvs} co 1d2mod 1d2mod-2" \
+"${SPROG} checkout: Updating dir1d2
+U dir1d2/file2
+${SPROG} checkout: Updating dir1d2-2
+U dir1d2-2/file2-2"
+         # the usual for the top level
+         dotest cvsadm-24b "cat CVS/Repository" "\."
+         # the usual for 1d2mod
+         dotest cvsadm-24d "cat dir1d2/CVS/Repository" "mod2/sub2"
+         # the usual for 1d2mod copy
+         dotest cvsadm-24f "cat dir1d2-2/CVS/Repository" "mod2-2/sub2-2"
+         rm -rf CVS dir1d2 dir1d2-2
+
+         dotest cvsadm-25 "${testcvs} co 1d2mod 2d1mod" \
+"${SPROG} checkout: Updating dir1d2
+U dir1d2/file2
+${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+         # the usual for the top level
+         dotest cvsadm-25b "cat CVS/Repository" "\."
+         # the usual for 1d2mod
+         dotest cvsadm-25d "cat dir1d2/CVS/Repository" "mod2/sub2"
+         # the usual for 2d1mod
+         dotest cvsadm-25f "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir1d2 dir2d1
+
+         dotest cvsadm-26 "${testcvs} co 1d2mod 2d2mod" \
+"${SPROG} checkout: Updating dir1d2
+U dir1d2/file2
+${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         # the usual for the top level
+         dotest cvsadm-26b "cat CVS/Repository" "\."
+         # the usual for 1d2mod
+         dotest cvsadm-26d "cat dir1d2/CVS/Repository" "mod2/sub2"
+         # the usual for 2d2mod
+         dotest cvsadm-26f "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir1d2 dir2d2
+
+
+         # 2d1mod
+
+         dotest cvsadm-27 "${testcvs} co 2d1mod 2d1mod-2" \
+"${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1
+${SPROG} checkout: Updating dir2d1-2/sub2d1-2
+U dir2d1-2/sub2d1-2/file1-2"
+         # the usual for the top level
+         dotest cvsadm-27b "cat CVS/Repository" "\."
+         # the usual for 2d1mod
+         dotest cvsadm-27d "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         # the usual for 2d1mod
+         dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" "\."
+         dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" "mod1-2"
+         rm -rf CVS dir2d1 dir2d1-2
+
+         dotest cvsadm-28 "${testcvs} co 2d1mod 2d2mod" \
+"${SPROG} checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1
+${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         # the usual for the top level
+         dotest cvsadm-28b "cat CVS/Repository" "\."
+         # the usual for 2d1mod
+         dotest cvsadm-28d "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         # the usual for 2d2mod
+         dotest cvsadm-28h "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir2d1 dir2d2
+
+         
+         # 2d2mod
+
+         dotest cvsadm-29 "${testcvs} co 2d2mod 2d2mod-2" \
+"${SPROG} checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2
+${SPROG} checkout: Updating dir2d2-2/sub2d2-2
+U dir2d2-2/sub2d2-2/file2-2"
+         # the usual for the top level
+         dotest cvsadm-29b "cat CVS/Repository" "\."
+         # the usual for 2d2mod
+         dotest cvsadm-29d "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         # the usual for 2d2mod
+         dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" "mod2-2"
+         dotest cvsadm-29j "cat dir2d2-2/sub2d2-2/CVS/Repository" \
+"mod2-2/sub2-2"
+         rm -rf CVS dir2d2 dir2d2-2
+
+         ##################################################
+         ## And now, all of that again using the "-d" flag
+         ## on the command line.
+         ##################################################
+
+         dotest cvsadm-1d3 "${testcvs} co -d dir 1mod" \
+"${SPROG} checkout: Updating dir
+U dir/file1"
+         dotest cvsadm-1d3b "cat CVS/Repository" "\."
+         dotest cvsadm-1d3d "cat dir/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d4 "${testcvs} co -d dir 2mod" \
+"${SPROG} checkout: Updating dir
+U dir/file2"
+         dotest cvsadm-1d4b "cat CVS/Repository" "\."
+         dotest cvsadm-1d4d "cat dir/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d5 "${testcvs} co -d dir 1d1mod" \
+"${SPROG} checkout: Updating dir
+U dir/file1"
+         dotest cvsadm-1d5b "cat CVS/Repository" "\."
+         dotest cvsadm-1d5d "cat dir/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d6 "${testcvs} co -d dir 1d2mod" \
+"${SPROG} checkout: Updating dir
+U dir/file2"
+         dotest cvsadm-1d6b "cat CVS/Repository" "\."
+         dotest cvsadm-1d6d "cat dir/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d7 "${testcvs} co -d dir 2d1mod" \
+"${SPROG} checkout: Updating dir
+U dir/file1"
+         dotest cvsadm-1d7b "cat CVS/Repository" "\."
+         dotest cvsadm-1d7d "cat dir/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d8 "${testcvs} co -d dir 2d2mod" \
+"${SPROG} checkout: Updating dir
+U dir/file2"
+         dotest cvsadm-1d8b "cat CVS/Repository" "\."
+         dotest cvsadm-1d8d "cat dir/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         ##################################################
+         ## Los Combonaciones
+         ##################################################
+
+         ### 1mod
+
+         dotest cvsadm-1d9 "${testcvs} co -d dir 1mod 1mod-2" \
+"${SPROG} checkout: Updating dir/1mod
+U dir/1mod/file1
+${SPROG} checkout: Updating dir/1mod-2
+U dir/1mod-2/file1-2"
+         # the usual for the top level
+         dotest cvsadm-1d9b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d9d "cat dir/CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-1d9f "cat dir/1mod/CVS/Repository" "mod1"
+         # the usual for 1mod copy
+         dotest cvsadm-1d9h "cat dir/1mod-2/CVS/Repository" "mod1-2"
+         rm -rf CVS dir
+
+         # 1mod 2mod redmod bluemod
+         dotest cvsadm-1d10 "${testcvs} co -d dir 1mod 2mod" \
+"${SPROG} checkout: Updating dir/1mod
+U dir/1mod/file1
+${SPROG} checkout: Updating dir/2mod
+U dir/2mod/file2"
+         dotest cvsadm-1d10b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d10d "cat dir/CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-1d10f "cat dir/1mod/CVS/Repository" "mod1"
+         # the usual for 2dmod
+         dotest cvsadm-1d10h "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d11 "${testcvs} co -d dir 1mod 1d1mod" \
+"${SPROG} checkout: Updating dir/1mod
+U dir/1mod/file1
+${SPROG} checkout: Updating dir/dir1d1
+U dir/dir1d1/file1"
+         dotest cvsadm-1d11b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d11d "cat dir/CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-1d11f "cat dir/1mod/CVS/Repository" "mod1"
+         # the usual for 1d1mod
+         dotest cvsadm-1d11h "cat dir/dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d12 "${testcvs} co -d dir 1mod 1d2mod" \
+"${SPROG} checkout: Updating dir/1mod
+U dir/1mod/file1
+${SPROG} checkout: Updating dir/dir1d2
+U dir/dir1d2/file2"
+         dotest cvsadm-1d12b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d12d "cat dir/CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-1d12f "cat dir/1mod/CVS/Repository" "mod1"
+         # the usual for 1d2mod
+         dotest cvsadm-1d12h "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d13 "${testcvs} co -d dir 1mod 2d1mod" \
+"${SPROG} checkout: Updating dir/1mod
+U dir/1mod/file1
+${SPROG} checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1"
+         dotest cvsadm-1d13b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d13d "cat dir/CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-1d13f "cat dir/1mod/CVS/Repository" "mod1"
+         # the usual for 2d1mod
+         dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d14 "${testcvs} co -d dir 1mod 2d2mod" \
+"${SPROG} checkout: Updating dir/1mod
+U dir/1mod/file1
+${SPROG} checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2"
+         dotest cvsadm-1d14b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d14d "cat dir/CVS/Repository" "\."
+         # the usual for 1mod
+         dotest cvsadm-1d14f "cat dir/1mod/CVS/Repository" "mod1"
+         # the usual for 2d2mod
+         dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+
+         ### 2mod
+
+         dotest cvsadm-1d15 "${testcvs} co -d dir 2mod 2mod-2" \
+"${SPROG} checkout: Updating dir/2mod
+U dir/2mod/file2
+${SPROG} checkout: Updating dir/2mod-2
+U dir/2mod-2/file2-2"
+         dotest cvsadm-1d15b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d15d "cat dir/CVS/Repository" "mod2"
+         # the usual for 2mod
+         dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 2mod copy
+         dotest cvsadm-1d15h "cat dir/2mod-2/CVS/Repository" "mod2-2/sub2-2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d16 "${testcvs} co -d dir 2mod 1d1mod" \
+"${SPROG} checkout: Updating dir/2mod
+U dir/2mod/file2
+${SPROG} checkout: Updating dir/dir1d1
+U dir/dir1d1/file1"
+         dotest cvsadm-1d16b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d16d "cat dir/CVS/Repository" "mod2"
+         # the usual for 2mod
+         dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 1d1mod
+         dotest cvsadm-1d16h "cat dir/dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d17 "${testcvs} co -d dir 2mod 1d2mod" \
+"${SPROG} checkout: Updating dir/2mod
+U dir/2mod/file2
+${SPROG} checkout: Updating dir/dir1d2
+U dir/dir1d2/file2"
+         dotest cvsadm-1d17b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d17d "cat dir/CVS/Repository" "mod2"
+         # the usual for 2mod
+         dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 1d2mod
+         dotest cvsadm-1d17h "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d18 "${testcvs} co -d dir 2mod 2d1mod" \
+"${SPROG} checkout: Updating dir/2mod
+U dir/2mod/file2
+${SPROG} checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1"
+         dotest cvsadm-1d18b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d18d "cat dir/CVS/Repository" "mod2"
+         # the usual for 2mod
+         dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 2d1mod
+         dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d19 "${testcvs} co -d dir 2mod 2d2mod" \
+"${SPROG} checkout: Updating dir/2mod
+U dir/2mod/file2
+${SPROG} checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2"
+         dotest cvsadm-1d19b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d19d "cat dir/CVS/Repository" "mod2"
+         # the usual for 2mod
+         dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         # the usual for 2d2mod
+         dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+
+         ### 1d1mod
+
+         dotest cvsadm-1d20 "${testcvs} co -d dir 1d1mod 1d1mod-2" \
+"${SPROG} checkout: Updating dir/dir1d1
+U dir/dir1d1/file1
+${SPROG} checkout: Updating dir/dir1d1-2
+U dir/dir1d1-2/file1-2"
+         dotest cvsadm-1d20b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d20d "cat dir/CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-1d20f "cat dir/dir1d1/CVS/Repository" "mod1"
+         # the usual for 1d1mod copy
+         dotest cvsadm-1d20h "cat dir/dir1d1-2/CVS/Repository" "mod1-2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d21 "${testcvs} co -d dir 1d1mod 1d2mod" \
+"${SPROG} checkout: Updating dir/dir1d1
+U dir/dir1d1/file1
+${SPROG} checkout: Updating dir/dir1d2
+U dir/dir1d2/file2"
+         dotest cvsadm-1d21b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d21d "cat dir/CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-1d21f "cat dir/dir1d1/CVS/Repository" "mod1"
+         # the usual for 1d2mod
+         dotest cvsadm-1d21h "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d22 "${testcvs} co -d dir 1d1mod 2d1mod" \
+"${SPROG} checkout: Updating dir/dir1d1
+U dir/dir1d1/file1
+${SPROG} checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1"
+         dotest cvsadm-1d22b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d22d "cat dir/CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-1d22f "cat dir/dir1d1/CVS/Repository" "mod1"
+         # the usual for 2d1mod
+         dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d23 "${testcvs} co -d dir 1d1mod 2d2mod" \
+"${SPROG} checkout: Updating dir/dir1d1
+U dir/dir1d1/file1
+${SPROG} checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2"
+         dotest cvsadm-1d23b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d23d "cat dir/CVS/Repository" "\."
+         # the usual for 1d1mod
+         dotest cvsadm-1d23f "cat dir/dir1d1/CVS/Repository" "mod1"
+         # the usual for 2d2mod
+         dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+
+         ### 1d2mod
+
+         dotest cvsadm-1d24 "${testcvs} co -d dir 1d2mod 1d2mod-2" \
+"${SPROG} checkout: Updating dir/dir1d2
+U dir/dir1d2/file2
+${SPROG} checkout: Updating dir/dir1d2-2
+U dir/dir1d2-2/file2-2"
+         dotest cvsadm-1d24b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d24d "cat dir/CVS/Repository" "mod2"
+         # the usual for 1d2mod
+         dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         # the usual for 1d2mod copy
+         dotest cvsadm-1d24h "cat dir/dir1d2-2/CVS/Repository" "mod2-2/sub2-2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d25 "${testcvs} co -d dir 1d2mod 2d1mod" \
+"${SPROG} checkout: Updating dir/dir1d2
+U dir/dir1d2/file2
+${SPROG} checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1"
+         dotest cvsadm-1d25b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d25d "cat dir/CVS/Repository" "mod2"
+         # the usual for 1d2mod
+         dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         # the usual for 2d1mod
+         dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d26 "${testcvs} co -d dir 1d2mod 2d2mod" \
+"${SPROG} checkout: Updating dir/dir1d2
+U dir/dir1d2/file2
+${SPROG} checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2"
+         dotest cvsadm-1d26b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d26d "cat dir/CVS/Repository" "mod2"
+         # the usual for 1d2mod
+         dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         # the usual for 2d2mod
+         dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+
+         # 2d1mod
+
+         dotest cvsadm-1d27 "${testcvs} co -d dir 2d1mod 2d1mod-2" \
+"${SPROG} checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1
+${SPROG} checkout: Updating dir/dir2d1-2/sub2d1-2
+U dir/dir2d1-2/sub2d1-2/file1-2"
+         dotest cvsadm-1d27b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d27d "cat dir/CVS/Repository" "CVSROOT/Emptydir"
+         # the usual for 2d1mod
+         dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         # the usual for 2d1mod
+         dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" "\."
+         dotest cvsadm-1d27l "cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \
+"mod1-2"
+         rm -rf CVS dir
+
+         dotest cvsadm-1d28 "${testcvs} co -d dir 2d1mod 2d2mod" \
+"${SPROG} checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1
+${SPROG} checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2"
+         dotest cvsadm-1d28b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d28d "cat dir/CVS/Repository" "CVSROOT/Emptydir"
+         # the usual for 2d1mod
+         dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         # the usual for 2d2mod
+         dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         
+         # 2d2mod
+
+         dotest cvsadm-1d29 "${testcvs} co -d dir 2d2mod 2d2mod-2" \
+"${SPROG} checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2
+${SPROG} checkout: Updating dir/dir2d2-2/sub2d2-2
+U dir/dir2d2-2/sub2d2-2/file2-2"
+         dotest cvsadm-1d29b "cat CVS/Repository" "\."
+         # the usual for the dir level
+         dotest cvsadm-1d29d "cat dir/CVS/Repository" "\."
+         # the usual for 2d2mod
+         dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         # the usual for 2d2mod
+         dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" "mod2-2"
+         dotest cvsadm-1d29l "cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \
+"mod2-2/sub2-2"
+         rm -rf CVS dir
+
+         ##################################################
+         ## And now, some of that again using the "-d" flag
+         ## on the command line, but use a longer path.
+         ##################################################
+
+         dotest cvsadm-2d3-1 "$testcvs co -d dir/dir2 1mod" \
+"$SPROG checkout: Updating dir/dir2
+U dir/dir2/file1"
+
+         # Remote couldn't handle this, even with the "mkdir dir", before
+         # CVS 1.11.14.
+         dotest cvsadm-2d3b "cat CVS/Repository" "\."
+         dotest cvsadm-2d3d "cat dir/CVS/Repository" "."
+         dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-2d4 "$testcvs co -d dir/dir2 2mod" \
+"$SPROG checkout: Updating dir/dir2
+U dir/dir2/file2"
+         dotest cvsadm-2d4b "cat CVS/Repository" "\."
+         dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-2d5 "$testcvs co -d dir/dir2 1d1mod" \
+"$SPROG checkout: Updating dir/dir2
+U dir/dir2/file1"
+         dotest cvsadm-2d5b "cat CVS/Repository" "\."
+         dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-2d6 "$testcvs co -d dir/dir2 1d2mod" \
+"$SPROG checkout: Updating dir/dir2
+U dir/dir2/file2"
+         dotest cvsadm-2d6b "cat CVS/Repository" "\."
+         dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-2d7 "$testcvs co -d dir/dir2 2d1mod" \
+"$SPROG checkout: Updating dir/dir2
+U dir/dir2/file1"
+         dotest cvsadm-2d7b "cat CVS/Repository" "\."
+         dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-2d8 "$testcvs co -d dir/dir2 2d2mod" \
+"$SPROG checkout: Updating dir/dir2
+U dir/dir2/file2"
+         dotest cvsadm-2d8b "cat CVS/Repository" "\."
+         dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         ##################################################
+         ## And now, a few of those tests revisited to
+         ## test the behavior of the -N flag.
+         ##################################################
+
+         dotest cvsadm-N3 "$testcvs co -N 1mod" \
+"$SPROG checkout: Updating 1mod
+U 1mod/file1"
+         dotest cvsadm-N3b "cat CVS/Repository" "\."
+         dotest cvsadm-N3d "cat 1mod/CVS/Repository" "mod1"
+         rm -rf CVS 1mod
+
+         dotest cvsadm-N4 "$testcvs co -N 2mod" \
+"$SPROG checkout: Updating 2mod
+U 2mod/file2"
+         dotest cvsadm-N4b "cat CVS/Repository" "\."
+         dotest cvsadm-N4d "cat 2mod/CVS/Repository" "mod2/sub2"
+         rm -rf CVS 2mod
+
+         dotest cvsadm-N5 "$testcvs co -N 1d1mod" \
+"$SPROG checkout: Updating dir1d1
+U dir1d1/file1"
+         dotest cvsadm-N5b "cat CVS/Repository" "\."
+         dotest cvsadm-N5d "cat dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS dir1d1
+
+         dotest cvsadm-N6 "$testcvs co -N 1d2mod" \
+"$SPROG checkout: Updating dir1d2
+U dir1d2/file2"
+         dotest cvsadm-N6b "cat CVS/Repository" "\."
+         dotest cvsadm-N6d "cat dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir1d2
+
+         dotest cvsadm-N7 "$testcvs co -N 2d1mod" \
+"$SPROG checkout: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+         dotest cvsadm-N7b "cat CVS/Repository" "\."
+         dotest cvsadm-N7d "cat dir2d1/CVS/Repository" "\."
+         dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir2d1
+
+         dotest cvsadm-N8 "$testcvs co -N 2d2mod" \
+"$SPROG checkout: Updating dir2d2/sub2d2
+U dir2d2/sub2d2/file2"
+         dotest cvsadm-N8b "cat CVS/Repository" "\."
+         dotest cvsadm-N8d "cat dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir2d2
+
+         ## the ones in one-deep directories
+
+         dotest cvsadm-N1d3 "$testcvs co -N -d dir 1mod" \
+"$SPROG checkout: Updating dir/1mod
+U dir/1mod/file1"
+         dotest cvsadm-N1d3b "cat CVS/Repository" "\."
+         dotest cvsadm-N1d3d "cat dir/CVS/Repository" "\."
+         dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-N1d4 "$testcvs co -N -d dir 2mod" \
+"$SPROG checkout: Updating dir/2mod
+U dir/2mod/file2"
+         dotest cvsadm-N1d4b "cat CVS/Repository" "\."
+         dotest cvsadm-N1d4d "cat dir/CVS/Repository" "mod2"
+         dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-N1d5 "$testcvs co -N -d dir 1d1mod" \
+"$SPROG checkout: Updating dir/dir1d1
+U dir/dir1d1/file1"
+         dotest cvsadm-N1d5b "cat CVS/Repository" "\."
+         dotest cvsadm-N1d5d "cat dir/CVS/Repository" "\."
+         dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-N1d6 "$testcvs co -N -d dir 1d2mod" \
+"$SPROG checkout: Updating dir/dir1d2
+U dir/dir1d2/file2"
+         dotest cvsadm-N1d6b "cat CVS/Repository" "\."
+         dotest cvsadm-N1d6d "cat dir/CVS/Repository" "mod2"
+         dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         dotest cvsadm-N1d7 "$testcvs co -N -d dir 2d1mod" \
+"$SPROG checkout: Updating dir/dir2d1/sub2d1
+U dir/dir2d1/sub2d1/file1"
+         dotest cvsadm-N1d7b "cat CVS/Repository" "\."
+         dotest cvsadm-N1d7d "cat dir/CVS/Repository" "CVSROOT/Emptydir"
+         dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         dotest cvsadm-N1d8 "$testcvs co -N -d dir 2d2mod" \
+"$SPROG checkout: Updating dir/dir2d2/sub2d2
+U dir/dir2d2/sub2d2/file2"
+         dotest cvsadm-N1d8b "cat CVS/Repository" "\."
+         dotest cvsadm-N1d8d "cat dir/CVS/Repository" "\."
+         dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \
+"mod2/sub2"
+         rm -rf CVS dir
+
+         ## the ones in two-deep directories
+
+         mkdir dir
+         dotest cvsadm-N2d3 "$testcvs co -N -d dir/dir2 1mod" \
+"$SPROG checkout: Updating dir/dir2/1mod
+U dir/dir2/1mod/file1"
+         dotest cvsadm-N2d3b "cat CVS/Repository" "\."
+         dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" "\."
+         dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-N2d4 "$testcvs co -N -d dir/dir2 2mod" \
+"$SPROG checkout: Updating dir/dir2/2mod
+U dir/dir2/2mod/file2"
+         dotest cvsadm-N2d4b "cat CVS/Repository" "\."
+         dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" "mod2"
+         dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-N2d5 "$testcvs co -N -d dir/dir2 1d1mod" \
+"$SPROG checkout: Updating dir/dir2/dir1d1
+U dir/dir2/dir1d1/file1"
+         dotest cvsadm-N2d5b "cat CVS/Repository" "\."
+         dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" "\."
+         dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" "mod1"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-N2d6 "$testcvs co -N -d dir/dir2 1d2mod" \
+"$SPROG checkout: Updating dir/dir2/dir1d2
+U dir/dir2/dir1d2/file2"
+         dotest cvsadm-N2d6b "cat CVS/Repository" "\."
+         dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" "mod2"
+         dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" "mod2/sub2"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-N2d7 "$testcvs co -N -d dir/dir2 2d1mod" \
+"$SPROG checkout: Updating dir/dir2/dir2d1/sub2d1
+U dir/dir2/dir2d1/sub2d1/file1"
+         dotest cvsadm-N2d7b "cat CVS/Repository" "\."
+         dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" "CVSROOT/Emptydir"
+         dotest cvsadm-N2d7g "cat dir/dir2/dir2d1/CVS/Repository" "\."
+         dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \
+"mod1"
+         rm -rf CVS dir
+
+         mkdir dir
+         dotest cvsadm-N2d8 "$testcvs co -N -d dir/dir2 2d2mod" \
+"$SPROG checkout: Updating dir/dir2/dir2d2/sub2d2
+U dir/dir2/dir2d2/sub2d2/file2"
+         dotest cvsadm-N2d8b "cat CVS/Repository" "\."
+         dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" "\."
+         dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" "mod2"
+         dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \
+"mod2/sub2"
+         rm -rf CVS dir
+         # End of test that didn't work for remote prior to CVS 1.11.14.
+
+         ##################################################
+         ## That's enough of that, thank you very much.
+         ##################################################
+
+         dokeep
+         restore_adm
+
+         # remove our junk
+         cd ..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/1mod $CVSROOT_DIRNAME/1mod-2 \
+                            $CVSROOT_DIRNAME/2mod $CVSROOT_DIRNAME/2mod-2 \
+                            $CVSROOT_DIRNAME/mod1 $CVSROOT_DIRNAME/mod1-2 \
+                            $CVSROOT_DIRNAME/mod2 $CVSROOT_DIRNAME/mod2-2
+         ;;
+
+
+
+       emptydir)
+         # Various tests of the Emptydir (CVSNULLREPOS) code.  See also:
+         #   cvsadm: tests of Emptydir in various module definitions
+         #   basicb: Test that "Emptydir" is non-special in ordinary contexts
+
+         mkdir 1; cd 1
+         dotest emptydir-1 "${testcvs} co CVSROOT/modules" \
+"U CVSROOT/modules"
+         echo "# Module defs for emptydir tests" > CVSROOT/modules
+         echo "2d1mod -d dir2d1/sub/sub2d1 mod1" >> CVSROOT/modules
+         echo "2d1moda -d dir2d1/suba moda/modasub" >> CVSROOT/modules
+         echo "2d1modb -d dir2d1/suba mod1" >> CVSROOT/modules
+         echo "comb -a 2d1modb 2d1moda" >> CVSROOT/modules
+
+         dotest emptydir-2 "${testcvs} ci -m add-modules" \
+"${CPROG} commit: Examining CVSROOT
+${CVSROOT_DIRNAME}/CVSROOT/modules,v  <--  CVSROOT/modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+${SPROG} commit: Rebuilding administrative file database" \
+"${CPROG} commit: Examining CVSROOT"
+         rm -rf CVS CVSROOT
+
+         modify_repo mkdir $CVSROOT_DIRNAME/mod1 $CVSROOT_DIRNAME/moda
+         # Populate.  Not sure we really need to do this.
+         dotest emptydir-3 "$testcvs -q co -l ."
+         dotest emptydir-3a "${testcvs} co mod1 moda" \
+"${SPROG} checkout: Updating mod1
+${SPROG} checkout: Updating moda"
+         echo "file1" > mod1/file1
+         mkdir moda/modasub
+         dotest emptydir-3b "${testcvs} add moda/modasub" \
+"Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository"
+         echo "filea" > moda/modasub/filea
+         dotest emptydir-4 "${testcvs} add mod1/file1 moda/modasub/filea" \
+"${SPROG} add: scheduling file .mod1/file1. for addition
+${SPROG} add: scheduling file .moda/modasub/filea. for addition
+${SPROG} add: use \`${SPROG} commit' to add these files permanently"
+         dotest emptydir-5 "${testcvs} -q ci -m yup" \
+"$CVSROOT_DIRNAME/mod1/file1,v  <--  mod1/file1
+initial revision: 1\.1
+${CVSROOT_DIRNAME}/moda/modasub/filea,v  <--  moda/modasub/filea
+initial revision: 1\.1"
+         rm -rf mod1 moda CVS
+         # End Populate.
+
+         dotest emptydir-6 "${testcvs} co 2d1mod" \
+"${SPROG} checkout: Updating dir2d1/sub/sub2d1
+U dir2d1/sub/sub2d1/file1"
+         cd dir2d1
+         touch emptyfile
+         # It doesn't make any sense to add a file (or do much of anything
+         # else) in Emptydir; Emptydir is a placeholder indicating that
+         # the working directory doesn't correspond to anything in
+         # the repository.
+         dotest_fail emptydir-7 "${testcvs} add emptyfile" \
+"${SPROG} \[add aborted]: cannot add to \`${CVSROOT_DIRNAME}/CVSROOT/Emptydir'"
+         mkdir emptydir
+         dotest_fail emptydir-8 "${testcvs} add emptydir" \
+"${CPROG} \[add aborted]: cannot add to \`${CVSROOT_DIRNAME}/CVSROOT/Emptydir'"
+         cd ..
+         rm -rf CVS dir2d1
+
+         # OK, while we have an Emptydir around, test a few obscure
+         # things about it.
+         mkdir edir; cd edir
+         dotest emptydir-9 "${testcvs} -q co -l CVSROOT" \
+"U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+         dotest_fail emptydir-10 "test -d Emptydir" ''
+         # This tests the code in find_dirs which skips Emptydir.
+         dotest emptydir-11 "${testcvs} -q -n update -d -P" ''
+         cd ../..
+         rm -rf edir
+         cd ..
+
+         # Now start playing with moda.
+         mkdir 2; cd 2
+         dotest emptydir-12 "${testcvs} -q co 2d1moda" \
+"U dir2d1/suba/filea"
+         # OK, this is the crux of the matter.  This used to show "Emptydir",
+         # but everyone seemed to think it should show "moda".  This
+         # usually works better, but not always as shown by the following
+         # test.
+         dotest emptydir-13 "cat dir2d1/CVS/Repository" "moda"
+         dotest_fail emptydir-14 "${testcvs} co comb" \
+"${SPROG} checkout: existing repository ${CVSROOT_DIRNAME}/moda/modasub does 
not match ${CVSROOT_DIRNAME}/mod1
+${SPROG} checkout: ignoring module 2d1modb
+${SPROG} checkout: Updating dir2d1/suba"
+         dotest emptydir-15 "cat dir2d1/CVS/Repository" "moda"
+         cd ..
+
+         # Test the effect of a non-cvs directory already existing with the
+         # same name as one in the modules file.
+         mkdir 3; cd 3
+         mkdir dir2d1
+         dotest emptydir-16 "${testcvs} co 2d1mod" \
+"${SPROG} checkout: Updating dir2d1/sub/sub2d1
+U dir2d1/sub/sub2d1/file1"
+
+         if $remote; then
+           dotest emptydir-17r "cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
+         else
+           dotest_fail emptydir-17 "test -d dir2d1/CVS"
+         fi
+
+         dokeep
+         cd ..
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/mod1 $CVSROOT_DIRNAME/moda
+         # I guess for the moment the convention is going to be
+         # that we don't need to remove $CVSROOT_DIRNAME/CVSROOT/Emptydir
+         ;;
+
+
+
+       abspath)
+       
+         # These tests test the thituations thin thwitch thoo theck
+         # things thout twith thabsolute thaths.  Threally.
+
+         #
+         # CHECKOUTS
+         #
+
+         # Create a few modules to use
+         modify_repo mkdir $CVSROOT_DIRNAME/mod1 $CVSROOT_DIRNAME/mod2
+         dotest abspath-1a "${testcvs} co mod1 mod2" \
+"${SPROG} checkout: Updating mod1
+${SPROG} checkout: Updating mod2"
+
+         # Populate the module
+         echo "file1" > mod1/file1
+         echo "file2" > mod2/file2
+         cd mod1
+         dotest abspath-1ba "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+          cd ..
+          cd mod2
+         dotest abspath-1bb "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+          cd ..
+
+         dotest abspath-1c "${testcvs} ci -m yup mod1 mod2" \
+"${CPROG} commit: Examining mod1
+${CPROG} commit: Examining mod2
+${CVSROOT_DIRNAME}/mod1/file1,v  <--  mod1/file1
+initial revision: 1.1
+${CVSROOT_DIRNAME}/mod2/file2,v  <--  mod2/file2
+initial revision: 1.1"
+         # Finished creating the module -- clean up.
+         rm -rf CVS mod1 mod2
+         # Done.
+         
+         # Try checking out the module in a local directory
+         if $remote; then
+           dotest_fail abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
+"${SPROG} \[checkout aborted\]: absolute pathnames invalid for server 
(specified .${TESTDIR}/1.)"
+           dotest abspath-2a-try2 "${testcvs} co -d 1 mod1" \
+"${SPROG} checkout: Updating 1
+U 1/file1"
+         else
+           dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
+"${SPROG} checkout: Updating ${TESTDIR}/1
+U ${TESTDIR}/1/file1"
+         fi # remote workaround
+
+         dotest abspath-2b "cat ${TESTDIR}/1/CVS/Repository" "mod1"
+
+         # Done.  Clean up.
+         rm -rf $TESTDIR/1
+
+
+         # Now try in a subdirectory.  We're not covering any more
+         # code here, but we might catch a future error if someone
+         # changes the checkout code.
+
+         # Since CVS 1.11.14, CVS will create leading directories specified
+         # via co -d.
+         # I am unsure that this wasn't the behavior prior to CVS 1.9, but the
+         # comment that used to be here leads me to believe it was not.
+         if $remote; then :; else
+           dotest abspath-3.1 "$testcvs -q co -d $TESTDIR/1/2 mod1" \
+"U $TESTDIR/1/2/file1"
+           rm -rf $TESTDIR/1
+         fi
+         dotest abspath-3.2 "$testcvs -q co -d 1/2 mod1" \
+"U 1/2/file1"
+         rm -rf 1
+
+         # We don't to mess with an existing directory just to traverse it,
+         # for example by creating a CVS directory, but currently we can't
+         # avoid this in client/server mode.
+         mkdir 1
+         if $remote; then
+           dotest abspath-3ar "$testcvs co -d 1/2 mod1" \
+"$SPROG checkout: Updating 1/2
+U 1/2/file1"
+           dotest abspath-3br "cat 1/CVS/Repository" .
+         else
+           dotest abspath-3a "$testcvs co -d $TESTDIR/1/2 mod1" \
+"$SPROG checkout: Updating $TESTDIR/1/2
+U $TESTDIR/1/2/file1"
+           dotest_fail abspath-3b "test -d ${TESTDIR}/1/CVS"
+         fi
+
+         dotest abspath-3c "cat ${TESTDIR}/1/2/CVS/Repository" mod1
+
+
+         # Done.  Clean up.
+         rm -rf ${TESTDIR}/1
+
+
+         # Now try someplace where we don't have permission.
+         mkdir ${TESTDIR}/barf
+         chmod -w ${TESTDIR}/barf
+         dotest_fail abspath-4r "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
+"${SPROG} \[checkout aborted\]: cannot make directory sub: Permission denied" \
+"${SPROG} \[checkout aborted\]: absolute pathnames invalid for server 
(specified .${TESTDIR}/barf/sub.)"
+         chmod +w ${TESTDIR}/barf
+         rmdir ${TESTDIR}/barf
+         # Done.  Nothing to clean up.
+
+
+         # Try checking out two modules into the same directory.
+         if $remote; then
+           dotest abspath-5ar "${testcvs} co -d 1 mod1 mod2" \
+"${SPROG} checkout: Updating 1/mod1
+U 1/mod1/file1
+${SPROG} checkout: Updating 1/mod2
+U 1/mod2/file2"
+         else
+           dotest abspath-5a "${testcvs} co -d ${TESTDIR}/1 mod1 mod2" \
+"${SPROG} checkout: Updating ${TESTDIR}/1/mod1
+U ${TESTDIR}/1/mod1/file1
+${SPROG} checkout: Updating ${TESTDIR}/1/mod2
+U ${TESTDIR}/1/mod2/file2"
+         fi # end remote workaround
+         dotest abspath-5b "cat ${TESTDIR}/1/CVS/Repository" "\."
+         dotest abspath-5c "cat ${TESTDIR}/1/mod1/CVS/Repository" "mod1"
+         dotest abspath-5d "cat ${TESTDIR}/1/mod2/CVS/Repository" "mod2"
+         # Done.  Clean up.
+         rm -rf $TESTDIR/1
+
+
+         # Try checking out the top-level module.
+         if $remote; then
+           dotest abspath-6ar "$testcvs co -d 1 ." \
+"$SPROG checkout: Updating 1
+$SPROG checkout: Updating 1/CVSROOT
+$DOTSTAR
+$SPROG checkout: Updating 1/mod1
+U 1/mod1/file1
+$SPROG checkout: Updating 1/mod2
+U 1/mod2/file2"
+         else
+           dotest abspath-6a "${testcvs} co -d ${TESTDIR}/1 ." \
+"${SPROG} checkout: Updating ${TESTDIR}/1
+${SPROG} checkout: Updating ${TESTDIR}/1/CVSROOT
+${DOTSTAR}
+${SPROG} checkout: Updating ${TESTDIR}/1/mod1
+U ${TESTDIR}/1/mod1/file1
+${SPROG} checkout: Updating ${TESTDIR}/1/mod2
+U ${TESTDIR}/1/mod2/file2"
+         fi # end of remote workaround
+         dotest abspath-6b "cat ${TESTDIR}/1/CVS/Repository" "\."
+         dotest abspath-6c "cat ${TESTDIR}/1/CVSROOT/CVS/Repository" "CVSROOT"
+         dotest abspath-6c "cat ${TESTDIR}/1/mod1/CVS/Repository" "mod1"
+         dotest abspath-6d "cat ${TESTDIR}/1/mod2/CVS/Repository" "mod2"
+         # Done.  Clean up.
+         rm -rf ${TESTDIR}/1
+
+         # Test that an absolute pathname to some other directory
+         # doesn't mess with the current working directory.
+         mkdir 1
+         cd 1
+         if $remote; then
+           dotest_fail abspath-7ar "${testcvs} -q co -d ../2 mod2" \
+"${SPROG} checkout: protocol error: .\.\./2. contains more leading \.\.
+${SPROG} \[checkout aborted\]: than the 0 which Max-dotdot specified"
+           cd ..
+           dotest abspath-7a-try2r "${testcvs} -q co -d 2 mod2" \
+"U 2/file2"
+           cd 1
+         else
+           dotest abspath-7a "${testcvs} -q co -d ${TESTDIR}/2 mod2" \
+"U ${TESTDIR}/2/file2"
+         fi # remote workaround
+         dotest abspath-7b "ls" ""
+         dotest abspath-7c "${testcvs} -q co mod1" \
+"U mod1/file1"
+         cd mod1
+         if $remote; then
+           cd ../..
+           dotest abspath-7dr "${testcvs} -q co -d 3 mod2" \
+"U 3/file2"
+           cd 1/mod1
+         else
+           dotest abspath-7d "${testcvs} -q co -d ${TESTDIR}/3 mod2" \
+"U ${TESTDIR}/3/file2"
+         fi # remote workaround
+         dotest abspath-7e "${testcvs} -q update -d"
+
+         #
+         # FIXME: do other functions here (e.g. update /tmp/foo)
+         #
+
+         # Finished with all tests.  Cleanup.
+         dokeep
+         cd ../..
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/mod1 $CVSROOT_DIRNAME/mod2
+         ;;
+
+
+
+       abspath2)
+         # More absolute path checks.  The following used to attempt to create
+         # directories in /:
+         #
+         # $ cvs -d:fork:/cvsroot co /foo
+         # cvs checkout: warning: cannot make directory CVS in /: Permission 
denied
+         # cvs [checkout aborted]: cannot make directory /foo: Permission 
denied
+         # $
+         #
+         # The -z9 in this test also checks for an old server bug where the
+         # server would block indefinitely attempting to read an EOF from the
+         # client in the compression buffer shutdown routine.
+         dotest_fail abspath2-1 "$testcvs -z9 co /foo" \
+"$CPROG \[checkout aborted\]: Absolute module reference invalid: \`/foo'" \
+"$SPROG \[server aborted\]: Absolute module reference invalid: \`/foo'
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+         ;;
+
+
+
+       toplevel)
+         # test the feature that cvs creates a CVS subdir also for
+         # the toplevel directory
+
+         # First set the TopLevelAdmin setting.
+         mkdir 1; cd 1
+         dotest toplevel-1a "${testcvs} -q co CVSROOT/config" \
+"U CVSROOT/config"
+         cd CVSROOT
+         echo "TopLevelAdmin=yes" >>config
+         dotest toplevel-1b "${testcvs} -q ci -m yes-top-level" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../..
+         rm -r 1
+
+         mkdir 1; cd 1
+         dotest toplevel-1 "${testcvs} -q co -l ." ''
+         mkdir top-dir second-dir
+         dotest toplevel-2 "${testcvs} add top-dir second-dir" \
+"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
+         cd top-dir
+
+         touch file1
+         dotest toplevel-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest toplevel-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/top-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ..
+
+         cd second-dir
+         touch file2
+         dotest toplevel-3s "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest toplevel-4s "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/second-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+         cd ../..
+         rm -r 1; mkdir 1; cd 1
+         dotest toplevel-5 "${testcvs} co top-dir" \
+"${SPROG} checkout: Updating top-dir
+U top-dir/file1"
+
+         dotest toplevel-6 "${testcvs} update top-dir" \
+"${SPROG} update: Updating top-dir"
+         dotest toplevel-7 "${testcvs} update"  \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating top-dir"
+
+         dotest toplevel-8 "${testcvs} update -d top-dir" \
+"${SPROG} update: Updating top-dir"
+         # There is some sentiment that
+         #   "${SPROG} update: Updating \.
+          #   ${SPROG} update: Updating top-dir"
+         # is correct but it isn't clear why that would be correct instead
+         # of the remote CVS behavior (which also updates CVSROOT).
+         #
+         # The DOTSTAR matches of a bunch of lines like
+         # "U CVSROOT/checkoutlist".  Trying to match them more precisely
+         # seemed to cause trouble.  For example CVSROOT/cvsignore will
+         # be present or absent depending on whether we ran the "ignore"
+         # test or not.
+         dotest toplevel-9 "${testcvs} update -d" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating CVSROOT
+${DOTSTAR}
+${SPROG} update: Updating top-dir"
+
+         cd ..
+         rm -rf 1; mkdir 1; cd 1
+         dotest toplevel-10 "${testcvs} co top-dir" \
+"${SPROG} checkout: Updating top-dir
+U top-dir/file1"
+
+         # This tests more or less the same thing, in a particularly
+         # "real life" example.
+         dotest toplevel-11 "${testcvs} -q update -d second-dir" \
+"U second-dir/file2"
+
+         # Now remove the CVS directory (people may do this manually,
+         # especially if they formed their habits with CVS
+         # 1.9 and older, which didn't create it.  Or perhaps the working
+         # directory itself was created with 1.9 or older).
+         rm -r CVS
+         # Now set the permissions so we can't recreate it.
+         if test -n "$remotehost"; then
+           # Cygwin again.
+           $CVS_RSH $remotehost "chmod -w $TESTDIR/1"
+         else
+           chmod -w ../1
+         fi
+         # Now see whether CVS has trouble because it can't create CVS.
+         # First string is for local, second is for remote.
+         dotest toplevel-12 "${testcvs} co top-dir" \
+"${SPROG} checkout: warning: cannot make directory CVS in \.: Permission denied
+${SPROG} checkout: Updating top-dir" \
+"${CPROG} checkout: warning: cannot make directory CVS in \.: Permission denied
+${CPROG} checkout: in directory \.:
+${CPROG} checkout: cannot open CVS/Entries for reading: No such file or 
directory
+${SPROG} checkout: Updating top-dir"
+
+         chmod +w ../1
+
+         dokeep
+         restore_adm
+         cd ..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/top-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       toplevel2)
+         # Similar to toplevel, but test the case where TopLevelAdmin=no.
+
+         # First set the TopLevelAdmin setting.
+         mkdir 1; cd 1
+         dotest toplevel2-1a "${testcvs} -q co CVSROOT/config" \
+"U CVSROOT/config"
+         cd CVSROOT
+         echo "TopLevelAdmin=no" >>config
+         dotest toplevel2-1b "$testcvs -q ci -m no-top-level" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../..
+         rm -r 1
+
+         # Now set up some directories and subdirectories
+         mkdir 1; cd 1
+         dotest toplevel2-1 "${testcvs} -q co -l ." ''
+         mkdir top-dir second-dir
+         dotest toplevel2-2 "${testcvs} add top-dir second-dir" \
+"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
+         cd top-dir
+
+         touch file1
+         dotest toplevel2-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest toplevel2-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/top-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ..
+
+         cd second-dir
+         touch file2
+         dotest toplevel2-3s "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest toplevel2-4s "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/second-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+         cd ../..
+         rm -r 1; mkdir 1; cd 1
+         dotest toplevel2-5 "${testcvs} co top-dir" \
+"${SPROG} checkout: Updating top-dir
+U top-dir/file1"
+
+         dotest toplevel2-6 "${testcvs} update top-dir" \
+"${SPROG} update: Updating top-dir"
+         dotest toplevel2-7 "${testcvs} update"  \
+"${SPROG} update: Updating top-dir"
+
+         dotest toplevel2-8 "${testcvs} update -d top-dir" \
+"${SPROG} update: Updating top-dir"
+         # Contrast this with toplevel-9, which has TopLevelAdmin=yes.
+         dotest toplevel2-9 "${testcvs} update -d" \
+"${SPROG} update: Updating top-dir"
+
+         cd ..
+         rm -rf 1; mkdir 1; cd 1
+         dotest toplevel2-10 "${testcvs} co top-dir" \
+"${SPROG} checkout: Updating top-dir
+U top-dir/file1"
+         # This tests more or less the same thing, in a particularly
+         # "real life" example.  With TopLevelAdmin=yes, this command
+         # would give us second-dir and CVSROOT directories too.
+         dotest toplevel2-11 "${testcvs} -q update -d" ""
+
+         dokeep
+         cd ..
+         restore_adm
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/top-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       rstar-toplevel)
+         # This test used to confirm a bug that existed in the r* commands
+         # run against the top-level project prior to CVS 1.11.18 & 1.12.10.
+         #
+         # The assertion failure was something like:
+         # do_recursion: Assertion \`strstr (repository, \"/\./\") == ((void 
\*)0)' failed\..*"
+         dotest rstar-toplevel-1 "$testcvs -q rlog ." \
+"
+RCS file: $CVSROOT_DIRNAME/CVSROOT$DOTSTAR"
+
+         dokeep
+       ;;
+
+
+
+       trailingslashes)
+         # Some tests of CVS's reactions to path specifications containing
+         # trailing slashes.
+         mkdir trailingslashes; cd trailingslashes
+         dotest trailingslashes-init-1 "$testcvs -Q co -ldt ."
+         dotest trailingslashes-init-2 "$testcvs -Q co -dt2 ."
+         cd t
+         echo "Ahh'll be baaack." >topfile
+         dotest trailingslashes-init-3 "$testcvs -Q add topfile"
+         dotest trailingslashes-init-4 "$testcvs -Q ci -mto-top"
+
+         # First, demonstrate the usual case.
+         cd ../t2
+         dotest trailingslashes-1 "$testcvs -q up CVSROOT"
+         dotest_fail trailingslashes-1a "test -f topfile"
+
+         # FIXCVS:
+         # Now the one that fails in remote mode.
+         # This highlights one of the failure cases mentioned in TODO item
+         # #205.
+         if $remote; then
+                 dotest trailingslashes-2 "$testcvs -q up CVSROOT/" \
+"U topfile"
+                 dotest trailingslashes-2a "test -f topfile"
+         else
+                 dotest trailingslashes-2 "$testcvs -q up CVSROOT/"
+                 dotest_fail trailingslashes-2a "test -f topfile"
+         fi
+
+         dokeep
+         cd ../..
+         rm -rf trailingslashes
+         modify_repo rm -rf $CVSROOT_DIRNAME/topfile,v
+         ;;
+
+
+
+        checkout_repository)
+          dotest_fail checkout_repository-1 \
+"${testcvs} co -d ${CVSROOT_DIRNAME} CVSROOT" \
+"${CPROG} \[checkout aborted\]: Cannot check out files into the repository 
itself" \
+"${SPROG} \[checkout aborted\]: absolute pathnames invalid for server 
(specified \`${CVSROOT_DIRNAME}')"
+
+         # The behavior of the client/server test below should be correct.
+         # The CVS client currently has no way of knowing that the client and
+         # server are the same machine and thus skips the $CVSROOT checks.
+         # I think checking for this case in CVS would be bloat since this
+         # should be a fairly rare occurance.
+         cd ${CVSROOT_DIRNAME}
+          dotest_fail checkout_repository-2 "${testcvs} co CVSROOT" \
+"${CPROG} \[checkout aborted\]: Cannot check out files into the repository 
itself" \
+"${SPROG} checkout: Updating CVSROOT
+${CPROG} checkout: move away \`CVSROOT/checkoutlist'; it is in the way
+C CVSROOT/checkoutlist
+${CPROG} checkout: move away \`CVSROOT/commitinfo'; it is in the way
+C CVSROOT/commitinfo
+${CPROG} checkout: move away \`CVSROOT/config'; it is in the way
+C CVSROOT/config
+${CPROG} checkout: move away \`CVSROOT/cvswrappers'; it is in the way
+C CVSROOT/cvswrappers
+${CPROG} checkout: move away \`CVSROOT/loginfo'; it is in the way
+C CVSROOT/loginfo
+${CPROG} checkout: move away \`CVSROOT/modules'; it is in the way
+C CVSROOT/modules
+${CPROG} checkout: move away \`CVSROOT/notify'; it is in the way
+C CVSROOT/notify
+${CPROG} checkout: move away \`CVSROOT/postadmin'; it is in the way
+C CVSROOT/postadmin
+${CPROG} checkout: move away \`CVSROOT/postproxy'; it is in the way
+C CVSROOT/postproxy
+${CPROG} checkout: move away \`CVSROOT/posttag'; it is in the way
+C CVSROOT/posttag
+${CPROG} checkout: move away \`CVSROOT/postwatch'; it is in the way
+C CVSROOT/postwatch
+${CPROG} checkout: move away \`CVSROOT/preproxy'; it is in the way
+C CVSROOT/preproxy
+${CPROG} checkout: move away \`CVSROOT/rcsinfo'; it is in the way
+C CVSROOT/rcsinfo
+${CPROG} checkout: move away \`CVSROOT/taginfo'; it is in the way
+C CVSROOT/taginfo
+${CPROG} checkout: move away \`CVSROOT/verifymsg'; it is in the way
+C CVSROOT/verifymsg"
+
+          dotest checkout_repository-3 \
+"${testcvs} co -p CVSROOT/modules >/dev/null" \
+"===================================================================
+Checking out CVSROOT/modules
+RCS:  ${CVSROOT_DIRNAME}/CVSROOT/modules,v
+VERS: 1\.[0-9]*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
+
+         dokeep
+         cd $TESTDIR
+          ;;
+
+
+
+       mflag)
+         for message in '' ' ' '       
+           ' '                 test' ; do
+           # Set up
+           mkdir a-dir; cd a-dir
+           # Test handling of -m during import
+           echo testa >>test
+           if ${testcvs} import -m "$message" a-dir A A1 >>${LOGFILE} 2>&1;then
+               pass 156
+           else
+               fail 156
+           fi
+           # Must import twice since the first time uses inline code that
+           # avoids RCS call.
+           echo testb >>test
+           if ${testcvs} import -m "$message" a-dir A A2 >>${LOGFILE} 2>&1;then
+               pass 157
+           else
+               fail 157
+           fi
+           # Test handling of -m during ci
+           cd ..; rm -r a-dir
+           if ${testcvs} co a-dir >>${LOGFILE} 2>&1; then
+               pass 158
+           else
+               fail 158
+           fi
+           cd a-dir
+           echo testc >>test
+           if ${testcvs} ci -m "$message" >>${LOGFILE} 2>&1; then
+               pass 159
+           else
+               fail 159
+           fi
+           # Test handling of -m during rm/ci
+           rm test;
+           if ${testcvs} rm test >>${LOGFILE} 2>&1; then
+               pass 160
+           else
+               fail 160
+           fi
+           if ${testcvs} ci -m "$message" >>${LOGFILE} 2>&1; then
+               pass 161
+           else
+               fail 161
+           fi
+
+           dokeep
+           # Clean up
+           cd ..
+           rm -r a-dir
+           modify_repo rm -rf $CVSROOT_DIRNAME/a-dir
+         done
+         ;;
+
+
+
+       editor)
+         # More tests of log messages, in this case the ability to
+         # run an external editor.
+         # TODO:
+         #   * also test $EDITOR, $CVSEDITOR, &c.
+         #   * test what happens if up-to-date check fails.
+
+         # Our "editor" puts "x" at the start of each line, so we
+         # can see the "CVS:" lines.
+         cat >${TESTDIR}/editme <<EOF
+#!${TESTSHELL}
+sleep 1
+sed <\$1 -e 's/^/x/' >${TESTDIR}/edit.new
+mv ${TESTDIR}/edit.new \$1
+exit 0
+EOF
+         chmod +x ${TESTDIR}/editme
+
+         mkdir 1; cd 1
+         dotest editor-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest editor-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch file1 file2
+         dotest editor-3 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest editor-4 "${testcvs} -e ${TESTDIR}/editme -q ci" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         dotest editor-5 "${testcvs} -q tag -b br" "T file1
+T file2"
+         dotest editor-6 "${testcvs} -q update -r br" ''
+         echo modify >>file1
+         dotest editor-7 "${testcvs} -e ${TESTDIR}/editme -q ci" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         # OK, now we want to make sure "ci -r" puts in the branch
+         # where appropriate.  Note that we can check in on the branch
+         # without being on the branch, because there is not a revision
+         # already on the branch.  If there were a revision on the branch,
+         # CVS would correctly give an up-to-date check failed.
+         dotest editor-8 "${testcvs} -q update -A" "U file1"
+         echo add a line >>file2
+         dotest editor-9 "${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         dotest editor-log-file1 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+xCVS: ----------------------------------------------------------------------
+xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
+xCVS:
+xCVS: Committing in .
+xCVS:
+xCVS: Added Files:
+xCVS:  file1 file2
+xCVS: ----------------------------------------------------------------------
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+xCVS: ----------------------------------------------------------------------
+xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
+xCVS:
+xCVS: Committing in .
+xCVS:
+xCVS: Modified Files:
+xCVS:  Tag: br
+xCVS:  file1
+xCVS: ----------------------------------------------------------------------
+============================================================================="
+
+         # The only difference between the two expect strings is the
+         # presence or absence of "Committing in ." for 1.1.2.1.
+         dotest editor-log-file2 "${testcvs} log -N file2" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+xCVS: ----------------------------------------------------------------------
+xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
+xCVS:
+xCVS: Committing in .
+xCVS:
+xCVS: Added Files:
+xCVS:  file1 file2
+xCVS: ----------------------------------------------------------------------
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+xCVS: ----------------------------------------------------------------------
+xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
+xCVS:
+xCVS: Modified Files:
+xCVS:  Tag: br
+xCVS:  file2
+xCVS: ----------------------------------------------------------------------
+=============================================================================" 
"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+xCVS: ----------------------------------------------------------------------
+xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
+xCVS:
+xCVS: Committing in .
+xCVS:
+xCVS: Added Files:
+xCVS:  file1 file2
+xCVS: ----------------------------------------------------------------------
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+xCVS: ----------------------------------------------------------------------
+xCVS: Enter Log.  Lines beginning with .CVS:. are removed automatically
+xCVS:
+xCVS: Committing in .
+xCVS:
+xCVS: Modified Files:
+xCVS:  Tag: br
+xCVS:  file2
+xCVS: ----------------------------------------------------------------------
+============================================================================="
+
+         # Test CVS's response to an unchanged log message
+         cat >${TESTDIR}/editme <<EOF
+#!${TESTSHELL}
+sleep 1
+exit 0
+EOF
+         chmod +x ${TESTDIR}/editme
+         dotest_fail editor-emptylog-1 "echo a |${testcvs} -e 
${TESTDIR}/editme ci -f file1" \
+"
+Log message unchanged or not specified
+a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
+Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
+
+         # Test CVS's response to an empty log message
+         cat >${TESTDIR}/editme <<EOF
+#!${TESTSHELL}
+sleep 1
+cat /dev/null >\$1
+exit 0
+EOF
+         chmod +x ${TESTDIR}/editme
+         dotest_fail editor-emptylog-1a "echo a |${testcvs} -e 
${TESTDIR}/editme ci -f file1" \
+"
+Log message unchanged or not specified
+a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
+Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
+
+         # Test CVS's response to a log message with one blank line
+         cat >${TESTDIR}/editme <<EOF
+#!${TESTSHELL}
+sleep 1
+echo >\$1
+exit 0
+EOF
+         chmod +x ${TESTDIR}/editme
+         dotest_fail editor-emptylog-1b "echo a |${testcvs} -e 
${TESTDIR}/editme ci -f file1" \
+"
+Log message unchanged or not specified
+a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
+Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
+
+         # Test CVS's response to a log message with only comments
+         cat >${TESTDIR}/editme <<EOF
+#!${TESTSHELL}
+sleep 1
+cat \$1 >${TESTDIR}/edit.new
+mv ${TESTDIR}/edit.new \$1
+exit 0
+EOF
+         chmod +x ${TESTDIR}/editme
+         dotest_fail editor-emptylog-1c "echo a |${testcvs} -e 
${TESTDIR}/editme ci -f file1" \
+"
+Log message unchanged or not specified
+a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
+Action: (continue) ${CPROG} \[commit aborted\]: aborted by user"
+
+         # Test CVS's response to a log message that is zero bytes
+         # in length. This caused core dumps in cvs 1.11.5 on Solaris
+         # hosts.
+         cd ..
+         dotest editor-emptylog-continue-1 "${testcvs} -q co CVSROOT/loginfo" \
+"U CVSROOT/loginfo"
+
+          cd CVSROOT
+         cat <<\EOF >>loginfo
+DEFAULT (echo Start-Log;cat;echo End-Log) >> $CVSROOT/CVSROOT/commitlog
+EOF
+         dotest editor-emptylog-continue-2 "$testcvs -Q ci -mloggem"
+
+         cd ../first-dir
+         cat >${TESTDIR}/editme <<EOF
+#!${TESTSHELL}
+sleep 1
+cp /dev/null \$1
+exit 1
+EOF
+         chmod +x ${TESTDIR}/editme
+         dotest editor-emptylog-continue-3 "echo c |${testcvs} -e 
${TESTDIR}/editme ci -f file1" \
+"${CPROG} commit: warning: editor session failed
+
+Log message unchanged or not specified
+a)bort, c)ontinue, e)dit, !)reuse this message unchanged for remaining dirs
+Action: (continue) ${CVSROOT_DIRNAME}/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         # The loginfo Log message should be an empty line and not "(null)"
+         # which is what some fprintf() implementations do with "%s"
+         # format and a NULL pointer...
+         if $remote; then
+           dotest editor-emptylog-continue-4r \
+"cat $CVSROOT_DIRNAME/CVSROOT/commitlog" \
+"Start-Log
+Update of $CVSROOT_DIRNAME/CVSROOT
+In directory $hostname:$TMPDIR/cvs-serv[0-9a-z]*
+
+Modified Files:
+       loginfo 
+Log Message:
+loggem
+End-Log
+Start-Log
+Update of $CVSROOT_DIRNAME/first-dir
+In directory $hostname:$TMPDIR/cvs-serv[0-9a-z]*
+
+Modified Files:
+       file1 
+Log Message:
+
+End-Log"
+          else
+           dotest editor-emptylog-continue-4 \
+"cat $CVSROOT_DIRNAME/CVSROOT/commitlog" \
+"Start-Log
+Update of $CVSROOT_DIRNAME/CVSROOT
+In directory $hostname:$TESTDIR/1/CVSROOT
+
+Modified Files:
+       loginfo 
+Log Message:
+loggem
+End-Log
+Start-Log
+Update of $CVSROOT_DIRNAME/first-dir
+In directory $hostname:$TESTDIR/1/first-dir
+
+Modified Files:
+       file1 
+Log Message:
+
+End-Log"
+         fi
+         # There should have an empty log message at this point
+         dotest editor-emptylog-continue-5 "${testcvs} log -N -r1.2 file1" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.2
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 3;    selected revisions: 1
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: +0 -0;  
commitid: ${commitid};
+\*\*\* empty log message \*\*\*
+============================================================================="
+
+         # clean up
+         dokeep
+         # restore the default loginfo script
+         restore_adm
+         cd ../..
+         rm -r 1
+         rm $TESTDIR/editme
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       env)
+         # Test to see if the CVS_PID environment variable is being set
+         mkdir ${TESTDIR}/env
+         cd ${TESTDIR}/env
+         dotest env-1 "${testcvs} -Q co . >>${LOGFILE}" ''
+
+         cat > ${TESTDIR}/env/test-cvs-pid <<EOF
+#!${TESTSHELL}
+if test "x\$CVS_PID" != "x"; then
+  # In local mode, there is no directory with the pid in it for use.
+  # In remote mode the CVS_PID will be the parent process of the
+  # cvs process that runs the commitinfo script.
+  if test "x$remote" = "x:" ; then
+    ppid=\`pwd | sed -e 's,.*/cvs-serv,,'\`
+  else
+    # This assumes that the -l switch puts PPID in the banner and does
+    # not run the elements together such that whitespace surrounds the
+    # pid and ppid in the output. This could be made slightly simpler
+    # if all hosts had a 'ps' command that supported the -p switch,
+    # but Solaris 7 /usr/ucb/ps does not and that may be the one we use.
+    # It is because this is so messy that the CVS_PID feature exists.
+    pid=\$\$
+    pidcmd="ps -o pid,ppid -p \$pid || ps -el || ps -al"
+    if echo \$pidcmd | sh >pid.stdout 2> pid.stderr; then
+      ppid=\`cat pid.stdout |\\
+      awk '/PPID/ { for (i=1; i <= NF; i++) {
+                      if (\$i == "PPID") ppidx = i; 
+                      if (\$i == "PID") pidx = i;
+                   }
+                    next; 
+                  }
+                  { print \$pidx " " \$ppidx }' |\\
+      grep "^\$pid " |\\
+      awk '{ print \$NF }'\`
+    else
+      ppid=unkown
+    fi
+  fi
+  if test "x\$ppid" = "x\${CVS_PID}"; then
+    # The PID looks okay to me
+    # Clean up any temporary files
+    rm -f pid.stdout pid.stderr
+    exit 0
+  else
+    echo The environment variable CVS_PID is not properly set.
+    echo It should have been set to \'\$ppid\' but instead was \'\$CVS_PID\'
+    echo It is possible that this test is broken for your host.
+    echo Current pid: \$pid
+    [ -n "\$pidcmd" ] && echo "Command: \$pidcmd"
+    [ -s pid.stdout ] && echo Standard Out: && cat pid.stdout
+    [ -s pid.stderr ] && echo Standard Error: && cat pid.stderr
+    exit 1
+  fi
+else
+  echo The environment variable CVS_PID is not set.
+  exit 1
+fi
+EOF
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x ${TESTDIR}/env/test-cvs-pid"
+         else
+           chmod +x ${TESTDIR}/env/test-cvs-pid
+         fi
+         cd CVSROOT
+         echo "^env ${TESTDIR}/env/test-cvs-pid %r/%p %s" >>commitinfo
+         dotest env-2 "${testcvs} -q ci -m test-pid commitinfo" \
+"${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v  <--  commitinfo
+new revision: 1\.2; previous revision: 1\.1
+${SPROG} commit: Rebuilding administrative file database"
+         cd ..
+         mkdir env
+         dotest env-3 "${testcvs} -q add env" \
+"Directory ${CVSROOT_DIRNAME}/env added to the repository"
+         cd env
+         echo testing >file1
+         dotest env-4 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest env-5 "${testcvs} -q commit -m test-pid" \
+"${CVSROOT_DIRNAME}/env/file1,v  <--  file1
+initial revision: 1\.1"
+
+         dokeep
+         # undo commitinfo changes
+         restore_adm
+         cd ../..
+         rm -fr $TESTDIR/env
+         modify_repo rm -rf $CVSROOT_DIRNAME/env
+         ;;
+
+
+
+       errmsg1)
+         modify_repo mkdir $CVSROOT_DIRNAME/1dir
+         mkdir 1
+         cd 1
+         dotest errmsg1-init-1 "$testcvs -Q co 1dir"
+         cd 1dir
+         touch foo
+         dotest errmsg-init-2 "$testcvs -Q add foo"
+         if ${testcvs} ci -m added >>${LOGFILE} 2>&1; then
+             pass 164
+         else
+             fail 164
+         fi
+         cd ../..
+         mkdir 2
+         cd 2
+         if ${testcvs} -q co 1dir >>${LOGFILE}; then
+             pass 165
+         else
+             fail 165
+         fi
+         chmod a-w 1dir
+         cd ../1/1dir
+         rm foo;
+         if ${testcvs} rm foo >>${LOGFILE} 2>&1; then
+             pass 166
+         else
+             fail 166
+         fi
+         if ${testcvs} ci -m removed >>${LOGFILE} 2>&1; then
+             pass 167
+         else
+             fail 167
+         fi
+
+         cd ../../2/1dir
+         # The second case in the local and remote versions of errmsg1-168
+         # below happens on Cygwin under Windows, where write privileges
+         # aren't enforced properly.
+         if $remote; then
+           dotest errmsg1-168r "${testcvs} -q update" \
+"${SPROG} update: \`foo' is no longer in the repository
+$CPROG update: unable to remove foo: Permission denied" \
+"${SPROG} update: \`foo' is no longer in the repository"
+         else
+           dotest errmsg1-168 "${testcvs} -q update" \
+"${SPROG} update: \`foo' is no longer in the repository
+${SPROG} update: unable to remove foo: Permission denied" \
+"${SPROG} update: \`foo' is no longer in the repository"
+         fi
+
+         dokeep
+         cd ..
+         chmod u+w 1dir
+         cd ..
+         rm -r 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/1dir
+         ;;
+
+
+
+       errmsg2)
+         # More tests of various miscellaneous error handling,
+         # and cvs add behavior in general.
+         # See also test basicb-4a, concerning "cvs ci CVS".
+         # Too many tests to mention test the simple cases of
+         # adding files and directories.
+         # Test basicb-2a10 tests cvs -n add.
+
+         # First the usual setup; create a directory first-dir.
+         mkdir 1; cd 1
+         dotest errmsg2-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest errmsg2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+         dotest_fail errmsg2-3 "${testcvs} add CVS" \
+"${CPROG} add: cannot add special file .CVS.; skipping"
+         touch file1
+         # For the most part add returns a failure exitstatus if
+         # there are any errors, even if the remaining files are
+         # processed without incident.  The "cannot add
+         # special file" message fits this pattern, at
+         # least currently.
+         dotest_fail errmsg2-4 "${testcvs} add CVS file1" \
+"${CPROG} add: cannot add special file .CVS.; skipping
+${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         # I'm not sure these tests completely convey the various strange
+         # behaviors that CVS had before it specially checked for "." and
+         # "..".  Suffice it to say that these are unlikely to work right
+         # without a special case.
+         dotest_fail errmsg2-5 "${testcvs} add ." \
+"${CPROG} add: cannot add special file .\..; skipping"
+         dotest_fail errmsg2-6 "${testcvs} add .." \
+"${CPROG} add: cannot add special file .\.\..; skipping"
+         # Make sure that none of the error messages left droppings
+         # which interfere with normal operation.
+         dotest errmsg2-7 "${testcvs} -q ci -m add-file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         mkdir sdir
+         cd ..
+         dotest errmsg2-8 "${testcvs} add first-dir/sdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
+         # while we're here... check commit with no CVS directory
+         dotest_fail errmsg2-8a "${testcvs} -q ci first-dir nonexistant" \
+"${CPROG} commit: nothing known about .nonexistant'
+${CPROG} \[commit aborted\]: correct above errors first!"
+         dotest_fail errmsg2-8b "$testcvs -q ci nonexistant first-dir" \
+"$CPROG commit: nothing known about .nonexistant'
+$CPROG \[commit aborted\]: correct above errors first!"
+         dotest errmsg2-8c "$testcvs -q ci first-dir"
+
+         cd first-dir
+
+         touch file10
+         mkdir sdir10
+         dotest errmsg2-10 "${testcvs} add file10 sdir10" \
+"${SPROG} add: scheduling file .file10. for addition
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest errmsg2-11 "${testcvs} -q ci -m add-file10" \
+"$CVSROOT_DIRNAME/first-dir/file10,v  <--  file10
+initial revision: 1\.1"
+         # Try to see that there are no droppings left by
+         # any of the previous tests.
+         dotest errmsg2-12 "${testcvs} -q update" ""
+
+         # Now test adding files with '/' in the name, both one level
+         # down and more than one level down.
+         cd ..
+         mkdir first-dir/sdir10/ssdir
+         dotest errmsg2-13 "${testcvs} add first-dir/sdir10/ssdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir added to the repository"
+
+         touch first-dir/sdir10/ssdir/ssfile
+         dotest errmsg2-14 \
+           "${testcvs} add first-dir/sdir10/ssdir/ssfile" \
+"${SPROG} add: scheduling file .first-dir/sdir10/ssdir/ssfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         touch first-dir/file15
+         dotest errmsg2-15 "${testcvs} add first-dir/file15" \
+"${SPROG} add: scheduling file .first-dir/file15. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         # Now the case where we try to give it a directory which is not
+         # under CVS control.
+         mkdir bogus-dir
+         touch bogus-dir/file16
+         # FIXCVS: The first message, from local CVS, is nice.  The second one
+         # is not nice; would be good to fix remote CVS to give a clearer
+         # message (e.g. the one from local CVS).  But at least it is an
+         # error message.
+         dotest_fail errmsg2-16 "${testcvs} add bogus-dir/file16" \
+"${SPROG} add: in directory \`bogus-dir':
+${SPROG} \[add aborted\]: there is no version here; do .${SPROG} checkout. 
first" \
+"${CPROG} add: cannot open CVS/Entries for reading: No such file or directory
+${CPROG} \[add aborted\]: no repository"
+         rm -r bogus-dir
+
+         # One error condition we don't test for is trying to add a file
+         # or directory which already is there.
+
+         dotest errmsg2-17 "${testcvs} -q ci -m checkin" \
+"$CVSROOT_DIRNAME/first-dir/file15,v  <--  first-dir/file15
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/sdir10/ssdir/ssfile,v  <--  
first-dir/sdir10/ssdir/ssfile
+initial revision: 1\.1"
+         dotest errmsg2-18 "${testcvs} -Q tag test" ''
+
+         # trying to import the repository
+
+         if $remote; then :; else
+           cd ${CVSROOT_DIRNAME}
+           dotest_fail errmsg2-20 "${testcvs} import -mtest . A B" \
+"${SPROG} \[import aborted\]: attempt to import the repository"
+           dotest_fail errmsg2-21 "${testcvs} import -mtest first-dir A B" \
+"${SPROG} \[import aborted\]: attempt to import the repository"
+         fi
+
+         dokeep
+         cd ..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       errmsg3)
+         # Test the *PANIC* message caused by missing administration files
+         mkdir errmsg3
+         cd errmsg3
+         mkdir CVS
+         dotest_fail errmsg3-1 "${testcvs} -q up" \
+"${CPROG} update: in directory \`.':
+${CPROG} update: CVS directory found without administrative files\.
+${CPROG} update: Use CVS to create the CVS directory, or rename the
+${CPROG} update: directory if it is intended to store something
+${CPROG} update: besides CVS administrative files\.
+${CPROG} \[update aborted\]: \*PANIC\* administration files missing!"
+
+         dokeep
+         cd ..
+         rm -r errmsg3
+         ;;
+
+
+
+       errmsg4)
+         # Look for the warning when files with keywords are committed with
+         # an OpenPGP signature.
+         if $gpg; then :; else
+           skip errmsg4 "No OpenPGP tool configured."
+           continue
+         fi
+
+         mkdir errmsg4
+         cd errmsg4
+         dotest errmsg4-init-1 "$testcvs -Q import -m. errmsg4 VENDOR RELEASE"
+         dotest errmsg4-init-2 "$testcvs -Q co errmsg4"
+
+         cd errmsg4
+         echo '$''Revision$' >filewithkeyword
+         dotest errmsg4-init-3 "$testcvs -Q add filewithkeyword"
+
+         # The following test intentionally uses -q.  This message should only
+         # disappear with -Q.
+         dotest errmsg4-1 "$testcvs -q ci -mgen-msg" \
+"$CPROG commit: warning: signed file \`filewithkeyword' contains at least one 
RCS keyword
+$CVSROOT_DIRNAME/errmsg4/filewithkeyword,v  <--  filewithkeyword
+initial revision: 1\.1"
+
+         dokeep
+         cd ../..
+         rm -rf errmsg4
+         modify_repo rm -rf $CVSROOT_DIRNAME/errmsg4
+         ;;
+
+
+
+       close-stdout)
+         # Ensure that cvs update -p FILE > /dev/full fails
+         # Perform this test IFF /dev/full is a writable character device.
+         if test -w /dev/full && test -c /dev/full; then
+           mkdir close-stdout
+           cd close-stdout
+           echo a > file
+           dotest close-stdout-1 "$testcvs -Q import -m. closeout X Y" ''
+           dotest close-stdout-2 "$testcvs -Q co closeout" ''
+           # Match either a bare `write error' or
+           # `write error: No space left on device',
+           # since closeout.c can produce both.
+           dotest_fail close-stdout-3 \
+               "${testcvs} -Q update -p closeout/file > /dev/full" \
+               "${CPROG} \[update aborted\]: write error.*"
+
+           dokeep
+           cd ..
+           rm -rf close-stdout
+           modify_repo rm -rf $CVSROOT_DIRNAME/closeout
+         else
+           skip close-stdout '/dev/full is not available'
+         fi
+         ;;
+
+
+
+       debug-log-nonfatal)
+         # Once upon a time, failure to create the debug log could be fatal.
+          if $remote; then :; else
+            remoteonly debug-log-nonfatal
+           continue
+         fi
+
+         mkdir $TESTDIR/unwritable
+         chmod a-w $TESTDIR/unwritable
+         if test -n "$CVS_CLIENT_LOG"; then
+              save_CVS_CLIENT_LOG=$CVS_CLIENT_LOG
+         fi
+         CVS_CLIENT_LOG=$TESTDIR/unwritable/cvsclientlog
+         export CVS_CLIENT_LOG
+
+         dotest debug-log-nonfatal-1 \
+"$testcvs -Q co -p CVSROOT/config >/dev/null" \
+"$CPROG checkout: opening to-server logfile 
$TESTDIR/unwritable/cvsclientlog.in: Permission denied
+$CPROG checkout: opening from-server logfile 
$TESTDIR/unwritable/cvsclientlog.out: Permission denied"
+
+         dokeep
+         rm -rf $TESTDIR/unwritable
+         unset CVS_CLIENT_LOG
+         if test -n "$save_CVS_CLIENT_LOG"; then
+             CVS_CLIENT_LOG=$save_CVS_CLIENT_LOG
+         fi
+         ;;
+
+
+
+       adderrmsg)
+         # Test some of the error messages the 'add' command can return and
+         # their reactions to '-q'.
+
+         # First the usual setup; create a directory first-dir.
+         mkdir 1; cd 1
+         dotest adderrmsg-init1 "${testcvs} -q co -l ." ''
+         mkdir adderrmsg-dir
+         dotest adderrmsg-init2 "${testcvs} add adderrmsg-dir" \
+"Directory ${CVSROOT_DIRNAME}/adderrmsg-dir added to the repository"
+          cd adderrmsg-dir
+
+         # try to add the admin dir
+         dotest_fail adderrmsg-1 "${testcvs} add CVS" \
+"${CPROG} add: cannot add special file .CVS.; skipping"
+         # might not want to see this message when you 'cvs add *'
+         dotest_fail adderrmsg-2 "${testcvs} -q add CVS" ""
+
+         # to test some other messages
+         touch file1
+         dotest adderrmsg-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         # add it twice
+         dotest_fail adderrmsg-4 "${testcvs} add file1" \
+"${SPROG} add: \`file1' has already been entered"
+         dotest_fail adderrmsg-5 "${testcvs} -q add file1" ""
+
+         dotest adderrmsg-6 "${testcvs} -q ci -madd" \
+"$CVSROOT_DIRNAME/adderrmsg-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+         # file in Entries & repository
+         dotest_fail adderrmsg-7 "${testcvs} add file1" \
+"${SPROG} add: \`file1' already exists, with version number 1\.1"
+         dotest_fail adderrmsg-8 "${testcvs} -q add file1" ""
+
+         # clean up
+         dokeep
+         cd ../..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/adderrmsg-dir
+         ;;
+
+
+
+       opterrmsg)
+         # Test some option parsing error messages
+
+         # No init is necessary since these error messages are printed b4
+         # CVS looks for a sandbox or repository
+
+         # -z used to accept non-numeric arguments.  This bit someone who
+         # attempted `cvs -z -n up' when the -n was read as the argument to
+         # -z.
+         dotest_fail opterrmsg-1 "${testcvs} -z -n up" \
+"${CPROG}: gzip compression level must be between 0 and 9"
+
+         # Some general -z checks
+         dotest_fail opterrmsg-2 "${testcvs} -z -1 up" \
+"${CPROG}: gzip compression level must be between 0 and 9"
+         dotest_fail opterrmsg-3 "${testcvs} -z10 up" \
+"${CPROG}: gzip compression level must be between 0 and 9"
+         ;;
+
+
+
+       devcom)
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+         dotest devcom-1 "$testcvs -q co first-dir"
+
+         cd first-dir
+         echo abb >abb
+         dotest devcom-2 "$testcvs add abb" \
+"$SPROG add: scheduling file \`abb' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+
+         dotest devcom-3 "$testcvs -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/abb,v  <--  abb
+initial revision: 1\.1"
+
+         dotest_fail devcom-4 "$testcvs watch" "Usage$DOTSTAR"
+
+         dotest devcom-5 "$testcvs watch on"
+
+         echo abc >abc
+         dotest devcom-6 "$testcvs add abc" \
+"$SPROG add: scheduling file \`abc' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+
+         dotest devcom-7 "$testcvs -q ci -m added" \
+"$CVSROOT_DIRNAME/first-dir/abc,v  <--  abc
+initial revision: 1\.1"
+
+         cd ../..
+         mkdir 2
+         cd 2
+
+         dotest devcom-8 "$testcvs -q co first-dir" \
+"U first-dir/abb
+U first-dir/abc"
+
+         cd first-dir
+         dotest_fail devcom-9 "test -w abb"
+         dotest_fail devcom-9b "test -w abc"
+
+         dotest devcom-10 "$testcvs editors"
+         dotest devcom-11 "$testcvs -q edit abb"
+
+         # Here we test for the traditional ISO C ctime() date format.
+         # We assume the C locale; I guess that works provided we set
+         # LC_ALL at the start of this script but whether these
+         # strings should vary based on locale does not strike me as
+         # self-evident.
+         dotest devcom-12 "$testcvs editors" \
+"abb   ${username}     [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] 
[0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   [-a-zA-Z_.0-9]* 
${TESTDIR}/2/first-dir"
+
+         echo aaaa >>abb
+         dotest devcom-13 "$testcvs ci -m modify abb" \
+"${CVSROOT_DIRNAME}/first-dir/abb,v  <--  abb
+new revision: 1\.2; previous revision: 1\.1"
+
+         # Unedit of a file not being edited should be a noop.
+         dotest devcom-14 "$testcvs unedit abb" ''
+
+         dotest devcom-15 "$testcvs editors" ""
+
+         dotest_fail devcom-16 "test -w abb"
+
+         dotest devcom-17 "$testcvs -q edit abc"
+
+         # Unedit of an unmodified file.
+         dotest devcom-18 "$testcvs unedit abc"
+         dotest devcom-19 "$testcvs -q edit abc"
+
+         echo changedabc >abc
+         # Try to unedit a modified file; cvs should ask for confirmation
+         dotest devcom-20 "echo no | $testcvs unedit abc" \
+"abc has been modified; revert changes? "
+
+         dotest devcom-21 "echo changedabc |$diff_u - abc"
+
+         # OK, now confirm the unedit
+         dotest devcom-22 "echo yes |$testcvs unedit abc" \
+"abc has been modified; revert changes? "
+
+         dotest devcom-23 "echo abc |$diff_u - abc"
+
+         dotest devcom-24 "$testcvs watchers" ''
+
+         # FIXME: This probably should be an error message instead
+         # of silently succeeding and printing nothing.
+         dotest devcom-a-nonexist "$testcvs watchers nonexist" ''
+
+         dotest devcom-a1 "$testcvs watch add" ''
+         dotest devcom-a2 "$testcvs watchers" \
+"abb   $username       edit    unedit  commit
+abc    $username       edit    unedit  commit"
+         dotest devcom-a3 "$testcvs watch remove -a unedit abb" ''
+         dotest devcom-a4 "$testcvs watchers abb" \
+"abb   $username       edit    commit"
+
+         # Check tagging and checking out while we have a CVS
+         # directory in the repository.
+         dotest devcom-t0 "${testcvs} -q tag tag" \
+'T abb
+T abc'
+         cd ../..
+         mkdir 3
+         cd 3
+
+         # Test commented out because the bug it tests for is not fixed
+         # The error is:
+         # cvs watchers: cannot open CVS/Entries for reading: No such file or 
directory
+         # cvs: ../../work/ccvs/src/fileattr.c:75: fileattr_read: Assertion 
`fileattr_stored_repos != ((void *)0)' failed.
+:        dotest devcom-t-nonexist "${testcvs} watchers nonexist" fixme
+
+         dotest devcom-t1 "${testcvs} -q co -rtag first-dir/abb" \
+'U first-dir/abb'
+         cd ..
+         # Since first-dir/abb is readonly, use -f.
+         rm -rf 3
+
+         # Test checking out the directory rather than the file.
+         mkdir 3
+         cd 3
+         dotest devcom-t2 "${testcvs} -q co -rtag first-dir" \
+'U first-dir/abb
+U first-dir/abc'
+         cd ..
+         # Since the files are readonly, use -f.
+         rm -rf 3
+
+         # Now do it again, after removing the val-tags file created
+         # by devcom-t1 to force CVS to search the repository
+         # containing CVS directories.
+         rm ${CVSROOT_DIRNAME}/CVSROOT/val-tags
+         mkdir 3
+         cd 3
+         dotest devcom-t3 "${testcvs} -q co -rtag first-dir" \
+'U first-dir/abb
+U first-dir/abc'
+         cd ..
+         # Since the files are readonly, use -f.
+         rm -rf 3
+
+         # Now remove all the file attributes
+         cd 2/first-dir
+         dotest devcom-b0 "${testcvs} watch off" ''
+         dotest devcom-b1 "${testcvs} watch remove" ''
+         # Test that CVS 1.6 and earlier can handle the repository.
+         dotest_fail devcom-b2 "test -d ${CVSROOT_DIRNAME}/first-dir/CVS"
+
+         # Now test watching just some, not all, files.
+         dotest devcom-some0 "${testcvs} watch on abc" ''
+         cd ../..
+         mkdir 3
+         cd 3
+         dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb
+U first-dir/abc'
+         dotest devcom-some2 "test -w first-dir/abb" ''
+         dotest_fail devcom-some3 "test -w first-dir/abc" ''
+
+         dokeep
+         cd ..
+         # Use -f because of the readonly files.
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       devcom2)
+         # More watch tests, most notably setting watches on
+         # files in various different states.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+         dotest devcom2-1 "${testcvs} -q co first-dir" ''
+         cd first-dir
+
+         # This should probably be an error; setting a watch on a totally
+         # unknown file is more likely to be a typo than intentional.
+         # But that isn't the currently implemented behavior.
+         dotest devcom2-2 "${testcvs} watch on w1" ''
+
+         touch w1 w2 w3 nw1
+         dotest devcom2-3 "${testcvs} add w1 w2 w3 nw1" "${DOTSTAR}"
+         # Letting the user set the watch here probably can be considered
+         # a feature--although it leads to a few potentially strange
+         # consequences like one user can set the watch and another actually
+         # adds the file.
+         dotest devcom2-4 "${testcvs} watch on w2" ''
+         dotest devcom2-5 "${testcvs} -Q ci -m add-them"
+
+         # Note that this test differs in a subtle way from devcom-some0;
+         # in devcom-some0 the watch is creating a new fileattr file, and
+         # here we are modifying an existing one.
+         dotest devcom2-6 "${testcvs} watch on w3" ''
+
+         # Now test that all the watches got set on the correct files
+         # FIXME: CVS should have a way to report whether watches are
+         # set, I think.  The "check it out and see if it read-only" is
+         # sort of OK, but is complicated by CVSREAD and doesn't help
+         # if the file is added and not yet committed or some such.
+         # Probably "cvs status" should report "watch: on" if watch is on
+         # (and nothing if watch is off, so existing behavior is preserved).
+         cd ../..
+         mkdir 2
+         cd 2
+         dotest devcom2-7 "${testcvs} -q co first-dir" 'U first-dir/nw1
+U first-dir/w1
+U first-dir/w2
+U first-dir/w3'
+         dotest devcom2-8 "test -w first-dir/nw1" ''
+         dotest_fail devcom2-9 "test -w first-dir/w1" ''
+         dotest_fail devcom2-10 "test -w first-dir/w2" ''
+         dotest_fail devcom2-11 "test -w first-dir/w3" ''
+
+         cd first-dir
+         # OK, now we want to try files in various states with cvs edit.
+         dotest_fail devcom2-12 "$testcvs edit w4" \
+"${CPROG} edit: no such file w4; ignored"
+         # Try the same thing with a per-directory watch set.
+         dotest devcom2-13 "${testcvs} watch on" ''
+         dotest_fail devcom2-14 "$testcvs edit w5" \
+"${CPROG} edit: no such file w5; ignored"
+         dotest devcom2-15 "${testcvs} editors" ''
+         dotest devcom2-16 "${testcvs} editors w4" ''
+         # Make sure there are no droppings lying around
+         dotest devcom2-17 "cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
+"Fw1   _watched=
+Fw2    _watched=
+Fw3    _watched=
+Fnw1   _watched=
+D      _watched="
+         cd ..
+
+         # Do a little error testing
+         dotest devcom2-18 "${testcvs} -q co -d first+dir first-dir" \
+"U first${PLUS}dir/nw1
+U first${PLUS}dir/w1
+U first${PLUS}dir/w2
+U first${PLUS}dir/w3"
+         cd first+dir
+         dotest_fail devcom2-19 "${testcvs} edit" \
+"${CPROG} \[edit aborted\]: current directory (${TESTDIR}/2/first${PLUS}dir) 
contains an invalid character (${PLUS},>;=\\\\t\\\\n)"
+
+         # Make sure there are no droppings lying around
+         dotest devcom2-20 "cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
+"Fw1   _watched=
+Fw2    _watched=
+Fw3    _watched=
+Fnw1   _watched=
+D      _watched="
+
+         dokeep
+         cd ../..
+         # Use -f because of the readonly files.
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       devcom3)
+         # More watch tests, most notably handling of features designed
+         # for future expansion.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+
+         # Set up logging via the postwatch script hook.  See the `info' test
+         # for a list of tests where other script hooks are tested.
+         dotest devcom3-init-1 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         echo "ALL $TESTDIR/1/loggit %r %p %c" >>postwatch
+         dotest devcom3-init-2 "$testcvs -Q ci -mlog-watch"
+         cd .. # 1
+
+         cat >loggit <<EOF
+#!$TESTSHELL
+echo \${1+"\$@"} >>$TESTDIR/1/watch-log
+EOF
+         # #^@&!^@ Cygwin.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x $TESTDIR/1/loggit"
+         else
+           chmod +x loggit
+         fi
+       
+       
+
+         dotest devcom3-1 "$testcvs -q co first-dir"
+         cd first-dir
+
+         touch w1 w2
+         dotest devcom3-2 "${testcvs} add w1 w2" "${DOTSTAR}"
+         dotest devcom3-3 "${testcvs} watch on w1 w2" ''
+         dotest devcom3-4 "${testcvs} -Q ci -m add-them"
+
+         # OK, since we are about to delve into CVS's internals, make
+         # sure that we seem to be correct about how they work.
+         dotest devcom3-5 "cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
+"Fw1   _watched=
+Fw2    _watched="
+         # Now write a few more lines, just as if we were a newer version
+         # of CVS implementing some new feature.
+         cat <<'EOF' >>${CVSROOT_DIRNAME}/first-dir/CVS/fileattr
+Enew   line    here
address@hidden@#=&
+EOF
+         # Now get CVS to write to the fileattr file....
+         dotest devcom3-6 "${testcvs} watch off w1" ''
+         # ...and make sure that it hasn't clobbered our new lines.
+         # Note that writing these lines in another order would be OK
+         # too.
+         dotest devcom3-7 "cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
+"Fw2   _watched=
address@hidden@#=&
+Enew   line    here"
+
+         # See what CVS does when a file name is duplicated.  The
+         # behavior of all versions of CVS since file attributes were
+         # implemented is that it nukes the duplications.  This seems
+         # reasonable enough, although it means it isn't clear how
+         # useful duplicates would be for purposes of future
+         # expansion.  But in the interests of keeping behaviors
+         # predictable, might as well test for it, I guess.
+         echo 'Fw2     duplicate=' >>${CVSROOT_DIRNAME}/first-dir/CVS/fileattr
+         dotest devcom3-8 "${testcvs} watch on w1" ''
+         dotest devcom3-9 "cat ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" \
+"Fw2   _watched=
+Fw1    _watched=
+Enew   line    here
address@hidden@#=&"
+
+         # Now test disconnected "cvs edit" and the format of the 
+         # CVS/Notify file.
+         if $remote; then
+           CVS_SERVER_save=$CVS_SERVER
+           CVS_SERVER=$TESTDIR/cvs-none; export CVS_SERVER
+
+           # The ${DOTSTAR} below matches the exact CVS server error message,
+           # which in :fork: mode is:
+           # "$SPROG \[edit aborted\]: cannot exec $TESTDIR/cvs-none: 
${DOTSTAR}",
+           # but which is:
+           # "bash2: line 1: $TESTDIR/cvs-none: No such file or directory"
+           # when testing across an :ext:/ssh link to my Linux 2.4 box.
+           #
+           # I can't even test for the second part of the error message,
+           # from the client, which varies more consistently, usually either
+           # "end of file from server" (if the process doing the exec exits
+           # before the parent gets around to sending data to it) or
+           # "received broken pipe signal" (if it is the other way around),
+           # since HP-UX fails to output it.
+           dotest_fail devcom3-9ar "$testcvs edit w1 2>/dev/null"
+           dotest devcom3-9br "test -w w1"
+           dotest devcom3-9cr "cat CVS/Notify" \
+"Ew1   [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] 
[0-9:]* [0-9][0-9][0-9][0-9] -0000   [-a-zA-Z_.0-9]* ${TESTDIR}/1/first-dir  
EUC"
+           CVS_SERVER=${CVS_SERVER_save}; export CVS_SERVER
+           if $proxy; then
+             dotest_fail devcom3-9dp "$testcvs -q update" \
+"This CVS server does not support disconnected \`cvs edit'\.  For now, remove 
all \`CVS/Notify' files in your workspace and try your command again\."
+             dotest devcom3-9ep "test -f CVS/Notify"
+             rm CVS/Notify
+             dotest devcom3-9hp "$testcvs watchers w1"
+           else
+             dotest devcom3-9dr "$testcvs -q update"
+             dotest_fail devcom3-9er "test -f CVS/Notify"
+             dotest devcom3-9fr "$testcvs watchers w1" \
+"w1    $username       tedit   tunedit tcommit"
+           fi
+           dotest devcom3-9gr "$testcvs unedit w1"
+           dotest devcom3-9hr "$testcvs watchers w1"
+         fi
+
+         cd ../..
+         # OK, now change the tab to a space, and see that CVS gives
+         # a reasonable error (this is database corruption but CVS should
+         # not lose its mind).
+         sed -e 's/Fw2 /Fw2 /' <$CVSROOT_DIRNAME/first-dir/CVS/fileattr \
+           >$CVSROOT_DIRNAME/first-dir/CVS/fileattr.new
+         modify_repo mv $CVSROOT_DIRNAME/first-dir/CVS/fileattr.new \
+                        $CVSROOT_DIRNAME/first-dir/CVS/fileattr
+         mkdir 2; cd 2
+         dotest_fail devcom3-10 "${testcvs} -Q co ." \
+"${SPROG} \[checkout aborted\]: file attribute database corruption: tab 
missing in ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr"
+
+         notifyworks=false
+         if $remote; then
+           if $proxy; then :; else
+             notifyworks=:
+           fi
+         fi
+         if $notifyworks; then
+           dotest devcom3-postwatch-examine-1r "cat $TESTDIR/1/watch-log" \
+"$CVSROOT_DIRNAME first-dir watch
+$CVSROOT_DIRNAME first-dir watch
+$CVSROOT_DIRNAME first-dir watch
+$CVSROOT_DIRNAME first-dir update
+$CVSROOT_DIRNAME first-dir server"
+         else
+           dotest devcom3-postwatch-examine-1 "cat $TESTDIR/1/watch-log" \
+"$CVSROOT_DIRNAME first-dir watch
+$CVSROOT_DIRNAME first-dir watch
+$CVSROOT_DIRNAME first-dir watch"
+         fi
+
+         dokeep
+         restore_adm
+         cd ..
+         # Use -f because of the readonly files.
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       watch4)
+         # More watch tests, including adding directories.
+         mkdir 1; cd 1
+         dotest watch4-0a "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest watch4-0b "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+
+         cd first-dir
+         dotest watch4-1 "${testcvs} watch on" ''
+         # This is just like the 173 test
+         touch file1
+         dotest watch4-2 "$testcvs add file1" \
+"$SPROG add: scheduling file .file1. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest watch4-3 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         # Now test the analogous behavior for directories.
+         mkdir subdir
+         dotest watch4-4 "${testcvs} add subdir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
+         cd subdir
+         touch sfile
+         dotest watch4-5 "${testcvs} add sfile" \
+"${SPROG} add: scheduling file .sfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest watch4-6 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/subdir/sfile,v  <--  sfile
+initial revision: 1\.1"
+         cd ../../..
+         mkdir 2; cd 2
+         dotest watch4-7 "${testcvs} -q co first-dir" "U first-dir/file1
+U first-dir/subdir/sfile"
+         dotest_fail watch4-8 "test -w first-dir/file1" ''
+         dotest_fail watch4-9 "test -w first-dir/subdir/sfile" ''
+         cd first-dir
+         dotest watch4-10 "$testcvs -q edit file1"
+         echo 'edited in 2' >file1
+         cd ../..
+
+         cd 1/first-dir
+
+            # NOTE: I'm leaving in '' as acceptable
+            #  to maintain partial compatibility with CVS versions
+            #  prior to the edit check patch.
+          editorsLineRE="file1 $username       [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR/2/first-dir"
+         dotest watch4-11 "$testcvs -q edit file1"
+
+         echo 'edited in 1' >file1
+         dotest watch4-12 "${testcvs} -q ci -m edit-in-1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../..
+         cd 2/first-dir
+         dotest watch4-13 "$testcvs -q update" \
+"Merging differences between 1\.1 and 1\.2 into \`file1'
+$CPROG update: conflicts during merge
+C file1"
+         if (echo yes | ${testcvs} unedit file1) >>${LOGFILE}; then
+           pass watch4-14
+         else
+           fail watch4-15
+         fi
+         # This could plausibly be defined to either go back to the revision
+         # which was cvs edit'd (the status quo), or back to revision 1.2
+         # (that is, the merge could update CVS/Base/file1).  We pick the
+         # former because it is easier to implement, not because we have
+         # thought much about which is better.
+         dotest watch4-16 "cat file1" ''
+         # Make sure CVS really thinks we are at 1.1.
+         dotest watch4-17 "${testcvs} -q update" "U file1"
+         dotest watch4-18 "cat file1" "edited in 1"
+         cd ../..
+
+         # As a sanity check, make sure we are in the right place.
+         dotest watch4-cleanup-1 "test -d 1"
+         dotest watch4-cleanup-1 "test -d 2"
+
+         dokeep
+         # Specify -f because of the readonly files.
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       watch5)
+         # This test was designed to catch a problem in server
+         # mode where an 'cvs edit'd file disappeared from the
+         # CVS/Base directory when 'cvs status' or 'cvs update'
+         # was called on the file after the file was touched.
+         #
+         # This test is still here to prevent the bug from
+         # being reintroduced.
+         #
+         # The rationale for having CVS/Base stay around is that
+         # CVS/Base should be there if "cvs edit" has been run (this
+         # may be helpful as a "cvs editors" analogue, it is
+         # client-side and based on working directory not username;
+         # but more importantly, it isn't clear why a "cvs status"
+         # would act like an unedit, and even if it does, it would
+         # need to make the file read-only again).
+
+         mkdir watch5; cd watch5
+         dotest watch5-0a "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest watch5-0b "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+
+         cd first-dir
+         dotest watch5-1 "${testcvs} watch on" ''
+         # This is just like the 173 test
+         touch file1
+         dotest watch5-2 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest watch5-3 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest watch5-4 "$testcvs -q edit file1"
+         dotest watch5-5 "test -f CVS/Base/file1" ''
+         if ${testcvs} status file1 >>${LOGFILE} 2>&1; then
+               pass watch5-6
+         else
+               fail watch5-6
+         fi
+         dotest watch5-7 "test -f CVS/Base/file1" ''
+
+         # Here's where the file used to dissappear
+         touch file1
+         if ${testcvs} status file1 >>${LOGFILE} 2>&1; then
+               pass watch5-8
+         else
+               fail watch5-8
+         fi
+         dotest watch5-10 "test -f CVS/Base/file1" ''
+
+         # Make sure update won't remove the file either
+         touch file1
+         dotest watch5-11 "${testcvs} -q up" ''
+         dotest watch5-12 "test -f CVS/Base/file1" ''
+
+         dokeep
+         cd ../..
+         rm -r watch5
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       watch6-0)
+
+         # Make sure that default attributes are being set properly.
+         # Specifying a directory has, it seems, never worked,
+         # and 1.12.10 broke it completely.
+         mkdir watch6-0; cd watch6-0
+
+         dotest watch6-0-setup-1 "$testcvs -Q co -ldtop ."
+         cd top
+         mkdir watch6-0
+         dotest watch6-0-setup-2 "$testcvs -Q add watch6-0"
+         cd watch6-0
+         dotest watch6-0-1 "$testcvs watch add"
+         dotest watch6-0-2 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr >/dev/null"
+         dotest watch6-0-3 "$testcvs watch remove"
+         dotest_fail watch6-0-4 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr 2>/dev/null >/dev/null"
+
+         dotest watch6-0-5 "$testcvs watch add ."
+         dotest watch6-0-6 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr >/dev/null"
+         dotest watch6-0-7 "$testcvs watch remove ."
+         dotest_fail watch6-0-8 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr 2>/dev/null >/dev/null"
+
+         # OK, basic add/remove work. Now, make sure it works with
+         # named directories.
+         mkdir dir1
+         mkdir dir2
+         mkdir dir3
+         echo afile>afile
+         $testcvs -Q add afile dir1 dir2 dir3
+         $testcvs -Q ci -m "Adding test files"
+
+         # Current directory should not be watched, but there should
+         # be a watch on the file, and on dir1 & dir2, but not on
+         # dir3.
+         dotest watch6-0-9 "$testcvs -Q watch add afile dir1 dir2"
+         dotest_fail watch6-0-10 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr 2>/dev/null >/dev/null"
+         dotest watch6-0-11 \
+"grep '^Fafile' $CVSROOT_DIRNAME/watch6-0/CVS/fileattr >/dev/null"
+         dotest watch6-0-12 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/dir1/CVS/fileattr >/dev/null"
+         dotest watch6-0-13 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/dir2/CVS/fileattr >/dev/null"
+         dotest_fail watch6-0-12 \
+"grep '^D' $CVSROOT_DIRNAME/watch6-0/dir3/CVS/fileattr 2>/dev/null >/dev/null"
+
+         dokeep
+         cd ../../..
+         rm -rf watch6-0
+         modify_repo rm -rf $CVSROOT_DIRNAME/watch6-0
+         ;;
+
+
+
+       watch6)
+         # Check that `cvs watch on' does not reset the fileattr file.
+         mkdir watch6; cd watch6
+
+         dotest watch6-setup-1 "$testcvs -Q co -ldtop ."
+         cd top
+         mkdir watch6
+         dotest watch6-setup-2 "$testcvs -Q add watch6"
+
+         # I don't recall why I had these next 3 lines.
+         cd ..
+         dotest watch6-setup-3 "$testcvs -Q co watch6"
+         cd watch6
+
+         mkdir subdir
+         dotest watch6-setup-4 "$testcvs -Q add subdir"
+         cd subdir
+
+         # START watch add/remove sequence
+         dotest watch6-1 "$testcvs -Q watch add"
+         dotest watch6-2 \
+"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+
+         dotest watch6-3 "$testcvs watch on"
+         dotest watch6-4 \
+"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+         dotest watch6-5 \
+"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+
+         dotest watch6-6 "$testcvs watch off"
+         dotest watch6-7 \
+"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+         dotest_fail watch6-8 \
+"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+
+         dotest watch6-9 "$testcvs watch remove"
+         dotest_fail watch6-10 \
+"test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS"
+         dotest_fail watch6-11 \
+"test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr"
+         # END watch add/remove sequence
+
+         echo Hi there >afile
+         dotest watch6-12 "$testcvs -Q add afile"
+         dotest watch6-13 "$testcvs ci -m 'A file' afile" \
+"$CVSROOT_DIRNAME/watch6/subdir/afile,v  <--  afile
+initial revision: 1.1"
+
+         # START watch add/remove sequence
+         dotest watch6-14 "$testcvs -Q watch add"
+         dotest watch6-15 \
+"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+
+         dotest watch6-16 "$testcvs watch on"
+         dotest watch6-17 \
+"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+         dotest watch6-18 \
+"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+
+         dotest watch6-19 "$testcvs watch off"
+         dotest watch6-20 \
+"grep '_watchers' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+         dotest_fail watch6-21 \
+"grep '_watched' $CVSROOT_DIRNAME/watch6/subdir/CVS/fileattr >/dev/null"
+
+         dotest watch6-22 "$testcvs watch remove"
+         dotest_fail watch6-23 \
+"test -d $CVSROOT_DIRNAME/test-directory/subdir/CVS"
+         dotest_fail watch6-24 \
+"test -f $CVSROOT_DIRNAME/test-directory/subdir/CVS/fileattr"
+         # END watch add/remove sequence
+
+         if $keep; then
+           echo Keeping $TESTDIR and exiting due to --keep
+           exit 0
+         fi
+         cd ../../..
+         rm -r watch6
+         modify_repo rm -rf $CVSROOT_DIRNAME/watch6
+         ;;
+
+
+
+        edit-check)
+          # This tests the edit -c/-f and related features.
+
+         mkdir edit-check; cd edit-check
+         dotest edit-check-0a "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest edit-check-0b "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+
+         cd first-dir
+         dotest edit-check-1 "$testcvs watch on"
+
+          echo foo > file1
+          dotest edit-check-2a "$testcvs add -minitial file1" \
+"$SPROG [a-z]*: scheduling file .file1. for addition
+$SPROG [a-z]*: use .$SPROG commit. to add this file permanently"
+
+          dotest edit-check-2b "$testcvs commit -m 'c1' file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+          editorsLineRE="file1 $username       [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR/edit-check/first-dir"
+
+          R_editorsLineRE="first-dir/file1     $username       
[SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* 
[0-9][0-9][0-9][0-9] -0000   $hostname       $TESTDIR/edit-check"
+          F3_editorsLineRE="second-dir/file3   $username       
[SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* 
[0-9][0-9][0-9][0-9] -0000   $hostname       $TESTDIR/edit-check/first-dir"
+
+          A_editorsLineRE="file1       [-a-zA-Z0-9_]*  [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR[0-9]*/edit-check/first-dir"
+
+          AF_editorsLineRE="file[12]   [-a-zA-Z0-9_]*  [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR/edit-check/first-dir"
+
+          NF_editorsLineRE="   [-a-zA-Z0-9_]*  [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR/edit-check/first-dir"
+
+          dotest edit-check-3 "$testcvs -q edit file1"
+          dotest edit-check-4 "$testcvs -q edit file1"
+
+          dotest_fail edit-check-5a "$testcvs edit -c file1" \
+"$editorsLineRE
+$SPROG edit: Skipping file \`file1' due to existing editors\."
+
+          dotest edit-check-5b "$testcvs editors" "$editorsLineRE"
+
+          dotest edit-check-6a "$testcvs -q edit -c -f file1"
+          dotest edit-check-6b "$testcvs editors" "$editorsLineRE"
+
+          dotest edit-check-7a "cat file1" "foo"
+          echo "bar" > file1
+          dotest_fail edit-check-7b "$testcvs edit -c file1" \
+"$editorsLineRE
+$SPROG edit: Skipping file \`file1' due to existing editors\."
+          dotest edit-check-7c "cat file1" "bar"
+
+            # edit-check-8a has issues.  It copies the current (modified)
+            # version of the file into CVS/Base, so that edit-check-9a and
+            # edit-check-9b don't get the expected results.
+            #   Maybe unedit is *supposed* to return it to the state
+            # it was in before the edit (even if it was modified),
+            # but while that has a certain symetry, it doesn't seem
+            # to pass the intuitive-usability test.
+            #   This aspect of the general problem could
+            # be fixed by not overwriting pre-existing Base versions,
+            # but it still wouldn't fix it if the user manually
+            # modified the file before doing the first edit.
+            #   Because of the possibility that this is working as
+            # intended, I'm just commenting out the test, not fixing
+            # the issue.
+          #dotest edit-check-8a "${testcvs} edit -c -f file1" \
+          #   "${editorsLineRE}"
+          dotest edit-check-8b "$testcvs editors" "$editorsLineRE"
+
+          dotest edit-check-9a "echo yes | $testcvs unedit file1" \
+"file1 has been modified; revert changes? "
+          dotest edit-check-9b "$testcvs editors"
+          dotest edit-check-9c "cat file1" "foo"
+
+          dotest edit-check-10 "$testcvs -q edit -c file1"
+          dotest_fail edit-check-11 "$testcvs -q edit -c file1" \
+"$SPROG edit: Skipping file \`file1' due to existing editors\."
+
+          echo "morefoo" > file1
+          dotest edit-check-12a "$testcvs commit -m 'c2' -c file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+          dotest edit-check-12b "$testcvs editors file1"
+
+          chmod u+w file1
+          echo "morebar" > file1
+          dotest_fail edit-check-13a "$testcvs commit -m 'c3' -c file1" \
+"$SPROG [a-z]*: Valid edit does not exist for file1
+$SPROG \[[a-z]* aborted\]: correct above errors first!"
+          dotest edit-check-13b "$testcvs editors file1"
+
+          dotest edit-check-14a "$testcvs commit -m 'c4' -c -f file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+          dotest edit-check-14b "$testcvs editors file1"
+
+          dotest edit-check-15 "$testcvs -q edit -c file1"
+          cd ..
+
+          dotest edit-check-16a "echo yes | $testcvs release -d first-dir" \
+"You have \[0\] altered files in this repository.
+Are you sure you want to release (and delete) directory \`first-dir': "
+          dotest edit-check-16b "$testcvs -q update -d first-dir" \
+             "U first-dir/file1"
+          cd first-dir
+          dotest edit-check-16c "$testcvs editors file1"
+
+          cd ..
+          dotest edit-check-17a "$testcvs -q edit -c"
+          dotest_fail edit-check-17b "$testcvs -q edit -c" \
+"$SPROG edit: Skipping file \`first-dir/file1' due to existing editors\."
+          dotest edit-check-17c "$testcvs -q edit -c -f"
+
+          echo "more changes" > first-dir/file1
+          dotest edit-check-18a "$testcvs -q commit -m 'c5' -c" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  first-dir/file1
+new revision: 1\.4; previous revision: 1\.3"
+          dotest edit-check-18b "$testcvs editors"
+
+          cd first-dir
+
+            # Manually fake another editor:
+
+            # Try to gaurantee a seperate name for an "other" user editting
+            # the file.
+          otherUser="dummyUser"
+          if [ x"$USER" = x"$otherUser" ]  ; then
+            otherUser="dummyUser2"
+          fi
+          if [ x"$LOGNAME" = x"$otherUser" ] ; then
+            otherUser="dummyUser3"
+          fi
+          tabChar='    '
+
+          backupFileattrName="$CVSROOT_DIRNAME/first-dir/CVS/bak.fileattr.$$"
+          mv $CVSROOT_DIRNAME/first-dir/CVS/fileattr $backupFileattrName
+
+          otherDir="`pwd | sed 's%/edit-check/%2/edit-check/%'`"
+          echo \
+"Ffile1${tabChar}_watched=;_editors=$otherUser>Sat Oct  6 04:25:00 2001 
-0000+`hostname`+$otherDir;_watchers=$otherUser>tedit+tunedit+tcommit
+D${tabChar}_watched=" > $CVSROOT_DIRNAME/first-dir/CVS/fileattr 
+
+          editFileattrName="$CVSROOT_DIRNAME/first-dir/CVS/edit.fileattr.$$"
+          cp $CVSROOT_DIRNAME/first-dir/CVS/fileattr $editFileattrName
+
+          O_editorsLineRE="file1       $otherUser      [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR[0-9]/edit-check/first-dir"
+
+          dotest edit-check-19a "$testcvs -q edit file1"
+          dotest edit-check-19b "$testcvs editors" \
+"$A_editorsLineRE
+$NF_editorsLineRE"
+
+          dotest edit-check-20a "$testcvs unedit file1"
+          dotest edit-check-20b "$testcvs editors" "$O_editorsLineRE"
+
+          dotest_fail edit-check-21a "$testcvs -q edit -c file1" \
+"$SPROG edit: Skipping file \`file1' due to existing editors\."
+          dotest edit-check-21b "$testcvs editors" "$O_editorsLineRE"
+
+          dotest edit-check-22a "$testcvs -q edit -c -f file1"
+          dotest edit-check-22b "$testcvs editors" \
+"$A_editorsLineRE
+$NF_editorsLineRE"
+
+          echo "Yet another change" >file1
+
+          dotest_fail edit-check-23a "$testcvs edit -c" \
+"$A_editorsLineRE
+$NF_editorsLineRE
+$SPROG edit: Skipping file \`file1' due to existing editors\."
+
+          dotest edit-check-23b "$testcvs editors" \
+"$A_editorsLineRE
+$NF_editorsLineRE"
+
+          dotest edit-check-24a "echo y | $testcvs unedit" \
+             "file1 has been modified; revert changes? "
+          dotest edit-check-24b "$testcvs editors" "$O_editorsLineRE"
+          dotest edit-check-24c "cat file1" "more changes"
+
+          dotest edit-check-25a "$testcvs unedit"
+          dotest edit-check-25b "$testcvs editors" "$O_editorsLineRE"
+          dotest_fail edit-check-25c "test -w file1"
+
+          dotest edit-check-26a "$testcvs -q edit file1"
+          dotest edit-check-26b "$testcvs editors file1" \
+"$A_editorsLineRE
+$NF_editorsLineRE"
+          dotest edit-check-26c "test -w file1"
+
+          echo "Yet more changes" >file1
+          dotest edit-check-27a "$testcvs -q commit -mmsg -c file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.5; previous revision: 1\.4"
+          dotest edit-check-27b "$testcvs editors" "$O_editorsLineRE"
+
+          chmod u+w file1
+          echo "unofficial change" >file1
+
+          dotest_fail edit-check-28a "$testcvs -q commit -mmsg -c" \
+"$SPROG commit: Valid edit does not exist for file1
+$SPROG \[commit aborted\]: correct above errors first!"
+          dotest edit-check-28b "$testcvs editors" "$O_editorsLineRE"
+
+          dotest edit-check-29a "$testcvs -q commit -mmsg -c -f" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.6; previous revision: 1\.5"
+          dotest edit-check-29b "$testcvs editors" "$O_editorsLineRE"
+          dotest edit-check-29c "cat file1" "unofficial change"
+
+          modify_repo cp "$backupFileattrName" \
+                        $CVSROOT_DIRNAME/first-dir/CVS/fileattr
+          dotest edit-check-30 "$testcvs editors"
+
+          # Make sure earlier unreported editors are reported properly
+          # with the edit-check code running.
+          if $remote; then
+            CVS_SERVER_SAVED=$CVS_SERVER
+            CVS_SERVER=$TESTDIR/cvs-none; export CVS_SERVER
+
+            # The $DOTSTAR matches the exact exec error message
+            # (which varies) and either "end of file from server"
+            # (if the process doing the exec exits before the parent
+            # gets around to sending data to it) or "broken pipe" (if it
+            # is the other way around).
+            dotest_fail edit-check-31ar "$testcvs -q edit file1" \
+"$SPROG \[edit aborted\]: cannot exec $TESTDIR/cvs-none: $DOTSTAR"
+            dotest edit-check-31br "test -w file1"
+            dotest edit-check-31cr "cat CVS/Notify" \
+"Efile1        [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 
][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   [-a-zA-Z_.0-9]* 
$TESTDIR/edit-check/first-dir   EUC"
+            CVS_SERVER=$CVS_SERVER_SAVED; export CVS_SERVER
+
+            dotest_fail edit-check-31dr "$testcvs edit -c file1" \
+"$editorsLineRE
+$SPROG edit: Skipping file \`file1' due to existing editors\."
+            dotest edit-check-31er "$testcvs editors file1" "$editorsLineRE"
+            dotest edit-check-31fr "$testcvs unedit file1"
+          fi
+
+           # Make sure it isn't confused by handling multiple files at
+           # the same time:
+          echo file2Data >file2
+
+          dotest edit-check-32a "$testcvs add file2" \
+"$SPROG [a-z]*: scheduling file .file2. for addition
+$SPROG [a-z]*: use .$SPROG commit. to add this file permanently"
+
+          dotest edit-check-32b "$testcvs commit -m 'c1' file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+          mkdir second-dir
+          dotest edit-check-32c "$testcvs add second-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository"
+          cd second-dir
+          echo ThirdFile >file3
+
+          dotest edit-check-32d "$testcvs add file3" \
+"$SPROG [a-z]*: scheduling file .file3. for addition
+$SPROG [a-z]*: use .$SPROG commit. to add this file permanently"
+
+          dotest edit-check-32f "$testcvs commit -m 'c1' file3" \
+"$CVSROOT_DIRNAME/first-dir/second-dir/file3,v  <--  file3
+initial revision: 1\.1"
+          dotest_fail edit-check-32g "test -w file3"
+
+          cd ..
+
+          dotest edit-check-33a "$testcvs -q edit -c"
+
+          dotest edit-check-33b "$testcvs editors" \
+"$AF_editorsLineRE
+$AF_editorsLineRE
+$F3_editorsLineRE"
+          dotest edit-check-33c "test -w second-dir/file3"
+
+          dotest_fail edit-check-34a "$testcvs -q edit -c file1 file2" \
+"$SPROG edit: Skipping file \`file1' due to existing editors\.
+$SPROG edit: Skipping file \`file2' due to existing editors\."
+
+          dotest edit-check-34b "$testcvs editors file1 file2" \
+"$editorsLineRE
+$AF_editorsLineRE"
+
+          dotest edit-check-35a "$testcvs unedit file1"
+          dotest edit-check-35b "$testcvs editors" \
+"$AF_editorsLineRE
+$F3_editorsLineRE"
+          dotest edit-check-35c "test -w second-dir/file3"
+
+          dotest edit-check-36a "$testcvs unedit"
+          dotest edit-check-36b "$testcvs editors"
+          dotest_fail edit-check-36c "test -w second-dir/file3"
+
+         dokeep
+          cd ../..
+          rm -rf edit-check
+          rm -rf $CVSROOT_DIRNAME/first-dir
+          ;;
+
+
+
+       unedit-without-baserev)
+         mkdir 1; cd 1
+         module=x
+
+         file=m
+         echo foo > $file
+         dotest unedit-without-baserev-1 \
+           "$testcvs -Q import -m . $module X Y" ''
+         dotest unedit-without-baserev-2 "$testcvs -Q co $module" ''
+         cd $module
+
+         dotest unedit-without-baserev-3 "$testcvs -Q edit $file" ''
+
+         echo add a line >> $file
+         rm -f CVS/Baserev
+
+         # This will fail on most systems.
+         dotest unedit-without-baserev-4 "echo yes |${testcvs} -Q unedit 
$file" \
+"m has been modified; revert changes${QUESTION} ${CPROG} unedit: m not 
mentioned in CVS/Baserev
+${CPROG} unedit: run update to complete the unedit"
+
+         # SunOS4.1.4 systems make it this far, but with a corrupted
+         # CVS/Entries file.  Demonstrate the corruption!
+         dotest unedit-without-baserev-5 "cat CVS/Entries" \
+           "/$file/1\.1\.1\.1/${DOTSTAR}"
+
+         dotest unedit-without-baserev-6 "${testcvs} -q update" \
+"$SPROG update: warning: \`m' was lost
+U m"
+
+         # OK, those were the easy cases.  Now tackle the hard one
+         # (the reason that CVS/Baserev was invented rather than just
+         # getting the revision from CVS/Entries).  This is very
+         # similar to watch4-10 through watch4-18 but with Baserev
+         # missing.
+         cd ../..
+         mkdir 2; cd 2
+         dotest unedit-without-baserev-7 "${testcvs} -Q co x" ''
+         cd x
+
+         dotest unedit-without-baserev-10 "$testcvs -q edit m"
+         echo 'edited in 2' >m
+         cd ../..
+
+         cd 1/x
+
+          editorsLineRE="m     $username       [SMTWF][uoehra][neduit] 
[JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] -0000   
$hostname       $TESTDIR/2/x"
+         dotest unedit-without-baserev-11 "$testcvs -q edit m"
+
+         echo 'edited in 1' >m
+         dotest unedit-without-baserev-12 "${testcvs} -q ci -m edit-in-1" \
+"$CVSROOT_DIRNAME/x/m,v  <--  m
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../..
+         cd 2/x
+         dotest unedit-without-baserev-13 "$testcvs -q update" \
+"Merging differences between 1\.1\.1\.1 and 1\.2 into \`m'
+$CPROG update: conflicts during merge
+C m"
+         rm CVS/Baserev
+         dotest unedit-without-baserev-14 "echo yes |${testcvs} unedit m" \
+"m has been modified; revert changes${QUESTION} ${CPROG} unedit: m not 
mentioned in CVS/Baserev
+${CPROG} unedit: run update to complete the unedit"
+         dotest unedit-without-baserev-15 "${testcvs} -q update" \
+"$SPROG update: warning: \`m' was lost
+U m"
+         # The following tests are kind of degenerate compared with
+         # watch4-16 through watch4-18 but might as well make sure that
+         # nothing seriously wrong has happened to the working directory.
+         dotest unedit-without-baserev-16 "cat m" 'edited in 1'
+         # Make sure CVS really thinks we are at 1.2.
+         dotest unedit-without-baserev-17 "${testcvs} -q update" ""
+         dotest unedit-without-baserev-18 "cat m" "edited in 1"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         rm -rf 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       ignore)
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir ignore
+         cd ignore
+
+         dotest ignore-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
+         cd CVSROOT
+         echo rootig.c >cvsignore
+         dotest ignore-2 "${testcvs} add cvsignore" "${SPROG}"' add: 
scheduling file `cvsignore'"'"' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+
+         dotest ignore-3 " ${testcvs} ci -m added" \
+"${CPROG} commit: Examining \.
+${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v  <--  cvsignore
+initial revision: 1\.1
+${SPROG} commit: Rebuilding administrative file database"
+
+         cd ..
+         if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then
+             pass ignore-4
+         else
+             fail ignore-4
+         fi
+
+         # CVS looks at the home dir from getpwuid, not HOME (is that correct
+         # behavior?), so this is hard to test and we won't try.
+         # echo foobar.c >${HOME}/.cvsignore
+         CVSIGNORE=envig.c; export CVSIGNORE
+         mkdir dir-to-import
+         cd dir-to-import
+         touch foobar.c bar.c rootig.c defig.o envig.c optig.c
+         # We use sort because we can't predict the order in which
+         # the files will be listed.
+         dotest_sort ignore-5 "${testcvs} import -m m -I optig.c 
ignore/first-dir tag1 tag2" \
+'
+
+I ignore/first-dir/defig.o
+I ignore/first-dir/envig.c
+I ignore/first-dir/optig.c
+I ignore/first-dir/rootig.c
+N ignore/first-dir/bar.c
+N ignore/first-dir/foobar.c
+No conflicts created by this import'
+         dotest_sort ignore-6 "${testcvs} import -m m -I ! ignore/second-dir 
tag3 tag4" \
+'
+
+N ignore/second-dir/bar.c
+N ignore/second-dir/defig.o
+N ignore/second-dir/envig.c
+N ignore/second-dir/foobar.c
+N ignore/second-dir/optig.c
+N ignore/second-dir/rootig.c
+No conflicts created by this import'
+         cd ..
+         rm -r dir-to-import
+
+         mkdir 1
+         cd 1
+         dotest ignore-7 "${testcvs} -q co -dsecond-dir ignore/second-dir" \
+'U second-dir/bar.c
+U second-dir/defig.o
+U second-dir/envig.c
+U second-dir/foobar.c
+U second-dir/optig.c
+U second-dir/rootig.c'
+         dotest ignore-8 "${testcvs} -q co -dfirst-dir ignore/first-dir" 'U 
first-dir/bar.c
+U first-dir/foobar.c'
+         cd first-dir
+         touch rootig.c defig.o envig.c optig.c notig.c
+         dotest ignore-9 "${testcvs} -q update -I optig.c" "${QUESTION} 
notig.c"
+         # The fact that CVS requires us to specify -I CVS here strikes me
+         # as a bug.
+         dotest_sort ignore-10 "${testcvs} -q update -I ! -I CVS" \
+"${QUESTION} defig.o
+${QUESTION} envig.c
+${QUESTION} notig.c
+${QUESTION} optig.c
+${QUESTION} rootig.c"
+
+         # Now test that commands other than update also print "? notig.c"
+         # where appropriate.  Only test this for remote, because local
+         # CVS only prints it on update.
+         rm optig.c
+         if $remote; then
+           dotest ignore-11r "$testcvs -q diff" "$QUESTION notig.c"
+
+           # Force the server to be contacted.  Ugh.  Having CVS
+           # contact the server for the sole purpose of checking
+           # the CVSROOT/cvsignore file does not seem like such a
+           # good idea, so I imagine this will continue to be
+           # necessary.  Oh well, at least we test CVS's ablity to
+           # handle a file with a modified timestamp but unmodified
+           # contents.
+           touch bar.c
+
+           dotest ignore-11ar "$testcvs -q ci -m commit-it" \
+"$QUESTION notig.c"
+         fi
+
+         # now test .cvsignore files
+         cd ..
+         echo notig.c >first-dir/.cvsignore
+         echo foobar.c >second-dir/.cvsignore
+         touch first-dir/notig.c second-dir/notig.c second-dir/foobar.c
+         dotest_sort ignore-12 "${testcvs} -qn update" \
+"${QUESTION} first-dir/.cvsignore
+${QUESTION} second-dir/.cvsignore
+${QUESTION} second-dir/notig.c"
+         dotest_sort ignore-13 "${testcvs} -qn update -I! -I CVS" \
+"${QUESTION} first-dir/.cvsignore
+${QUESTION} first-dir/defig.o
+${QUESTION} first-dir/envig.c
+${QUESTION} first-dir/rootig.c
+${QUESTION} second-dir/.cvsignore
+${QUESTION} second-dir/notig.c"
+
+         echo yes | dotest ignore-14 "${testcvs} release -d first-dir" \
+"${QUESTION} \.cvsignore
+You have \[0\] altered files in this repository.
+Are you sure you want to release (and delete) directory .first-dir': "
+
+         echo add a line >>second-dir/foobar.c
+         rm second-dir/notig.c second-dir/.cvsignore
+         echo yes | dotest ignore-15 "${testcvs} release -d second-dir" \
+"M foobar.c
+You have \[1\] altered files in this repository.
+Are you sure you want to release (and delete) directory .second-dir': "
+
+         dokeep
+         cd ../..
+         rm -r ignore
+         modify_repo rm -rf $CVSROOT_DIRNAME/ignore
+         ;;
+
+
+
+       ignore-on-branch)
+         # Test that CVS _doesn't_ ignore files on branches because they were
+         # added to the trunk.
+         mkdir ignore-on-branch; cd ignore-on-branch
+         modify_repo mkdir $CVSROOT_DIRNAME/ignore-on-branch
+
+         # create file1 & file2 on trunk
+         dotest ignore-on-branch-setup-1 "$testcvs -q co -dsetup 
ignore-on-branch" ''
+         cd setup
+         echo file1 >file1 
+         dotest ignore-on-branch-setup-2 "$testcvs -q add file1" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest ignore-on-branch-setup-3 "$testcvs -q ci -mfile1 file1" \
+"$CVSROOT_DIRNAME/ignore-on-branch/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest ignore-on-branch-setup-4 "$testcvs -q tag -b branch" 'T file1'
+         echo file2 >file2 
+         dotest ignore-on-branch-setup-5 "$testcvs -q add file2" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest ignore-on-branch-setup-6 "$testcvs -q ci -mtrunk file2" \
+"$CVSROOT_DIRNAME/ignore-on-branch/file2,v  <--  file2
+initial revision: 1\.1"
+
+         cd ..
+
+         # Check out branch.
+         #
+         # - This was the original failure case - file2 would not be flagged
+         #   with a '?'
+         dotest ignore-on-branch-1 "$testcvs -q co -rbranch ignore-on-branch" \
+'U ignore-on-branch/file1'
+         cd ignore-on-branch
+         echo file2 on branch >file2 
+         dotest ignore-on-branch-2 "$testcvs -nq update" '? file2'
+
+         # Now set up for a join.  One of the original fixes for this would
+         # print out a 'U' and a '?' during a join which added a file.
+         if $remote; then
+           dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" \
+'? file2
+T file1'
+         else
+           dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" 'T file1'
+         fi
+         dotest ignore-on-branch-4 "$testcvs -q add file2" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest ignore-on-branch-5 "$testcvs -q ci -mbranch file2" \
+"$CVSROOT_DIRNAME/ignore-on-branch/file2,v  <--  file2
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+         dotest ignore-on-branch-6 "$testcvs -q up -rbranch2" \
+"${SPROG} update: \`file2' is no longer in the repository"
+         dotest ignore-on-branch-7 "$testcvs -q up -jbranch" \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.2 of \`file2'\."
+
+         dokeep
+         cd ../..
+         rm -rf ignore-on-branch
+         modify_repo rm -rf $CVSROOT_DIRNAME/ignore-on-branch
+         ;;
+
+
+
+       binfiles)
+         # Test cvs's ability to handle binary files.
+         # List of binary file tests:
+         #   * conflicts, "cvs admin": binfiles
+         #   * branching and joining: binfiles2
+         #   * adding and removing files: binfiles3
+         #   * -k wrappers: binwrap, binwrap2, binwrap3
+         #   * "cvs import" and wrappers: binwrap, binwrap2, binwrap3
+         #   * -k option to "cvs import": none yet, as far as I know.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1; cd 1
+         dotest binfiles-1 "${testcvs} -q co first-dir" ''
+         ${AWK} 'BEGIN { printf "address@hidden", 2, 10, 137, 13, 10 }' \
+           </dev/null | ${TR} '@' '\000' >binfile.dat
+         cat binfile.dat binfile.dat >binfile2.dat
+         cd first-dir
+         cp ../binfile.dat binfile
+         dotest binfiles-2 "${testcvs} add -kb binfile" \
+"${SPROG}"' add: scheduling file `binfile'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest binfiles-3 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/binfile,v  <--  binfile
+initial revision: 1\.1"
+         cd ../..
+         mkdir 2; cd 2
+         dotest binfiles-4 "${testcvs} -q co first-dir" 'U first-dir/binfile'
+         cd first-dir
+         dotest binfiles-5 "cmp ../../1/binfile.dat binfile" ''
+         # Testing that sticky options is -kb is the closest thing we have
+         # to testing that binary files work right on non-unix machines
+         # (until there is automated testing for such machines, of course).
+         dotest binfiles-5.5 "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+
+         # Test that "-kk" does not override "-kb"
+         cd ../..
+         mkdir 2a; cd 2a
+         dotest binfiles-4 "${testcvs} -q co -kk first-dir" 'U 
first-dir/binfile'
+         cd first-dir
+         # Testing that sticky options is -kb is the closest thing we have
+         # to testing that binary files work right on non-unix machines
+         # (until there is automated testing for such machines, of course).
+         dotest binfiles-5.5 "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+
+         # Test whether the default options from the RCS file are
+         # also used when operating on files instead of whole
+         # directories
+          cd ../..
+         rm -rf 2a
+         mkdir 3; cd 3
+         dotest binfiles-5.5b0 "${testcvs} -q co first-dir/binfile" \
+'U first-dir/binfile'
+         cd first-dir
+         dotest binfiles-5.5b1 "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+         cd ../..
+         rm -rf 3
+         # test that "-kk" does not override "-kb"
+         mkdir 3; cd 3
+         dotest binfiles-5.5b2 "${testcvs} -q co -kk first-dir/binfile" \
+'U first-dir/binfile'
+         cd first-dir
+         dotest binfiles-5.5b3 "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+         cd ../..
+         rm -rf 3
+         cd 2/first-dir
+
+         cp ../../1/binfile2.dat binfile
+         dotest binfiles-6 "${testcvs} -q ci -m modify-it" \
+"$CVSROOT_DIRNAME/first-dir/binfile,v  <--  binfile
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../../1/first-dir
+         dotest binfiles-7 "${testcvs} -q update" 'U binfile'
+         dotest binfiles-8 "cmp ../binfile2.dat binfile" ''
+
+         # Now test handling of conflicts with binary files.
+         cp ../binfile.dat binfile
+         dotest binfiles-con0 "${testcvs} -q ci -m modify-it" \
+"$CVSROOT_DIRNAME/first-dir/binfile,v  <--  binfile
+new revision: 1\.3; previous revision: 1\.2"
+         cd ../../2/first-dir
+         echo 'edits in dir 2' >binfile
+         dotest binfiles-con1 "${testcvs} -q update" \
+"$SPROG update: nonmergeable file needs merge
+$SPROG update: revision 1\.3 from repository is now in binfile
+$SPROG update: file from working directory is now in \.#binfile\.1\.2
+C binfile"
+
+         dotest_fail binfiles-con1b "$testcvs -q up" "C binfile"
+
+         dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" ''
+         dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2'
+
+         cp ../../1/binfile2.dat binfile
+         dotest binfiles-con4 "$testcvs -q ci -m resolve-it" \
+"$CVSROOT_DIRNAME/first-dir/binfile,v  <--  binfile
+new revision: 1\.4; previous revision: 1\.3"
+         cd ../../1/first-dir
+         dotest binfiles-con5 "${testcvs} -q update" 'U binfile'
+
+         dotest binfiles-9 "${testcvs} -q update -A" ''
+         # "-kk" no longer does anything with "-kb"
+         dotest binfiles-10 "${testcvs} -q update -kk" ''
+         dotest binfiles-11 "${testcvs} -q update" ''
+         # "-kk" no longer does anything with "-kb"
+         dotest binfiles-12 "${testcvs} -q update -A" ''
+         dotest binfiles-13 "${testcvs} -q update -A" ''
+
+         cd ../..
+
+         mkdir 3
+         cd 3
+         dotest binfiles-13a0 "${testcvs} -q co -r HEAD first-dir" \
+'U first-dir/binfile'
+         cd first-dir
+         dotest binfiles-13a1 "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.4.*
+   Repository revision:        1\.4    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         HEAD (revision: 1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+         cd ../..
+         rm -rf 3
+
+         cd 2/first-dir
+         echo 'this file is $''RCSfile$' >binfile
+         dotest binfiles-14a "${testcvs} -Q ci -m modify-it"
+         dotest binfiles-14b "cat binfile" 'this file is $''RCSfile$'
+         # See binfiles-5.5 for discussion of -kb.
+         dotest binfiles-14c "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.5.*
+   Repository revision:        1\.5    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+         dotest binfiles-14d "${testcvs} admin -kv binfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
+done"
+         # cvs admin doesn't change the checked-out file or its sticky
+         # kopts.  There probably should be a way which does (but
+         # what if the file is modified?  And do we try to version
+         # control the kopt setting?)
+         dotest binfiles-14e "cat binfile" 'this file is $''RCSfile$'
+         dotest binfiles-14f "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.5.*
+   Repository revision:        1\.5    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+         dotest binfiles-14g "${testcvs} -q update -A" 'U binfile'
+         dotest binfiles-14h "cat binfile" 'this file is binfile,v'
+         dotest binfiles-14i "${testcvs} status binfile" \
+"===================================================================
+File: binfile                  Status: Up-to-date
+
+   Working revision:   1\.5.*
+   Repository revision:        1\.5    ${CVSROOT_DIRNAME}/first-dir/binfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kv"
+
+         # Do sticky options work when used with 'cvs update'?
+         echo "Not a binary file." > nibfile
+         dotest binfiles-sticky1 "${testcvs} -q add nibfile" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest binfiles-sticky2 "${testcvs} -q ci -m add-it nibfile" \
+"$CVSROOT_DIRNAME/first-dir/nibfile,v  <--  nibfile
+initial revision: 1\.1"
+         dotest binfiles-sticky3 "${testcvs} -q update -kb nibfile" \
+           'U nibfile'
+         dotest binfiles-sticky4 "${testcvs} -q status nibfile" \
+"===================================================================
+File: nibfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/nibfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+
+         # Now test that -A can clear the sticky option.
+         dotest binfiles-sticky5 "${testcvs} -q update -A nibfile" \
+"U nibfile"
+         dotest binfiles-sticky6 "${testcvs} -q status nibfile" \
+"===================================================================
+File: nibfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/nibfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest binfiles-15 "${testcvs} -q admin -kb nibfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v
+done"
+         dotest binfiles-16 "${testcvs} -q update nibfile" "U nibfile"
+         dotest binfiles-17 "${testcvs} -q status nibfile" \
+"===================================================================
+File: nibfile                  Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/nibfile,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+
+         dotest binfiles-o1 "${testcvs} admin -o1.3:: binfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
+deleting revision 1\.5
+deleting revision 1\.4
+done"
+         dotest binfiles-o2 "${testcvs} admin -o::1.3 binfile" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
+deleting revision 1\.2
+deleting revision 1\.1
+done"
+         dotest binfiles-o3 "${testcvs} -q log -h -N binfile" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
+Working file: binfile
+head: 1\.3
+branch:
+locks: strict
+access list:
+keyword substitution: v
+total revisions: 1
+============================================================================="
+
+         # Check that the contents were right.  This isn't the hard case
+         # (in which RCS_delete_revs does a diff), but might as well.
+         if $remote && test -z "$CVSNOBASES"; then
+           dotest_fail binfiles-o4r "$testcvs -q update binfile" \
+"$SPROG \[update aborted\]: could not find desired version 1\.5 in 
$CVSROOT_DIRNAME/first-dir/binfile,v"
+         else
+           # FIXCVS: Local mode silently overwrites what it thinks is
+           # revision 1.5 of binfile with revision 1.3 of binfile when
+           # the later revisions disappear.  This doesn't sound right.
+           # Either way, the behavior should match.
+           dotest binfiles-o4 "$testcvs -q update binfile" "U binfile"
+           dotest binfiles-o5 "cmp binfile ../../1/binfile.dat"
+         fi
+
+         dokeep
+         cd ../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf 1 2
+         ;;
+
+
+
+       binfiles2)
+         # Test cvs's ability to handle binary files, particularly branching
+         # and joining.  The key thing we are worrying about is that CVS
+         # doesn't print "cannot merge binary files" or some such, in 
+         # situations where no merging is required.
+         # See also "join" which does this with non-binary files.
+         #
+         # Cases (we are merging from the branch to the trunk):
+         # binfile.dat) File added on branch, not on trunk.
+         #      File should be marked for addition.
+         # brmod) File modified on branch, not on trunk.
+         #      File should be copied over to trunk (no merging is needed).
+         # brmod-trmod) File modified on branch, also on trunk.
+         #      This is a conflict.  Present the user with both files and
+         #      let them figure it out.
+         # brmod-wdmod) File modified on branch, not modified in the trunk
+         #      repository, but modified in the (trunk) working directory.
+         #      This is also a conflict.
+
+         modify_repo mkdir ${CVSROOT_DIRNAME}/first-dir
+         mkdir 1; cd 1
+         dotest binfiles2-1 "${testcvs} -q co first-dir" ''
+         cd first-dir
+
+         # The most important thing here is that binfile, binfile2, &c
+         # each be distinct from each other.  We also make sure to include
+         # a few likely end-of-line patterns to make sure nothing is
+         # being munged as if in text mode.
+         ${AWK} 'BEGIN { printf "address@hidden", 2, 10, 137, 13, 10 }' \
+           </dev/null | ${TR} '@' '\000' >../binfile
+         # Use binfl2 rather than binfile2 because of a problem with Cygwin
+         # and Samba. that causes cat to report that the input and output file
+         # are the same when outputting to binfile3.  Why?  I don't know, but
+         # it is consistently reproducible.
+         cat ../binfile ../binfile >../binfl2
+         cat ../binfl2 ../binfile >../binfile3
+
+         # FIXCVS: unless a branch has at least one file on it,
+         # tag_check_valid won't know it exists.  So if brmod didn't
+         # exist, we would have to invent it.
+         cp ../binfile brmod
+         cp ../binfile brmod-trmod
+         cp ../binfile brmod-wdmod
+         dotest binfiles2-1a \
+"${testcvs} add -kb brmod brmod-trmod brmod-wdmod" \
+"${SPROG} add: scheduling file .brmod. for addition
+${SPROG} add: scheduling file .brmod-trmod. for addition
+${SPROG} add: scheduling file .brmod-wdmod. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest binfiles2-1b "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/brmod,v  <--  brmod
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-wdmod,v  <--  brmod-wdmod
+initial revision: 1\.1"
+         dotest binfiles2-2 "${testcvs} -q tag -b br" 'T brmod
+T brmod-trmod
+T brmod-wdmod'
+         dotest binfiles2-3 "${testcvs} -q update -r br" ''
+         cp ../binfile binfile.dat
+         dotest binfiles2-4 "${testcvs} add -kb binfile.dat" \
+"${SPROG} add: scheduling file .binfile\.dat. for addition on branch .br.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         cp ../binfl2 brmod
+         cp ../binfl2 brmod-trmod
+         cp ../binfl2 brmod-wdmod
+         dotest binfiles2-5 "${testcvs} -q ci -m br-changes" \
+"$CVSROOT_DIRNAME/first-dir/Attic/binfile\.dat,v  <--  binfile\.dat
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod,v  <--  brmod
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-wdmod,v  <--  brmod-wdmod
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         dotest binfiles2-6 "${testcvs} -q update -A" \
+"${SPROG} update: \`binfile\.dat' is no longer in the repository
+U brmod
+U brmod-trmod
+U brmod-wdmod"
+         dotest_fail binfiles2-7 "test -f binfile.dat" ''
+         dotest binfiles2-7-brmod "cmp ../binfile brmod"
+         cp ../binfile3 brmod-trmod
+         dotest binfiles2-7a "${testcvs} -q ci -m tr-modify" \
+"$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+new revision: 1\.2; previous revision: 1\.1"
+         cp ../binfile3 brmod-wdmod
+
+         dotest binfiles2-8 "$testcvs -q update -j br" \
+"$SPROG update: scheduling addition from revision 1\.1\.2\.1 of 
\`binfile.dat'\.
+$SPROG update: Replacing \`brmod' with contents of revision 1\.1\.2\.1\.
+M brmod
+$SPROG update: Nonmergeable file needs merge\.
+$SPROG update: Replacing \`brmod-trmod' with contents of revision 1\.1\.2\.1\.
+$SPROG update: File from working directory is now in \`\.#brmod-trmod\.1\.2'\.
+C brmod-trmod
+M brmod-wdmod
+$SPROG update: Nonmergeable file needs merge\.
+$SPROG update: Replacing \`brmod-wdmod' with contents of revision 1\.1\.2\.1\.
+$SPROG update: File from working directory is now in \`\.#brmod-wdmod\.1\.1'\.
+C brmod-wdmod"
+
+         dotest binfiles2-9 "cmp ../binfile binfile.dat"
+         dotest binfiles2-9-brmod "cmp ../binfl2 brmod"
+         dotest binfiles2-9-brmod-trmod "cmp ../binfl2 brmod-trmod"
+         dotest binfiles2-9-brmod-trmod "cmp ../binfl2 brmod-wdmod"
+         dotest binfiles2-9a-brmod-trmod "cmp ../binfile3 .#brmod-trmod.1.2"
+         dotest binfiles2-9a-brmod-wdmod "cmp ../binfile3 .#brmod-wdmod.1.1"
+
+         # Test that everything was properly scheduled.
+         dotest_fail binfiles2-10a "${testcvs} -q ci -m checkin" \
+"$SPROG commit: file \`brmod-trmod' had a conflict and has not been modified
+$SPROG commit: file \`brmod-wdmod' had a conflict and has not been modified
+$SPROG \[commit aborted\]: correct above errors first!"
+
+         touch brmod-trmod brmod-wdmod
+         dotest binfiles2-10b "${testcvs} -q ci -m checkin" \
+"$CVSROOT_DIRNAME/first-dir/binfile\.dat,v  <--  binfile\.dat
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod,v  <--  brmod
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+new revision: 1\.3; previous revision: 1\.2
+$CVSROOT_DIRNAME/first-dir/brmod-wdmod,v  <--  brmod-wdmod
+new revision: 1\.2; previous revision: 1\.1"
+
+         dotest_fail binfiles2-o1 "${testcvs} -q admin -o :1.2 brmod-trmod" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
+deleting revision 1\.2
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove 
branch point 1\.1
+${SPROG} admin: RCS file for .brmod-trmod. not modified\."
+         dotest binfiles2-o2 "${testcvs} -q admin -o 1.1.2.1: brmod-trmod" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
+deleting revision 1\.1\.2\.1
+done"
+         dotest binfiles2-o3 "${testcvs} -q admin -o :1.2 brmod-trmod" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
+deleting revision 1\.2
+deleting revision 1\.1
+done"
+         dotest binfiles2-o4 "${testcvs} -q log -N brmod-trmod" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
+Working file: brmod-trmod
+head: 1\.3
+branch:
+locks: strict
+access list:
+keyword substitution: b
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+checkin
+============================================================================="
+
+         dokeep
+         cd ../..
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf 1
+         ;;
+
+
+
+       binfiles3)
+         # More binary file tests, especially removing, adding, &c.
+         # See "binfiles" for a list of binary file tests.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1; cd 1
+         dotest binfiles3-1 "${testcvs} -q co first-dir" ''
+         ${AWK} 'BEGIN { printf "address@hidden", 2, 10, 137, 13, 10 }' \
+           </dev/null | ${TR} '@' '\000' >binfile.dat
+         cd first-dir
+         echo hello >file1
+         dotest binfiles3-2 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest binfiles3-3 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         rm file1
+         dotest binfiles3-4 "${testcvs} rm file1" \
+"${SPROG} remove: scheduling .file1. for removal
+${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest binfiles3-5 "${testcvs} -q ci -m remove-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.1"
+         cp ../binfile.dat file1
+         dotest binfiles3-6 "${testcvs} add -kb file1" \
+"$SPROG add: Re-adding file .file1. after dead revision 1\.2\.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         # The idea behind this test is to make sure that the file
+         # gets opened in binary mode to send to "cvs ci".
+         dotest binfiles3-6a "cat CVS/Entries" \
+"/file1/0/[A-Za-z0-9 :]*/-kb/
+D"
+         # TODO: This just tests the case where the old keyword
+         # expansion mode is the default (RCS_getexpand == NULL
+         # in checkaddfile()); should also test the case in which
+         # we are changing it from one non-default value to another.
+         dotest binfiles3-7 "$testcvs -q ci -m readd-it" \
+"$SPROG commit: changing keyword expansion mode of \`file1' from \`-kkv' to 
\`-kb'
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+         dotest binfiles3-8 "${testcvs} -q log -h -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.3
+branch:
+locks: strict
+access list:
+keyword substitution: b
+total revisions: 3
+============================================================================="
+
+         # OK, now test admin -o on a binary file.  See "admin"
+         # test for a more complete list of admin -o tests.
+         cp ${TESTDIR}/1/binfile.dat ${TESTDIR}/1/binfile4.dat
+         echo '%%$$##@@!!jjiiuull' | ${TR} j '\000' >>${TESTDIR}/1/binfile4.dat
+         cp ${TESTDIR}/1/binfile4.dat ${TESTDIR}/1/binfile5.dat
+         echo 'aawwee%$$##@@!!jjil' | ${TR} w '\000' 
>>${TESTDIR}/1/binfile5.dat
+
+         cp ../binfile4.dat file1
+         dotest binfiles3-9 "${testcvs} -q ci -m change" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.4; previous revision: 1\.3"
+         cp ../binfile5.dat file1
+         dotest binfiles3-10 "${testcvs} -q ci -m change" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.5; previous revision: 1\.4"
+         dotest binfiles3-11 "${testcvs} admin -o 1.3::1.5 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+deleting revision 1\.4
+done"
+         dotest binfiles3-12 "${testcvs} -q update -r 1.3 file1" "U file1"
+         dotest binfiles3-13 "cmp file1 ${TESTDIR}/1/binfile.dat" ""
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       mcopy)
+         # See comment at "mwrap" test for list of other wrappers tests.
+         # Test cvs's ability to handle nonmergeable files specified with
+         # -m 'COPY' in wrappers.  Similar to the binfiles2 test,
+         # which tests the same thing for binary files
+         # (which are non-mergeable in the same sense).
+         #
+         # Cases (we are merging from the branch to the trunk):
+         # brmod) File modified on branch, not on trunk.
+         #      File should be copied over to trunk (no merging is needed).
+         # brmod-trmod) File modified on branch, also on trunk.
+         #      This is a conflict.  Present the user with both files and
+         #      let them figure it out.
+         # brmod-wdmod) File modified on branch, not modified in the trunk
+         #      repository, but modified in the (trunk) working directory.
+         #      This is also a conflict.
+
+         # For the moment, remote CVS can't pass wrappers from CVSWRAPPERS
+         # (see wrap_send).  So skip these tests for remote.
+         if $remote; then :; else
+
+           mkdir ${CVSROOT_DIRNAME}/first-dir
+           mkdir 1; cd 1
+           dotest mcopy-1 "${testcvs} -q co first-dir" ''
+           cd first-dir
+
+           # FIXCVS: unless a branch has at least one file on it,
+           # tag_check_valid won't know it exists.  So if brmod didn't
+           # exist, we would have to invent it.
+           echo 'brmod initial contents' >brmod
+           echo 'brmod-trmod initial contents' >brmod-trmod
+           echo 'brmod-wdmod initial contents' >brmod-wdmod
+           echo "* -m 'COPY'" >.cvswrappers
+           dotest mcopy-1a \
+"${testcvs} add .cvswrappers brmod brmod-trmod brmod-wdmod" \
+"${SPROG} add: scheduling file .\.cvswrappers. for addition
+${SPROG} add: scheduling file .brmod. for addition
+${SPROG} add: scheduling file .brmod-trmod. for addition
+${SPROG} add: scheduling file .brmod-wdmod. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+           dotest mcopy-1b "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/\.cvswrappers,v  <--  \.cvswrappers
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod,v  <--  brmod
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-wdmod,v  <--  brmod-wdmod
+initial revision: 1\.1"
+
+           # NOTE: .cvswrappers files are broken (see comment in
+           # src/wrapper.c).  So doing everything via the environment
+           # variable is a workaround.  Better would be to test them
+           # both.
+           CVSWRAPPERS="* -m 'COPY'"
+           export CVSWRAPPERS
+           dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
+T brmod
+T brmod-trmod
+T brmod-wdmod'
+           dotest mcopy-3 "${testcvs} -q update -r br" ''
+           echo 'modify brmod on br' >brmod
+           echo 'modify brmod-trmod on br' >brmod-trmod
+           echo 'modify brmod-wdmod on br' >brmod-wdmod
+           dotest mcopy-5 "${testcvs} -q ci -m br-changes" \
+"$CVSROOT_DIRNAME/first-dir/brmod,v  <--  brmod
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-wdmod,v  <--  brmod-wdmod
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+           dotest mcopy-6 "${testcvs} -q update -A" \
+"U brmod
+U brmod-trmod
+U brmod-wdmod"
+           dotest mcopy-7 "cat brmod brmod-trmod brmod-wdmod" \
+"brmod initial contents
+brmod-trmod initial contents
+brmod-wdmod initial contents"
+
+           echo 'modify brmod-trmod again on trunk' >brmod-trmod
+           dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \
+"$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+new revision: 1\.2; previous revision: 1\.1"
+           echo 'modify brmod-wdmod in working dir' >brmod-wdmod
+
+           dotest mcopy-8 "$testcvs -q update -j br" \
+"$SPROG update: Replacing \`brmod' with contents of revision 1\.1\.2\.1\.
+M brmod
+$SPROG update: nonmergeable file needs merge
+$SPROG update: revision 1.1.2.1 from repository is now in brmod-trmod
+$SPROG update: file from working directory is now in .#brmod-trmod.1.2
+C brmod-trmod
+M brmod-wdmod
+$SPROG update: nonmergeable file needs merge
+$SPROG update: revision 1.1.2.1 from repository is now in brmod-wdmod
+$SPROG update: file from working directory is now in .#brmod-wdmod.1.1
+C brmod-wdmod"
+
+           dotest mcopy-9 "cat brmod brmod-trmod brmod-wdmod" \
+"modify brmod on br
+modify brmod-trmod on br
+modify brmod-wdmod on br"
+           dotest mcopy-9a "cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1" \
+"modify brmod-trmod again on trunk
+modify brmod-wdmod in working dir"
+
+           # Test that everything was properly scheduled.
+           dotest mcopy-10 "${testcvs} -q ci -m checkin" \
+"$CVSROOT_DIRNAME/first-dir/brmod,v  <--  brmod
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/brmod-trmod,v  <--  brmod-trmod
+new revision: 1\.3; previous revision: 1\.2
+$CVSROOT_DIRNAME/first-dir/brmod-wdmod,v  <--  brmod-wdmod
+new revision: 1\.2; previous revision: 1\.1"
+
+           dokeep
+           cd ../..
+           modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+           rm -r 1
+           unset CVSWRAPPERS
+         fi # end of tests to be skipped for remote
+         ;;
+
+
+
+       binwrap)
+         # Test the ability to specify binary-ness based on file name.
+         # See "mwrap" for a list of other wrappers tests.
+
+         mkdir dir-to-import
+         cd dir-to-import
+         touch foo.c foo.exe
+
+         # While we're here, test for rejection of duplicate tag names.
+         dotest_fail binwrap-0 \
+           "${testcvs} import -m msg -I ! first-dir dup dup" \
+"${CPROG} \[import aborted\]: tag .dup. was specified more than once"
+
+         if ${testcvs} import -m message -I ! -W "*.exe -k 'b'" \
+             first-dir tag1 tag2 >>${LOGFILE}; then
+           pass binwrap-1
+         else
+           fail binwrap-1
+         fi
+         cd ..
+         rm -r dir-to-import
+         dotest binwrap-2 "${testcvs} -q co first-dir" 'U first-dir/foo.c
+U first-dir/foo.exe'
+         dotest binwrap-3 "${testcvs} -q status first-dir" \
+"===================================================================
+File: foo\.c                   Status: Up-to-date
+
+   Working revision:   1\.1\.1\.1.*
+   Repository revision:        1\.1\.1\.1      
${CVSROOT_DIRNAME}/first-dir/foo\.c,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: foo\.exe                 Status: Up-to-date
+
+   Working revision:   1\.1\.1\.1.*
+   Repository revision:        1\.1\.1\.1      
${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+
+         dokeep
+         rm -rf first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       binwrap2)
+         # Test the ability to specify binary-ness based on file name.
+         # See "mwrap" for a list of other wrappers tests.
+
+         mkdir dir-to-import
+         cd dir-to-import
+         touch foo.c foo.exe
+
+         # Specify that all files are binary except *.c.
+         # The order seems to matter, with the earlier rules taking
+         # precedence.  I'm not sure whether that is good or not,
+         # but it is the current behavior.
+         if ${testcvs} import -m message -I ! \
+             -W "*.c -k 'o'" -W "* -k 'b'" \
+             first-dir tag1 tag2 >>${LOGFILE}; then
+           pass binwrap2-1
+         else
+           fail binwrap2-1
+         fi
+         cd ..
+         rm -r dir-to-import
+         dotest binwrap2-2 "${testcvs} -q co first-dir" 'U first-dir/foo.c
+U first-dir/foo.exe'
+         dotest binwrap2-3 "${testcvs} -q status first-dir" \
+"===================================================================
+File: foo\.c                   Status: Up-to-date
+
+   Working revision:   1\.1\.1\.1.*
+   Repository revision:        1\.1\.1\.1      
${CVSROOT_DIRNAME}/first-dir/foo\.c,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -ko
+
+===================================================================
+File: foo\.exe                 Status: Up-to-date
+
+   Working revision:   1\.1\.1\.1.*
+   Repository revision:        1\.1\.1\.1      
${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     -kb"
+
+         dokeep
+         rm -rf first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+        binwrap3)
+          # Test communication of file-specified -k wrappers between
+          # client and server, in `import':
+          #
+          #   1. Set up a directory tree, populate it with files.
+          #   2. Give each directory a different .cvswrappers file. 
+          #   3. Give the server its own .cvswrappers file.
+          #   4. Import the whole tree, see if the right files got set
+          #      to binary.
+          #
+          # The tree has a top ("0th") level, and two subdirs, sub1/
+          # and sub2/; sub2/ contains directory subsub/.  Every
+          # directory has a .cvswrappers file as well as regular
+          # files.
+          #
+          # In the file names, "foo-b.*" should end up binary, and
+          # "foo-t.*" should end up text.  Don't worry about the two
+          # letter extensions; they're just there to help me keep
+          # things straight.
+          #
+          # Here's the directory tree:
+          #
+          # ./
+          #    .cvswrappers
+          #    foo-b.c0
+          #    foo-b.sb
+          #    foo-t.c1
+          #    foo-t.st
+          #
+          #    sub1/             sub2/
+          #      .cvswrappers      .cvswrappers
+          #      foo-b.c1          foo-b.sb
+          #      foo-b.sb          foo-b.st
+          #      foo-t.c0          foo-t.c0
+          #      foo-t.st          foo-t.c1
+          #                        foo-t.c2
+          #                        foo-t.c3
+          #
+          #                        subsub/
+          #                          .cvswrappers
+          #                          foo-b.c3
+          #                          foo-b.sb
+          #                          foo-t.c0
+          #                          foo-t.c1
+          #                          foo-t.c2
+          #                          foo-t.st
+
+          binwrap3_line1="This is a test file "
+          binwrap3_line2="containing little of use "
+          binwrap3_line3="except this non-haiku"
+
+          binwrap3_text="${binwrap3_line1}${binwrap3_line2}${binwrap3_line3}"
+
+          cd ${TESTDIR}
+
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir wnt
+         cd wnt
+
+          mkdir binwrap3 # the 0th dir
+          mkdir binwrap3/sub1
+          mkdir binwrap3/sub2
+          mkdir binwrap3/sub2/subsub
+          
+          echo "bar*" > binwrap3/.cvswrappers
+          echo "*.c0 -k 'b'" >> binwrap3/.cvswrappers
+          echo "whatever -k 'b'" >> binwrap3/.cvswrappers
+          echo ${binwrap3_text} > binwrap3/foo-b.c0
+          echo ${binwrap3_text} > binwrap3/bar-t.c0
+          echo ${binwrap3_text} > binwrap3/foo-b.sb
+          echo ${binwrap3_text} > binwrap3/foo-t.sb
+          echo ${binwrap3_text} > binwrap3/foo-t.c1
+          echo ${binwrap3_text} > binwrap3/foo-t.st
+
+          echo "bar* -k 'kv'" > binwrap3/sub1/.cvswrappers
+          echo "*.c1 -k 'b'" >> binwrap3/sub1/.cvswrappers
+          echo "whatever -k 'b'" >> binwrap3/sub1/.cvswrappers
+          echo ${binwrap3_text} > binwrap3/sub1/foo-b.c1
+          echo ${binwrap3_text} > binwrap3/sub1/bar-t.c1
+          echo ${binwrap3_text} > binwrap3/sub1/foo-b.sb
+          echo ${binwrap3_text} > binwrap3/sub1/foo-t.sb
+          echo ${binwrap3_text} > binwrap3/sub1/foo-t.c0
+          echo ${binwrap3_text} > binwrap3/sub1/foo-t.st
+
+          echo "bar*" > binwrap3/sub2/.cvswrappers
+          echo "*.st -k 'b'" >> binwrap3/sub2/.cvswrappers
+          echo ${binwrap3_text} > binwrap3/sub2/foo-b.sb
+          echo ${binwrap3_text} > binwrap3/sub2/foo-t.sb
+          echo ${binwrap3_text} > binwrap3/sub2/foo-b.st
+          echo ${binwrap3_text} > binwrap3/sub2/bar-t.st
+          echo ${binwrap3_text} > binwrap3/sub2/foo-t.c0
+          echo ${binwrap3_text} > binwrap3/sub2/foo-t.c1
+          echo ${binwrap3_text} > binwrap3/sub2/foo-t.c2
+          echo ${binwrap3_text} > binwrap3/sub2/foo-t.c3
+
+          echo "bar* -k 'kv'" > binwrap3/sub2/subsub/.cvswrappers
+          echo "*.c3 -k 'b'" >> binwrap3/sub2/subsub/.cvswrappers
+          echo "foo -k 'b'" >> binwrap3/sub2/subsub/.cvswrappers
+          echo "c0* -k 'b'" >> binwrap3/sub2/subsub/.cvswrappers
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-b.c3
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/bar-t.c3
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-b.sb
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.sb
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c0
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c1
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.c2
+          echo ${binwrap3_text} > binwrap3/sub2/subsub/foo-t.st
+
+          # Now set up CVSROOT/cvswrappers, the easy way:
+         dotest binwrap3-1 "${testcvs} -q co CVSROOT" "U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+          # This destroys anything currently in cvswrappers, but
+         # presumably other tests will take care of it themselves if
+         # they use cvswrappers:
+         echo "foo-t.sb" > cvswrappers
+         echo "foo*.sb  -k 'b'" >> cvswrappers
+         dotest binwrap3-2 "${testcvs} -q ci -m cvswrappers-mod" \
+"$CVSROOT_DIRNAME/CVSROOT/cvswrappers,v  <--  cvswrappers
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+          cd ..
+
+          # Avoid environmental interference
+          CVSWRAPPERS_save=${CVSWRAPPERS}
+          unset CVSWRAPPERS
+
+          # Do the import
+          cd binwrap3
+         # Not importing .cvswrappers tests whether the client is really
+         # letting the server know "honestly" whether the file is binary,
+         # rather than just letting the server see the .cvswrappers file.
+          dotest binwrap3-2a \
+"${testcvs} import -m . -I .cvswrappers binwrap3 tag1 tag2" \
+"[NI] ${DOTSTAR}"
+
+         # OK, now test "cvs add".
+          cd ..
+         rm -r binwrap3
+          dotest binwrap3-2b "${testcvs} co binwrap3" "${DOTSTAR}"
+          cd binwrap3
+         cd sub2
+         echo "*.newbin -k 'b'" > .cvswrappers
+         echo .cvswrappers >.cvsignore
+         echo .cvsignore >>.cvsignore
+         touch file1.newbin file1.txt
+         dotest binwrap3-2c "${testcvs} add file1.newbin file1.txt" \
+"${SPROG} add: scheduling file .file1\.newbin. for addition
+${SPROG} add: scheduling file .file1\.txt. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest binwrap3-2d "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/binwrap3/sub2/file1\.newbin,v  <--  file1\.newbin
+initial revision: 1\.1
+$CVSROOT_DIRNAME/binwrap3/sub2/file1\.txt,v  <--  file1\.txt
+initial revision: 1\.1"
+         cd ..
+
+          # Now check out the module and see which files are binary.
+          cd ..
+         rm -rf binwrap3
+          dotest binwrap3-3 "${testcvs} co binwrap3" "${DOTSTAR}"
+          cd binwrap3
+
+          # Running "cvs status" and matching output is too
+          # error-prone, too likely to falsely fail.  Instead, we'll
+          # just grep the Entries lines:
+
+          dotest binwrap3-top1 "grep foo-b.c0 ./CVS/Entries" \
+                 "/foo-b.c0/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-top2 "grep foo-b.sb ./CVS/Entries" \
+                 "/foo-b.sb/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-top3 "grep foo-t.c1 ./CVS/Entries" \
+                 "/foo-t.c1/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-top4 "grep foo-t.st ./CVS/Entries" \
+                 "/foo-t.st/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-top5 "grep foo-t.sb ./CVS/Entries" \
+                 "/foo-t.sb/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-top6 "grep bar-t.c0 ./CVS/Entries" \
+                 "/bar-t.c0/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub1-1 "grep foo-b.c1 sub1/CVS/Entries" \
+                 "/foo-b.c1/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-sub1-2 "grep foo-b.sb sub1/CVS/Entries" \
+                 "/foo-b.sb/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-sub1-3 "grep foo-t.c0 sub1/CVS/Entries" \
+                 "/foo-t.c0/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub1-4 "grep foo-t.st sub1/CVS/Entries" \
+                 "/foo-t.st/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub1-5 "grep foo-t.sb sub1/CVS/Entries" \
+                 "/foo-t.sb/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub1-6 "grep bar-t.c1 sub1/CVS/Entries" \
+                 "/bar-t.c1/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub2-1 "grep foo-b.sb sub2/CVS/Entries" \
+                 "/foo-b.sb/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-sub2-2 "grep foo-b.st sub2/CVS/Entries" \
+                 "/foo-b.st/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-sub2-3 "grep foo-t.c0 sub2/CVS/Entries" \
+                 "/foo-t.c0/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub2-4 "grep foo-t.c1 sub2/CVS/Entries" \
+                 "/foo-t.c1/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub2-5 "grep foo-t.c2 sub2/CVS/Entries" \
+                 "/foo-t.c2/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub2-6 "grep foo-t.c3 sub2/CVS/Entries" \
+                 "/foo-t.c3/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub2-7 "grep foo-t.sb sub2/CVS/Entries" \
+                 "/foo-t.sb/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-sub2-8 "grep bar-t.st sub2/CVS/Entries" \
+                 "/bar-t.st/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-subsub1 "grep foo-b.c3 sub2/subsub/CVS/Entries" \
+                 "/foo-b.c3/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-subsub2 "grep foo-b.sb sub2/subsub/CVS/Entries" \
+                 "/foo-b.sb/1.1.1.1/[A-Za-z0-9         :]*/-kb/"
+
+          dotest binwrap3-subsub3 "grep foo-t.c0 sub2/subsub/CVS/Entries" \
+                 "/foo-t.c0/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-subsub4 "grep foo-t.c1 sub2/subsub/CVS/Entries" \
+                 "/foo-t.c1/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-subsub5 "grep foo-t.c2 sub2/subsub/CVS/Entries" \
+                 "/foo-t.c2/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-subsub6 "grep foo-t.st sub2/subsub/CVS/Entries" \
+                 "/foo-t.st/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-subsub7 "grep foo-t.sb sub2/subsub/CVS/Entries" \
+                 "/foo-t.sb/1.1.1.1/[A-Za-z0-9         :]*//"
+
+          dotest binwrap3-subsub8 "grep bar-t.c3 sub2/subsub/CVS/Entries" \
+                 "/bar-t.c3/1.1.1.1/[A-Za-z0-9         :]*//"
+
+         dotest binwrap3-sub2-add1 "grep file1.newbin sub2/CVS/Entries" \
+           "/file1.newbin/1.1/[A-Za-z0-9       :]*/-kb/"
+         dotest binwrap3-sub2-add2 "grep file1.txt sub2/CVS/Entries" \
+           "/file1.txt/1.1/[A-Za-z0-9  :]*//"
+
+          # Restore and clean up
+         dokeep
+          cd ..
+         rm -rf binwrap3 CVSROOT
+         cd ..
+         rm -r wnt
+         modify_repo rm -rf $CVSROOT_DIRNAME/binwrap3
+          CVSWRAPPERS=${CVSWRAPPERS_save}
+          ;;
+
+
+
+       mwrap)
+         # Tests of various wrappers features:
+         # -m 'COPY' and cvs update: mwrap
+         # -m 'COPY' and joining: mcopy
+         # -k: binwrap, binwrap2
+         # -t/-f: hasn't been written yet.
+         # 
+         # Tests of different ways of specifying wrappers:
+         # CVSROOT/cvswrappers: mwrap
+         # -W: binwrap, binwrap2
+         # .cvswrappers in working directory, local: mcopy
+         # CVSROOT/cvswrappers, .cvswrappers remote: binwrap3
+         # CVSWRAPPERS environment variable: mcopy
+
+         # This test is similar to binfiles-con1; -m 'COPY' specifies
+         # non-mergeableness the same way that -kb does.
+
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir wnt
+         cd wnt
+
+         dotest mwrap-c1 "${testcvs} -q co CVSROOT" "U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+         echo "* -m 'COPY'" >>cvswrappers
+         dotest mwrap-c2 "${testcvs} -q ci -m wrapper-mod" \
+"$CVSROOT_DIRNAME/CVSROOT/cvswrappers,v  <--  cvswrappers
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+         mkdir m1; cd m1
+         dotest mwrap-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest mwrap-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch aa
+         dotest mwrap-3 "${testcvs} add aa" \
+"${SPROG} add: scheduling file .aa. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest mwrap-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+initial revision: 1\.1"
+         cd ../..
+         mkdir m2; cd m2
+         dotest mwrap-5 "${testcvs} -q co first-dir" "U first-dir/aa"
+         cd first-dir
+         echo "changed in m2" >aa
+         dotest mwrap-6 "${testcvs} -q ci -m m2-mod" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../..
+         cd m1/first-dir
+         echo "changed in m1" >aa
+           dotest mwrap-7 "$testcvs -nq update" \
+"$SPROG update: nonmergeable file needs merge
+$SPROG update: revision 1\.2 from repository is now in aa
+$SPROG update: file from working directory is now in \.#aa\.1\.1
+C aa"
+         dotest mwrap-8 "$testcvs -q update" \
+"$SPROG update: nonmergeable file needs merge
+$SPROG update: revision 1\.2 from repository is now in aa
+$SPROG update: file from working directory is now in \.#aa\.1\.1
+C aa"
+         dotest mwrap-9 "cat aa" "changed in m2"
+         dotest mwrap-10 "cat .#aa.1.1" "changed in m1"
+
+         dokeep
+         restore_adm
+         cd ../..
+         rm -rf CVSROOT
+         rm -rf m1 m2
+         cd ..
+         rm -r wnt
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       info)
+         # Administrative file tests.
+         # Here is a list of where each administrative file is tested:
+         # loginfo: info
+         # modules: modules, modules2, modules3
+         # cvsignore: ignore
+         # verifymsg: info
+         # cvswrappers: mwrap
+         # taginfo: taginfo
+         # posttag: posttag
+         # postadmin: admin
+         # postwatch: devcom3
+         # config: config
+         # config2: MinCompressionLevel and MaxCompressionLevel in config
+
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir wnt
+         cd wnt
+
+         dotest info-1 "$testcvs -q co CVSROOT" "U CVSROOT${DOTSTAR}"
+         cd CVSROOT
+         dotest info-2 "$testcvs -Q tag info-start"
+         sed -e's/%p/ALL/' <loginfo >tmploginfo
+         mv tmploginfo loginfo
+         echo "ALL sh -c \"echo 
x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$COMMITID=\$SESSIONID=\$CVSROOT= 
>>$TESTDIR/testlog; cat >/dev/null\"" >> loginfo
+          # The following cases test the format string substitution
+          echo "ALL echo %{} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %x >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo % >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %{sxVv} >>$TESTDIR/testlog2; cat >/dev/null" >> 
loginfo
+          echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %s %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \
+            >> loginfo
+         sed -e's/^UseNewInfoFmtStrings=yes$/#&/' <config >tmpconfig
+         mv tmpconfig config
+
+         # Might be nice to move this to crerepos tests; it should
+         # work to create a loginfo file if you didn't create one
+         # with "cvs init".
+         : dotest info-2 "$testcvs add loginfo" \
+"$SPROG add: scheduling file \`loginfo' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+
+         dotest_fail info-3 "$testcvs -q ci -m new-loginfo" \
+"$TESTDIR/cvsroot/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$CVSROOT_DIRNAME/CVSROOT/loginfo,v  <--  loginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=MYENV}
+$SPROG \[commit aborted\]: Unknown format character in info file ('').
+Info files are the hook files, verifymsg, taginfo, commitinfo, etc\."
+         cd ..
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest info-5 "$testcvs -q co first-dir" ''
+         cd first-dir
+         touch file1
+         dotest info-6 "$testcvs add file1" \
+"$SPROG add: scheduling file \`file1' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+         echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
+         dotest info-6b "$testcvs -q -s OTHER=value ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary .1. in
+all info files after each .%. which doesn.t represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\." \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary .1. in
+all info files after each .%. which doesn.t represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\.
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
+         echo line0 >>file1
+         dotest info-6c "$testcvs -q -sOTHER=foo ci -m mod-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary .1. in
+all info files after each .%. which doesn.t represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\." \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary .1. in
+all info files after each .%. which doesn.t represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\.
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
+         echo line1 >>file1
+         dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary .1. in
+all info files after each .%. which doesn.t represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+
+         cd ..
+         dotest info-9 "cat $TESTDIR/testlog" \
+"xenv-valueyz=${username}=${commitid}=${commitid}=${CVSROOT_DIRNAME}="
+          dotest info-10 "cat $TESTDIR/testlog2" \
+'first-dir
+first-dir
+first-dir
+first-dir file1,,NONE,1.1
+first-dir 1.1
+first-dir file1 %s
+first-dir NONEAX
+first-dir file1ux
+first-dir
+first-dir
+first-dir
+first-dir file1,,1.1,1.2
+first-dir 1.2
+first-dir file1 %s
+first-dir 1.1AX
+first-dir file1ux
+first-dir
+first-dir
+first-dir
+first-dir file1,,1.2,1.3
+first-dir 1.3
+first-dir file1 %s
+first-dir 1.2AX
+first-dir file1ux'
+
+         # and make sure adding a '1' in the format strings really does ensure
+         # ensure backwards compatibility.
+         #
+         # these tests are identical to the above except for the loginfo setup
+         # and the project name
+         cd CVSROOT
+         dotest info-setup-intfmt-1 "$testcvs -q up -prinfo-start config 
>config"
+         dotest info-setup-intfmt-2 "$testcvs -q up -prinfo-start loginfo 
>loginfo"
+         sed -e's/%p/ALL/' <loginfo >tmploginfo
+         mv tmploginfo loginfo
+         echo "ALL sh -c \"echo 
x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat 
>/dev/null\"" >> loginfo
+          # The following cases test the format string substitution
+          echo "ALL echo %1{} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %1x >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %1 >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %1{sxVv} >>$TESTDIR/testlog2; cat >/dev/null" >> 
loginfo
+          echo "ALL echo %1{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %1s %%s >>$TESTDIR/testlog2; cat >/dev/null" >> 
loginfo
+          echo "ALL echo %1{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> 
loginfo
+          echo "third-dir echo %1sux >>$TESTDIR/testlog2; cat >/dev/null" \
+            >> loginfo
+
+         dotest info-setup-intfmt-2 "${testcvs} -q -s ZEE=garbage ci -m 
nuke-admin-for-info-intfmt" \
+"$TESTDIR/cvsroot/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$TESTDIR/cvsroot/CVSROOT/loginfo,v  <--  loginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary .1. in
+all info files after each .%. which doesn.t represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+         cd ..
+
+         # delete the logs now so the results look more like the last tests
+         # (they won't include the config file update)
+         rm ${TESTDIR}/testlog ${TESTDIR}/testlog2
+
+         modify_repo mkdir $CVSROOT_DIRNAME/third-dir
+         dotest info-intfmt-5 "${testcvs} -q co third-dir" ''
+         cd third-dir
+         touch file1
+         dotest info-intfmt-6 "${testcvs} add file1" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
+         dotest info-intfmt-6b "${testcvs} -q -s OTHER=value ci -m add-it" \
+"${TESTDIR}/cvsroot/third-dir/file1,v  <--  file1
+initial revision: 1\.1
+${SPROG} commit: loginfo:[0-9]*: no such user variable \${=ZEE}
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\."
+         echo line0 >>file1
+         dotest info-intfmt-6c "${testcvs} -q -sOTHER=foo ci -m mod-it" \
+"${TESTDIR}/cvsroot/third-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+${SPROG} commit: loginfo:[0-9]*: no such user variable \${=ZEE}
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\."
+         echo line1 >>file1
+         dotest info-intfmt-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m 
mod-it" \
+"${TESTDIR}/cvsroot/third-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\.
+${SPROG} commit: Using deprecated info format strings\.  Convert your scripts 
to use
+the new argument format and remove '1's from your info file format strings\."
+
+         cd ..
+         dotest info-intfmt-9 "cat $TESTDIR/testlog" 
"xenv-valueyz=${username}=${TESTDIR}/cvsroot="
+          dotest info-intfmt-10 "cat $TESTDIR/testlog2" \
+'third-dir
+third-dir
+third-dir
+third-dir file1,,NONE,1.1
+third-dir 1.1
+third-dir file1 %s
+third-dir NONEAX
+third-dir file1ux
+third-dir
+third-dir
+third-dir
+third-dir file1,,1.1,1.2
+third-dir 1.2
+third-dir file1 %s
+third-dir 1.1AX
+third-dir file1ux
+third-dir
+third-dir
+third-dir
+third-dir file1,,1.2,1.3
+third-dir 1.3
+third-dir file1 %s
+third-dir 1.2AX
+third-dir file1ux'
+
+         rm ${TESTDIR}/testlog ${TESTDIR}/testlog2
+
+         # test the new format strings too
+         cd CVSROOT
+         dotest info-setup-newfmt-1 "$testcvs -q up -prinfo-start loginfo 
>loginfo"
+         echo "ALL sh -c \"echo 
x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat 
>/dev/null\" %{sVv}" >> loginfo
+          # The following cases test the format string substitution
+          echo "ALL echo %p \"%{sTVv}\" >>$TESTDIR/testlog2; cat >/dev/null" 
>> loginfo
+          echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
+          echo "second-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" >> 
loginfo
+         dotest info-setup-newfmt-2 "$testcvs -q -s ZEE=garbage ci -m 
nuke-admin-for-info-newfmt" \
+"${CVSROOT_DIRNAME}/CVSROOT/loginfo,v  <--  loginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+${SPROG} commit: Rebuilding administrative file database"
+         cd ..
+
+         # delete the logs now so the results look more like the last tests
+         # (they won't include the config file update)
+         rm ${TESTDIR}/testlog ${TESTDIR}/testlog2
+
+         modify_repo mkdir $CVSROOT_DIRNAME/fourth-dir
+         dotest info-newfmt-1 "${testcvs} -q co fourth-dir" ''
+         cd fourth-dir
+         touch file1
+         dotest info-newfmt-2 "${testcvs} add file1" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
+         dotest info-newfmt-3 "$testcvs -q -s OTHER=value ci -m add-it" \
+"$TESTDIR/cvsroot/fourth-dir/file1,v  <--  file1
+initial revision: 1\.1
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
+         echo line0 >>file1
+         dotest info-newfmt-4 "$testcvs -q -sOTHER=foo ci -m mod-it" \
+"$TESTDIR/cvsroot/fourth-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$SPROG commit: loginfo:[0-9]*: no such user variable \${=ZEE}"
+         echo line1 >>file1
+         dotest info-newfmt-5 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m 
mod-it" \
+"${TESTDIR}/cvsroot/fourth-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+
+         cd ..
+         dotest info-newfmt-6 "cat $TESTDIR/testlog" \
+"xenv-valueyz=${username}=${TESTDIR}/cvsroot="
+          dotest info-newfmt-7 "cat $TESTDIR/testlog2" \
+'fourth-dir file1  NONE 1\.1
+1\.1
+file1
+NONEAX
+fourth-dir file1  1\.1 1\.2
+1\.2
+file1
+1\.1AX
+fourth-dir file1  1\.2 1\.3
+1\.3
+file1
+1\.2AX'
+
+         # clean up after newfmt tests
+         cd CVSROOT
+         dotest info-cleanup-newfmt-1 "$testcvs -q up -prinfo-start loginfo 
>loginfo"
+         dotest info-cleanup-newfmt-2 "$testcvs -q ci -m nuke-loginfo" \
+"$CVSROOT_DIRNAME/CVSROOT/loginfo,v  <--  loginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         # clean up the logs
+         rm ${TESTDIR}/testlog ${TESTDIR}/testlog2
+
+         # Now test verifymsg
+         cat >${TESTDIR}/vscript <<EOF
+#!${TESTSHELL}
+echo vscript "\$@"
+if sed 1q < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
+    exit 0
+elif sed 1q < \$1 | grep '^BugId:[ ]*new$' > /dev/null; then
+    echo A new bugid was found. >> \$1
+    exit 0
+else
+    echo "No BugId found."
+    sleep 1
+    exit 1
+fi
+EOF
+         cat >${TESTDIR}/vscript2 <<EOF
+#!${TESTSHELL}
+echo vscript2 "\$@"
+if test -f CVS/Repository; then
+       repo=\`cat CVS/Repository\`
+else
+       repo=\`pwd\`
+fi
+echo \$repo
+if echo "\$repo" |grep yet-another/ >/dev/null 2>&1; then
+       exit 1
+else
+       exit 0
+fi
+EOF
+         # Grumble, grumble, mumble, search for "Cygwin".
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x ${TESTDIR}/vscript*"
+         else
+           chmod +x ${TESTDIR}/vscript*
+         fi
+         echo "^first-dir/yet-another\\(/\\|\$\\) ${TESTDIR}/vscript2 %l 
%{sV}" >verifymsg
+         echo "^first-dir\\(/\\|\$\\) ${TESTDIR}/vscript %l %{sV}" >>verifymsg
+         echo "^missing-script\$ ${TESTDIR}/bogus %l" >>verifymsg
+         echo "^missing-var\$ ${TESTDIR}/vscript %l \${=Bogus}" >>verifymsg
+         # first test the directory independant verifymsg
+         dotest info-v1 "${testcvs} -q ci -m add-verification" \
+"$CVSROOT_DIRNAME/CVSROOT/verifymsg,v  <--  verifymsg
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ../first-dir
+         echo line2 >>file1
+         dotest_fail info-v2 "${testcvs} -q ci -m bogus" \
+"vscript $tempname file1 1\.3
+No BugId found\.
+${SPROG} \[commit aborted\]: Message verification failed"
+
+         cat >${TESTDIR}/comment.tmp <<EOF
+BugId: 42
+and many more lines after it
+EOF
+         dotest info-v3 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
+"vscript $tempname file1 1\.3
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.4; previous revision: 1\.3"
+         rm ${TESTDIR}/comment.tmp
+
+         cd ..
+         mkdir another-dir
+         cd another-dir
+         touch file2
+         dotest_fail info-v4 \
+           "${testcvs} import -m bogus first-dir/another x y" \
+"vscript $tempname - Imported sources NONE
+No BugId found\.
+${SPROG} \[import aborted\]: Message verification failed"
+
+         # now verify that directory dependent verifymsgs work
+         dotest info-v5 \
+           "${testcvs} import -m bogus first-dir/yet-another x y" \
+"vscript2 $tempname - Imported sources NONE
+$TESTDIR/wnt/another-dir
+N first-dir/yet-another/file2
+
+No conflicts created by this import" \
+"vscript2 $tempname - Imported sources NONE
+$CVSROOT_DIRNAME/first-dir/yet-another
+N first-dir/yet-another/file2
+
+No conflicts created by this import"
+
+         # FIXCVS
+         #
+         # note that in the local case the error message is the same as
+         # info-v5
+         #
+         # This means that the verifymsg scripts cannot reliably and
+         # consistantly obtain information on which directory is being
+         # committed to.  Thus it is currently useless for them to be
+         # running in every dir.  They should either be run once or
+         # directory information should be passed.
+         if $remote; then
+           dotest_fail info-v6r \
+             "${testcvs} import -m bogus first-dir/yet-another/and-another x 
y" \
+"vscript2 $tempname - Imported sources NONE
+$CVSROOT_DIRNAME/first-dir/yet-another/and-another
+$SPROG \[import aborted\]: Message verification failed"
+         else
+           dotest info-v6 \
+             "${testcvs} import -m bogus first-dir/yet-another/and-another x 
y" \
+"vscript2 $tempname - Imported sources NONE
+$TESTDIR/wnt/another-dir
+N first-dir/yet-another/and-another/file2
+
+No conflicts created by this import"
+         fi
+
+         # check that errors invoking the script cause verification failure
+         #
+         # The second text below occurs on Cygwin, where I assume execvp
+         # does not return to let CVS print the error message when its
+         # argument does not exist.
+         dotest_fail info-v7 "${testcvs} import -m bogus missing-script x y" \
+"${SPROG} import: cannot exec ${TESTDIR}/bogus: No such file or directory
+${SPROG} \[import aborted\]: Message verification failed" \
+"${SPROG} \[import aborted\]: Message verification failed"
+
+         dotest_fail info-v8 "${testcvs} import -m bogus missing-var x y" \
+"${SPROG} import: verifymsg:4: no such user variable \${=Bogus}
+${SPROG} \[import aborted\]: Message verification failed"
+
+         rm file2
+         cd ..
+         rmdir another-dir
+
+         cd CVSROOT
+         echo "RereadLogAfterVerify=always" >>config
+         dotest info-rereadlog-1 "${testcvs} -q ci -m 
add-RereadLogAfterVerify=always" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../first-dir
+         echo line3 >>file1
+         cat >${TESTDIR}/comment.tmp <<EOF
+BugId: new
+See what happens next.
+EOF
+         dotest info-reread-2 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
+"vscript $tempname file1 1\.4
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.5; previous revision: 1\.4"
+         dotest info-reread-3 "${testcvs} -q log -N -r1.5 file1" "
+.*
+BugId: new
+See what happens next.
+A new bugid was found.
+============================================================================="
+
+         cd ../CVSROOT
+         grep -v "RereadLogAfterVerify" config > config.new
+         mv config.new config
+         echo "RereadLogAfterVerify=stat" >>config
+         dotest info-reread-4 \
+"$testcvs -q ci -m add-RereadLogAfterVerify=stat" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../first-dir
+         echo line4 >>file1
+         cat >${TESTDIR}/comment.tmp <<EOF
+BugId: new
+See what happens next with stat.
+EOF
+         dotest info-reread-5 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
+"vscript $tempname file1 1\.5
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.6; previous revision: 1\.5"
+         dotest info-reread-6 "${testcvs} -q log -N -r1.6 file1" "
+.*
+BugId: new
+See what happens next with stat.
+A new bugid was found.
+============================================================================="
+
+         cd ../CVSROOT
+         grep -v "RereadLogAfterVerify" config > config.new
+         mv config.new config
+         echo "RereadLogAfterVerify=never" >>config
+         dotest info-reread-7 \
+"$testcvs -q ci -m add-RereadLogAfterVerify=never" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../first-dir
+         echo line5 >>file1
+         cat >${TESTDIR}/comment.tmp <<EOF
+BugId: new
+See what happens next.
+EOF
+         dotest info-reread-8 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
+"vscript $tempname file1 1\.6
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.7; previous revision: 1\.6"
+         dotest info-reread-6 "${testcvs} -q log -N -r1.7 file1" "
+.*
+BugId: new
+See what happens next.
+============================================================================="
+
+         cd ../CVSROOT
+         dotest info-reread-cleanup-1 "$testcvs -q up -prinfo-start config 
>config"
+         # Append the NULL format string until we remove the deprecation
+         # warning for lack of format strings.
+         echo 'DEFAULT false %n' >verifymsg
+         echo 'DEFAULT true %n' >>verifymsg
+         dotest info-multdef "${testcvs} -q ci -m multdef" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$CVSROOT_DIRNAME/CVSROOT/verifymsg,v  <--  verifymsg
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ../CVSROOT
+         dotest info-reread--cleanup-1 \
+"$testcvs -q up -prinfo-start verifymsg >verifymsg"
+         dotest info-cleanup-verifymsg "$testcvs -q ci -m nuke-verifymsg" \
+"$SPROG commit: Multiple .DEFAULT. lines (1 and 2) in verifymsg file
+$CVSROOT_DIRNAME/CVSROOT/verifymsg,v  <--  verifymsg
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         dokeep
+         rm ${TESTDIR}/vscript*
+         cd ..
+
+         dotest info-cleanup-0 "$testcvs -n release -d CVSROOT" \
+"You have \[0\] altered files in this repository\."
+
+         dotest info-cleanup-1 \
+"echo yes |${testcvs} -q release -d CVSROOT >/dev/null"
+         dotest info-cleanup-2 \
+"echo yes |${testcvs} -q release -d first-dir >/dev/null"
+         dotest info-cleanup-3 \
+"echo yes |${testcvs} -q release -d third-dir >/dev/null"
+         dotest info-cleanup-4 \
+"echo yes |${testcvs} -q release -d fourth-dir >/dev/null"
+
+         dokeep
+         cd ..
+         rm -r wnt
+         rm $HOME/.cvsrc
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/third-dir \
+                            $CVSROOT_DIRNAME/fourth-dir
+         ;;
+
+
+
+       taginfo)
+         # Tests of the CVSROOT/taginfo file.  See the comment at the
+         # "info" tests for a full list of administrative file tests.
+
+         # all the oldfmt stuff can come out once we finish deprecating
+         # the old info file command line format stuff.
+         #
+         # grep the code for SUPPORT_OLD_INFO_FMT_STRINGS and see the stuff
+         # in configure.in about oldinfoformatsupport
+
+         mkdir 1; cd 1
+         dotest taginfo-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
+         cd CVSROOT
+         dotest taginfo-init-2 "$testcvs -Q tag taginfo-start"
+         cat >$TESTDIR/1/loggit <<EOF
+#!$TESTSHELL
+if test "\$1" = rejectme; then
+  exit 1
+else
+  echo "\$@" >>$TESTDIR/1/taglog
+  exit 0
+fi
+EOF
+         # #^@&!^@ Cygwin.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x ${TESTDIR}/1/loggit"
+         else
+           chmod +x ${TESTDIR}/1/loggit
+         fi
+         echo "ALL ${TESTDIR}/1/loggit" >>taginfo
+         sed -e's/^UseNewInfoFmtStrings=yes$/#&/' <config >tmpconfig
+         mv tmpconfig config
+         sed -e's/%p/ALL/' <loginfo >tmploginfo
+         mv tmploginfo loginfo
+         dotest taginfo-2 "${testcvs} -q ci -m check-in-taginfo" \
+"$TESTDIR/cvsroot/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$CVSROOT_DIRNAME/CVSROOT/loginfo,v  <--  loginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$CVSROOT_DIRNAME/CVSROOT/taginfo,v  <--  taginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+
+         # taginfo-3 used to rely on the top-level CVS directory
+         # being created to add "first-dir" to the repository.  Since
+         # that won't happen anymore, we create the directory in the
+         # repository.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest taginfo-3 "$testcvs -q co first-dir"
+
+         cd first-dir
+         echo first >file1
+         dotest taginfo-4 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest taginfo-5 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary '1' in
+all info files after each '%' which doesn't represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+         dotest taginfo-6 "${testcvs} -q tag tag1" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+T file1"
+         dotest taginfo-7 "${testcvs} -q tag -b br" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+T file1"
+         dotest taginfo-8 "$testcvs -q update -r br"
+         echo add text on branch >>file1
+         dotest taginfo-9 "${testcvs} -q ci -m modify-on-br" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary '1' in
+all info files after each '%' which doesn't represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+         dotest taginfo-10 "${testcvs} -q tag -F -c brtag" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+T file1"
+
+         dotest_fail taginfo-11 "${testcvs} -q tag rejectme" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+${SPROG} tag: Pre-tag check failed
+${SPROG} \[tag aborted\]: correct the above errors first!"
+
+         # When we are using taginfo to allow/disallow, it would be
+         # convenient to be able to use "cvs -n tag" to test whether
+         # the allow/disallow functionality is working as expected.
+         dotest taginfo-12 "${testcvs} -nq tag rejectme" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+T file1"
+
+         # But when taginfo is used for logging, it is a pain for -n
+         # to call taginfo, since taginfo doesn't know whether -n was
+         # specified or not.
+         dotest taginfo-13 "${testcvs} -nq tag would-be-tag" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+T file1"
+
+         # Deleting: the cases are basically either the tag existed,
+         # or it didn't exist.
+         dotest taginfo-14 "${testcvs} -q tag -d tag1" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\.
+D file1"
+         dotest taginfo-15 "${testcvs} -q tag -d tag1" \
+"${SPROG} tag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\."
+
+         # Likewise with rtag.
+         dotest taginfo-16 "${testcvs} -q rtag tag1 first-dir" \
+"${SPROG} rtag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\."
+         dotest taginfo-17 "${testcvs} -q rtag -d tag1 first-dir" \
+"${SPROG} rtag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\."
+         dotest taginfo-18 "${testcvs} -q rtag -d tag1 first-dir" \
+"${SPROG} rtag: warning: taginfo line contains no format strings:
+    \"${TESTDIR}/1/loggit\"
+Filling in old defaults ('%t %o %p %{sv}'), but please be aware that this
+usage is deprecated\."
+
+         # The "br" example should be passing 1.1.2 or 1.1.0.2.
+         # But it turns out that is very hard to implement, since
+         # check_fileproc doesn't know what branch number it will
+         # get.  Probably the whole thing should be re-architected
+         # so that taginfo only allows/denies tagging, and a new
+         # hook, which is done from tag_fileproc, does logging.
+         # That would solve this, some more subtle races, and also
+         # the fact that it is nice for users to run "-n tag foo" to
+         # see whether a tag would be allowed.  Failing that,
+         # I suppose passing "1.1.branch" or "branch" for "br"
+         # would be an improvement.
+         dotest taginfo-examine-1 "cat ${TESTDIR}/1/taglog" \
+"tag1 add first-dir file1 1\.1
+br add first-dir file1 1\.1
+brtag mov first-dir file1 1\.1\.2\.1
+tag1 del first-dir file1 1\.1
+tag1 del first-dir
+tag1 add first-dir file1 1\.1
+tag1 del first-dir file1 1\.1
+tag1 del first-dir"
+
+         # now that we've tested the default operation, try a new
+         # style fmt string.
+         rm $TESTDIR/1/taglog
+         cd ..
+         cd CVSROOT
+         dotest taginfo-newfmt-init-1 \
+"$testcvs -q up -prtaginfo-start taginfo >taginfo"
+         echo "ALL $TESTDIR/1/loggit %r %t %o %b %p %{sTVv}" >>taginfo
+         dotest taginfo-newfmt-init-2 "$testcvs -q ci -m check-in-taginfo" \
+"$TESTDIR/cvsroot/CVSROOT/taginfo,v  <--  taginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"  \
+"$TESTDIR/cvsroot/CVSROOT/taginfo,v  <--  taginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary '1' in
+all info files after each '%' which doesn't represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+
+         cat >${TESTDIR}/1/loggit <<EOF
+#!${TESTSHELL}
+if test "\$1" = rejectme; then
+  exit 1
+else
+  while test "\$#" -gt 0; do
+    echo "\$1" >>${TESTDIR}/1/taglog
+    shift
+  done
+  exit 0
+fi
+EOF
+
+         cd ..
+         cd first-dir
+         dotest taginfo-newfmt-2 "${testcvs} -q update -A" "U file1"
+         echo "bull pucky" >'file 2'
+         dotest taginfo-newfmt-2b "${testcvs} add 'file 2'" \
+"${SPROG} add: scheduling file .file 2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest taginfo-newfmt-2c "$testcvs -q ci -m add-it" \
+"$TESTDIR/cvsroot/first-dir/file 2,v  <--  file 2
+initial revision: 1\.1" \
+"$TESTDIR/cvsroot/first-dir/file 2,v  <--  file 2
+initial revision: 1\.1
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary '1' in
+all info files after each '%' which doesn't represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+
+         dotest taginfo-newfmt-3 "${testcvs} -q tag tag1" \
+"T file 2
+T file1"
+         dotest taginfo-newfmt-4 "${testcvs} -q tag tag3" \
+"T file 2
+T file1"
+         dotest taginfo-newfmt-5 "$testcvs -q tag -rtag1 tag4" \
+"T file 2
+T file1"
+
+         dotest taginfo-newfmt-examine-1 "cat ${TESTDIR}/1/taglog" \
+"$TESTDIR/cvsroot
+tag1
+add
+N
+first-dir
+file 2
+
+NONE
+1\.1
+file1
+
+NONE
+1\.1
+$TESTDIR/cvsroot
+tag3
+add
+N
+first-dir
+file 2
+
+NONE
+1\.1
+file1
+
+NONE
+1\.1
+$TESTDIR/cvsroot
+tag4
+add
+N
+first-dir
+file 2
+tag1
+NONE
+1\.1
+file1
+tag1
+NONE
+1\.1"
+
+         # now update to use the new format strings (really, disable support
+         # of the old format) and run the whole gamut of tests again.
+         rm ${TESTDIR}/1/taglog
+         cd ..
+         cd CVSROOT
+         cat >${TESTDIR}/1/loggit <<EOF
+#!${TESTSHELL}
+if test "\$1" = rejectme; then
+  exit 1
+else
+  echo "\$@" >>${TESTDIR}/1/taglog
+  exit 0
+fi
+EOF
+         dotest taginfo-newfmt-init-7 \
+"$testcvs -q up -prtaginfo-start taginfo >taginfo"
+         echo "ALL ${TESTDIR}/1/loggit %{t} %b %{o} %p %{sTVv}" >>taginfo
+         echo "UseNewInfoFmtStrings=yes" >>config
+         dotest taginfo-newfmt-7 "$testcvs -q ci -m check-in-taginfo" \
+"$TESTDIR/cvsroot/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$TESTDIR/cvsroot/CVSROOT/taginfo,v  <--  taginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database" \
+"$TESTDIR/cvsroot/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$TESTDIR/cvsroot/CVSROOT/taginfo,v  <--  taginfo
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database
+$SPROG commit: warning:  Set to use deprecated info format strings\.  Establish
+compatibility with the new info file format strings (add a temporary '1' in
+all info files after each '%' which doesn't represent a literal percent)
+and set UseNewInfoFmtStrings=yes in CVSROOT/config\.  After that, convert
+individual command lines and scripts to handle the new format at your
+leisure\."
+
+         cd ../first-dir
+         dotest taginfo-newfmt-8 "${testcvs} -q tag tag1" ""
+         mkdir sdir
+         dotest taginfo-newfmt-8b "${testcvs} -q add sdir" \
+"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+         touch sdir/file3
+         dotest taginfo-newfmt-8c "${testcvs} -q add sdir/file3" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest taginfo-newfmt-8d "${testcvs} -q ci -m added-sdir" \
+"${TESTDIR}/cvsroot/first-dir/sdir/file3,v  <--  sdir/file3
+initial revision: 1\.1"
+         dotest taginfo-newfmt-9 "${testcvs} -q tag -b br" \
+"T file 2
+W file1 : br already exists on branch 1\.1\.2\.1 : NOT MOVING tag to branch 
1\.1\.0\.4
+T sdir/file3"
+         dotest taginfo-newfmt-10 "${testcvs} -q update -r br" "U file1"
+         echo add more text on branch >>file1
+         dotest taginfo-newfmt-11 "${testcvs} -q ci -m modify-on-br" \
+"${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1"
+         dotest taginfo-newfmt-12 "${testcvs} -q tag -F -c brtag" \
+"T file 2
+T file1
+T sdir/file3"
+
+         # we are being called once for each directory.  I'm not sure
+         # I like this, but I'm also not sure how hard it would be to change,
+         # It seems like it would be more trouble than it is really worth
+         # to let a partial tag go through...
+         dotest_fail taginfo-newfmt-13 "${testcvs} -q tag rejectme" \
+"${SPROG} tag: Pre-tag check failed
+${SPROG} tag: Pre-tag check failed
+${SPROG} \[tag aborted\]: correct the above errors first!"
+
+         # When we are using taginfo to allow/disallow, it would be
+         # convenient to be able to use "cvs -n tag" to test whether
+         # the allow/disallow functionality is working as expected.
+         # see the comment before taginfo-newfmt-15 for notes on
+         # pretag and posttag proc
+         dotest taginfo-newfmt-14 "${testcvs} -nq tag rejectme" \
+"T file 2
+T file1
+T sdir/file3"
+
+         # But when taginfo is used for logging, it is a pain for -n
+         # to call taginfo, since taginfo doesn't know whether -n was
+         # specified or not. (this could be fixed pretty easily now
+         # with a new fmt string.  i suppose it would be better to
+         # have a pretag proc and a posttag proc, though.)
+         dotest taginfo-newfmt-15 "${testcvs} -nq tag would-be-tag" \
+"T file 2
+T file1
+T sdir/file3"
+
+         # Deleting: the cases are basically either the tag existed,
+         # or it didn't exist.
+         dotest taginfo-newfmt-16 "${testcvs} -q tag -d tag1" \
+"D file 2
+D file1"
+         dotest taginfo-newfmt-17 "${testcvs} -q tag -d tag1" ""
+
+         # Likewise with rtag.
+         dotest taginfo-newfmt-18 "${testcvs} -q rtag tag1 first-dir" ""
+         dotest taginfo-newfmt-19 "${testcvs} -q rtag -d tag1 first-dir" ""
+         dotest taginfo-newfmt-20 "${testcvs} -q rtag -d tag1 first-dir" ""
+
+         # The "br" example should be passing 1.1.2 or 1.1.0.2.
+         # But it turns out that is very hard to implement, since
+         # check_fileproc doesn't know what branch number it will
+         # get.  Probably the whole thing should be re-architected
+         # so that taginfo only allows/denies tagging, and a new
+         # hook, which is done from tag_fileproc, does logging.
+         # That would solve this, some more subtle races, and also
+         # the fact that it is nice for users to run "-n tag foo" to
+         # see whether a tag would be allowed.  Failing that,
+         # I suppose passing "1.1.branch" or "branch" for "br"
+         # would be an improvement.
+         dotest taginfo-newfmt-examine-2 "cat ${TESTDIR}/1/taglog" \
+"tag1 N add first-dir
+br T add first-dir file 2  NONE 1\.1
+br T add first-dir/sdir file3  NONE 1\.1
+brtag N mov first-dir file 2 br NONE 1\.1 file1 br 1\.1\.2\.1 1\.1\.2\.2
+brtag N mov first-dir/sdir file3 br NONE 1\.1
+tag1 ? del first-dir file 2 br 1\.1 1\.1 file1 br 1\.1 1\.1
+tag1 ? del first-dir/sdir
+tag1 ? del first-dir
+tag1 ? del first-dir/sdir
+tag1 N add first-dir file 2  NONE 1\.1 file1  NONE 1\.1
+tag1 N add first-dir/sdir file3  NONE 1\.1
+tag1 ? del first-dir file 2  1\.1 1\.1 file1  1\.1 1\.1
+tag1 ? del first-dir/sdir file3  1\.1 1\.1
+tag1 ? del first-dir
+tag1 ? del first-dir/sdir"
+
+         dokeep
+         restore_adm
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       posttag)
+         # Tests of the CVSROOT/taginfo file.  See the comment at the
+         # "info" tests for a full list of administrative file tests.
+
+         mkdir 1; cd 1
+
+         dotest posttag-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
+
+         # now that we've tested the default operation, try a new
+         # style fmt string.
+         cd CVSROOT
+         echo "ALL $TESTDIR/1/loggit %r %t %o %b %p %{sVv}" >posttag
+         dotest posttag-init-2 "$testcvs -q ci -m check-in-taginfo" \
+"$TESTDIR/cvsroot/CVSROOT/posttag,v  <--  posttag
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ..
+
+         cat >$TESTDIR/1/loggit <<EOF
+#!$TESTSHELL
+if test "\$1" = rejectme; then
+    error=:
+else
+    error=false
+fi
+
+while [ -n "\$1" ]; do
+    echo "\$1" >>$TESTDIR/1/taglog
+    shift
+done
+
+if \$error; then
+  exit 1
+fi
+exit 0
+EOF
+         # #^@&!^@ Cygwin.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x $TESTDIR/1/loggit"
+         else
+           chmod +x $TESTDIR/1/loggit
+         fi
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest posttag-init-3 "$testcvs -q co first-dir"
+
+         cd first-dir
+         echo first >file1
+         echo "bull pucky" >'file 2'
+         dotest posttag-init-4 "$testcvs add file1 'file 2'" \
+"$SPROG add: scheduling file \`file1' for addition
+$SPROG add: scheduling file \`file 2' for addition
+$SPROG add: use \`$SPROG commit' to add these files permanently"
+         dotest posttag-init-5 "$testcvs -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file 2,v  <--  file 2
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+         dotest posttag-1 "$testcvs -q tag tag1" \
+"T file 2
+T file1"
+         dotest posttag-2 "$testcvs -q tag tag3" \
+"T file 2
+T file1"
+
+         dotest posttag-3 "$testcvs -q tag rejectme" \
+"T file 2
+T file1"
+
+         dotest posttag-4 "$testcvs -q tag -d rejectme" \
+"D file 2
+D file1"
+
+         dotest posttag-examine-1 "cat $TESTDIR/1/taglog" \
+"$TESTDIR/cvsroot
+tag1
+add
+N
+first-dir
+file 2
+NONE
+1\.1
+file1
+NONE
+1\.1
+$TESTDIR/cvsroot
+tag3
+add
+N
+first-dir
+file 2
+NONE
+1\.1
+file1
+NONE
+1\.1
+$TESTDIR/cvsroot
+rejectme
+add
+N
+first-dir
+file 2
+NONE
+1.1
+file1
+NONE
+1.1
+$TESTDIR/cvsroot
+rejectme
+del
+?
+first-dir
+file 2
+1.1
+1.1
+file1
+1.1
+1.1"
+
+         dokeep
+         cd ../..
+         restore_adm
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       config)
+         # Tests of the CVSROOT/config file.  See the comment at the
+         # "info" tests for a full list of administrative file tests.
+
+         # See note in keywordexpand about config errors from a proxied
+         # primary.
+         if $noredirect; then
+           notnoredirect config
+           continue
+         fi
+
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir wnt
+         cd wnt
+
+         dotest config-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
+         cd CVSROOT
+         dotest config-init-2 "$testcvs -Q tag config-start"
+         echo 'bogus line' >>config
+         dotest config-3 "$testcvs -q ci -m change-to-bogus-line" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         dotest config-3a "$testcvs -Q update -jHEAD -jconfig-start" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
syntax error: missing \`=' between keyword and value"
+         echo 'BogusOption=yes' >>config
+         if $proxy; then
+           dotest config-4p "$testcvs -q ci -m change-to-bogus-opt" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[99\]: syntax 
error: missing \`=' between keyword and value
+$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[99\]: syntax error: missing 
\`=' between keyword and value
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         else
+           dotest config-4 "$testcvs -q ci -m change-to-bogus-opt" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[1-9][0-9]*\]: 
syntax error: missing \`=' between keyword and value
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         fi
+
+         if $proxy; then
+           : # FIXME: don't try in proxy mode
+         else
+           # Now test the HistoryLogPath and HistorySearchPath options.
+           mkdir $TESTDIR/historylogs
+           echo >config \
+                'HistoryLogPath=$CVSROOT/../historylogs/%Y-%m-%d-%H-%M-%S'
+           echo 'HistorySearchPath=$CVSROOT/../historylogs/*' >>config
+
+           # The warning is left over from the previous test.
+           dotest config-5 "$testcvs -q ci -m set-HistoryLogPath" \
+"$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[98\]: unrecognized keyword 
\`BogusOption'
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+           echo '# noop' >> config
+           dotest config-6 "$testcvs -q ci -mlog-commit" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+           sleep 1
+           echo '# noop' >> config
+           dotest config-7 "$testcvs -q ci -mlog-commit" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+           # The log entry was intentionally split across multiple files.
+           dotest config-8 "ls -l $TESTDIR/historylogs/*" \
+"-rw-rw-r--.*$TESTDIR/historylogs/2[0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]-[0-2][0-9]-[0-5][0-9]-[0-5][0-9]
+-rw-rw-r--.*$TESTDIR/historylogs/2[0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]-[0-2][0-9]-[0-5][0-9]-[0-5][0-9]"
+
+           # Should still see both commits.
+           if $remote; then
+             dotest config-9r "$testcvs history -ea" \
+"M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == <remote>
+M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == <remote>"
+           else
+             dotest config-9 "$testcvs history -ea" \
+"M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == 
$TESTDIR/wnt/CVSROOT
+M [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.[0-9]* config CVSROOT == 
$TESTDIR/wnt/CVSROOT"
+           fi
+
+           # Remove this now to see what kind of error messages we get.
+           rm -r $TESTDIR/historylogs
+         fi
+
+         dokeep
+         restore_adm
+         cd ../..
+         rm -rf wnt
+         ;;
+
+
+
+       config2)
+         # Tests of the CVSROOT/config file.  See the comment at the
+         # "info" tests for a full list of administrative file tests.
+
+         # No point in testing compression effects in local mode.
+          if $remote; then :; else
+            remoteonly config2
+           continue
+         fi
+
+         # On Windows, we can't check out CVSROOT, because the case
+         # insensitivity means that this conflicts with cvsroot.
+         mkdir wnt
+         cd wnt
+
+         # Set MinCompressionLevel and MaxCompressionLevel in config.
+         dotest config2-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
+         dotest config2-init-1b "$testcvs -Q tag initial"
+         cd CVSROOT
+         cat << EOF >> config
+MinCompressionLevel=5
+MaxCompressionLevel=6
+EOF
+         dotest config2-init-2 \
+"$testcvs -q ci -m set-compression-constraints" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         # Verify that the server reports forcing compression to an allowed
+         # level.
+
+         # Too high.
+         dotest config2-1 "$testcvs -z9 update" \
+"$SPROG server: Forcing compression level 6 (allowed: 5 <= z <= 6)\.
+$SPROG update: Updating \."
+         # Too low.
+         dotest config2-2 "$testcvs -z1 update" \
+"$SPROG server: Forcing compression level 5 (allowed: 5 <= z <= 6)\.
+$SPROG update: Updating \."
+         # From zero.
+         dotest config2-3 "$testcvs update" \
+"$SPROG server: Forcing compression level 5 (allowed: 5 <= z <= 6)\.
+$SPROG update: Updating \."
+         # Just right.
+         dotest config2-3 "$testcvs -z5 update" \
+"$SPROG update: Updating \."
+
+         # Check that compression may be forced to 0.
+         dotest config2-init-2b "$testcvs -z5 up -jHEAD -jinitial" "$DOTSTAR"
+         cat << EOF >> config
+MaxCompressionLevel=0
+EOF
+         dotest config2-init-3 "$testcvs -qz5 ci -m no-compression" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         # Too high.
+         dotest config2-5 "$testcvs -z9 update" \
+"$SPROG server: Forcing compression level 0 (allowed: 0 <= z <= 0)\.
+$SPROG update: Updating \."
+         # Just right.
+         dotest config2-6 "$testcvs update" \
+"$SPROG update: Updating \."
+
+         # And verify effect without restrictions.
+         dotest config2-init-3b "$testcvs up -jHEAD -jinitial" "$DOTSTAR"
+         dotest config2-init-4 "$testcvs -q ci -m change-to-comment" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         dotest config2-7 "$testcvs update" \
+"$SPROG update: Updating \."
+
+         dokeep
+         restore_adm
+         cd ../..
+         rm -rf wnt
+         ;;
+
+
+
+       config3)
+         # Verify comments, white space, & [rootspecs] in CVSROOT/config
+         #
+         # `cvs server' `-c' option tested in `server' test
+         modify_repo mkdir $CVSROOT_DIRNAME/config3
+         mkdir config3
+         cd config3
+
+         dotest config3-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
+         cd CVSROOT
+
+         # I break the usual sanity.sh indentation standard for here-docs
+         # mostly to test that leading white-space is now ignored.
+         dotest config3-init-1b "$testcvs -Q tag initial-config"
+
+         cat <<EOF >>config
+             # Ignore a comment with leading spaces.
+             GLOBAL-BAD-OPTION=WWW
+ 
+             [/ignore/this/root]
+             [/and/this/one]
+                 IGNORED-BAD-OPTION=YYY
+EOF
+         dotest config3-init-2 \
+"$testcvs -q ci -m test-root-specs" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ..
+         dotest config3-1 "$testcvs co config3" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: 
unrecognized keyword \`GLOBAL-BAD-OPTION'
+$SPROG checkout: Updating config3"
+
+         cd CVSROOT
+         dotest config3-init-2a "$testcvs -Q up -jHEAD -jinitial-config" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: 
unrecognized keyword \`GLOBAL-BAD-OPTION'"
+
+         cat <<EOF >>config
+             # Ignore a comment with leading spaces.
+
+             [/ignore/this/root]
+             [/and/this/one]
+                 IGNORED-BAD-OPTION=YYY
+                 # Ignore a comment with leading spaces.
+
+             [/some/other/root]
+
+             # Comments and blank lines do not affect fall-through behavior.
+
+             [$CVSROOT_DIRNAME]
+             [$SECONDARY_CVSROOT_DIRNAME]
+
+             # Comments and blank lines do not affect fall-through behavior.
+
+             [/yet/another/root]
+                 # Ignore a comment with leading spaces.
+                 PROCESS-BAD-OPTION=XXX
+EOF
+         dotest config3-init-3 \
+"$testcvs -q ci -m test-root-specs" \
+"$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized 
keyword \`GLOBAL-BAD-OPTION'
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: 
unrecognized keyword \`GLOBAL-BAD-OPTION'
+$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized 
keyword \`GLOBAL-BAD-OPTION'
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ..
+         dotest config3-2 "$testcvs co config3" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: 
unrecognized keyword \`PROCESS-BAD-OPTION'
+$SPROG checkout: Updating config3"
+
+         # The next few tests make sure both global options and root
+         # specific options are processed by setting the history log and
+         # search paths in different locations and then verifying that
+         # both registered.  It also verifies that a key for a different
+         # root is ignored.
+         cd CVSROOT
+         dotest config3-init-3a "$testcvs -Q up -jHEAD -jinitial-config" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: 
unrecognized keyword \`PROCESS-BAD-OPTION'"
+
+         cat <<EOF >>config
+             HistoryLogPath=$TESTDIR/historylog
+
+             [/ignore/this/root]
+             [/and/this/one]
+                 IGNORED-BAD-OPTION=YYY
+
+             [/some/other/root]
+             [$CVSROOT_DIRNAME]
+             [$SECONDARY_CVSROOT_DIRNAME]
+             [/yet/another/root]
+                 HistorySearchPath=$TESTDIR/historylog
+
+             [/ignore/another/root]
+             [/and/this/one/too]
+                 ANOTHER-IGNORED-BAD-OPTION=ZZZ
+
+             [$CVSROOT_DIRNAME]
+             [$SECONDARY_CVSROOT_DIRNAME]
+                 LogHistory=TMAR
+EOF
+         dotest config3-init-4 \
+"$testcvs -q ci -m test-root-specs" \
+"$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized 
keyword \`PROCESS-BAD-OPTION'
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database" \
+"$SPROG [a-z]*: $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: 
unrecognized keyword \`PROCESS-BAD-OPTION'
+$SPROG [a-z]*: $CVSROOT_DIRNAME/CVSROOT/config \[[0-9]*\]: unrecognized 
keyword \`PROCESS-BAD-OPTION'
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cd ..
+         dotest config3-3 "$testcvs co -d config3-2 config3" \
+"$SPROG checkout: Updating config3-2"
+
+         cd config3-2
+         touch newfile
+         dotest config3-4 "$testcvs -Q add newfile"
+         dotest config3-5 "$testcvs -q ci -madd-file" \
+"$CVSROOT_DIRNAME/config3/newfile,v  <--  newfile
+initial revision: 1\.1"
+
+         dotest config3-6 "$testcvs rtag testtag config3" \
+"$SPROG rtag: Tagging config3"
+
+         cd ..
+         dotest config3-7 "$testcvs history -ea" \
+"A [0-9-]* [0-9:]* ${PLUS}0000 $username 1\.1 newfile config3 == 
[-_/a-zA-Z0-9<>]*
+T [0-9-]* [0-9:]* ${PLUS}0000 $username config3 \[testtag:A\]"
+
+         dokeep
+         restore_adm
+         cd ..
+         rm -rf config3
+         modify_repo rm -rf $CVSROOT_DIRNAME/config3
+         ;;
+
+
+
+       config4)
+         # TmpDir
+         mkdir config4
+         cd config4
+
+         dotest config4-init-1 "$testcvs -q co CVSROOT" "U CVSROOT/$DOTSTAR"
+         cd CVSROOT
+         mkdir $TESTDIR/config4/tmp
+         echo "TmpDir=$TESTDIR/config4/tmp" >>config
+         echo "DEFAULT $TESTDIR/config4/verify %l" >>verifymsg
+         dotest config4-init-2 "$testcvs -q ci -m change-tmpdir" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$CVSROOT_DIRNAME/CVSROOT/verifymsg,v  <--  verifymsg
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         cat >$TESTDIR/config4/verify <<EOF
+#! /bin/sh
+echo \$1
+exit 0
+EOF
+         chmod a+x $TESTDIR/config4/verify
+         dotest config4-1 \
+"$testcvs -q ci -fmtest-tmpdir config" \
+"$TESTDIR/config4/tmp/$tempfile
+$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         dokeep
+         restore_adm
+         cd ../..
+         rm -rf config4
+         modify_repo rm -rf $CVSROOT_DIRNAME/config4
+         ;;
+
+
+
+       compression)
+         # Try to reproduce some old compression buffer problems.
+
+         # No point in testing compression effects in local mode.
+          if $remote; then :; else
+            remoteonly config2
+           continue
+         fi
+
+         mkdir compression; cd compression
+         dotest compression-init1 "$testcvs -z6 -Q co -l -d toplevel ."
+         cd toplevel
+         mkdir compression
+         dotest compression-init2 "$testcvs -z6 -Q add compression"
+         cd ..
+
+         dotest compression-init3 "$testcvs -z6 -q co compression"
+         cd compression
+
+         # Want a big file
+         cat >big_file <<EOF
+a lot of data on a line to make a really big file once it is copied, copied,
+copied, the digital equivalent of a mile.
+EOF
+         # 1..14 creates about a 1MB file, the minimum required on the system
+         # I initially tested this on.  1..16 creates about a 4MB file.
+         for a in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
+           cat big_file >tmp
+           cat big_file >>tmp
+           mv tmp big_file
+         done
+
+         dotest compression-1 "$testcvs -z6 -Q add big_file"
+
+         # The following command hung due to a bug in CVS 1.12.13.  This was
+         # because the command that grabbed more data to uncompress from the
+         # underlying buffer in zlib.c:compress_buffer_input would try to read
+         # the amount of data actually needed by the caller, even though this
+         # should be shorter in the underlying buffer (since it is
+         # compressed).  e.g., if the caller wanted 5 bytes, there may only be
+         # 3 bytes in the underlying buffer though it will uncompress to 5
+         # bytes, and a blocking read looking for 5 bytes will block
+         # indefinitely since the data will never become available.
+         #
+         # The only odd thing is that it worked at all, sometimes.  For
+         # example, I needed big_file to be at least 1MB in size to reproduce
+         # this here (for a in 1..14 - I used 1..16 above just 4 good measure
+         # - this compresses to c. 26k and should handle up 2 a c. 16k pg sz).
+         # My guess is that this has something to do with the amount the file
+         # gets compressed and how much other data preceded it in the data
+         # stream - the current buffer read will read as much data as is
+         # available, up to the system page size, in blocking or nonblocking
+         # modes.  So, when the compressed data is much less than the system
+         # page size, it is cached in full from previous reads and the
+         # blocking read request for more than the available data is never
+         # made.  The smallest file I could reproduce this with above
+         # compressed to just under 7k, on a system with a 4k page size.  In
+         # this case, the call to compress_buffer_input decompressed all the
+         # available buffered data, causing a read request for maybe half a
+         # megabyte, with only 3k left to read, and the server blocked
+         # waiting for the nonexistent data.  The same could happen with a
+         # smaller file if its compressed data happened to cross a page
+         # boundry or if timing issues caused a similar effect.
+         dotest compression-2 "$testcvs -z6 -q ci -mForce-zerror." \
+"$CVSROOT_DIRNAME/compression/big_file,v  <--  big_file
+initial revision: 1\.1"
+
+         dokeep
+         cd ../..
+         rm -r compression
+         modify_repo rm -rf $CVSROOT_DIRNAME/compression
+         ;;
+
+
+
+       serverpatch)
+         # Test remote CVS handling of unpatchable files.  This isn't
+         # much of a test for local CVS.
+         # We test this with some keyword expansion games, but the situation
+         # also arises if the user modifies the file while CVS is running.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         mkdir 1
+         cd 1
+         dotest serverpatch-1 "$testcvs -q co first-dir"
+
+         cd first-dir
+
+         # Add a file with an RCS keyword.
+         echo '$''Name$' > file1
+         echo '1' >> file1
+         dotest serverpatch-2 "$testcvs add file1" \
+"$SPROG add: scheduling file \`file1' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+
+         dotest serverpatch-3 "$testcvs -Q commit -m add"
+
+         # Tag the file.
+         dotest serverpatch-4 "${testcvs} -q tag tag file1" 'T file1'
+
+         # Check out a tagged copy of the file.
+         cd ../..
+         mkdir 2
+         cd 2
+         dotest serverpatch-5 "${testcvs} -q co -r tag first-dir" \
+'U first-dir/file1'
+
+         # Remove the tag.  This will leave the tag string in the
+         # expansion of the Name keyword.
+         dotest serverpatch-6 "${testcvs} -q update -A first-dir" ''
+
+         # Modify and check in the first copy.
+         cd ../1/first-dir
+         echo '2' >> file1
+         dotest serverpatch-7 "$testcvs -Q ci -mx file1"
+
+         # Now update the second copy.  When using remote CVS, the
+         # patch will fail, forcing the file to be refetched.
+         cd ../../2/first-dir
+         dotest serverpatch-8 "$testcvs -q update" 'U file1' \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       log)
+         # Test selecting revisions with cvs log.
+         # See also log2 tests for more tests.
+         # See also branches-14.3 for logging with a branch off of a branch.
+         # See also multibranch-14 for logging with several branches off the
+         #   same branchpoint.
+         # Tests of each option to cvs log:
+         #   -h: admin-19a-log
+         #   -N: log, log2, admin-19a-log
+         #   -b, -r: log
+         #   -d: logopt, rcs
+         #   -s: logopt, rcs3
+         #   -R: logopt, rcs3
+         #   -w, -t: not tested yet (TODO)
+
+         # Check in a file with a few revisions and branches.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest log-1 "$testcvs -q co first-dir"
+         cd first-dir
+         echo 'first revision' > file1
+         echo 'first revision' > file2
+         dotest log-2 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+
+         # While we're at it, check multi-line comments, input from file,
+         # and trailing whitespace trimming
+         echo 'line 1     '     >${TESTDIR}/comment.tmp
+         echo '     '          >>${TESTDIR}/comment.tmp
+         echo 'line 2  '       >>${TESTDIR}/comment.tmp
+         echo '        '       >>${TESTDIR}/comment.tmp
+         echo '          '     >>${TESTDIR}/comment.tmp
+         dotest log-3 "${testcvs} -q commit -F ${TESTDIR}/comment.tmp" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         rm -f ${TESTDIR}/comment.tmp
+
+         echo 'second revision' > file1
+         echo 'second revision' > file2
+         dotest log-4 "${testcvs} -q ci -m2 file1 file2" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.2; previous revision: 1\.1"
+
+         dotest log-5 "${testcvs} -q tag -b branch file1" 'T file1'
+         dotest log-5a "${testcvs} -q tag tag1 file2" 'T file2'
+
+         echo 'third revision' > file1
+         echo 'third revision' > file2
+         dotest log-6 "${testcvs} -q ci -m3 file1 file2" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.3; previous revision: 1\.2"
+
+         dotest log-6a "${testcvs} -q tag tag2 file2" 'T file2'
+
+         dotest log-7 "${testcvs} -q update -r branch" \
+"U file1
+${SPROG} update: \`file2' is no longer in the repository"
+
+         echo 'first branch revision' > file1
+         dotest log-8 "${testcvs} -q ci -m1b file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2\.2\.1; previous revision: 1\.2"
+
+         dotest log-9 "${testcvs} -q tag tag file1" 'T file1'
+
+         echo 'second branch revision' > file1
+         dotest log-10 "${testcvs} -q ci -m2b file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1"
+
+         # Set up a bunch of shell variables to make the later tests
+         # easier to describe.=
+         log_header1="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.3
+branch:
+locks: strict
+access list:"
+         rlog_header1="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+head: 1\.3
+branch:
+locks: strict
+access list:"
+         log_tags1='symbolic names:
+       tag: 1\.2\.2\.1
+       branch: 1\.2\.0\.2'
+         log_keyword='keyword substitution: kv'
+         log_dash='----------------------------
+revision'
+         log_date="date: ${ISO8601DATE};  author: ${username};  state: Exp;"
+         log_lines="  lines: ${PLUS}1 -1;"
+         log_commitid="  commitid: ${commitid};"
+         log_rev1="${log_dash} 1\.1
+${log_date}${log_commitid}
+line 1
+
+line 2"
+         log_rev2="${log_dash} 1\.2
+${log_date}${log_lines}${log_commitid}
+branches:  1\.2\.2;
+2"
+         log_rev3="${log_dash} 1\.3
+${log_date}${log_lines}${log_commitid}
+3"
+         log_rev1b="${log_dash} 1\.2\.2\.1
+${log_date}${log_lines}${log_commitid}
+1b"
+         log_rev2b="${log_dash} 1\.2\.2\.2
+${log_date}${log_lines}${log_commitid}
+2b"
+         
log_trailer='============================================================================='
+
+         # Now, finally, test the log output.
+
+         dotest log-11 "${testcvs} log file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-12 "${testcvs} log -N file1" \
+"${log_header1}
+${log_keyword}
+total revisions: 5;    selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-13 "${testcvs} log -b file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 3
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-14 "${testcvs} log -r file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         dotest log-14a "${testcvs} log -rHEAD file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         # The user might not realize that "-r" must not take a space.
+         # In the error message, HEAD is a file name, not a tag name (which
+         # might be confusing itself).
+         dotest_fail log-14b "${testcvs} log -r HEAD file1" \
+"${SPROG} log: nothing known about HEAD
+${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+#        Check that unusual syntax works correctly.
+
+         dotest log-14c "${testcvs} log -r: file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+         dotest log-14d "${testcvs} log -r, file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+         dotest log-14e "${testcvs} log -r. file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+         dotest log-14f "${testcvs} log -r:: file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-15 "${testcvs} log -r1.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+         dotest log-16 "${testcvs} log -r1.2.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         # This test would fail with the old invocation of rlog, but it
+         # works with the builtin log support.
+         dotest log-17 "${testcvs} log -rbranch file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-18 "${testcvs} log -r1.2.2. file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+         # Multiple -r options are undocumented; see comments in
+         # cvs.texinfo about whether they should be deprecated.
+         dotest log-18a "${testcvs} log -r1.2.2.2 -r1.3:1.3 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2b}
+${log_trailer}"
+
+         # This test would fail with the old invocation of rlog, but it
+         # works with the builtin log support.
+         dotest log-19 "${testcvs} log -rbranch. file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+         dotest log-20 "${testcvs} log -r1.2: file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+
+         dotest log-20a "${testcvs} log -r1.2:: file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         dotest log-21 "${testcvs} log -r:1.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-21a "${testcvs} log -r::1.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-22 "${testcvs} log -r1.1:1.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-22a "${testcvs} log -r1.1::1.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+         dotest log-22b "${testcvs} log -r1.1::1.3 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+
+         dotest log-23 "${testcvs} log -rfoo:: file1" \
+"${SPROG} log: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-24 "${testcvs} log -rfoo::1.3 file1" \
+"${SPROG} log: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-25 "${testcvs} log -r::foo file1" \
+"${SPROG} log: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-26 "${testcvs} log -r1.1::foo file1" \
+"${SPROG} log: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         # Test BASE pseudotag
+         dotest log-27 "${testcvs} log -rBASE file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+         dotest log-28 "${testcvs} -q up -r1.2 file1" "U file1"
+         dotest log-29 "${testcvs} log -rBASE file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+         dotest log-30 "${testcvs} -q up -rbranch file1" "U file1"
+
+         # Now the same tests but with rlog
+
+         dotest log-r11 "${testcvs} rlog first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-r12 "${testcvs} rlog -N first-dir/file1" \
+"${rlog_header1}
+${log_keyword}
+total revisions: 5;    selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-r13 "${testcvs} rlog -b first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 3
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-r14 "${testcvs} rlog -r first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         dotest log-r14a "${testcvs} rlog -rHEAD first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         dotest_fail log-r14b "${testcvs} rlog -r HEAD first-dir/file1" \
+"${SPROG} rlog: cannot find module .HEAD. - ignored
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         dotest log-r14c "${testcvs} rlog -r: first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+         dotest log-r14d "${testcvs} rlog -r, first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+         dotest log-r14e "${testcvs} rlog -r. first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+         dotest log-r14f "${testcvs} rlog -r:: first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-r15 "${testcvs} rlog -r1.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+         dotest log-r16 "${testcvs} rlog -r1.2.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-r17 "${testcvs} rlog -rbranch first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+         dotest log-r18 "${testcvs} rlog -r1.2.2. first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+         dotest log-r18a "${testcvs} rlog -r1.2.2.2 -r1.3:1.3 first-dir/file1" 
\
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2b}
+${log_trailer}"
+
+         dotest log-r19 "${testcvs} rlog -rbranch. first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+         dotest log-r20 "${testcvs} rlog -r1.2: first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+
+         dotest log-r20a "${testcvs} rlog -r1.2:: first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+         dotest log-r21 "${testcvs} rlog -r:1.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-r21a "${testcvs} rlog -r::1.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-r22 "${testcvs} rlog -r1.1:1.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+         dotest log-r22a "${testcvs} rlog -r1.1::1.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+         dotest log-r22b "${testcvs} rlog -r1.1::1.3 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+
+         dotest log-r23 "${testcvs} rlog -rfoo:: first-dir/file1" \
+"${SPROG} rlog: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-r24 "${testcvs} rlog -rfoo::1.3 first-dir/file1" \
+"${SPROG} rlog: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-r25 "${testcvs} rlog -r::foo first-dir/file1" \
+"${SPROG} rlog: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-r26 "${testcvs} rlog -r1.1::foo first-dir/file1" \
+"${SPROG} rlog: warning: no revision .foo. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         # Test BASE pseudotag
+         dotest log-r27 "${testcvs} rlog -rBASE first-dir/file1" \
+"${SPROG} rlog: warning: no revision .BASE. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         dotest log-r28 "${testcvs} -q up -r1.2 file1" "U file1"
+         dotest log-r29 "${testcvs} rlog -rBASE first-dir/file1" \
+"${SPROG} rlog: warning: no revision .BASE. in 
.${CVSROOT_DIRNAME}/first-dir/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 0
+description:
+${log_trailer}"
+
+         # Test when head is dead
+
+         dotest log-d0 "${testcvs} -q up -A" \
+"U file1
+U file2"
+         dotest log-d1 "${testcvs} -q rm -f file1" \
+"${SPROG} remove: use .${SPROG} commit. to remove this file permanently"
+         dotest log-d2 "${testcvs} -q ci -m4" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: delete; previous revision: 1\.3"
+
+         log_header1="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+Working file: file1
+head: 1\.4
+branch:
+locks: strict
+access list:"
+         rlog_header1="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+head: 1\.4
+branch:
+locks: strict
+access list:"
+         log_header2="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.3
+branch:
+locks: strict
+access list:"
+         rlog_header2="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+head: 1\.3
+branch:
+locks: strict
+access list:"
+         log_tags2='symbolic names:
+       tag2: 1\.3
+       tag1: 1\.2'
+         log_rev4="${log_dash} 1\.4
+date: ${ISO8601DATE};  author: ${username};  state: dead;  lines: ${PLUS}0 -0; 
 commitid: ${commitid};
+4"
+         log_rev22="${log_dash} 1\.2
+${log_date}${log_lines}${log_commitid}
+2"
+
+         dotest log-d3 "${testcvs} log -rbranch file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+         dotest log-rd3 "${testcvs} rlog -rbranch first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+         dotest log-d4 "${testcvs} -q log -rbranch" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}
+${SPROG} log: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v.
+${log_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 0
+description:
+${log_trailer}"
+         dotest log-d4a "${testcvs} -q log -t -rbranch" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6
+description:
+${log_trailer}
+${SPROG} log: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v.
+${log_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3
+description:
+${log_trailer}"
+         dotest log-d4b "${testcvs} -q log -tS -rbranch" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_trailer}
+${SPROG} log: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v."
+         dotest log-d4c "${testcvs} -q log -h -rbranch" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6
+${log_trailer}
+${SPROG} log: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v.
+${log_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3
+${log_trailer}"
+         dotest log-d4d "${testcvs} -q log -hS -rbranch" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+${log_trailer}
+${SPROG} log: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v."
+         dotest log-d4e "$testcvs -q log -R -rbranch" \
+"$CVSROOT_DIRNAME/first-dir/Attic/file1,v
+$CVSROOT_DIRNAME/first-dir/file2,v"
+         dotest log-d4f "${testcvs} -q log -R -S -rbranch" \
+"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+${SPROG} log: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v."
+         dotest log-rd4 "${testcvs} -q rlog -rbranch first-dir" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}
+${SPROG} rlog: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v.
+${rlog_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 0
+description:
+${log_trailer}"
+         dotest log-rd4a "${testcvs} -q rlog -t -rbranch first-dir" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6
+description:
+${log_trailer}
+${SPROG} rlog: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v.
+${rlog_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3
+description:
+${log_trailer}"
+         dotest log-rd4b "${testcvs} -q rlog -St -rbranch first-dir" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_trailer}
+${SPROG} rlog: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v."
+         dotest log-rd4c "${testcvs} -q rlog -h -rbranch first-dir" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6
+${log_trailer}
+${SPROG} rlog: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v.
+${rlog_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3
+${log_trailer}"
+         dotest log-rd4d "${testcvs} -q rlog -Sh -rbranch first-dir" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+${log_trailer}
+${SPROG} rlog: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v."
+         dotest log-rd4e "${testcvs} -q rlog -R -rbranch first-dir" \
+"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+${CVSROOT_DIRNAME}/first-dir/file2,v"
+         dotest log-rd4f "${testcvs} -q rlog -R -S -rbranch first-dir" \
+"${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+${SPROG} rlog: warning: no revision .branch. in 
.${CVSROOT_DIRNAME}/first-dir/file2,v."
+         dotest log-d5 "${testcvs} log -r1.2.2.1:1.2.2.2 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+         dotest log-rd5 "${testcvs} rlog -r1.2.2.1:1.2.2.2 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+         dotest log-d6 "${testcvs} -q log -r1.2.2.1:1.2.2.2" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}
+${log_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 0
+description:
+${log_trailer}"
+         dotest log-rd6 "${testcvs} -q rlog -r1.2.2.1:1.2.2.2 first-dir" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}
+${rlog_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 0
+description:
+${log_trailer}"
+         dotest log-d7 "${testcvs} log -r1.2:1.3 file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+         dotest log-rd7 "${testcvs} -q rlog -r1.2:1.3 first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+         dotest log-d8 "${testcvs} -q log -rtag1:tag2" \
+"${SPROG} log: warning: no revision .tag1. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${SPROG} log: warning: no revision .tag2. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 0
+description:
+${log_trailer}
+${log_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev22}
+${log_trailer}"
+         dotest log-d8a "${testcvs} -q log -rtag1:tag2 -S" \
+"${SPROG} log: warning: no revision .tag1. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${SPROG} log: warning: no revision .tag2. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${log_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev22}
+${log_trailer}"
+         dotest log-rd8 "${testcvs} -q rlog -rtag1:tag2 first-dir" \
+"${SPROG} rlog: warning: no revision .tag1. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${SPROG} rlog: warning: no revision .tag2. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 6;    selected revisions: 0
+description:
+${log_trailer}
+${rlog_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev22}
+${log_trailer}"
+         dotest log-rd8a "${testcvs} -q rlog -rtag1:tag2 -S first-dir" \
+"${SPROG} rlog: warning: no revision .tag1. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${SPROG} rlog: warning: no revision .tag2. in 
.${CVSROOT_DIRNAME}/first-dir/Attic/file1,v.
+${rlog_header2}
+${log_tags2}
+${log_keyword}
+total revisions: 3;    selected revisions: 2
+description:
+${log_rev3}
+${log_rev22}
+${log_trailer}"
+
+         dotest log-d99 "${testcvs} -q up -rbranch" \
+"U file1
+${SPROG} update: \`file2' is no longer in the repository"
+
+         # Now test outdating revisions
+
+         dotest log-o0 "${testcvs} admin -o 1.2.2.2:: file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+done"
+         dotest log-o1 "${testcvs} admin -o ::1.2.2.1 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+done"
+         dotest log-o2 "${testcvs} admin -o 1.2.2.1:: file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
+deleting revision 1\.2\.2\.2
+done"
+         dotest log-o3 "${testcvs} log file1" \
+"${log_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 5
+description:
+${log_rev4}
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev1b}
+${log_trailer}"
+         dotest log-ro3 "${testcvs} rlog first-dir/file1" \
+"${rlog_header1}
+${log_tags1}
+${log_keyword}
+total revisions: 5;    selected revisions: 5
+description:
+${log_rev4}
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev1b}
+${log_trailer}"
+         dotest log-o4 "${testcvs} -q update -p -r 1.2.2.1 file1" \
+"first branch revision"
+
+         dokeep
+         cd ..
+         rm -rf first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       log2)
+         # More "cvs log" tests, for example the file description.
+
+         # Check in a file
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest log2-1 "$testcvs -q co first-dir"
+         cd first-dir
+         echo 'first revision' > file1
+         dotest log2-2 "${testcvs} add -m file1-is-for-testing file1" \
+"${SPROG}"' add: scheduling file `file1'\'' for addition
+'"${SPROG}"' add: use .'"${SPROG}"' commit. to add this file permanently'
+         dotest log2-3 "${testcvs} -q commit -m 1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         # Setting the file description with add -m doesn't yet work
+         # client/server, so skip log2-4 for remote.
+         if $remote; then :; else
+
+           dotest log2-4 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+file1-is-for-testing
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+1
+============================================================================="
+
+         fi # end of tests skipped for remote
+
+         dotest log2-5 "${testcvs} admin -t-change-description file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest log2-6 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+change-description
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+1
+============================================================================="
+
+         echo 'longer description' >${TESTDIR}/descrip
+         echo 'with two lines' >>${TESTDIR}/descrip
+         dotest log2-7 "${testcvs} admin -t${TESTDIR}/descrip file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest_fail log2-7a "${testcvs} admin -t${TESTDIR}/nonexist file1" \
+"${CPROG} \[admin aborted\]: can't stat ${TESTDIR}/nonexist: No such file or 
directory"
+         dotest log2-8 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+longer description
+with two lines
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+1
+============================================================================="
+
+         # TODO: `cvs admin -t "my message" file1' is a request to
+         # read the message from stdin and to operate on two files.
+         # Should test that there is an error because "my message"
+         # doesn't exist.
+
+         dotest log2-9 "echo change from stdin | ${testcvs} admin -t -q file1" 
""
+         dotest log2-10 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+change from stdin
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+1
+============================================================================="
+
+         dokeep
+         cd ..
+         rm $TESTDIR/descrip
+         rm -r first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       logopt)
+         # Some tests of log.c's option parsing and such things.
+         mkdir 1; cd 1
+         dotest logopt-1 "$testcvs -q co -l ." ''
+         mkdir first-dir
+         dotest logopt-2 "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+         cd first-dir
+         echo hi >file1
+         dotest logopt-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest logopt-4 "${testcvs} -q ci -m add file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ..
+
+         dotest logopt-5 "${testcvs} log -R -d 2038-01-01" \
+"${SPROG} log: Logging \.
+${SPROG} log: Logging first-dir
+${CVSROOT_DIRNAME}/first-dir/file1,v"
+         dotest logopt-6 "${testcvs} log -d 2038-01-01 -R" \
+"${SPROG} log: Logging \.
+${SPROG} log: Logging first-dir
+${CVSROOT_DIRNAME}/first-dir/file1,v"
+         dotest logopt-6a "${testcvs} log -Rd 2038-01-01" \
+"${SPROG} log: Logging \.
+${SPROG} log: Logging first-dir
+${CVSROOT_DIRNAME}/first-dir/file1,v"
+         dotest logopt-7 "${testcvs} log -s Exp -R" \
+"${SPROG} log: Logging \.
+${SPROG} log: Logging first-dir
+${CVSROOT_DIRNAME}/first-dir/file1,v"
+
+         dokeep
+         cd ..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       ann)
+         # Tests of "cvs annotate".  See also:
+         #   basica-10  A simple annotate test
+         #   rcs        Annotate and the year 2000
+         #   keywordlog Annotate and $Log.
+         mkdir 1; cd 1
+         dotest ann-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest ann-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         cat >file1 <<EOF
+this
+is
+the
+ancestral
+file
+EOF
+         dotest ann-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest ann-4 "${testcvs} -q ci -m add file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cat >file1 <<EOF
+this
+is
+a
+file
+
+with
+a
+blank
+line
+EOF
+         dotest ann-5 "${testcvs} -q ci -m modify file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         dotest ann-6 "${testcvs} -q tag -b br" "T file1"
+         cat >file1 <<EOF
+this
+is
+a
+trunk file
+
+with
+a
+blank
+line
+EOF
+         dotest ann-7 "${testcvs} -q ci -m modify file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+         dotest ann-8 "${testcvs} -q update -r br" "U file1"
+         cat >file1 <<EOF
+this
+is
+a
+file
+
+with
+a
+blank
+line
+and some
+branched content
+EOF
+         dotest ann-9 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2\.2\.1; previous revision: 1\.2"
+         # Note that this annotates the trunk despite the presence
+         # of a sticky tag in the current directory.  This is
+         # fairly bogus, but it is the longstanding behavior for
+         # whatever that is worth.
+         dotest ann-10 "${testcvs} ann" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line"
+         dotest ann-11 "${testcvs} ann -r br" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
+         # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"?
+         dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""
+         dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
+         dotest_fail ann-14 "$testcvs ann -r bill-clintons-chastity file1" \
+"$SPROG \[annotate aborted\]: no such tag \`bill-clintons-chastity'"
+
+         # Now get rid of the working directory and test rannotate
+
+         cd ../..
+         rm -r 1
+         dotest ann-r10 "${testcvs} rann first-dir" \
+"
+Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line"
+         dotest ann-r11 "${testcvs} rann -r br first-dir" \
+"
+Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
+         dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" ""
+         dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \
+"
+Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          ($username8 *[0-9a-zA-Z-]*): this
+1\.1          ($username8 *[0-9a-zA-Z-]*): is
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.1          ($username8 *[0-9a-zA-Z-]*): file
+1\.2          ($username8 *[0-9a-zA-Z-]*): 
+1\.2          ($username8 *[0-9a-zA-Z-]*): with
+1\.2          ($username8 *[0-9a-zA-Z-]*): a
+1\.2          ($username8 *[0-9a-zA-Z-]*): blank
+1\.2          ($username8 *[0-9a-zA-Z-]*): line
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
+         dotest_fail ann-r14 "$testcvs rann -r bill-clintons-chastity 
first-dir/file1" \
+"$SPROG \[rannotate aborted\]: no such tag \`bill-clintons-chastity'"
+
+         dokeep
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       ann-id)
+         # Demonstrate that cvs-1.9.28.1 improperly expands rcs keywords in
+         # the output of `cvs annotate' -- it uses values from the previous
+         # delta.  In this case, `1.1' instead of `1.2', even though it puts
+         # the proper version number on the prefix to each line of output.
+         mkdir 1; cd 1
+         dotest ann-id-1 "$testcvs -q co -l ."
+         module=x
+         mkdir $module
+         dotest ann-id-2 "${testcvs} add $module" \
+"Directory ${CVSROOT_DIRNAME}/$module added to the repository"
+         cd $module
+
+         file=m
+         echo '$Id''$' > $file
+
+         dotest ann-id-3 "$testcvs add $file" \
+"$SPROG add: scheduling file .$file. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest ann-id-4 "$testcvs -Q ci -m . $file"
+
+         echo line2 >> $file
+         dotest ann-id-5 "$testcvs -Q ci -m . $file"
+
+         # The version number after $file,v should be `1.2'.
+         # 1.9.28.1 puts `1.1' there.
+         dotest ann-id-6 "$testcvs -Q ann $file" \
+"
+Annotations for $file
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1.2          ($username8 *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* 
[0-9:]* $username Exp "'\$'"
+1.2          ($username8 *[0-9a-zA-Z-]*): line2"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       crerepos)
+         # Various tests relating to creating repositories, operating
+         # on repositories created with old versions of CVS, etc.
+
+         CVS_SERVER_save=$CVS_SERVER
+
+         # Because this test is all about -d options and such, it
+         # at least to some extent needs to be different for remote vs.
+         # local.
+         if $remote; then
+
+           # Use :ext: rather than :fork:.  Most of the tests use :fork:,
+           # so we want to make sure that we test :ext: _somewhere_.
+           # Make sure 'rsh' works first.
+           require_rsh "$CVS_RSH"
+           if test $? -eq 77; then
+               skip crerepos "$skipreason"
+               continue
+           fi
+
+            # Make sure server ignores real $HOME/.cvsrc:
+            cat >$TESTDIR/cvs-setHome <<EOF
+#!$TESTSHELL
+HOME=$HOME
+export HOME
+exec $CVS_SERVER "\$@"
+EOF
+            chmod a+x $TESTDIR/cvs-setHome
+
+           # Note that we set CVS_SERVER at the beginning.
+           CVS_SERVER=$TESTDIR/cvs-setHome; export CVS_SERVER
+           CREREPOS_ROOT=:ext:$host$TESTDIR/crerepos
+         else # local
+           CREREPOS_ROOT=$TESTDIR/crerepos
+         fi
+
+         # First, if the repository doesn't exist at all...
+         dotest_fail crerepos-1 \
+"${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
+"${SPROG} \[checkout aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
+         mkdir crerepos
+
+         # The repository exists but CVSROOT doesn't.
+         dotest_fail crerepos-2 \
+"${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
+"${SPROG} \[checkout aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
+         mkdir crerepos/CVSROOT
+
+         # Checkout of nonexistent module
+         dotest_fail crerepos-3 \
+"${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
+"${SPROG} checkout: cannot find module .cvs-sanity. - ignored"
+
+         # Now test that CVS works correctly without a modules file
+         # or any of that other stuff.  In particular, it *must*
+         # function if administrative files added to CVS recently (since
+         # CVS 1.3) do not exist, because the repository might have
+         # been created with an old version of CVS.
+         mkdir 1; cd 1
+         dotest crerepos-4 \
+"${testcvs} -q -d ${TESTDIR}/crerepos co CVSROOT" \
+''
+         dotest crerepos-5 \
+"echo yes | $testcvs -d $TESTDIR/crerepos release -d CVSROOT" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory \`CVSROOT': "
+         rm -rf CVS
+         cd ..
+         # The directory 1 should be empty
+         dotest crerepos-6 "rmdir 1"
+
+         if $remote; then
+           # Test that CVS rejects a relative path in CVSROOT.
+           mkdir 1; cd 1
+           # Note that having the client reject the pathname (as :fork:
+           # does), does _not_ test for the bugs we are trying to catch
+           # here.  The point is that malicious clients might send all
+           # manner of things and the server better protect itself.
+           dotest_fail crerepos-6a-r \
+"${testcvs} -q -d :ext:`hostname`:../crerepos get ." \
+"${CPROG} checkout: CVSROOT may only specify a positive, non-zero, integer 
port (not .\.\..)\.
+${CPROG} checkout: Perhaps you entered a relative pathname${QUESTION}
+${CPROG} \[checkout aborted\]: Bad CVSROOT: .:ext:${hostname}:\.\./crerepos.\."
+           cd ..
+           rm -r 1
+
+           mkdir 1; cd 1
+           dotest_fail crerepos-6b-r \
+"${testcvs} -d :ext:`hostname`:crerepos init" \
+"${CPROG} init: CVSROOT requires a path spec:
+${CPROG} init: 
:(gserver|kserver|pserver):\[\[user\]\[:address@hidden:\[port\]\]/path
+${CPROG} init: \[:(ext|server):address@hidden:\]/path
+${CPROG} \[init aborted\]: Bad CVSROOT: .:ext:${hostname}:crerepos.\."
+           cd ..
+           rm -r 1
+         else # local
+           # Test that CVS rejects a relative path in CVSROOT.
+
+           mkdir 1; cd 1
+           # Set CVS_RSH=false since ocassionally (e.g. when CVS_RSH=ssh on
+           # some systems) some rsh implementations will block because they
+           # can look up '..' and want to ask the user about the unknown host
+           # key or somesuch.  Which error message we get depends on whether
+           # false finishes running before we try to talk to it or not.
+           dotest_fail crerepos-6a "CVS_RSH=false ${testcvs} -q -d ../crerepos 
get ." \
+"${SPROG} \[checkout aborted\]: end of file from server (consult above 
messages if any)" \
+"${SPROG} \[checkout aborted\]: received broken pipe signal"
+           cd ..
+           rm -r 1
+
+           mkdir 1; cd 1
+           dotest_fail crerepos-6b "${testcvs} -d crerepos init" \
+"${SPROG} init: CVSROOT must be an absolute pathname (not .crerepos.)
+${SPROG} init: when using local access method\.
+${SPROG} \[init aborted\]: Bad CVSROOT: .crerepos.\."
+           cd ..
+           rm -r 1
+         fi # end of tests to be skipped for remote
+
+         # CVS should have created a history file.  If the administrator 
+         # doesn't need it and wants to save on disk space, they just
+         # delete it and set LogHistory = the empty string in config.
+         dotest crerepos-7 "test -f $TESTDIR/crerepos/CVSROOT/history"
+
+         # Now test mixing repositories.  This kind of thing tends to
+         # happen accidentally when people work with several repositories.
+         mkdir 1; cd 1
+         dotest crerepos-8 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest crerepos-9 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch file1
+         dotest crerepos-10 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest crerepos-11 "${testcvs} -q ci -m add-it" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ../..
+         rm -r 1
+
+         mkdir 1; cd 1
+         dotest crerepos-12 "$testcvs -d $CREREPOS_ROOT -q co -l ."
+         mkdir crerepos-dir
+         dotest crerepos-13 "$testcvs add crerepos-dir" \
+"Directory $TESTDIR/crerepos/crerepos-dir added to the repository"
+         cd crerepos-dir
+         touch cfile
+         dotest crerepos-14 "${testcvs} add cfile" \
+"${SPROG} add: scheduling file .cfile. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest crerepos-15 "${testcvs} -q ci -m add-it" \
+"$TESTDIR/crerepos/crerepos-dir/cfile,v  <--  cfile
+initial revision: 1\.1"
+         cd ../..
+         rm -r 1
+
+         mkdir 1; cd 1
+         dotest crerepos-16 "${testcvs} co first-dir" \
+"${SPROG} checkout: Updating first-dir
+U first-dir/file1"
+         dotest crerepos-17 "${testcvs} -d ${CREREPOS_ROOT} co crerepos-dir" \
+"${SPROG} checkout: Updating crerepos-dir
+U crerepos-dir/cfile"
+         dotest crerepos-18 "${testcvs} update" \
+"${SPROG} update: Updating first-dir
+${SPROG} update: Updating crerepos-dir"
+
+         cd ..
+
+          CVS_SERVER=$CVS_SERVER_save; export CVS_SERVER
+
+         dokeep
+          rm -f $TESTDIR/cvs-setHome
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         rm -rf $TESTDIR/crerepos
+         ;;
+
+
+
+       rcs)
+         # Test ability to import an RCS file.  Note that this format
+         # is fixed--files written by RCS5, and other software which
+         # implements this format, will be out there "forever" and
+         # CVS must always be able to import such files.
+
+         # See tests admin-13, admin-25 and rcs-8a for exporting RCS files.
+
+         # Save the timezone and set it to UTC for these tests to make the
+         # value more predicatable.
+         save_TZ=$TZ
+         TZ=UTC0; export TZ
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+
+         # Currently the way to import an RCS file is to copy it
+         # directly into the repository.
+         #
+         # This file was written by RCS 5.7, and then the dates were
+         # hacked so that we test year 2000 stuff.  Note also that
+         # "author" names are just strings, as far as importing
+         # RCS files is concerned--they need not correspond to user
+         # IDs on any particular system.
+         #
+         # I also tried writing a file with the RCS supplied with
+         # HPUX A.09.05.  According to "man rcsintro" this is
+         # "Revision Number: 3.0; Release Date: 83/05/11".  There
+         # were a few minor differences like whitespace but at least
+         # in simple cases like this everything else seemed the same
+         # as the file written by RCS 5.7 (so I won't try to make it
+         # a separate test case).
+
+         cat <<EOF >$TESTDIR/file1,v
+head   1.3;
+access;
+symbols;
+locks; strict;
+comment        @# @;
+
+
+1.3
+date   ${RAWRCSDATE2000A};     author kingdon; state Exp;
+branches;
+next   1.2;
+
+1.2
+date   ${RAWRCSDATE1996A};     author kingdon; state Exp;
+branches;
+next   1.1;
+
+1.1
+date   ${RAWRCSDATE1996B};     author kingdon; state Exp;
+branches;
+next   ;
+
+
+desc
address@hidden is for testing CVS
+@
+
+
+1.3
+log
address@hidden second line; modify twelfth line
+@
+text
address@hidden is the first line
+This is the third line
+This is the fourth line
+This is the fifth line
+This is the sixth line
+This is the seventh line
+This is the eighth line
+This is the ninth line
+This is the tenth line
+This is the eleventh line
+This is the twelfth line (and what a line it is)
+This is the thirteenth line
+@
+
+
+1.2
+log
address@hidden more lines
+@
+text
address@hidden 1
+This is the second line
+d11 1
+a11 1
+This is the twelfth line
+@
+
+
+1.1
+log
address@hidden file1
+@
+text
address@hidden 12
+@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+
+         dotest rcs-1 "$testcvs -q co first-dir" 'U first-dir/file1'
+         cd first-dir
+         dotest rcs-2 "$testcvs -q log" "
+RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
+Working file: file1
+head: 1\.3
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+file1 is for testing CVS
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE2000A};  author: kingdon;  state: Exp;  lines: ${PLUS}1 -2;
+delete second line; modify twelfth line
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE1996A};  author: kingdon;  state: Exp;  lines: ${PLUS}12 -0;
+add more lines
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE1996B};  author: kingdon;  state: Exp;
+add file1
+============================================================================="
+
+         # Note that the dates here are chosen so that (a) we test
+         # at least one date after 2000, (b) we will notice if the
+         # month and day are getting mixed up with each other.
+         # TODO: also test that year isn't getting mixed up with month
+         # or day, for example 01-02-03.
+
+         # ISO8601 format.  There are many, many, other variations
+         # specified by ISO8601 which we should be testing too.
+         dotest rcs-3 "${testcvs} -q log -d '1996-12-11<'" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.3
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 3;    selected revisions: 1
+description:
+file1 is for testing CVS
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE2000A};  author: kingdon;  state: Exp;  lines: ${PLUS}1 -2;
+delete second line; modify twelfth line
+============================================================================="
+
+         # RFC822 format (as amended by RFC1123).
+         dotest rcs-4 "${testcvs} -q log -d '<3 Apr 2000 00:00'" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.3
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 3;    selected revisions: 2
+description:
+file1 is for testing CVS
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE1996A};  author: kingdon;  state: Exp;  lines: ${PLUS}12 -0;
+add more lines
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE1996B};  author: kingdon;  state: Exp;
+add file1
+============================================================================="
+
+         # Intended behavior for "cvs annotate" is that it displays the
+         # last two digits of the year.  Make sure it does that rather
+         # than some bogosity like "100".
+         dotest rcs-4a "${testcvs} annotate file1" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1          (kingdon  24-Nov-96): This is the first line
+1\.2          (kingdon  24-Nov-96): This is the third line
+1\.2          (kingdon  24-Nov-96): This is the fourth line
+1\.2          (kingdon  24-Nov-96): This is the fifth line
+1\.2          (kingdon  24-Nov-96): This is the sixth line
+1\.2          (kingdon  24-Nov-96): This is the seventh line
+1\.2          (kingdon  24-Nov-96): This is the eighth line
+1\.2          (kingdon  24-Nov-96): This is the ninth line
+1\.2          (kingdon  24-Nov-96): This is the tenth line
+1\.2          (kingdon  24-Nov-96): This is the eleventh line
+1\.3          (kingdon  24-Nov-00): This is the twelfth line (and what a line 
it is)
+1\.2          (kingdon  24-Nov-96): This is the thirteenth line"
+
+         # Probably should split this test into two at this point (file1
+         # above this line and file2 below), as the two share little
+         # data/setup.
+
+         # OK, here is another one.  This one was written by hand based on
+         # doc/RCSFILES and friends.  One subtle point is that none of
+         # the lines end with newlines; that is a feature which we
+         # should be testing.
+         cat <<EOF >$TESTDIR/file2,v
+head                           1.5                 ;
+     branch        1.2.6;
+access ;
+symbols branch:1.2.6;
+locks;
+testofanewphrase @without newphrase we'd have trouble extending @@ all@ ;
+1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4;
+1.4 date 71.01.01.00.00.05; author joe; state bogus; branches; next 1.3;
+1.3 date 70.12.31.15.00.05; author joe; state bogus; branches; next 1.2;
+1.2 date 70.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;
+1.1 date 70.12.31.11.00.05; author joe; state bogus; branches; next; newph;
+1.2.6.1 date 71.01.01.08.00.05; author joe; state Exp; branches; next;
+desc @@
+1.5 log @@ newphrase1; newphrase2 42; text @head revision@
+1.4 log @@ text @d1 1
+a1 1
+new year revision@
+1.3 log @@ text @d1 1
+a1 1
+old year revision@
+1.2 log @@ text @d1 1
+a1 1
+mid revision@ 1.1
+
+log           @@ text @d1 1
+a1 1
+start revision@
+1.2.6.1 log @@ text @d1 1
+a1 1
+branch revision@
+EOF
+         modify_repo mv $TESTDIR/file2,v $CVSROOT_DIRNAME/first-dir/file2,v
+         # ' Match the single quote in above here doc -- for font-lock mode.
+
+         # First test the default branch.
+         dotest rcs-5 "${testcvs} -q update file2" "U file2"
+         dotest rcs-6 "cat file2" "branch revision"
+
+         # Check in a revision on the branch to force CVS to
+         # interpret every revision in the file.
+         dotest rcs-6a "${testcvs} -q update -r branch file2" ""
+         echo "next branch revision" > file2
+         dotest rcs-6b "${testcvs} -q ci -m mod file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.2\.6\.2; previous revision: 1\.2\.6\.1"
+
+         # Now get rid of the default branch, it will get in the way.
+         dotest rcs-7 "${testcvs} admin -b file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         # But we do want to make sure that "cvs admin" leaves the newphrases
+         # in the file.
+         # The extra whitespace regexps are for the RCS library, which does
+         # not preserve whitespace in the dogmatic manner of RCS 5.7. -twp
+         dotest rcs-8 \
+"grep testofanewphrase ${CVSROOT_DIRNAME}/first-dir/file2,v" \
+"testofanewphrase[      ][     address@hidden newphrase we'd have trouble 
extending @@ address@hidden   ]*;"
+         # The easiest way to test for newphrases in deltas and deltatexts
+         # is to just look at the whole file, I guess.
+         dotest rcs-8a "cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \
+"head  1\.5;
+access;
+symbols
+       branch:1.2.6;
+locks;
+
+testofanewphrase       @without newphrase we'd have trouble extending @@ all@;
+
+1\.5
+date   71\.01\.01\.01\.00\.00; author joe;     state bogus;
+branches;
+next   1\.4;
+
+1\.4
+date   71\.01\.01\.00\.00\.05; author joe;     state bogus;
+branches;
+next   1\.3;
+
+1\.3
+date   70\.12\.31\.15\.00\.05; author joe;     state bogus;
+branches;
+next   1\.2;
+
+1\.2
+date   70\.12\.31\.12\.15\.05; author me;      state bogus;
+branches
+       1\.2\.6\.1;
+next   1\.1;
+
+1\.1
+date   70\.12\.31\.11\.00\.05; author joe;     state bogus;
+branches;
+next   ;
+newph  ;
+
+1\.2\.6\.1
+date   71\.01\.01\.08\.00\.05; author joe;     state Exp;
+branches;
+next   1\.2\.6\.2;
+
+1\.2\.6\.2
+date   [0-9.]*;        author ${username};     state Exp;
+branches;
+next   ;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+
+desc
+@@
+
+
+1\.5
+log
+@@
+newphrase1     ;
+newphrase2     42;
+text
address@hidden revision@
+
+
+1\.4
+log
+@@
+text
address@hidden 1
+a1 1
+new year revision@
+
+
+1\.3
+log
+@@
+text
address@hidden 1
+a1 1
+old year revision@
+
+
+1\.2
+log
+@@
+text
address@hidden 1
+a1 1
+mid revision@
+
+
+1\.1
+log
+@@
+text
address@hidden 1
+a1 1
+start revision@
+
+
+1\.2\.6\.1
+log
+@@
+text
address@hidden 1
+a1 1
+branch revision@
+
+
+1\.2\.6\.2
+log
address@hidden
+@
+text
address@hidden 1
+a1 1
+next branch revision
+@"
+
+         dotest rcs-9 "${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2" 
\
+"start revision"
+
+         dotest rcs-10 "${testcvs} -q update -p -D '1970-12-31 12:30 UT' 
file2" \
+"mid revision"
+
+         dotest rcs-11 "${testcvs} -q update -p -D '1971-01-01 00:30 UT' 
file2" \
+"new year revision"
+
+         # Same test as rcs-10, but with am/pm.
+         dotest rcs-12 "${testcvs} -q update -p -D 'December 31, 1970 12:30pm 
UT' file2" \
+"mid revision"
+
+         # Same test as rcs-11, but with am/pm.
+         dotest rcs-13 "${testcvs} -q update -p -D 'January 1, 1971 12:30am 
UT' file2" \
+"new year revision"
+
+         # OK, now make sure cvs log doesn't have any trouble with the
+         # newphrases and such.
+         dotest rcs-14 "${testcvs} -q log file2" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.5
+branch:
+locks:
+access list:
+symbolic names:
+       branch: 1\.2\.6
+keyword substitution: kv
+total revisions: 7;    selected revisions: 7
+description:
+----------------------------
+revision 1\.5
+date: 1971-01-01 01:00:00 [+-]0000;  author: joe;  state: bogus;  lines: 
${PLUS}1 -1;
+\*\*\* empty log message \*\*\*
+----------------------------
+revision 1\.4
+date: 1971-01-01 00:00:05 [+-]0000;  author: joe;  state: bogus;  lines: 
${PLUS}1 -1;
+\*\*\* empty log message \*\*\*
+----------------------------
+revision 1\.3
+date: 1970-12-31 15:00:05 [+-]0000;  author: joe;  state: bogus;  lines: 
${PLUS}1 -1;
+\*\*\* empty log message \*\*\*
+----------------------------
+revision 1\.2
+date: 1970-12-31 12:15:05 [+-]0000;  author: me;  state: bogus;  lines: 
${PLUS}1 -1;
+branches:  1\.2\.6;
+\*\*\* empty log message \*\*\*
+----------------------------
+revision 1\.1
+date: 1970-12-31 11:00:05 [+-]0000;  author: joe;  state: bogus;
+\*\*\* empty log message \*\*\*
+----------------------------
+revision 1\.2\.6\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+mod
+----------------------------
+revision 1\.2\.6\.1
+date: 1971-01-01 08:00:05 [+-]0000;  author: joe;  state: Exp;  lines: 
${PLUS}1 -1;
+\*\*\* empty log message \*\*\*
+============================================================================="
+         # Now test each date format for "cvs log -d".
+         # Earlier than 1971-01-01
+         dotest rcs-15 "${testcvs} -q log -d '<1971-01-01 00:00 GMT' file2 \
+           | grep revision" \
+"total revisions: 7;   selected revisions: 3
+revision 1\.3
+revision 1\.2
+revision 1\.1"
+         # Later than 1971-01-01
+         dotest rcs-16 "${testcvs} -q log -d '1971-01-01 00:00 GMT<' file2 \
+           | grep revision" \
+"total revisions: 7;   selected revisions: 4
+revision 1\.5
+revision 1\.4
+revision 1\.2\.6\.2
+revision 1\.2\.6\.1"
+         # Alternate syntaxes for later and earlier; multiple -d options
+         dotest rcs-17 "${testcvs} -q log -d '>1971-01-01 00:00 GMT' \
+           -d '1970-12-31 12:15 GMT>' file2 | grep revision" \
+"total revisions: 7;   selected revisions: 5
+revision 1\.5
+revision 1\.4
+revision 1\.1
+revision 1\.2\.6\.2
+revision 1\.2\.6\.1"
+         # Range, and single date
+         dotest rcs-18 "${testcvs} -q log -d '1970-12-31 11:30 GMT' \
+           -d '1971-01-01 00:00:05 GMT<1971-01-01 01:00:01 GMT' \
+           file2 | grep revision" \
+"total revisions: 7;   selected revisions: 2
+revision 1\.5
+revision 1\.1"
+         # Alternate range syntax; equality
+         dotest rcs-19 "${testcvs} -q log \
+           -d '1971-01-01 01:00:01 GMT>=1971-01-01 00:00:05 GMT' \
+           file2 | grep revision" \
+"total revisions: 7;   selected revisions: 2
+revision 1\.5
+revision 1\.4"
+
+         dokeep
+         TZ=$save_TZ
+         cd ..
+         rm -rf first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       rcs2)
+         # More date tests.  Might as well do this as a separate
+         # test from "rcs", so that we don't need to perturb the
+         # "written by RCS 5.7" RCS file.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         # Significance of various dates:
+         # * At least one Y2K standard refers to recognizing 9 Sep 1999
+         #   (as an example of a pre-2000 date, I guess).
+         # * At least one Y2K standard refers to recognizing 1 Jan 2001
+         #   (as an example of a post-2000 date, I guess).
+         # * Many Y2K standards refer to 2000 being a leap year.
+         cat <<EOF >$TESTDIR/file1,v
+head 1.7; access; symbols; locks; strict;
+1.7 date 2004.08.31.01.01.01; author sue; state; branches; next 1.6;
+1.6 date 2004.02.29.01.01.01; author sue; state; branches; next 1.5;
+1.5 date 2003.02.28.01.01.01; author sue; state; branches; next 1.4;
+1.4 date 2001.01.01.01.01.01; author sue; state; branches; next 1.3;
+1.3 date 2000.02.29.01.01.01; author sue; state; branches; next 1.2;
+1.2 date 99.09.09.01.01.01; author sue; state; branches; next 1.1;
+1.1 date 98.09.10.01.01.01; author sue; state; branches; next;
+desc @a test file@
+1.7 log @@ text @head revision@
+1.6 log @@ text @d1 1
+a1 1
+2004 was a great year for leaping@
+1.5 log @@ text @d1 1
+a1 1
+2003 wasn't@
+1.4 log @@ text @d1 1
+a1 1
+two year hiatus@
+1.3 log @@ text @d1 1
+a1 1
+2000 is also a good year for leaping@
+1.2 log @@ text @d1 1
+a1 1
+Tonight we're going to party like it's a certain year@
+1.1 log @@ text @d1 1
+a1 1
+Need to start somewhere@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+         # ' Match the 3rd single quote in the here doc -- for font-lock mode.
+
+         dotest rcs2-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
+         cd first-dir
+
+         # 9 Sep 1999
+         dotest rcs2-2 "${testcvs} -q update -p -D '1999-09-09 11:30 UT' 
file1" \
+"Tonight we're going to party like it's a certain year"
+         # 1 Jan 2001.
+         dotest rcs2-3 "${testcvs} -q update -p -D '2001-01-01 11:30 UT' 
file1" \
+"two year hiatus"
+         # 29 Feb 2000
+         dotest rcs2-4 "${testcvs} -q update -p -D '2000-02-29 11:30 UT' 
file1" \
+"2000 is also a good year for leaping"
+         # 29 Feb 2003 is invalid
+         dotest_fail rcs2-5 "${testcvs} -q update -p -D '2003-02-29 11:30 UT' 
file1" \
+"$CPROG \[update aborted\]: Can't parse date/time: \`2003-02-29 11:30 UT'"
+
+         dotest rcs2-6 "${testcvs} -q update -p -D 2007-01-07 file1" \
+"head revision"
+         # This assumes that the clock of the machine running the tests
+         # is set to at least the year 1998 or so.  There don't seem
+         # to be a lot of ways to test the relative date code (short
+         # of something like LD_LIBRARY_PRELOAD'ing in our own
+         # getttimeofday, or hacking the CVS source with testing
+         # features, which always seems to be problematic since then
+         # someone feels like documenting them and things go downhill
+         # from there).
+         # 
+         # These tests can be expected to fail 3 times every 400 years
+         # starting Feb. 29, 2096 (because 8 years from that date would
+         # be Feb. 29, 2100, which is an invalid date -- 2100 isn't a
+         # leap year because it's divisible by 100 but not by 400).
+
+         dotest rcs2-7 "${testcvs} -q update -p -D '96 months' file1" \
+"head revision"
+         dotest rcs2-8 "${testcvs} -q update -p -D '8 years' file1" \
+"head revision"
+
+         dokeep
+         cd ..
+         rm -rf first-dir
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       rcs3)
+         # More RCS file tests, in particular at least some of the
+         # error handling issues.
+         mkdir ${CVSROOT_DIRNAME}/first-dir
+         cat <<EOF >$TESTDIR/file1,v
+head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
+; author jeremiah ;state ;  branches; next;desc@@1.1log@@address@hidden@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+         mkdir 1; cd 1
+         # CVS requires whitespace between "desc" and its value.
+         # The rcsfile(5) manpage doesn't really seem to answer the
+         # question one way or the other (it has a grammar but almost
+         # nothing about lexical analysis).
+         dotest_fail rcs3-1 "${testcvs} -q co first-dir" \
+"${SPROG} \[checkout aborted\]: EOF while looking for value in RCS file 
${CVSROOT_DIRNAME}/first-dir/file1,v"
+         cat <<EOF >$TESTDIR/file1,v
+head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
+; author jeremiah ;state ;  branches; next;desc @@1.1log@@address@hidden@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+         # Whitespace issues, likewise.
+         dotest_fail rcs3-2 "${testcvs} -q co first-dir" \
+"${SPROG} \[checkout aborted\]: unexpected '.x6c' reading revision number in 
RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
+         cat <<EOF >$TESTDIR/file1,v
+head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
+; author jeremiah ;state ;  branches; next;desc @@1.1 log@@address@hidden@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+         # Charming array of different messages for similar
+         # whitespace issues (depending on where the whitespace is).
+         dotest_fail rcs3-3 "${testcvs} -q co first-dir" \
+"${SPROG} \[checkout aborted\]: EOF while looking for value in RCS file 
${CVSROOT_DIRNAME}/first-dir/file1,v"
+         cat <<EOF >$TESTDIR/file1,v
+head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
+; author jeremiah ;state ;  branches; next;desc @@1.1 log @@text @head@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+         dotest rcs3-4 "${testcvs} -q co first-dir" 'U first-dir/file1'
+
+         # Ouch, didn't expect this one.  FIXCVS.  Or maybe just remove
+         # the feature, if this is a -s problem?
+         dotest_fail rcs3-5 "${testcvs} log -s nostate first-dir/file1" \
+"${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}"
+         cd first-dir
+         dotest_fail rcs3-5a "${testcvs} log -s nostate file1" \
+"${DOTSTAR}ssertion.*failed${DOTSTAR}" "${DOTSTAR}failed assertion${DOTSTAR}"
+         cd ..
+
+         # See remote code above for rationale for cd.
+         cd first-dir
+         dotest rcs3-6 "${testcvs} log -R file1" \
+"${CVSROOT_DIRNAME}/first-dir/file1,v"
+
+         # OK, now put an extraneous '\0' at the end.
+         mv $CVSROOT_DIRNAME/first-dir/file1,v $TESTDIR/file1,v
+         ${AWK} </dev/null 'BEGIN { printf "@%c", 10 }' | ${TR} '@' '\000' \
+           >>$TESTDIR/file1,v
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/first-dir/file1,v
+         dotest_fail rcs3-7 "${testcvs} log -s nostate file1" \
+"${SPROG} \[log aborted\]: unexpected '.x0' reading revision number in RCS 
file ${CVSROOT_DIRNAME}/first-dir/file1,v"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       rcs4)
+         # Fix a bug that shows up when checking out files by date with the
+         # "-D date" command line option.  There is code in the original to
+         # handle a special case.  If the date search finds revision 1.1 it
+         # is supposed to check whether revision 1.1.1.1 has the same date
+         # stamp, which would indicate that the file was originally brought
+         # in with "cvs import".  In that case it is supposed to return the
+         # vendor branch version 1.1.1.1.
+         # 
+         # However, there is a bug in the code. It actually compares
+         # the date of revision 1.1 for equality with the date given
+         # on the command line -- clearly wrong. This commit fixes
+         # the coding bug.
+         # 
+         # There is an additional bug which is _not_ fixed yet. 
+         # The date comparison should not be a strict
+         # equality test. It should allow a fudge factor of, say, 2-3
+         # seconds. Old versions of CVS created the two revisions
+         # with two separate invocations of the RCS "ci" command. We
+         # have many old files in the tree in which the dates of
+         # revisions 1.1 and 1.1.1.1 differ by 1 second.
+
+         # Need a predictable time zone.
+         save_TZ=$TZ
+         TZ=UTC0; export TZ
+
+          mkdir rcs4
+          cd rcs4
+
+         mkdir imp-dir
+         cd imp-dir
+         echo 'OpenMunger sources' >file1
+
+         # choose a time in the past to demonstrate the problem
+         touch -t 200012010123 file1
+
+         dotest_sort rcs4-1 \
+"${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_0" \
+'
+
+N rcs4-dir/file1
+No conflicts created by this import'
+         echo 'OpenMunger sources release 1.1 extras' >>file1
+         touch -t 200112011234 file1
+         dotest_sort rcs4-2 \
+"${testcvs} import -d -m add rcs4-dir openmunger openmunger-1_1" \
+'
+
+No conflicts created by this import
+U rcs4-dir/file1'
+         cd ..
+         # Next checkout the new module
+         dotest rcs4-3 \
+"${testcvs} -q co rcs4-dir" \
+'U rcs4-dir/file1'
+         cd rcs4-dir
+         echo 'local change' >> file1
+
+         # commit a local change
+         dotest rcs4-4 "${testcvs} -q commit -m hack file1" \
+"$CVSROOT_DIRNAME/rcs4-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         # now see if we get version 1.1 or 1.1.1.1 when we ask for
+         # a checkout by time... it really should be 1.1.1.1 as
+          # that was indeed the version that was visible at the target
+         # time.
+         dotest rcs4-5 \
+"${testcvs} -q update -D 'October 1, 2001 UTC' file1" \
+'U file1'
+         dotest rcs4-6 \
+"${testcvs} -q status file1" \
+'===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1\.1\.1.*
+   Repository revision:        1\.1\.1\.1      
'${CVSROOT_DIRNAME}'/rcs4-dir/file1,v
+   Commit Identifier:  '${commitid}'
+   Sticky Tag:         (none)
+   Sticky Date:                2001\.10\.01\.00\.00\.00
+   Sticky Options:     (none)'
+
+         dokeep
+         TZ=$save_TZ
+         cd ../..
+          rm -rf rcs4
+          modify_repo rm -rf $CVSROOT_DIRNAME/rcs4-dir
+         ;;
+
+
+
+       rcs5)
+         # Some tests of the $Log keyword and log message without a trailing
+         # EOL.  This used to look ugly and, in the worst case, could cause
+         # a seg fault due to a buffer overflow.
+         #
+         # Note that it should not be possible to create this situation via a
+         # CVS server (and any client), since the server itself inserts the
+         # trailing EOL onto log messages that are missing one.  Still, we
+         # shouldn't segfault due to a corrupt RCS file and I think that a log
+         # message without the trailing EOL doesn't actually violate the RCS
+         # spec, though it doesn't appear to be possible to create such a log
+         # message using RCS 5.7.
+
+         modify_repo mkdir $CVSROOT_DIRNAME/rcs5
+         cat <<\EOF >$TESTDIR/file1,v
+head 1.1;
+access;
+symbols;
+locks;
+expand kv;
+
+1.1 date 2007.03.20.04.03.02; author jeremiah; state Ext;  branches; next;
+
+desc
+@@
+
+1.1
+log
address@hidden always had very fine wine@
+text
address@hidden
+/*
+EOF
+echo ' * History: $''Log$' >>$TESTDIR/file1,v
+         cat <<\EOF >>$TESTDIR/file1,v
+ */
+line5
+@
+EOF
+         modify_repo mv $TESTDIR/file1,v $CVSROOT_DIRNAME/rcs5/file1,v
+
+          mkdir rcs5
+          cd rcs5
+         dotest rcs5-1 "$testcvs -Q co rcs5"
+         dotest rcs5-2 "cat rcs5/file1" \
+"line1
+/\\*
+ \\* History: "'\$'"Log: file1,v "'\$'"
+ \\* History: Revision 1\.1  2007/03/20 04:03:02  jeremiah
+ \\* History: he always had very fine wine
+ \\* History:
+ \\*/
+line5"
+
+         cd ..
+          rm -rf rcs5
+          modify_repo rm -rf $CVSROOT_DIRNAME/rcs5
+         ;;
+
+
+
+       lockfiles)
+         # Tests of CVS lock files.
+         # TODO-maybe: Add a test where we arrange for a loginfo
+         # script (or some such) to ensure that locks are in place
+         # so then we can see how they are behaving.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         mkdir 1; cd 1
+         mkdir sdir
+         mkdir sdir/ssdir
+         echo file >sdir/ssdir/file1
+         dotest lockfiles-1 \
+"${testcvs} -Q import -m import-it first-dir bar baz" ""
+         cd ..
+
+         mkdir 2; cd 2
+         dotest lockfiles-2 "${testcvs} -q co first-dir" \
+"U first-dir/sdir/ssdir/file1"
+         dotest lockfiles-3 "${testcvs} -Q co CVSROOT" ""
+         cd CVSROOT
+         echo "LockDir=${TESTDIR}/locks" >>config
+         dotest lockfiles-4 "${testcvs} -q ci -m config-it" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+         cd ../first-dir/sdir/ssdir
+         # The error message appears twice because Lock_Cleanup only
+         # stops recursing after the first attempt.
+         dotest_fail lockfiles-5 "${testcvs} -q update" \
+"${SPROG} \[update aborted\]: cannot stat ${TESTDIR}/locks: No such file or 
directory"
+         mkdir ${TESTDIR}/locks
+         # Grumble, mumble.  Cygwin.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod u=rwx,g=r,o= ${TESTDIR}/locks"
+         else
+           chmod u=rwx,g=r,o= ${TESTDIR}/locks
+         fi
+         save_umask=`umask`
+         umask 0077
+         CVSUMASK=0077; export CVSUMASK
+         dotest lockfiles-6 "${testcvs} -q update" ""
+         # TODO: should also be testing that CVS continues to honor the
+         # umask and CVSUMASK normally.  In the case of the umask, CVS
+         # doesn't seem to use it for much (although it perhaps should).
+         dotest lockfiles-7 "ls ${TESTDIR}/locks/first-dir/sdir/ssdir" ""
+
+         # The policy is that when CVS creates new lock directories, they
+         # inherit the permissions from the parent directory.  CVSUMASK
+         # isn't right, because typically the reason for LockDir is to
+         # use a different set of permissions.
+         #
+         # Bah!  Cygwin!
+         if test -n "$remotehost"; then
+           dotest lockfiles-7a "$CVS_RSH $remotehost 'ls -ld 
${TESTDIR}/locks/first-dir'" \
+"drwxr-----.*first-dir"
+           dotest lockfiles-7b "$CVS_RSH $remotehost 'ls -ld 
${TESTDIR}/locks/first-dir/sdir/ssdir'" \
+"drwxr-----.*first-dir/sdir/ssdir"
+         else
+           dotest lockfiles-7a "ls -ld ${TESTDIR}/locks/first-dir" \
+"drwxr-----.*first-dir"
+           dotest lockfiles-7b "ls -ld ${TESTDIR}/locks/first-dir/sdir/ssdir" \
+"drwxr-----.*first-dir/sdir/ssdir"
+         fi
+
+         cd ../../..
+         dotest lockfiles-8 "${testcvs} -q update" ""
+         dotest lockfiles-9 "${testcvs} -q co -l ." ""
+
+         ###
+         ### There are race conditions in the following tests, but hopefully
+         ### the 5 seconds the first process waits to remove the lockdir and
+         ### the 30 seconds CVS waits betweens checks will be significant
+         ### enough to render the case moot.
+         ###
+         # Considers the following cases:
+         #
+         #                    Lock Present
+         # Operation          Allowed (case #)
+         #
+         #                    Read      Promotable   Write
+         #                    _______   __________   ______
+         # Read              |Yes (1)   Yes (2)      No (3)
+         # Promotable Read   |Yes (4)   No (5)       No (6)
+         # Write             |No (7)    No (8)       No (9)
+         #
+         # Tests do not appear in same ordering as table:
+         # 1. Read when read locks are present...
+         # 2. Read when promotable locks are present...
+         # 3. Don't read when write locks present...
+         # 4. Read but don't write when read locks are present... (fail
+         #    commit up-to-date check with promotable lock present).
+         # 5. Don't allow promotable read when promotable locks are present...
+         #    (fail to perform commit up-to-date check with promotable lock
+         #     present).
+         # 6. Don't allow promotable read when write locks are present...
+         #    (fail to perform commit up-to-date check with promotable lock
+         #     present).
+         # 7. Don't write when read locks are present...
+         # 8. Don't write when promotable locks are present...
+         # 9. Don't write when write locks are present...
+
+         # 3. Don't read when write locks present...
+         mkdir "$TESTDIR/locks/first-dir/#cvs.lock"
+         (sleep 5; rmdir "$TESTDIR/locks/first-dir/#cvs.lock")&
+         dotest lockfiles-10 "$testcvs -q co -l first-dir" \
+"$SPROG checkout: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/first-dir
+$SPROG checkout: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/first-dir"
+
+         # 1. Read when read locks are present...
+         touch "$TESTDIR/locks/first-dir/#cvs.rfl.test.lock"
+         dotest lockfiles-11 "$testcvs -q co -l first-dir"
+         rm "$TESTDIR/locks/first-dir/#cvs.rfl.test.lock"
+
+         # 2. Read when promotable locks are present...
+         cd ..
+         mkdir 3; cd 3
+         touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
+         dotest lockfiles-12 "$testcvs -q co first-dir" \
+"U first-dir/sdir/ssdir/file1"
+         rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
+
+         # 7. Don't write when read locks are present...
+         echo I always have trouble coming up with witty text for the test 
files >>first-dir/sdir/ssdir/file1
+         touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock"
+         (sleep 5; rm 
"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock")&
+         dotest lockfiles-13 "$testcvs -q ci -mconflict first-dir" \
+"$SPROG commit: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: \[[0-9:]*\] obtained lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v  <--  first-dir/sdir/ssdir/file1
+new revision: 1\.2; previous revision: 1\.1"
+
+         # 4. Read but don't write when read locks are present... (fail
+         #    commit up-to-date check with promotable lock present).
+         cd ../2
+         echo something that would render readers all full of smiles 
>>first-dir/sdir/ssdir/file1
+         touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock"
+         dotest_fail lockfiles-14 "$testcvs -q ci -mnot-up-to-date first-dir" \
+"$SPROG commit: Up-to-date check failed for \`first-dir/sdir/ssdir/file1'
+$SPROG \[commit aborted\]: correct above errors first!"
+         rm "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.rfl.test.lock"
+
+         # 5. Don't allow promotable read when promotable locks are present...
+         #    (fail to perform commit up-to-date check with promotable lock
+         #     present).
+         touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
+         (sleep 5; rm 
"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock")&
+         dotest_fail lockfiles-15 "$testcvs -q ci -mnot-up-to-date first-dir" \
+"$SPROG commit: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: \[[0-9:]*\] obtained lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: Up-to-date check failed for \`first-dir/sdir/ssdir/file1'
+$SPROG \[commit aborted\]: correct above errors first!"
+
+         # 6. Don't allow promotable read when write locks are present...
+         #    (fail to perform commit up-to-date check with promotable lock
+         #     present).
+         mkdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock"
+         (sleep 5; rmdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock")&
+         dotest_fail lockfiles-16 "$testcvs -q ci -mnot-up-to-date first-dir" \
+"$SPROG commit: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: \[[0-9:]*\] obtained lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: Up-to-date check failed for \`first-dir/sdir/ssdir/file1'
+$SPROG \[commit aborted\]: correct above errors first!"
+
+         # 8. Don't write when promotable locks are present...
+         dotest lockfiles-17 "$testcvs -Q up -C first-dir/sdir/ssdir"
+         echo the kinds of smiles that light faces for miles 
>>first-dir/sdir/ssdir/file1
+         touch "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock"
+         (sleep 5; rm 
"$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.pfl.test.lock")&
+         dotest lockfiles-18 "$testcvs -q ci -mnot-up-to-date first-dir" \
+"$SPROG commit: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: \[[0-9:]*\] obtained lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v  <--  first-dir/sdir/ssdir/file1
+new revision: 1\.3; previous revision: 1\.2"
+
+         # 9. Don't write when write locks are present...
+         echo yet this poem would probably only give longfellow bile 
>>first-dir/sdir/ssdir/file1
+         mkdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock"
+         (sleep 5; rmdir "$TESTDIR/locks/first-dir/sdir/ssdir/#cvs.lock")&
+         dotest lockfiles-19 "$testcvs -q ci -mnot-up-to-date first-dir" \
+"$SPROG commit: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$SPROG commit: \[[0-9:]*\] obtained lock in 
$CVSROOT_DIRNAME/first-dir/sdir/ssdir
+$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v  <--  first-dir/sdir/ssdir/file1
+new revision: 1\.4; previous revision: 1\.3"
+
+         # 10. Don't write when history locks are present...
+         echo have you ever heard a poem quite so vile\? 
>>first-dir/sdir/ssdir/file1
+         mkdir "$TESTDIR/locks/CVSROOT/#cvs.history.lock"
+         (sleep 5; rmdir "$TESTDIR/locks/CVSROOT/#cvs.history.lock")&
+         dotest lockfiles-20 "$testcvs -q ci -mnot-up-to-date first-dir" \
+"$CVSROOT_DIRNAME/first-dir/sdir/ssdir/file1,v  <--  first-dir/sdir/ssdir/file1
+new revision: 1\.5; previous revision: 1\.4
+$SPROG commit: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/CVSROOT
+$SPROG commit: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/CVSROOT"
+
+         dotest lockfiles-21 "$testcvs -Q tag newtag first-dir"
+
+         rm $CVSROOT_DIRNAME/CVSROOT/val-tags
+         mkdir "$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock"
+         (sleep 5; rmdir "$TESTDIR/locks/CVSROOT/#cvs.val-tags.lock")&
+         dotest lockfiles-22 "$testcvs -q up -r newtag first-dir" \
+"$SPROG update: \[[0-9:]*\] waiting for $username's lock in 
$CVSROOT_DIRNAME/CVSROOT
+$SPROG update: \[[0-9:]*\] obtained lock in $CVSROOT_DIRNAME/CVSROOT"
+
+         cd CVSROOT
+         dotest lockfiles-cleanup-1 "$testcvs -q up -pr1.1 config >config" ""
+         dotest lockfiles-cleanup-2 "$testcvs -q ci -m config-it" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+         dokeep
+         cd ../..
+         # Restore umask.
+         umask $save_umask
+         unset CVSUMASK
+         rm -r $TESTDIR/locks
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       backuprecover)
+         # Tests to make sure we get the expected behavior
+         # when we recover a repository from an old backup
+         #
+         # Details:
+         #   Backup will be older than some developer's workspaces
+         #     This means the first attempt at an update will fail
+         #     The workaround for this is to replace the CVS
+         #       directories with those from a "new" checkout from
+         #       the recovered repository.  Due to this, multiple
+         #       merges should cause conflicts (the same data
+         #       will be merged more than once).
+         #     A workspace updated before the date of the recovered
+         #       copy will not need any extra attention
+         #
+         # Note that backuprecover-15 is probably a failure case
+         #   If nobody else had a more recent update, the data would be lost
+         #     permanently
+         #   Granted, the developer should have been notified not to do this
+         #     by now, but still...
+         #
+         mkdir backuprecover; cd backuprecover
+         mkdir 1; cd 1
+         dotest backuprecover-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest backuprecover-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+         mkdir dir
+         dotest backuprecover-3 "${testcvs} add dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository"
+         touch file1 dir/file2
+         dotest backuprecover-4 "${testcvs} -q add file1 dir/file2" \
+"${SPROG} add: use \`${SPROG} commit' to add these files permanently"
+         dotest backuprecover-5 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+initial revision: 1\.1"
+         echo "Line one" >>file1
+         echo "  is the place" >>file1
+         echo "    we like to begin" >>file1
+         echo "Anything else" >>file1
+         echo "  looks like" >>file1
+         echo "    a sin" >>file1
+         echo "File 2" >>dir/file2
+         echo "  is the place" >>dir/file2
+         echo "    the rest of it goes"  >>dir/file2
+         echo "Why I don't use" >>dir/file2
+         echo "  something like 'foo'" >>dir/file2
+         echo "    God only knows" >>dir/file2
+         dotest backuprecover-6 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.2; previous revision: 1\.1"
+
+         # Simulate the lazy developer
+         # (he did some work but didn't check it in...)
+         cd ../..
+         mkdir 2; cd 2
+         dotest backuprecover-7 "${testcvs} -Q co first-dir" ''
+         cd first-dir
+         sed -e "s/looks like/just looks like/" file1 >tmp; mv tmp file1
+         sed -e "s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2
+
+         # developer 1 is on a roll
+         cd ../../1/first-dir
+         echo "I need some more words" >>file1
+         echo "  to fill up this space" >>file1
+         echo "    anything else would be a disgrace" >>file1
+         echo "My rhymes cross many boundries" >>dir/file2
+         echo "  this time it's files" >>dir/file2
+         echo "    a word that fits here would be something like dials" 
>>dir/file2
+         dotest backuprecover-8 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.3; previous revision: 1\.2"
+
+         # Save a backup copy
+         cp -R $CVSROOT_DIRNAME/first-dir $TESTDIR/backup
+
+         # Simulate developer 3
+         cd ../..
+         mkdir 3; cd 3
+         dotest backuprecover-9a "${testcvs} -Q co first-dir" ''
+         cd first-dir
+         echo >>file1
+         echo >>dir/file2
+         echo "Developer 1 makes very lame rhymes" >>file1
+         echo "  I think he should quit and become a mime" >>file1
+         echo "What the %*^# kind of rhyme crosses a boundry?" >>dir/file2
+         echo "  I think you should quit and get a job in the foundry" 
>>dir/file2
+         dotest backuprecover-9b "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.4; previous revision: 1\.3
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.4; previous revision: 1\.3"
+
+         # Developer 4 so we can simulate a conflict later...
+         cd ../..
+         mkdir 4; cd 4
+         dotest backuprecover-10 "${testcvs} -Q co first-dir" ''
+         cd first-dir
+         sed -e "s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp 
dir/file2
+
+         # And back to developer 1
+         cd ../../1/first-dir
+         dotest backuprecover-11 "${testcvs} -Q update" ''
+         echo >>file1
+         echo >>dir/file2
+         echo "Oh yeah, well rhyme this" >>file1
+         echo "  developer three" >>file1
+         echo "    you want opposition" >>file1
+         echo "      you found some in me!" >>file1
+         echo "I'll give you mimes" >>dir/file2
+         echo "  and foundries galore!"  >>dir/file2
+         echo "    your head will spin" >>dir/file2
+         echo "      once you find what's in store!" >>dir/file2
+         dotest backuprecover-12 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.5; previous revision: 1\.4
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.5; previous revision: 1\.4"
+
+         # developer 3'll do a bit of work that never gets checked in
+         cd ../../3/first-dir
+         dotest backuprecover-13 "${testcvs} -Q update" ''
+         sed -e "s/very/some extremely/" file1 >tmp; mv tmp file1
+         dotest backuprecover-14 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.6; previous revision: 1\.5"
+         echo >>file1
+         echo "Tee hee hee hee" >>file1
+         echo >>dir/file2
+         echo "Find what's in store?" >>dir/file2
+         echo "  Oh, I'm so sure!" >>dir/file2
+         echo "    You've got an ill, and I have the cure!"  >>dir/file2
+
+         # Slag the original and restore it a few revisions back
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         modify_repo mv $TESTDIR/backup $CVSROOT_DIRNAME/first-dir
+
+         # Have developer 1 try an update and lose some data
+         #
+         # Feel free to imagine the horrific scream of despair
+         cd ../../1/first-dir
+         if $remote && test -z "$CVSNOBASES"; then
+           # FIXCVS
+           # See the note above about lost data and a few other comments in
+           # other tests.  At least with base files, no data is lost, but this
+           # is a side effect of sending diffs against bases and should
+           # probably be caught explicitly, such that it would also be caught
+           # in local mode.
+           dotest_fail backuprecover-15r "$testcvs update" \
+"$SPROG update: Updating .
+$SPROG \[update aborted\]: could not find desired version 1\.5 in 
$CVSROOT_DIRNAME/first-dir/file1,v"
+         else
+           dotest backuprecover-15 "$testcvs update" \
+"$SPROG update: Updating .
+U file1
+$SPROG update: Updating dir
+U dir/file2"
+         fi
+
+         # Developer 3 tries the same thing (he has an office)
+         # but fails without losing data since all of his files have
+         # uncommitted changes
+         cd ../../3/first-dir
+         dotest_fail backuprecover-16 "${testcvs} update" \
+"${SPROG} update: Updating \.
+${SPROG} \[update aborted\]: could not find desired version 1\.6 in 
${CVSROOT_DIRNAME}/first-dir/file1,v"
+
+         # create our workspace fixin' script
+         cd ../..
+         echo \
+"#!$TESTSHELL
+
+# This script will copy the CVS database dirs from the checked out
+# version of a newly recovered repository and replace the CVS
+# database dirs in a workspace with later revisions than those in the
+# recovered repository
+cd repos-first-dir
+DATADIRS=\`find . -name CVS -print\`
+cd ../first-dir
+find . -name CVS -print | xargs rm -rf
+for file in \${DATADIRS}; do
+       cp -R ../repos-first-dir/\${file} \${file}
+done" >fixit
+
+         # We only need to fix the workspaces of developers 3 and 4
+         # (1 lost all her data and 2 has an update date from
+         # before the date the backup was made)
+         cd 3
+         dotest backuprecover-17 \
+               "${testcvs} -Q co -d repos-first-dir first-dir" ''
+         cd ../4
+         dotest backuprecover-18 \
+               "${testcvs} -Q co -d repos-first-dir first-dir" ''
+         sh ../fixit
+         cd ../3; sh ../fixit
+
+         # (re)commit developer 3's stuff
+         cd first-dir
+         dotest backuprecover-19 "${testcvs} -q ci -mrecover/merge" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.4; previous revision: 1\.3
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.4; previous revision: 1\.3"
+
+         # and we should get a conflict on developer 4's stuff
+         cd ../../4/first-dir
+         dotest backuprecover-20 "${testcvs} update" \
+"${SPROG} update: Updating \.
+Merging differences between 1\.3 and 1\.4 into \`file1'
+$CPROG update: conflicts during merge
+C file1
+$SPROG update: Updating dir
+Merging differences between 1\.3 and 1\.4 into \`dir/file2'
+$CPROG update: conflicts during merge
+C dir/file2"
+         sed -e \
+"/^<<<<<<</,/^=======/d
+/^>>>>>>>/d" file1 >tmp; mv tmp file1
+         sed -e \
+"/^<<<<<<</,/^=======/d
+/^>>>>>>>/d
+s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
+         dotest backuprecover-21 "${testcvs} -q ci -mrecover/merge" \
+"$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.5; previous revision: 1\.4"
+
+         # go back and commit developer 2's stuff to prove it can still be done
+         cd ../../2/first-dir
+         dotest backuprecover-22 "$testcvs -Q update"
+         dotest backuprecover-23 "${testcvs} -q ci -mtest" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.5; previous revision: 1\.4
+$CVSROOT_DIRNAME/first-dir/dir/file2,v  <--  dir/file2
+new revision: 1\.6; previous revision: 1\.5"
+
+         # and restore the data to developer 1
+         cd ../../1/first-dir
+         dotest backuprecover-24 "$testcvs -Q update" 
+
+         dokeep
+         cd ../../..
+         rm -rf backuprecover
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+        sshstdio)
+          # CVS_RSH=ssh can have a problem with a non-blocking stdio
+          # in some cases. So, this test is all about testing :ext:
+          # with CVS_RSH=ssh. The problem is that not all machines
+          # will necessarily have ssh available, so be prepared to
+          # skip this test.
+
+         if $proxy; then
+            notproxy sshstdio
+           continue
+         fi
+
+          if $remote; then :; else
+            remoteonly sshstdio
+           continue
+         fi
+
+         require_ssh
+         if test $? -eq 77; then
+            skip sshstdio "$skipreason"
+           continue
+         fi
+
+         SSHSTDIO_ROOT=:ext:$host$CVSROOT_DIRNAME
+
+          mkdir sshstdio; cd sshstdio
+          dotest sshstdio-1 "$testcvs -d $SSHSTDIO_ROOT -q co -l ."
+          mkdir first-dir
+          dotest sshstdio-2 "$testcvs add first-dir" \
+  "Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+          cd first-dir
+          
a='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+          
c='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
+          # Generate 1024 lines of $a
+          cnt=0
+          echo $a > aaa
+          while [ $cnt -lt 5 ] ; do
+            cnt=`expr $cnt + 1` ;
+            mv aaa aaa.old
+            cat aaa.old aaa.old aaa.old aaa.old > aaa
+          done
+          dotest sshstdio-3 "$testcvs -q add aaa" \
+"$SPROG add: use .$SPROG commit. to add this file permanently"
+          dotest sshstdio-4 "$testcvs -q ci -mcreate aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+initial revision: 1\.1"
+          # replace lines 1, 512, 513, 1024 with $c
+          sed 510q < aaa > aaa.old
+          (echo $c; cat aaa.old; echo $c; \
+           echo $c; cat aaa.old; echo $c) > aaa
+          dotest sshstdio-5 "$testcvs -q ci -mmodify-it aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.2; previous revision: 1\.1"
+          cat > wrapper.sh <<EOF
+#!$TESTSHELL
+exec "\$@" 2>&1 < /dev/null | cat
+EOF
+          chmod +x wrapper.sh
+          ./wrapper.sh \
+           $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \
+             aaa > wrapper.dif
+  
+          $testcvs -z5 -Q diff --side-by-side -W 500 -r 1.1 -r 1.2 \
+             aaa > good.dif
+  
+          dotest sshstdio-6 "$diff_u wrapper.dif good.dif"
+
+         dokeep
+          cd ../..
+          CVS_RSH=$save_CVS_RSH; export CVS_RSH
+          rm -r sshstdio
+          rm -rf $CVSROOT_DIRNAME/first-dir
+          ;;
+
+
+
+       parseroot2)
+         # Test some :ext: roots for consistancy.
+         if $remote; then :; else
+           remoteonly parseroot2
+           continue
+         fi
+
+         require_rsh "$CVS_RSH"
+         if test $? -eq 77; then
+           skip parseroot2 "$skipreason"
+           continue
+         fi
+
+         # Test checking out and subsequently updating with some different
+         # CVSROOTs.
+
+         # A standard case, hostname:dirname.
+         mkdir parseroot2; cd parseroot2
+         save_CVSROOT=$CVSROOT
+         CVSROOT=$host:$CVSROOT_DIRNAME
+         dotest parseroot2-1 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         dotest parseroot2-2 "$testcvs -Q up"
+         cd ..
+
+         # A degenerate remote case, just the server name and the directory
+         # name, with no :'s to help parsing.  It can be mistaken for a
+         # relative directory name.
+         rm -rf CVSROOT
+         CVSROOT=$host$CVSROOT_DIRNAME
+         dotest parseroot2-3 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         dotest parseroot2-4 "$testcvs -Q up"
+
+         dokeep
+         cd ../..
+         CVSROOT=$save_CVSROOT
+         rm -rf parseroot2
+         ;;
+
+
+
+       parseroot3)
+         # Test some :ext: roots for consistancy.
+         if $remote; then :; else
+           remoteonly parseroot3
+           continue
+         fi
+
+         require_rsh "$CVS_RSH"
+         if test $? -eq 77; then
+           skip parseroot3 "$skipreason"
+           continue
+         fi
+
+         # Test checking out and subsequently updating with some different
+         # CVSROOTs.
+
+         # A standard case, hostname:dirname.
+         mkdir parseroot3; cd parseroot3
+         save_CVSROOT=$CVSROOT
+         save_CVS_RSH=$CVS_RSH
+         save_CVS_SERVER=$CVS_SERVER
+         unset CVS_RSH
+         unset CVS_SERVER
+         
CVSROOT=":ext;CVS_RSH=$save_CVS_RSH;CVS_SERVER=$save_CVS_SERVER:$host:$CVSROOT_DIRNAME"
+         dotest parseroot3-1 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         dotest parseroot3-2 "$testcvs -Q up"
+         cd ..
+
+         # Initial checkout.
+         rm -rf CVSROOT
+         
CVSROOT=":ext;cvs_RSH=$save_CVS_RSH;CVS_Server=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
+         dotest parseroot3-3 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         dotest parseroot3-4 "$testcvs -Q up"
+         cd ..
+
+         # Checkout bogus values for Redirect
+         rm -rf CVSROOT
+         
CVSROOT=":ext;Redirect=bogus;CVS_RSH=$save_CVS_RSH;CVS_SERVER=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
+         dotest parseroot3-5 "$testcvs -Q co CVSROOT" \
+"$SPROG checkout: CVSROOT: unrecognized value \`bogus' for \`Redirect'"
+         cd CVSROOT
+         # FIXCVS: parse_cvsroot is called more often that is
+         # desirable.    
+         dotest parseroot3-6 "$testcvs -Q up" \
+"$SPROG update: CVSROOT: unrecognized value \`bogus' for \`Redirect'"
+         cd ..
+
+         # Checkout good values for Redirect
+         rm -rf CVSROOT
+         
CVSROOT=":EXT;Redirect=no;CVS_RSH=$save_CVS_RSH;CVS_SERVER=$save_CVS_SERVER:$host$CVSROOT_DIRNAME"
+         dotest parseroot3-7 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         dotest parseroot3-8 "$testcvs -Q up"
+         cd ..
+
+         dotest parseroot3-9 "$testcvs -Q co -ldtop ."
+         dotest parseroot3-10 "test -d top"
+         dotest parseroot3-11 "test -d top/CVS"
+         dotest parseroot3-10 "cat top/CVS/Root" "$CVSROOT"
+
+         dokeep
+         cd ..
+         CVSROOT=$save_CVSROOT
+         CVS_RSH=$save_CVS_RSH
+         CVS_SERVER=$save_CVS_SERVER
+         export CVS_RSH CVS_SERVER
+         rm -rf parseroot3
+         ;;
+
+
+
+       history)
+         # CVSROOT/history tests:
+         # history: various "cvs history" invocations
+         # basic2: Generating the CVSROOT/history file via CVS commands.
+
+         # Put in some data for the history file (discarding what was
+         # there before).  Note that this file format is fixed; the
+         # user may wish to analyze data from a previous version of
+         # CVS.  If we phase out this format, it should be done
+         # slowly and carefully.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         cat <<EOF >$CVSROOT_DIRNAME/CVSROOT/history
+O3395c677|anonymous|<remote>/*0|ccvs||ccvs
+O3396c677|anonymous|<remote>/src|ccvs||src
+O3397c677|kingdon|<remote>/*0|ccvs||ccvs
+M339cafae|nk|<remote>|ccvs/src|1.229|sanity.sh
+M339cafff|anonymous|<remote>|ccvs/src|1.23|Makefile
+M339dc339|kingdon|~/work/*0|ccvs/src|1.231|sanity.sh
+W33a6eada|anonymous|<remote>*4|ccvs/emx||Makefile.in
+C3b235f50|kingdon|<remote>|ccvs/emx|1.3|README
+M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo
+EOF
+
+         dotest history-1 "${testcvs} history -e -a" \
+"O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs     =ccvs= <remote>/\*
+O 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs     =src=  <remote>/\*
+M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23  Makefile    ccvs/src == 
<remote>
+W 1997-06-17 19:51 ${PLUS}0000 anonymous       Makefile\.in ccvs/emx == 
<remote>/emx
+O 1997-06-06 08:12 ${PLUS}0000 kingdon   ccvs     =ccvs= <remote>/\*
+M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity\.sh   ccvs/src == 
~/work/ccvs/src
+C 2001-06-10 11:51 ${PLUS}0000 kingdon   1\.3   README      ccvs/emx == 
<remote>
+M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs\.texinfo ccvs/doc == 
~/work/ccvs/doc
+M 1997-06-10 01:36 ${PLUS}0000 nk        1\.229 sanity\.sh   ccvs/src == 
<remote>"
+
+         dotest history-2 "${testcvs} history -e -a -D '10 Jun 1997 13:00 UT'" 
\
+"W 1997-06-17 19:51 ${PLUS}0000 anonymous       Makefile\.in ccvs/emx == 
<remote>/emx
+M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity\.sh   ccvs/src == 
~/work/ccvs/src
+C 2001-06-10 11:51 ${PLUS}0000 kingdon   1\.3   README      ccvs/emx == 
<remote>
+M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs\.texinfo ccvs/doc == 
~/work/ccvs/doc"
+
+         dotest history-3 "${testcvs} history -e -a -D '10 Jun 2001 13:00 UT'" 
\
+"M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == 
~/work/ccvs/doc"
+
+         dotest history-4 "${testcvs} history -ac sanity.sh" \
+"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == 
~/work/ccvs/src
+M 1997-06-10 01:36 ${PLUS}0000 nk      1\.229 sanity\.sh ccvs/src == <remote>"
+
+         dotest history-5 "${testcvs} history -a -xCGUWAMR README sanity.sh" \
+"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == 
~/work/ccvs/src
+C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3   README    ccvs/emx == <remote>
+M 1997-06-10 01:36 ${PLUS}0000 nk      1\.229 sanity\.sh ccvs/src == <remote>"
+
+         dotest history-6 "${testcvs} history -xCGUWAMR -a -f README -f 
sanity.sh" \
+"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == 
~/work/ccvs/src
+C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3   README    ccvs/emx == <remote>
+M 1997-06-10 01:36 ${PLUS}0000 nk      1\.229 sanity\.sh ccvs/src == <remote>"
+
+         dotest history-7 "${testcvs} history -xCGUWAMR -a -f sanity.sh 
README" \
+"M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == 
~/work/ccvs/src
+C 2001-06-10 11:51 ${PLUS}0000 kingdon 1\.3   README    ccvs/emx == <remote>
+M 1997-06-10 01:36 ${PLUS}0000 nk      1\.229 sanity\.sh ccvs/src == <remote>"
+
+         dotest history-8 "${testcvs} history -ca -D '1970-01-01 00:00 UT'" \
+"M 1997-06-10 01:36 ${PLUS}0000 nk        1\.229 sanity.sh   ccvs/src == 
<remote>
+M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23  Makefile    ccvs/src == 
<remote>
+M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity.sh   ccvs/src == 
~/work/ccvs/src
+M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs.texinfo ccvs/doc == 
~/work/ccvs/doc"
+
+         dotest history-9 "${testcvs} history -acl" \
+"M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs.texinfo ccvs/doc == 
~/work/ccvs/doc
+M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23  Makefile    ccvs/src == 
<remote>
+M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity.sh   ccvs/src == 
~/work/ccvs/src"
+
+         dotest history-10 "${testcvs} history -lca -D '1970-01-01 00:00 UT'" \
+"M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs.texinfo ccvs/doc == 
~/work/ccvs/doc
+M 1997-06-10 01:38 ${PLUS}0000 anonymous 1\.23  Makefile    ccvs/src == 
<remote>
+M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity.sh   ccvs/src == 
~/work/ccvs/src"
+
+         dotest history-11 "${testcvs} history -aw" \
+"O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
+O 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src=  <remote>/\*
+O 1997-06-06 08:12 ${PLUS}0000 kingdon   ccvs =ccvs= <remote>/\*"
+
+         dotest history-12 "${testcvs} history -aw -D'1970-01-01 00:00 UT'" \
+"O 1997-06-04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
+O 1997-06-05 14:00 ${PLUS}0000 anonymous ccvs =src=  <remote>/\*
+O 1997-06-06 08:12 ${PLUS}0000 kingdon   ccvs =ccvs= <remote>/\*"
+         ;;
+
+
+
+       big)
+
+         # Test ability to operate on big files.  Intention is to
+         # test various realloc'ing code in RCS_deltas, rcsgetkey,
+         # etc.  "big" is currently defined to be 1000 lines (64000
+         # bytes), which in terms of files that users will use is not
+         # large, merely average, but my reasoning is that this
+         # should be big enough to make sure realloc'ing is going on
+         # and that raising it a lot would start to stress resources
+         # on machines which run the tests, without any significant
+         # benefit.
+
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest big-1 "$testcvs -q co first-dir"
+         cd first-dir
+         for i in 0 1 2 3 4 5 6 7 8 9; do
+           for j in 0 1 2 3 4 5 6 7 8 9; do
+             for k in 0 1 2 3 4 5 6 7 8 9; do
+               echo \
+"This is line ($i,$j,$k) which goes into the file file1 for testing" >>file1
+             done
+           done
+         done
+         dotest big-2 "$testcvs add file1" \
+"$SPROG add: scheduling file .file1. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest big-3 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ..
+         mkdir 2
+         cd 2
+         dotest big-4 "$testcvs -q get first-dir" "U first-dir/file1"
+         cd ../first-dir
+         echo "add a line to the end" >>file1
+
+         dotest_fail big-4b "$testcvs -q diff -u" \
+"Index: file1
+===================================================================
+RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
+retrieving revision 1\.1
+diff -u -r1\.1 file1
+--- file1      $RFCDATE        1\.1
+$PLUS$PLUS$PLUS file1  $RFCDATE
+@@ -998,3 ${PLUS}998,4 @@
+ This is line (9,9,7) which goes into the file file1 for testing
+ This is line (9,9,8) which goes into the file file1 for testing
+ This is line (9,9,9) which goes into the file file1 for testing
+${PLUS}add a line to the end"
+
+         dotest big-5 "$testcvs -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         cd ../2/first-dir
+         # The idea here is particularly to test the Rcs-diff response
+         # and the reallocing thereof, for remote.
+         dotest big-6 "$testcvs -q update" "U file1"
+
+         dokeep
+         cd ../..
+         rm -rf first-dir 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       modes)
+         # Test repository permissions (CVSUMASK and so on).
+         # Although the tests in this section "cheat" by testing
+         # repository permissions, which are sort of not a user-visible
+         # sort of thing, the modes do have user-visible consequences,
+         # such as whether a second user can check out the files.  But
+         # it would be awkward to test the consequences, so we don't.
+
+         # Solaris /bin/sh doesn't support export -n.  I'm not sure
+         # what we can do about this, other than hope that whoever
+         # is running the tests doesn't have CVSUMASK set.
+         #export -n CVSUMASK # if unset, defaults to 002
+
+         save_umask=`umask`
+         umask 077
+         mkdir 1; cd 1
+         dotest modes-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest modes-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch aa
+         dotest modes-3 "${testcvs} add aa" \
+"${SPROG} add: scheduling file .aa. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest modes-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+initial revision: 1\.1"
+         # Yawn.  Cygwin.
+         if test -n "$remotehost"; then
+           dotest modes-5remotehost "$CVS_RSH $remotehost 'ls -l 
${CVSROOT_DIRNAME}/first-dir/aa,v'" \
+"-r--r--r-- .*"
+         else
+           dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
+"-r--r--r-- .*"
+         fi
+
+         # Test for whether we can set the execute bit.
+         chmod +x aa
+         echo change it >>aa
+         dotest modes-6 "${testcvs} -q ci -m set-execute-bit" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+new revision: 1\.2; previous revision: 1\.1"
+         # If CVS let us update the execute bit, it would be set here.
+         # But it doesn't, and as far as I know that is longstanding
+         # CVS behavior.
+         #
+         # Yeah, yeah.  Search for "Cygwin".
+         if test -n "$remotehost"; then
+           dotest modes-7remotehost "$CVS_RSH $remotehost 'ls -l 
${CVSROOT_DIRNAME}/first-dir/aa,v'" \
+"-r--r--r-- .*"
+         else
+           dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
+"-r--r--r-- .*"
+         fi
+
+         # OK, now manually change the modes and see what happens.
+         #
+         # Cygwin, already.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod g=r,o= 
${CVSROOT_DIRNAME}/first-dir/aa,v"
+         else
+           chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v
+         fi
+         echo second line >>aa
+         dotest modes-7a "${testcvs} -q ci -m set-execute-bit" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+new revision: 1\.3; previous revision: 1\.2"
+         # Cygwin.
+         if test -n "$remotehost"; then
+           dotest modes-7bremotehost "$CVS_RSH $remotehost 'ls -l 
${CVSROOT_DIRNAME}/first-dir/aa,v'" \
+"-r--r----- .*"
+         else
+           dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
+"-r--r----- .*"
+         fi
+
+         # Check admin --execute
+         # Cygwin, already.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost \
+"chmod ugo=r ${CVSROOT_DIRNAME}/first-dir/aa,v"
+         else
+           chmod ugo=r ${CVSROOT_DIRNAME}/first-dir/aa,v
+         fi
+         dotest modes-execute-1 "${testcvs} admin --execute aa" \
+"RCS file: $CVSROOT_DIRNAME/first-dir/aa,v
+done"
+         # Cygwin.
+         if test -n "$remotehost"; then
+           dotest modes-execute-2r \
+"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
+"-r-xr-xr-x .*"
+         else
+           dotest modes-execute-2 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
+"-r-xr-xr-x .*"
+         fi
+
+         # Test if admin --no-execute removes the execute bit:
+         dotest modes-execute-3 "${testcvs} admin --no-execute aa" \
+"RCS file: $CVSROOT_DIRNAME/first-dir/aa,v
+done"
+         # Cygwin.
+         if test -n "$remotehost"; then
+           dotest modes-execue-4r \
+"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v'" \
+"-r--r--r-- .*"
+         else
+           dotest modes-execute-4 \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
+"-r--r--r-- .*"
+         fi
+
+         CVSUMASK=007
+         export CVSUMASK
+         touch ab
+         # Might as well test the execute bit too.
+         chmod +x ab
+         dotest modes-8 "$testcvs add ab" \
+"$SPROG add: scheduling file .ab. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest modes-9 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/ab,v  <--  ab
+initial revision: 1\.1"
+
+         # The ssh-wrapper script set up by this script forwards CVSUMASK to
+         # the server.  In practice it would be set on the server in some
+         # other manner (for instance, by the `env' command, or as an option
+         # in the xinted.conf file).
+         #
+         # I don't recall why, but I used to look for:
+         #
+         #   dotest modes-10remotehost \
+         #   "$CVS_RSH $remotehost 'ls -l $CVSROOT_DIRNAME/first-dir/ab,v'" \
+         #   "-r--r--r--.*"
+         #
+         # here when $remotehost was set.  I'm not sure why.  Maybe this was
+         # one of the innumerable Cygwin issues?
+         dotest modes-10 "ls -l $CVSROOT_DIRNAME/first-dir/ab,v" \
+"-r-xr-x---.*"
+
+         # Checkout --no-execute
+         # Test if admin --no-execute removes the execute bit:
+         dotest modes-execute-5 "${testcvs} admin --no-execute ab" \
+"RCS file: $CVSROOT_DIRNAME/first-dir/ab,v
+done"
+         # Cygwin.
+         if test -n "$remotehost"; then
+           dotest modes-execue-6r \
+"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v'" \
+"-r--r----- .*"
+         else
+           dotest modes-execute-6 \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \
+"-r--r----- .*"
+         dotest modes-execute-7 "${testcvs} admin --execute ab" \
+"RCS file: $CVSROOT_DIRNAME/first-dir/ab,v
+done"
+          fi
+         # Cygwin.
+         if test -n "$remotehost"; then
+           dotest modes-execue-8r \
+"$CVS_RSH $remotehost 'ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v'" \
+"-r-xr-x--- .*"
+         else
+           dotest modes-execute-8 "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \
+"-r-xr-x--- .*"
+          fi
+
+         # OK, now add a file on a branch.  Check that the mode gets
+         # set the same way (it is a different code path in CVS).
+         dotest modes-11 "${testcvs} -q tag -b br" 'T aa
+T ab'
+         dotest modes-12 "${testcvs} -q update -r br" ''
+         touch ac
+         dotest modes-13 "${testcvs} add ac" \
+"${SPROG} add: scheduling file .ac. for addition on branch .br.
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         # Not sure it really makes sense to refer to a "previous revision"
+         # when we are just now adding the file; as far as I know
+         # that is longstanding CVS behavior, for what it's worth.
+         dotest modes-14 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/Attic/ac,v  <--  ac
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         # ssh-wrapper forwards CVSUMASK.  See modes-10 for notes.
+         dotest modes-15 \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
+"-r--r-----.*"
+
+         dokeep
+         cd ../..
+         # Restore umask.
+         umask $save_umask
+         unset CVSUMASK
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       modes2)
+         # More tests of file permissions in the working directory
+         # and that sort of thing.
+
+         # The usual setup, file first-dir/aa with two revisions.
+         mkdir 1; cd 1
+         dotest modes2-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest modes2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch aa
+         dotest modes2-3 "${testcvs} add aa" \
+"${SPROG} add: scheduling file .aa. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest modes2-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+initial revision: 1\.1"
+         echo "more money" >> aa
+         dotest modes2-5 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  aa
+new revision: 1\.2; previous revision: 1\.1"
+
+         # OK, here is the test.  The idea is to see what
+         # No_Difference does if it can't open the file.
+         # If we don't change the st_mtime, CVS doesn't even try to read
+         # the file.  Note that some versions of "touch" require that we
+         # do this while the file is still writable.
+         touch aa
+         chmod a= aa
+         # Don't try this when permissions are broken, as with Cygwin.
+         if ${LS} ${CVSROOT_DIRNAME}/first-dir >/dev/null 2>&1; then :; else
+           dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \
+"${CPROG} \[update aborted\]: cannot open file aa for comparing: Permission 
denied" \
+"${CPROG} \[update aborted\]: reading aa: Permission denied"
+         fi
+
+         dokeep
+         chmod u+rwx aa
+         cd ../..
+         rm -r 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       modes3)
+         # Repository permissions.  Particularly, what happens if we
+         # can't read/write in the repository.
+         # TODO: the case where we can access the repository, just not
+         # the attic (may that one can remain a fatal error, seems less
+         # useful for access control).
+         mkdir 1; cd 1
+         dotest modes3-1 "$testcvs -q co -l ."
+         mkdir first-dir second-dir
+         dotest modes3-2 "${testcvs} add first-dir second-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
+         touch first-dir/aa second-dir/ab
+         dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \
+"${SPROG} add: scheduling file .first-dir/aa. for addition
+${SPROG} add: scheduling file .second-dir/ab. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest modes3-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/aa,v  <--  first-dir/aa
+initial revision: 1\.1
+$CVSROOT_DIRNAME/second-dir/ab,v  <--  second-dir/ab
+initial revision: 1\.1"
+         # quiet down this one as it will be noisy in proxy mode
+         modify_repo chmod a= $CVSROOT_DIRNAME/first-dir >/dev/null 2>&1
+         if ${LS} ${CVSROOT_DIRNAME}/first-dir >/dev/null 2>&1; then
+           # Avoid this test under Cygwin since permissions work differently
+           # there.
+           #
+           # This test also gets avoided under Mac OS X since the system `ls'
+           # is broken and exits with a 0 status despite the permission
+           # denied error.
+           if test -n "$remotehost"; then
+             cygwin_hack=false
+           else
+             cygwin_hack=:
+           fi
+         else
+           cygwin_hack=false
+         fi
+
+         cd $TESTDIR/1
+         if $cygwin_hack; then :; else
+           dotest modes3-5 "${testcvs} update" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating first-dir
+${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: 
Permission denied
+${SPROG} update: skipping directory first-dir
+${SPROG} update: Updating second-dir"
+         fi
+
+         # OK, I can see why one might say the above case could be a
+         # fatal error, because normally users without access to first-dir
+         # won't have it in their working directory.  But the next
+         # one is more of a problem if it is fatal.
+         #
+         # The second text string below is for Cygwin again, and again it
+         # should really be XFAIL under Cygwin, but for now deal with the
+         # passing opendir by accepting the alternate string.
+         rm -r first-dir
+         dotest modes3-6 "${testcvs} update -dP" \
+"${SPROG} update: Updating .
+${SPROG} update: Updating CVSROOT
+U ${DOTSTAR}
+${SPROG} update: Updating first-dir
+${SPROG} update: cannot open directory ${CVSROOT_DIRNAME}/first-dir: 
Permission denied
+${SPROG} update: skipping directory first-dir
+${SPROG} update: Updating second-dir" \
+"${SPROG} update: Updating .
+${SPROG} update: Updating CVSROOT
+U ${DOTSTAR}
+${SPROG} update: Updating first-dir
+${SPROG} update: Updating second-dir"
+
+         dokeep
+         cd ..
+         rm -rf 1
+         # quiet down this one as it will be noisy in proxy mode
+         modify_repo chmod u+rwx $CVSROOT_DIRNAME/first-dir 2>/dev/null
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir \
+                            $CVSROOT_DIRNAME/second-dir
+         ;;
+
+
+
+       stamps)
+         # Test timestamps.
+         mkdir 1; cd 1
+         dotest stamps-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest stamps-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         touch aa
+         echo '$''Id$' >kw
+         # Cygwin, *cough*, puts the year in the time column until the minute
+         # is no longer the current minute.  Sleep 60 seconds to avoid this
+         # problem.
+         sleep 60
+         ls -l aa >${TESTDIR}/1/stamp.aa.touch
+         ls -l kw >${TESTDIR}/1/stamp.kw.touch
+         # "sleep 1" would suffice if we could assume ls --full-time, but
+         # that is as far as I know unique to GNU ls.  Is there some POSIX.2
+         # way to get the timestamp of a file, including the seconds?
+         sleep 60
+         dotest stamps-3 "${testcvs} add aa kw" \
+"${SPROG} add: scheduling file .aa. for addition
+${SPROG} add: scheduling file .kw. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         ls -l aa >${TESTDIR}/1/stamp.aa.add
+         ls -l kw >${TESTDIR}/1/stamp.kw.add
+         # "cvs add" should not muck with the timestamp.
+         dotest stamps-4aa \
+"$diff_u $TESTDIR/1/stamp.aa.touch $TESTDIR/1/stamp.aa.add"
+         dotest stamps-4kw \
+"$diff_u $TESTDIR/1/stamp.kw.touch $TESTDIR/1/stamp.kw.add"
+         sleep 60
+export CVS_CLIENT_LOG=/tmp/cvsclientlog
+         dotest stamps-5 "$testcvs -Q ci -m add"
+
+         # Cygwin, *cough*, puts the year in the time column until the minute
+         # is no longer the current minute.  Sleep 60 seconds to avoid this
+         # problem.
+         sleep 60
+         ls -l aa >${TESTDIR}/1/stamp.aa.ci
+         ls -l kw >${TESTDIR}/1/stamp.kw.ci
+         # If there are no keywords, "cvs ci" leaves the timestamp alone
+         # If there are, it sets the timestamp to the date of the commit.
+         # I'm not sure how logical this is, but it is intentional.
+         # If we wanted to get fancy we would make sure the time as
+         # reported in "cvs log kw" matched stamp.kw.ci.  But that would
+         # be a lot of work.
+         dotest stamps-6aa \
+"$diff_u $TESTDIR/1/stamp.aa.add $TESTDIR/1/stamp.aa.ci"
+         dotest_fail stamps-6kw \
+"cmp $TESTDIR/1/stamp.kw.add $TESTDIR/1/stamp.kw.ci >/dev/null"
+         cd ../..
+         sleep 60
+         mkdir 2
+         cd 2
+         dotest stamps-7 "${testcvs} -q get first-dir" "U first-dir/aa
+U first-dir/kw"
+         cd first-dir
+         ls -l aa >${TESTDIR}/1/stamp.aa.get
+         ls -l kw >${TESTDIR}/1/stamp.kw.get
+         # On checkout, CVS should set the timestamp to the date that the
+         # file was committed.  Could check that the time as reported in
+         # "cvs log aa" matches stamp.aa.get, but that would be a lot of
+         # work.
+         dotest_fail stamps-8aa \
+"cmp $TESTDIR/1/stamp.aa.ci $TESTDIR/1/stamp.aa.get >/dev/null"
+         dotest stamps-8kw \
+"$diff_u $TESTDIR/1/stamp.kw.ci $TESTDIR/1/stamp.kw.get"
+
+         # Now we want to see what "cvs update" does.
+         sleep 60
+         echo add a line >>aa
+         echo add a line >>kw
+         dotest stamps-9 "$testcvs -Q ci -m change-them"
+         
+         # Cygwin, *cough*, puts the year in the time column until the minute
+         # is no longer the current minute.  Sleep 60 seconds to avoid this
+         # problem.
+         sleep 60
+         ls -l aa >${TESTDIR}/1/stamp.aa.ci2
+         ls -l kw >${TESTDIR}/1/stamp.kw.ci2
+         cd ../..
+         cd 1/first-dir
+         sleep 60
+         dotest stamps-10 "${testcvs} -q update" 'U aa
+U kw'
+         # this doesn't serve any function other than being able to
+         # look at it manually, as we have no machinery for dates being
+         # newer or older than other dates.
+         date >$TESTDIR/1/stamp.debug.update
+         ls -l aa >$TESTDIR/1/stamp.aa.update
+         ls -l kw >$TESTDIR/1/stamp.kw.update
+         # stamp.aa.update and stamp.kw.update should both be approximately
+         # the same as stamp.debug.update.  Perhaps we could be testing
+         # this in a more fancy fashion by "touch stamp.before" before
+         # stamps-10, "touch stamp.after" after, and then using ls -t
+         # to check them.  But for now we just make sure that the *.update
+         # stamps differ from the *.ci2 ones.
+         # As for the rationale, this is so that if one updates and gets
+         # a new revision, then "make" will be sure to regard those files
+         # as newer than .o files which may be sitting around.
+         dotest_fail stamps-11aa \
+"cmp $TESTDIR/1/stamp.aa.update $TESTDIR/1/stamp.aa.ci2 >/dev/null"
+         dotest_fail stamps-11kw \
+"cmp $TESTDIR/1/stamp.kw.update $TESTDIR/1/stamp.kw.ci2 >/dev/null"
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       perms)
+         mkdir 1; cd 1
+         dotest perms-init-1 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         echo 'PreservePermissions=yes' >> ${CVSROOT_DIRNAME}/CVSROOT/config
+         dotest perms-init-2 "$testcvs -Q ci -mperms"
+         cd ..
+
+         dotest perms-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest perms-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+
+         touch foo
+         chmod 431 foo
+         dotest perms-3 "${testcvs} add foo" \
+"${SPROG} add: scheduling file .foo. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest perms-4 "${testcvs} -q ci -m ''" \
+"$CVSROOT_DIRNAME/first-dir/foo,v  <--  foo
+initial revision: 1\.1"
+
+         # Test checking out files with different permissions.
+         cd ../..
+         mkdir 2; cd 2
+         dotest perms-5 "${testcvs} -q co first-dir" "U first-dir/foo"
+         cd first-dir
+         if $remote; then :; else
+           # PreservePermissions not yet implemented for remote.
+           dotest perms-6 "ls -l foo" "-r---wx--x .* foo"
+         fi
+
+         dokeep
+         cd ../1/CVSROOT
+         restore_adm
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       symlinks)
+         # short cut around checking out and committing CVSROOT
+         rm -f $CVSROOT_DIRNAME/CVSROOT/config
+         echo 'PreservePermissions=yes' >> $CVSROOT_DIRNAME/CVSROOT/config
+         chmod 444 $CVSROOT_DIRNAME/CVSROOT/config
+
+         mkdir 1; cd 1
+         dotest symlinks-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest symlinks-2 "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+         cd first-dir
+
+         dotest symlinks-2.1 "ln -s $TESTDIR/fumble slink"
+         dotest symlinks-3 "$testcvs add slink" \
+"$SPROG add: scheduling file .slink. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         if $remote; then
+           # Remote doesn't implement PreservePermissions, and in its
+           # absence the correct behavior is to follow the symlink.
+           dotest_fail symlinks-4r "$testcvs -q ci -m ''" \
+"$SPROG \[commit aborted\]: reading slink: No such file or directory"
+         else
+           dotest symlinks-4 "$testcvs -q ci -m ''" \
+"$CVSROOT_DIRNAME/first-dir/slink,v  <--  slink
+initial revision: 1\.1"
+
+           # Test checking out symbolic links.
+           cd ../..
+           mkdir 2; cd 2
+           dotest symlinks-5 "$testcvs -q co first-dir" "U first-dir/slink"
+           cd first-dir
+           dotest symlinks-6 "ls -l slink" \
+"l[rwx\-]* .* slink -> $TESTDIR/fumble"
+         fi
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         restore_adm
+         ;;
+
+
+
+       symlinks2)
+         # Symlinks in working directory without PreservePermissions.
+         # Also see: symlinks: with PreservePermissions
+         # rcslib-symlink-*: symlinks in repository.
+         mkdir 1; cd 1
+         dotest symlinks2-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest symlinks2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         echo nonsymlink > slink
+         dotest symlinks2-3 "${testcvs} add slink" \
+"${SPROG} add: scheduling file .slink. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest symlinks2-4 "${testcvs} -q ci -m ''" \
+"$CVSROOT_DIRNAME/first-dir/slink,v  <--  slink
+initial revision: 1\.1"
+         rm slink
+         # Choose name cvslog.* so it is in default ignore list.
+         echo second file >cvslog.file2
+         dotest symlinks2-5 "ln -s cvslog.file2 slink" ""
+         dotest symlinks2-6 "${testcvs} -q ci -m linkify" \
+"$CVSROOT_DIRNAME/first-dir/slink,v  <--  slink
+new revision: 1\.2; previous revision: 1\.1"
+         dotest symlinks2-7 "${testcvs} -q update -r 1.1 slink" "U slink"
+         dotest symlinks2-8 "cat slink" "nonsymlink"
+         dotest symlinks2-9 "ls -l slink" "-[-rwx]* .* slink"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       hardlinks)
+         # short cut around checking out and committing CVSROOT
+         rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+         echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config
+         chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+
+         mkdir 1; cd 1
+         dotest hardlinks-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest hardlinks-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+
+         # Make up some ugly filenames, to test that they get
+         # encoded properly in the delta nodes.  Note that `dotest' screws
+         # up if some arguments have embedded spaces.
+         if touch aaaa
+         then
+           pass hardlinks-2.1
+         else
+           fail hardlinks-2.1
+         fi
+
+         if ln aaaa b.b.b.b
+         then
+           pass hardlinks-2.2
+         else
+           fail hardlinks-2.2
+         fi
+
+         if ln aaaa 'dd dd dd'
+         then
+           pass hardlinks-2.3
+         else
+           fail hardlinks-2.3
+         fi
+
+         dotest hardlinks-3 "${testcvs} add [abd]*" \
+"${SPROG} add: scheduling file .aaaa. for addition
+${SPROG} add: scheduling file .b\.b\.b\.b. for addition
+${SPROG} add: scheduling file .dd dd dd. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest hardlinks-4 "${testcvs} -q ci -m ''" \
+"$CVSROOT_DIRNAME/first-dir/aaaa,v  <--  aaaa
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/b\.b\.b\.b,v  <--  b\.b\.b\.b
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/dd dd dd,v  <--  dd dd dd
+initial revision: 1\.1"
+         # Test checking out hardlinked files.
+         cd ../..
+         mkdir 2; cd 2
+         if $remote; then
+           # Remote does not implement PreservePermissions.
+           dotest hardlinks-5r "${testcvs} -q co first-dir" \
+"U first-dir/aaaa
+U first-dir/b\.b\.b\.b
+U first-dir/dd dd dd"
+           cd first-dir
+           dotest hardlinks-6r "ls -l [abd]*" \
+"-[rwx\-]* *1 .* aaaa
+-[rwx\-]* *1 .* b\.b\.b\.b
+-[rwx\-]* *1 .* dd dd dd"
+         else
+           dotest hardlinks-5 "${testcvs} -q co first-dir" \
+"U first-dir/aaaa
+U first-dir/b\.b\.b\.b
+U first-dir/dd dd dd"
+           cd first-dir
+           # To make sure that the files are properly hardlinked, it
+           # would be nice to do `ls -i' and make sure all the inodes
+           # match.  But I think that would require expr to support
+           # tagged regexps, and I don't think we can rely on that.
+           # So instead we just see that each file has the right
+           # number of links. -twp
+           dotest hardlinks-6 "ls -l [abd]*" \
+"-[rwx\-]* *3 .* aaaa
+-[rwx\-]* *3 .* b\.b\.b\.b
+-[rwx\-]* *3 .* dd dd dd"
+         fi
+
+         dokeep
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         restore_adm
+         ;;
+
+
+
+       sticky)
+         # More tests of sticky tags, particularly non-branch sticky tags.
+         # See many tests (e.g. multibranch) for ordinary sticky tag
+         # operations such as adding files on branches.
+         # See "head" test for interaction between stick tags and HEAD.
+         mkdir 1; cd 1
+         dotest sticky-1 "$testcvs -q co -l ."
+         mkdir first-dir
+         dotest sticky-2 "$testcvs add first-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir added to the repository"
+         cd first-dir
+
+         touch file1
+         dotest sticky-3 "$testcvs add file1" \
+"$SPROG add: scheduling file .file1. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest sticky-4 "$testcvs -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest sticky-5 "$testcvs -q tag tag1" "T file1"
+         echo add a line >>file1
+         dotest sticky-6 "$testcvs -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         dotest sticky-7 "$testcvs -q update -r tag1" "U file1"
+         dotest sticky-8 "cat file1" ''
+         dotest sticky-9 "$testcvs -q update" ''
+         dotest sticky-10 "cat file1" ''
+         touch file2
+         dotest_fail sticky-11 "$testcvs add file2" \
+"$SPROG add: cannot add file on non-branch tag \`tag1'"
+         dotest sticky-12 "$testcvs -q update -A" "U file1
+$QUESTION file2" "$QUESTION file2
+U file1"
+         dotest sticky-13 "${testcvs} add file2" \
+"$SPROG add: scheduling file .file2. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest sticky-14 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+
+         # Now back to tag1
+         dotest sticky-15 "${testcvs} -q update -r tag1" "U file1
+$SPROG update: \`file2' is no longer in the repository"
+
+         rm file1
+         dotest sticky-16 "${testcvs} rm file1" \
+"$SPROG remove: scheduling .file1. for removal
+$SPROG remove: use .$SPROG commit. to remove this file permanently"
+         # Hmm, this command seems to silently remove the tag from
+         # the file.  This appears to be intentional.
+         # The silently part especially strikes me as odd, though.
+         dotest sticky-17 "$testcvs -q ci -m remove-it" ""
+         dotest sticky-18 "$testcvs -q update -A" "U file1
+U file2"
+         dotest sticky-19 "$testcvs -q update -r tag1" \
+"${SPROG} update: \`file1' is no longer in the repository
+${SPROG} update: \`file2' is no longer in the repository"
+         dotest sticky-20 "$testcvs -q update -A" "U file1
+U file2"
+
+         # Now try with a numeric revision.
+         dotest sticky-21 "$testcvs -q update -r 1.1 file1" "U file1"
+         dotest sticky-22 "$testcvs rm -f file1" \
+"$SPROG remove: cannot remove file .file1. which has a numeric sticky tag of 
.1\.1."
+         # The old behavior was that remove allowed this and then commit
+         # gave an error, which was somewhat hard to clear.  I mean, you
+         # could get into a long elaborate discussion of this being a
+         # conflict and two ways to resolve it, but I don't really see
+         # why CVS should have a concept of conflict that arises, not from
+         # parallel development, but from CVS's own sticky tags.
+
+         # Ditto with a sticky date.
+         #
+         # I'm kind of surprised that the "file1 was lost" doesn't crop
+         # up elsewhere in the testsuite.  It is a long-standing
+         # discrepency between local and remote CVS and should probably
+         # be cleaned up at some point.
+         dotest sticky-23 "$testcvs -q update -Dnow file1" \
+"$SPROG update: warning: \`file1' was lost
+U file1" "U file1"
+         dotest sticky-24 "$testcvs rm -f file1" \
+"$SPROG remove: cannot remove file .file1. which has a sticky date of 
.[0-9.]*."
+
+         dotest sticky-25 "$testcvs -q update -A" \
+"$SPROG update: warning: \`file1' was lost
+U file1" "U file1"
+
+         dokeep
+         restore_adm
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       keyword)
+         # Test keyword expansion.
+         # Various other tests relate to our ability to correctly
+         # set the keyword expansion mode.
+         # "binfiles" tests "cvs admin -k".
+         # "binfiles" and "binfiles2" test "cvs add -k".
+         # "rdiff" tests "cvs co -k".
+         # "binfiles" (and this test) test "cvs update -k".
+         # "binwrap" tests setting the mode from wrappers.
+         # "keyword2" tests "cvs update -kk -j" with text and binary files
+         # I don't think any test is testing "cvs import -k".
+         # Other keyword expansion tests:
+         #   keywordlog - $Log.
+         mkdir 1; cd 1
+         dotest keyword-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest keyword-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+
+         echo '$''Author$' > file1
+         echo '$''Date$' >> file1
+         echo '$''Header$' >> file1
+         echo '$''Id$' >> file1
+         echo '$''Locker$' >> file1
+         echo '$''Name$' >> file1
+         echo '$''RCSfile$' >> file1
+         echo '$''Revision$' >> file1
+         echo '$''Source$' >> file1
+         echo '$''State$' >> file1
+         echo '$''Nonkey$' >> file1
+         # Omit the trailing dollar sign
+         echo '$''Date' >> file1
+         # Put two keywords on one line
+         echo '$''State$' '$''State$' >> file1
+         # Use a header for Log
+         echo 'xx $''Log$' >> file1
+
+         dotest keyword-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest keyword-4 "$testcvs -Q ci -m add"
+         dotest keyword-5 "cat file1" \
+'\$'"Author: ${username} "'\$'"
+"'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] 
[0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* 
${username} Exp "'\$'"
+"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
+"'\$'"Locker:  "'\$'"
+"'\$'"Name:  "'\$'"
+"'\$'"RCSfile: file1,v "'\$'"
+"'\$'"Revision: 1\.1 "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
+"'\$'"State: Exp "'\$'"
+"'\$'"Nonkey"'\$'"
+"'\$'"Date
+"'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.1  [0-9/]* [0-9:]*  ${username}
+xx add
+xx"
+
+         # Use cvs admin to lock the RCS file in order to check -kkvl
+         # vs. -kkv.  CVS does not normally lock RCS files, but some
+         # people use cvs admin to enforce reserved checkouts.
+         dotest keyword-6 "${testcvs} admin -l file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+1\.1 locked
+done"
+
+         dotest keyword-7 "${testcvs} update -kkv file1" "U file1"
+         dotest keyword-8 "cat file1" \
+'\$'"Author: ${username} "'\$'"
+"'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] 
[0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* 
${username} Exp "'\$'"
+"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
+"'\$'"Locker:  "'\$'"
+"'\$'"Name:  "'\$'"
+"'\$'"RCSfile: file1,v "'\$'"
+"'\$'"Revision: 1\.1 "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
+"'\$'"State: Exp "'\$'"
+"'\$'"Nonkey"'\$'"
+"'\$'"Date
+"'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.1  [0-9/]* [0-9:]*  ${username}
+xx add
+xx"
+
+         dotest keyword-9 "${testcvs} update -kkvl file1" "U file1"
+         dotest keyword-10 "cat file1" \
+'\$'"Author: ${username} "'\$'"
+"'\$'"Date: ${RCSKEYDATE} "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 ${RCSKEYDATE} 
${username} Exp ${username} "'\$'"
+"'\$'"Id: file1,v 1\.1 ${RCSKEYDATE} ${username} Exp ${username} "'\$'"
+"'\$'"Locker: ${username} "'\$'"
+"'\$'"Name:  "'\$'"
+"'\$'"RCSfile: file1,v "'\$'"
+"'\$'"Revision: 1\.1 "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
+"'\$'"State: Exp "'\$'"
+"'\$'"Nonkey"'\$'"
+"'\$'"Date
+"'\$'"State: Exp "'\$'" "'\$'"State: Exp "'\$'"
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.1  ${RCSKEYDATE}  ${username}
+xx add
+xx"
+
+         dotest keyword-11 "${testcvs} update -kk file1" "U file1"
+         dotest keyword-12 "cat file1" \
+'\$'"Author"'\$'"
+"'\$'"Date"'\$'"
+"'\$'"Header"'\$'"
+"'\$'"Id"'\$'"
+"'\$'"Locker"'\$'"
+"'\$'"Name"'\$'"
+"'\$'"RCSfile"'\$'"
+"'\$'"Revision"'\$'"
+"'\$'"Source"'\$'"
+"'\$'"State"'\$'"
+"'\$'"Nonkey"'\$'"
+"'\$'"Date
+"'\$'"State"'\$'" "'\$'"State"'\$'"
+xx "'\$'"Log"'\$'"
+xx Revision 1\.1  ${RCSKEYDATE}  ${username}
+xx add
+xx"
+
+         dotest keyword-13 "${testcvs} update -kv file1" "U file1"
+         dotest keyword-14 "cat file1" \
+"${username}
+${RCSKEYDATE}
+${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 ${RCSKEYDATE} ${username} Exp
+file1,v 1\.1 ${RCSKEYDATE} ${username} Exp
+
+
+file1,v
+1\.1
+${CVSROOT_DIRNAME}/first-dir/file1,v
+Exp
+"'\$'"Nonkey"'\$'"
+"'\$'"Date
+Exp Exp
+xx file1,v
+xx Revision 1\.1  ${RCSKEYDATE}  ${username}
+xx add
+xx"
+
+         dotest keyword-15 "${testcvs} update -ko file1" "U file1"
+         dotest keyword-16 "cat file1" \
+'\$'"Author"'\$'"
+"'\$'"Date"'\$'"
+"'\$'"Header"'\$'"
+"'\$'"Id"'\$'"
+"'\$'"Locker"'\$'"
+"'\$'"Name"'\$'"
+"'\$'"RCSfile"'\$'"
+"'\$'"Revision"'\$'"
+"'\$'"Source"'\$'"
+"'\$'"State"'\$'"
+"'\$'"Nonkey"'\$'"
+"'\$'"Date
+"'\$'"State"'\$'" "'\$'"State"'\$'"
+xx "'\$'"Log"'\$'
+
+         # Test the Name keyword.  First go back to normal expansion.
+
+         dotest keyword-17 "${testcvs} update -A file1" "U file1"
+
+         echo '$''Name$' > file1
+         dotest keyword-18 "$testcvs -Q ci -m modify file1"
+         dotest keyword-19 "${testcvs} -q tag tag1" "T file1"
+         echo "change" >> file1
+         dotest keyword-20 "$testcvs -Q ci -m mod2 file1"
+         dotest keyword-21 "$testcvs -q update -r tag1" "U file1" \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+
+         dotest keyword-22 "cat file1" '\$'"Name: tag1 "'\$'
+
+         dotest keyword-23 "$testcvs update -A file1" "U file1" \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+         dotest keyword-24 "cat file1" '\$'"Name:  "'\$'"
+change"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       keywordlog)
+         # Test the Log keyword.
+         mkdir 1; cd 1
+         dotest keywordlog-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest keywordlog-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+         echo initial >file1
+         dotest keywordlog-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         # See "rmadd" for a list of other tests of cvs ci -r.
+         dotest keywordlog-4 "${testcvs} -q ci -r 1.3 -m add file1" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.3"
+
+         cd ../..
+         mkdir 2; cd 2
+         dotest keywordlog-4a "${testcvs} -q co first-dir" "U first-dir/file1"
+         cd ../1/first-dir
+
+         echo 'xx $''Log$' >> file1
+         cat >${TESTDIR}/comment.tmp <<EOF
+First log line
+Second log line
+EOF
+         # As with rmadd-25, "cvs ci -r" sets a sticky tag.
+         dotest_fail keywordlog-4b \
+"${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \
+"${SPROG} commit: sticky tag .1\.3. for file .file1. is not a branch
+${SPROG} \[commit aborted\]: correct above errors first!"
+         if test -z "$CVSNOBASES"; then
+           dotest keywordlog-4b-2 "cat CVS/Base/.#file1.1.3" initial
+         fi
+         dotest keywordlog-4b-3 "cat file1" \
+'initial
+xx $''Log$'
+         dotest keywordlog-4c "$testcvs -q update -A" "M file1"
+         if test -z "$CVSNOBASES"; then
+           dotest keywordlog-4c-2 "cat CVS/Base/.#file1.1.3" initial
+         fi
+         dotest keywordlog-4c-3 "cat file1" \
+'initial
+xx $''Log$'
+
+         dotest keywordlog-5 "$testcvs -Q ci -F $TESTDIR/comment.tmp file1"
+         rm -f $TESTDIR/comment.tmp
+
+         dotest keywordlog-6 "$testcvs -q tag -b br" "T file1"
+         dotest keywordlog-7 "cat file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx"
+
+         cd ../../2/first-dir
+         dotest keywordlog-8 "${testcvs} -q update" "U file1"
+         dotest keywordlog-9 "cat file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx"
+         cd ../../1/first-dir
+
+         echo "change" >> file1
+         dotest keywordlog-10 "$testcvs -Q ci -m modify file1"
+         dotest keywordlog-11 "cat file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.5  ${RCSKEYDATE}  ${username}
+xx modify
+xx
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx
+change"
+
+         cd ../../2/first-dir
+         dotest keywordlog-12 "${testcvs} -q update" "U file1"
+         dotest keywordlog-13 "cat file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.5  ${RCSKEYDATE}  ${username}
+xx modify
+xx
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx
+change"
+
+         cd ../../1/first-dir
+         dotest keywordlog-14 "${testcvs} -q update -r br" "U file1"
+         echo br-change >>file1
+         dotest keywordlog-15 "$testcvs -Q ci -m br-modify"
+         dotest keywordlog-16 "cat file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4\.2\.1  ${RCSKEYDATE}  ${username}
+xx br-modify
+xx
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx
+br-change"
+         cd ../../2/first-dir
+         dotest keywordlog-17 "${testcvs} -q update -r br" "U file1"
+         dotest keywordlog-18 "cat file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4\.2\.1  ${RCSKEYDATE}  ${username}
+xx br-modify
+xx
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx
+br-change"
+         cd ../..
+         dotest keywordlog-19 "${testcvs} -q co -p -r br first-dir/file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4\.2\.1  ${RCSKEYDATE}  ${username}
+xx br-modify
+xx
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx
+br-change"
+         dotest keywordlog-20 "${testcvs} -q co -p first-dir/file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.5  ${RCSKEYDATE}  ${username}
+xx modify
+xx
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx
+change"
+         dotest keywordlog-21 "${testcvs} -q co -p -r 1.4 first-dir/file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx"
+
+         cd 2/first-dir
+         # OK, the basic rule for keyword expansion is that it
+         # happens on checkout.  And the rule for annotate is that
+         # it annotates a checked-in revision, rather than a checked-out
+         # file.  So, although it is kind of confusing that the latest
+         # revision does not appear in the annotated output, and the
+         # annotated output does not quite match what you'd get with
+         # update or checkout, the behavior is more or less logical.
+         # The same issue occurs with annotate and other keywords,
+         # I think, although it is particularly noticeable for $Log.
+         dotest keywordlog-22 "${testcvs} ann -r br file1" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.3          ($username8 *[0-9a-zA-Z-]*): initial
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  
$username
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx First log line
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Second log line
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx
+1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): br-change"
+         dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.3          ($username8 *[0-9a-zA-Z-]*): initial
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  
$username
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx First log line
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx Second log line
+1\.5          ($username8 *[0-9a-zA-Z-]*): xx
+1\.5          ($username8 *[0-9a-zA-Z-]*): change"
+         cd ../..
+
+         #
+         # test the operation of 'admin -o' in conjunction with keywords
+         # (especially Log - this used to munge the RCS file for all time)
+         #
+
+         dotest keywordlog-24 \
+"${testcvs} admin -oHEAD 1/first-dir/file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+deleting revision 1\.5
+done"
+
+         dotest keywordlog-25 \
+"${testcvs} -q co -p first-dir/file1" \
+"initial
+xx "'\$'"Log: file1,v "'\$'"
+xx Revision 1\.4  ${RCSKEYDATE}  ${username}
+xx First log line
+xx Second log line
+xx"
+
+         # Now test the behavior when the comment leader exceeds the
+         # configured maximum.
+         mkdir 3; cd 3
+         dotest keywordlog-26 "$testcvs -Q co first-dir"
+
+         cd first-dir
+         sed 's/xx \$/1234567890123456789 $/' <file1 >tmp
+         mv tmp file1
+         dotest keywordlog-27 "$testcvs -Q ci -mrevision-5"
+         dotest keywordlog-28 "cat file1" \
+"initial
+1234567890123456789 "'\$'"Log: file1,v "'\$'"
+1234567890123456789 Revision 1\.5  $RCSKEYDATE  $username
+1234567890123456789 revision-5
+1234567890123456789
+xx Revision 1\.4  $RCSKEYDATE  $username
+xx First log line
+xx Second log line
+xx"
+
+         sed 's/1234567890123456789 \$/12345678901234567890 $/' <file1 >tmp
+         mv tmp file1
+         dotest keywordlog-29 "$testcvs -Q ci -mrevision-6" \
+"$SPROG commit: Skipping "'`$''Log$'"' keyword due to excessive comment 
leader\."
+         dotest keywordlog-30 "cat file1" \
+"initial
+12345678901234567890 "'\$'"Log: file1,v "'\$'"
+1234567890123456789 Revision 1\.5  $RCSKEYDATE  $username
+1234567890123456789 revision-5
+1234567890123456789
+xx Revision 1\.4  $RCSKEYDATE  $username
+xx First log line
+xx Second log line
+xx"
+
+         # Check that the Log-related config options work.
+         cd ..
+         dotest keywordlog-31 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         echo "UseArchiveCommentLeader=TrUe" >>config
+         dotest keywordlog-32 "$testcvs -Q ci -mset-UseArchiveCommentLeader"
+
+         cd ../first-dir
+
+         # FIXCVS: It seems like an awful lot to ask that the base files
+         # determine a correct diff when the CVSROOT/config options have
+         # changed, but this needs checksum/resend.
+if false; then
+         dotest keywordlog-33 "$testcvs -Q ci -fmrevision-7 file1"
+         dotest keywordlog-34 "cat file1" \
+"initial
+12345678901234567890 "'\$'"Log: file1,v "'\$'"
+# Revision 1\.7  $RCSKEYDATE  $username
+# revision-7
+#
+1234567890123456789 Revision 1\.5  $RCSKEYDATE  $username
+1234567890123456789 revision-5
+1234567890123456789
+xx Revision 1\.4  $RCSKEYDATE  $username
+xx First log line
+xx Second log line
+xx"
+
+         cd ../CVSROOT
+         echo "MaxCommentLeaderLength=1k" >>config
+         dotest keywordlog-35 "$testcvs -Q ci -mset-MaxCommentLeaderLength"
+
+         cd ../first-dir
+         dotest keywordlog-36 "$testcvs -Q ci -fmrevision-8 file1"
+         dotest keywordlog-37 "cat file1" \
+"initial
+12345678901234567890 "'\$'"Log: file1,v "'\$'"
+12345678901234567890 Revision 1\.8  $RCSKEYDATE  $username
+12345678901234567890 revision-8
+12345678901234567890
+# Revision 1\.7  $RCSKEYDATE  $username
+# revision-7
+#
+1234567890123456789 Revision 1\.5  $RCSKEYDATE  $username
+1234567890123456789 revision-5
+1234567890123456789
+xx Revision 1\.4  $RCSKEYDATE  $username
+xx First log line
+xx Second log line
+xx"
+fi
+         dokeep
+         cd ../..
+         restore_adm
+         rm -rf 1 2 3
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       keywordname)
+         # Test the Name keyword.
+         # See the keyword test for a descriptions of some other tests that
+         # test keyword expansion modes.
+         mkdir keywordname; cd keywordname
+         mkdir 1; cd 1
+         dotest keywordname-init-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest keywordname-init-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+
+         echo '$'"Name$" >file1
+         echo '$'"Name$" >file2
+         dotest keywordname-init-3 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+
+         # See "rmadd" for a list of other tests of cvs ci -r.
+         dotest keywordname-init-4 "$testcvs -Q ci -r 1.3 -m add"
+
+         dotest keywordname-init-6 "${testcvs} -q up -A"
+         dotest keywordname-init-7 "${testcvs} -q tag -b br" \
+"T file1
+T file2"
+
+         echo new data >>file1
+         dotest keywordname-init-8 "$testcvs -Q ci -mchange"
+
+         # First check out a branch.
+         #
+         # There used to be a bug where static tags would be substituted for
+         # Name keywords but not branch tags.
+         #
+         # FIXCVS - BUG
+         # Why shouldn't the non-update case not cause a substitution?
+         # An update -kk or -A will unsub and sub keywords without updates
+         # being required.
+         # FIXCVS - see note above keyword-21
+         dotest keywordname-update-1 "$testcvs -q up -rbr" "U file1" \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+         dotest keywordname-update-2 "cat file1" '\$'"Name: br "'\$'
+         dotest keywordname-update-3 "cat file2" '\$'"Name:  "'\$'
+
+         # Now verify that updating to the trunk leaves no substitution for
+         # $Name
+         dotest keywordname-update-4 "${testcvs} -q tag firsttag" \
+"T file1
+T file2"
+         # FIXCVS - see note above keyword-21
+         dotest keywordname-update-5 "$testcvs -q up -A" "U file1" \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+         dotest keywordname-update-6 "cat file1" \
+'\$'"Name:  "'\$'"
+new data"
+         dotest keywordname-update-7 "cat file2" '\$'"Name:  "'\$'
+
+         # But updating to a static tag does cause a substitution
+         # FIXCVS - see same note above
+         dotest keywordname-update-8 "$testcvs -q up -rfirsttag" "U file1" \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+         dotest keywordname-update-9 "cat file1" '\$'"Name: firsttag "'\$'
+         dotest keywordname-update-10 "cat file2" '\$'"Name:  "'\$'
+
+         # And reverify the trunk update when the change is actually removed.
+         dotest keywordname-update-11 "$testcvs -q up -A" "U file1" \
+"$CPROG update: checksum failure after patch to \`file1'; will refetch
+$CPROG client: refetching unpatchable files
+U file1"
+         dotest keywordname-update-12 "cat file1" \
+'\$'"Name:  "'\$'"
+new data"
+         dotest keywordname-update-13 "cat file2" '\$'"Name:  "'\$'
+
+         cd ../..
+
+         # now verify that a fresh checkout substitutes all the $Name fields
+         mkdir 2; cd 2
+         dotest keywordname-checkout-1 \
+"${testcvs} -q co -rfirsttag first-dir" \
+"U first-dir/file1
+U first-dir/file2"
+         cd first-dir
+         dotest keywordname-checkout-2 "cat file1" '\$'"Name: firsttag "'\$'
+         dotest keywordname-checkout-3 "cat file2" '\$'"Name: firsttag "'\$'
+
+         dokeep
+         cd ../../..
+         rm -rf keywordname
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       keyword2)
+         # Test merging on files with keywords:
+         #   without -kk
+         #   with -kk
+         #     on text files
+         #     on binary files
+         # Note:  This test assumes that CVS has already passed the binfiles
+         #    test sequence
+         # Note2:  We are testing positive on binary corruption here
+         #    we probably really DON'T want to 'cvs update -kk' a binary 
file...
+         mkdir 1; cd 1
+         dotest keyword2-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest keyword2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+
+         echo '$''Revision$' >> file1
+         echo "I" >>file1
+         echo "like" >>file1
+         echo "long" >>file1
+         echo "files!" >>file1
+         echo "" >>file1
+         echo "a test line for our times" >>file1
+         echo "" >>file1
+         echo "They" >>file1
+         echo "make" >>file1
+         echo "diff" >>file1
+         echo "look like it" >>file1
+         echo "did a much better" >>file1
+         echo "job." >>file1
+         dotest keyword2-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         ${AWK} 'BEGIN { printf "%c%c%c%sRevision: 1.1 address@hidden", \
+           2, 10, 137, "$", 13, 10 }' \
+           </dev/null | ${TR} '@' '\000' >../binfile.dat
+         cp ../binfile.dat .
+         dotest keyword2-5 "${testcvs} add -kb binfile.dat" \
+"${SPROG} add: scheduling file .binfile\.dat. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+
+         dotest keyword2-6 "$testcvs -Q ci -m add"
+
+         dotest keyword2-7 "${testcvs} -q tag -b branch" \
+"T binfile\.dat
+T file1"
+
+         sed -e 's/our/the best of and the worst of/' file1 >f; mv f file1
+         dotest keyword2-8 "$testcvs -Q ci -m change"
+
+         dotest keyword2-9 "${testcvs} -q update -r branch" 'U file1'
+
+         echo "what else do we have?" >>file1
+         dotest keyword2-10 "$testcvs -Q ci -m change"
+
+         # Okay, first a conflict in file1 - should be okay with binfile.dat
+         dotest keyword2-11 "$testcvs -q update -A -j branch" \
+"U file1
+Merging differences between 1\.1 and 1\.1\.2\.1 into \`file1'
+$CPROG update: conflicts during merge
+C file1"
+
+         dotest_fail keyword2-12 "${testcvs} diff file1" \
+"Index: file1
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+retrieving revision 1\.2
+diff -r1\.2 file1
+0a1
+> <<<<<<< file1
+1a3,5
+> =======
+> \\\$""Revision: 1\.1\.2\.1 \\\$
+> >>>>>>> 1\.1\.2\.1
+14a19
+> what else do we have${QUESTION}"
+
+         # Here's the problem... shouldn't -kk a binary file...
+         rm file1
+         dotest keyword2-13 "$testcvs -q update -A -kk -j branch" \
+"$SPROG update: warning: \`file1' was lost
+U file1
+Merging differences between 1\.1 and 1\.1\.2\.1 into \`file1'
+M file1"
+
+         # binfile won't get checked in, but it is now corrupt and could
+         # have been checked in if it had changed on the branch...
+         # $DOTSTAR here accounts for the keyword-in-signed-file warning.
+         dotest keyword2-14 "${testcvs} -q ci -m change" \
+"$DOTSTAR$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+
+         # "-kk" no longer corrupts binary files
+         dotest keyword2-15 "cmp binfile.dat ../binfile.dat" ''
+
+         # Okay, restore everything and make CVS try and merge a binary file...
+         # "-kk" no longer affects binary files
+         dotest keyword2-16 "${testcvs} -q update -A" \
+"U file1"
+         dotest keyword2-17 "${testcvs} -q tag -b branch2" \
+"T binfile\.dat
+T file1"
+         dotest keyword2-18 "${testcvs} -q update -r branch2" ''
+
+         ${AWK} 'BEGIN { printf "address@hidden", 2, 10, 137, 13, 10 }' \
+           </dev/null | ${TR} '@' '\000' >>binfile.dat
+         # $DOTSTAR here accounts for the keyword-in-signed-file warning.
+         dotest keyword2-19 "$testcvs -q ci -m badbadbad" \
+"$DOTSTAR$CVSROOT_DIRNAME/first-dir/binfile\.dat,v  <--  binfile\.dat
+new revision: 1\.1\.4\.1; previous revision: 1\.1"
+         # "-kk" no longer affects binary files
+
+         # XXXX: do not ask, why we get the "U binfile.dat" line twice
+         #       looks like a bug!
+         dotest keyword2-20 "${testcvs} -q update -A -kk -j branch2" \
+"U binfile\.dat
+$SPROG update: Replacing \`binfile\.dat' with contents of revision 1\.1\.4\.1\.
+M binfile\.dat
+U file1"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       head)
+         # Testing handling of the HEAD special tag.
+         # There are many cases involving added and removed files
+         # which we don't yet try to deal with.
+         # TODO: We also could be paying much closer attention to
+         # "head of the trunk" versus "head of the default branch".
+         # That is what "cvs import" is doing here (but I didn't really
+         # fully follow through on writing the tests for that case).
+         mkdir imp-dir
+         cd imp-dir
+         echo 'imported contents' >file1
+         # It may seem like we don't do much with file2, but do note that
+         # the "cvs diff" invocations do also diff file2 (and come up empty).
+         echo 'imported contents' >file2
+         dotest_sort head-1 "${testcvs} import -m add first-dir tag1 tag2" \
+"
+
+N first-dir/file1
+N first-dir/file2
+No conflicts created by this import"
+         cd ..
+         rm -r imp-dir
+         mkdir 1
+         cd 1
+         dotest head-2 "${testcvs} -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2"
+         cd first-dir
+         echo 'add a line on trunk' >> file1
+         dotest head-3 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         dotest head-4 "${testcvs} -q tag trunktag" "T file1
+T file2"
+         echo 'add a line on trunk after trunktag' >> file1
+         dotest head-5 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3; previous revision: 1\.2"
+         dotest head-6 "${testcvs} -q tag -b br1" "T file1
+T file2"
+         dotest head-7 "${testcvs} -q update -r br1" ""
+         echo 'modify on branch' >>file1
+         dotest head-8 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3\.2\.1; previous revision: 1\.3"
+         dotest head-9 "${testcvs} -q tag brtag" "T file1
+T file2"
+         echo 'modify on branch after brtag' >>file1
+         dotest head-10 "${testcvs} -q ci -m modify" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1"
+         # With no sticky tags, HEAD is the head of the trunk.
+         dotest head-trunk-setup "${testcvs} -q update -A" "U file1"
+         dotest head-trunk-update "${testcvs} -q update -r HEAD -p file1" \
+"imported contents
+add a line on trunk
+add a line on trunk after trunktag"
+         # and diff thinks so too.  Case (a) from the comment in
+         # cvs.texinfo (Common options).
+         dotest_fail head-trunk-diff "${testcvs} -q diff -c -r HEAD -r br1" \
+"Index: file1
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+retrieving revision 1\.3
+retrieving revision 1\.3\.2\.2
+diff -c -r1\.3 -r1\.3\.2\.2
+\*\*\* file1   ${RFCDATE}      1\.3
+--- file1      ${RFCDATE}      1\.3\.2\.2
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1,3 \*\*\*\*
+--- 1,5 ----
+  imported contents
+  add a line on trunk
+  add a line on trunk after trunktag
+${PLUS} modify on branch
+${PLUS} modify on branch after brtag"
+
+         # With a branch sticky tag, HEAD is the head of the trunk.
+         dotest head-br1-setup "${testcvs} -q update -r br1" "U file1"
+         dotest head-br1-update "${testcvs} -q update -r HEAD -p file1" \
+"imported contents
+add a line on trunk
+add a line on trunk after trunktag"
+         # But diff thinks that HEAD is "br1".  Case (b) from cvs.texinfo.
+         # Probably people are relying on it.
+         dotest head-br1-diff "${testcvs} -q diff -c -r HEAD -r br1" ""
+
+         # With a nonbranch sticky tag on a branch,
+         # HEAD is the head of the trunk
+         dotest head-brtag-setup "${testcvs} -q update -r brtag" "U file1"
+         dotest head-brtag-update "${testcvs} -q update -r HEAD -p file1" \
+"imported contents
+add a line on trunk
+add a line on trunk after trunktag"
+
+         # CVS 1.9 and older thought that HEAD is "brtag" (this was
+         # noted as "strange, maybe accidental").  But "br1" makes a
+         # whole lot more sense.
+         dotest head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" ""
+
+         # With a nonbranch sticky tag on the trunk, HEAD is the head
+         # of the trunk, I think.
+         dotest head-trunktag-setup "${testcvs} -q update -r trunktag" \
+"U file1"
+         dotest head-trunktag-check "cat file1" "imported contents
+add a line on trunk"
+         dotest head-trunktag-update "${testcvs} -q update -r HEAD -p file1" \
+"imported contents
+add a line on trunk
+add a line on trunk after trunktag"
+         # Like head-brtag-diff, there is a non-branch sticky tag.
+         dotest_fail head-trunktag-diff \
+           "${testcvs} -q diff -c -r HEAD -r br1" \
+"Index: file1
+===================================================================
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+retrieving revision 1\.3
+retrieving revision 1\.3\.2\.2
+diff -c -r1\.3 -r1\.3\.2\.2
+\*\*\* file1   ${RFCDATE}      1\.3
+--- file1      ${RFCDATE}      1\.3\.2\.2
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1,3 \*\*\*\*
+--- 1,5 ----
+  imported contents
+  add a line on trunk
+  add a line on trunk after trunktag
+${PLUS} modify on branch
+${PLUS} modify on branch after brtag"
+
+         # Also might test what happens if we setup with update -r
+         # HEAD.  In general, if sticky tags matter, does the
+         # behavior of "update -r <foo>" (without -p) depend on the
+         # sticky tags before or after the update?
+
+         # Note that we are testing both the case where this deletes
+         # a revision (file1) and the case where it does not (file2)
+         dotest_fail head-o0a "${testcvs} admin -o ::br1" \
+"${SPROG} admin: Administrating \.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${SPROG} admin: cannot remove revision 1\.3\.2\.1 because it has tags
+${SPROG} admin: RCS file for .file1. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         dotest head-o0b "${testcvs} tag -d brtag" \
+"${SPROG} tag: Untagging \.
+D file1
+D file2"
+         dotest head-o1 "${testcvs} admin -o ::br1" \
+"${SPROG} admin: Administrating \.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+deleting revision 1\.3\.2\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       tagdate)
+         # Test combining -r and -D.
+         #
+         # Note that this is not a complete test.  It relies on the fact
+         # that update, checkout and export have a LOT of shared code.
+         # Notice:
+         #     1)  checkout is never tested at all with -r -D
+         #     2)  update never uses an argument to '-D' besides 'now'
+         #             (this test does not provide enough data to prove
+         #             that 'cvs update' with both a '-r' and a '-D'
+         #             specified does not ignore '-D': a 'cvs up
+         #             -r<branch> -Dnow' and a 'cvs up -r<branch>'
+         #             should specify the same file revision).
+         #     3)  export uses '-r<branch> -D<when there was a different
+         #             revision>', hopefully completing this behavior test
+         #             for checkout and update as well.
+         #
+         mkdir 1; cd 1
+         save_TZ=$TZ
+         TZ=UTC0; export TZ
+         dotest tagdate-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest tagdate-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+
+         echo trunk-1 >file1
+         dotest tagdate-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest tagdate-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         date_T1=`getrlogdate -r1.1 first-dir/file1`
+
+         dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1"
+         dotest tagdate-6 "${testcvs} -q tag -b br2" "T file1"
+         echo trunk-2 >file1
+         dotest tagdate-7 "${testcvs} -q ci -m modify-on-trunk" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1"
+         date_T2=`getrlogdate -r1.2 first-dir/file1`
+
+         # We are testing -r -D where br1 is a (magic) branch without
+         # any revisions.  First the case where br2 doesn't have any
+         # revisions either:
+         dotest tagdate-8 "${testcvs} -q update -p -r br1 -D now" "trunk-1"
+         dotest tagdate-9 "${testcvs} -q update -r br2" "U file1"
+         echo br2-1 >file1
+         dotest tagdate-10 "${testcvs} -q ci -m modify-on-br2" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.4\.1; previous revision: 1\.1"
+         date_T3=`getrlogdate -r1.1.4.1 first-dir/file1`
+
+         # Then the case where br2 does have revisions:
+         dotest tagdate-11 "${testcvs} -q update -p -r br1 -D now" "trunk-1"
+
+         # Joins from dates on the head used to be prohibited.
+         dotest tagdate-12 "$testcvs -q update -j:yesterday -j:now"
+         dotest tagdate-12b "$testcvs -Q update -C"
+         # And check export
+
+         echo br2-2 >file1
+         dotest tagdate-13 "${testcvs} -q ci -m modify-2-on-br2" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.4\.2; previous revision: 1\.1\.4\.1"
+         date_T4=`getrlogdate -r1.1.4.2 first-dir/file1`
+
+         # Test diff -r<tag>:<date> with two revisions specified.
+         dotest_fail tagdate-13b \
+"$testcvs -q diff -u -rbr2:'$date_T3' -rbr2:now file1" \
+"Index: file1
+===================================================================
+RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
+retrieving revision 1\.1\.4\.1
+retrieving revision 1\.1\.4\.2
+diff -u -r1\.1\.4\.1 -r1\.1\.4\.2
+--- file1      $RFCDATE        1\.1\.4\.1
++++ file1      $RFCDATE        1\.1\.4\.2
+@@ -1 ${PLUS}1 @@
+-br2-1
+${PLUS}br2-2"
+
+         # Tag a date on a branch.
+         dotest tagdate-13c "$testcvs -q tag -rbr2:'$date_T3' tagdate" \
+"T file1"
+         dotest tagdate-13d "$testcvs -q update -rtagdate" "U file1"
+         dotest tagdate-13e "cat file1" "br2-1"
+
+         # This one should fail, though currently without an error message,
+         # since a date on a static tag is meaningless.
+         dotest tagdate-13f "$testcvs -q tag -rtagdate:'$date_T3' tagdate"
+
+         # and restore to using the trunk for future tests.
+         dotest tagdate-13g "$testcvs -q up -rbr2" "U file1"
+
+         cd ../..
+         mkdir 2; cd 2
+         dotest tagdate-14 \
+"$testcvs -q export -r br2 -D'$date_T3' first-dir" \
+"U first-dir/file1"
+         dotest tagdate-14b "cat first-dir/file1" "br2-1"
+         dotest tagdate-15 \
+"$testcvs -q export -rbr2:'$date_T3' -dsecond-dir first-dir" \
+"U second-dir/file1"
+         dotest tagdate-15b "cat second-dir/file1" "br2-1"
+
+         # Now for annotate
+         cd ../1/first-dir
+         dotest tagdate-16 "${testcvs} annotate -rbr2 -D'$date_T3'" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1\.4\.1      ($username8 *[0-9a-zA-Z-]*): br2-1"
+
+         dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \
+"
+Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1\.4\.2      ($username8 *[0-9a-zA-Z-]*): br2-2"
+
+         # Now check to see what happens when we add files to br2 and trunk
+         echo br2-1 > file3
+         dotest tagdate-18 "${testcvs} add file3" \
+"${SPROG} add: scheduling file \`file3' for addition on branch \`br2'
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest tagdate-19 "${testcvs} -q ci -m add file3" \
+"$CVSROOT_DIRNAME/first-dir/Attic/file3,v  <--  file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         date_T5=`getrlogdate -r1.1 first-dir/file3`
+         date_T6=`getrlogdate -r1.1.2.1 first-dir/file3`
+
+         cd ../..
+         mkdir 3; cd 3
+         dotest tagdate-20 "${testcvs} -Q co first-dir" ''
+         cd first-dir
+         echo trunk-1 > file2
+         dotest tagdate-21 "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest tagdate-22 "${testcvs} -q ci -m add file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         date_T7=`getrlogdate -r1.1 first-dir/file2`
+         echo "trunk-2" >file2
+         dotest tagdate-23 "${testcvs} -q ci -m update file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.2; previous revision: 1\.1"
+         date_T8=`getrlogdate -r1.2 first-dir/file2`
+
+         cd ../../1/first-dir
+         echo br2-1 > file2
+         dotest tagdate-24 "${testcvs} add file2" \
+"${SPROG} add: scheduling file \`file2' for addition on branch \`br2'
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest tagdate-25 "${testcvs} -q ci -m add file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1"
+         date_T9=`getrlogdate -r1.2.2.2 first-dir/file2`
+         cd ../..
+
+         # Time  Rev     Branch  Comments
+         # T0            trunk   first-dir created
+         # T1    1.1     trunk   first-dir/file1 committed "trunk-1"
+         #               br1     branch created
+         #               br2     branch created
+         # T2    1.2     trunk   first-dir/file1 committed "trunk-2"
+         # T3    1.1.4.1 br2     first-dir/file1 committed "br2-1"
+         # +60s
+         # T4    1.1.4.2 br2     first-dir/file1 committed "br2-2"
+         # T5    1.1     trunk   first-dir/file3 dead
+         # T6    1.1.2.1 br2     first-dir/file3 committed "br2-1"
+         # T7    1.1     trunk   first-dir/file2 committed "trunk-1"
+         # T8    1.2     trunk   first-dir/file2 committed "trunk-2"
+         # T8    1.2.2.1 br2     first-dir/file2 dead
+         # T9    1.2.2.2 br2     first-dir/file2 committed "br2-1"
+         # 
+
+         mkdir 4; cd 4
+         (echo Dates for tagdate-26-* are:;\
+          echo "  date_T1='$date_T1'";\
+          echo "  date_T2='$date_T2'";\
+          echo "  date_T3='$date_T3'";\
+          echo "  date_T4='$date_T4'";\
+          echo "  date_T5='$date_T5'";\
+          echo "  date_T6='$date_T6'";\
+          echo "  date_T7='$date_T7'";\
+          echo "  date_T8='$date_T8'";\
+          echo "  date_T9='$date_T9'") >>$LOGFILE
+         dotest tagdate-26-trunk-t1 \
+"${testcvs} co -D'$date_T1' -d first-dir-trunk-t1 first-dir" \
+"${SPROG} checkout: Updating first-dir-trunk-t1
+U first-dir-trunk-t1/file1"
+         dotest tagdate-26-br2-t1 \
+"${testcvs} co -r br2 -D'$date_T1' -d first-dir-br2-t1 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t1
+U first-dir-br2-t1/file1"
+         dotest tagdate-26-trunk-t2 \
+"${testcvs} co -D'$date_T2' -d first-dir-trunk-t2 first-dir" \
+"${SPROG} checkout: Updating first-dir-trunk-t2
+U first-dir-trunk-t2/file1"
+         dotest tagdate-26-br2-t2 \
+"${testcvs} co -r br2 -D'$date_T2' -d first-dir-br2-t2 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t2
+U first-dir-br2-t2/file1"
+         dotest tagdate-26-br2-t3 \
+"${testcvs} co -r br2 -D'$date_T3' -d first-dir-br2-t3 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t3
+U first-dir-br2-t3/file1"
+         dotest tagdate-26-br2-t4 \
+"${testcvs} co -r br2 -D'$date_T4' -d first-dir-br2-t4 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t4
+U first-dir-br2-t4/file1"
+         dotest tagdate-26-br2-t6 \
+"${testcvs} co -r br2 -D'$date_T6' -d first-dir-br2-t6 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t6
+U first-dir-br2-t6/file1
+U first-dir-br2-t6/file3"
+         dotest tagdate-26-trunk-t7 \
+"${testcvs} co -D'$date_T7' -d first-dir-trunk-t7 first-dir" \
+"${SPROG} checkout: Updating first-dir-trunk-t7
+U first-dir-trunk-t7/file1
+U first-dir-trunk-t7/file2"
+         dotest tagdate-26-br2-t7 \
+"${testcvs} co -r br2 -D'$date_T7' -d first-dir-br2-t7 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t7
+U first-dir-br2-t7/file1
+U first-dir-br2-t7/file3"
+         dotest tagdate-26-trunk-t8 \
+"${testcvs} co -D'$date_T8' -d first-dir-trunk-t8 first-dir" \
+"${SPROG} checkout: Updating first-dir-trunk-t8
+U first-dir-trunk-t8/file1
+U first-dir-trunk-t8/file2"
+         dotest tagdate-26-br2-t8 \
+"${testcvs} co -r br2 -D'$date_T8' -d first-dir-br2-t8 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t8
+U first-dir-br2-t8/file1
+U first-dir-br2-t8/file3"
+         dotest tagdate-26-br2-t9 \
+"${testcvs} co -r br2 -D'$date_T9' -d first-dir-br2-t9 first-dir" \
+"${SPROG} checkout: Updating first-dir-br2-t9
+U first-dir-br2-t9/file1
+U first-dir-br2-t9/file2
+U first-dir-br2-t9/file3"
+         dotest tagdate-27-trunk-t1 \
+"${testcvs} status first-dir-trunk-t1" \
+"${SPROG} status: Examining first-dir-trunk-t1
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1[^.]*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                ${RCSDELTADATE}
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t1 \
+"${testcvs} status first-dir-br2-t1" \
+"${SPROG} status: Examining first-dir-br2-t1
+===================================================================
+File: file1                    Status: Needs Patch
+
+   Working revision:   1\.1[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-trunk-t2 \
+"${testcvs} status first-dir-trunk-t2" \
+"${SPROG} status: Examining first-dir-trunk-t2
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.2[^.]*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                ${RCSDELTADATE}
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t2 \
+"${testcvs} status first-dir-br2-t2" \
+"${SPROG} status: Examining first-dir-br2-t2
+===================================================================
+File: file1                    Status: Needs Patch
+
+   Working revision:   1\.1[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t3 \
+"${testcvs} status first-dir-br2-t3" \
+"${SPROG} status: Examining first-dir-br2-t3
+===================================================================
+File: file1                    Status: Needs Patch
+
+   Working revision:   1\.1\.4\.1[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t4 \
+"${testcvs} status first-dir-br2-t4" \
+"${SPROG} status: Examining first-dir-br2-t4
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1\.4\.2[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t6 \
+"${testcvs} status first-dir-br2-t6" \
+"${SPROG} status: Examining first-dir-br2-t6
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1\.4\.2[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1[^.]*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-trunk-t7 \
+"${testcvs} status first-dir-trunk-t7" \
+"${SPROG} status: Examining first-dir-trunk-t7
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.2[^.]*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                ${RCSDELTADATE}
+   Sticky Options:     (none)
+
+===================================================================
+File: file2                    Status: Up-to-date
+
+   Working revision:   1\.1[^.]*
+   Repository revision:        1\.1    ${CVSROOT_DIRNAME}/first-dir/file2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                ${RCSDELTADATE}
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t7 \
+"${testcvs} status first-dir-br2-t7" \
+"${SPROG} status: Examining first-dir-br2-t7
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1\.4\.2[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1[^.]*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-trunk-t8 \
+"${testcvs} status first-dir-trunk-t8" \
+"${SPROG} status: Examining first-dir-trunk-t8
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.2[^.]*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                ${RCSDELTADATE}
+   Sticky Options:     (none)
+
+===================================================================
+File: file2                    Status: Up-to-date
+
+   Working revision:   1\.2[^.]*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/file2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                ${RCSDELTADATE}
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t8 \
+"${testcvs} status first-dir-br2-t8" \
+"${SPROG} status: Examining first-dir-br2-t8
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1\.4\.2[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1[^.]*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         dotest tagdate-27-br2-t9 \
+"${testcvs} status first-dir-br2-t9" \
+"${SPROG} status: Examining first-dir-br2-t9
+===================================================================
+File: file1                    Status: Up-to-date
+
+   Working revision:   1\.1\.4\.2[^.]*
+   Repository revision:        1\.1\.4\.2      
${CVSROOT_DIRNAME}/first-dir/file1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.4)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file2                    Status: Up-to-date
+
+   Working revision:   1\.2\.2\.2[^.]*
+   Repository revision:        1\.2\.2\.2      
${CVSROOT_DIRNAME}/first-dir/file2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.2\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file3                    Status: Up-to-date
+
+   Working revision:   1\.1\.2\.1[^.]*
+   Repository revision:        1\.1\.2\.1      
${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         br2 (branch: 1\.1\.2)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+
+         # Now check the contents of the files
+         dotest tagdate-28-trunk-t1 'cat first-dir-trunk-t1/file1' 'trunk-1'
+         dotest tagdate-28-br2-t1 'cat first-dir-br2-t1/file1' 'trunk-1'
+         dotest tagdate-28-trunk-t2 'cat first-dir-trunk-t2/file1' 'trunk-2'
+         dotest tagdate-28-br2-t2 'cat first-dir-br2-t2/file1' 'trunk-1'
+         dotest tagdate-28-br2-t3 'cat first-dir-br2-t3/file1' 'br2-1'
+         dotest tagdate-28-br2-t4 'cat first-dir-br2-t4/file1' 'br2-2'
+         dotest tagdate-28-br2-t6a 'cat first-dir-br2-t6/file1' "br2-2"
+         dotest tagdate-28-br2-t6b 'cat first-dir-br2-t6/file3' "br2-1"
+         dotest tagdate-28-trunk-t7a 'cat first-dir-trunk-t7/file1' "trunk-2"
+         dotest tagdate-28-trunk-t7b 'cat first-dir-trunk-t7/file2' "trunk-1"
+         dotest tagdate-28-br2-t7a 'cat first-dir-br2-t7/file1' "br2-2"
+         dotest tagdate-28-br2-t7b 'cat first-dir-br2-t7/file3' "br2-1"
+         dotest tagdate-28-trunk-t8a 'cat first-dir-trunk-t8/file1' "trunk-2"
+         dotest tagdate-28-trunk-t8b 'cat first-dir-trunk-t8/file2' "trunk-2"
+         dotest tagdate-28-br2-t8a 'cat first-dir-br2-t8/file1' "br2-2"
+         dotest tagdate-28-br2-t8c 'cat first-dir-br2-t8/file3' "br2-1"
+         dotest tagdate-28-br2-t9a 'cat first-dir-br2-t9/file1' "br2-2"
+         dotest tagdate-28-br2-t9b 'cat first-dir-br2-t9/file2' "br2-1"
+         dotest tagdate-28-br2-t9c 'cat first-dir-br2-t9/file3' "br2-1"
+         cd ..
+
+         unset date_T1 date_T2 date_T3 date_T4 date_T5
+         unset date_T6 date_T7 date_T8 date_T9
+         TZ=$save_TZ
+
+         dokeep
+         rm -rf 1 2 3 4
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       multibranch2)
+         # Commit the first delta on branch A when there is an older
+         # branch, B, that already has a delta.  A and B come from the
+         # same branch point.  Then verify that branches A and B are
+         # in the right order.
+         mkdir 1; cd 1
+         dotest multibranch2-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest multibranch2-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+         cd first-dir
+
+         echo trunk-1 >file1
+         echo trunk-1 >file2
+         dotest multibranch2-3 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest multibranch2-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         dotest multibranch2-5 "${testcvs} -q tag -b A" "T file1
+T file2"
+         dotest multibranch2-6 "${testcvs} -q tag -b B" "T file1
+T file2"
+
+         dotest multibranch2-7 "${testcvs} -q update -r B" ''
+         echo branch-B >file1
+         echo branch-B >file2
+         dotest multibranch2-8 "${testcvs} -q ci -m modify-on-B" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.4\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.4\.1; previous revision: 1\.1"
+
+         dotest multibranch2-9 "${testcvs} -q update -r A" 'U file1
+U file2'
+         echo branch-A >file1
+         # When using cvs-1.9.20, this commit gets a failed assertion in rcs.c.
+         dotest multibranch2-10 "${testcvs} -q ci -m modify-on-A" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         dotest multibranch2-11 "${testcvs} -q log file1" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       B: 1\.1\.0\.4
+       A: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+branches:  1\.1\.2;  1\.1\.4;
+add
+----------------------------
+revision 1\.1\.4\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+modify-on-B
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  lines: ${PLUS}1 -1;  
commitid: ${commitid};
+modify-on-A
+============================================================================="
+
+         # This one is more concise.
+         dotest multibranch2-12 "${testcvs} -q log -r1.1 file1" \
+"
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       B: 1\.1\.0\.4
+       A: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 3;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+branches:  1\.1\.2;  1\.1\.4;
+add
+============================================================================="
+
+         # OK, try very much the same thing except we run update -j to
+         # bring the changes from B to A.  Probably tests many of the
+         # same code paths but might as well keep it separate, I guess.
+
+         dotest multibranch2-13 "$testcvs -q update -r B" "U file1
+U file2"
+         dotest multibranch2-14 "$testcvs -q update -r A -j B file2" \
+"U file2
+$SPROG update: Replacing \`file2' with contents of revision 1\.1\.4\.1\.
+M file2"
+         dotest multibranch2-15 "${testcvs} -q ci -m commit-on-A file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       tag8k)
+         # In cvs-1.9.27, there is a bug that can cause an abort.
+         # It happens when you commit a change to a ,v file that has
+         # just the right amount of tag/branch info to align one of the
+         # semicolons in the branch info to be on a 8k-byte boundary.
+         # The result: rcsbuf_getkey got an abort.  This failure doesn't
+         # corrupt the ,v file -- that would be really serious.  But it
+         # does leave stale write locks that have to be removed manually.
+
+         mkdir 1
+         cd 1
+
+         module=x
+
+         : > junk
+         dotest tag8k-1 "$testcvs -Q import -m . $module X Y" ''
+         dotest tag8k-2 "$testcvs -Q co $module" ''
+         cd $module
+
+         file=m
+         : > $file
+         dotest tag8k-3 "$testcvs add $file" \
+"$SPROG add: scheduling file .$file. for addition
+$SPROG add: use .$SPROG commit. to add this file permanently"
+         dotest tag8k-4 "$testcvs -Q ci -m . $file"
+
+         # It seems there have to be at least two versions.
+         echo a > $file
+         dotest tag8k-5 "$testcvs -Q ci -m . $file"
+
+         # Add just under 8K worth of tags.
+         
t=TAG---------------------------------------------------------------------
+         t=$t$t
+         t=$t$t$t$t$t
+         # Now $t is 720 bytes long.
+
+         # Apply some tags with that long prefix.
+         dotest tag8k-6  "$testcvs -Q tag $t-0 $file" ''
+         dotest tag8k-7  "$testcvs -Q tag $t-1 $file" ''
+         dotest tag8k-8  "$testcvs -Q tag $t-2 $file" ''
+         dotest tag8k-9  "$testcvs -Q tag $t-3 $file" ''
+         dotest tag8k-10 "$testcvs -Q tag $t-4 $file" ''
+         dotest tag8k-11 "$testcvs -Q tag $t-5 $file" ''
+         dotest tag8k-12 "$testcvs -Q tag $t-6 $file" ''
+         dotest tag8k-13 "$testcvs -Q tag $t-7 $file" ''
+         dotest tag8k-14 "$testcvs -Q tag $t-8 $file" ''
+         dotest tag8k-15 "$testcvs -Q tag $t-9 $file" ''
+         dotest tag8k-16 "$testcvs -Q tag $t-a $file" ''
+
+         # Extract the author value.
+         name=`sed -n 's/.*;   author \([^;]*\);.*/\1/p' 
${CVSROOT_DIRNAME}/$module/$file,v|sed 1q`
+
+         # Form a suffix string of length (16 - length($name)).
+         # CAREFUL: this will lose if $name is longer than 16.
+         sed_pattern=`echo $name|sed s/././g`
+         suffix=`echo 1234567890123456|sed s/$sed_pattern//`
+
+         # Add a final tag with length chosen so that it will push the
+         # offset of the `;' in the 2nd occurrence of `;\tauthor' in the
+         # ,v file to exactly 8192.
+         dotest tag8k-17 "$testcvs -Q tag "x8bytes-$suffix" $file" ''
+
+         # This commit would fail with 1.9.27.
+         echo a >> $file
+         dotest tag8k-18 "$testcvs -Q ci -m . $file"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       admin)
+         # More "cvs admin" tests.
+         # The basicb-21 test tests rejecting an invalid option.
+         # For -l and -u, see "reserved" and "keyword" tests.
+         # "binfiles" test has a test of "cvs admin -k".
+         # "log2" test has tests of -t and -q options to cvs admin.
+         # "rcs" tests -b option also.
+         # For -o, see:
+         #   admin-22-o1 through admin-23 (various cases not involving ::)
+         #   binfiles2-o* (:rev, rev on trunk; rev:, deleting entire branch)
+         #   basicb-o* (attempt to delete all revisions)
+         #   basica-o1 through basica-o3 (basic :: usage)
+         #   head-o1 (::branch, where this deletes a revision or is noop)
+         #   branches-o1 (::branch, similar, with different branch topology)
+         #   log-o1 (1.3.2.1::)
+         #   binfiles-o1 (1.3:: and ::1.3; binary files)
+         #   binfiles3-9 (binary files)
+         #   Also could be testing:
+         #     1.3.2.6::1.3.2.8
+         #     1.3.2.6::1.3.2
+         #     1.3.2.1::1.3.2.6
+         #     1.3::1.3.2.6 (error?  or synonym for ::1.3.2.6?)
+         # -n: admin, tagf tests.
+
+         # Test the postadmin hook as a side effect of the rest of the tests.
+         # See the `info' test for notes on where other script hooks are
+         # tested.
+         mkdir 2; cd 2
+         dotest admin-init-1 "$testcvs -Q co CVSROOT"
+         cd CVSROOT
+         echo "ALL $TESTDIR/2/loggit %r %p %c" >>postadmin
+         dotest admin-init-2 "$testcvs -Q ci -mlog-admin"
+         cd .. # 2
+
+         cat >loggit <<EOF
+#!$TESTSHELL
+echo \${1+"\$@"} >>$TESTDIR/2/admin-log
+EOF
+         # #^@&!^@ Cygwin.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x $TESTDIR/2/loggit"
+         else
+           chmod +x loggit
+         fi
+         cd .. # $TESTDIR
+
+
+         mkdir 1; cd 1
+         dotest admin-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest admin-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+
+         dotest_fail admin-3 "${testcvs} -q admin -i file1" \
+"${CPROG} admin: the -i option to admin is not supported
+${CPROG} admin: run add or import to create an RCS file
+${CPROG} \[admin aborted\]: specify ${CPROG} -H admin for usage information"
+         dotest_fail admin-4 "${testcvs} -q log file1" \
+"${SPROG} log: nothing known about file1"
+         dotest_fail admin-4a "${testcvs} -q admin file1" \
+"${SPROG} admin: nothing known about file1"
+
+         # Set up some files, file2 a plain one and file1 with a revision
+         # on a branch.
+         touch file1 file2
+         dotest admin-5 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest admin-6 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         dotest admin-7 "${testcvs} -q tag -b br" "T file1
+T file2"
+         dotest admin-8 "${testcvs} -q update -r br" ""
+         echo 'add a line on the branch' >> file1
+         echo 'add a file on the branch' >> file3
+         dotest admin-9a "${testcvs} -q add file3" \
+"${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest admin-9b "${testcvs} -q ci -m modify-on-branch" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/Attic/file3,v  <--  file3
+new revision: 1\.1\.2\.1; previous revision: 1\.1"
+         dotest admin-10 "${testcvs} -q update -A" \
+"U file1
+${SPROG} update: \`file3' is no longer in the repository"
+
+         # Check that we can administer files in the repository that
+         # aren't in the working directory.
+         dotest admin-10-1 "${testcvs} admin ." \
+"${SPROG} admin: Administrating .
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         dotest admin-10-2 "${testcvs} -q admin file3" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+done"
+
+         # Try to recurse with a numeric revision arg.
+         # If we wanted to comprehensive about this, we would also test
+         # this for -l, -u, and all the different -o syntaxes.
+         dotest_fail admin-10a "${testcvs} -q admin -b1.1.2" \
+"${CPROG} admin: while processing more than one file:
+${CPROG} \[admin aborted\]: attempt to specify a numeric revision"
+         dotest_fail admin-10b "${testcvs} -q admin -m1.1:bogus file1 file2" \
+"${CPROG} admin: while processing more than one file:
+${CPROG} \[admin aborted\]: attempt to specify a numeric revision"
+
+         # try a bad symbolic revision
+         dotest_fail admin-10c "${testcvs} -q admin -bBOGUS" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is 
undefined.
+${SPROG} admin: RCS file for .file1. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is 
undefined.
+${SPROG} admin: RCS file for .file2. not modified\."
+
+         # Note that -s option applies to the new default branch, not
+         # the old one.
+         # Also note that the implementation of -a via "rcs" requires
+         # no space between -a and the argument.  However, we expect
+         # to change that once CVS parses options.
+         dotest admin-11 "${testcvs} -q admin -afoo,bar -abaz \
+-b1.1.2 -cxx -U -sfoo file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest admin-11a "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch: 1\.1\.2
+locks:
+access list:
+       foo
+       bar
+       baz
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+add
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: foo;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-on-branch
+============================================================================="
+         dotest admin-12 "${testcvs} -q admin -bbr file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest admin-12a "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch: 1\.1\.2
+locks:
+access list:
+       foo
+       bar
+       baz
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+add
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: foo;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-on-branch
+============================================================================="
+
+         # "cvs log" doesn't print the comment leader.  RCS 5.7 will print
+         # the comment leader only if one specifies "-V4" to rlog.  So it
+         # seems like the only way to test it is by looking at the RCS file
+         # directly.  This also serves as a test of exporting RCS files
+         # (analogous to the import tests in "rcs").
+         # Rather than try to write a rigorous check for whether the
+         # file CVS exports is valid, we just write a simpler
+         # test for what CVS actually exports, and figure we can revise
+         # the check as needed (within the confines of the RCS5 format as
+         # documented in RCSFILES).
+         # Note that we must accept either 2 or 4 digit year.
+         dotest admin-13 "cat ${CVSROOT_DIRNAME}/first-dir/file1,v" \
+"head  1\.1;
+branch 1\.1\.2;
+access
+       foo
+       bar
+       baz;
+symbols
+       br:1\.1\.0\.2;
+locks;
+comment        @xx@;
+
+
+1\.1
+date   ${RCSDELTADATE};        author ${username};     state Exp;
+branches
+       1\.1\.2\.1;
+next   ;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+1\.1\.2\.1
+date   ${RCSDELTADATE};        author ${username};     state foo;
+branches;
+next   ;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+
+desc
+@@
+
+
+1\.1
+log
address@hidden
+@
+text
+@@
+
+
+1\.1\.2\.1
+log
address@hidden
+@
+text
address@hidden 1
+add a line on the branch
+@"
+         dotest_fail admin-14-1 "${testcvs} -q admin \
+-m1.1.1.1:changed-bogus-log-message file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+$SPROG admin: $CVSROOT_DIRNAME/first-dir/file2,v: no such revision 1\.1\.1\.1
+$SPROG admin: RCS file for .file2. not modified."
+         dotest admin-14-2 "${testcvs} -q log file2" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       br: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add
+============================================================================="
+
+         dotest admin-14-3 "${testcvs} -q admin -aauth3 -aauth2,foo \
+-soneone:1.1 -m1.1:changed-log-message -ntagone: file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         dotest admin-15 "${testcvs} -q log file2" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.1
+branch:
+locks: strict
+access list:
+       auth3
+       auth2
+       foo
+symbolic names:
+       tagone: 1\.1
+       br: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: oneone;  commitid: 
${commitid};
+changed-log-message
+============================================================================="
+
+         dotest admin-16 "${testcvs} -q admin \
+-A${CVSROOT_DIRNAME}/first-dir/file2,v -b -L -Nbr:1.1 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest admin-17 "${testcvs} -q log file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+       foo
+       bar
+       baz
+       auth3
+       auth2
+symbolic names:
+       br: 1\.1
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+add
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: foo;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-on-branch
+============================================================================="
+
+         dotest_fail admin-18 "${testcvs} -q admin -nbr:1.1.2 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already 
bound to 1\.1
+${SPROG} admin: RCS file for .file1. not modified\."
+         dotest admin-19 "${testcvs} -q admin -ebaz -ebar,auth3 -nbr file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest admin-20 "${testcvs} -q log file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+       foo
+       auth2
+symbolic names:
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+add
+----------------------------
+revision 1.1.2.1
+date: ${ISO8601DATE};  author: ${username};  state: foo;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-on-branch
+============================================================================="
+
+         # OK, this is starting to get ridiculous, in terms of
+         # testing a feature (access lists) which doesn't do anything
+         # useful, but what about nonexistent files and
+         # relative pathnames in admin -A?
+         dotest_fail admin-19a-nonexist \
+"${testcvs} -q admin -A${TESTDIR}/foo/bar file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${SPROG} admin: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or 
directory
+${SPROG} \[admin aborted\]: cannot continue"
+
+         # In the remote case, we are cd'd off into the temp directory
+         # and so these tests give "No such file or directory" errors.
+         if $remote; then :; else
+           dotest admin-19a-admin "${testcvs} -q admin 
-A../../cvsroot/first-dir/file2,v file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+           dotest admin-19a-log "${testcvs} -q log -h -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+       foo
+       auth2
+       auth3
+keyword substitution: kv
+total revisions: 2
+============================================================================="
+         fi # end of tests skipped for remote
+
+         # Now test that plain -e works right.
+         dotest admin-19a-2 "${testcvs} -q admin -e file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+         dotest admin-19a-3 "${testcvs} -q log -h -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 2
+============================================================================="
+
+         # Put the access list back, to avoid special cases later.
+         dotest admin-19a-4 "${testcvs} -q admin -afoo,auth2 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+
+         # Add another revision to file2, so we can delete one.
+         echo 'add a line' >> file2
+         dotest admin-21 "${testcvs} -q ci -m modify file2" \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.2; previous revision: 1\.1"
+         dotest admin-22 "${testcvs} -q admin -o1.1 file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+deleting revision 1\.1
+done"
+         # Test admin -o.  More variants that we could be testing:
+         # * REV: [on branch]
+         # * REV1:REV2 [deleting whole branch]
+         # * high branch numbers (e.g. 1.2.2.3.2.3)
+         # ... and probably others.  See RCS_delete_revs for ideas.
+
+         echo first rev > aaa
+         dotest admin-22-o1 "${testcvs} add aaa" \
+"${SPROG} add: scheduling file .aaa. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest admin-22-o2 "${testcvs} -q ci -m first aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+initial revision: 1\.1"
+         echo second rev >> aaa
+         dotest admin-22-o3 "${testcvs} -q ci -m second aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.2; previous revision: 1\.1"
+         echo third rev >> aaa
+         dotest admin-22-o4 "${testcvs} -q ci -m third aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.3; previous revision: 1\.2"
+         echo fourth rev >> aaa
+         dotest admin-22-o5 "${testcvs} -q ci -m fourth aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.4; previous revision: 1\.3"
+         echo fifth rev >>aaa
+         dotest admin-22-o6 "${testcvs} -q ci -m fifth aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.5; previous revision: 1\.4"
+         echo sixth rev >> aaa
+         dotest admin-22-o7 "${testcvs} -q ci -m sixth aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.6; previous revision: 1\.5"
+         dotest admin-22-o8 "${testcvs} admin -l1.6 aaa" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+1\.6 locked
+done"
+         dotest admin-22-o9 "${testcvs} log -r1.6 aaa" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+Working file: aaa
+head: 1\.6
+branch:
+locks: strict
+       ${username}: 1\.6
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 6;    selected revisions: 1
+description:
+----------------------------
+revision 1\.6  locked by: ${username};
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+sixth
+============================================================================="
+         dotest_fail admin-22-o10 "${testcvs} admin -o1.5: aaa" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked 
revision 1\.6
+${SPROG} admin: RCS file for .aaa. not modified\."
+         dotest admin-22-o11 "${testcvs} admin -u aaa" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+1\.6 unlocked
+done"
+         dotest admin-22-o12 "${testcvs} admin -o1.5: aaa" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+deleting revision 1\.6
+deleting revision 1\.5
+done"
+         dotest admin-22-o13 "${testcvs} log aaa" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+Working file: aaa
+head: 1\.4
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 4;    selected revisions: 4
+description:
+----------------------------
+revision 1\.4
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+fourth
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+third
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+second
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+first
+============================================================================="
+
+         dotest admin-22-o14 "${testcvs} tag -b -r1.3 br1 aaa" "T aaa"
+         if $remote && test -z "$CVSNOBASES"; then
+           # FIXCVS: The remote behavior is probably correct here.
+           dotest_fail admin-22-o15ar "$testcvs update -rbr1 aaa" \
+"$SPROG \[update aborted\]: could not find desired version 1\.6 in 
$CVSROOT_DIRNAME/first-dir/aaa,v"
+           rm -f aaa CVS/Base/.#aaa.1.6
+           sed /aaa/d <CVS/Entries >tmp; mv tmp CVS/Entries
+         fi
+         dotest admin-22-o15b "$testcvs update -rbr1 aaa" "U aaa"
+         echo new branch rev >> aaa
+         dotest admin-22-o16 "${testcvs} ci -m new-branch aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.3\.2\.1; previous revision: 1\.3"
+         dotest_fail admin-22-o17 "${testcvs} admin -o1.2:1.4 aaa" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+deleting revision 1\.4
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 
1\.3
+${SPROG} admin: RCS file for .aaa. not modified\."
+         dotest admin-22-o18 "${testcvs} update -p -r1.4 aaa" \
+"===================================================================
+Checking out aaa
+RCS:  ${CVSROOT_DIRNAME}/first-dir/aaa,v
+VERS: 1\.4
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+first rev
+second rev
+third rev
+fourth rev"
+         echo second branch rev >> aaa
+         dotest admin-22-o19 "${testcvs} ci -m branch-two aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1"
+         echo third branch rev >> aaa
+         dotest admin-22-o20 "${testcvs} ci -m branch-three aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2"
+         echo fourth branch rev >> aaa
+         dotest admin-22-o21 "${testcvs} ci -m branch-four aaa" \
+"$CVSROOT_DIRNAME/first-dir/aaa,v  <--  aaa
+new revision: 1\.3\.2\.4; previous revision: 1\.3\.2\.3"
+         dotest admin-22-o22 "${testcvs} admin -o:1.3.2.3 aaa" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+deleting revision 1\.3\.2\.1
+deleting revision 1\.3\.2\.2
+deleting revision 1\.3\.2\.3
+done"
+         dotest admin-22-o23 "${testcvs} log aaa" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+Working file: aaa
+head: 1\.4
+branch:
+locks: strict
+access list:
+symbolic names:
+       br1: 1\.3\.0\.2
+keyword substitution: kv
+total revisions: 5;    selected revisions: 5
+description:
+----------------------------
+revision 1\.4
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+fourth
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+branches:  1\.3\.2;
+third
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+second
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+first
+----------------------------
+revision 1\.3\.2\.4
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}4 -0;  
commitid: ${commitid};
+branch-four
+============================================================================="
+
+         dotest admin-22-o24 "${testcvs} -q update -p -r 1.3.2.4 aaa" \
+"first rev
+second rev
+third rev
+new branch rev
+second branch rev
+third branch rev
+fourth branch rev"
+
+         # The bit here about how there is a "tagone" tag pointing to
+         # a nonexistent revision is documented by rcs.  I dunno, I
+         # wonder whether the "cvs admin -o" should give a warning in
+         # this case.
+         dotest admin-23 "${testcvs} -q log file2" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.2
+branch:
+locks: strict
+access list:
+       auth3
+       auth2
+       foo
+symbolic names:
+       tagone: 1\.1
+       br: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+modify
+============================================================================="
+
+         dotest admin-25 "cat ${CVSROOT_DIRNAME}/first-dir/file1,v" \
+"head  1\.1;
+access
+       foo
+       auth2;
+symbols;
+locks; strict;
+comment        @xx@;
+
+
+1\.1
+date   ${RCSDELTADATE};        author ${username};     state Exp;
+branches
+       1\.1\.2\.1;
+next   ;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+1\.1\.2\.1
+date   ${RCSDELTADATE};        author ${username};     state foo;
+branches;
+next   ;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+
+desc
+@@
+
+
+1\.1
+log
address@hidden
+@
+text
+@@
+
+
+1\.1\.2\.1
+log
address@hidden
+@
+text
address@hidden 1
+add a line on the branch
+@"
+
+         # Tests of cvs admin -n.  Make use of the results of
+         # admin-1 through admin-25.
+         # FIXME: We probably shouldn't make use of those results;
+         # this test is way too long as it is.
+
+         # tagtwo should be a revision
+         #
+         dotest admin-26-1 "${testcvs} admin -ntagtwo:tagone file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         
+         # br1 should be a branch
+         #
+         dotest admin-26-2 "${testcvs} admin -nbr1:br file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         
+         # Attach some tags using RCS versions
+         #
+         dotest admin-26-3 "${testcvs} admin -ntagthree:1.1 file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+
+         dotest admin-26-4 "${testcvs} admin -nbr2:1.1.2 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+
+         dotest admin-26-5 "${testcvs} admin -nbr4:1.1.0.2 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         
+         # Check results so far
+         #
+         dotest admin-26-6 "${testcvs} status -v file2" \
+"===================================================================
+File: file2                    Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT_DIRNAME}/first-dir/file2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       br4                             (branch: 1\.1\.2)
+       br2                             (branch: 1\.1\.2)
+       tagthree                        (revision: 1\.1)
+       br1                             (branch: 1\.1\.2)
+       tagtwo                          (revision: 1\.1)
+       tagone                          (revision: 1\.1)
+       br                              (branch: 1\.1\.2)"
+
+         
+         # Add a couple more revisions
+         #
+         echo "nuthr_line" >> file2
+         dotest admin-27-1 "${testcvs} commit -m nuthr_line file2"  \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.3; previous revision: 1\.2"
+
+         echo "yet_another" >> file2
+         dotest admin-27-2 "${testcvs} commit -m yet_another file2"  \
+"$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+new revision: 1\.4; previous revision: 1\.3"
+         
+         # Fail trying to reattach existing tag with -n
+         #
+         dotest admin-27-3 "${testcvs} admin -ntagfour:1.1 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+
+         dotest_fail admin-27-4 "${testcvs} admin -ntagfour:1.3 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour 
already bound to 1\.1
+${SPROG} admin: RCS file for .file2. not modified\."
+         
+         # Succeed at reattaching existing tag, using -N
+         #
+         dotest admin-27-5 "${testcvs} admin -Ntagfour:1.3 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+done"
+         
+         # Fail on some bogus operations
+         # Try to attach to nonexistant tag
+         #
+         dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or 
revision tagfive is undefined\.
+${SPROG} admin: RCS file for .file2. not modified\."
+         
+         # Try a some nonexisting numeric target tags
+         #
+         dotest_fail admin-28-2 "${testcvs} admin -ntagseven:2.1 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} \[admin aborted\]: revision .2\.1. does not exist"
+
+         dotest_fail admin-28-3 "${testcvs} admin -ntageight:2.1.2 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} \[admin aborted\]: revision .2\.1\.2. does not exist"
+         
+         # Try some invalid targets
+         #
+         dotest_fail admin-28-4 "${testcvs} admin -ntagnine:1.a.2 file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} \[admin aborted\]: tag .1\.a\.2. must start with a letter"
+
+         # Confirm that a missing tag is not a fatal error.
+         dotest admin-28-5.1 "${testcvs} -Q tag BO+GUS file1" ''
+         dotest_fail admin-28-5.2 "${testcvs} admin -ntagten:BO+GUS file2 
file1"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or 
revision BO${PLUS}GUS is undefined\.
+${SPROG} admin: RCS file for .file2. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+
+         dotest_fail admin-28-6 "${testcvs} admin -nq.werty:tagfour file2"  \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} \[admin aborted\]: tag .q\.werty. must not contain the characters ..*"
+
+         # Verify the archive
+         #
+         dotest admin-29 "cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \
+"head  1\.4;
+access
+       auth3
+       auth2
+       foo;
+symbols
+       tagfour:1\.3
+       br4:1\.1\.0\.2
+       br2:1\.1\.0\.2
+       tagthree:1\.1
+       br1:1\.1\.0\.2
+       tagtwo:1\.1
+       tagone:1\.1
+       br:1\.1\.0\.2;
+locks; strict;
+comment        @# @;
+
+
+1\.4
+date   ${RCSDELTADATE};        author ${username};     state Exp;
+branches;
+next   1\.3;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+1\.3
+date   ${RCSDELTADATE};        author ${username};     state Exp;
+branches;
+next   1\.2;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+1\.2
+date   ${RCSDELTADATE};        author ${username};     state Exp;
+branches;
+next   ;
+commitid       ${commitid};
+$OPENPGP_PHRASE
+
+desc
+@@
+
+
+1\.4
+log
address@hidden
+@
+text
address@hidden a line
+nuthr_line
+yet_another
+@
+
+
+1\.3
+log
address@hidden
+@
+text
address@hidden 1
+@
+
+
+1\.2
+log
address@hidden
+@
+text
address@hidden 1
+@"
+
+         dotest_fail admin-30 "${testcvs} admin -mbr:another-log-message \
+file2 aaa file3" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/file2,v: no such revision br: 1\.1
+${SPROG} admin: RCS file for .file2. not modified.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/aaa,v: no such revision br
+${SPROG} admin: RCS file for .aaa. not modified.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+done"
+         dotest admin-31 "${testcvs} log" \
+"${SPROG} log: Logging \.
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+Working file: aaa
+head: 1\.4
+branch:
+locks: strict
+access list:
+symbolic names:
+       br1: 1\.3\.0\.2
+keyword substitution: kv
+total revisions: 5;    selected revisions: 5
+description:
+----------------------------
+revision 1\.4
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+fourth
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+branches:  1\.3\.2;
+third
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+second
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+first
+----------------------------
+revision 1\.3\.2\.4
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}4 -0;  
commitid: ${commitid};
+branch-four
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+       foo
+       auth2
+symbolic names:
+       tagten: 1\.1
+       BO${PLUS}GUS: 1\.1
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+branches:  1\.1\.2;
+add
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: foo;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+modify-on-branch
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+Working file: file2
+head: 1\.4
+branch:
+locks: strict
+access list:
+       auth3
+       auth2
+       foo
+symbolic names:
+       tagfour: 1\.3
+       br4: 1\.1\.0\.2
+       br2: 1\.1\.0\.2
+       tagthree: 1\.1
+       br1: 1\.1\.0\.2
+       tagtwo: 1\.1
+       tagone: 1\.1
+       br: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.4
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+yet_another
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+nuthr_line
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+modify
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
+Working file: file3
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+       br: 1\.1\.0\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: dead;  commitid: 
${commitid};
+branches:  1\.1\.2;
+file file3 was initially added on branch br\.
+----------------------------
+revision 1\.1\.2\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+another-log-message
+============================================================================="
+
+         # Currently, this test outputs 36 identical lines, so I am just
+         # checking $DOTSTAR for brevity.
+         dotest admin-postadmin-examine-1 "cat $TESTDIR/2/admin-log" \
+"$CVSROOT_DIRNAME first-dir admin$DOTSTAR"
+
+         dokeep
+
+         # clean up our after ourselves
+         restore_adm
+         cd ../..
+         rm -rf 1 2
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       reserved)
+         # Tests of reserved checkouts.  Eventually this will test
+         # rcslock.pl (or equivalent) and all kinds of stuff.  Right
+         # now it just does some very basic checks on cvs admin -u
+         # and cvs admin -l.
+         # Also should test locking on a branch (and making sure that
+         # locks from one branch don't get mixed up with those from
+         # another.  Both the case where one of the branches is the
+         # main branch, and in which neither one is).
+         # See also test keyword, which tests that keywords and -kkvl
+         # do the right thing in the presence of locks.
+
+         # The usual setup, directory first-dir containing file file1.
+         mkdir 1; cd 1
+         dotest reserved-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest reserved-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+         touch file1
+         dotest reserved-3 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest reserved-4 "${testcvs} -q ci -m add" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1"
+
+         dotest reserved-5 "${testcvs} -q admin -l file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+1\.1 locked
+done"
+         dotest reserved-6 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+       ${username}: 1\.1
+access list:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1  locked by: ${username};
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add
+============================================================================="
+
+         # Note that this just tests the owner of the lock giving
+         # it up.  It doesn't test breaking a lock.
+         dotest reserved-7 "${testcvs} -q admin -u file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+1\.1 unlocked
+done"
+
+         dotest reserved-8 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+Working file: file1
+head: 1\.1
+branch:
+locks: strict
+access list:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+add
+============================================================================="
+
+         # rcslock.pl tests.  Of course, the point isn't to test
+         # rcslock.pl from the distribution but equivalent
+         # functionality (for example, many sites may have an old
+         # rcslock.pl).  The functionality of this hook falls
+         # short of the real rcslock.pl though.
+         # Note that we can use rlog or look at the RCS file directly,
+         # but we can't use "cvs log" because "cvs commit" has a lock.
+
+         cat >${TESTDIR}/lockme <<EOF
+#!${TESTSHELL}
+line=\`grep <\$1/\$2,v 'locks $anyusername:1\.[0-9];'\`
+if test -z "\$line"; then
+  # It isn't locked
+  exit 0
+else
+  user=\`echo \$line | sed -e 's/locks \\($anyusername\\):[0-9.]*;.*/\\1/'\`
+  version=\`echo \$line | sed -e 's/locks $anyusername:\\([0-9.]*\\);.*/\\1/'\`
+  echo "\$user has file a-lock locked for version  \$version" >&2
+  exit 1
+fi
+EOF
+         # Cygwin.  Blaaarg.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x ${TESTDIR}/lockme"
+         else
+           chmod +x ${TESTDIR}/lockme
+         fi
+
+         echo stuff > a-lock
+         dotest reserved-9 "${testcvs} add a-lock" \
+"${SPROG} add: scheduling file .a-lock. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest reserved-10 "${testcvs} -q ci -m new a-lock" \
+"$CVSROOT_DIRNAME/first-dir/a-lock,v  <--  a-lock
+initial revision: 1\.1"
+         # FIXME: the contents of CVSROOT fluctuate a lot
+         # here. Maybe the expect pattern should just
+         # confirm that commitinfo is one of the files checked out,
+         # but for now we just check that CVS exited with success.
+         cd ..
+         if ${testcvs} -q co CVSROOT >>${LOGFILE} ; then
+           pass reserved-11
+         else
+           fail reserved-11
+         fi
+         cd CVSROOT
+         echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
+         dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
+"$CVSROOT_DIRNAME/CVSROOT/commitinfo,v  <--  commitinfo
+new revision: 1\.2; previous revision: 1\.1
+$SPROG commit: Rebuilding administrative file database"
+         cd ..; cd first-dir
+
+         # Simulate (approximately) what a-lock would look like
+         # if someone else had locked revision 1.1.
+         sed -e 's/locks; strict;/locks fred:1.1; strict;/' 
${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v
+         # Cygwin.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod 644 
${CVSROOT_DIRNAME}/first-dir/a-lock,v"
+         else
+           chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+         fi
+         dotest reserved-13 "mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
+         # Cygwin.  Blah.
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod 444 
${CVSROOT_DIRNAME}/first-dir/a-lock,v"
+         else
+           chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+         fi
+         echo more stuff >> a-lock
+         dotest_fail_sort reserved-13b "$testcvs ci -m '' a-lock" \
+"    \"$TESTDIR/lockme\"
+Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
+$SPROG \[commit aborted\]: correct above errors first!
+$SPROG commit: Pre-commit check failed
+$SPROG commit: warning: commitinfo line contains no format strings:
+deprecated\.
+fred has file a-lock locked for version  1\.1"
+         # OK, now test "cvs admin -l" in the case where someone
+         # else has the file locked.
+         dotest_fail reserved-13c "${testcvs} admin -l a-lock" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+${SPROG} \[admin aborted\]: Revision 1\.1 is already locked by fred"
+
+         dotest reserved-14 "${testcvs} admin -u1.1 a-lock" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+${SPROG} admin: ${CVSROOT_DIRNAME}/first-dir/a-lock,v: revision 1\.1 locked by 
fred; breaking lock
+1\.1 unlocked
+done"
+         dotest reserved-15 "$testcvs -q ci -m success a-lock" \
+"$SPROG commit: warning: commitinfo line contains no format strings:
+    \"$TESTDIR/lockme\"
+Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
+deprecated\.
+$CVSROOT_DIRNAME/first-dir/a-lock,v  <--  a-lock
+new revision: 1\.2; previous revision: 1\.1"
+
+         # Now test for a bug involving branches and locks
+         sed -e 's/locks; strict;/locks fred:1.2; strict;/' 
${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v
+         chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+         dotest reserved-16 \
+"mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v" ""
+         chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+         dotest reserved-17 "${testcvs} -q tag -b br a-lock" "T a-lock"
+         dotest reserved-18 "${testcvs} -q update -r br a-lock" ""
+         echo edit it >>a-lock
+         dotest reserved-19 "${testcvs} -q ci -m modify a-lock" \
+"$SPROG commit: warning: commitinfo line contains no format strings:
+    \"$TESTDIR/lockme\"
+Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
+deprecated\.
+$CVSROOT_DIRNAME/first-dir/a-lock,v  <--  a-lock
+new revision: 1\.2\.2\.1; previous revision: 1\.2"
+
+         # undo commitinfo changes
+         cd ../CVSROOT
+         echo '# vanilla commitinfo' >commitinfo
+         dotest reserved-cleanup-1 "${testcvs} -q ci -m back commitinfo" \
+"$SPROG commit: warning: commitinfo line contains no format strings:
+    \"$TESTDIR/lockme\"
+Appending defaults (\" %r/%p %s\"), but please be aware that this usage is
+deprecated\.
+$CVSROOT_DIRNAME/CVSROOT/commitinfo,v  <--  commitinfo
+new revision: 1\.3; previous revision: 1\.2
+$SPROG commit: Rebuilding administrative file database"
+
+         dokeep
+         cd ..; rm -rf CVSROOT
+         cd ..
+         rm -r 1
+         rm $TESTDIR/lockme
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+        diffmerge1)
+         # Make sure CVS can merge correctly in circumstances where it
+         # used to mess up (due to a bug which existed in diffutils 2.7
+         # and 2.6, but not 2.5, and which has been fixed in CVS's diff
+         # lib by Paul Eggert, bless his bitty heart).
+
+         # This first test involves two working copies, "mine" and
+         # "yours", checked out from the same repository at the same
+         # time.  In yours, you remove some text from the end of the
+         # file and check it in; meanwhile, "me" has commented out some
+         # lines earlier in the file, and I go to check it in right
+         # after you checked yours in.  CVS naturally tells me the file
+         # is not up-to-date, so I run cvs update, but it updates
+         # incorrectly, leaving in the lines of text you just deleted.
+         # Bad!  I'm in too much of a hurry to actually look at the
+         # file, so I check it in and go home, and so your changes have
+         # been lost.  Later you discover this, and you suspect me of
+         # deliberately sabotaging your work, so you let all the air
+         # out of my tires.  Only after a series of expensive lawsuits
+         # and countersuits do we discover that this was all CVS's
+         # fault.
+         #
+         # Luckily, this problem has been fixed now, as our test will
+         # handily confirm, no doubt:
+
+         # First make a repository containing the original text:
+
+         # We should be here anyway, but cd to it just in case:
+         cd ${TESTDIR}
+
+         mkdir diffmerge1
+         cd diffmerge1
+
+         # These are the files we both start out with:
+         mkdir import
+         cd import
+         diffmerge_create_older_files
+
+         dotest diffmerge1_import \
+           "${testcvs} import -m import diffmerge1 tag1 tag2" \
+           "${DOTSTAR}No conflicts created by this import"
+         cd ..
+
+         # Check out two working copies, one for "you" and one for
+         # "me".  If no branch is used and cvs detects that only one
+         # of the two people made changes, then cvs does not run the
+         # merge algorithm.  But if a branch is used, then cvs does run
+         # the merge algorithm (even in this case of only one of the two
+         # people having made changes).  CVS used to have a bug in this
+         # case.  Therefore, it is important to test this case by
+         # using a branch:
+         ${testcvs} rtag     -b tag diffmerge1 >/dev/null 2>&1
+         ${testcvs} checkout -r tag diffmerge1 >/dev/null 2>&1
+         mv diffmerge1 yours
+         ${testcvs} checkout diffmerge1 >/dev/null 2>&1
+         mv diffmerge1 mine
+
+         # In your working copy, you'll make changes, and
+         # then check in your changes before I check in mine:
+         cd yours
+         diffmerge_create_your_files
+          dotest diffmerge1_yours "${testcvs} -q ci -m yours" \
+"$CVSROOT_DIRNAME/diffmerge1/testcase01,v  <--  testcase01
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase02,v  <--  testcase02
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase03,v  <--  testcase03
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase04,v  <--  testcase04
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase05,v  <--  testcase05
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase06,v  <--  testcase06
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase07,v  <--  testcase07
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase08,v  <--  testcase08
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase09,v  <--  testcase09
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+$CVSROOT_DIRNAME/diffmerge1/testcase10,v  <--  testcase10
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1"
+
+         # Change my copy.  Then I
+         # update, after both my modifications and your checkin:
+         cd ../mine
+         diffmerge_create_my_files
+         dotest diffmerge1_mine "$testcvs update -j tag" \
+"$SPROG update: Updating \.
+M testcase01
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase01'
+M testcase01
+M testcase02
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase02'
+M testcase02
+M testcase03
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase03'
+M testcase03
+M testcase04
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase04'
+M testcase04
+$SPROG update: Replacing \`testcase05' with contents of revision 
1\.1\.1\.1\.2\.1\.
+M testcase05
+$SPROG update: Replacing \`testcase06' with contents of revision 
1\.1\.1\.1\.2\.1\.
+M testcase06
+M testcase07
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase07'
+\`testcase07' already contains the differences between 1\.1\.1\.1 and 
1\.1\.1\.1\.2\.1
+M testcase07
+M testcase08
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase08'
+M testcase08
+M testcase09
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase09'
+M testcase09
+M testcase10
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into \`testcase10'
+M testcase10"
+
+         # So if your changes didn't make it into my working copy, or
+         # in any case if the files do not look like the final text
+         # in the files in directory comp_me, then the test flunks:
+         cd ..
+         mkdir comp_me
+         cd comp_me
+         diffmerge_create_expected_files
+         cd ..
+         rm mine/.#*
+
+         dotest diffmerge1_cmp "directory_cmp comp_me mine"
+
+         # Clean up after ourselves:
+         dokeep
+         cd ..
+         rm -rf diffmerge1
+         modify_repo rm -rf $CVSROOT_DIRNAME/diffmerge1
+         ;;
+
+
+
+        diffmerge2)
+
+         # FIXME: This test should be rewritten to be much more concise.
+         # It currently weighs in at something like 600 lines, but the
+         # same thing could probably be tested in more like 50-100 lines.
+         mkdir diffmerge2
+
+         # This tests for another diffmerge bug reported by Martin
+         # Tomes; actually, his bug was probably caused by an initial
+         # fix for the bug in test diffmerge1, and likely wasn't ever
+         # a problem in CVS as long as one was using a normal
+         # distribution of diff or a version of CVS that has the diff
+         # lib in it. 
+         #
+         # Nevertheless, once burned twice cautious, so we test for his
+         # bug here.
+         #
+         # Here is his report, more or less verbatim:
+         # ------------------------------------------
+         #
+         # Put the attached file (sgrid.h,v) into your repository
+         # somewhere, check out the module and do this:
+         #
+         # cvs update -j Review_Phase_2_Enhancements sgrid.h
+         # cvs diff -r Review_V1p3 sgrid.h
+         #
+         # As there have been no changes made on the trunk there
+         # should be no differences, however this is output:
+         #
+         # % cvs diff -r Review_V1p3 sgrid.h
+         # Index: sgrid.h
+         # ===================================================================
+         # RCS file: /usr/local/repository/play/fred/sgrid.h,v
+         # retrieving revision 1.1.2.1
+         # diff -r1.1.2.1 sgrid.h
+         # 178a179,184
+         # > /*--------------------------------------------------------------
+         # > INLINE FUNCTION    :    HORIZONTALLINES
+         # > NOTES              :    Description at the end of the file
+         # > ----------------------------------------------------------------*/
+         # >         uint16 horizontalLines( void );
+         # >
+         #
+         # I did a cvs diff -c -r 1.1 -r 1.1.2.1 sgrid.h and patched those
+         # differences to sgrid.h version 1.1 and got the correct result
+         # so it looks like the built in patch is faulty.
+         # -------------------------------------------------------------------
+         #
+         # This is the RCS file, sgrid.h,v, that he sent:
+
+         echo "head    1.1;
+access;
+symbols
+       Review_V1p3:1.1.2.1
+       Review_V1p3C:1.1.2.1
+       Review_1p3A:1.1.2.1
+       Review_V1p3A:1.1.2.1
+       Review_Phase_2_Enhancements:1.1.0.2
+       Review_V1p2:1.1
+       Review_V1p2B:1.1
+       Review_V1p2A:1.1
+       Review_V1p1:1.1
+       Review_1p1:1.1;
+locks; strict;
+comment        @ * @;
+
+
+1.1
+date   97.04.02.11.20.05;      author colinl;  state Exp;
+branches
+       1.1.2.1;
+next   ;
+
+1.1.2.1
+date   97.06.09.10.00.07;      author colinl;  state Exp;
+branches;
+next   ;
+
+
+desc
+@@
+
+
+1.1
+log
address@hidden:     DEV1175
+DCN:
+Tested By:   Colin Law
+Reviewed By:
+Reason for Change: Initial Revision of all files
+
+Design Change Details:
+
+Implications:
+@
+text
+@/* \$""Header:   L:/gpanels/dis/sgrid.h_v   1.1.1.0   24 Jan 1996 14:59:20   
PAULT  \$ */
+/*
+ * \$""Log:   L:/gpanels/dis/sgrid.h_v  \$
+ * 
+ *    Rev 1.1.1.0   24 Jan 1996 14:59:20   PAULT
+ * Branched
+ * 
+ *    Rev 1.1   24 Jan 1996 12:09:52   PAULT
+ * Consolidated 4100 code merged to trunk
+ * 
+ *    Rev 1.0.2.0   01 Jun 1995 14:18:58   DAVEH
+ * Branched
+ * 
+ *    Rev 1.0   19 Apr 1995 16:32:48   COLINL
+ * Initial revision.
+*/
+/*****************************************************************************
+FILE        :   SGRID.H
+VERSION     :   2.1
+AUTHOR      :   Dave Hartley
+SYSTEM      :   Borland C++
+DESCRIPTION :   The declaration of the scrolling grid class
+                  
+*****************************************************************************/
+#if !defined(__SGRID_H)
+#define __SGRID_H
+
+#if !defined(__SCROLL_H)
+#include <scroll.h>
+#endif
+
+#if !defined(__GKI_H)
+#include \"gki.h\"
+#endif
+
+#if defined PRINTING_SUPPORT
+class Printer;
+#endif
+
+/*****************************************************************************
+CLASS      :    ScrollingGrid   
+DESCRIPTION:    This class inherits from a grid and a scrollable, and
+                can therefore use all the PUBLIC services provided by these
+                classes. A description of these can be found in
+                GRID.H and SCROLL.H.
+                A scrolling grid is a set of horizontal and vertical lines
+                that scroll and continually update to provide a complete grid
+
+*****************************************************************************/
+
+class ScrollingGrid : public Scrollable
+{
+    public:
+#if defined _WINDOWS
+/*---------------------------------------------------------------------------
+FUNCTION    :   CONSTRUCTOR
+DESCRIPTION :   sets up the details of the grid, ready for painting
+ARGUMENTS   :   name  : sgColour
+                        - the colour of the grid
+                        sgLineType
+                        - the syle of line
+                        sgHorizontalTotal
+                        - the total number of horizontal grid lines
+                        verticalSpacingMin
+                        - the min distance between the vertical grid lines
+                          on the scrolling axis
+                        currentTimestamp
+                        - timestamp value now
+                        ticksPerSecond
+                        - number of timestamp ticks per second
+                        ticksPerPixel
+                        - number of timestamp ticks per pixel required
+                      
+RETURN      :   None
+NOTES       :   
+---------------------------------------------------------------------------*/
+        ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType, 
+            uint16 sgHorizontalTotal, 
+            uint16 verticalSpacingMin, uint32 currentTimestamp, 
+            uint16 ticksPerSecond, uint32 ticksPerPixel );
+#else
+/*---------------------------------------------------------------------------
+FUNCTION    :   CONSTRUCTOR
+DESCRIPTION :   sets up the details of the grid, ready for painting
+ARGUMENTS   :   name  : sgColour
+                        - the colour of the grid
+                        sgLineType
+                        - the syle of line
+                        sgHorizontalTotal ( THE MAX NUMBER OF LINES IS 100 )
+                        - the total number of horizontal grid lines
+                        sgVerticalSpacing
+                        - the distance between the vertical grid lines
+                        on the scrolling axis
+                      
+RETURN      :   None
+NOTES       :   If the caller does not get the total grid lines value, synced
+                with the overall size of the viewport, the spacing between
+                grid lines will not be consistent.
+
+---------------------------------------------------------------------------*/
+        ScrollingGrid( GkiColour sgColour, GkiLineType sgLineType
+                     , uint16 sgHorizontalTotal, uint16 sgVerticalSpacing );
+#endif
+/*---------------------------------------------------------------------------
+FUNCTION    :   DESTRUCTOR
+DESCRIPTION :   tidies it all up
+ARGUMENTS   :   name  :      
+                      
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        ~ScrollingGrid( void );
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   ATTACH
+DESCRIPTION :   This service overloads the base class service, as it does
+                additional work at the time of attachment.
+
+ARGUMENTS   :   name  : tDrawingArea
+                        - the scrolled viewport to attach this trend to
+                      
+RETURN      :   None
+NOTES       :
+---------------------------------------------------------------------------*/
+        void attach( SViewport *tDrawingArea );
+
+#if defined _WINDOWS
+/*---------------------------------------------------------------------------
+FUNCTION    :   calculateVerticalSpacing
+DESCRIPTION :   determines optimum spacing along time axis
+ARGUMENTS   :   
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void calculateVerticalSpacing();
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   gridSpacingTicks
+DESCRIPTION :   Provides the grid spacing in the time axis in ticks
+ARGUMENTS   :   
+RETURN      :   Number of ticks
+NOTES       : 
+---------------------------------------------------------------------------*/
+        uint32 gridSpacingTicks();
+
+#endif
+
+/*---------------------------------------------------------------------------
+INLINE FUNCTION    :    HORIZONTALLINES
+NOTES              :    Description at the end of the file
+---------------------------------------------------------------------------*/
+        uint16 horizontalLines( void );
+
+#if defined _WINDOWS
+// In Windows the OnDraw() function replaces paint()
+/*---------------------------------------------------------------------------
+FUNCTION    :   ScrollingGrid OnDraw   
+DESCRIPTION :   Paints the given area of the grid.
+                Pure virtual
+ARGUMENTS   :   pDC     pointer to the device context to use for display
+                        Note that the device context operates in the coords
+                        of the window owning the viewport
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        virtual void OnDraw( CDC *pDC );
+
+#else   // not Windows            
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINT
+DESCRIPTION :   This extends the standard grid paint method to paint the
+                viewport relative to its current position. 
+                
+ARGUMENTS   :   name  :      
+                      
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void paint( void );
+#endif
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   P A I N T   T E X T   M A R K E R S 
+DESCRIPTION :   this service allow the text markers to be painted seperatley
+                from the grid lines
+
+ARGUMENTS   :   name : 
+                                                                          
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void paintTextMarkers();
+
+#if defined PRINTING_SUPPORT
+/*---------------------------------------------------------------------------
+FUNCTION    :   P R I N T 
+DESCRIPTION :   This print service prints a grid marker ( being either a
+                timestamp or a date, IF there is one at the plot position
+                given
+
+ARGUMENTS   :   name :
+                        displayPosition
+                        - Where in the log to look to see if there is an
+                          entry to print
+
+                        - printerPtr
+                          the printer to print to
+                                                                          
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void print( uint16 currentPrintPos, Printer *printerPtr );
+#endif
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   S E T  D R I V E  D I R E C T I O N
+DESCRIPTION :   Sets direction for update and scrolling forwards or backwards
+ARGUMENTS   :   direction  - required direction
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void setDriveDirection( ScrollDirection direction );
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   S E T U P 
+DESCRIPTION :   service that will setup the grid prior to a paint
+
+ARGUMENTS   :   name :
+                        - newTimestamp
+                            
+
+                        - newTimeBase
+                        the number of ticks that represent a plot point on
+                        the trendgraph. 
+                                                                          
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void setup( uint32 newTimestamp, uint32 newTimeBase );
+
+#if defined PRINTING_SUPPORT
+/*---------------------------------------------------------------------------
+FUNCTION    :   S E T U P   F O R   P R I N T   
+DESCRIPTION :   This service iis to be called prior to printing. It allows
+                the grid to prepare its markers ready for the print
+                commands
+
+ARGUMENTS   :   name : 
+                                                                          
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void setupForPrint();
+#endif
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   UPDATE
+DESCRIPTION :   When this service is called it will calculate what needs to
+                be painted and fill in the display again.
+
+ARGUMENTS   :   name  :     timeStamp
+                            - the reference time of this update.
+                      
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void update( uint32 timeStamp );
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   U P D A T E   B U F F E R
+DESCRIPTION :   When a display update is not required, use this method. It
+                updates the internal data ready for a call to paint that
+                will then show the grid in the right position
+
+ARGUMENTS   :   name  :      
+                      
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void updateBuffer( void );
+
+    private:
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   M A K E   G R I D   M A R K E R 
+DESCRIPTION :   service that perpares a string for display. The string will
+                either be a short date, or short time. this is determined
+                by the current setting of the dateMarker flag
+
+ARGUMENTS   :   name :  timestampVal
+                        - the value to convert
+                        
+                        storePtr
+                        - the place to put the string
+
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void makeGridMarker( uint32 timestampVal, char *storePtr );
+            
+/*---------------------------------------------------------------------------
+FUNCTION    :   P A I N T   G R I D   M A R K E R 
+DESCRIPTION :   given a position will put the string on the display
+
+ARGUMENTS   :   name :
+                        yPos
+                        - were it goes on the Y-axis
+
+                        gridMarkerPtr
+                        - what it is
+                                                                          
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void paintGridMarker( uint16 yPos, char *gridMarkerPtr );
+
+#if defined _WINDOWS
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINTHORIZONTALLINES
+DESCRIPTION :   responsible for painting the grids horizontal lines 
+ARGUMENTS   :   pRectToDraw     pointer to rectangle that needs refreshing.
+                                in viewport coords
+                pDC             pointer to device context to use
+                      
+RETURN      : None
+NOTES       :
+---------------------------------------------------------------------------*/
+        void paintHorizontalLines(RectCoords* pRectToDraw, CDC* pDC );
+#else
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINTHORIZONTALLINES
+DESCRIPTION :   responsible for painting the grids horizontal lines 
+ARGUMENTS   : name: xStart
+                    - the starting X co-ordinate for the horizontal line
+                    xEnd
+                    - the ending X co-ordinate for the horizontal line
+                      
+RETURN      : None
+NOTES       : Remember lines are drawn from origin. The origin in a
+              horizontal viewport will be the top.    
+---------------------------------------------------------------------------*/
+        void paintHorizontalLines( uint16 xStart, uint16 xEnd );
+#endif
+
+#if defined _WINDOWS
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINTVERTICALLINES
+DESCRIPTION :   responsible for painting the grids vertical lines 
+ARGUMENTS   :   pRectToDraw     pointer to rectangle that needs refreshing.
+                                in viewport coords
+                offset          offset from rhs that rightmost line would be 
+                                drawn if rectangle included whole viewport
+                pDC             pointer to device context to use
+RETURN      : None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void paintVerticalLines( RectCoords* pRectToDraw, uint16 offset,
+            CDC* pDC );
+#else
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINTVERTICALLINES
+DESCRIPTION :   responsible for painting the grids vertical lines 
+ARGUMENTS   : name  :   yStart
+                        - the starting Y co-ordinate for the vertical line
+                        yEnd
+                        - the ending Y co-ordinate for the vertical line
+                        offset
+                        - a starting point offset that determines at what X
+                        position the first line will be drawn
+
+                      
+RETURN      : None
+NOTES       : 
+---------------------------------------------------------------------------*/
+        void paintVerticalLines( uint16 yStart, uint16 yEnd, uint16 offset );
+#endif
+
+#if defined _WINDOWS
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINTVERTICALLINE
+DESCRIPTION :   paints one line at the position specified, and length
+ARGUMENTS   :   name  : yStart
+                        - the starting point on the y axis for the line
+                        yEnd
+                        - the end point on the y axis for the line
+                        xPosition
+                        - The horizontal offset from the start of the viewport
+                pDC             pointer to device context to use
+                      
+RETURN      :   None
+NOTES       :   There is not an equivalent horizontal method as yet. This
+                is a seperate method because the service is useful to a
+                derivation of this class
+---------------------------------------------------------------------------*/
+        void paintVerticalLine( uint16 yStart, uint16 yEnd
+                              , uint16 xPosition, CDC *pDC );
+#else
+/*---------------------------------------------------------------------------
+FUNCTION    :   PAINTVERTICALLINE
+DESCRIPTION :   paints one line at the position specified, and length
+ARGUMENTS   :   name  : yStart
+                        - the starting point on the y axis for the line
+                        yEnd
+                        - the end point on the y axis for the line
+                        xPosition
+                        - The horizontal offset from the start of the viewport
+                      
+RETURN      :   None
+NOTES       :   There is not an equivalent horizontal method as yet. This
+                is a seperate method because the service is useful to a
+                derivation of this class
+---------------------------------------------------------------------------*/
+        void paintVerticalLine( uint16 yStart, uint16 yEnd
+                              , uint16 xPosition );
+#endif
+
+/*---------------------------------------------------------------------------
+INLINE FUNCTION    :    VERTICALSPACING
+NOTES              :    Description at the end of the file
+---------------------------------------------------------------------------*/
+        uint16 verticalSpacing( void );
+
+
+        // Position in viewport that we are now writing to if going forwards
+        // Note that if this is greater than viewport length then we have
+        // just scrolled and value must be adjusted before use.
+        sint16 forwardsOutputPosition;
+        
+        // Position in viewport that we are now writing to if going backwards
+        // Note that if this is less than zero then we have
+        // just scrolled and value must be adjusted before use.
+        sint16 backwardsOutputPosition;
+
+        // position in grid cycle of forwards output position.
+        // if zero then it is time to output a grid line
+        sint16 forwardsIntervalCount;
+
+        // position in grid cycle of forwards output position.
+        // if zero then it is time to output a grid line
+        sint16 backwardsIntervalCount;
+        
+        uint32  lastUpdateTimestamp;
+        uint32  timeBase;       // ticks per pixel
+        uint16  currentOutputPosition;
+        uint16  gridTimestampSpacing;
+        uint16  intervalCount;
+        uint16  horizontalTotal;
+        uint16  vSpacing;
+#if defined PRINTING_SUPPORT
+        uint16  numberOfGridMarkersPrinted;
+#endif
+        bool    firstTime;       // indicates first time through
+        bool    dateMarker;
+
+        GkiLineType lineType;
+        GkiColour   gridColour;
+
+    #if defined _WINDOWS
+        uint16 ticksPerSec;     // number of time ticks per second
+        uint16 vSpacingMin;     // minimum pixels per division along time axis 
+        CPen *pPen;             // the pen to use for drawing in windows
+    #endif
+
+};
+
+
+/*****************************************************************************
+                        I N L I N E   F U N C T I O N S   
+*****************************************************************************/
+
+/*---------------------------------------------------------------------------
+FUNCTION    :   HORIZONTALLINES
+DESCRIPTION :   supplies the number of horizontal lines in the grid
+ARGUMENTS   :   name  :      
+                      
+RETURN      :   
+NOTES       : 
+---------------------------------------------------------------------------*/
+inline uint16 ScrollingGrid::horizontalLines( void )
+{
+    return( horizontalTotal );
+}
+/*---------------------------------------------------------------------------
+FUNCTION    :   VERTICALSPACING
+DESCRIPTION :   returns the distance between adjacent vertical lines
+ARGUMENTS   :   name  :      
+                      
+RETURN      :   None
+NOTES       : 
+---------------------------------------------------------------------------*/
+inline uint16 ScrollingGrid::verticalSpacing( void )
+{
+    return( vSpacing );
+}
+
+#endif
+@
+
+
+1.1.2.1
+log
address@hidden:DS4    Provision of major and minor grid lines
+@
+text
address@hidden 1
+a1 1
+/* \$""Header: /usr/local/repository/cmnsrc/review/src/sgrid.h,v 1.1 
1997/04/02 11:20:05 colinl Exp \$ */
+d3 1
+a3 12
+ * \$""Log: sgrid.h,v \$
+ * Revision 1.1  1997/04/02 11:20:05  colinl
+ * Project:     DEV1175
+ * DCN:
+ * Tested By:   Colin Law
+ * Reviewed By:
+ * Reason for Change: Initial Revision of all files
+ *
+ * Design Change Details:
+ *
+ * Implications:
+ *
+d58 6
+a63 5
+ARGUMENTS   :   name  : majorColour         colour for major grid lines
+                        minorColour         colour for minor grid lines
+                        sgLineType          line type for minor grid lines
+                        yMajorGridLines     number of major y lines on grid
+                        yMinorGridLines     number of major y lines on grid
+d77 2
+a78 3
+        ScrollingGrid( GkiColour majorColour, GkiColour minorColour, 
+            GkiLineType sgLineType, 
+            uint16 yMajorGridLines, uint16 yMinorGridLines,
+a137 17
+FUNCTION    :   DrawHorizontalGridLines
+
+DESCRIPTION :   Draws major or minor grid lines
+ARGUMENTS   :   pDC         device context
+                pPen        pen to use
+                numLines    total lines required
+                yLow, yHigh, xLow, xHigh   rectangle to draw in
+                yMax        max y value
+RETURN      :   None
+NOTES       :   
+---------------------------------------------------------------------------*/
+        void DrawHorizontalGridLines( CDC* pDC, CPen* pPen, 
+            uint16 numLines,
+            uint16 yLow, uint16 yHigh, uint16 xLow, uint16 xHigh, 
+            uint16 yMax );
+
+/*---------------------------------------------------------------------------
+d148 6
+d448 1
+a448 2
+        uint16  m_yMajorGridLines;
+        uint16  m_yMinorGridLines;
+d456 2
+a457 3
+        GkiLineType lineType;    // line type for minor grid lines
+        GkiColour   m_majorColour;
+        GkiColour   m_minorColour;
+d462 1
+a462 2
+        CPen *pMajorPen;        // pen to use for drawing major grid lines
+        CPen *pMinorPen;        // pen to use for drawing minor grid lines
+d472 12
+@" > diffmerge2/sgrid.h,v
+
+         # We have to put the RCS file in the repository by hand for
+         # this test:
+         modify_repo mkdir $CVSROOT_DIRNAME/diffmerge2
+         modify_repo cp diffmerge2/sgrid.h,v \
+                        $CVSROOT_DIRNAME/diffmerge2/sgrid.h,v
+         rm -rf diffmerge2
+         dotest diffmerge2_co \
+           "$testcvs co diffmerge2" "${DOTSTAR}U $DOTSTAR"
+         cd diffmerge2
+         dotest diffmerge2_update \
+           "$testcvs update -j Review_Phase_2_Enhancements sgrid.h" \
+           "$SPROG update: Replacing \`sgrid.h' with contents of revision 
1\.1\.2\.1\.
+M sgrid\.h"
+         # This is the one that counts -- there should be no output:
+         dotest diffmerge2_diff \
+           "${testcvs} diff -r Review_V1p3 sgrid.h" ''
+
+         dokeep
+         cd ..
+         rm -rf diffmerge2
+         modify_repo rm -rf $CVSROOT_DIRNAME/diffmerge2
+         ;;
+
+
+
+       release)
+         # Tests of "cvs release", particularly multiple arguments.
+         # Other CVS release tests:
+         #   info-cleanup-0 for "cvs -n release".
+         #   ignore-193 for the text of the question that cvs release asks.
+         #     Also for interactions with cvsignore.
+         #   basicc: "-d .", global -Q, no arguments (is a noop),
+         #     "cvs release" without -d, multiple arguments.
+         #   dirs-4: repository directory has been deleted.
+         #   modules2-6: multiple arguments.
+
+         # First the usual setup; create a directory first-dir.
+         mkdir 1; cd 1
+         dotest release-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest release-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+         mkdir dir1
+         dotest release-3 "${testcvs} add dir1" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
+         mkdir dir2
+         dotest release-4 "${testcvs} add dir2" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository"
+          cd dir2
+         mkdir dir3
+         dotest release-5 "${testcvs} add dir3" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
+
+          cd ../..
+         dotest release-6 "${testcvs} release -d first-dir/dir2/dir3 
first-dir/dir1" \
+"You have .0. altered files in this repository.
+Are you sure you want to release (and delete) directory .first-dir/dir2/dir3.: 
\
+You have .0. altered files in this repository.
+Are you sure you want to release (and delete) directory .first-dir/dir1.: " 
<<EOF
+yes
+yes
+EOF
+         dotest_fail release-7 "test -d first-dir/dir1" ''
+         dotest_fail release-8 "test -d first-dir/dir2/dir3" ''
+         dotest release-9 "${testcvs} update" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating first-dir
+${SPROG} update: Updating first-dir/dir2"
+
+          cd first-dir
+         mkdir dir1
+         dotest release-10 "${testcvs} add dir1" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
+          cd dir2
+         mkdir dir3
+         dotest release-11 "${testcvs} add dir3" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
+
+          cd ../..
+         dotest release-12 "${testcvs} release first-dir/dir2/dir3 
first-dir/dir1" \
+"You have .0. altered files in this repository.
+Are you sure you want to release directory .first-dir/dir2/dir3.: .. .release. 
aborted by user choice.
+You have .0. altered files in this repository.
+Are you sure you want to release directory .first-dir/dir1.: " <<EOF
+no
+yes
+EOF
+         dotest release-13 "${testcvs} release first-dir/dir2/dir3 
first-dir/dir2" \
+"You have .0. altered files in this repository.
+Are you sure you want to release directory .first-dir/dir2/dir3.: \
+You have .0. altered files in this repository.
+Are you sure you want to release directory .first-dir/dir2.: " <<EOF
+yes
+yes
+EOF
+         dotest release-14 "test -d first-dir/dir1" ''
+         dotest release-15 "test -d first-dir/dir2/dir3" ''
+
+         mkdir first-dir/dir1/dir4
+         # FIXCVS: There should be a path showing in front of dir below,
+         # I believe.
+         dotest release-unrecognized-dir-1 \
+"${testcvs} release -d first-dir/dir1" \
+"${QUESTION} dir4
+You have .0. altered files in this repository.
+Are you sure you want to release (and delete) directory \`first-dir/dir1': " 
<<EOF
+yes
+EOF
+
+         rm -rf first-dir/dir2
+
+         dotest release-16 "${testcvs} update" \
+"$SPROG update: Updating \.
+$SPROG update: Updating first-dir"
+
+         # Check to make sure release isn't overwriting a
+         # CVS/Entries file in the current directory (using data
+         # from the released directory).
+
+         # cvs 1.11 (remote) fails on release-21 (a message about
+          # chdir into the removed directory), although it seemingly
+         # unedits and removes the directory correctly.  If
+         # you manually continue, it then fails on release-22 do
+         # to the messed up CVS/Entries file from release-21.
+          cd first-dir
+         mkdir second-dir
+         dotest release-18 "$testcvs add second-dir" \
+"Directory $CVSROOT_DIRNAME/first-dir/second-dir added to the repository"
+
+         cd second-dir
+         touch file1
+         dotest release-19 "$testcvs -Q add file1"
+         dotest release-20 '$testcvs -q ci -m add' \
+"$CVSROOT_DIRNAME/first-dir/second-dir/file1,v  <--  file1
+initial revision: 1\.1"
+         dotest release-21 "$testcvs -q edit file1"
+         cd ..
+         dotest release-22 "echo yes | $testcvs release -d second-dir" \
+"You have \[0\] altered files in this repository.
+Are you sure you want to release (and delete) directory \`second-dir': "
+         dotest release-23 "$testcvs -q update -d" "U second-dir/file1"
+         dotest release-24 "$testcvs -q edit"
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf 1 $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       recase)
+         #
+         # Some tests of behavior which broke at one time or another when run
+         # from case insensitive clients against case sensitive servers.
+         #
+         # These tests are namned according to the following convention:
+         #
+         #   ci        Client (sandbox filesystem) case Insensitive
+         #   cs        Client (sandbox filesystem) case Sensitive
+         #   si        Server (repository filesystem) case Insensitive
+         #   ss        Server (repository filesystem) case Sensitive
+         #
+
+         mkdir 1; cd 1
+
+         # First, we will expect different results for a few of these tests
+         # based on whether the repository is on a case sensitive filesystem
+         # or not and whether the sandbox is on a case sensitive filesystem or
+         # not, so determine which cases we are dealing with:
+         echo file >file
+         echo FiLe >FiLe
+         if cmp file FiLe >/dev/null; then
+           client_sensitive=false
+         else
+           client_sensitive=:
+         fi
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost 'echo file >file'
+           $CVS_RSH $remotehost 'echo FiLe >FiLe'
+           if $CVS_RSH $remotehost 'cmp file FiLe >/dev/null'; then
+             server_sensitive=false
+           else
+             server_sensitive=:
+           fi
+         else
+           server_sensitive=$client_sensitive
+         fi
+
+         # The first test (recase-1 & recase-2) is for a remove of a file then
+         # a readd in a different case.
+         modify_repo mkdir $CVSROOT_DIRNAME/first-dir
+         dotest recase-init-1 "$testcvs -Q co first-dir"       
+         cd first-dir
+
+         echo this file has no content >file
+         dotest recase-init-2 "$testcvs -Q add file"
+         dotest recase-init-3 "$testcvs -Q ci -madd"
+         dotest recase-init-4 "$testcvs -Q tag first"
+
+         # Now remove the file.
+         dotest recase-init-5 "$testcvs -Q rm -f file"
+         dotest recase-init-6 "$testcvs -Q ci -mrm"
+
+         # Now the test - readd in a different case.
+         echo this file needs some content >FiLe
+         if $server_sensitive; then
+           dotest recase-1ss "$testcvs add FiLe" \
+"$SPROG add: scheduling file \`FiLe' for addition
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+           dotest recase-2ss "$testcvs -q ci -mrecase" \
+"$CVSROOT_DIRNAME/first-dir/FiLe,v  <--  FiLe
+initial revision: 1\.1"
+         else # server insensitive
+           dotest recase-1si "$testcvs add FiLe" \
+"$SPROG add: Re-adding file \`FiLe' after dead revision 1\.2\.
+$SPROG add: use \`$SPROG commit' to add this file permanently"
+           dotest recase-2si "$testcvs -q ci -mrecase" \
+"$CVSROOT_DIRNAME/first-dir/FiLe,v  <--  FiLe
+new revision: 1\.3; previous revision: 1\.2"
+         fi
+
+         # Now verify that a checkout will still work
+         cd ../..
+         mkdir 2; cd 2
+         dotest recase-3 "$testcvs -q co first-dir" \
+"U first-dir/FiLe"
+
+         cd first-dir
+         # Prove that we can still get status and log information on
+         # conflicting case files (1 in Attic, one in parent).
+         if $remote; then
+           if $client_sensitive; then
+             file=file
+             fIlE=fIlE
+           else # client insensitive
+             # Because FiLe is present on a case insensitive client, it is the
+             # only one ever found and queried or altered.
+             file=FiLe
+             fIlE=FiLe
+           fi
+         else # ! $remote
+           file=file
+           fIlE=fIlE
+         fi
+         if $server_sensitive; then
+           if $client_sensitive; then
+             # Client finds Entry only for FiLe.  Others returned by server.
+             dotest recase-4sscs "$testcvs status file" \
+"===================================================================
+File: no file file             Status: Up-to-date
+
+   Working revision:   No entry for file
+   Repository revision:        1\.2    $CVSROOT_DIRNAME/first-dir/Attic/file,v
+   Commit Identifier:  ${commitid}"
+             dotest recase-5sscs "$testcvs log file" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v
+Working file: file
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       first: 1\.1
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: $username;  state: dead;  lines: +0 -0;  
commitid: ${commitid};
+rm
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+add
+============================================================================="
+             dotest recase-6sscs "$testcvs status FiLe" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-7sscs "$testcvs log FiLe" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+           else # server sensitive && client insensitive
+             # Client finds same Entry for file & FiLe.
+             dotest recase-4ssci "$testcvs status file" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-5ssci "$testcvs log file" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+             dotest recase-6ss "$testcvs status FiLe" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-7ss "$testcvs log FiLe" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+           fi
+         else # server insensitive
+           # There is only one archive when the server is insensitive, but the
+           # printed file/archive name can vary.
+           dotest recase-4si "$testcvs status file" \
+"===================================================================
+File: $file                    Status: Up-to-date
+
+   Working revision:   1\.3.*
+   Repository revision:        1\.3    $CVSROOT_DIRNAME/first-dir/$file,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+           dotest recase-5si "$testcvs log file" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/$file,v
+Working file: $file
+head: 1\.3
+branch:
+locks: strict
+access list:
+symbolic names:
+       first: 1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: $username;  state: Exp;  lines: +1 -1;  
commitid: ${commitid};
+recase
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: $username;  state: dead;  lines: +0 -0;  
commitid: ${commitid};
+rm
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+add
+============================================================================="
+           dotest recase-6si "$testcvs status FiLe" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.3.*
+   Repository revision:        1\.3    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+           dotest recase-7si "$testcvs log FiLe" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.3
+branch:
+locks: strict
+access list:
+symbolic names:
+       first: 1\.1
+keyword substitution: kv
+total revisions: 3;    selected revisions: 3
+description:
+----------------------------
+revision 1\.3
+date: ${ISO8601DATE};  author: $username;  state: Exp;  lines: +1 -1;  
commitid: ${commitid};
+recase
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: $username;  state: dead;  lines: +0 -0;  
commitid: ${commitid};
+rm
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+add
+============================================================================="
+         fi
+
+         # And when the file does not exist on the client, we go with the
+         # client Entries match.
+         if $client_sensitive && $server_sensitive; then
+           dotest recase-8sscs "$testcvs status fIlE" \
+"$SPROG status: nothing known about \`fIlE'
+===================================================================
+File: no file fIlE             Status: Unknown
+
+   Working revision:   No entry for fIlE
+   Repository revision:        No revision control file"
+         else # !$client_sensitive || !$server_sensitive
+           dotest recase-8anyi "$testcvs status fIlE" \
+"===================================================================
+File: $fIlE                    Status: Up-to-date
+
+   Working revision:   1\.[0-9]*.*
+   Repository revision:        1\.[0-9]*       
$CVSROOT_DIRNAME/first-dir/$fIlE,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         fi
+
+         # and an update
+         if $server_sensitive; then
+           dotest recase-9ss "$testcvs -q up -rfirst" \
+"$SPROG update: \`FiLe' is no longer in the repository
+U file"
+
+           if $client_sensitive; then
+             dotest recase-10sscs "$testcvs -q up -A" \
+"U FiLe
+$SPROG update: \`file' is no longer in the repository"
+           else # client insensitive
+             # FIXCVS: This should remove the offending file first.
+             dotest_fail recase-10ssci "$testcvs -q up -A" \
+"$SPROG update: move away \`\./FiLe'; it is in the way
+C FiLe
+$SPROG update: \`file' is no longer in the repository"
+
+             cd ..
+             rm -r first-dir
+             dotest recase-11ssci "$testcvs -q co first-dir" \
+"U first-dir/FiLe"
+             cd first-dir
+           fi
+
+           #
+           # See what happens when cased names clash.
+           #
+
+           # Copy the archive
+           if test -n "$remotehost"; then
+             modify_repo $CVS_RSH $remotehost \
+                         "cp $CVSROOT_DIRNAME/first-dir/FiLe,v \
+                         $CVSROOT_DIRNAME/first-dir/FILE,v"
+           else
+             modify_repo cp $CVSROOT_DIRNAME/first-dir/FiLe,v \
+                            $CVSROOT_DIRNAME/first-dir/FILE,v
+           fi
+
+           if $client_sensitive; then
+             dotest recase-12sscs "$testcvs -q up" "U FILE"
+           else # client insensitive
+             dotest_fail recase-12ssci "$testcvs -q up" \
+"$SPROG update: move away \`\./FILE'; it is in the way
+C FILE"
+           fi
+         else # server insensitive
+           dotest recase-9si "$testcvs -q up -rfirst" "U FiLe"
+           dotest recase-10si "$testcvs -q up -A" "U FiLe"
+         fi
+
+         # Prove that we can still get status and log information on
+         # conflicting case files (1 in Attic, two in parent).
+         if $server_sensitive; then
+           if $client_sensitive; then
+             # Client finds Entry only for FiLe.  Others returned by server.
+             dotest recase-13sscs "$testcvs status file" \
+"===================================================================
+File: no file file             Status: Up-to-date
+
+   Working revision:   No entry for file
+   Repository revision:        1\.2    $CVSROOT_DIRNAME/first-dir/Attic/file,v
+   Commit Identifier:  ${commitid}"
+           dotest recase-14sscs "$testcvs log file" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file,v
+Working file: file
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       first: 1\.1
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: $username;  state: dead;  lines: +0 -0;  
commitid: ${commitid};
+rm
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+add
+============================================================================="
+           dotest recase-15sscs "$testcvs status FiLe" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-16sscs "$testcvs log FiLe" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+             dotest recase-17sscs "$testcvs status FILE" \
+"===================================================================
+File: FILE                     Status: Up-to-date
+
+   Working revision:   1.1.*
+   Repository revision:        1.1     ${CVSROOT_DIRNAME}/first-dir/FILE,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-18sscs "$testcvs log FILE" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FILE,v
+Working file: FILE
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+           else # $server_sensitive && !$client_sensitive
+             # Client finds same Entry for file & FiLe.
+             dotest recase-13ssci "$testcvs status file" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-16ssci "$testcvs log FiLe" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+             dotest recase-17ssci "$testcvs status FILE" \
+"===================================================================
+File: FiLe                     Status: Up-to-date
+
+   Working revision:   1\.1.*
+   Repository revision:        1\.1    $CVSROOT_DIRNAME/first-dir/FiLe,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+             dotest recase-18ssci "$testcvs log FILE" \
+"
+RCS file: $CVSROOT_DIRNAME/first-dir/FiLe,v
+Working file: FiLe
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: $username;  state: Exp;  commitid: ${commitid};
+recase
+============================================================================="
+           fi
+         else # !$server_sensitive
+           # Skip these when the server is case insensitive - nothing
+           # has changed since recase-[4-7]si
+           :
+         fi
+
+         if $client_sensitive && $server_sensitive; then
+           dotest recase-19sscs "$testcvs status fIlE" \
+"$SPROG status: nothing known about \`fIlE'
+===================================================================
+File: no file fIlE             Status: Unknown
+
+   Working revision:   No entry for fIlE
+   Repository revision:        No revision control file"
+         else # !$client_sensitive || !$server_sensitive
+           dotest recase-19anyi "$testcvs status fIlE" \
+"===================================================================
+File: $fIlE                    Status: Up-to-date
+
+   Working revision:   1\.[0-9]*.*
+   Repository revision:        1\.[0-9]*       
$CVSROOT_DIRNAME/first-dir/$fIlE,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)"
+         fi
+
+         # And last but not least, prove that a checkout is still possible.
+         cd ../..
+         mkdir 3; cd 3
+         if $server_sensitive; then
+           if $client_sensitive; then
+             dotest recase-20sscs "$testcvs -q co first-dir" \
+"U first-dir/FILE
+U first-dir/FiLe"
+           else # $server_senstive && !$client_sensitive
+             dotest_fail recase-20ssci "$testcvs -q co first-dir" \
+"U first-dir/FILE
+$SPROG checkout: move away \`first-dir/FiLe'; it is in the way
+C first-dir/FiLe"
+           fi
+         else # !$server_sensitive
+           # Skip these since nothing has changed.
+           :
+         fi
+
+         dokeep
+         cd ..
+         rm -rf 1 2 3
+         if $server_sensitive && test -n "$remotehost"; then
+           # It is necessary to remove one of the case-conflicted files before
+           # recursively removing the rest under Cygwin on a Samba share or
+           # Samba returns a permission denied error due to its case
+           # confusion.
+           $CVS_RSH $remotehost "rm -f $CVSROOT_DIRNAME/first-dir/FILE,v"
+         fi
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       multiroot)
+         #
+         # set up two repositories
+         #
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         CVSROOT1_DIRNAME=${TESTDIR}/root.1
+         CVSROOT2_DIRNAME=${TESTDIR}/root.2
+         CVSROOT1=`newroot $CVSROOT1_DIRNAME`
+         CVSROOT2=`newroot $CVSROOT2_DIRNAME`
+         testcvs1="$testcvs -d '$CVSROOT1'"
+         testcvs2="$testcvs -d '$CVSROOT2'"
+
+         dotest multiroot-setup-1 "mkdir $CVSROOT1_DIRNAME $CVSROOT2_DIRNAME"
+         dotest multiroot-setup-2 "$testcvs1 init"
+         dotest multiroot-setup-3 "$testcvs2 init"
+
+         #
+         # create some directories in ${CVSROOT1_DIRNAME}
+         #
+         mkdir 1; cd 1
+         dotest multiroot-setup-4 "${testcvs1} co -l ." "${SPROG} checkout: 
Updating ."
+         mkdir mod1-1 mod1-2
+         dotest multiroot-setup-5 "${testcvs1} add mod1-1 mod1-2" \
+"Directory ${CVSROOT1_DIRNAME}/mod1-1 added to the repository
+Directory ${CVSROOT1_DIRNAME}/mod1-2 added to the repository"
+         echo file1-1 > mod1-1/file1-1
+         echo file1-2 > mod1-2/file1-2
+         dotest multiroot-setup-6 "${testcvs1} add mod1-1/file1-1 
mod1-2/file1-2" \
+"${SPROG} add: scheduling file .mod1-1/file1-1. for addition
+${SPROG} add: scheduling file .mod1-2/file1-2. for addition
+${SPROG} add: use \`${SPROG} commit' to add these files permanently"
+         dotest multiroot-setup-7 "${testcvs1} commit -m is" \
+"${CPROG} commit: Examining \.
+${CPROG} commit: Examining mod1-1
+${CPROG} commit: Examining mod1-2
+${CVSROOT1_DIRNAME}/mod1-1/file1-1,v  <--  mod1-1/file1-1
+initial revision: 1.1
+${CVSROOT1_DIRNAME}/mod1-2/file1-2,v  <--  mod1-2/file1-2
+initial revision: 1.1"
+         cd ..
+         rm -rf 1
+
+         #
+         # create some directories in ${CVSROOT2_DIRNAME}
+         #
+         mkdir 1; cd 1
+         dotest multiroot-setup-8 "${testcvs2} co -l ." "${SPROG} checkout: 
Updating ."
+         mkdir mod2-1 mod2-2
+         dotest multiroot-setup-9 "${testcvs2} add mod2-1 mod2-2" \
+"Directory ${CVSROOT2_DIRNAME}/mod2-1 added to the repository
+Directory ${CVSROOT2_DIRNAME}/mod2-2 added to the repository"
+         echo file2-1 > mod2-1/file2-1
+         echo file2-2 > mod2-2/file2-2
+         dotest multiroot-setup-6 "${testcvs2} add mod2-1/file2-1 
mod2-2/file2-2" \
+"${SPROG} add: scheduling file .mod2-1/file2-1. for addition
+${SPROG} add: scheduling file .mod2-2/file2-2. for addition
+${SPROG} add: use \`${SPROG} commit' to add these files permanently"
+         dotest multiroot-setup-10 "${testcvs2} commit -m anyone" \
+"${CPROG} commit: Examining \.
+${CPROG} commit: Examining mod2-1
+${CPROG} commit: Examining mod2-2
+${CVSROOT2_DIRNAME}/mod2-1/file2-1,v  <--  mod2-1/file2-1
+initial revision: 1.1
+${CVSROOT2_DIRNAME}/mod2-2/file2-2,v  <--  mod2-2/file2-2
+initial revision: 1.1"
+         cd ..
+         rm -rf 1
+
+         # check out a few directories, from simple/shallow to
+         # complex/deep
+         mkdir 1; cd 1
+
+         # OK, this case is kind of weird.  If we just run things from
+         # here, without CVS/Root, then CVS will contact the server
+         # mentioned in CVSROOT (which is irrelevant) which will print
+         # some messages.  Our workaround is to make sure we have a
+         # CVS/Root file at top level.  In the future, it is possible
+         # the best behavior will be to extend the existing behavior
+         # ("being called from a directory without CVS administration
+         # has always meant to process each of the sub-dirs") to also
+         # do that if there is no CVSROOT, CVS/Root, or -d at top level.
+         # 
+         # The local case could stumble through the tests without creating
+         # the top-level CVS/Root, but we create it for local and for
+         # remote to reduce special cases later in the test.
+         dotest multiroot-workaround "${testcvs1} -q co -l ." ""
+
+         dotest multiroot-setup-11 "${testcvs1} co mod1-1 mod1-2" \
+"${SPROG} checkout: Updating mod1-1
+U mod1-1/file1-1
+${SPROG} checkout: Updating mod1-2
+U mod1-2/file1-2"
+         dotest multiroot-setup-12 "${testcvs2} co mod2-1 mod2-2" \
+"${SPROG} checkout: Updating mod2-1
+U mod2-1/file2-1
+${SPROG} checkout: Updating mod2-2
+U mod2-2/file2-2"
+         cd mod1-2
+         dotest multiroot-setup-13 "${testcvs2} co mod2-2" \
+"${SPROG} checkout: Updating mod2-2
+U mod2-2/file2-2"
+         cd ..
+         cd mod2-2
+         dotest multiroot-setup-14 "${testcvs1} co mod1-2" \
+"${SPROG} checkout: Updating mod1-2
+U mod1-2/file1-2"
+         cd ..
+
+         #
+         # Make sure that the Root and Repository files contain the
+         # correct information.
+         #
+         dotest multiroot-cvsadm-1a "cat mod1-1/CVS/Root" "${CVSROOT1}"
+         dotest multiroot-cvsadm-1b "cat mod1-1/CVS/Repository" "mod1-1"
+         dotest multiroot-cvsadm-2a "cat mod2-1/CVS/Root" "${CVSROOT2}"
+         dotest multiroot-cvsadm-2b "cat mod2-1/CVS/Repository" "mod2-1"
+         dotest multiroot-cvsadm-3a "cat mod1-2/CVS/Root" "${CVSROOT1}"
+         dotest multiroot-cvsadm-3b "cat mod1-2/CVS/Repository" "mod1-2"
+         dotest multiroot-cvsadm-3c "cat mod1-2/mod2-2/CVS/Root" "${CVSROOT2}"
+         dotest multiroot-cvsadm-3d "cat mod1-2/mod2-2/CVS/Repository" "mod2-2"
+         dotest multiroot-cvsadm-4a "cat mod2-2/CVS/Root" "${CVSROOT2}"
+         dotest multiroot-cvsadm-4b "cat mod2-2/CVS/Repository" "mod2-2"
+         dotest multiroot-cvsadm-4c "cat mod2-2/mod1-2/CVS/Root" "${CVSROOT1}"
+         dotest multiroot-cvsadm-4d "cat mod2-2/mod1-2/CVS/Repository" "mod1-2"
+
+         #
+         # Start testing various cvs commands.  Begin with commands
+         # without extra arguments (e.g. "cvs update", "cvs diff",
+         # etc.
+         #
+
+         # Do at least one command with both CVSROOTs to make sure
+         # that there's not some kind of unexpected dependency on the
+         # choice of which CVSROOT is specified on the command line.
+
+         dotest multiroot-update-1a "${testcvs1} update" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating mod1-1
+${SPROG} update: Updating mod1-2
+${SPROG} update: Updating mod1-2/mod2-2
+${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such 
file or directory
+${SPROG} update: skipping directory mod1-2/mod2-2
+${SPROG} update: Updating mod2-1
+${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-1: No such 
file or directory
+${SPROG} update: skipping directory mod2-1
+${SPROG} update: Updating mod2-2
+${SPROG} update: cannot open directory ${CVSROOT1_DIRNAME}/mod2-2: No such 
file or directory
+${SPROG} update: skipping directory mod2-2"
+
+         # Same deal but with -d ${CVSROOT2}.
+         dotest multiroot-update-1b "${testcvs2} update" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating mod1-1
+${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-1: No such 
file or directory
+${SPROG} update: skipping directory mod1-1
+${SPROG} update: Updating mod1-2
+${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such 
file or directory
+${SPROG} update: skipping directory mod1-2
+${SPROG} update: Updating mod2-1
+${SPROG} update: Updating mod2-2
+${SPROG} update: Updating mod2-2/mod1-2
+${SPROG} update: cannot open directory ${CVSROOT2_DIRNAME}/mod1-2: No such 
file or directory
+${SPROG} update: skipping directory mod2-2/mod1-2"
+
+         # modify all files and do a diff
+
+         echo bobby >> mod1-1/file1-1
+         echo brown >> mod1-2/file1-2
+         echo goes >> mod2-1/file2-1
+         echo down >> mod2-2/file2-2
+
+         dotest_fail multiroot-diff-1 "${testcvs} diff" \
+"${SPROG} diff: Diffing \.
+${SPROG} diff: Diffing mod1-1
+Index: mod1-1/file1-1
+===================================================================
+RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
+retrieving revision 1\.1
+diff -r1\.1 file1-1
+1a2
+> bobby
+${SPROG} diff: Diffing mod1-2
+Index: mod1-2/file1-2
+===================================================================
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+retrieving revision 1\.1
+diff -r1\.1 file1-2
+1a2
+> brown
+${SPROG} diff: Diffing mod2-2/mod1-2
+${SPROG} diff: Diffing mod1-2/mod2-2
+${SPROG} diff: Diffing mod2-1
+Index: mod2-1/file2-1
+===================================================================
+RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
+retrieving revision 1\.1
+diff -r1\.1 file2-1
+1a2
+> goes
+${SPROG} diff: Diffing mod2-2
+Index: mod2-2/file2-2
+===================================================================
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+retrieving revision 1\.1
+diff -r1\.1 file2-2
+1a2
+> down" \
+"${SPROG} diff: Diffing \.
+${SPROG} diff: Diffing mod1-1
+Index: mod1-1/file1-1
+===================================================================
+RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
+retrieving revision 1\.1
+diff -r1\.1 file1-1
+1a2
+> bobby
+${SPROG} diff: Diffing mod1-2
+Index: mod1-2/file1-2
+===================================================================
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+retrieving revision 1\.1
+diff -r1\.1 file1-2
+1a2
+> brown
+${SPROG} diff: Diffing mod2-2
+${SPROG} diff: Diffing mod2-2/mod1-2
+${SPROG} diff: Diffing mod1-2
+${SPROG} diff: Diffing mod1-2/mod2-2
+${SPROG} diff: Diffing mod2-1
+Index: mod2-1/file2-1
+===================================================================
+RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
+retrieving revision 1\.1
+diff -r1\.1 file2-1
+1a2
+> goes
+${SPROG} diff: Diffing mod2-2
+Index: mod2-2/file2-2
+===================================================================
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+retrieving revision 1\.1
+diff -r1\.1 file2-2
+1a2
+> down"
+
+         dotest multiroot-commit-1 "${testcvs} commit -m actually" \
+"${CPROG} commit: Examining \.
+${CPROG} commit: Examining mod1-1
+${CPROG} commit: Examining mod1-2
+${CPROG} commit: Examining mod2-2/mod1-2
+${CVSROOT1_DIRNAME}/mod1-1/file1-1,v  <--  mod1-1/file1-1
+new revision: 1.2; previous revision: 1.1
+${CVSROOT1_DIRNAME}/mod1-2/file1-2,v  <--  mod1-2/file1-2
+new revision: 1.2; previous revision: 1.1
+${CPROG} commit: Examining mod1-2/mod2-2
+${CPROG} commit: Examining mod2-1
+${CPROG} commit: Examining mod2-2
+${CVSROOT2_DIRNAME}/mod2-1/file2-1,v  <--  mod2-1/file2-1
+new revision: 1.2; previous revision: 1.1
+${CVSROOT2_DIRNAME}/mod2-2/file2-2,v  <--  mod2-2/file2-2
+new revision: 1.2; previous revision: 1.1"
+
+         dotest multiroot-update-2 "${testcvs} update" \
+"${CPROG} update: Updating \.
+${CPROG} update: Updating mod1-1
+${CPROG} update: Updating mod1-2
+${CPROG} update: Updating mod2-2/mod1-2
+U mod2-2/mod1-2/file1-2
+${CPROG} update: Updating mod1-2/mod2-2
+U mod1-2/mod2-2/file2-2
+${CPROG} update: Updating mod2-1
+${CPROG} update: Updating mod2-2" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating mod1-1
+${SPROG} update: Updating mod1-2
+${SPROG} update: Updating mod2-2
+${SPROG} update: Updating mod2-2/mod1-2
+U mod2-2/mod1-2/file1-2
+${SPROG} update: Updating mod1-2
+${SPROG} update: Updating mod1-2/mod2-2
+U mod1-2/mod2-2/file2-2
+${SPROG} update: Updating mod2-1
+${SPROG} update: Updating mod2-2"
+
+         dotest multiroot-tag-1 "${testcvs} tag cattle" \
+"${SPROG} tag: Tagging \.
+${SPROG} tag: Tagging mod1-1
+T mod1-1/file1-1
+${SPROG} tag: Tagging mod1-2
+T mod1-2/file1-2
+${SPROG} tag: Tagging mod2-2/mod1-2
+${SPROG} tag: Tagging mod1-2/mod2-2
+T mod1-2/mod2-2/file2-2
+${SPROG} tag: Tagging mod2-1
+T mod2-1/file2-1
+${SPROG} tag: Tagging mod2-2" \
+"${SPROG} tag: Tagging \.
+${SPROG} tag: Tagging mod1-1
+T mod1-1/file1-1
+${SPROG} tag: Tagging mod1-2
+T mod1-2/file1-2
+${SPROG} tag: Tagging mod2-2
+${SPROG} tag: Tagging mod2-2/mod1-2
+${SPROG} tag: Tagging mod1-2
+${SPROG} tag: Tagging mod1-2/mod2-2
+T mod1-2/mod2-2/file2-2
+${SPROG} tag: Tagging mod2-1
+T mod2-1/file2-1
+${SPROG} tag: Tagging mod2-2"
+
+         echo anotherfile1-1 > mod1-1/anotherfile1-1
+         echo anotherfile2-1 > mod2-1/anotherfile2-1
+         echo anotherfile1-2 > mod2-2/mod1-2/anotherfile1-2
+         echo anotherfile2-2 > mod1-2/mod2-2/anotherfile2-2
+
+         if $remote; then
+           cd mod1-1
+           dotest multiroot-add-1ar "${testcvs} add anotherfile1-1" \
+"${SPROG} add: scheduling file .anotherfile1-1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+           cd ../mod2-1
+           dotest multiroot-add-1br "${testcvs} add anotherfile2-1" \
+"${SPROG} add: scheduling file .anotherfile2-1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+           cd ../mod2-2/mod1-2
+           dotest multiroot-add-1cr "${testcvs} add anotherfile1-2" \
+"${SPROG} add: scheduling file .anotherfile1-2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+           cd ../../mod1-2/mod2-2
+           dotest multiroot-add-1dr "${testcvs} add anotherfile2-2" \
+"${SPROG} add: scheduling file .anotherfile2-2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+           cd ../..
+          else
+           dotest multiroot-add-1 "${testcvs} add mod1-1/anotherfile1-1 
mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 
mod1-2/mod2-2/anotherfile2-2" \
+"${SPROG} add: scheduling file .mod1-1/anotherfile1-1. for addition
+${SPROG} add: scheduling file .mod2-1/anotherfile2-1. for addition
+${SPROG} add: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition
+${SPROG} add: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+          fi
+
+         dotest multiroot-status-1 "${testcvs} status -v" \
+"${SPROG} status: Examining \.
+${SPROG} status: Examining mod1-1
+===================================================================
+File: anotherfile1-1           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file1-1                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod1-2
+===================================================================
+File: file1-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod2-2/mod1-2
+===================================================================
+File: anotherfile1-2           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file1-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod1-2/mod2-2
+===================================================================
+File: anotherfile2-2           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file2-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod2-1
+===================================================================
+File: anotherfile2-1           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file2-1                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod2-2
+===================================================================
+File: file2-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)" \
+"${SPROG} status: Examining \.
+${SPROG} status: Examining mod1-1
+===================================================================
+File: anotherfile1-1           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file1-1                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod1-2
+===================================================================
+File: file1-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod2-2
+${SPROG} status: Examining mod2-2/mod1-2
+===================================================================
+File: anotherfile1-2           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file1-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod1-2
+${SPROG} status: Examining mod1-2/mod2-2
+===================================================================
+File: anotherfile2-2           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file2-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod2-1
+===================================================================
+File: anotherfile2-1           Status: Locally Added
+
+   Working revision:   New file!
+   Repository revision:        No revision control file
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+===================================================================
+File: file2-1                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)
+
+${SPROG} status: Examining mod2-2
+===================================================================
+File: file2-2                  Status: Up-to-date
+
+   Working revision:   1\.2.*
+   Repository revision:        1\.2    ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+   Commit Identifier:  ${commitid}
+   Sticky Tag:         (none)
+   Sticky Date:                (none)
+   Sticky Options:     (none)
+
+   Existing Tags:
+       cattle                          (revision: 1\.2)"
+
+         dotest multiroot-commit-2 "${testcvs} commit -m reading" \
+"${CPROG} commit: Examining \.
+${CPROG} commit: Examining mod1-1
+${CPROG} commit: Examining mod1-2
+${CPROG} commit: Examining mod2-2/mod1-2
+${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v  <--  mod1-1/anotherfile1-1
+initial revision: 1\.1
+${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v  <--  mod2-2/mod1-2/anotherfile1-2
+initial revision: 1\.1
+${CPROG} commit: Examining mod1-2/mod2-2
+${CPROG} commit: Examining mod2-1
+${CPROG} commit: Examining mod2-2
+${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v  <--  mod1-2/mod2-2/anotherfile2-2
+initial revision: 1\.1
+${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v  <--  mod2-1/anotherfile2-1
+initial revision: 1\.1"
+
+         dotest multiroot-update-3 "${testcvs} update" \
+"${CPROG} update: Updating \.
+${CPROG} update: Updating mod1-1
+${CPROG} update: Updating mod1-2
+U mod1-2/anotherfile1-2
+${CPROG} update: Updating mod2-2/mod1-2
+${CPROG} update: Updating mod1-2/mod2-2
+${CPROG} update: Updating mod2-1
+${CPROG} update: Updating mod2-2
+U mod2-2/anotherfile2-2" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating mod1-1
+${SPROG} update: Updating mod1-2
+U mod1-2/anotherfile1-2
+${SPROG} update: Updating mod2-2
+${SPROG} update: Updating mod2-2/mod1-2
+${SPROG} update: Updating mod1-2
+${SPROG} update: Updating mod1-2/mod2-2
+${SPROG} update: Updating mod2-1
+${SPROG} update: Updating mod2-2
+U mod2-2/anotherfile2-2"
+
+         dotest multiroot-log-1 "${testcvs} log" \
+"${SPROG} log: Logging \.
+${SPROG} log: Logging mod1-1
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v
+Working file: mod1-1/anotherfile1-1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
+Working file: mod1-1/file1-1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+is
+=============================================================================
+${SPROG} log: Logging mod1-2
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
+Working file: mod1-2/anotherfile1-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+Working file: mod1-2/file1-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+is
+=============================================================================
+${SPROG} log: Logging mod2-2/mod1-2
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
+Working file: mod2-2/mod1-2/anotherfile1-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+Working file: mod2-2/mod1-2/file1-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+is
+=============================================================================
+${SPROG} log: Logging mod1-2/mod2-2
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
+Working file: mod1-2/mod2-2/anotherfile2-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+Working file: mod1-2/mod2-2/file2-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+anyone
+=============================================================================
+${SPROG} log: Logging mod2-1
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v
+Working file: mod2-1/anotherfile2-1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
+Working file: mod2-1/file2-1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+anyone
+=============================================================================
+${SPROG} log: Logging mod2-2
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
+Working file: mod2-2/anotherfile2-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+Working file: mod2-2/file2-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+anyone
+=============================================================================" 
\
+"${SPROG} log: Logging \.
+${SPROG} log: Logging mod1-1
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-1/anotherfile1-1,v
+Working file: mod1-1/anotherfile1-1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
+Working file: mod1-1/file1-1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+is
+=============================================================================
+${SPROG} log: Logging mod1-2
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
+Working file: mod1-2/anotherfile1-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+Working file: mod1-2/file1-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+is
+=============================================================================
+${SPROG} log: Logging mod2-2
+${SPROG} log: Logging mod2-2/mod1-2
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/anotherfile1-2,v
+Working file: mod2-2/mod1-2/anotherfile1-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
+Working file: mod2-2/mod1-2/file1-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+is
+=============================================================================
+${SPROG} log: Logging mod1-2
+${SPROG} log: Logging mod1-2/mod2-2
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
+Working file: mod1-2/mod2-2/anotherfile2-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+Working file: mod1-2/mod2-2/file2-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+anyone
+=============================================================================
+${SPROG} log: Logging mod2-1
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-1/anotherfile2-1,v
+Working file: mod2-1/anotherfile2-1
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
+Working file: mod2-1/file2-1
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+anyone
+=============================================================================
+${SPROG} log: Logging mod2-2
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/anotherfile2-2,v
+Working file: mod2-2/anotherfile2-2
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+keyword substitution: kv
+total revisions: 1;    selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+reading
+=============================================================================
+
+RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
+Working file: mod2-2/file2-2
+head: 1\.2
+branch:
+locks: strict
+access list:
+symbolic names:
+       cattle: 1\.2
+keyword substitution: kv
+total revisions: 2;    selected revisions: 2
+description:
+----------------------------
+revision 1\.2
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}1 -0;  
commitid: ${commitid};
+actually
+----------------------------
+revision 1\.1
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+anyone
+============================================================================="
+
+
+         # After the simple cases, let's execute some commands which
+         # refer to parts of our checked-out tree (e.g. "cvs update
+         # mod1-1 mod2-2")
+
+         dokeep
+
+         # clean up after ourselves
+         cd ..
+         rm -rf 1
+
+         # clean up our repositories
+         rm -rf ${CVSROOT1_DIRNAME} ${CVSROOT2_DIRNAME}
+         ;;
+
+
+
+       multiroot2)
+         # More multiroot tests.  In particular, nested directories.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         CVSROOT1_DIRNAME=${TESTDIR}/root1
+         CVSROOT2_DIRNAME=${TESTDIR}/root2
+         CVSROOT1=`newroot $CVSROOT1_DIRNAME`
+         CVSROOT2=`newroot $CVSROOT2_DIRNAME`
+
+         dotest multiroot2-1 "${testcvs} -d ${CVSROOT1} init" ""
+         dotest multiroot2-2 "${testcvs} -d ${CVSROOT2} init" ""
+
+         mkdir imp-dir; cd imp-dir
+         echo file1 >file1
+         mkdir sdir
+         echo sfile >sdir/sfile
+         mkdir sdir/ssdir
+         echo ssfile >sdir/ssdir/ssfile
+         dotest_sort multiroot2-3 \
+"${testcvs} -d ${CVSROOT1} import -m import-to-root1 dir1 vend rel" "
+
+N dir1/file1
+N dir1/sdir/sfile
+N dir1/sdir/ssdir/ssfile
+No conflicts created by this import
+${SPROG} import: Importing ${TESTDIR}/root1/dir1/sdir
+${SPROG} import: Importing ${TESTDIR}/root1/dir1/sdir/ssdir"
+         cd sdir
+         dotest_sort multiroot2-4 \
+"${testcvs} -d ${CVSROOT2} import -m import-to-root2 sdir vend2 rel2" "
+
+N sdir/sfile
+N sdir/ssdir/ssfile
+No conflicts created by this import
+${SPROG} import: Importing ${TESTDIR}/root2/sdir/ssdir"
+         cd ../..
+
+         mkdir 1; cd 1
+         # Get TopLevelAdmin-like behavior.
+         dotest multiroot2-5 "${testcvs} -d ${CVSROOT1} -q co -l ."
+         dotest multiroot2-5 "${testcvs} -d ${CVSROOT1} -q co dir1" \
+"U dir1/file1
+U dir1/sdir/sfile
+U dir1/sdir/ssdir/ssfile"
+         cd dir1
+         dotest multiroot2-6 "${testcvs} -Q release -d sdir" ""
+         dotest multiroot2-7 "${testcvs} -d ${CVSROOT2} -q co sdir" \
+"U sdir/sfile
+U sdir/ssdir/ssfile"
+         cd ..
+         # This has one subtle effect - it deals with Entries.Log
+         # so that the next test doesn't get trace messages for
+         # Entries.Log
+         dotest multiroot2-8 "${testcvs} update" \
+"${CPROG} update: Updating \.
+${CPROG} update: Updating dir1
+${CPROG} update: Updating dir1/sdir
+${CPROG} update: Updating dir1/sdir/ssdir" \
+"${SPROG} update: Updating \.
+${SPROG} update: Updating dir1
+${SPROG} update: Updating dir1
+${SPROG} update: Updating dir1/sdir
+${SPROG} update: Updating dir1/sdir/ssdir"
+         # Two reasons we don't run this on the server: (1) the server
+         # also prints some trace messages, and (2) the server trace
+         # messages are subject to out-of-order bugs (this one is hard
+         # to work around).
+         if $remote; then :; else
+           dotest multiroot2-9a "${testcvs} -t update" \
+" *-> main: Session ID is ${commitid}
+ *-> main loop with CVSROOT=${TESTDIR}/root1
+ *-> parse_config ($TESTDIR/root1)
+ *-> do_update ((null), (null), (null), 1, 0, 0, 0, 0, 0, 3, (null), (null), 
(null), (null), (null), 1, (null))
+ *-> Write_Template (\., ${TESTDIR}/root1)
+${CPROG} update: Updating \.
+ *-> Reader_Lock(${TESTDIR}/root1)
+ *-> Simple_Lock_Cleanup()
+ *-> Write_Template (dir1, ${TESTDIR}/root1/dir1)
+${CPROG} update: Updating dir1
+ *-> Reader_Lock(${TESTDIR}/root1/dir1)
+ *-> update_fileproc (dir1/file1)
+ *-> classify_file (dir1/file1, (null), (null), (null))
+ *-> Version_TS (dir1/file1, (null), (null), (null), 1, 0)
+ *-> Simple_Lock_Cleanup()
+ *-> main loop with CVSROOT=${TESTDIR}/root2
+ *-> parse_config ($TESTDIR/root2)
+ *-> do_update ((null), (null), (null), 1, 0, 0, 0, 0, 0, 3, (null), (null), 
(null), (null), (null), 1, (null))
+ *-> Write_Template (dir1/sdir, ${TESTDIR}/root2/dir1/sdir)
+${CPROG} update: Updating dir1/sdir
+ *-> Reader_Lock(${TESTDIR}/root2/sdir)
+ *-> update_fileproc (dir1/sdir/sfile)
+ *-> classify_file (dir1/sdir/sfile, (null), (null), (null))
+ *-> Version_TS (dir1/sdir/sfile, (null), (null), (null), 1, 0)
+ *-> Simple_Lock_Cleanup()
+ *-> Write_Template (dir1/sdir/ssdir, ${TESTDIR}/root2/sdir/ssdir)
+${CPROG} update: Updating dir1/sdir/ssdir
+ *-> Reader_Lock(${TESTDIR}/root2/sdir/ssdir)
+ *-> update_fileproc (dir1/sdir/ssdir/ssfile)
+ *-> classify_file (dir1/sdir/ssdir/ssfile, (null), (null), (null))
+ *-> Version_TS (dir1/sdir/ssdir/ssfile, (null), (null), (null), 1, 0)
+ *-> Simple_Lock_Cleanup()
+ *-> Lock_Cleanup()
+ *-> Simple_Lock_Cleanup()"
+         fi
+
+         dotest multiroot2-9 "${testcvs} -q tag tag1" \
+"T dir1/file1
+T dir1/sdir/sfile
+T dir1/sdir/ssdir/ssfile"
+         echo "change it" >>dir1/file1
+         echo "change him too" >>dir1/sdir/sfile
+         dotest multiroot2-10 "${testcvs} -q ci -m modify" \
+"$TESTDIR/root1/dir1/file1,v  <--  dir1/file1
+new revision: 1\.2; previous revision: 1\.1
+$TESTDIR/root2/sdir/sfile,v  <--  dir1/sdir/sfile
+new revision: 1\.2; previous revision: 1\.1"
+         dotest multiroot2-11 "${testcvs} -q tag tag2" \
+"T dir1/file1
+T dir1/sdir/sfile
+T dir1/sdir/ssdir/ssfile"
+         dotest_fail multiroot2-12 \
+"${testcvs} -q diff -u -r tag1 -r tag2" \
+"Index: dir1/file1
+===================================================================
+RCS file: ${TESTDIR}/root1/dir1/file1,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.2
+diff -u -r1\.1\.1\.1 -r1\.2
+--- dir1/file1 ${RFCDATE}      1\.1\.1\.1
+${PLUS}${PLUS}${PLUS} dir1/file1       ${RFCDATE}      1\.2
+@@ -1 ${PLUS}1,2 @@
+ file1
+${PLUS}change it
+Index: dir1/sdir/sfile
+===================================================================
+RCS file: ${TESTDIR}/root2/sdir/sfile,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.2
+diff -u -r1\.1\.1\.1 -r1\.2
+--- dir1/sdir/sfile    ${RFCDATE}      1\.1\.1\.1
+${PLUS}${PLUS}${PLUS} dir1/sdir/sfile  ${RFCDATE}      1\.2
+@@ -1 ${PLUS}1,2 @@
+ sfile
+${PLUS}change him too"
+
+         # clean up after ourselves
+         dokeep
+         cd ..
+         rm -rf imp-dir 1
+
+         # clean up our repositories
+         rm -rf root1 root2
+         ;;
+
+
+
+       multiroot3)
+         # More multiroot tests.  Directories are side-by-side, not nested.
+         # Not drastically different from multiroot but it covers somewhat
+         # different stuff.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         CVSROOT1=`newroot ${TESTDIR}/root1`
+         CVSROOT2=`newroot ${TESTDIR}/root2`
+
+         mkdir 1; cd 1
+         dotest multiroot3-1 "${testcvs} -d ${CVSROOT1} init" ""
+         dotest multiroot3-2 "${testcvs} -d ${CVSROOT1} -q co -l ." ""
+         mkdir dir1
+         dotest multiroot3-3 "${testcvs} add dir1" \
+"Directory ${TESTDIR}/root1/dir1 added to the repository"
+         dotest multiroot3-4 "${testcvs} -d ${CVSROOT2} init" ""
+         rm -r CVS
+         dotest multiroot3-5 "${testcvs} -d ${CVSROOT2} -q co -l ." ""
+         mkdir dir2
+
+         # OK, the problem is that CVS/Entries doesn't look quite right,
+         # I suppose because of the "rm -r".  Then again, why *should* it
+         # look right?  CVS/Root can only point to a single location, but
+         # we expect CVS/Entries to hold entries for two repositories?  It
+         # just plain isn't part of the filespec yet.
+         #
+         # Use the quick and dirty fix.
+         echo "D/dir1////" >CVS/Entries
+         echo "D/dir2////" >>CVS/Entries
+
+         dotest multiroot3-7 "${testcvs} add dir2" \
+"Directory ${TESTDIR}/root2/dir2 added to the repository"
+
+         touch dir1/file1 dir2/file2
+         if $remote; then
+           # Trying to add them both in one command doesn't work,
+           # because add.c doesn't do multiroot (it doesn't use recurse.c).
+           # Furthermore, it can't deal with the parent directory
+           # having a different root from the child, hence the cd.
+           cd dir1
+           dotest multiroot3-8 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+           cd ..
+           dotest multiroot3-8a "${testcvs} add dir2/file2" \
+"${SPROG} add: scheduling file .dir2/file2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         else
+           dotest multiroot3-8 "${testcvs} add dir1/file1 dir2/file2" \
+"${SPROG} add: scheduling file .dir1/file1. for addition
+${SPROG} add: scheduling file .dir2/file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         fi
+
+         dotest multiroot3-9 "${testcvs} -q ci -m add-them" \
+"$TESTDIR/root2/dir2/file2,v  <--  dir2/file2
+initial revision: 1\.1
+$TESTDIR/root1/dir1/file1,v  <--  dir1/file1
+initial revision: 1\.1"
+
+         # That this is an error is good - we are asking CVS to do
+         # something which doesn't make sense.
+         dotest_fail multiroot3-10 \
+"${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2" \
+"${SPROG} diff: failed to create lock directory for .${TESTDIR}/root1/dir2' 
(${TESTDIR}/root1/dir2/#cvs.lock): No such file or directory
+${SPROG} diff: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2'
+${SPROG} \[diff aborted\]: read lock failed - giving up"
+
+         # This one is supposed to work.
+         dotest multiroot3-11 "${testcvs} -q diff dir1/file1 dir2/file2" ""
+
+         # make sure we can't access across repositories
+         # FIXCVS: we probably shouldn't even create the local directories
+         # in this case, but we do, so deal with it.
+         mkdir 1a
+         cd 1a
+         dotest_fail multiroot3-12 \
+"$testcvs -d $CVSROOT1 -q co ../root2/dir2" \
+"$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: 
\`\.\./root2/dir2'\." \
+"$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: 
\`\.\./root2/dir2'\.
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+         dotest_fail multiroot3-13 \
+"$testcvs -d $CVSROOT2 -q co ../root1/dir1" \
+"$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: 
\`\.\./root1/dir1'\." \
+"$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: 
\`\.\./root1/dir1'\.
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+         dotest_fail multiroot3-14 \
+"$testcvs -d $CVSROOT1 -q co ./../root2/dir2" \
+"$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: 
\`\./\.\./root2/dir2'\." \
+"$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: 
\`\./\.\./root2/dir2'\.
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+         dotest_fail multiroot3-15 \
+"$testcvs -d $CVSROOT2 -q co ./../root1/dir1" \
+"$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: 
\`\./\.\./root1/dir1'\." \
+"$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: 
\`\./\.\./root1/dir1'\.
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+         dotest_fail multiroot3-16 \
+"$testcvs -d $CVSROOT1 -q co -p ../root2/dir2" \
+"$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: 
\`\.\./root2/dir2'\." \
+"$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: 
\`\.\./root2/dir2'\.
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+         dotest_fail multiroot3-17 \
+"$testcvs -d $CVSROOT1 -q co -p ./../root1/dir1" \
+"$CPROG \[checkout aborted\]: up-level in module reference (\`..') invalid: 
\`\./\.\./root1/dir1'\." \
+"$SPROG \[server aborted\]: up-level in module reference (\`..') invalid: 
\`\./\.\./root1/dir1'\.
+$CPROG \[checkout aborted\]: end of file from server (consult above messages 
if any)"
+
+         cd ../..
+
+         if $keep; then
+           echo Keeping ${TESTDIR} and exiting due to --keep
+           exit 0
+         fi
+
+         rm -r 1
+         rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2
+         unset CVSROOT1
+         unset CVSROOT2
+         ;;
+
+
+
+       multiroot4)
+         # More multiroot tests, in particular we have two roots with
+         # similarly-named directories and we try to see that CVS can
+         # keep them separate.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         CVSROOT1=`newroot ${TESTDIR}/root1`
+         CVSROOT2=`newroot ${TESTDIR}/root2`
+
+         mkdir 1; cd 1
+         dotest multiroot4-1 "${testcvs} -d ${CVSROOT1} init" ""
+         dotest multiroot4-2 "${testcvs} -d ${CVSROOT1} -q co -l ." ""
+         mkdir dircom
+         dotest multiroot4-3 "${testcvs} add dircom" \
+"Directory ${TESTDIR}/root1/dircom added to the repository"
+         cd dircom
+         touch file1
+         dotest multiroot4-4 "${testcvs} add file1" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest multiroot4-5 "${testcvs} -q ci -m add" \
+"$TESTDIR/root1/dircom/file1,v  <--  file1
+initial revision: 1\.1"
+         cd ../..
+         mkdir 2; cd 2
+         dotest multiroot4-6 "${testcvs} -d ${CVSROOT2} init" ""
+         dotest multiroot4-7 "${testcvs} -d ${CVSROOT2} -q co -l ." ""
+         mkdir dircom
+         dotest multiroot4-8 "${testcvs} add dircom" \
+"Directory ${TESTDIR}/root2/dircom added to the repository"
+         cd dircom
+         touch file2
+         dotest multiroot4-9 "${testcvs} add file2" \
+"${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add this file permanently"
+         dotest multiroot4-10 "${testcvs} -q ci -m add" \
+"$TESTDIR/root2/dircom/file2,v  <--  file2
+initial revision: 1\.1"
+
+         cd ../..
+         cd 1/dircom
+         # This may look contrived; the real world example which inspired
+         # it was that a user was changing from local to remote.  Cases
+         # like switching servers (among those mounting the same
+         # repository) and so on would also look the same.
+         mkdir sdir2
+         dotest multiroot4-11 "${testcvs} -d ${CVSROOT2} add sdir2" \
+"Directory ${TESTDIR}/root2/dircom/sdir2 added to the repository"
+
+         dotest multiroot4-12 "${testcvs} -q update" ""
+         cd ..
+         dotest multiroot4-13 "${testcvs} -q update dircom" ""
+         cd ..
+
+         rm -r 1 2
+         rm -rf ${TESTDIR}/root1 ${TESTDIR}/root2
+         unset CVSROOT1
+         unset CVSROOT2
+         ;;
+
+
+
+       rmroot)
+         # When the Entries/Root file is removed from an existing
+         # workspace, CVS should assume $CVSROOT instead
+         #
+         # Right now only checking that CVS exits normally on an
+         # update once CVS/Root is deleted
+         #
+         # There was a time when this would core dump when run in
+         # client/server mode
+
+         mkdir 1; cd 1
+         dotest rmroot-setup-1 "${testcvs} -q co -l ." ''
+         mkdir first-dir
+         dotest rmroot-setup-2 "${testcvs} add first-dir" \
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
+          cd first-dir
+         touch file1 file2
+         dotest rmroot-setup-3 "${testcvs} add file1 file2" \
+"${SPROG} add: scheduling file .file1. for addition
+${SPROG} add: scheduling file .file2. for addition
+${SPROG} add: use .${SPROG} commit. to add these files permanently"
+         dotest rmroot-setup-4 "${testcvs} -q commit -minit" \
+"$CVSROOT_DIRNAME/first-dir/file1,v  <--  file1
+initial revision: 1\.1
+$CVSROOT_DIRNAME/first-dir/file2,v  <--  file2
+initial revision: 1\.1"
+         rm CVS/Root
+         dotest rmroot-1 "${testcvs} -q update" ''
+
+         dokeep
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/first-dir
+         ;;
+
+
+
+       reposmv)
+         # More tests of repositories and specifying them.
+         # Similar to crerepos but that test is probably getting big
+         # enough.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         CVSROOT1=`newroot ${TESTDIR}/root1`
+         CVSROOT_MOVED=`newroot ${TESTDIR}/root-moved`
+
+         dotest reposmv-setup-1 "${testcvs} -d ${CVSROOT1} init" ""
+         mkdir imp-dir; cd imp-dir
+         echo file1 >file1
+         dotest reposmv-setup-2 \
+"${testcvs} -d ${CVSROOT1} import -m add dir1 vendor release" \
+"N dir1/file1
+
+No conflicts created by this import"
+         cd ..
+
+         mkdir 1; cd 1
+         dotest reposmv-1 "${testcvs} -d ${CVSROOT1} -Q co dir1" ""
+         mv ${TESTDIR}/root1 ${TESTDIR}/root-moved
+         cd dir1
+
+         # If we didn't have a relative repository, get one now.
+         dotest reposmv-1a "cat CVS/Repository" \
+"${TESTDIR}/root1/dir1" "dir1"
+         echo dir1 >CVS/Repository
+
+         # There were some duplicated warnings and such; only test
+         # for the part of the error message which makes sense.
+         #
+         # FIXCVS then FIXME
+         # Now the duplicated error messages only occur on some platforms,
+         # including, apparently, NetBSD 1.6.1, RedHat Linux 7.3, whatever
+         # kernel that is using, and Solaris 9.  These platforms somehow
+         # decide to call Name_Root() up to four times, via do_recursion, but
+         # I'm not sure of the rest of the details.  Other platforms,
+         # including Fedora Core 1 (Linux 2.4.22-1.2199.nptl), RH Linux 9
+         # (Linux 2.4.20-37.9.legacy), and probably AIX 3.4, Solaris 8, 
+         # BSD/OS 4.2, & IRIX 6.5 only call Name_Root() once as a result of
+         # this test.
+         #
+         # Bug: "skipping directory " without filename.
+         if $remote; then
+           dotest_fail reposmv-2r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+         else
+           dotest reposmv-2 "$testcvs update" \
+"$DOTSTAR$CPROG update: in directory \.:
+$CPROG update: ignoring CVS/Root because it specifies a non-existent 
repository $TESTDIR/root1
+$CPROG update: Updating \.
+$DOTSTAR$CPROG update: cannot open directory $CVSROOT_DIRNAME/dir1: No such 
file or directory
+$CPROG update: skipping directory "
+         fi
+
+         # CVS/Root overrides $CVSROOT
+         if $remote; then
+           CVSROOT_save=${CVSROOT}
+           CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT
+           dotest_fail reposmv-3r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+           CVSROOT=${CVSROOT_save}; export CVSROOT
+         else
+           CVSROOT_save=$CVSROOT
+           CVSROOT=$TESTDIR/root-moved; export CVSROOT
+           dotest reposmv-3 "$testcvs update" \
+"$DOTSTAR$CPROG update: in directory \.:
+$CPROG update: ignoring CVS/Root because it specifies a non-existent 
repository $TESTDIR/root1
+$CPROG update: Updating \.$DOTSTAR"
+           CVSROOT=$CVSROOT_save; export CVSROOT
+         fi
+
+         if $remote; then
+           CVSROOT_save=${CVSROOT}
+           CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT
+           dotest_fail reposmv-4r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+           CVSROOT=${CVSROOT_save}; export CVSROOT
+         else
+           # CVS/Root doesn't seem to quite completely override $CVSROOT
+           # Bug?  Not necessarily a big deal if it only affects error
+           # messages.
+           CVSROOT_save=${CVSROOT}
+           CVSROOT=${TESTDIR}/root-none; export CVSROOT
+           dotest_fail reposmv-4 "${testcvs} update" \
+"${CPROG} update: in directory \.:
+${CPROG} update: ignoring CVS/Root because it specifies a non-existent 
repository ${TESTDIR}/root1
+${CPROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or 
directory"
+           CVSROOT=${CVSROOT_save}; export CVSROOT
+         fi
+
+         # -d overrides CVS/Root
+         # 
+         # Oddly enough, with CVS 1.10 I think this didn't work for
+         # local (that is, it would appear that CVS/Root would not
+         # get used, but would produce an error if it didn't exist).
+         dotest reposmv-5 "${testcvs} -d ${CVSROOT_MOVED} update" \
+"${SPROG} update: Updating \."
+
+         # TODO: could also test various other things, like what if the
+         # user removes CVS/Root (which is legit).  Or another set of
+         # tests would be if both repositories exist but we want to make
+         # sure that CVS is using the correct one.
+
+         cd ../..
+         rm -rf imp-dir 1
+         rm -rf root1 root2
+         unset CVSROOT1
+         ;;
+
+
+
+       pserver)
+         # Test basic pserver functionality.
+         if $remote; then
+           if test -n "$remotehost"; then
+             # Don't even try.  (The issue is getting servercvs & testcvs
+             # set correctly for the following tests.  Some expect one access
+             # method and some another, which in $remotehost mode, means that
+             # sometimes the executables must run on one platform and
+             # sometimes another.)
+             continue
+           fi
+           save_servercvs=$servercvs
+           servercvs=$testcvs
+           # First set SystemAuth=no.  Not really necessary, I don't
+           # think, but somehow it seems like the clean thing for
+           # the testsuite.
+           mkdir 1; cd 1
+           dotest pserver-1 "$testcvs -Q co CVSROOT" ""
+           cd CVSROOT
+           echo "SystemAuth=no" >>config
+           dotest pserver-2 "$testcvs -q ci -m config-it" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+           cat >$CVSROOT_DIRNAME/CVSROOT/passwd <<EOF
+testme:q6WV9d2t848B2:$username
+dontroot:q6WV9d2t848B2:root
+anonymous::$username
+$username:
+willfail:   :whocares
+EOF
+           dotest_fail pserver-3 "$servercvs pserver" \
+"error 0 Server configuration missing --allow-root in inetd.conf" <<EOF
+BEGIN AUTH REQUEST
+$CVSROOT_DIRNAME
+testme
+Ay::'d
+END AUTH REQUEST
+EOF
+
+           # Confirm that not sending a newline during auth cannot constitute
+           # a denial-of-service attack.  This assumes that PATH_MAX is less
+           # than 65536 bytes.  If PATH_MAX is larger than 65535 bytes, this
+           # test could hang indefinitely.
+           ${AWK} 'BEGIN { printf "0123456789abcdef" }' </dev/null >garbageseg
+           echo "BEGIN AUTH REQUEST" >garbageinput
+           i=0
+           while test $i -lt 64; do
+             cat <garbageseg >>garbageseg2
+             i=`expr $i + 1`
+           done
+           i=0
+           while test $i -lt 64; do
+             cat <garbageseg2 >>garbageinput
+             i=`expr $i + 1`
+           done
+           dotest_fail pserver-auth-no-dos \
+"${servercvs} --allow-root=${CVSROOT_DIRNAME} pserver" \
+"$CPROG \\[pserver aborted\\]: error reading from net while validating 
pserver: Not enough space" \
+"$CPROG \\[pserver aborted\\]: error reading from net while validating 
pserver: Cannot allocate memory" <garbageinput
+           unset i
+           rm garbageseg garbageseg2 garbageinput
+
+           # Sending the Root and noop before waiting for the
+           # "I LOVE YOU" is bogus, but hopefully we can get
+           # away with it.
+           dotest pserver-4 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" 
\
+"$DOTSTAR LOVE YOU
+ok" <<EOF
+BEGIN AUTH REQUEST
+$CVSROOT_DIRNAME
+testme
+Ay::'d
+END AUTH REQUEST
+Root $CVSROOT_DIRNAME
+noop
+EOF
+
+           # The "no such system user" error is occurring on at least one of
+           # our BSD 2.0.2 nightly test platforms.
+           dotest_fail pserver-4.2 \
+"$servercvs --allow-root=$CVSROOT_DIRNAME pserver" \
+"error 0: root not allowed" \
+"E Fatal error, aborting\.
+error 0 root: no such system user" <<EOF
+BEGIN AUTH REQUEST
+$CVSROOT_DIRNAME
+dontroot
+Ay::'d
+END AUTH REQUEST
+EOF
+
+           dotest pserver-5 "$servercvs --allow-root=$CVSROOT_DIRNAME pserver" 
\
+"$DOTSTAR LOVE YOU
+E Protocol error: Root says \"$TESTDIR/1\" but pserver says 
\"$CVSROOT_DIRNAME\"
+error  " <<EOF
+BEGIN AUTH REQUEST
+$CVSROOT_DIRNAME
+testme
+Ay::'d
+END AUTH REQUEST
+Root $TESTDIR/1
+noop
+EOF
+
+           dotest pserver-5a "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+E Protocol error: init says \"${TESTDIR}/2\" but pserver says 
\"${CVSROOT_DIRNAME}\"
+error  " <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+init ${TESTDIR}/2
+EOF
+           dotest_fail pserver-5b "test -d ${TESTDIR}/2" ''
+
+           dotest pserver-5c "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+E init xxx must be an absolute pathname
+error  " <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+init xxx
+EOF
+           dotest_fail pserver-5d "test -d xxx" ''
+
+           dotest_fail pserver-6 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"I HATE YOU" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d^b?hd
+END AUTH REQUEST
+EOF
+
+           dotest_fail pserver-7 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"I HATE YOU" <<EOF
+BEGIN VERIFICATION REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d^b?hd
+END VERIFICATION REQUEST
+EOF
+
+           dotest pserver-8 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU" <<EOF
+BEGIN VERIFICATION REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END VERIFICATION REQUEST
+EOF
+
+# Tests pserver-9 through pserver-13 are about empty passwords
+
+            # Test empty password (both sides) for aliased user
+           dotest pserver-9 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+anonymous
+A
+END AUTH REQUEST
+EOF
+
+            # Test empty password (server side only) for aliased user
+           dotest pserver-10 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+anonymous
+Aanythingwouldworkhereittrulydoesnotmatter
+END AUTH REQUEST
+EOF
+
+            # Test empty (both sides) password for non-aliased user
+           dotest pserver-11 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+A
+END AUTH REQUEST
+EOF
+
+            # Test empty (server side only) password for non-aliased user
+           dotest pserver-12 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Anypasswordwouldworkwhynotthisonethen
+END AUTH REQUEST
+EOF
+
+            # Test failure of whitespace password
+           dotest_fail pserver-13 "${servercvs} 
--allow-root=${CVSROOT_DIRNAME} pserver" \
+"${DOTSTAR} HATE YOU" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+willfail
+Amquiteunabletocomeupwithinterestingpasswordsanymore
+END AUTH REQUEST
+EOF
+
+           # The following tests are for read-only access
+
+           # Check that readers can only read, everyone else can write
+
+           echo anonymous >$CVSROOT_DIRNAME/CVSROOT/readers
+
+           dotest pserver-14 "$servercvs --allow-root=$CVSROOT_DIRNAME 
pserver" \
+"$DOTSTAR LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+$CVSROOT_DIRNAME
+anonymous
+Ay::'d
+END AUTH REQUEST
+Root $CVSROOT_DIRNAME
+version
+EOF
+
+           dotest pserver-15 "$servercvs --allow-root=$CVSROOT_DIRNAME 
pserver" \
+"$DOTSTAR LOVE YOU
+E $CPROG \\[server aborted\\]: .init. requires write access to the repository
+error  " <<EOF
+BEGIN AUTH REQUEST
+$CVSROOT_DIRNAME
+anonymous
+Ay::'d
+END AUTH REQUEST
+init $CVSROOT_DIRNAME
+EOF
+
+           dotest pserver-16 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-17 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           dotest pserver-18 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-19 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Anything
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           # Check that writers can write, everyone else can only read
+           # even if not listed in readers
+
+           cat >${CVSROOT_DIRNAME}/CVSROOT/writers <<EOF
+testme
+EOF
+
+           dotest pserver-20 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+anonymous
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-21 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+E $CPROG \\[server aborted\\]: .init. requires write access to the repository
+error  " <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+anonymous
+Ay::'d
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           dotest pserver-22 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-23 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           dotest pserver-24 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-25 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+E $CPROG \\[server aborted\\]: .init. requires write access to the repository
+error  " <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Anything
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           # Should work the same without readers
+
+           rm ${CVSROOT_DIRNAME}/CVSROOT/readers
+
+           dotest pserver-26 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+anonymous
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-27 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+E $CPROG \\[server aborted\\]: .init. requires write access to the repository
+error  " <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+anonymous
+Ay::'d
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           dotest pserver-28 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-29 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+testme
+Ay::'d
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           dotest pserver-30 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+M Concurrent Versions System (CVS) .*
+ok" <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Ay::'d
+END AUTH REQUEST
+Root ${CVSROOT_DIRNAME}
+version
+EOF
+
+           dotest pserver-31 "${servercvs} --allow-root=${CVSROOT_DIRNAME} 
pserver" \
+"${DOTSTAR} LOVE YOU
+E $CPROG \\[server aborted\\]: .init. requires write access to the repository
+error  " <<EOF
+BEGIN AUTH REQUEST
+${CVSROOT_DIRNAME}
+${username}
+Anything
+END AUTH REQUEST
+init ${CVSROOT_DIRNAME}
+EOF
+
+           # pserver used to try and print from the NULL pointer 
+           # in this error message in this case
+           dotest_fail pserver-bufinit "${servercvs} pserver" \
+"$CPROG \[pserver aborted\]: unexpected EOF encountered during authentication" 
</dev/null
+
+           # Clean up.
+           dotest pserver-cleanup-1 "${testcvs} -q up -pr1.1 config >config" ""
+           dotest pserver-cleanup-2 "${testcvs} -q ci -m config-it" \
+"$CVSROOT_DIRNAME/CVSROOT/config,v  <--  config
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+$SPROG commit: Rebuilding administrative file database"
+
+           dokeep
+           cd ../..
+           rm -rf 1
+           restore_adm
+           servercvs=$save_servercvs
+         fi # skip the whole thing for local
+         ;;
+
+
+
+       server)
+         # Some tests of the server (independent of the client).
+         if $remote; then
+           save_servercvs=$servercvs
+           servercvs=$testcvs
+           dotest server-1 "${servercvs} server" \
+"E Protocol error: Root request missing
+error  " <<EOF
+Directory bogus
+mumble/bar
+update
+EOF
+
+           # Could also test for relative pathnames here (so that crerepos-6a
+           # and crerepos-6b can use :fork:).
+           dotest server-2 "${servercvs} server" "ok" <<EOF
+Set OTHER=variable
+Set MYENV=env-value
+init ${TESTDIR}/crerepos
+EOF
+           dotest server-3 "test -d ${TESTDIR}/crerepos/CVSROOT" ""
+
+           # Now some tests of gzip-file-contents (used by jCVS).
+           ${AWK} 'BEGIN { \
+printf "%c%c%c%c%c%c.6%c%c+I-.%c%c%c%c5%c;%c%c%c%c", \
+31, 139, 8, 64, 5, 7, 64, 3, 225, 2, 64, 198, 185, 5, 64, 64, 64}' \
+             </dev/null | ${TR} '\100' '\000' >gzipped.dat
+           # Note that the CVS client sends "-b 1.1.1", and this
+           # test doesn't.  But the server also defaults to that.
+           cat <<EOF >session.dat
+Root ${TESTDIR}/crerepos
+UseUnchanged
+gzip-file-contents 3
+Argument -m
+Argument msg
+Argumentx 
+Argument dir1
+Argument tag1
+Argument tag2
+Directory .
+${TESTDIR}/crerepos
+Modified file1
+u=rw,g=r,o=r
+z25
+EOF
+           cat gzipped.dat >>session.dat
+           echo import >>session.dat
+           dotest server-4 "${servercvs} server" \
+"M N dir1/file1
+M 
+M No conflicts created by this import
+M 
+ok" <session.dat
+           dotest server-5 \
+"${testcvs} -q -d ${TESTDIR}/crerepos co -p dir1/file1" "test"
+
+           # OK, here are some notify tests.
+           dotest server-6 "${servercvs} server" \
+"Notified \./
+${TESTDIR}/crerepos/dir1/file1
+ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Notify file1
+E      Fri May  7 13:21:09 1999 -0000  myhost  some-work-dir   EUC
+noop
+EOF
+           # Sending the second "noop" before waiting for the output
+           # from the first is bogus but hopefully we can get away
+           # with it.
+           dotest server-7 "${servercvs} server" \
+"M file1       $username       Fri May  7 13:21:09 1999 -0000  myhost  
some-work-dir
+Notified \./
+${TESTDIR}/crerepos/dir1/file1
+ok
+M file1        $username       Fri May  7 13:21:09 1999 -0000  myhost  
some-work-dir
+Notified \./
+${TESTDIR}/crerepos/dir1/file1
+ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Notify file1
+E      Fri May  7 13:21:09 1999 -0000  myhost  some-work-dir   EUC
+noop
+Notify file1
+E      The 57th day of Discord in the YOLD 3165        myhost  some-work-dir   
EUC
+noop
+EOF
+
+           # OK, now test a few error conditions.
+           # FIXCVS: should give "error" and no "Notified", like server-9
+           dotest server-8 "${servercvs} server" \
+"M file1       $username       The 57th day of Discord in the YOLD 3165        
myhost  some-work-dir
+E $CPROG server: invalid character in editor value
+Notified \./
+${TESTDIR}/crerepos/dir1/file1
+ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Notify file1
+E      Setting Orange, the 52th day of Discord in the YOLD 3165        myhost  
some-work-dir   EUC
+noop
+EOF
+
+           dotest server-9 "${servercvs} server" \
+"E Protocol error; misformed Notify request
+error  " <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Notify file1
+E      Setting Orange+57th day of Discord      myhost  some-work-dir   EUC
+noop
+EOF
+
+           # First demonstrate an interesting quirk in the protocol.
+           # The "watchers" request selects the files to operate based
+           # on files which exist in the working directory.  So if we
+           # don't send "Entry" or the like, it won't do anything.
+           # Wants to be documented in cvsclient.texi...
+           dotest server-10 "${servercvs} server" "ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+watchers
+EOF
+           # See if "watchers" and "editors" display the right thing.
+           dotest server-11 "${servercvs} server" \
+"M file1       ${username}     tedit   tunedit tcommit
+ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Entry /file1/1.1////
+watchers
+EOF
+           dotest server-12 "${servercvs} server" \
+"M file1       ${username}     The 57th day of Discord in the YOLD 3165        
myhost  some-work-dir
+ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Entry /file1/1.1////
+editors
+EOF
+
+           # Now do an unedit.
+           dotest server-13 "${servercvs} server" \
+"Notified \./
+${TESTDIR}/crerepos/dir1/file1
+ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+Notify file1
+U      7 May 1999 15:00 -0000  myhost  some-work-dir   EUC
+noop
+EOF
+
+           # Now try "watchers" and "editors" again.
+           dotest server-14 "${servercvs} server" "ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+watchers
+EOF
+           dotest server-15 "${servercvs} server" "ok" <<EOF
+Root ${TESTDIR}/crerepos
+Directory .
+${TESTDIR}/crerepos/dir1
+editors
+EOF
+
+           # Test that the global `-l' option is ignored nonfatally.
+           dotest server-16 "${testcvs} server" \
+"E $CPROG server: WARNING: global \`-l' option ignored\.
+ok" <<EOF
+Global_option -l
+noop
+EOF
+
+           # There used to be some exploits based on malformed Entry requests
+           dotest server-17 "$testcvs server" \
+"E protocol error: Malformed Entry
+error  " <<EOF
+Root $TESTDIR/crerepos
+Directory .
+$TESTDIR/crerepos/dir1
+Entry X/file1/1.1////
+noop
+EOF
+
+           dotest server-18 "$testcvs server" \
+"E protocol error: Malformed Entry
+error  " <<EOF
+Root $TESTDIR/crerepos
+Directory .
+$TESTDIR/crerepos/dir1
+Entry /CC/CC/CC
+noop
+EOF
+
+           # Check that the config file may be set from the command line.
+           # But first verify the default config produces no error messages.
+           dotest server-19 "$testcvs server" \
+"ok" <<EOF
+Root $TESTDIR/crerepos
+Directory .
+$TESTDIR/crerepos
+noop
+EOF
+           echo THIS-CONFIG-OPTION-IS-BAD=XXX >$TESTDIR/newconfig
+           dotest_fail server-20 "$testcvs server -c $TESTDIR/newconfig" \
+"E $SPROG \[server aborted\]: Invalid path to config file specified: 
\`$TESTDIR/newconfig'" <<EOF
+Root $TESTDIR/crerepos
+Directory .
+$TESTDIR/crerepos
+noop
+EOF
+           dotest_fail server-21 \
+"$testcvs server -c /etc/cvs/this-shouldnt-exist" \
+"E $SPROG \[server aborted\]: Failed to resolve path: 
\`/etc/cvs/this-shouldnt-exist': No such file or directory" <<EOF
+Root $TESTDIR/crerepos
+Directory .
+$TESTDIR/crerepos
+noop
+EOF
+
+           # Now make sure that the config file can't be set via the user's
+           # .cvsrc.
+           echo server -c $TESTDIR/newconfig >$HOME/.cvsrc
+           dotest server-22 "$testcvs server" \
+"ok" <<EOF
+Root $TESTDIR/crerepos
+Directory .
+$TESTDIR/crerepos
+noop
+EOF
+
+           dokeep
+           rm -rf $TESTDIR/crerepos
+           rm gzipped.dat session.dat
+           rm $TESTDIR/newconfig $HOME/.cvsrc
+           servercvs=$save_servercvs
+         fi # skip the whole thing for local
+         ;;
+
+
+
+       server2)
+         # More server tests, in particular testing that various
+         # possible security holes are plugged.
+         if $remote; then
+           if test -n "$remotehost"; then
+             # Don't even try.  (The issue is getting servercvs & testcvs
+             # set correctly for the following tests.  Some expect one access
+             # method and some another, which in $remotehost mode, means that
+             # sometimes the executables must run on one platform and
+             # sometimes another.)
+             continue
+           fi
+           save_servercvs=$servercvs
+           servercvs=$testcvs
+           dotest server2-1 "${servercvs} server" \
+"E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root 
'${CVSROOT_DIRNAME}'
+error  " <<EOF
+Root ${CVSROOT_DIRNAME}
+Directory .
+${CVSROOT_DIRNAME}/../dir1
+noop
+EOF
+
+           dotest server2-2 "${servercvs} server" \
+"E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root 
'${CVSROOT_DIRNAME}'
+error  " <<EOF
+Root ${CVSROOT_DIRNAME}
+Directory .
+${CVSROOT_DIRNAME}dir1
+noop
+EOF
+
+           dotest server2-3 "${servercvs} server" \
+"E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
+error  " <<EOF
+Root ${CVSROOT_DIRNAME}
+Directory .
+${TESTDIR}
+noop
+EOF
+
+           # OK, now a few tests for the rule that one cannot pass a
+           # filename containing a slash to Modified, Is-modified,
+           # Notify, Questionable, or Unchanged.  For completeness
+           # we'd try them all.  For lazyness/conciseness we don't.
+           dotest server2-4 "${servercvs} server" \
+"E protocol error: directory 'foo/bar' not within current directory
+error  " <<EOF
+Root ${CVSROOT_DIRNAME}
+Directory .
+${CVSROOT_DIRNAME}
+Unchanged foo/bar
+noop
+EOF
+
+           dotest server2-5 \
+"${servercvs} --allow-root=${CVSROOT_DIRNAME}.bad server" \
+"E Bad root ${CVSROOT_DIRNAME}
+error  " <<EOF
+Root ${CVSROOT_DIRNAME}
+noop
+EOF
+           dotest server2-6 \
+"${servercvs} --allow-root=${CVSROOT_DIRNAME} server" \
+"ok" <<EOF
+Root ${CVSROOT_DIRNAME}
+noop
+EOF
+           servercvs=$save_servercvs
+         fi
+         ;;
+
+
+
+       client)
+         # Some tests of the client (independent of the server).
+         if $remote; then :; else
+           remoteonly client
+           continue
+         fi
+
+         if $proxy; then
+           # Skip these tests in proxy mode since they assume we are not
+           # writing through a proxy server.  There is no writeproxy-client
+           # test currently.  The writeproxy & writeproxy-noredirect tests
+           # test the writeproxy server.
+           notproxy client
+           continue
+         fi
+
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+# This is admittedly a bit cheezy, in the sense that we make lots
+# of assumptions about what the client is going to send us.
+# We don't mention Repository, because current clients don't require it.
+# Sending these at our own pace, rather than waiting for the client to
+# make the requests, is bogus, but hopefully we can get away with it.
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "M special message"
+echo "Created first-dir/"
+echo "$CVSROOT_DIRNAME/first-dir/file1"
+echo "/file1/1.1///"
+echo "u=rw,g=rw,o=rw"
+echo "4"
+echo "xyz"
+echo "ok"
+cat >/dev/null
+EOF
+         # Cygwin.  Pthffffffffft!
+         if test -n "$remotehost"; then
+           $CVS_RSH $remotehost "chmod +x $TESTDIR/serveme"
+         else
+           chmod +x $TESTDIR/serveme
+         fi
+         save_CVS_SERVER=$CVS_SERVER
+         CVS_SERVER=$TESTDIR/serveme; export CVS_SERVER
+         mkdir 1; cd 1
+         dotest_fail client-1 "$testcvs -q co first-dir" \
+"$CPROG \[checkout aborted\]: This server does not support the global -q 
option$DOTSTAR"
+         dotest client-2 "$testcvs co first-dir" "special message"
+
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "M merge-it"
+echo "Copy-file ./"
+echo "$CVSROOT_DIRNAME/first-dir/file1"
+echo "$TESTDIR/bogus/.#file1.1.1"
+echo "Merged ./"
+echo "$CVSROOT_DIRNAME/first-dir/file1"
+echo "/file1/1.2///"
+echo "u=rw,g=rw,o=rw"
+echo "4"
+echo "abd"
+echo "ok"
+cat >/dev/null
+EOF
+         cd first-dir
+         mkdir $TESTDIR/bogus
+         # The ${DOTSTAR} is to match a potential "broken pipe" if the
+         # client exits before the server script sends everything
+         dotest_fail client-3 "$testcvs update" \
+"merge-it
+$CPROG \[update aborted\]: protocol error: Copy-file tried to specify 
director$DOTSTAR"
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "M merge-it"
+echo "Copy-file ./"
+echo "$CVSROOT_DIRNAME/first-dir/file1"
+echo ".#file1.1.1"
+echo "Merged ./"
+echo "$CVSROOT_DIRNAME/first-dir/file1"
+echo "/file1/1.2///"
+echo "u=rw,g=rw,o=rw"
+echo "4"
+echo "abc"
+echo "ok"
+cat >/dev/null
+EOF
+         dotest client-4 "$testcvs update" "merge-it"
+         dotest client-5 "cat .#file1.1.1" "xyz"
+         dotest client-6 "cat CVS/Entries" "/file1/1.2/[A-Za-z0-9 :]*//
+D"
+         dotest client-7 "cat file1" "abc"
+
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "M OK, whatever"
+echo "ok"
+cat >$TESTDIR/client.tmp
+EOF
+         chmod u=rw,go= file1
+         # By specifying the time zone in local time, we don't
+         # know exactly how that will translate to GMT.
+         dotest client-8 "$testcvs update -D 99-10-04" "OK, whatever"
+         # String 2 below is Cygwin again - ptoooey.
+         dotest client-9 "cat $TESTDIR/client.tmp" \
+"Root $CVSROOT_DIRNAME
+Valid-responses [-a-zA-Z ]*
+valid-requests
+Argument -D
+Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
+Argument --
+Directory \.
+$CVSROOT_DIRNAME/first-dir
+Entry /file1/1\.2///
+Modified file1
+u=rw,g=,o=
+4
+abc
+update" \
+"Root $CVSROOT_DIRNAME
+Valid-responses [-a-zA-Z ]*
+valid-requests
+Argument -D
+Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
+Argument --
+Directory \.
+$CVSROOT_DIRNAME/first-dir
+Entry /file1/1\.2///
+Modified file1
+u=rw,g=r,o=r
+4
+abc
+update"
+
+         # The following test tests what was a potential client exploit in
+         # CVS versions 1.11.14 and CVS versions 1.12.6 and earlier.  This
+         # exploit would allow a trojan server to create arbitrary files,
+         # anywhere the user had write permissions, even outside of the
+         # user's sandbox.
+         cat >$HOME/.bashrc <<EOF
+#!$TESTSHELL
+# This is where login scripts would usually be
+# stored.
+EOF
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Rcs-diff $HOME/"
+echo "$HOME/.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "20"
+echo "a1 1"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         
+         # If I don't run the following sleep between the above cat and
+         # the following calls to dotest, sometimes the serveme file isn't
+         # completely written yet by the time CVS tries to execute it,
+         # causing the shell to intermittantly report syntax errors (usually
+         # early EOF).  There's probably a new race condition here, but this
+         # works.
+         #
+         # Incidentally, I can reproduce this behavior with Linux 2.4.20 and
+         # Bash 2.05 or Bash 2.05b.
+         sleep 1
+         dotest_fail client-10 "$testcvs update" \
+"$CPROG update: Server attempted to update a file via an invalid pathname:
+$CPROG \[update aborted\]: \`$HOME/.bashrc'\."
+
+         # A second try at a client exploit.  This one never actually
+         # failed in the past, but I thought it wouldn't hurt to add a test.
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Rcs-diff ./"
+echo "$HOME/.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "20"
+echo "a1 1"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-11 "$testcvs update" \
+"$CPROG \[update aborted\]: patch original file \.bashrc does not exist"
+
+         # A third try at a client exploit.  This one did used to fail like
+         # client-10.
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Rcs-diff ../../home/"
+echo "../../.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "20"
+echo "a1 1"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-12 "$testcvs update" \
+"$CPROG update: Server attempted to update a file via an invalid pathname:
+$CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\."
+
+         # Try the same exploit using the Created response.
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Created $HOME/"
+echo "$HOME/.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "26"
+echo "#! $TESTSHELL"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-13 "$testcvs update" \
+"$CPROG update: Server attempted to update a file via an invalid pathname:
+$CPROG \[update aborted\]: \`$HOME/.bashrc'\."
+
+         # Now try using the Update-existing response
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Update-existing ../../home/"
+echo "../../home/.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "26"
+echo "#! $TESTSHELL"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-14 "$testcvs update" \
+"$CPROG update: Server attempted to update a file via an invalid pathname:
+$CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\."
+
+         # Try the same exploit using the Merged response.
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Merged $HOME/"
+echo "$HOME/.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "26"
+echo "#! $TESTSHELL"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-15 "$testcvs update" \
+"$CPROG update: Server attempted to update a file via an invalid pathname:
+$CPROG \[update aborted\]: \`$HOME/.bashrc'\."
+
+         # Now try using the Updated response
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Updated ../../home/"
+echo "../../home/.bashrc"
+echo "/.bashrc/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "26"
+echo "#! $TESTSHELL"
+echo "echo 'gotcha!'"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-16 "$testcvs update" \
+"$CPROG update: Server attempted to update a file via an invalid pathname:
+$CPROG \[update aborted\]: \`\.\./\.\./home/.bashrc'\."
+
+         # Try the same exploit using the Copy-file response.
+         # As far as I know, Copy-file was never exploitable either.
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Directory Entry 
Modified Unchanged Argument Argumentx ci co update"
+echo "ok"
+echo "Created ."
+echo "./innocuous"
+echo "/innocuous/73.50///"
+echo "u=rw,g=rw,o=rw"
+echo "26"
+echo "#! $TESTSHELL"
+echo "echo 'gotcha!'"
+echo "Copy-file ."
+echo "./innocuous"
+echo "$HOME/innocuous"
+echo "ok"
+cat >/dev/null
+EOF
+         sleep 1
+         dotest_fail client-18 "$testcvs update" \
+"$CPROG \[update aborted\]: protocol error: Copy-file tried to specify 
directory"
+
+         # And verify that none of the exploits was successful.
+         dotest client-19 "cat $HOME/.bashrc" \
+"#!$TESTSHELL
+# This is where login scripts would usually be
+# stored\."
+
+         # Check that the client detects redirect loops.
+         cat >$TESTDIR/serveme <<EOF
+#!$TESTSHELL
+echo "Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Is-modified UseUnchanged Unchanged Notify 
Hostname LocalDir Questionable Argument Argumentx Global_option Gzip-stream 
wrapper-sendme-rcsOptions Set Gssapi-authenticate expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents status rdiff tag rtag import admin export history release 
watch-on watch-off watch-add watch-remove watchers editors edit init annotate 
rannotate noop version"
+echo "ok"
+echo "Redirect $CVSROOT"
+
+# Eat up data from the client to avoid broken pipe errors.
+cat >/dev/null
+EOF
+         echo newstuff >file1
+         sleep 1
+         dotest_fail client-20 "$testcvs ci" \
+"$CPROG commit: Examining \.
+$CPROG \[commit aborted\]: \`Redirect' loop detected\.  Server 
misconfiguration$QUESTION"
+
+         dokeep
+         cd ../..
+         rm -r 1
+         rmdir $TESTDIR/bogus
+         rm $TESTDIR/serveme $HOME/.bashrc
+         CVS_SERVER=$save_CVS_SERVER; export CVS_SERVER
+         ;;
+
+
+
+       dottedroot)
+         # Check that a CVSROOT with a "." in the name will work.
+
+         if $proxy; then
+           # don't even try
+           continue
+         fi
+
+         CVSROOT_save=${CVSROOT}
+         CVSROOT_DIRNAME_save=${CVSROOT_DIRNAME}
+         CVSROOT_DIRNAME=${TESTDIR}/cvs.root
+         CVSROOT=`newroot ${CVSROOT_DIRNAME}`
+
+         dotest dottedroot-init-1 "${testcvs} init" ""
+         mkdir dir1
+         mkdir dir1/dir2
+         echo version1 >dir1/dir2/file1
+         cd dir1
+         dotest dottedroot-1 "${testcvs} import -m '' module1 AUTHOR INITIAL" \
+"${SPROG} import: Importing ${CVSROOT_DIRNAME}/module1/dir2
+N module1/dir2/file1
+
+No conflicts created by this import"
+         cd ..
+
+         # This is the test that used to cause an assertion failure
+         # in recurse.c:do_recursion().
+         dotest dottedroot-2 "${testcvs} co -rINITIAL module1" \
+"${SPROG} checkout: Updating module1
+${SPROG} checkout: Updating module1/dir2
+U module1/dir2/file1"
+
+         dokeep
+
+         rm -rf ${CVSROOT_DIRNAME}
+         rm -rf dir1 module1
+         CVSROOT_DIRNAME=${CVSROOT_DIRNAME_save}
+         CVSROOT=${CVSROOT_save}
+         ;;
+
+
+
+       fork)
+         # Test that the server defaults to the correct executable in :fork:
+         # mode.  See the note in the TODO at the end of this file about this.
+         #
+         # This test and client should be left after all other references to
+         # CVS_SERVER are removed from this script.
+         #
+         # The client series of tests already tests that CVS_SERVER is
+         # working, but that test might be better here.
+         if $remote; then
+           if test -n "$remotehost"; then
+             # Don't even try.  If our caller specified a remotehost, our
+             # access method has been determined anyhow.
+             continue
+           fi
+           mkdir fork; cd fork
+           save_CVS_SERVER=$CVS_SERVER
+           unset CVS_SERVER
+           # So looking through $PATH for cvs won't work...
+           echo "echo junk" >cvs
+           chmod a+x cvs
+           save_PATH=$PATH; PATH=.:$PATH
+           # The second error message below is for testing clients without
+           # server support.
+           if ${testcvs_server_support}; then
+               dotest fork-1 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \
+'Client: \(.*\)
+Server: \1'
+           else
+               dotest_fail fork-1-noss \
+"$testcvs -d:fork:$CVSROOT_DIRNAME version" \
+"Client: .*
+Server: ${CPROG} version: You must set the CVS_SERVER environment variable when
+${CPROG} version: using the :fork: access method\.
+${CPROG} \[version aborted\]: This CVS was not compiled with server support\."
+           fi
+
+           CVS_SERVER=${save_CVS_SERVER}; export CVS_SERVER
+           unset save_CVS_SERVER
+           PATH=$save_PATH; unset save_PATH
+
+           dokeep
+           cd ..
+           rm -r fork
+         fi
+         ;;
+
+
+
+       commit-add-missing)
+         # Make sure that a commit fails when a `cvs add'ed file has
+         # been removed from the working directory.
+
+         mkdir 1; cd 1
+         module=c-a-m
+         echo > unused-file
+         dotest commit-add-missing-1 \
+           "$testcvs -Q import -m. $module X Y" ''
+
+         file=F
+         # Check it out and tag it.
+         dotest commit-add-missing-2 "$testcvs -Q co $module" ''
+         cd $module
+         dotest commit-add-missing-3 "$testcvs -Q tag -b B" ''
+         echo v1 > $file
+         dotest commit-add-missing-4 "$testcvs -Q add $file" ''
+         rm -f $file
+         dotest_fail commit-add-missing-5 "$testcvs -Q ci -m. $file" \
+"${SPROG} commit: Up-to-date check failed for .$file'
+${SPROG} \[commit aborted\]: correct above errors first!"
+
+         dotest
+         cd ../..
+         rm -rf 1
+         modify_repo rm -rf $CVSROOT_DIRNAME/$module
+         ;;
+
+
+
+       commit-d)
+         # Check that top-level commits work when CVS/Root
+         # is overridden by cvs -d.
+
+         mkdir -p 1/subdir; cd 1
+         touch file1 subdir/file2
+         dotest commit-d-1 "$testcvs -Q import -m. c-d-c X Y" ""
+         dotest commit-d-2 "$testcvs -Q co c-d-c" ""
+         cd c-d-c
+         echo change >>file1; echo another change >>subdir/file2
+         # Changing working root, then override with -d
+         echo nosuchhost:/cvs > CVS/Root
+         dotest commit-d-3 "$testcvs -q -d '$CVSROOT' commit -m." \
+"$CVSROOT_DIRNAME/c-d-c/file1,v  <--  file1
+new revision: 1.2; previous revision: 1.1
+$CVSROOT_DIRNAME/c-d-c/subdir/file2,v  <--  subdir/file2
+new revision: 1.2; previous revision: 1.1"
+
+         dokeep
+         cd ../..
+         rm -rf 1 cvsroot/c-d-c
+         ;;
+
+
+
+       template)
+         # Check that the CVS/Template directory is being
+         # properly created.
+         modify_repo mkdir -p $CVSROOT_DIRNAME/first/subdir
+         modify_repo mkdir $CVSROOT_DIRNAME/second
+         mkdir template; cd template
+
+         # check that no CVS/Template is created for an empty rcsinfo
+         # Note: For cvs clients with no Clear-template response, the
+         # CVS/Template file will exist and be zero bytes in length.
+         dotest template-empty-1 "${testcvs} -Q co first" ''
+         dotest template-empty-2 \
+"test ! -s first/CVS/Template" ''
+         dotest template-empty-3 \
+"test ! -s first/subdir/CVS/Template" ''
+         rm -fr first
+
+         # create some template files
+         echo 'CVS: the default template' > ${TESTDIR}/template/temp.def
+         echo 'CVS: the first template' > ${TESTDIR}/template/temp.first
+         echo 'CVS: the subdir template' > ${TESTDIR}/template/temp.subdir
+         
+         dotest template-rcsinfo-1 "${testcvs} -Q co CVSROOT" ''
+         cd CVSROOT
+         echo DEFAULT ${TESTDIR}/template/temp.def >>rcsinfo
+         dotest template-rcsinfo-2 "$testcvs -Q ci -m."
+         # Make sure we get the update without a commit.
+         dotest template-rcsinfo-3 "${testcvs} -Q ci -m." ''
+         # Did the CVSROOT/CVS/Template file get the updated version?
+         if $remote; then
+           dotest template-rcsinfo-4r \
+"$diff_u CVS/Template $TESTDIR/template/temp.def"
+         else
+           dotest template-rcsinfo-4 \
+"test ! -f CVS/Template" ''
+         fi
+         echo "^first/subdir ${TESTDIR}/template/temp.subdir" >>rcsinfo
+         echo "^first ${TESTDIR}/template/temp.first" >>rcsinfo
+         dotest template-rcsinfo-4.1 "${testcvs} -Q ci -m. rcsinfo"
+         # Did the CVSROOT/CVS/Template file get the updated version?
+         if $remote; then
+           dotest template-rcsinfo-5r \
+"$diff_u CVS/Template $TESTDIR/template/temp.def"
+         else
+           dotest template-rcsinfo-5 \
+"test ! -f CVS/Template" ''
+         fi
+         cd ..
+
+         # Now checkout the first and second modules and see
+         # if the proper template has been provided for each
+         dotest template-first "${testcvs} co first second" \
+"${SPROG} checkout: Updating first
+${SPROG} checkout: Updating first/subdir
+${SPROG} checkout: Updating second"
+
+         if $remote; then
+           # When in client/server CVS/Template must exist
+           dotest template-first-r-1 "test -f first/CVS/Template" ''
+           dotest template-first-r-2 "test -f first/subdir/CVS/Template" ''
+           dotest template-first-r-3 "test -f second/CVS/Template" ''
+           # The value of the CVS/Template should be equal to the
+           # file called out in the rcsinfo file.
+           dotest template-first-r-4 \
+"$diff_u first/CVS/Template $TESTDIR/template/temp.first"
+           dotest template-first-r-5 \
+"$diff_u first/subdir/CVS/Template $TESTDIR/template/temp.subdir"
+           dotest template-first-r-6 \
+"$diff_u second/CVS/Template $TESTDIR/template/temp.def"
+          else
+           # When in local mode CVS/Template must NOT exist
+           dotest_fail template-first-1 "test -f first/CVS/Template" ''
+           dotest_fail template-first-2 "test -f first/subdir/CVS/Template" ''
+           dotest_fail template-first-3 "test -f second/CVS/Template" ''
+         fi
+
+         # Next, create a new subdirectory and see if it gets the
+         # correct template or not
+         cd second
+         mkdir otherdir
+         dotest template-add-1 "${testcvs} add otherdir" \
+"Directory ${CVSROOT_DIRNAME}/second/otherdir added to the repository"
+         if $remote; then
+           dotest template-add-2r \
+"$diff_u otherdir/CVS/Template $TESTDIR/template/temp.def"
+         else
+           dotest_fail template-add-2 "test -f otherdir/CVS/Template" ''
+         fi
+         cd ..
+
+         # Update the remote template. Then see if doing an
+         # update of a checked out tree will properly update
+         # the CVS/Template files.
+         echo 'CVS: Line two' >> ${TESTDIR}/template/temp.def
+         echo 'CVS: Line two' >> ${TESTDIR}/template/temp.first
+         echo 'CVS: Line two' >> ${TESTDIR}/template/temp.subdir
+         dotest template-second "${testcvs} update first second" \
+"${SPROG} update: Updating first
+${SPROG} update: Updating first/subdir
+${SPROG} update: Updating second
+${SPROG} update: Updating second/otherdir"
+
+         if $remote; then
+           dotest template-second-r-1 \
+"$diff_u first/CVS/Template $TESTDIR/template/temp.first"
+           dotest template-second-r-2 \
+"$diff_u first/subdir/CVS/Template $TESTDIR/template/temp.subdir"
+           dotest template-second-r-3 \
+"$diff_u second/CVS/Template $TESTDIR/template/temp.def"
+           dotest template-second-r-4 \
+"$diff_u second/otherdir/CVS/Template $TESTDIR/template/temp.def"
+          else
+           # When in local mode CVS/Template must NOT exist
+           dotest_fail template-second-1 "test -f CVS/Template" ''
+           dotest_fail template-second-2 "test -f subdir/CVS/Template" ''
+           dotest_fail template-second-3 "test -f second/CVS/Template" ''
+           dotest_fail template-second-4 \
+"test -f second/otherdir/CVS/Template" ''
+         fi
+         # Update the remote template with a zero-length template
+         : > ${TESTDIR}/template/temp.def
+         dotest template-third-1 "${testcvs} update second" \
+"${SPROG} update: Updating second
+${SPROG} update: Updating second/otherdir"
+
+         if $remote; then
+           dotest_fail template-third-r-2 "test -s second/CVS/Template" ''
+           dotest_fail template-third-r-3 "test -s 
second/otherdir/CVS/Template" ''
+          else
+           dotest_fail template-third-2 "test -f second/CVS/Template" ''
+           dotest_fail template-third-3 \
+"test -f second/otherdir/CVS/Template" ''
+          fi
+
+         # fun with remote protocols and tags
+         if $remote; then
+           cd second
+           echo hello > file1
+           dotest template-tag-r-1 "${testcvs} -Q add file1" ''
+           dotest template-tag-r-2 "${testcvs} -Q commit -madd file1"
+            dotest template-tag-r-3 "${testcvs} -q tag tag" 'T file1'
+           rm ${CVSROOT_DIRNAME}/CVSROOT/val-tags
+           cd ..
+           rm -fr second
+           dotest template-tag-r-4 "${testcvs} -Q co -rtag second" ''
+         fi
+
+         cd CVSROOT
+         dotest template-norcsinfo-1 "${testcvs} up" \
+"${SPROG} update: Updating \."
+         # Did the CVSROOT/CVS/Template file get the updated version?
+         if $remote; then
+           dotest template-norcsinfo-r-2 \
+"$diff_u CVS/Template $TESTDIR/template/temp.def"
+          else
+           dotest_fail template-norcsinfo-2 "test -f CVS/Template" ''
+         fi
+
+         : > rcsinfo
+         dotest template-norcsinfo-3 "${testcvs} -Q ci -m. rcsinfo"
+         # Did the CVSROOT/CVS/Template file get the updated version?
+         # The file should be gone or of zero length.
+         dotest template-norcsinfo-4 \
+"test ! -s CVS/Template" ''
+         cd ..
+
+         dotest template-norcsinfo-5 "${testcvs} update first" \
+"${SPROG} update: Updating first
+${SPROG} update: Updating first/subdir"
+
+         # Note: For cvs clients with no Clear-template response, the
+         # CVS/Template file will exist and be zero bytes in length.
+         dotest template-norcsinfo-6 \
+"test ! -s first/CVS/Template" ''
+         dotest template-norcsinfo-7 \
+"test ! -s first/subdir/CVS/Template" ''
+
+         dokeep
+
+         # cleanup
+          modify_repo rm -rf $CVSROOT_DIRNAME/first $CVSROOT_DIRNAME/second
+         restore_adm
+         cd ..
+         rm -rf template
+         ;;
+
+
+
+       writeproxy)
+         # Various tests for a read-only CVS mirror set up as a write-proxy
+         # for a central server.
+         #
+         # These tests are only meaningful in client/server mode.
+         if $remote; then :; else
+           remoteonly writeproxy
+           continue
+         fi
+
+         if $noredirect; then
+           notnoredirect writeproxy
+           continue
+         fi
+
+         require_rsync
+         if test $? -eq 77; then
+           skip writeproxy "$skipreason"
+           continue
+         fi
+
+         PRIMARY_CVSROOT_DIRNAME_save=$PRIMARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_save=$PRIMARY_CVSROOT
+         PRIMARY_CVSROOT_DIRNAME=$TESTDIR/primary_cvsroot
+         PRIMARY_CVSROOT=`newroot $PRIMARY_CVSROOT_DIRNAME`
+         SECONDARY_CVSROOT_DIRNAME_save=$SECONDARY_CVSROOT_DIRNAME
+         SECONDARY_CVSROOT_save=$SECONDARY_CVSROOT
+         SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
+         SECONDARY_CVSROOT=`newroot $SECONDARY_CVSROOT_DIRNAME`
+
+         # Initialize the primary repository
+         dotest writeproxy-init-1 "$testcvs -d$PRIMARY_CVSROOT init"
+         mkdir writeproxy; cd writeproxy
+         mkdir primary; cd primary
+         dotest writeproxy-init-2 "$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
+         cd CVSROOT
+         cat >>loginfo <<EOF
+ALL (cat >/dev/null; echo %R) >$TESTDIR/referrer
+ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+EOF
+         cat >>config <<EOF
+PrimaryServer=$PRIMARY_CVSROOT
+EOF
+         dotest writeproxy-init-3 \
+"$testcvs -Q ci -mconfigure-writeproxy"
+
+         # Quickly verify that the server can resolve symlinks when
+         # determining whether it is the primary.
+         # This shouldn't actually change the repository.
+         save_CVS_SERVER=$CVS_SERVER
+         ln -s $PRIMARY_CVSROOT_DIRNAME $TESTDIR/primary_link
+         dotest writeproxy-0 "$CVS_SERVER server" \
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents status rdiff tag rtag import admin export history release 
watch-on watch-off watch-add watch-remove watchers editors edit init annotate 
rannotate noop version
+ok
+ok
+ok" \
+<< EOF
+Root $TESTDIR/primary_link
+Valid-responses ok error Valid-requests Redirect Checked-in New-entry Checksum 
Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time 
Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky 
Clear-sticky Edit-file Template Clear-template Notified Module-expansion 
Wrapper-rcsOption M Mbinary E F MT
+valid-requests
+UseUnchanged
+Command-prep commit
+Global_option -q
+Global_option -Q
+Argument -m
+Argument configure-writeproxy
+Argument --
+Directory .
+CVSROOT
+Entry /checkoutlist/1.1///
+Modified checkoutlist
+u=rw,g=rw,o=r
+495
+# The "checkoutlist" file is used to support additional version controlled
+# administrative files in \$CVSROOT/CVSROOT, such as template files.
+#
+# The first entry on a line is a filename which will be checked out from
+# the corresponding RCS file in the \$CVSROOT/CVSROOT directory.
+# The remainder of the line is an error message to use if the file cannot
+# be checked out.
+#
+# File format:
+#
+#      [<whitespace>]<filename>[<whitespace><error message>]<end-of-line>
+#
+# comment lines begin with '#'
+ci
+EOF
+         rm $TESTDIR/primary_link
+
+         # And now the secondary.
+         $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+
+         # Checkout from secondary
+         #
+         # For now, move the primary root out of the way to satisfy
+         # ourselves that the data is coming from the secondary.
+         mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
+         cd ../..
+         mkdir secondary; cd secondary
+         dotest writeproxy-1 "$testcvs -qd$SECONDARY_CVSROOT co CVSROOT" \
+"U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg"
+
+         # Confirm data present
+         cd CVSROOT
+         dotest writeproxy-2 "grep rsync loginfo" \
+"ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ 
$SECONDARY_CVSROOT_DIRNAME"
+         dotest writeproxy-3 "grep PrimaryServer config" \
+"${DOTSTAR}
+PrimaryServer=$PRIMARY_CVSROOT"
+
+         # Checkin to secondary
+         cd ..
+         dotest writeproxy-4 "$testcvs -Qd$SECONDARY_CVSROOT co -ldtop ."
+         cd top
+         mkdir firstdir
+
+         # Have to move the primary root back before we can perform write
+         # operations.
+         mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
+
+         dotest writeproxy-5 "$testcvs -Q add firstdir"
+         cd firstdir
+         echo now you see me >file1
+         dotest writeproxy-6 "$testcvs -Q add file1"
+         dotest writeproxy-6a "grep file1 CVS/Entries >/dev/null"
+         dotest writeproxy-7 "$testcvs -Q ci -mfirst-file file1"
+
+         # Verify that the server got the correct referrer.
+         #
+         # This happens even when using a :fork:ed server because CVS is
+         # hardcoded to support only :ext: servers.
+         #
+         # This test meaningfully detects that a referrer was passed in fork
+         # mode because the only time the referrer string can be altered from
+         # its original state is when the server sends a Referrer response.
+         # If the client were not parsing and resending the referrer, this
+         # string would still match $SECONDARY_CVSROOT_DIRNAME.
+         dotest writeproxy-7a "cat $TESTDIR/referrer" \
+":ext:address@hidden"
+
+         # Make sure the sync took place
+         dotest writeproxy-7b "$testcvs -Q up"
+
+         # Checkout from primary
+         cd ../../../primary
+         dotest writeproxy-8 "$testcvs -qd$PRIMARY_CVSROOT co firstdir" \
+"U firstdir/file1"
+
+         # Confirm data present
+         #  - This test indirectly confirms that the commit did not take
+         #    place on the secondary.
+         cd firstdir
+         dotest writeproxy-9 "cat file1" "now you see me"
+
+         # Commit to primary
+         echo now you see me again >file1
+         dotest writeproxy-10 "$testcvs -Q ci -medit file1"
+
+         # Update from secondary
+         cd ../../secondary/top/firstdir
+         dotest writeproxy-11 "$testcvs -q up" \
+"U file1"
+
+         # Confirm data present
+         dotest writeproxy-12 "cat file1" "now you see me again"
+
+         # Test a failing rsync
+         cd ../../CVSROOT
+         sed \$d <loginfo >tmp
+         mv tmp loginfo
+         echo >>loginfo \
+"ALL echo >&2 'Im rsync and I encountered an error!'; cat >/dev/null; exit 1"
+         dotest writeproxy-init-13 "$testcvs -Q ci -mbreak-rsync" \
+"Im rsync and I encountered an error!"
+         echo "# a comment" >>loginfo
+         dotest writeproxy-13 "$testcvs -Q ci -mtest-broken-rsync" \
+"Im rsync and I encountered an error!"
+         touch loginfo
+         dotest_fail writeproxy-14 "$testcvs up" \
+"$SPROG update: Updating \.
+$SPROG \[update aborted\]: could not find desired version 1\.4 in 
$PRIMARY_CVSROOT_DIRNAME/CVSROOT/loginfo,v"
+
+         dokeep
+         cd ../../..
+         rm -rf writeproxy $TESTDIR/referrer
+         rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_DIRNAME=$PRIMARY_CVSROOT_DIRNAME_save
+         PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
+         SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
+         SECONDARY_CVSROOT=$SECONDARY_CVSROOT_save
+         ;;
+
+
+
+       writeproxy-noredirect)
+         # Various tests for a read-only CVS mirror set up as a write-proxy
+         # for a central server.
+         #
+         # These tests are only meaningful in client/server mode.
+         #
+         # These tests are a few simple tests for a writeproxy setup with a
+         # client that can't handle the `Redirect' response.  Mostly they
+         # parallel the "writeproxy" tests but, in the style of the "server",
+         # "server2", "pserver", and related tests, they bypass the CVS client
+         # for write commands by piping data into a server on STDIN to mimic
+         # a client that cannot handle the `Redirect' response.
+         if $remote; then :; else
+           remoteonly writeproxy-noredirect
+           continue
+         fi
+
+         require_rsync
+         if test $? -eq 77; then
+           skip writeproxy-noredirect "$skipreason"
+           continue
+         fi
+
+         PRIMARY_CVSROOT_DIRNAME_save=$PRIMARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_save=$PRIMARY_CVSROOT
+         PRIMARY_CVSROOT_DIRNAME=$TESTDIR/primary_cvsroot
+         PRIMARY_CVSROOT=`newroot $PRIMARY_CVSROOT_DIRNAME`
+         SECONDARY_CVSROOT_DIRNAME_save=$SECONDARY_CVSROOT_DIRNAME
+         SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
+
+         # Initialize the primary repository
+         dotest writeproxy-noredirect-init-1 \
+"$testcvs -d'$PRIMARY_CVSROOT' init"
+         mkdir writeproxy-noredirect; cd writeproxy-noredirect
+         mkdir primary; cd primary
+         dotest writeproxy-noredirect-init-2 \
+"$testcvs -Qd'$PRIMARY_CVSROOT' co CVSROOT"
+         cd CVSROOT
+         cat >>loginfo <<EOF
+ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+EOF
+         cat >>config <<EOF
+PrimaryServer=$PRIMARY_CVSROOT
+EOF
+         dotest writeproxy-noredirect-init-3 \
+"$testcvs -Q ci -mconfigure-writeproxy"
+
+         # And now the secondary.
+         $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+
+         CVS_SERVER_save=$CVS_SERVER
+         CVS_SERVER_secondary=$TESTDIR/writeproxy-secondary-wrapper
+         CVS_SERVER=$CVS_SERVER_secondary
+
+         # Wrap the CVS server to allow --primary-root to be set by the
+         # secondary.
+         cat <<EOF >$TESTDIR/writeproxy-secondary-wrapper
+#! $TESTSHELL
+CVS_SERVER=$TESTDIR/writeproxy-primary-wrapper
+export CVS_SERVER
+
+# No need to check the PID of the last client since we are testing with
+# Redirect disabled.
+proot_arg="--allow-root $SECONDARY_CVSROOT_DIRNAME --allow-root 
$PRIMARY_CVSROOT_DIRNAME"
+exec $servercvs \$proot_arg "\$@"
+EOF
+         cat <<EOF >$TESTDIR/writeproxy-primary-wrapper
+#! $TESTSHELL
+#CVS_SERVER_LOG=/tmp/cvsprimarylog
+exec $servercvs "\$@"
+EOF
+
+         chmod a+x $TESTDIR/writeproxy-secondary-wrapper \
+                   $TESTDIR/writeproxy-primary-wrapper
+
+         # Checkout from secondary
+         #
+         # It may look like we are checking out from the primary here, but
+         # in fork mode, the deciding factor is the PrimaryServer translation
+         # above.
+         #
+         # When the primary and secondary hostname were different, the server
+         # the client is talking directly to is more obvious.
+         #
+         # For now, move the primary root out of the way to satisfy
+         # ourselves that the data is coming from the secondary.
+         mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
+         cd ../..
+         mkdir secondary; cd secondary
+         dotest writeproxy-noredirect-1 \
+"$testcvs -qd'$PRIMARY_CVSROOT' co CVSROOT" \
+"U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/postadmin
+U CVSROOT/postproxy
+U CVSROOT/posttag
+U CVSROOT/postwatch
+U CVSROOT/preproxy
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg"
+
+         # Confirm data present
+         cd CVSROOT
+         dotest writeproxy-noredirect-2 "grep rsync loginfo" \
+"ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ 
$SECONDARY_CVSROOT_DIRNAME"
+         dotest writeproxy-noredirect-3 "grep PrimaryServer config" \
+"${DOTSTAR}
+PrimaryServer=$PRIMARY_CVSROOT"
+
+         # Checkin to secondary
+         cd ..
+         dotest writeproxy-noredirect-4 \
+"$testcvs -Qd'$PRIMARY_CVSROOT' co -ldtop ."
+         cd top
+         mkdir firstdir
+
+         # Have to move the primary root back before we can perform write
+         # operations.
+         mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
+
+         dotest writeproxy-noredirect-5 "$CVS_SERVER server" \
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents status rdiff tag rtag import admin export history release 
watch-on watch-off watch-add watch-remove watchers editors edit init annotate 
rannotate noop version
+ok
+ok
+ok
+Clear-template firstdir/
+firstdir/
+ok" \
+<< EOF
+Root $PRIMARY_CVSROOT_DIRNAME
+Valid-responses ok error Valid-requests Checked-in New-entry Checksum 
Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time 
Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky 
Clear-sticky Template Clear-template Notified Module-expansion 
Wrapper-rcsOption M Mbinary E F MT
+valid-requests
+UseUnchanged
+Command-prep add
+Global_option -q
+Global_option -Q
+wrapper-sendme-rcsOptions
+Argument --
+Directory firstdir
+firstdir
+Directory .
+
+Argument firstdir
+add
+EOF
+
+         # Gotta update the workspace ourselves since we bypassed the client.
+         cp -R CVS firstdir/CVS
+         echo "firstdir" >firstdir/CVS/Repository
+
+         cd firstdir
+         echo now you see me >file1
+         dotest writeproxy-noredirect-6 "$CVS_SERVER server" \
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents status rdiff tag rtag import admin export history release 
watch-on watch-off watch-add watch-remove watchers editors edit init annotate 
rannotate noop version
+ok
+ok
+ok
+Checked-in \./
+firstdir/file1
+/file1/0///
+ok" \
+<< EOF
+Root $PRIMARY_CVSROOT_DIRNAME
+Valid-responses ok error Valid-requests Checked-in New-entry Checksum 
Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time 
Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky 
Clear-sticky Template Clear-template Notified Module-expansion 
Wrapper-rcsOption M Mbinary E F MT
+valid-requests
+UseUnchanged
+Command-prep add
+Global_option -q
+Global_option -Q
+wrapper-sendme-rcsOptions
+Argument --
+Directory .
+firstdir
+Is-modified file1
+Argument file1
+add
+EOF
+
+         # Have to add it to the workspace ourselves again since we are
+         # bypassing the client.
+         echo /file1/0/dummy+timestamp// >>CVS/Entries
+
+         dotest writeproxy-noredirect-7 "$CVS_SERVER server" \
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents status rdiff tag rtag import admin export history release 
watch-on watch-off watch-add watch-remove watchers editors edit init annotate 
rannotate noop version
+ok
+ok
+Mode u=rw,g=rw,o=r
+Checked-in \./
+firstdir/file1
+/file1/1\.1///
+ok" \
+<< EOF
+Root $PRIMARY_CVSROOT_DIRNAME
+Valid-responses ok error Valid-requests Checked-in New-entry Checksum 
Copy-file Updated Created Update-existing Merged Patched Rcs-diff Mode Mod-time 
Removed Remove-entry Set-static-directory Clear-static-directory Set-sticky 
Clear-sticky Template Clear-template Notified Module-expansion 
Wrapper-rcsOption M Mbinary E F MT
+valid-requests
+UseUnchanged
+Command-prep commit
+Global_option -q
+Global_option -Q
+Argument -m
+Argument first-file
+Argument --
+Directory .
+firstdir
+Entry /file1/0/+modified//
+Modified file1
+u=rw,g=rw,o=r
+15
+now you see me
+Argument file1
+ci
+EOF
+
+         # Have to add it to the workspace ourselves again since we are
+         # bypassing the client.
+         echo D >CVS/Entries
+         echo /file1/1.1/dummy+timestamp// >>CVS/Entries
+
+         # Make sure the sync took place
+         dotest writeproxy-noredirect-7a "$testcvs -Q up"
+
+         CVS_SERVER=$servercvs
+         # Checkout from primary
+         cd ../../../primary
+         dotest writeproxy-noredirect-8 \
+"$testcvs -qd'$PRIMARY_CVSROOT' co firstdir" \
+"U firstdir/file1"
+
+         # Confirm data present
+         #  - This test indirectly confirms that the commit did not take
+         #    place on the secondary.
+         cd firstdir
+         dotest writeproxy-noredirect-9 "cat file1" "now you see me"
+
+         # Commit to primary
+         echo now you see me again >file1
+         dotest writeproxy-noredirect-10 "$testcvs -Q ci -medit file1"
+
+         CVS_SERVER=$CVS_SERVER_secondary
+         # Update from secondary
+         cd ../../secondary/top/firstdir
+         dotest writeproxy-noredirect-11 "$testcvs -q up" "U file1"
+
+         # Confirm data present
+         dotest writeproxy-noredirect-12 "cat file1" "now you see me again"
+
+         dokeep
+         cd ../../../..
+         rm -rf writeproxy-noredirect
+         rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
+         rm $TESTDIR/writeproxy-secondary-wrapper \
+            $TESTDIR/writeproxy-primary-wrapper
+         CVS_SERVER=$CVS_SERVER_save
+         PRIMARY_CVSROOT_DIRNAME=$PRIMARY_CVSROOT_DIRNAME_save
+         PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
+         SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
+         ;;
+
+
+
+       writeproxy-ssh)
+         # Various tests for a read-only CVS mirror set up as a write-proxy
+         # for a central server accessed via the :ext: method.
+         #
+         # Mostly these tests are intended to set up for the final test which
+         # verifies that the server registers the referrer.
+         if $remote; then :; else
+           remoteonly writeproxy-ssh
+           continue
+         fi
+
+         if $noredirect; then
+           notnoredirect writeproxy-ssh
+           continue
+         fi
+
+         require_rsh "$CVS_RSH"
+         if test $? -eq 77; then
+           skip writeproxy-ssh "$skipreason"
+           continue
+         fi
+
+         require_rsync
+         if test $? -eq 77; then
+           skip writeproxy-ssh "$skipreason"
+           continue
+         fi
+
+         # Save old roots.
+         PRIMARY_CVSROOT_DIRNAME_save=$PRIMARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_save=$PRIMARY_CVSROOT
+         SECONDARY_CVSROOT_DIRNAME_save=$SECONDARY_CVSROOT_DIRNAME
+         SECONDARY_CVSROOT_save=$SECONDARY_CVSROOT
+
+         # Set new roots.
+         PRIMARY_CVSROOT_DIRNAME=$TESTDIR/primary_cvsroot
+         PRIMARY_CVSROOT=:ext:$host$PRIMARY_CVSROOT_DIRNAME
+         SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
+         SECONDARY_CVSROOT=":ext;Redirect=yes:$host$SECONDARY_CVSROOT_DIRNAME"
+
+         # Initialize the primary repository
+         dotest writeproxy-ssh-init-1 "$testcvs -d$PRIMARY_CVSROOT init"
+         mkdir writeproxy-ssh; cd writeproxy-ssh
+         mkdir primary; cd primary
+         dotest writeproxy-ssh-init-2 "$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
+         cd CVSROOT
+         cat >>loginfo <<EOF
+ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+EOF
+         cat >>loginfo <<EOF
+ALL echo Referrer=%R; cat >/dev/null
+EOF
+         cat >>config <<EOF
+PrimaryServer=$PRIMARY_CVSROOT
+EOF
+         dotest writeproxy-ssh-init-3 \
+"$testcvs -Q ci -mconfigure-writeproxy-ssh" \
+"Referrer=NONE"
+
+         # And now the secondary.
+         $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+
+         # Checkout from secondary
+         #
+         # For now, move the primary root out of the way to satisfy
+         # ourselves that the data is coming from the secondary.
+         mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
+
+         # Checkin to secondary
+         cd ../..
+         save_CVSROOT=$CVSROOT
+         CVSROOT=$SECONDARY_CVSROOT
+         export CVSROOT
+         dotest writeproxy-ssh-1 "$testcvs -Q co -ldtop ."
+         CVSROOT=$save_CVSROOT
+         export CVSROOT
+         cd top
+         mkdir firstdir
+
+         # Have to move the primary root back before we can perform write
+         # operations.
+         mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
+
+         dotest writeproxy-ssh-2 "$testcvs -Q add firstdir" \
+"Referrer=:ext:address@hidden"
+
+         cd firstdir
+         echo now you see me >file1
+         dotest writeproxy-ssh-3 "$testcvs -Q add file1"
+         dotest writeproxy-ssh-4 "$testcvs -Q ci -mfirst-file file1" \
+"Referrer=:ext:address@hidden"
+
+         dokeep
+         cd ../../..
+         rm -rf writeproxy-ssh
+         rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_DIRNAME=$PRIMARY_CVSROOT_DIRNAME_save
+         PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
+         SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
+         SECONDARY_CVSROOT=$SECONDARY_CVSROOT_save
+         ;;
+
+
+
+       writeproxy-ssh-noredirect)
+         # Various tests for a read-only CVS mirror set up as a write-proxy
+         # for a central server accessed via the :ext: method.
+         #
+         # Mostly these tests are intended to set up for the final test which
+         # verifies that the server registers the referrer.
+         if $remote; then :; else
+           remoteonly writeproxy-ssh-noredirect
+           continue
+         fi
+
+         require_rsh "$CVS_RSH"
+         if test $? -eq 77; then
+           skip writeproxy-ssh-noredirect "$skipreason"
+           continue
+         fi
+
+         require_rsync
+         if test $? -eq 77; then
+           skip writeproxy-ssh-noredirect "$skipreason"
+           continue
+         fi
+
+         # Save old roots.
+         PRIMARY_CVSROOT_DIRNAME_save=$PRIMARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_save=$PRIMARY_CVSROOT
+         SECONDARY_CVSROOT_DIRNAME_save=$SECONDARY_CVSROOT_DIRNAME
+         SECONDARY_CVSROOT_save=$SECONDARY_CVSROOT
+
+         # Set new roots.
+         PRIMARY_CVSROOT_DIRNAME=$TESTDIR/primary_cvsroot
+         PRIMARY_CVSROOT=:ext:$host$PRIMARY_CVSROOT_DIRNAME
+         SECONDARY_CVSROOT_DIRNAME=$TESTDIR/writeproxy_cvsroot
+         SECONDARY_CVSROOT=":ext;Redirect=no:$host$PRIMARY_CVSROOT_DIRNAME"
+
+         # Initialize the primary repository
+         dotest writeproxy-ssh-noredirect-init-1 \
+"$testcvs -d$PRIMARY_CVSROOT init"
+         mkdir writeproxy-ssh-noredirect; cd writeproxy-ssh-noredirect
+         mkdir primary; cd primary
+         dotest writeproxy-ssh-noredirect-init-2 \
+"$testcvs -Qd$PRIMARY_CVSROOT co CVSROOT"
+         cd CVSROOT
+         cat >>loginfo <<EOF
+ALL $RSYNC -gopr --delete $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+EOF
+         cat >>loginfo <<EOF
+ALL echo Referrer=%R; cat >/dev/null
+EOF
+         cat >>config <<EOF
+PrimaryServer=$PRIMARY_CVSROOT
+EOF
+         dotest writeproxy-ssh-noredirect-init-3 \
+"$testcvs -Q ci -mconfigure-writeproxy-ssh-noredirect" \
+"Referrer=NONE"
+
+         # And now the secondary.
+         $RSYNC -gopr $PRIMARY_CVSROOT_DIRNAME/ $SECONDARY_CVSROOT_DIRNAME
+
+         # Wrap the CVS server to allow --primary-root to be set by the
+         # secondary.
+         cat <<EOF >$TESTDIR/writeproxy-secondary-wrapper
+#! $TESTSHELL
+CVS_SERVER=$TESTDIR/writeproxy-primary-wrapper
+export CVS_SERVER
+
+# No need to check the PID of the last client since we are testing with
+# Redirect disabled.
+proot_arg="--allow-root=$SECONDARY_CVSROOT_DIRNAME 
--allow-root=$PRIMARY_CVSROOT_DIRNAME"
+exec $CVS_SERVER \$proot_arg "\$@"
+EOF
+         cat <<EOF >$TESTDIR/writeproxy-primary-wrapper
+#! $TESTSHELL
+if test -n "\$CVS_SERVER_LOG"; then
+       CVS_SERVER_LOG=$TMPDIR/cvsprimarylog; export CVS_SERVER_LOG
+fi
+exec $CVS_SERVER "\$@"
+EOF
+
+         CVS_SERVER_save=$CVS_SERVER
+         CVS_SERVER_secondary=$TESTDIR/writeproxy-secondary-wrapper
+         CVS_SERVER=$CVS_SERVER_secondary
+
+         chmod a+x $TESTDIR/writeproxy-secondary-wrapper \
+                   $TESTDIR/writeproxy-primary-wrapper
+
+         # Checkout from secondary
+         #
+         # For now, move the primary root out of the way to satisfy
+         # ourselves that the data is coming from the secondary.
+         mv $PRIMARY_CVSROOT_DIRNAME $TESTDIR/save-root
+
+         # Checkin to secondary
+         cd ../..
+         dotest writeproxy-ssh-noredirect-1 \
+"$testcvs -qd '$SECONDARY_CVSROOT' co -ldtop ."
+
+         cd top
+         mkdir firstdir
+
+         # Have to move the primary root back before we can perform write
+         # operations.
+         mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
+
+         dotest writeproxy-ssh-noredirect-2 "$testcvs -Q add firstdir" \
+"Referrer=NONE"
+
+         cd firstdir
+         echo now you see me >file1
+         dotest writeproxy-ssh-noredirect-3 "$testcvs -Q add file1"
+         dotest writeproxy-ssh-noredirect-4 \
+"$testcvs -Q ci -mfirst-file file1" \
+"Referrer=NONE"
+
+         dokeep
+         cd ../../..
+         rm -rf writeproxy-ssh-noredirect
+         rm -rf $PRIMARY_CVSROOT_DIRNAME $SECONDARY_CVSROOT_DIRNAME
+         PRIMARY_CVSROOT_DIRNAME=$PRIMARY_CVSROOT_DIRNAME_save
+         PRIMARY_CVSROOT=$PRIMARY_CVSROOT_save
+         SECONDARY_CVSROOT_DIRNAME=$SECONDARY_CVSROOT_DIRNAME_save
+         SECONDARY_CVSROOT=$SECONDARY_CVSROOT_save
+         rm $TESTDIR/writeproxy-secondary-wrapper \
+            $TESTDIR/writeproxy-primary-wrapper
+         CVS_SERVER=$CVS_SERVER_save
+         ;;
+
+
+
+       trace)
+         # Check that there are no core dumps lurking in the trace
+         # options. 
+
+         # Perform some cleanup for normalized testing...
+         rm ${CVSROOT_DIRNAME}/CVSROOT/history
+         rm -f ${CVSROOT_DIRNAME}/CVSROOT/cvsignore
+         rm -f ${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v
+
+         # checkout the trace option
+
+         mkdir trace && cd trace
+         mkdir imp && cd imp
+         touch file1
+
+         dotest_sort trace-1 "${testcvs} -t -t -t init" \
+"  *-> Lock_Cleanup()
+  *-> RCS_checkout (checkoutlist,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (commitinfo,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (config,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (cvswrappers,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (loginfo,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (modules,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (notify,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (postadmin,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (postproxy,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (posttag,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (postwatch,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (preproxy,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (rcsinfo,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (taginfo,v, , , , \.#[0-9][0-9]*)
+  *-> RCS_checkout (verifymsg,v, , , , \.#[0-9][0-9]*)
+  *-> Simple_Lock_Cleanup()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#[0-9][0-9]*)
+  *-> unlink_file(\.#checkoutlist)
+  *-> unlink_file(\.#commitinfo)
+  *-> unlink_file(\.#config)
+  *-> unlink_file(\.#cvswrappers)
+  *-> unlink_file(\.#loginfo)
+  *-> unlink_file(\.#modules)
+  *-> unlink_file(\.#notify)
+  *-> unlink_file(\.#postadmin)
+  *-> unlink_file(\.#postproxy)
+  *-> unlink_file(\.#posttag)
+  *-> unlink_file(\.#postwatch)
+  *-> unlink_file(\.#preproxy)
+  *-> unlink_file(\.#rcsinfo)
+  *-> unlink_file(\.#taginfo)
+  *-> unlink_file(\.#verifymsg)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )" \
+"
+  *-> Forking server: ${CVS_SERVER} server
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> RCS_checkout (checkoutlist,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (commitinfo,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (config,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (cvswrappers,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (loginfo,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (modules,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (notify,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (postadmin,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (postproxy,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (posttag,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (postwatch,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (preproxy,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (rcsinfo,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (taginfo,v, , , , \.#[0-9][0-9]*)
+S -> RCS_checkout (verifymsg,v, , , , \.#[0-9][0-9]*)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> do_cvs_command (init)
+S -> remove_locks()
+S -> remove_locks()
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#[0-9][0-9]*)
+S -> unlink_file(\.#checkoutlist)
+S -> unlink_file(\.#commitinfo)
+S -> unlink_file(\.#config)
+S -> unlink_file(\.#cvswrappers)
+S -> unlink_file(\.#loginfo)
+S -> unlink_file(\.#modules)
+S -> unlink_file(\.#notify)
+S -> unlink_file(\.#postadmin)
+S -> unlink_file(\.#postproxy)
+S -> unlink_file(\.#posttag)
+S -> unlink_file(\.#postwatch)
+S -> unlink_file(\.#preproxy)
+S -> unlink_file(\.#rcsinfo)
+S -> unlink_file(\.#taginfo)
+S -> unlink_file(\.#verifymsg)" \
+
+         dotest_sort trace-2 \
+"${testcvs} -t -t -t import -mimport trace MYVENDOR version-1" \
+"
+
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+  *-> Simple_Lock_Cleanup()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> safe_location( where=(null) )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+N trace/file1
+No conflicts created by this import" \
+"
+
+
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Sending file \`file1' to server
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+N trace/file1
+No conflicts created by this import
+S -> CVS_SERVER_SLEEP not set\.
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (import)
+S -> remove_locks()
+S -> remove_locks()
+S -> safe_location( where=(null) )
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()"
+
+         cd ..
+         rm -fr imp
+
+         dotest_sort trace-3 "${testcvs} -t -t -t co trace" \
+"  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *local=0, which=3, aflag=0,
+  *locktype=1, update_preload=trace
+  *-> Create_Admin
+  *-> Create_Admin (\., trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , file1)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Register(file1, 1\.1\.1\.1, ${DATE}, ,  )
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Write_Template (trace, ${CVSROOT_DIRNAME}/trace)
+  *-> chmod(file1,[0-7][0-7]*)
+  *-> do_module (trace, Updating, NULL, NULL)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> safe_location( where=(null) )
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(\./CVS/Entries\.Static)
+  *-> unlink_file(\./CVS/Tag)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> unlink_file_dir(CVS/,,file1)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+U trace/file1
+${SPROG} checkout: Updating trace" \
+"
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *local=0, which=3, aflag=0,
+  *locktype=1, update_preload=trace
+  *-> Create_Admin
+  *-> Create_Admin (trace, trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Register(file1, 1\.1\.1\.1, ${DATE}, ,  )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(\.new\.file1,file1)
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> safe_location( where=(null) )
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> unlink_file(CVS/Entries\.Static)
+  *-> unlink_file(CVS/Tag)
+  *-> unlink_file(CVS/Template)
+  *-> unlink_file(trace/CVS/Tag)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Create_Admin
+S -> Create_Admin (\., trace, ${CVSROOT_DIRNAME}/trace, , , 0, 0, 1)
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/rcsinfo, trace, ALL)
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , 
(function))
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Register(file1, 1\.1\.1\.1, , ,  )
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Write_Template (trace, ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (\., ${CVSROOT_DIRNAME})
+S -> dirswitch (\., ${CVSROOT_DIRNAME})
+S -> do_cvs_command (checkout)
+S -> do_module (trace, Updating, NULL, NULL)
+S -> do_module (trace, Updating, NULL, NULL)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> safe_location( where=(null) )
+S -> serve_directory (\.)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_register(file1, 1\.1\.1\.1, , , , , )
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(\./CVS/Entries\.Static)
+S -> unlink_file(\./CVS/Tag)
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+U trace/file1
+${SPROG} checkout: Updating trace"
+
+         cd trace
+         mkdir subdir
+         dotest_sort trace-4 "${testcvs} -t -t -t add subdir" \
+"  *-> Create_Admin
+  *-> Create_Admin (\., subdir, ${CVSROOT_DIRNAME}/trace/subdir, , , 0, 0, 1)
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace/subdir, ALL)
+  *-> Simple_Lock_Cleanup()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> unlink_file(\./CVS/Tag)
+  *-> unlink_file(${CVSROOT_DIRNAME}/trace/subdir/CVS/fileattr)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+Directory ${CVSROOT_DIRNAME}/trace/subdir added to the repository" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *-> Create_Admin
+  *-> Create_Admin (subdir, subdir, ${CVSROOT_DIRNAME}/trace/subdir, , , 0, 0, 
1)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+${DOTSTAR}  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+${DOTSTAR}  *-> unlink_file(CVS/Template)
+  *-> unlink_file(subdir/CVS/Tag)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${DOTSTAR}Directory ${CVSROOT_DIRNAME}/trace/subdir added to the repository
+S -> CVS_SERVER_SLEEP not set\.
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace/subdir, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/rcsinfo, trace/subdir, ALL)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Write_Template (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
+S -> do_cvs_command (add)
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> serve_directory (subdir)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> unlink_file(${CVSROOT_DIRNAME}/trace/subdir/CVS/fileattr)
+S -> unlink_file(CVS/Entries\.Log)
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )"
+         touch file2
+         dotest_sort trace-5 "${testcvs} -t -t -t add file2" \
+"  *-> Lock_Cleanup()
+  *-> Register(file2, 0, Initial file2, ,  )
+  *-> Simple_Lock_Cleanup()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${SPROG} add: scheduling file \`file2' for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Register(file2, 0, dummy timestamp, ,  )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+${DOTSTAR}  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+${DOTSTAR}  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${DOTSTAR}S -> CVS_SERVER_SLEEP not set\.
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Register(file2, 0, Initial file2, ,  )
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (add)
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_register(file2, 0, Initial file2, , , , )
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${SPROG} add: scheduling file \`file2' for addition
+${SPROG} add: use \`${SPROG} commit' to add this file permanently"
+         dotest_sort trace-6 "${testcvs} -t -t -t ci -mnew-file file2" \
+"  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+  *-> Promotable_Lock ()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file2,v, 1, , , (function))
+  *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file2,v, 1, (null), , file2 )
+  *-> Register(file2, 1\.1, ${DATE}, ,  )
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_tree_promotably (1, argv, 0, 1, 0)
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
+  *-> rcs_cleanup()
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> remove_locks()
+  *-> remove_locks()
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Base/file2)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> unlink_file(CVS/file2,t)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${CVSROOT_DIRNAME}/trace/file2,v  <--  file2
+initial revision: 1\.1" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Register(file2, 1\.1, ${DATE}, ,  )
+  *-> Sending file \`file2' to server
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Base/file2)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${CVSROOT_DIRNAME}/trace/file2,v  <--  file2
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+S -> Promotable_Lock ()
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file2,v, 1, , , (function))
+S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file2,v, 1, (null), , file2 )
+S -> Register(file2, 1\.1, ${DATE}, ,  )
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (commit)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_tree_promotably (1, argv, 0, 1, 0)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_lock(${CVSROOT_DIRNAME}/trace)
+S -> rcs_cleanup()
+S -> readers_exist (${CVSROOT_DIRNAME}/trace)
+S -> remove_locks()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file2)
+S -> server_pathname_check (file2)
+S -> server_pathname_check (file2)
+S -> server_register(file2, 1\.1, ${DATE}, , , , )
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(CVS/Entries\.Log)
+S -> unlink_file(CVS/file2,t)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+initial revision: 1\.1"
+         dotest_sort trace-7 "${testcvs} -t -t -t tag bp" \
+"  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in= )
+  *dosrcs=1, repository_in= )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=1, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *local_specified=0, mname=(null), msg=(null) )
+  *mwhere=(null), mfile=(null), shorten=0,
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
+  *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, 
${CVSROOT_DIRNAME}/trace/file1,v )
+  *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, 
${CVSROOT_DIRNAME}/trace/file2,v )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> rcs_cleanup()
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> remove_locks()
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+T file1
+T file2
+${SPROG} tag: Tagging \.
+${SPROG} tag: Tagging subdir" \
+"
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in= )
+  *dosrcs=1, repository_in= )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *local_specified=0, mname=(null), msg=(null) )
+  *mwhere=(null), mfile=(null), shorten=0,
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
+S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, 
${CVSROOT_DIRNAME}/trace/file1,v )
+S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, 
${CVSROOT_DIRNAME}/trace/file2,v )
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
+S -> do_cvs_command (tag)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+S -> rcs_cleanup()
+S -> readers_exist (${CVSROOT_DIRNAME}/trace)
+S -> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
+S -> serve_directory (\.)
+S -> serve_directory (\.)
+S -> serve_directory (subdir)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(CVS/Entries\.Log)
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+T file1
+T file2
+${SPROG} tag: Tagging \.
+${SPROG} tag: Tagging subdir"
+
+         dotest_sort trace-8 "${testcvs} -t -t -t tag -b branch1" \
+"  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in= )
+  *dosrcs=1, repository_in= )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=1, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *local_specified=0, mname=(null), msg=(null) )
+  *mwhere=(null), mfile=(null), shorten=0,
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
+  *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, 
${CVSROOT_DIRNAME}/trace/file1,v )
+  *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, 
${CVSROOT_DIRNAME}/trace/file2,v )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> rcs_cleanup()
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> remove_locks()
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+  *-> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+T file1
+T file2
+${SPROG} tag: Tagging \.
+${SPROG} tag: Tagging subdir" \
+"
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in= )
+  *dosrcs=1, repository_in= )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *local_specified=0, mname=(null), msg=(null) )
+  *mwhere=(null), mfile=(null), shorten=0,
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
+S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file1, 
${CVSROOT_DIRNAME}/trace/file1,v )
+S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, file2, 
${CVSROOT_DIRNAME}/trace/file2,v )
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
+S -> do_cvs_command (tag)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+S -> rcs_cleanup()
+S -> readers_exist (${CVSROOT_DIRNAME}/trace)
+S -> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
+S -> serve_directory (\.)
+S -> serve_directory (\.)
+S -> serve_directory (subdir)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(CVS/Entries\.Log)
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+T file1
+T file2
+${SPROG} tag: Tagging \.
+${SPROG} tag: Tagging subdir"
+         dotest_sort trace-9 "${testcvs} -t -t -t log" \
+"
+
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=7, aflag=0,
+  *locktype=1, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+ MYVENDOR: 1\.1\.1
+ bp: 1\.1
+ bp: 1\.1\.1\.1
+ branch1: 1\.1\.0\.2
+ branch1: 1\.1\.1\.1\.0\.2
+ version-1: 1\.1\.1\.1
+----------------------------
+----------------------------
+----------------------------
+=============================================================================
+=============================================================================
+Initial revision
+RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
+RCS file: ${CVSROOT_DIRNAME}/trace/file2,v
+Working file: file1
+Working file: file2
+access list:
+access list:
+branch:
+branch: 1\.1\.1
+branches:  1\.1\.1;
+${SPROG} log: Logging \.
+${SPROG} log: Logging subdir
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+description:
+description:
+head: 1\.1
+head: 1\.1
+import
+keyword substitution: kv
+keyword substitution: kv
+locks: strict
+locks: strict
+new-file
+revision 1\.1
+revision 1\.1
+revision 1\.1\.1\.1
+symbolic names:
+symbolic names:
+total revisions: 1; selected revisions: 1
+total revisions: 2; selected revisions: 2" \
+"
+
+
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=7, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+ MYVENDOR: 1\.1\.1
+ bp: 1\.1
+ bp: 1\.1\.1\.1
+ branch1: 1\.1\.0\.2
+ branch1: 1\.1\.1\.1\.0\.2
+ version-1: 1\.1\.1\.1
+----------------------------
+----------------------------
+----------------------------
+=============================================================================
+=============================================================================
+Initial revision
+RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
+RCS file: ${CVSROOT_DIRNAME}/trace/file2,v
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> dirswitch (subdir, ${CVSROOT_DIRNAME}/trace/subdir)
+S -> do_cvs_command (log)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> serve_directory (\.)
+S -> serve_directory (subdir)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(CVS/Entries\.Log)
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+Working file: file1
+Working file: file2
+access list:
+access list:
+branch:
+branch: 1\.1\.1
+branches:  1\.1\.1;
+${SPROG} log: Logging \.
+${SPROG} log: Logging subdir
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  lines: ${PLUS}0 -0;  
commitid: ${commitid};
+date: ${ISO8601DATE};  author: ${username};  state: Exp;  commitid: 
${commitid};
+description:
+description:
+head: 1\.1
+head: 1\.1
+import
+keyword substitution: kv
+keyword substitution: kv
+locks: strict
+locks: strict
+new-file
+revision 1\.1
+revision 1\.1
+revision 1\.1\.1\.1
+symbolic names:
+symbolic names:
+total revisions: 1; selected revisions: 1
+total revisions: 2; selected revisions: 2"
+
+         dotest_sort trace-10 "${testcvs} -t -t -t annotate file1" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in= )
+  *local=0, which=1, aflag=0,
+  *locktype=1, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+Annotations for file1" \
+"
+
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in= )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+Annotations for file1
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (annotate)
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )"
+
+         dotest_sort \
+trace-11 "${testcvs} -t -t -t rtag -r bp -b branch2 trace" \
+"  *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *local=0, which=6, aflag=0,
+  *local=0, which=6, aflag=0,
+  *local=0, which=6, aflag=0,
+  *locktype=1, update_preload=(null)
+  *locktype=1, update_preload=trace
+  *locktype=2, update_preload=trace
+  *local_specified=0, mname=trace, msg=Tagging )
+  *mwhere=(null), mfile=(null), shorten=0,
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
+  *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file1, 
${CVSROOT_DIRNAME}/trace/file1,v )
+  *-> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file2, 
${CVSROOT_DIRNAME}/trace/file2,v )
+  *-> do_module (trace, Tagging, NULL, branch2)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> rcs_cleanup()
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> remove_locks()
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+  *-> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> tag_check_valid ( name=bp, argc=0, argv=${PFMT}, local=0,
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${SPROG} rtag: Tagging trace
+${SPROG} rtag: Tagging trace/subdir" \
+"
+  *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *local=0, which=6, aflag=0,
+  *local=0, which=6, aflag=0,
+  *local=0, which=6, aflag=0,
+  *locktype=1, update_preload=(null)
+  *locktype=1, update_preload=trace
+  *locktype=2, update_preload=trace
+  *local_specified=0, mname=trace, msg=Tagging )
+  *mwhere=(null), mfile=(null), shorten=0,
+  *-> Forking server: ${CVS_SERVER} server
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/taginfo, trace, ALL)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace/subdir)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, (null))
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, (null))
+S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file1, 
${CVSROOT_DIRNAME}/trace/file1,v )
+S -> check_fileproc ( ${CVSROOT_DIRNAME}/trace, trace/file2, 
${CVSROOT_DIRNAME}/trace/file2,v )
+S -> do_cvs_command (rtag)
+S -> do_module (trace, Tagging, NULL, branch2)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+S -> rcs_cleanup()
+S -> readers_exist (${CVSROOT_DIRNAME}/trace)
+S -> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(${CVSROOT_DIRNAME}/trace/,file2,,${CVSROOT_DIRNAME}/trace/file2,v)
+S -> rtag_proc ( argc=1, argv=${PFMT}, xwhere=(null),
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> tag_check_valid ( name=bp, argc=0, argv=${PFMT}, local=0,
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${SPROG} rtag: Tagging trace
+${SPROG} rtag: Tagging trace/subdir"
+
+         dotest_sort trace-12 "${testcvs} -t -t -t status file1" \
+"
+
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *locktype=1, update_preload=(null)
+   Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/trace/file1,v
+   Sticky Date:  (none)
+   Sticky Options: (none)
+   Sticky Tag:  (none)
+   Working revision: 1\.1\.1\.1 ${DATE}
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+===================================================================
+File: file1  *Status: Up-to-date" \
+"
+
+
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+   Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/trace/file1,v
+   Sticky Date:  (none)
+   Sticky Options: (none)
+   Sticky Tag:  (none)
+   Working revision: 1\.1\.1\.1
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+===================================================================
+File: file1  *Status: Up-to-date
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (status)
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )"
+
+         echo foo >> file1
+         dotest_sort trace-13 "${testcvs} -t -t -t up -C file1" \
+"  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=3, aflag=0,
+  *locktype=1, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , 
(function))
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , file1)
+  *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, (null), , 
file1 )
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Register(file1, 1\.1\.1\.1, ${DATE}, ,  )
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> chmod(file1,[0-7][0-7]*)
+  *-> copy(file1,\.#file1\.1\.1\.1\.1)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> rename(file1,CVS/,,file1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> unlink_file_dir(CVS/,,file1)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+(Locally modified file1 moved to \.#file1\.1\.1\.1\.1)
+U file1" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=3, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Register(file1, 1\.1\.1\.1, ${DATE}, ,  )
+  *-> copy(file1,\.#file1\.1\.1\.1\.1)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(\.new\.file1,file1)
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+(Locally modified file1 moved to \.#file1\.1\.1\.1\.1)
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , 
(function))
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Register(file1, 1\.1\.1\.1, M, ,  )
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (update)
+S -> do_recursion ( frame=${PFMT} )
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> server_register(file1, 1\.1\.1\.1, M, , , , )
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+U file1"
+         echo foo >> file1
+         dotest_sort trace-14 "${testcvs} -t -t -t ci -madd-data file1" \
+"  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+  *-> Promotable_Lock ()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , (function))
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , -ko, ${tempname})
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , 
(function))
+  *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, (null), (null), , file1 )
+  *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, (null), , 
file1 )
+  *-> Register(file1, 1\.2, ${DATE}, ,  )
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_tree_promotably (1, argv, 0, 1, 0)
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
+  *-> rcs_cleanup()
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> remove_locks()
+  *-> remove_locks()
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(${tempname})
+  *-> unlink_file(${tempname})
+  *-> unlink_file(CVS/Base/file1)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${CVSROOT_DIRNAME}/trace/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Register(file1, 1\.2, ${DATE}, ,  )
+  *-> Sending file \`file1' to server
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Base/file1)
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${CVSROOT_DIRNAME}/trace/file1,v  <--  file1
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+S -> Promotable_Lock ()
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , (function))
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , -ko, ${tempname})
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, , , 
(function))
+S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, (null), (null), , file1 )
+S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, (null), , 
file1 )
+S -> Register(file1, 1\.2, ${DATE}, ,  )
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (commit)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_tree_promotably (1, argv, 0, 1, 0)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_lock(${CVSROOT_DIRNAME}/trace)
+S -> rcs_cleanup()
+S -> readers_exist (${CVSROOT_DIRNAME}/trace)
+S -> remove_locks()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> server_pathname_check (file1)
+S -> server_pathname_check (file1)
+S -> server_register(file1, 1\.2, ${DATE}, , , , )
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(${tempname})
+S -> unlink_file(${tempname})
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+new revision: 1\.2; previous revision: 1\.1"
+
+         dotest_fail_sort trace-15 "${testcvs} -t -t -t diff -r1.1 file1" \
+"  *aflag=0, repository= )
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=7, aflag=0,
+  *locktype=1, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , , ${tempname})
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , (function))
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
+  *-> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, 1\.2, , file1 )
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> diff_file_nodiff (file1, 3)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> tag_check_valid ( name=1\.1, argc=1, argv=${PFMT}, local=0,
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+0a1
+===================================================================
+> foo
+Index: file1
+RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
+diff -r1\.1 -r1\.2
+retrieving revision 1\.1
+retrieving revision 1\.2" \
+"
+  *aflag=0, repository= )
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=7, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+0a1
+===================================================================
+> foo
+Index: file1
+RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, , , ${tempname})
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , (function))
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
+S -> RCS_cmp_file( ${CVSROOT_DIRNAME}/trace/file1,v, 1\.1, 1\.2, , file1 )
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> diff_file_nodiff (file1, 3)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (diff)
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> tag_check_valid ( name=1\.1, argc=1, argv=${PFMT}, local=0,
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+diff -r1\.1 -r1\.2
+retrieving revision 1\.1
+retrieving revision 1\.2"
+
+         dotest_sort trace-16 "${testcvs} -t -t -t rdiff -rbp trace/file1" \
+"  *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *local=0, which=6, aflag=0,
+  *locktype=1, update_preload=trace
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, bp, , 
${tempname})
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> do_module (trace/file1, Patching, NULL, NULL)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> patch_proc ( (null), (null), (null), 0, 0, trace/file1, Patching )
+  *-> remove_locks()
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> tag_check_valid ( name=bp, argc=1, argv=${PFMT}, local=0,
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+\*\*\* 0 \*\*\*\*
+\*\*\* trace/file1:1\.1\.1\.1 ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+${PLUS} foo
+--- 1 ----
+--- trace/file1 ${DATE}
+Index: trace/file1
+diff -c trace/file1:1\.1\.1\.1 trace/file1:1\.2" \
+"
+  *aflag=0, repository=${CVSROOT_DIRNAME}/trace )
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=${CVSROOT_DIRNAME}/trace )
+  *local=0, which=6, aflag=0,
+  *locktype=1, update_preload=trace
+  *-> Forking server: ${CVS_SERVER} server
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+\*\*\* 0 \*\*\*\*
+\*\*\* trace/file1:1\.1\.1\.1 ${DATE}
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+${PLUS} foo
+--- 1 ----
+--- trace/file1 ${DATE}
+Index: trace/file1
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.1\.1\.1, bp, , 
${tempname})
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , , ${tempname})
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> do_cvs_command (rdiff)
+S -> do_module (trace/file1, Patching, NULL, NULL)
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> patch_proc ( (null), (null), (null), 0, 0, trace/file1, Patching )
+S -> remove_locks()
+S -> remove_locks()
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> tag_check_valid ( name=bp, argc=1, argv=${PFMT}, local=0,
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+diff -c trace/file1:1\.1\.1\.1 trace/file1:1\.2"
+
+         dotest_sort trace-17 "${testcvs} -t -t -t rm -f file1" \
+"  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *locktype=1, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+  *-> Register(file1, -1\.2, ${DATE}, ,  )
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> do_recursion ( frame=${PFMT} )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_simple_remove()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${SPROG} remove: scheduling \`file1' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=1, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Register(file1, -1\.2, dummy timestamp, ,  )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Reader_Lock(${CVSROOT_DIRNAME}/trace)
+S -> Register(file1, -1\.2, , ,  )
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (remove)
+S -> do_recursion ( frame=${PFMT} )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_simple_remove()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> server_register(file1, -1\.2, , , , , )
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(CVS/Entries\.Log)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${SPROG} remove: scheduling \`file1' for removal
+${SPROG} remove: use \`${SPROG} commit' to remove this file permanently"
+
+         dotest_sort trace-18 "${testcvs} -t -t -t ci -mremove file1" \
+"  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Lock_Cleanup()
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+  *-> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+  *-> Promotable_Lock ()
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , file1)
+  *-> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , -ko, ${tempname})
+  *-> Scratch_Entry(file1)
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_tree_promotably (1, argv, 0, 1, 0)
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
+  *-> rcs_cleanup()
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> remove_locks()
+  *-> remove_locks()
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(${tempname})
+  *-> unlink_file(${tempname})
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> unlink_file(file1)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${CVSROOT_DIRNAME}/trace/file1,v  <--  file1
+new revision: delete; previous revision: 1\.2" \
+"
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *callerdat=${PFMT}, argc=1, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *dosrcs=1, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Scratch_Entry(file1)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> rename(CVS/Entries\.Backup,CVS/Entries)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file(CVS/Entries\.Log)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+${CVSROOT_DIRNAME}/trace/file1,v  <--  file1
+S -> CVS_SERVER_SLEEP not set\.
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Leaving do_recursion ( frame=${PFMT} )
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/commitinfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/loginfo, trace, ALL)
+S -> Parse_Info (${CVSROOT_DIRNAME}/CVSROOT/verifymsg, trace, not ALL)
+S -> Promotable_Lock ()
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, , , , file1)
+S -> RCS_checkout (${CVSROOT_DIRNAME}/trace/file1,v, 1\.2, , -ko, ${tempname})
+S -> Scratch_Entry(file1)
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs.pfl\.${hostname}\.[0-9][0-9]*)
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs.pfl\.${hostname}\.[0-9][0-9]*)
+S -> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs.rfl\.${hostname}\.[0-9][0-9]*)
+S -> dirswitch (\., ${CVSROOT_DIRNAME}/trace)
+S -> do_cvs_command (commit)
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> do_recursion ( frame=${PFMT} )
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_name (${CVSROOT_DIRNAME}/trace, )
+S -> lock_simple_remove()
+S -> lock_simple_remove()
+S -> lock_tree_promotably (1, argv, 0, 1, 0)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_exists (${CVSROOT_DIRNAME}/trace)
+S -> promotable_lock(${CVSROOT_DIRNAME}/trace)
+S -> rcs_cleanup()
+S -> readers_exist (${CVSROOT_DIRNAME}/trace)
+S -> remove_locks()
+S -> remove_locks()
+S -> remove_locks()
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(${CVSROOT_DIRNAME}/trace/,file1,,${CVSROOT_DIRNAME}/trace/file1,v)
+S -> rename(CVS/Entries\.Backup,CVS/Entries)
+S -> serve_directory (\.)
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_pathname_check (file1)
+S -> server_pathname_check (file1)
+S -> server_pathname_check (file1)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+S -> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> unlink_file(${tempname})
+S -> unlink_file(${tempname})
+S -> unlink_file(CVS/Entries\.Log)
+S -> unlink_file(file1)
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+done
+new revision: delete; previous revision: 1\.2"
+
+         # SGI IRIX seems to have problems with the stdout and stderr
+         # mix for this test, so separate them.
+         dotest_sort trace-19 "${testcvs} -t -t -t history file1 2>stderr19" \
+"O ${ISODATE} ${username} trace =trace= ${TESTDIR}/trace/\*" \
+"O ${ISODATE} ${username} trace =trace= <remote>/\*"
+         dotest_sort trace-19stderr "sort < stderr19" \
+"  *-> Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> remove_locks()
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )" \
+"
+  *-> Forking server: ${CVS_SERVER} server
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+S -> CVS_SERVER_SLEEP not set\.
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> do_cvs_command (history)
+S -> remove_locks()
+S -> remove_locks()
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()"
+         rm stderr19
+
+         cd ..
+         dotest_sort \
+trace-20 "echo yes | ${testcvs} -t -t -t release -d trace" \
+"  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *locktype=2, update_preload=(null)
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Lock_Cleanup()
+  *-> Lock_Cleanup()
+  *-> Promotable_Lock ()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> Simple_Lock_Cleanup()
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.\*, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.pfl\.\*, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> _lock_exists (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.rfl\.\*, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace)
+  *-> lock_dir_for_write (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, #cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, #cvs\.lock)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.pfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.rfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, 
#cvs\.wfl\.${hostname}\.[0-9][0-9]*)
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_name (${CVSROOT_DIRNAME}/trace/subdir, )
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_simple_remove()
+  *-> lock_tree_promotably (0, argv, 0, 1, 0)
+  *-> main loop with CVSROOT=${CVSROOT_DIRNAME}
+  *-> parse_cvsroot ( ${CVSROOT_DIRNAME} )
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> promotable_exists (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> promotable_lock(${CVSROOT_DIRNAME}/trace)
+  *-> promotable_lock(${CVSROOT_DIRNAME}/trace/subdir)
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace)
+  *-> readers_exist (${CVSROOT_DIRNAME}/trace/subdir)
+  *-> remove_locks()
+  *-> remove_locks()
+  *-> run_popen(${testcvs} -n -q -d ${CVSROOT_DIRNAME} update,r)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 0)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace, 1)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 0)
+  *-> set_lock (${CVSROOT_DIRNAME}/trace/subdir, 1)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file_dir(trace)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+Are you sure you want to release (and delete) directory \`trace':   *-> 
start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+You have \[0\] altered files in this repository\." \
+"
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *callerdat=${PFMT}, argc=0, argv=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *direntproc=${PFMT}, dirleavproc=${PFMT},
+  *dosrcs=0, repository_in=(null) )
+  *dosrcs=0, repository_in=(null) )
+  *local=0, which=1, aflag=0,
+  *local=0, which=1, aflag=0,
+  *locktype=0, update_preload=(null)
+  *locktype=0, update_preload=(null)
+  *-> Forking server: ${CVS_SERVER} server
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> Leaving do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> do_recursion ( frame=${PFMT} )
+  *-> main loop with CVSROOT=${CVSROOT}
+  *-> parse_cvsroot ( ${CVSROOT} )
+  *-> run_popen(${testcvs} -n -q -d ${CVSROOT} update,r)
+  *-> start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+  *-> unlink_file_dir(trace)
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+  *-> walklist ( list=${PFMT}, proc=${PFMT}, closure=${PFMT} )
+Are you sure you want to release (and delete) directory \`trace':   *-> 
start_recursion ( fileproc=${PFMT}, filesdoneproc=${PFMT},
+S -> CVS_SERVER_SLEEP not set\.
+S -> Lock_Cleanup()
+S -> Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> Simple_Lock_Cleanup()
+S -> do_cvs_command (release)
+S -> fopen(${CVSROOT_DIRNAME}/CVSROOT/history,a)
+S -> remove_locks()
+S -> remove_locks()
+S -> server_cleanup()
+S -> server_cleanup()
+S -> server_notify()
+S -> server_notify()
+S -> server_notify()
+You have \[0\] altered files in this repository\."
+
+         dokeep
+         cd ..
+         rm -fr trace
+         modify_repo rm -fr $CVSROOT_DIRNAME/trace 
+         ;;
+
+
+
+       *)
+          echo $what is not the name of a test -- ignored
+          ;;
+       esac
+
+    # Sanity check sanity.sh.  :)
+    #
+    # Test our exit directory so that tests that exit in an incorrect directory
+    # are noticed during single test runs.
+    #
+    # FIXME?
+    # Sparc Solaris 9 is dereferencing paths here as if /bin/pwd were
+    # called when /tmp is a symlink.  This might be a new problem with this
+    # test, but since this was recently tested I think it more likely to be
+    # A Solaris issue.
+    if test "x$TESTDIR" != "x`pwd`"; then
+           fail "cleanup: PWD != TESTDIR (\``pwd`' != \`$TESTDIR')"
+    fi
+
+    # Test that the last test didn't overwrite any write proxy configuration
+    # which may be in place.
+    if $proxy; then
+       problem=false
+       for file in \
+                   $SECONDARY_CVSROOT_DIRNAME/CVSROOT/config \
+                   $CVSROOT_DIRNAME/CVSROOT/config \
+                   $SECONDARY_CVSROOT_DIRNAME/CVSROOT/loginfo \
+                   $CVSROOT_DIRNAME/CVSROOT/loginfo \
+                   $SECONDARY_CVSROOT_DIRNAME/CVSROOT/postadmin \
+                   $CVSROOT_DIRNAME/CVSROOT/postadmin \
+                   $SECONDARY_CVSROOT_DIRNAME/CVSROOT/posttag \
+                   $CVSROOT_DIRNAME/CVSROOT/posttag \
+                   $SECONDARY_CVSROOT_DIRNAME/CVSROOT/postwatch \
+                   $CVSROOT_DIRNAME/CVSROOT/postwatch; do
+           if $diff_u $file $TESTDIR/`basename $file`-clean >>$LOGFILE 2>&1; 
then
+               :;
+           else
+               echo "\`$file' and \`$TESTDIR/`basename $file`-clean' differ." \
+                    >>$LOGFILE
+               problem=:
+           fi
+       done
+       if $problem; then
+           fail "cleanup: write proxy configuration not preserved"
+       fi
+    fi
+
+    if $remote && test "$servercvs_orig" != "$servercvs" >/dev/null 2>&1; then
+       fail "test slagged \$servercvs"
+    fi
+
+    # Reset val-tags to a pristine state.
+    if test -s $CVSROOT_DIRNAME/CVSROOT/val-tags; then
+       modify_repo ":" > $CVSROOT_DIRNAME/CVSROOT/val-tags
+    fi
+    verify_tmp_empty "post $what"
+
+done # The big loop
+
+# Set up summary data for output.
+skippedoutput=
+warningsoutput=
+extendedinfo=
+if test $skipped -ne 0; then
+  skippedoutput="$skipped test group"
+  if test $skipped -ne 1; then
+    skippedoutput="${skippedoutput}s"
+  fi
+  skippedoutput="$skippedoutput skipped"
+fi
+if test $warnings -ne 0; then
+  warningsoutput="$warnings test"
+  if test $warnings -ne 1; then
+    warningsoutput="${warningsoutput}s"
+  fi
+  warningsoutput="$warningsoutput passed with warnings"
+fi
+if test -n "$skippedoutput" || test -n "$warningsoutput"; then
+  extendedinfo=" ("
+  if test -n "$skippedoutput"; then
+    extendedinfo="$extendedinfo$skippedoutput"
+  fi
+  if test -n "$skippedoutput" && test -n "$warningsoutput"; then
+    extendedinfo="$extendedinfo and "
+  fi
+  if test -n "$warningsoutput"; then
+    extendedinfo="$extendedinfo$warningsoutput"
+  fi
+  extendedinfo="$extendedinfo)"
+fi
+
+echo "OK, all $passed tests passed$extendedinfo."
+
+# TODO:
+# * Test `cvs update -d foo' (where foo does not exist).
+# * Test `cvs update foo bar' (where foo and bar are both from the
+#   same directory in the repository).  Suppose one is a branch--make
+#   sure that both directories get updated with the respective correct
+#   thing.
+# * `cvs update ../foo'.  Also ../../foo ./../foo foo/../../bar /foo/bar
+#   foo/.././../bar foo/../bar etc.
+# * Test all flags in modules file.
+#   Test that ciprog gets run both on checkin in that directory, or a
+#     higher-level checkin which recurses into it.
+# * Test operations on a directory that contains other directories but has
+#   no files of its own.
+# * -t global option
+# * cvs rm followed by cvs add or vice versa (with no checkin in between).
+# * cvs rm twice (should be a nice error message).
+# * -P option to checkout--(a) refrains from checking out new empty dirs,
+#   (b) prunes empty dirs already there.
+# * Test that cvs -d `hostname`:${TESTDIR}/non/existent co foo
+#   gives an appropriate error (e.g.
+#     Cannot access ${TESTDIR}/non-existent/CVSROOT
+#     No such file or directory).
+#   (like basica-9, but for remote).
+# * Test ability to send notifications in response to watches.  (currently
+#   hard to test because CVS doesn't send notifications if username is the
+#   same).
+# * Test the contents of adm files other than Root and Repository.
+#   Entries seems the next most important thing.
+# * Test the following compatibility issues:
+#   - The filler fields in "D" entries in CVS/Entries get preserved
+#     (per cvs.texinfo).
+#   - Unrecognized entry types in CVS/Entries get ignored (looks like
+#     this needs to be documented in cvs.texinfo, but is not)
+#   - Test that unrecognized files in CVS directories (e.g. CVS/Foobar)
+#     are ignored (per cvs.texinfo).
+#   - Test 'cvs history' with symlinks in the path to the working directory.
+#   - Remove most of the CVS_SERVER stuff after a reasonable amount of time.
+#     The "fork" & "client" series of tests should be left.  4/2/00, CVS
+#     1.11.0.1 was altered so that it would default to program_name (set from
+#     argv[0]) rather than "cvs", but I'd like this script to work on legacy
+#     versions of CVS for awhile.
+#   - Testsuite doesn't work with usernames over eight characters in length.
+#     Fix it.
+# End of TODO list.
+
+# Exit if keep set
+dokeep
+
+# Remove the test directory, but first change out of it.
+if $TIMING; then
+    echo "exiting without removing test dir in order to preserve timing 
information."
+else
+    cd `dirname $TESTDIR`
+    rm -rf $TESTDIR
+fi
+
+# end of sanity.sh
Index: ccvs/src/server.c
diff -u /dev/null ccvs/src/server.c:1.453.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/server.c   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,8418 @@
+/* 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
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program 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.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Validate API.  */
+#include "server.h"
+
+
+/* GNULIB */
+#include "getline.h"
+#include "getnline.h"
+#include "setenv.h"
+#include "wait.h"
+
+/* CVS */
+#include "base.h"
+#include "buffer.h"
+#include "gpg.h"
+
+#include "cvs.h"
+#include "edit.h"
+#include "fileattr.h"
+#include "watch.h"
+
+int server_active = 0;
+
+#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
+
+# include "log-buffer.h"
+# include "ms-buffer.h"
+#endif /* defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) */
+
+#if defined (HAVE_GSSAPI) && defined (SERVER_SUPPORT)
+# include "canon-host.h"
+# include "gssapi-client.h"
+
+/* This stuff isn't included solely with SERVER_SUPPORT since some of these
+ * functions (encryption & the like) get compiled with or without server
+ * support.
+ *
+ * FIXME - They should be in a different file.
+ */
+/* We use Kerberos 5 routines to map the GSSAPI credential to a user
+   name.  */
+# include <krb5.h>
+
+static void gserver_authenticate_connection (void);
+
+/* Whether we are already wrapping GSSAPI communication.  */
+static int cvs_gssapi_wrapping;
+
+#endif /* defined (HAVE_GSSAPI) && defined (SERVER_SUPPORT) */
+
+#ifdef SERVER_SUPPORT
+
+extern char *server_hostname;
+
+# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS) || defined 
(HAVE_GSSAPI)
+#   include <sys/socket.h>
+# endif
+
+# ifdef HAVE_SYSLOG_H
+#   include <syslog.h>
+#   ifndef LOG_DAEMON   /* for ancient syslogs */
+#     define LOG_DAEMON 0
+#   endif
+# endif /* HAVE_SYSLOG_H */
+
+# ifdef HAVE_KERBEROS
+#   include <netinet/in.h>
+#   include <krb.h>
+#   ifndef HAVE_KRB_GET_ERR_TEXT
+#     define krb_get_err_text(status) krb_err_txt[status]
+#   endif
+
+/* Information we need if we are going to use Kerberos encryption.  */
+static C_Block kblock;
+static Key_schedule sched;
+
+# endif /* HAVE_KERBEROS */
+
+/* for select */
+# include "xselect.h"
+
+# ifndef O_NONBLOCK
+#   define O_NONBLOCK O_NDELAY
+# endif
+
+/* For initgroups().  */
+# if HAVE_INITGROUPS
+#   include <grp.h>
+# endif /* HAVE_INITGROUPS */
+
+# ifdef AUTH_SERVER_SUPPORT
+
+#   ifdef HAVE_GETSPNAM
+#     include <shadow.h>
+#   endif
+
+/* The cvs username sent by the client, which might or might not be
+   the same as the system username the server eventually switches to
+   run as.  CVS_Username gets set iff password authentication is
+   successful. */
+char *CVS_Username = NULL;
+
+/* Used to check that same repos is transmitted in pserver auth and in
+   later CVS protocol.  Exported because root.c also uses. */
+static char *Pserver_Repos = NULL;
+
+# endif /* AUTH_SERVER_SUPPORT */
+
+# ifdef HAVE_PAM
+#   include <netdb.h> /* getnameinfo */
+#   if defined(HAVE_SECURITY_PAM_APPL_H)
+#     include <security/pam_appl.h>
+#   elif defined(HAVE_PAM_PAM_APPL_H)
+#     include <pam/pam_appl.h>
+#   endif
+
+static pam_handle_t *pamh = NULL;
+
+static char *pam_username;
+static char *pam_password;
+# endif /* HAVE_PAM */
+
+
+
+/* While processing requests, this buffer accumulates data to be sent to
+   the client, and then once we are in do_cvs_command, we use it
+   for all the data to be sent.  */
+static struct buffer *buf_to_net;
+
+/* This buffer is used to read input from the client.  */
+static struct buffer *buf_from_net;
+static struct buffer *sig_buf;
+
+
+
+# ifdef PROXY_SUPPORT
+/* These are the secondary log buffers so that we can disable them after
+ * creation, when it is determined that they are unneeded, regardless of what
+ * other filters have been prepended to the buffer chain.
+ */
+static struct buffer *proxy_log;
+static struct buffer *proxy_log_out;
+
+/* Set while we are reprocessing a log so that we can avoid sending responses
+ * to some requests twice.
+ */
+static bool reprocessing;
+# endif /* PROXY_SUPPORT */
+
+
+
+/* Arguments storage for `Argument' & `Argumentx' requests.  */
+static int argument_count;
+static char **argument_vector;
+static int argument_vector_size;
+
+/*
+ * This is where we stash stuff we are going to use.  Format string
+ * which expects a single directory within it, starting with a slash.
+ */
+static char *server_temp_dir;
+
+/* This is the original value of server_temp_dir, before any possible
+   changes inserted by serve_max_dotdot.  */
+static char *orig_server_temp_dir;
+
+/* Nonzero if we should keep the temp directory around after we exit.  */
+static int dont_delete_temp;
+
+static void server_write_entries (void);
+
+cvsroot_t *referrer;
+
+
+
+/* Populate all of the directories between BASE_DIR and its relative
+   subdirectory DIR with CVSADM directories.  Return 0 for success or
+   errno value.  */
+static int
+create_adm_p (char *base_dir, char *dir)
+{
+    char *dir_where_cvsadm_lives, *dir_to_register, *p, *tmp;
+    int retval, done;
+    FILE *f;
+
+    if (strcmp (dir, ".") == 0)
+       return 0;                       /* nothing to do */
+
+    /* Allocate some space for our directory-munging string. */
+    p = xmalloc (strlen (dir) + 1);
+    if (p == NULL)
+       return ENOMEM;
+
+    dir_where_cvsadm_lives = xmalloc (strlen (base_dir) + strlen (dir) + 100);
+    if (dir_where_cvsadm_lives == NULL)
+    {
+       free (p);
+       return ENOMEM;
+    }
+
+    /* Allocate some space for the temporary string in which we will
+       construct filenames. */
+    tmp = xmalloc (strlen (base_dir) + strlen (dir) + 100);
+    if (tmp == NULL)
+    {
+       free (p);
+       free (dir_where_cvsadm_lives);
+       return ENOMEM;
+    }
+
+
+    /* We make several passes through this loop.  On the first pass,
+       we simply create the CVSADM directory in the deepest directory.
+       For each subsequent pass, we try to remove the last path
+       element from DIR, create the CVSADM directory in the remaining
+       pathname, and register the subdirectory in the newly created
+       CVSADM directory. */
+
+    retval = done = 0;
+
+    strcpy (p, dir);
+    strcpy (dir_where_cvsadm_lives, base_dir);
+    strcat (dir_where_cvsadm_lives, "/");
+    strcat (dir_where_cvsadm_lives, p);
+    dir_to_register = NULL;
+
+    while (1)
+    {
+       /* Create CVSADM. */
+       (void) sprintf (tmp, "%s/%s", dir_where_cvsadm_lives, CVSADM);
+       if ((CVS_MKDIR (tmp, 0777) < 0) && (errno != EEXIST))
+       {
+           retval = errno;
+           goto finish;
+       }
+
+       /* Create CVSADM_REP. */
+       (void) sprintf (tmp, "%s/%s", dir_where_cvsadm_lives, CVSADM_REP);
+       if (! isfile (tmp))
+       {
+           /* Use Emptydir as the placeholder until the client sends
+              us the real value.  This code is similar to checkout.c
+              (emptydir_name), but the code below returns errors
+              differently.  */
+
+           char *empty;
+           empty = xmalloc (strlen (current_parsed_root->directory)
+                           + sizeof (CVSROOTADM)
+                           + sizeof (CVSNULLREPOS)
+                           + 3);
+           if (! empty)
+           {
+               retval = ENOMEM;
+               goto finish;
+           }
+
+           /* Create the directory name. */
+           (void) sprintf (empty, "%s/%s/%s", current_parsed_root->directory,
+                           CVSROOTADM, CVSNULLREPOS);
+
+           /* Create the directory if it doesn't exist. */
+           if (! isfile (empty))
+           {
+               mode_t omask;
+               omask = umask (cvsumask);
+               if (CVS_MKDIR (empty, 0777) < 0)
+               {
+                   retval = errno;
+                   free (empty);
+                   goto finish;
+               }
+               (void) umask (omask);
+           }
+
+           f = CVS_FOPEN (tmp, "w");
+           if (f == NULL)
+           {
+               retval = errno;
+               free (empty);
+               goto finish;
+           }
+           /* Write the directory name to CVSADM_REP. */
+           if (fprintf (f, "%s\n", empty) < 0)
+           {
+               retval = errno;
+               fclose (f);
+               free (empty);
+               goto finish;
+           }
+           if (fclose (f) == EOF)
+           {
+               retval = errno;
+               free (empty);
+               goto finish;
+           }
+
+           /* Clean up after ourselves. */
+           free (empty);
+       }
+
+       /* Create CVSADM_ENT.  We open in append mode because we
+          don't want to clobber an existing Entries file.  */
+       (void) sprintf (tmp, "%s/%s", dir_where_cvsadm_lives, CVSADM_ENT);
+       f = CVS_FOPEN (tmp, "a");
+       if (f == NULL)
+       {
+           retval = errno;
+           goto finish;
+       }
+       if (fclose (f) == EOF)
+       {
+           retval = errno;
+           goto finish;
+       }
+
+       if (dir_to_register != NULL)
+       {
+           /* FIXME: Yes, this results in duplicate entries in the
+              Entries.Log file, but it doesn't currently matter.  We
+              might need to change this later on to make sure that we
+              only write one entry.  */
+
+           Subdir_Register (NULL, dir_where_cvsadm_lives, dir_to_register);
+       }
+
+       if (done)
+           break;
+
+       dir_to_register = strrchr (p, '/');
+       if (dir_to_register == NULL)
+       {
+           dir_to_register = p;
+           strcpy (dir_where_cvsadm_lives, base_dir);
+           done = 1;
+       }
+       else
+       {
+           *dir_to_register = '\0';
+           dir_to_register++;
+           strcpy (dir_where_cvsadm_lives, base_dir);
+           strcat (dir_where_cvsadm_lives, "/");
+           strcat (dir_where_cvsadm_lives, p);
+       }
+    }
+
+  finish:
+    free (tmp);
+    free (dir_where_cvsadm_lives);
+    free (p);
+    return retval;
+}
+
+
+
+/*
+ * Make directory DIR, including all intermediate directories if necessary.
+ * Returns 0 for success or errno code.
+ */
+static int
+mkdir_p (char *dir)
+{
+    char *p;
+    char *q = xmalloc (strlen (dir) + 1);
+    int retval;
+
+    if (q == NULL)
+       return ENOMEM;
+
+    retval = 0;
+
+    /*
+     * Skip over leading slash if present.  We won't bother to try to
+     * make '/'.
+     */
+    p = dir + 1;
+    while (1)
+    {
+       while (*p != '/' && *p != '\0')
+           ++p;
+       if (*p == '/')
+       {
+           strncpy (q, dir, p - dir);
+           q[p - dir] = '\0';
+           if (q[p - dir - 1] != '/'  &&  CVS_MKDIR (q, 0777) < 0)
+           {
+               int saved_errno = errno;
+
+               if (saved_errno != EEXIST
+                   && ((saved_errno != EACCES && saved_errno != EROFS)
+                       || !isdir (q)))
+               {
+                   retval = saved_errno;
+                   goto done;
+               }
+           }
+           ++p;
+       }
+       else
+       {
+           if (CVS_MKDIR (dir, 0777) < 0)
+               retval = errno;
+           goto done;
+       }
+    }
+  done:
+    free (q);
+    return retval;
+}
+
+
+
+/*
+ * Print the error response for error code STATUS.  The caller is
+ * reponsible for making sure we get back to the command loop without
+ * any further output occuring.
+ * Must be called only in contexts where it is OK to send output.
+ */
+static void
+print_error (int status)
+{
+    char *msg;
+    char tmpstr[80];
+
+    buf_output0 (buf_to_net, "error  ");
+    msg = strerror (status);
+    if (msg == NULL)
+    {
+       sprintf (tmpstr, "unknown error %d", status);
+       msg = tmpstr;
+    }
+    buf_output0 (buf_to_net, msg);
+    buf_append_char (buf_to_net, '\n');
+
+    buf_flush (buf_to_net, 0);
+}
+
+
+
+static int pending_error;
+/*
+ * Malloc'd text for pending error.  Each line must start with "E ".  The
+ * last line should not end with a newline.
+ */
+static char *pending_error_text;
+static char *pending_warning_text;
+
+/* If an error is pending, print it and return 1.  If not, return 0.
+   Also prints pending warnings, but this does not affect the return value.
+   Must be called only in contexts where it is OK to send output.  */
+static int
+print_pending_error (void)
+{
+    /* Check this case first since it usually means we are out of memory and
+     * the buffer output routines might try and allocate memory.
+     */
+    if (!pending_error_text && pending_error)
+    {
+       print_error (pending_error);
+       pending_error = 0;
+       return 1;
+    }
+
+    if (pending_warning_text)
+    {
+       buf_output0 (buf_to_net, pending_warning_text);
+       buf_append_char (buf_to_net, '\n');
+       buf_flush (buf_to_net, 0);
+
+       free (pending_warning_text);
+       pending_warning_text = NULL;
+    }
+
+    if (pending_error_text)
+    {
+       buf_output0 (buf_to_net, pending_error_text);
+       buf_append_char (buf_to_net, '\n');
+       if (pending_error)
+           print_error (pending_error);
+       else
+           buf_output0 (buf_to_net, "error  \n");
+
+       buf_flush (buf_to_net, 0);
+
+       pending_error = 0;
+       free (pending_error_text);
+       pending_error_text = NULL;
+       return 1;
+    }
+
+    return 0;
+}
+
+
+
+/* Is an error pending?  */
+# define error_pending() (pending_error || pending_error_text)
+# define warning_pending() (pending_warning_text)
+
+/* Allocate SIZE bytes for pending_error_text and return nonzero
+   if we could do it.  */
+static inline int
+alloc_pending_internal (char **dest, size_t size)
+{
+    *dest = malloc (size);
+    if (!*dest)
+    {
+       pending_error = ENOMEM;
+       return 0;
+    }
+    return 1;
+}
+
+
+
+/* Allocate SIZE bytes for pending_error_text and return nonzero
+   if we could do it.  */
+static int
+alloc_pending (size_t size)
+{
+    if (error_pending ())
+       /* Probably alloc_pending callers will have already checked for
+          this case.  But we might as well handle it if they don't, I
+          guess.  */
+       return 0;
+    return alloc_pending_internal (&pending_error_text, size);
+}
+
+
+
+/* Allocate SIZE bytes for pending_error_text and return nonzero
+   if we could do it.  */
+static int
+alloc_pending_warning (size_t size)
+{
+    if (warning_pending ())
+       /* Warnings can be lost here.  */
+       return 0;
+    return alloc_pending_internal (&pending_warning_text, size);
+}
+
+
+
+static int
+supported_response (char *name)
+{
+    struct response *rs;
+
+    for (rs = responses; rs->name != NULL; ++rs)
+       if (strcmp (rs->name, name) == 0)
+           return rs->status == rs_supported;
+    error (1, 0, "internal error: testing support for unknown response?");
+    /* NOTREACHED */
+    return 0;
+}
+
+
+
+/*
+ * Return true if we need to relay write requests to a primary server
+ * and false otherwise.
+ *
+ * NOTES
+ *
+ *   - primarily handles :ext: method as this seems most likely to be used in
+ *     practice.
+ *
+ *   - :fork: method is handled for testing.
+ *
+ *   - Could handle pserver too, but would have to store the password
+ *     the client sent us.
+ *
+ *
+ * GLOBALS
+ *   config->PrimaryServer
+ *                        The parsed setting from CVSROOT/config, if any, or
+ *                        NULL, otherwise.
+ *   current_parsed_root  The current repository.
+ *
+ * RETURNS
+ *   true                 If this server is configured as a secondary server.
+ *   false                Otherwise.
+ */
+static inline bool
+isProxyServer (void)
+{
+    assert (current_parsed_root);
+
+    /***
+     *** The following is done as a series of if/return combinations an an
+     *** optimization.
+     ***/
+
+    /* If there is no primary server defined in CVSROOT/config, then we can't
+     * be a secondary.
+     */
+    if (!config || !config->PrimaryServer) return false;
+
+    /* The directory must not match for all methods.  */
+    if (!isSamePath (config->PrimaryServer->directory,
+                    current_parsed_root->directory))
+       return true;
+
+    /* Only the directory is important for fork.  */
+    if (config->PrimaryServer->method == fork_method)
+       return false;
+
+    /* Must be :ext: method, then.  This is enforced when CVSROOT/config is
+     * parsed.
+     */
+    assert (config->PrimaryServer->isremote);
+
+    if (isThisHost (config->PrimaryServer->hostname))
+       return false;
+
+    return true;
+}
+
+
+
+static void
+serve_valid_responses (char *arg)
+{
+    char *p = arg;
+    char *q;
+    struct response *rs;
+
+# ifdef PROXY_SUPPORT
+    /* Process this in the first pass since the data it gathers can be used
+     * prior to a `Root' request.
+     */
+    if (reprocessing) return;
+# endif /* PROXY_SUPPORT */
+
+    do
+    {
+       q = strchr (p, ' ');
+       if (q != NULL)
+           *q++ = '\0';
+       for (rs = responses; rs->name != NULL; ++rs)
+       {
+           if (strcmp (rs->name, p) == 0)
+               break;
+       }
+       if (rs->name == NULL)
+           /*
+            * It is a response we have never heard of (and thus never
+            * will want to use).  So don't worry about it.
+            */
+           ;
+       else
+           rs->status = rs_supported;
+       p = q;
+    } while (q != NULL);
+    for (rs = responses; rs->name != NULL; ++rs)
+    {
+       if (rs->status == rs_essential)
+       {
+           buf_output0 (buf_to_net, "E response `");
+           buf_output0 (buf_to_net, rs->name);
+           buf_output0 (buf_to_net, "' not supported by client\nerror  \n");
+
+           /* FIXME: This call to buf_flush could conceivably
+              cause deadlock, as noted in server_cleanup.  */
+           buf_flush (buf_to_net, 1);
+
+           exit (EXIT_FAILURE);
+       }
+       else if (rs->status == rs_optional)
+           rs->status = rs_not_supported;
+    }
+}
+
+
+
+/*
+ * Process IDs of the subprocess, or negative if that subprocess
+ * does not exist.
+ */
+static pid_t command_pid;
+
+static void
+outbuf_memory_error (struct buffer *buf)
+{
+    static const char msg[] = "E Fatal server error\n\
+error ENOMEM Virtual memory exhausted.\n";
+    if (command_pid > 0)
+       kill (command_pid, SIGTERM);
+
+    /*
+     * We have arranged things so that printing this now either will
+     * be valid, or the "E fatal error" line will get glommed onto the
+     * end of an existing "E" or "M" response.
+     */
+
+    /* If this gives an error, not much we could do.  syslog() it?  */
+    write (STDOUT_FILENO, msg, sizeof (msg) - 1);
+# ifdef HAVE_SYSLOG_H
+    syslog (LOG_DAEMON | LOG_ERR, "virtual memory exhausted");
+# endif /* HAVE_SYSLOG_H */
+    exit (EXIT_FAILURE);
+}
+
+
+
+static void
+input_memory_error (struct buffer *buf)
+{
+    outbuf_memory_error (buf);
+}
+
+
+
+# ifdef PROXY_SUPPORT
+/* This function rewinds the net connection using the write proxy log file.
+ *
+ * GLOBALS
+ *   proxy_log The buffer object containing the write proxy log.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+static void
+rewind_buf_from_net (void)
+{
+    struct buffer *log;
+
+    assert (proxy_log);
+
+    /* Free the arguments since we processed some of them in the first pass.
+     */
+    {
+       /* argument_vector[0] is a dummy argument, we don't mess with
+        * it.
+        */
+       char **cp;
+       for (cp = argument_vector + 1;
+            cp < argument_vector + argument_count;
+            ++cp)
+           free (*cp);
+
+       argument_count = 1;
+    }
+
+    log = log_buffer_rewind (proxy_log);
+    proxy_log = NULL;
+    /* Dispose of any read but unused data in the net buffer since it will
+     * already be in the log.
+     */
+    buf_free_data (buf_from_net);
+    buf_from_net = ms_buffer_initialize (outbuf_memory_error, log,
+                                        buf_from_net);
+    reprocessing = true;
+}
+# endif /* PROXY_SUPPORT */
+
+
+
+char *gConfigPath;
+
+
+
+/*
+ * This request cannot be ignored by a potential secondary since it is used to
+ * determine if we _are_ a secondary.
+ */
+static void
+serve_root (char *arg)
+{
+    char *path;
+
+    TRACE (TRACE_FUNCTION, "serve_root (%s)", arg ? arg : "(null)");
+
+    /* Don't process this twice or when errors are pending.  */
+    if (error_pending()
+# ifdef PROXY_SUPPORT
+       || reprocessing
+# endif /* PROXY_SUPPORT */
+       ) return;
+
+    if (!ISABSOLUTE (arg))
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E Root %s must be an absolute pathname", arg);
+       return;
+    }
+
+    /* Sending "Root" twice is invalid.
+
+       The other way to handle a duplicate Root requests would be as a
+       request to clear out all state and start over as if it was a
+       new connection.  Doing this would cause interoperability
+       headaches, so it should be a different request, if there is
+       any reason why such a feature is needed.  */
+    if (current_parsed_root != NULL)
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E Protocol error: Duplicate Root request, for %s", arg);
+       return;
+    }
+
+    /* We need to check :ext: server here, :pserver: checks happen below. */
+    if (root_allow_used() && !root_allow_ok (arg)
+# ifdef AUTH_SERVER_SUPPORT
+       && Pserver_Repos == NULL
+# endif
+       )
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E Bad root %s", arg);
+       return;
+    }
+
+    /* Set original_parsed_root here, not because it can be changed in the
+     * client Redirect sense, but so we don't have to switch in code that
+     * runs in both modes to decide which to print.
+     */
+    original_parsed_root = current_parsed_root = local_cvsroot (arg);
+
+# ifdef AUTH_SERVER_SUPPORT
+    if (Pserver_Repos != NULL)
+    {
+       if (strcmp (Pserver_Repos, current_parsed_root->directory) != 0)
+       {
+           if (alloc_pending (80 + strlen (Pserver_Repos)
+                              + strlen (current_parsed_root->directory)))
+               /* The explicitness is to aid people who are writing clients.
+                  I don't see how this information could help an
+                  attacker.  */
+               sprintf (pending_error_text, "\
+E Protocol error: Root says \"%s\" but pserver says \"%s\"",
+                        current_parsed_root->directory, Pserver_Repos);
+           return;
+       }
+    }
+# endif
+
+    /* For pserver, this will already have happened, and the call will do
+       nothing.  But for rsh, we need to do it now.  */
+    config = get_root_allow_config (current_parsed_root->directory,
+                                   gConfigPath);
+
+# ifdef PROXY_SUPPORT
+    /* At this point we have enough information to determine if we are a
+     * secondary server or not.
+     */
+    if (proxy_log && !isProxyServer ())
+    {
+       /* Else we are not a secondary server.  There is no point in
+        * reprocessing since we handle all the requests we can receive
+        * before `Root' as we receive them.  But close the logs.
+        */
+       log_buffer_closelog (proxy_log);
+       log_buffer_closelog (proxy_log_out);
+       proxy_log = NULL;
+       /*
+        * Don't need this.  We assume it when proxy_log == NULL.
+        *
+        *   proxy_log_out = NULL;
+        */
+    }
+# endif /* PROXY_SUPPORT */
+
+    /* Now set the TMPDIR environment variable.  If it was set in the config
+     * file, we now know it.
+     */
+    push_env_temp_dir ();
+
+    /* OK, now figure out where we stash our temporary files.  */
+    {
+       char *p;
+
+       /* The code which wants to chdir into server_temp_dir is not set
+        * up to deal with it being a relative path.  So give an error
+        * for that case.
+        */
+       if (!ISABSOLUTE (get_cvs_tmp_dir ()))
+       {
+           if (alloc_pending (80 + strlen (get_cvs_tmp_dir ())))
+               sprintf (pending_error_text,
+                        "E Value of %s for TMPDIR is not absolute",
+                        get_cvs_tmp_dir ());
+
+           /* FIXME: we would like this error to be persistent, that
+            * is, not cleared by print_pending_error.  The current client
+            * will exit as soon as it gets an error, but the protocol spec
+            * does not require a client to do so.
+            */
+       }
+       else
+       {
+           int status;
+           int i = 0;
+
+           server_temp_dir = xmalloc (strlen (get_cvs_tmp_dir ()) + 80);
+           if (!server_temp_dir)
+           {
+               /* Strictly speaking, we're not supposed to output anything
+                * now.  But we're about to exit(), give it a try.
+                */
+               printf ("E Fatal server error, aborting.\n\
+error ENOMEM Virtual memory exhausted.\n");
+
+               exit (EXIT_FAILURE);
+           }
+           strcpy (server_temp_dir, get_cvs_tmp_dir ());
+
+           /* Remove a trailing slash from TMPDIR if present.  */
+           p = server_temp_dir + strlen (server_temp_dir) - 1;
+           if (*p == '/')
+               *p = '\0';
+
+           /* I wanted to use cvs-serv/PID, but then you have to worry about
+            * the permissions on the cvs-serv directory being right.  So
+            * use cvs-servPID.
+            */
+           strcat (server_temp_dir, "/cvs-serv");
+
+           p = server_temp_dir + strlen (server_temp_dir);
+           sprintf (p, "%ld", (long) getpid ());
+
+           orig_server_temp_dir = server_temp_dir;
+
+           /* Create the temporary directory, and set the mode to
+            * 700, to discourage random people from tampering with
+            * it.
+            */
+           while ((status = mkdir_p (server_temp_dir)) == EEXIST)
+           {
+               static const char suffix[] = "abcdefghijklmnopqrstuvwxyz";
+
+               if (i >= sizeof suffix - 1) break;
+               if (i == 0) p = server_temp_dir + strlen (server_temp_dir);
+               p[0] = suffix[i++];
+               p[1] = '\0';
+           }
+           if (status)
+           {
+               if (alloc_pending (80 + strlen (server_temp_dir)))
+                   sprintf (pending_error_text,
+                           "E can't create temporary directory %s",
+                           server_temp_dir);
+               pending_error = status;
+           }
+#ifndef CHMOD_BROKEN
+           else if (chmod (server_temp_dir, S_IRWXU) < 0)
+           {
+               int save_errno = errno;
+               if (alloc_pending (80 + strlen (server_temp_dir)))
+                   sprintf (pending_error_text,
+"E cannot change permissions on temporary directory %s",
+                            server_temp_dir);
+               pending_error = save_errno;
+           }
+#endif
+           else if (CVS_CHDIR (server_temp_dir) < 0)
+           {
+               int save_errno = errno;
+               if (alloc_pending (80 + strlen (server_temp_dir)))
+                   sprintf (pending_error_text,
+"E cannot change to temporary directory %s",
+                            server_temp_dir);
+               pending_error = save_errno;
+           }
+       }
+    }
+
+    /* Now that we have a config, verify our compression level.  Since 
+     * most clients do not send Gzip-stream requests until after the root
+     * request, wait until the first request following Root to verify that
+     * compression is being used when level 0 is not allowed.
+     */
+    if (gzip_level)
+    {
+       bool forced = false;
+
+       if (gzip_level < config->MinCompressionLevel)
+       {
+           gzip_level = config->MinCompressionLevel;
+           forced = true;
+       }
+
+       if (gzip_level > config->MaxCompressionLevel)
+       {
+           gzip_level = config->MaxCompressionLevel;
+           forced = true;
+       }
+
+       if (forced && !quiet
+           && alloc_pending_warning (120 + strlen (program_name)))
+           sprintf (pending_warning_text,
+"E %s server: Forcing compression level %d (allowed: %d <= z <= %d).",
+                    program_name, gzip_level, config->MinCompressionLevel,
+                    config->MaxCompressionLevel);
+    }
+
+    path = xmalloc (strlen (current_parsed_root->directory)
+                  + sizeof (CVSROOTADM)
+                  + 2);
+    if (path == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    (void) sprintf (path, "%s/%s", current_parsed_root->directory, CVSROOTADM);
+    if (!isaccessible (path, R_OK | X_OK))
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (path)))
+           sprintf (pending_error_text, "E Cannot access %s", path);
+       pending_error = save_errno;
+    }
+    free (path);
+
+    setenv (CVSROOT_ENV, current_parsed_root->directory, 1);
+}
+
+
+
+static int max_dotdot_limit = 0;
+
+/* Is this pathname OK to recurse into when we are running as the server?
+   If not, call error() with a fatal error.  */
+void
+server_pathname_check (char *path)
+{
+    TRACE (TRACE_FUNCTION, "server_pathname_check (%s)",
+          path ? path : "(null)");
+
+    /* An absolute pathname is almost surely a path on the *client* machine,
+       and is unlikely to do us any good here.  It also is probably capable
+       of being a security hole in the anonymous readonly case.  */
+    if (ISABSOLUTE (path))
+       /* Giving an error is actually kind of a cop-out, in the sense
+          that it would be nice for "cvs co -d /foo/bar/baz" to work.
+          A quick fix in the server would be requiring Max-dotdot of
+          at least one if pathnames are absolute, and then putting
+          /abs/foo/bar/baz in the temp dir beside the /d/d/d stuff.
+          A cleaner fix in the server might be to decouple the
+          pathnames we pass back to the client from pathnames in our
+          temp directory (this would also probably remove the need
+          for Max-dotdot).  A fix in the client would have the client
+          turn it into "cd /foo/bar; cvs co -d baz" (more or less).
+          This probably has some problems with pathnames which appear
+          in messages.  */
+       error ( 1, 0,
+               "absolute pathnames invalid for server (specified `%s')",
+               path );
+    if (pathname_levels (path) > max_dotdot_limit)
+    {
+       /* Similar to the ISABSOLUTE case in security implications.  */
+       error (0, 0, "protocol error: `%s' contains more leading ..", path);
+       error (1, 0, "than the %d which Max-dotdot specified",
+              max_dotdot_limit);
+    }
+}
+
+
+
+/* Is file or directory REPOS an absolute pathname within the
+   current_parsed_root->directory?  If yes, return 0.  If no, set pending_error
+   and return 1.  */
+static int
+outside_root (char *repos)
+{
+    size_t repos_len = strlen (repos);
+    size_t root_len = strlen (current_parsed_root->directory);
+
+    /* ISABSOLUTE (repos) should always be true, but
+       this is a good security precaution regardless. -DRP
+     */
+    if (!ISABSOLUTE (repos))
+    {
+       if (alloc_pending (repos_len + 80))
+           sprintf (pending_error_text, "\
+E protocol error: %s is not absolute", repos);
+       return 1;
+    }
+
+    if (repos_len < root_len
+       || strncmp (current_parsed_root->directory, repos, root_len) != 0)
+    {
+    not_within:
+       if (alloc_pending (strlen (current_parsed_root->directory)
+                          + strlen (repos)
+                          + 80))
+           sprintf (pending_error_text, "\
+E protocol error: directory '%s' not within root '%s'",
+                    repos, current_parsed_root->directory);
+       return 1;
+    }
+    if (repos_len > root_len)
+    {
+       if (repos[root_len] != '/')
+           goto not_within;
+       if (pathname_levels (repos + root_len + 1) > 0)
+           goto not_within;
+    }
+    return 0;
+}
+
+
+
+/* Is file or directory FILE outside the current directory (that is, does
+   it contain '/')?  If no, return 0.  If yes, set pending_error
+   and return 1.  */
+static int
+outside_dir (char *file)
+{
+    if (strchr (file, '/') != NULL)
+    {
+       if (alloc_pending (strlen (file)
+                          + 80))
+           sprintf (pending_error_text, "\
+E protocol error: directory '%s' not within current directory",
+                    file);
+       return 1;
+    }
+    return 0;
+}
+
+
+
+/*
+ * Add as many directories to the temp directory as the client tells us it
+ * will use "..", so we never try to access something outside the temp
+ * directory via "..".
+ */
+static void
+serve_max_dotdot (char *arg)
+{
+    int lim = atoi (arg);
+    int i;
+    char *p;
+
+#ifdef PROXY_SUPPORT
+    if (proxy_log) return;
+#endif /* PROXY_SUPPORT */
+
+    if (lim < 0 || lim > 10000)
+       return;
+    p = xmalloc (strlen (server_temp_dir) + 2 * lim + 10);
+    if (p == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    strcpy (p, server_temp_dir);
+    for (i = 0; i < lim; ++i)
+       strcat (p, "/d");
+    if (server_temp_dir != orig_server_temp_dir)
+       free (server_temp_dir);
+    server_temp_dir = p;
+    max_dotdot_limit = lim;
+}
+
+
+
+static char *gDirname;
+static char *gupdate_dir;
+
+static void
+dirswitch (char *dir, char *repos)
+{
+    int status;
+    FILE *f;
+    size_t dir_len;
+
+    TRACE (TRACE_FUNCTION, "dirswitch (%s, %s)", dir ? dir : "(null)",
+          repos ? repos : "(null)");
+
+    server_write_entries ();
+
+    if (error_pending()) return;
+
+    /* Check for bad directory name.
+
+       FIXME: could/should unify these checks with server_pathname_check
+       except they need to report errors differently.  */
+    if (ISABSOLUTE (dir))
+    {
+       if (alloc_pending (80 + strlen (dir)))
+           sprintf ( pending_error_text,
+                     "E absolute pathnames invalid for server (specified 
`%s')",
+                     dir);
+       return;
+    }
+    if (pathname_levels (dir) > max_dotdot_limit)
+    {
+       if (alloc_pending (80 + strlen (dir)))
+           sprintf (pending_error_text,
+                    "E protocol error: `%s' has too many ..", dir);
+       return;
+    }
+
+    dir_len = strlen (dir);
+
+    /* Check for a trailing '/'.  This is not ISSLASH because \ in the
+       protocol is an ordinary character, not a directory separator (of
+       course, it is perhaps unwise to use it in directory names, but that
+       is another issue).  */
+    if (dir_len > 0
+       && dir[dir_len - 1] == '/')
+    {
+       if (alloc_pending (80 + dir_len))
+           sprintf (pending_error_text,
+                    "E protocol error: invalid directory syntax in %s", dir);
+       return;
+    }
+
+    if (gDirname != NULL)
+       free (gDirname);
+    if (gupdate_dir != NULL)
+       free (gupdate_dir);
+
+    if (!strcmp (dir, "."))
+       gupdate_dir = xstrdup ("");
+    else
+       gupdate_dir = xstrdup (dir);
+
+    gDirname = xmalloc (strlen (server_temp_dir) + dir_len + 40);
+    if (gDirname == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+
+    strcpy (gDirname, server_temp_dir);
+    strcat (gDirname, "/");
+    strcat (gDirname, dir);
+
+    status = mkdir_p (gDirname);
+    if (status != 0
+       && status != EEXIST)
+    {
+       if (alloc_pending (80 + strlen (gDirname)))
+           sprintf (pending_error_text, "E cannot mkdir %s", gDirname);
+       pending_error = status;
+       return;
+    }
+
+    /* We need to create adm directories in all path elements because
+       we want the server to descend them, even if the client hasn't
+       sent the appropriate "Argument xxx" command to match the
+       already-sent "Directory xxx" command.  See recurse.c
+       (start_recursion) for a big discussion of this.  */
+
+    status = create_adm_p (server_temp_dir, dir);
+    if (status != 0)
+    {
+       if (alloc_pending (80 + strlen (gDirname)))
+           sprintf (pending_error_text, "E cannot create_adm_p %s", gDirname);
+       pending_error = status;
+       return;
+    }
+
+    if ( CVS_CHDIR (gDirname) < 0)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (gDirname)))
+           sprintf (pending_error_text, "E cannot change to %s", gDirname);
+       pending_error = save_errno;
+       return;
+    }
+    /*
+     * This is pretty much like calling Create_Admin, but Create_Admin doesn't
+     * report errors in the right way for us.
+     */
+    if ((CVS_MKDIR (CVSADM, 0777) < 0) && (errno != EEXIST))
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (gDirname) + strlen (CVSADM)))
+           sprintf (pending_error_text,
+                    "E cannot mkdir %s/%s", gDirname, CVSADM);
+       pending_error = save_errno;
+       return;
+    }
+
+    /* The following will overwrite the contents of CVSADM_REP.  This
+       is the correct behavior -- mkdir_p may have written a
+       placeholder value to this file and we need to insert the
+       correct value. */
+
+    f = CVS_FOPEN (CVSADM_REP, "w");
+    if (f == NULL)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (gDirname) + strlen (CVSADM_REP)))
+           sprintf (pending_error_text,
+                    "E cannot open %s/%s", gDirname, CVSADM_REP);
+       pending_error = save_errno;
+       return;
+    }
+    if (fprintf (f, "%s", repos) < 0)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (gDirname) + strlen (CVSADM_REP)))
+           sprintf (pending_error_text,
+                    "E error writing %s/%s", gDirname, CVSADM_REP);
+       pending_error = save_errno;
+       fclose (f);
+       return;
+    }
+    /* Non-remote CVS handles a module representing the entire tree
+       (e.g., an entry like ``world -a .'') by putting /. at the end
+       of the Repository file, so we do the same.  */
+    if (strcmp (dir, ".") == 0
+       && current_parsed_root != NULL
+       && current_parsed_root->directory != NULL
+       && strcmp (current_parsed_root->directory, repos) == 0)
+    {
+       if (fprintf (f, "/.") < 0)
+       {
+           int save_errno = errno;
+           if (alloc_pending (80 + strlen (gDirname) + strlen (CVSADM_REP)))
+               sprintf (pending_error_text,
+                        "E error writing %s/%s", gDirname, CVSADM_REP);
+           pending_error = save_errno;
+           fclose (f);
+           return;
+       }
+    }
+    if (fprintf (f, "\n") < 0)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (gDirname) + strlen (CVSADM_REP)))
+           sprintf (pending_error_text,
+                    "E error writing %s/%s", gDirname, CVSADM_REP);
+       pending_error = save_errno;
+       fclose (f);
+       return;
+    }
+    if (fclose (f) == EOF)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (gDirname) + strlen (CVSADM_REP)))
+           sprintf (pending_error_text,
+                    "E error closing %s/%s", gDirname, CVSADM_REP);
+       pending_error = save_errno;
+       return;
+    }
+    /* We open in append mode because we don't want to clobber an
+       existing Entries file.  */
+    f = CVS_FOPEN (CVSADM_ENT, "a");
+    if (f == NULL)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_ENT)))
+           sprintf (pending_error_text, "E cannot open %s", CVSADM_ENT);
+       pending_error = save_errno;
+       return;
+    }
+    if (fclose (f) == EOF)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_ENT)))
+           sprintf (pending_error_text, "E cannot close %s", CVSADM_ENT);
+       pending_error = save_errno;
+       return;
+    }
+}
+
+
+
+static void
+serve_repository (char *arg)
+{
+# ifdef PROXY_SUPPORT
+    assert (!proxy_log);
+# endif /* PROXY_SUPPORT */
+
+    if (alloc_pending (80))
+       strcpy (pending_error_text,
+               "E Repository request is obsolete; aborted");
+    return;
+}
+
+
+
+static void
+serve_directory (char *arg)
+{
+    int status;
+    char *repos;
+
+    TRACE (TRACE_FUNCTION, "serve_directory (%s)", arg ? arg : "(null)");
+
+
+    /* The data needs to be read into the secondary log regardless, but
+     * processing of anything other than errors is skipped until later.
+     */
+    status = buf_read_line (buf_from_net, &repos, NULL);
+    if (status == 0)
+    {
+       if (!ISABSOLUTE (repos))
+       {
+           /* Make absolute.
+            *
+            * FIXME: This is kinda hacky - we should probably only ever store
+            * and pass SHORT_REPOS (perhaps with the occassional exception
+            * for optimizations, but many, many functions end up
+            * deconstructing REPOS to gain SHORT_REPOS anyhow) - the
+            * CVSROOT portion of REPOS is redundant with
+            * current_parsed_root->directory - but since this is the way
+            * things have always been done, changing this will likely involve
+            * a major overhaul.
+            */
+           char *short_repos;
+
+           short_repos = repos;
+           repos = Xasprintf ("%s/%s",
+                             current_parsed_root->directory, short_repos);
+           free (short_repos);
+       }
+       else
+           repos = xstrdup (primary_root_translate (repos));
+
+       if (
+# ifdef PROXY_SUPPORT
+           !proxy_log &&
+# endif /* PROXY_SUPPORT */
+           !outside_root (repos))
+           dirswitch (arg, repos);
+       free (repos);
+    }
+    else if (status == -2)
+    {
+       pending_error = ENOMEM;
+    }
+    else if (status != 0)
+    {
+       pending_error_text = xmalloc (80 + strlen (arg));
+       if (pending_error_text == NULL)
+       {
+           pending_error = ENOMEM;
+       }
+       else if (status == -1)
+       {
+           sprintf (pending_error_text,
+                    "E end of file reading mode for %s", arg);
+       }
+       else
+       {
+           sprintf (pending_error_text,
+                    "E error reading mode for %s", arg);
+           pending_error = status;
+       }
+    }
+}
+
+
+
+static void
+serve_static_directory (char *arg)
+{
+    FILE *f;
+
+    if (error_pending ()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       ) return;
+
+    f = CVS_FOPEN (CVSADM_ENTSTAT, "w+");
+    if (f == NULL)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_ENTSTAT)))
+           sprintf (pending_error_text, "E cannot open %s", CVSADM_ENTSTAT);
+       pending_error = save_errno;
+       return;
+    }
+    if (fclose (f) == EOF)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_ENTSTAT)))
+           sprintf (pending_error_text, "E cannot close %s", CVSADM_ENTSTAT);
+       pending_error = save_errno;
+       return;
+    }
+}
+
+
+
+static void
+serve_sticky (char *arg)
+{
+    FILE *f;
+
+    if (error_pending ()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       ) return;
+
+    f = CVS_FOPEN (CVSADM_TAG, "w+");
+    if (f == NULL)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_TAG)))
+           sprintf (pending_error_text, "E cannot open %s", CVSADM_TAG);
+       pending_error = save_errno;
+       return;
+    }
+    if (fprintf (f, "%s\n", arg) < 0)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_TAG)))
+           sprintf (pending_error_text, "E cannot write to %s", CVSADM_TAG);
+       pending_error = save_errno;
+       return;
+    }
+    if (fclose (f) == EOF)
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_TAG)))
+           sprintf (pending_error_text, "E cannot close %s", CVSADM_TAG);
+       pending_error = save_errno;
+       return;
+    }
+}
+
+
+
+/*
+ * Read SIZE bytes from buf_from_net, write them to FILE.
+ *
+ * Currently this isn't really used for receiving parts of a file --
+ * the file is still sent over in one chunk.  But if/when we get
+ * spiffy in-process gzip support working, perhaps the compressed
+ * pieces could be sent over as they're ready, if the network is fast
+ * enough.  Or something.
+ */
+static void
+receive_partial_file (size_t size, int file)
+{
+    while (size > 0)
+    {
+       int status;
+       size_t nread;
+       char *data;
+
+       status = buf_read_data (buf_from_net, size, &data, &nread);
+       if (status != 0)
+       {
+           if (status == -2)
+               pending_error = ENOMEM;
+           else
+           {
+               pending_error_text = xmalloc (80);
+               if (pending_error_text == NULL)
+                   pending_error = ENOMEM;
+               else if (status == -1)
+               {
+                   sprintf (pending_error_text,
+                            "E premature end of file from client");
+                   pending_error = 0;
+               }
+               else
+               {
+                   sprintf (pending_error_text,
+                            "E error reading from client");
+                   pending_error = status;
+               }
+           }
+           return;
+       }
+
+       size -= nread;
+
+       while (nread > 0)
+       {
+           ssize_t nwrote;
+
+           nwrote = write (file, data, nread);
+           if (nwrote < 0)
+           {
+               int save_errno = errno;
+               if (alloc_pending (40))
+                   strcpy (pending_error_text, "E unable to write");
+               pending_error = save_errno;
+
+               /* Read and discard the file data.  */
+               while (size > 0)
+               {
+                   int status;
+                   size_t nread;
+                   char *data;
+
+                   status = buf_read_data (buf_from_net, size, &data, &nread);
+                   if (status != 0)
+                       return;
+                   size -= nread;
+               }
+
+               return;
+           }
+           nread -= nwrote;
+           data += nwrote;
+       }
+    }
+}
+
+
+
+/* Receive SIZE bytes, write to filename FILE.  */
+static void
+receive_file (size_t size, char *file, int gzipped)
+{
+    int fd;
+    char *arg = file;
+
+    /* Write the file.  */
+    fd = CVS_OPEN (arg, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+    if (fd < 0)
+    {
+       int save_errno = errno;
+       if (alloc_pending (40 + strlen (arg)))
+           sprintf (pending_error_text, "E cannot open %s", arg);
+       pending_error = save_errno;
+       return;
+    }
+
+    if (gzipped)
+    {
+       /* Using gunzip_and_write isn't really a high-performance
+          approach, because it keeps the whole thing in memory
+          (contiguous memory, worse yet).  But it seems easier to
+          code than the alternative (and less vulnerable to subtle
+          bugs).  Given that this feature is mainly for
+          compatibility, that is the better tradeoff.  */
+
+       size_t toread = size;
+       char *filebuf;
+       char *p;
+
+       filebuf = xmalloc (size);
+       p = filebuf;
+       /* If NULL, we still want to read the data and discard it.  */
+
+       while (toread > 0)
+       {
+           int status;
+           size_t nread;
+           char *data;
+
+           status = buf_read_data (buf_from_net, toread, &data, &nread);
+           if (status != 0)
+           {
+               if (status == -2)
+                   pending_error = ENOMEM;
+               else
+               {
+                   pending_error_text = xmalloc (80);
+                   if (pending_error_text == NULL)
+                       pending_error = ENOMEM;
+                   else if (status == -1)
+                   {
+                       sprintf (pending_error_text,
+                                "E premature end of file from client");
+                       pending_error = 0;
+                   }
+                   else
+                   {
+                       sprintf (pending_error_text,
+                                "E error reading from client");
+                       pending_error = status;
+                   }
+               }
+               return;
+           }
+
+           toread -= nread;
+
+           if (filebuf != NULL)
+           {
+               memcpy (p, data, nread);
+               p += nread;
+           }
+       }
+       if (filebuf == NULL)
+       {
+           pending_error = ENOMEM;
+           goto out;
+       }
+
+       if (gunzip_and_write (fd, file, (unsigned char *) filebuf, size))
+       {
+           if (alloc_pending (80))
+               sprintf (pending_error_text,
+                        "E aborting due to compression error");
+       }
+       free (filebuf);
+    }
+    else
+       receive_partial_file (size, fd);
+
+    if (pending_error_text)
+    {
+       char *p = xrealloc (pending_error_text,
+                          strlen (pending_error_text) + strlen (arg) + 30);
+       if (p)
+       {
+           pending_error_text = p;
+           sprintf (p + strlen (p), ", file %s", arg);
+       }
+       /* else original string is supposed to be unchanged */
+    }
+
+ out:
+    if (close (fd) < 0 && !error_pending ())
+    {
+       int save_errno = errno;
+       if (alloc_pending (40 + strlen (arg)))
+           sprintf (pending_error_text, "E cannot close %s", arg);
+       pending_error = save_errno;
+       return;
+    }
+}
+
+
+
+/* Kopt for the next file sent in Modified or Is-modified.  */
+static char *kopt;
+
+/* Timestamp (Checkin-time) for next file sent in Modified or
+   Is-modified.  */
+static int checkin_time_valid;
+static time_t checkin_time;
+
+
+
+/*
+ * Used to keep track of Entry requests.
+ */
+struct an_entry {
+    struct an_entry *next;
+    char *entry;
+};
+
+static struct an_entry *entries;
+
+static void
+serve_is_modified (char *arg)
+{
+    struct an_entry *p;
+    char *name;
+    char *cp;
+    char *timefield;
+    /* Have we found this file in "entries" yet.  */
+    int found;
+
+    if (error_pending ()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       ) return;
+
+    if (outside_dir (arg))
+       return;
+
+    /* Rewrite entries file to have `M' in timestamp field.  */
+    found = 0;
+    for (p = entries; p != NULL; p = p->next)
+    {
+       name = p->entry + 1;
+       cp = strchr (name, '/');
+       if (cp != NULL
+           && strlen (arg) == cp - name
+           && strncmp (arg, name, cp - name) == 0)
+       {
+           if (!(timefield = strchr (cp + 1, '/')) || *++timefield == '\0')
+           {
+               /* We didn't find the record separator or it is followed by
+                * the end of the string, so just exit.
+                */
+               if (alloc_pending (80))
+                   sprintf (pending_error_text,
+                            "E Malformed Entry encountered.");
+               return;
+           }
+           /* If the time field is not currently empty, then one of
+            * serve_modified, serve_is_modified, & serve_unchanged were
+            * already called for this file.  We would like to ignore the
+            * reinvocation silently or, better yet, exit with an error
+            * message, but we just avoid the copy-forward and overwrite the
+            * value from the last invocation instead.  See the comment below
+            * for more.
+            */
+           if (*timefield == '/')
+           {
+               /* Copy forward one character.  Space was allocated for this
+                * already in serve_entry().  */
+               cp = timefield + strlen (timefield);
+               cp[1] = '\0';
+               while (cp > timefield)
+               {
+                   *cp = cp[-1];
+                   --cp;
+               }
+
+               /* *timefield == '/';  */
+           }
+           /* If *TIMEFIELD wasn't '/' and wasn't '+', we assume that it was
+            * because of multiple calls to Is-modified & Unchanged by the
+            * client and just overwrite the value from the last call.
+            * Technically, we should probably either ignore calls after the
+            * first or send the client an error, since the client/server
+            * protocol specification specifies that only one call to either
+            * Is-Modified or Unchanged is allowed, but broken versions of
+            * CVSNT (at least 2.0.34 - 2.0.41, reported fixed in 2.0.41a) and
+            * the WinCVS & TortoiseCVS clients which depend on those broken
+            * versions of CVSNT (WinCVS 1.3 & at least one TortoiseCVS
+            * release) rely on this behavior.
+            */
+           if (*timefield != '+')
+               *timefield = 'M';
+
+           if (kopt != NULL)
+           {
+               if (alloc_pending (strlen (name) + 80))
+                   sprintf (pending_error_text,
+                            "E protocol error: both Kopt and Entry for %s",
+                            arg);
+               free (kopt);
+               kopt = NULL;
+               return;
+           }
+           found = 1;
+           break;
+       }
+    }
+    if (!found)
+    {
+       /* We got Is-modified but no Entry.  Add a dummy entry.
+          The "D" timestamp is what makes it a dummy.  */
+       p = xmalloc (sizeof (struct an_entry));
+       if (p == NULL)
+       {
+           pending_error = ENOMEM;
+           return;
+       }
+       p->entry = xmalloc (strlen (arg) + 80);
+       if (p->entry == NULL)
+       {
+           pending_error = ENOMEM;
+           free (p);
+           return;
+       }
+       strcpy (p->entry, "/");
+       strcat (p->entry, arg);
+       strcat (p->entry, "//D/");
+       if (kopt != NULL)
+       {
+           strcat (p->entry, kopt);
+           free (kopt);
+           kopt = NULL;
+       }
+       strcat (p->entry, "/");
+       p->next = entries;
+       entries = p;
+    }
+}
+
+
+
+static void
+serve_modified (char *arg)
+{
+    size_t size;
+    int read_size;
+    int status;
+    char *size_text;
+    char *mode_text;
+
+    int gzipped = 0;
+
+    /*
+     * This used to return immediately if error_pending () was true.
+     * However, that fails, because it causes each line of the file to
+     * be echoed back to the client as an unrecognized command.  The
+     * client isn't reading from the socket, so eventually both
+     * processes block trying to write to the other.  Now, we try to
+     * read the file if we can.
+     */
+
+    status = buf_read_line (buf_from_net, &mode_text, NULL);
+    if (status != 0)
+    {
+       if (status == -2)
+           pending_error = ENOMEM;
+       else
+       {
+           pending_error_text = xmalloc (80 + strlen (arg));
+           if (pending_error_text == NULL)
+               pending_error = ENOMEM;
+           else
+           {
+               if (status == -1)
+                   sprintf (pending_error_text,
+                            "E end of file reading mode for %s", arg);
+               else
+               {
+                   sprintf (pending_error_text,
+                            "E error reading mode for %s", arg);
+                   pending_error = status;
+               }
+           }
+       }
+       return;
+    }
+
+    status = buf_read_line (buf_from_net, &size_text, NULL);
+    if (status != 0)
+    {
+       if (status == -2)
+           pending_error = ENOMEM;
+       else
+       {
+           pending_error_text = xmalloc (80 + strlen (arg));
+           if (pending_error_text == NULL)
+               pending_error = ENOMEM;
+           else
+           {
+               if (status == -1)
+                   sprintf (pending_error_text,
+                            "E end of file reading size for %s", arg);
+               else
+               {
+                   sprintf (pending_error_text,
+                            "E error reading size for %s", arg);
+                   pending_error = status;
+               }
+           }
+       }
+       free (mode_text);
+       return;
+    }
+    if (size_text[0] == 'z')
+    {
+       gzipped = 1;
+       read_size = atoi (size_text + 1);
+    }
+    else
+       read_size = atoi (size_text);
+    free (size_text);
+
+    if (read_size < 0 && alloc_pending (80))
+    {
+       sprintf (pending_error_text,
+                "E client sent invalid (negative) file size");
+       return;
+    }
+    else
+       size = read_size;
+
+    if (error_pending ())
+    {
+       /* Now that we know the size, read and discard the file data.  */
+       while (size > 0)
+       {
+           int status;
+           size_t nread;
+           char *data;
+
+           status = buf_read_data (buf_from_net, size, &data, &nread);
+           if (status != 0)
+               return;
+           size -= nread;
+       }
+       free (mode_text);
+       return;
+    }
+
+    if (
+# ifdef PROXY_SUPPORT
+       !proxy_log &&
+# endif /* PROXY_SUPPORT */
+       outside_dir (arg))
+    {
+       free (mode_text);
+       return;
+    }
+
+    receive_file (size,
+# ifdef PROXY_SUPPORT
+                 proxy_log ? DEVNULL :
+# endif /* PROXY_SUPPORT */
+                             arg,
+                 gzipped);
+    if (error_pending ())
+    {
+       free (mode_text);
+       return;
+    }
+
+# ifdef PROXY_SUPPORT
+    /* We've read all the data that needed to be read if we're still logging
+     * for a secondary.  Return.
+     */
+    if (proxy_log) return;
+# endif /* PROXY_SUPPORT */
+
+    if (checkin_time_valid)
+    {
+       struct utimbuf t;
+
+       memset (&t, 0, sizeof (t));
+       t.modtime = t.actime = checkin_time;
+       if (utime (arg, &t) < 0)
+       {
+           int save_errno = errno;
+           if (alloc_pending (80 + strlen (arg)))
+               sprintf (pending_error_text, "E cannot utime %s", arg);
+           pending_error = save_errno;
+           free (mode_text);
+           return;
+       }
+       checkin_time_valid = 0;
+    }
+
+    {
+       int status = change_mode (arg, mode_text, 0);
+       free (mode_text);
+       if (status)
+       {
+           if (alloc_pending (40 + strlen (arg)))
+               sprintf (pending_error_text,
+                        "E cannot change mode for %s", arg);
+           pending_error = status;
+           return;
+       }
+    }
+
+    /* Make sure that the Entries indicate the right kopt.  We probably
+       could do this even in the non-kopt case and, I think, save a stat()
+       call in time_stamp_server.  But for conservatism I'm leaving the
+       non-kopt case alone.  */
+    if (kopt != NULL)
+       serve_is_modified (arg);
+
+    /* If an OpenPGP signature was sent for this file, write it to a temp
+     * file.
+     */
+    if (sig_buf)
+    {
+       char *sigfile_name, *sig_data;
+       int fd, rc;
+       size_t got;
+
+       /* Write the file.  */
+       sigfile_name = get_sigfile_name (arg);
+       fd = CVS_OPEN (sigfile_name, O_WRONLY | O_CREAT | O_TRUNC, 0600);
+       if (fd < 0)
+       {
+           int save_errno = errno;
+           if (alloc_pending (40 + strlen (arg)))
+               sprintf (pending_error_text, "E cannot open `%s'",
+                        sigfile_name);
+           pending_error = save_errno;
+           return;
+       }
+
+       while (!buf_empty_p (sig_buf))
+       {
+           if ((rc = buf_read_data (sig_buf, buf_length (sig_buf), &sig_data,
+                                    &got)))
+           {
+               /* Since !buf_empty_p confirmed that the buffer was not empty,
+                * it should be impossible to get EOF here.
+                */
+               assert (rc != -1);
+
+               if (rc == -2)
+                   pending_error = ENOMEM;
+               else if (alloc_pending (80))
+                   sprintf (pending_error_text,
+                            "E error reading signature buffer.");
+               pending_error = rc;
+               return;
+           }
+
+           if (write (fd, sig_data, got) < 0)
+           {
+               int save_errno = errno;
+               if (alloc_pending (80 + strlen (sigfile_name)))
+                   sprintf (pending_error_text,
+                            "E error writing temporary signature file `%s'.",
+                            sigfile_name);
+               pending_error = save_errno;
+               return;
+            }
+       }
+
+       if (close (fd) < 0 
+           && alloc_pending_warning (80 + strlen (sigfile_name)))
+           sprintf (pending_warning_text,
+                    "E error closing temporary signature file `%s'.",
+                    sigfile_name);
+       free (sigfile_name);
+
+       /* We're done with the SIG_BUF.  */
+       buf_free (sig_buf);
+       sig_buf = NULL;
+    }
+}
+
+
+
+static void
+serve_signature (char *arg)
+{
+    int status;
+
+    if (sig_buf)
+    {
+       if (alloc_pending (80))
+           sprintf (pending_error_text,
+"E Multiple Signature requests received for a single file.");
+    }
+    else
+       sig_buf = buf_nonio_initialize (NULL);
+
+    status = read_signature (buf_from_net, sig_buf);
+    if (status)
+    {
+       if (alloc_pending (80))
+           sprintf (pending_error_text,
+                    "E Malformed Signature encountered.");
+    }
+    return;
+}
+
+
+
+static void
+serve_enable_unchanged (char *arg)
+{
+# ifdef PROXY_SUPPORT
+    /* Might as well skip this since this function does nothing anyhow.  If
+     * it did do anything and could generate errors, then the line below would
+     * be necessary since this can be processed before a `Root' request.
+     *
+     *     if (reprocessing) return;
+     */
+# endif /* PROXY_SUPPORT */
+}
+
+
+
+static void
+serve_unchanged (char *arg)
+{
+    struct an_entry *p;
+    char *name;
+    char *cp;
+    char *timefield;
+
+    if (error_pending ()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       ) return;
+
+    if (outside_dir (arg))
+       return;
+
+    /* Rewrite entries file to have `=' in timestamp field.  */
+    for (p = entries; p != NULL; p = p->next)
+    {
+       name = p->entry + 1;
+       cp = strchr (name, '/');
+       if (cp != NULL
+           && strlen (arg) == cp - name
+           && strncmp (arg, name, cp - name) == 0)
+       {
+           if (!(timefield = strchr (cp + 1, '/')) || *++timefield == '\0')
+           {
+               /* We didn't find the record separator or it is followed by
+                * the end of the string, so just exit.
+                */
+               if (alloc_pending (80))
+                   sprintf (pending_error_text,
+                            "E Malformed Entry encountered.");
+               return;
+           }
+           /* If the time field is not currently empty, then one of
+            * serve_modified, serve_is_modified, & serve_unchanged were
+            * already called for this file.  We would like to ignore the
+            * reinvocation silently or, better yet, exit with an error
+            * message, but we just avoid the copy-forward and overwrite the
+            * value from the last invocation instead.  See the comment below
+            * for more.
+            */
+           if (*timefield == '/')
+           {
+               /* Copy forward one character.  Space was allocated for this
+                * already in serve_entry().  */
+               cp = timefield + strlen (timefield);
+               cp[1] = '\0';
+               while (cp > timefield)
+               {
+                   *cp = cp[-1];
+                   --cp;
+               }
+
+               /* *timefield == '/';  */
+           }
+           if (*timefield != '+')
+           {
+               /* '+' is a conflict marker and we don't want to mess with it
+                * until Version_TS catches it.
+                */
+               if (timefield[1] != '/')
+               {
+                   /* Obliterate anything else in TIMEFIELD.  This is again to
+                    * support the broken CVSNT clients mentioned below, in
+                    * conjunction with strict timestamp string boundry
+                    * checking in time_stamp_server() from vers_ts.c &
+                    * file_has_conflict() from subr.c, since the broken
+                    * clients used to send malformed timestamp fields in the
+                    * Entry request that they then depended on the subsequent
+                    * Unchanged request to overwrite.
+                    */
+                   char *d = timefield + 1;
+                   if ((cp = strchr (d, '/')))
+                   {
+                       while (*cp)
+                       {
+                           *d++ = *cp++;
+                       }
+                       *d = '\0';
+                   }
+               }
+               /* If *TIMEFIELD wasn't '/', we assume that it was because of
+                * multiple calls to Is-modified & Unchanged by the client and
+                * just overwrite the value from the last call.  Technically,
+                * we should probably either ignore calls after the first or
+                * send the client an error, since the client/server protocol
+                * specification specifies that only one call to either
+                * Is-Modified or Unchanged is allowed, but broken versions of
+                * CVSNT (at least 2.0.34 - 2.0.41, reported fixed in 2.0.41a)
+                * and the WinCVS & TortoiseCVS clients which depend on those
+                * broken versions of CVSNT (WinCVS 1.3 & at least one
+                * TortoiseCVS release) rely on this behavior.
+                */
+               *timefield = '=';
+           }
+           break;
+       }
+    }
+}
+
+
+
+static void
+serve_entry (char *arg)
+{
+    struct an_entry *p;
+    char *cp;
+    int i = 0;
+
+    if (error_pending()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       ) return;
+
+    /* Verify that the entry is well-formed.  This can avoid problems later.
+     * At the moment we only check that the Entry contains five slashes in
+     * approximately the correct locations since some of the code makes
+     * assumptions about this.
+     */
+    cp = arg;
+    if (*cp == 'D') cp++;
+    while (i++ < 5)
+    {
+       if (!cp || *cp != '/')
+       {
+           if (alloc_pending (80))
+               sprintf (pending_error_text,
+                        "E protocol error: Malformed Entry");
+           return;
+       }
+       cp = strchr (cp + 1, '/');
+    }
+
+    p = xmalloc (sizeof (struct an_entry));
+    if (p == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    /* Leave space for serve_unchanged to write '=' if it wants.  */
+    cp = xmalloc (strlen (arg) + 2);
+    if (cp == NULL)
+    {
+       free (p);
+       pending_error = ENOMEM;
+       return;
+    }
+    strcpy (cp, arg);
+    p->next = entries;
+    p->entry = cp;
+    entries = p;
+}
+
+
+
+static void
+serve_kopt (char *arg)
+{
+    if (error_pending ()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       )
+       return;
+
+    if (kopt != NULL)
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E protocol error: duplicate Kopt request: %s", arg);
+       return;
+    }
+
+    /* Do some sanity checks.  In particular, that it is not too long.
+       This lets the rest of the code not worry so much about buffer
+       overrun attacks.  Probably should call RCS_check_kflag here,
+       but that would mean changing RCS_check_kflag to handle errors
+       other than via exit(), fprintf(), and such.  */
+    if (strlen (arg) > 10)
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E protocol error: invalid Kopt request: %s", arg);
+       return;
+    }
+
+    kopt = xmalloc (strlen (arg) + 1);
+    if (kopt == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    strcpy (kopt, arg);
+}
+
+
+
+static void
+serve_checkin_time (char *arg)
+{
+    struct timespec t;
+
+    if (error_pending ()
+# ifdef PROXY_SUPPORT
+       || proxy_log
+# endif /* PROXY_SUPPORT */
+       )
+       return;
+
+    if (checkin_time_valid)
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E protocol error: duplicate Checkin-time request: %s",
+                    arg);
+       return;
+    }
+
+    if (!get_date (&t, arg, NULL))
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text, "E cannot parse date %s", arg);
+       return;
+    }
+
+    /* Truncate any nanoseconds returned by get_date().  */
+    checkin_time = t.tv_sec;
+    checkin_time_valid = 1;
+}
+
+
+
+static void
+server_write_entries (void)
+{
+    FILE *f;
+    struct an_entry *p;
+    struct an_entry *q;
+
+    if (entries == NULL)
+       return;
+
+    f = NULL;
+    /* Note that we free all the entries regardless of errors.  */
+    if (!error_pending ())
+    {
+       /* We open in append mode because we don't want to clobber an
+          existing Entries file.  If we are checking out a module
+          which explicitly lists more than one file in a particular
+          directory, then we will wind up calling
+          server_write_entries for each such file.  */
+       f = CVS_FOPEN (CVSADM_ENT, "a");
+       if (f == NULL)
+       {
+           int save_errno = errno;
+           if (alloc_pending (80 + strlen (CVSADM_ENT)))
+               sprintf (pending_error_text, "E cannot open %s", CVSADM_ENT);
+           pending_error = save_errno;
+       }
+    }
+    for (p = entries; p != NULL;)
+    {
+       if (!error_pending ())
+       {
+           if (fprintf (f, "%s\n", p->entry) < 0)
+           {
+               int save_errno = errno;
+               if (alloc_pending (80 + strlen(CVSADM_ENT)))
+                   sprintf (pending_error_text,
+                            "E cannot write to %s", CVSADM_ENT);
+               pending_error = save_errno;
+           }
+       }
+       free (p->entry);
+       q = p->next;
+       free (p);
+       p = q;
+    }
+    entries = NULL;
+    if (f != NULL && fclose (f) == EOF && !error_pending ())
+    {
+       int save_errno = errno;
+       if (alloc_pending (80 + strlen (CVSADM_ENT)))
+           sprintf (pending_error_text, "E cannot close %s", CVSADM_ENT);
+       pending_error = save_errno;
+    }
+}
+
+
+
+# ifdef PROXY_SUPPORT
+/*
+ * callback proc to run a script when admin finishes.
+ */
+static int
+prepost_proxy_proc (const char *repository, const char *filter, void *closure)
+{
+    char *cmdline;
+    bool *pre = closure;
+
+    /* %c = cvs_cmd_name
+     * %p = shortrepos
+     * %r = repository
+     */
+    TRACE (TRACE_FUNCTION, "prepost_proxy_proc (%s, %s, %s)", repository,
+          filter, *pre ? "pre" : "post");
+
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+# ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             0, ".",
+# endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             filter,
+                             "c", "s", cvs_cmd_name,
+                             "R", "s", referrer ? referrer->original : "NONE",
+                             "p", "s", ".",
+                             "r", "s", current_parsed_root->directory,
+                             "P", "s", config->PrimaryServer->original,
+                             (char *) NULL);
+
+    if (!cmdline || !strlen (cmdline))
+    {
+       if (cmdline) free (cmdline);
+       if (*pre)
+           error (0, 0, "preadmin proc resolved to the empty string!");
+       else
+           error (0, 0, "postadmin proc resolved to the empty string!");
+       return 1;
+    }
+
+    run_setup (cmdline);
+
+    free (cmdline);
+
+    /* FIXME - read the comment in verifymsg_proc() about why we use abs()
+     * below() and shouldn't.
+     */
+    return abs (run_exec (RUN_TTY, RUN_TTY, RUN_TTY,
+                         RUN_NORMAL | RUN_SIGIGNORE));
+}
+
+
+
+/* Become a secondary write proxy to a master server.
+ *
+ * This function opens the connection to the primary, dumps the secondary log
+ * to the primary, then reads data from any available connection and writes it
+ * to its partner:
+ *
+ *   buf_from_net -> buf_to_primary
+ *   buf_from_primary -> buf_to_net
+ *
+ * When all "from" connections have sent EOF and all data has been sent to
+ * "to" connections, this function closes the "to" pipes and returns.
+ */
+static void
+become_proxy (void)
+{
+    struct buffer *buf_to_primary;
+    struct buffer *buf_from_primary;
+
+    /* Close the client log and open it for read.  */
+    struct buffer *buf_clientlog = log_buffer_rewind (proxy_log_out);
+    int status, to_primary_fd, from_primary_fd, to_net_fd, from_net_fd;
+
+    /* Call presecondary script.  */
+    bool pre = true;
+
+           char *data;
+           size_t thispass, got;
+           int s;
+           char *newdata;
+
+    Parse_Info (CVSROOTADM_PREPROXY, current_parsed_root->directory,
+               prepost_proxy_proc, PIOPT_ALL, &pre);
+
+    /* Open connection to primary server.  */
+    open_connection_to_server (config->PrimaryServer, &buf_to_primary,
+                               &buf_from_primary);
+    setup_logfiles ("CVS_SECONDARY_LOG", &buf_to_primary, &buf_from_primary);
+    if ((status = set_nonblock (buf_from_primary)))
+       error (1, status, "failed to set nonblocking io from primary");
+    if ((status = set_nonblock (buf_from_net)))
+       error (1, status, "failed to set nonblocking io from client");
+    if ((status = set_nonblock (buf_to_primary)))
+       error (1, status, "failed to set nonblocking io to primary");
+    if ((status = set_nonblock (buf_to_net)))
+       error (1, status, "failed to set nonblocking io to client");
+
+    to_primary_fd = buf_get_fd (buf_to_primary);
+    from_primary_fd = buf_get_fd (buf_from_primary);
+    to_net_fd = buf_get_fd (buf_to_net);
+    assert (to_primary_fd >= 0 && from_primary_fd >= 0 && to_net_fd >= 0);
+
+    /* Close the client log and open it for read.  */
+    rewind_buf_from_net ();
+
+    while (from_primary_fd >= 0 || to_primary_fd >= 0)
+    {
+       fd_set readfds, writefds;
+       int status, numfds = -1;
+       struct timeval *timeout_ptr;
+       struct timeval timeout;
+       size_t toread;
+
+       FD_ZERO (&readfds);
+       FD_ZERO (&writefds);
+
+       /* The fd for a multi-source buffer can change with any read.  */
+       from_net_fd = buf_from_net ? buf_get_fd (buf_from_net) : -1;
+
+       if ((buf_from_net && !buf_empty_p (buf_from_net))
+           || (buf_from_primary && !buf_empty_p (buf_from_primary)))
+       {
+           /* There is data pending so don't block if we don't find any new
+            * data on the fds.
+            */
+           timeout.tv_sec = 0;
+           timeout.tv_usec = 0;
+           timeout_ptr = &timeout;
+       }
+       else
+           /* block indefinately */
+           timeout_ptr = NULL;
+
+       /* Set writefds if data is pending.  */
+       if (to_net_fd >= 0 && !buf_empty_p (buf_to_net))
+       {
+           FD_SET (to_net_fd, &writefds);
+           numfds = MAX (numfds, to_net_fd);
+       }
+       if (to_primary_fd >= 0 && !buf_empty_p (buf_to_primary))
+       {
+           FD_SET (to_primary_fd, &writefds);
+           numfds = MAX (numfds, to_primary_fd);
+       }
+
+       /* Set readfds if descriptors are still open.  */
+       if (from_net_fd >= 0)
+       {
+           FD_SET (from_net_fd, &readfds);
+           numfds = MAX (numfds, from_net_fd);
+       }
+       if (from_primary_fd >= 0)
+       {
+           FD_SET (from_primary_fd, &readfds);
+           numfds = MAX (numfds, from_primary_fd);
+       }
+
+       /* NUMFDS needs to be the highest descriptor + 1 according to the
+        * select spec.
+        */
+       numfds++;
+
+       do {
+           /* This used to select on exceptions too, but as far
+              as I know there was never any reason to do that and
+              SCO doesn't let you select on exceptions on pipes.  */
+           numfds = select (numfds, &readfds, &writefds,
+                            NULL, timeout_ptr);
+           if (numfds < 0 && errno != EINTR)
+           {
+               /* Sending an error to the client, possibly in the middle of a
+                * separate protocol message, will likely not mean much to the
+                * client, but it's better than nothing, I guess.
+                */
+               buf_output0 (buf_to_net, "E select failed\n");
+               print_error (errno);
+               exit (EXIT_FAILURE);
+           }
+       } while (numfds < 0);
+
+       if (numfds == 0)
+       {
+           FD_ZERO (&readfds);
+           FD_ZERO (&writefds);
+       }
+
+       if (to_net_fd >= 0 && FD_ISSET (to_net_fd, &writefds))
+       {
+           /* What should we do with errors?  syslog() them?  */
+           buf_send_output (buf_to_net);
+           buf_flush (buf_to_net, false);
+       }
+
+       status = 0;
+       if (from_net_fd >= 0 && (FD_ISSET (from_net_fd, &readfds)))
+           status = buf_input_data (buf_from_net, NULL);
+
+       if (buf_from_net && !buf_empty_p (buf_from_net))
+       {
+           if (buf_to_primary)
+               buf_append_buffer (buf_to_primary, buf_from_net);
+           else
+               /* (Sys?)log this?  */;
+               
+       }
+
+       if (status == -1 /* EOF */)
+       {
+           SIG_beginCrSect();
+           /* Need only to shut this down and set to NULL, really, in
+            * crit sec, to ensure no double-dispose and to make sure
+            * network pipes are closed as properly as possible, but I
+            * don't see much optimization potential in saving values and
+            * postponing the free.
+            */
+           buf_shutdown (buf_from_net);
+           buf_free (buf_from_net);
+           buf_from_net = NULL;
+           /* So buf_to_primary will be closed at the end of this loop.  */
+           from_net_fd = -1;
+           SIG_endCrSect();
+       }
+       else if (status > 0 /* ERRNO */)
+       {
+           buf_output0 (buf_to_net,
+                        "E buf_input_data failed reading from client\n");
+           print_error (status);
+           exit (EXIT_FAILURE);
+       }
+
+       if (to_primary_fd >= 0 && FD_ISSET (to_primary_fd, &writefds))
+       {
+           /* What should we do with errors?  syslog() them?  */
+           buf_send_output (buf_to_primary);
+           buf_flush (buf_to_primary, false);
+       }
+
+       status = 0;
+       if (from_primary_fd >= 0 && FD_ISSET (from_primary_fd, &readfds))
+           status = buf_input_data (buf_from_primary, &toread);
+
+       /* Avoid resending data from the server which we already sent to the
+        * client.  Otherwise clients get really confused.
+        */
+       if (buf_clientlog
+           && buf_from_primary && !buf_empty_p (buf_from_primary))
+       {
+           /* Dispose of data we already sent to the client.  */
+           while (buf_clientlog && toread > 0)
+           {
+               s = buf_read_data (buf_clientlog, toread, &data, &got);
+               if (s == -2)
+                   error (1, ENOMEM, "Failed to read data.");
+               if (s == -1)
+               {
+                   buf_shutdown (buf_clientlog);
+                   buf_clientlog = NULL;
+               }
+               else if (s)
+                   error (1, s, "Error reading writeproxy log.");
+               else
+               {
+                   thispass = got;
+                   while (thispass > 0)
+                   {
+                       /* No need to check for errors here since we know we
+                        * won't read more than buf_input read into
+                        * BUF_FROM_PRIMARY (see how TOREAD is set above).
+                        */
+                       buf_read_data (buf_from_primary, thispass, &newdata,
+                                      &got);
+                       /* Verify that we are throwing away what we think we
+                        * are.
+                        *
+                        * It is valid to assume that the secondary and primary
+                        * are closely enough in sync that this portion of the
+                        * communication will be in sync beacuse if they were
+                        * not, then the secondary might provide a
+                        * valid-request string to the client which contained a
+                        * request that the primary didn't support.  If the
+                        * client later used the request, the primary server
+                        * would exit anyhow.
+                        *
+                        * FIXME?
+                        * An alternative approach might be to make sure that
+                        * the secondary provides the same string as the
+                        * primary regardless, for purposes like pointing a
+                        * secondary at an unwitting primary, in which case it
+                        * might be useful to have some way to override the
+                        * valid-requests string on a secondary, but it seems
+                        * much easier to simply sync the versions, at the
+                        * moment.
+                        */
+                       if (memcmp (data, newdata, got))
+                           error (1, 0, "Secondary out of sync with primary!");
+                       data += got;
+                       thispass -= got;
+                   }
+                   toread -= got;
+               }
+           }
+       }
+
+       if (buf_from_primary && !buf_empty_p (buf_from_primary))
+       {
+           if (buf_to_net)
+               buf_append_buffer (buf_to_net, buf_from_primary);
+           else
+               /* (Sys?)log this?  */;
+               
+       }
+
+       if (status == -1 /* EOF */)
+       {
+           buf_shutdown (buf_from_primary);
+           buf_from_primary = NULL;
+           from_primary_fd = -1;
+       }
+       else if (status > 0 /* ERRNO */)
+       {
+           buf_output0 (buf_to_net,
+                        "E buf_input_data failed reading from primary\n");
+           print_error (status);
+           exit (EXIT_FAILURE);
+       }
+
+       /* If our "source pipe" is closed and all data has been sent, avoid
+        * selecting it for writability, but don't actually close the buffer in
+        * case other routines want to use it later.  The buffer will be closed
+        * in server_cleanup ().
+        */
+       if (from_primary_fd < 0
+           && buf_to_net && buf_empty_p (buf_to_net))
+           to_net_fd = -1;
+
+       if (buf_to_primary
+           && (/* Assume that there is no further reason to keep the buffer to
+                * the primary open if we can no longer read its responses.
+                */
+               (from_primary_fd < 0 && buf_to_primary)
+               /* Also close buf_to_primary when it becomes impossible to find
+                * more data to send to it.  We don't close buf_from_primary
+                * yet since there may be data pending or the primary may react
+                * to the EOF on its input pipe.
+                */
+               || (from_net_fd < 0 && buf_empty_p (buf_to_primary))))
+       {
+           buf_shutdown (buf_to_primary);
+           buf_free (buf_to_primary);
+           buf_to_primary = NULL;
+
+           /* Setting the fd < 0 with from_primary_fd already < 0 will cause
+            * an escape from this while loop.
+            */
+           to_primary_fd = -1;
+       }
+    }
+
+    /* Call postsecondary script.  */
+    pre = false;
+    Parse_Info (CVSROOTADM_POSTPROXY, current_parsed_root->directory,
+               prepost_proxy_proc, PIOPT_ALL, &pre);
+}
+# endif /* PROXY_SUPPORT */
+
+
+
+struct notify_note {
+    /* Directory in which this notification happens.  xmalloc'd*/
+    char *dir;
+
+    /* xmalloc'd.  */
+    char *update_dir;
+
+    /* xmalloc'd.  */
+    char *filename;
+
+    /* The following three all in one xmalloc'd block, pointed to by TYPE.
+       Each '\0' terminated.  */
+    /* "E" or "U".  */
+    char *type;
+    /* time+host+dir */
+    char *val;
+    char *watches;
+
+    struct notify_note *next;
+};
+
+static struct notify_note *notify_list;
+/* Used while building list, to point to the last node that already exists.  */
+static struct notify_note *last_node;
+
+static void
+serve_notify (char *arg)
+{
+    struct notify_note *new = NULL;
+    char *data = NULL;
+    int status;
+
+    if (error_pending ()) return;
+
+    if (isProxyServer())
+    {
+# ifdef PROXY_SUPPORT
+       if (!proxy_log)
+       {
+# endif /* PROXY_SUPPORT */
+           if (alloc_pending (160) + strlen (program_name))
+               sprintf (pending_error_text, 
+"E This CVS server does not support disconnected `%s edit'.  For now, remove 
all `%s' files in your workspace and try your command again.",
+                        program_name, CVSADM_NOTIFY);
+       return;
+# ifdef PROXY_SUPPORT
+       }
+       else
+       {
+           /* This is effectively a write command, so run it on the primary.  
*/
+           become_proxy ();
+           exit (EXIT_SUCCESS);
+       }
+# endif /* PROXY_SUPPORT */
+    }
+
+    if (outside_dir (arg))
+       return;
+
+    if (gDirname == NULL)
+       goto error;
+
+    new = xmalloc (sizeof (struct notify_note));
+    if (new == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    new->dir = xmalloc (strlen (gDirname) + 1);
+    new->update_dir = xmalloc (strlen (gupdate_dir) + 1);
+    new->filename = xmalloc (strlen (arg) + 1);
+    if (new->dir == NULL || new->update_dir == NULL || new->filename == NULL)
+    {
+       pending_error = ENOMEM;
+       if (new->dir != NULL)
+           free (new->dir);
+       free (new);
+       return;
+    }
+    strcpy (new->dir, gDirname);
+    strcpy (new->update_dir, gupdate_dir);
+    strcpy (new->filename, arg);
+
+    status = buf_read_line (buf_from_net, &data, NULL);
+    if (status != 0)
+    {
+       if (status == -2)
+           pending_error = ENOMEM;
+       else
+       {
+           pending_error_text = xmalloc (80 + strlen (arg));
+           if (pending_error_text == NULL)
+               pending_error = ENOMEM;
+           else
+           {
+               if (status == -1)
+                   sprintf (pending_error_text,
+                            "E end of file reading notification for %s", arg);
+               else
+               {
+                   sprintf (pending_error_text,
+                            "E error reading notification for %s", arg);
+                   pending_error = status;
+               }
+           }
+       }
+       free (new->filename);
+       free (new->dir);
+       free (new);
+    }
+    else
+    {
+       char *cp;
+
+       if (!data[0])
+           goto error;
+
+       if (strchr (data, '+'))
+           goto error;
+
+       new->type = data;
+       if (data[1] != '\t')
+           goto error;
+       data[1] = '\0';
+       cp = data + 2;
+       new->val = cp;
+       cp = strchr (cp, '\t');
+       if (cp == NULL)
+           goto error;
+       *cp++ = '+';
+       cp = strchr (cp, '\t');
+       if (cp == NULL)
+           goto error;
+       *cp++ = '+';
+       cp = strchr (cp, '\t');
+       if (cp == NULL)
+           goto error;
+       *cp++ = '\0';
+       new->watches = cp;
+       /* If there is another tab, ignore everything after it,
+          for future expansion.  */
+       cp = strchr (cp, '\t');
+       if (cp != NULL)
+           *cp = '\0';
+
+       new->next = NULL;
+
+       if (last_node == NULL)
+           notify_list = new;
+       else
+           last_node->next = new;
+       last_node = new;
+    }
+    return;
+  error:
+    pending_error = 0;
+    if (alloc_pending (80))
+       strcpy (pending_error_text,
+               "E Protocol error; misformed Notify request");
+    if (data != NULL)
+       free (data);
+    if (new != NULL)
+    {
+       free (new->filename);
+       free (new->update_dir);
+       free (new->dir);
+       free (new);
+    }
+    return;
+}
+
+
+
+static void
+serve_hostname (char *arg)
+{
+    free (hostname);
+    hostname = xstrdup (arg);
+    return;
+}
+
+
+
+static void
+serve_localdir (char *arg)
+{
+    if (CurDir) free (CurDir);
+    CurDir = xstrdup (arg);
+}
+
+
+
+/* Process all the Notify requests that we have stored up.  Returns 0
+   if successful, if not prints error message (via error()) and
+   returns negative value.  */
+static int
+server_notify (void)
+{
+    struct notify_note *p;
+    char *repos;
+
+    TRACE (TRACE_FUNCTION, "server_notify()");
+
+    while (notify_list != NULL)
+    {
+       if (CVS_CHDIR (notify_list->dir) < 0)
+       {
+           error (0, errno, "cannot change to %s", notify_list->dir);
+           return -1;
+       }
+       repos = Name_Repository (NULL, NULL);
+
+       lock_dir_for_write (repos);
+
+       fileattr_startdir (repos);
+
+       notify_do (*notify_list->type, notify_list->filename,
+                  notify_list->update_dir, getcaller(), notify_list->val,
+                  notify_list->watches, repos);
+
+       buf_output0 (buf_to_net, "Notified ");
+       {
+           char *dir = notify_list->dir + strlen (server_temp_dir) + 1;
+           if (dir[0] == '\0')
+               buf_append_char (buf_to_net, '.');
+           else
+               buf_output0 (buf_to_net, dir);
+           buf_append_char (buf_to_net, '/');
+           buf_append_char (buf_to_net, '\n');
+       }
+       buf_output0 (buf_to_net, repos);
+       buf_append_char (buf_to_net, '/');
+       buf_output0 (buf_to_net, notify_list->filename);
+       buf_append_char (buf_to_net, '\n');
+       free (repos);
+
+       p = notify_list->next;
+       free (notify_list->filename);
+       free (notify_list->dir);
+       free (notify_list->type);
+       free (notify_list);
+       notify_list = p;
+
+       fileattr_write ();
+       fileattr_free ();
+
+       Lock_Cleanup ();
+    }
+
+    last_node = NULL;
+
+    /* The code used to call fflush (stdout) here, but that is no
+       longer necessary.  The data is now buffered in buf_to_net,
+       which will be flushed by the caller, do_cvs_command.  */
+
+    return 0;
+}
+
+
+
+/* This request is processed in all passes since requests which must
+ * sometimes be processed before it is known whether we are running as a
+ * secondary or not, for instance the `expand-modules' request, sometimes use
+ * the `Arguments'.
+ */
+static void
+serve_argument (char *arg)
+{
+    char *p;
+
+    if (error_pending()) return;
+
+    if (argument_count >= 10000)
+    {
+       if (alloc_pending (80))
+           sprintf (pending_error_text, 
+                    "E Protocol error: too many arguments");
+       return;
+    }
+
+    if (argument_vector_size <= argument_count)
+    {
+       argument_vector_size *= 2;
+       argument_vector = xnrealloc (argument_vector,
+                                    argument_vector_size, sizeof (char *));
+       if (argument_vector == NULL)
+       {
+           pending_error = ENOMEM;
+           return;
+       }
+    }
+    p = xmalloc (strlen (arg) + 1);
+    if (p == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    strcpy (p, arg);
+    argument_vector[argument_count++] = p;
+}
+
+
+
+/* For secondary servers, this is handled in all passes, as is the `Argument'
+ * request, and for the same reasons.
+ */
+static void
+serve_argumentx (char *arg)
+{
+    char *p;
+
+    if (error_pending()) return;
+    
+    if (argument_count <= 1) 
+    {
+       if (alloc_pending (80))
+           sprintf (pending_error_text,
+"E Protocol error: called argumentx without prior call to argument");
+       return;
+    }
+
+    p = argument_vector[argument_count - 1];
+    p = xrealloc (p, strlen (p) + 1 + strlen (arg) + 1);
+    if (p == NULL)
+    {
+       pending_error = ENOMEM;
+       return;
+    }
+    strcat (p, "\n");
+    strcat (p, arg);
+    argument_vector[argument_count - 1] = p;
+}
+
+
+
+static void
+serve_global_option (char *arg)
+{
+# ifdef PROXY_SUPPORT
+    /* This can generate error messages and termination before `Root' requests,
+     * so it must be dealt with in the first pass.
+     */ 
+    if (reprocessing) return;
+# endif /* PROXY_SUPPORT */
+
+    if (arg[0] != '-' || arg[1] == '\0' || arg[2] != '\0')
+    {
+    error_return:
+       if (alloc_pending (strlen (arg) + 80))
+           sprintf (pending_error_text,
+                    "E Protocol error: bad global option %s",
+                    arg);
+       return;
+    }
+    switch (arg[1])
+    {
+       case 'l':
+           error(0, 0, "WARNING: global `-l' option ignored.");
+           break;
+       case 'n':
+           noexec = 1;
+           logoff = 1;
+           break;
+       case 'q':
+           quiet = 1;
+           break;
+       case 'r':
+           cvswrite = 0;
+           break;
+       case 'Q':
+           really_quiet = 1;
+           break;
+       case 't':
+           trace++;
+           break;
+       default:
+           goto error_return;
+    }
+}
+
+
+
+/* This needs to be processed before Root requests, so we allow it to be
+ * be processed before knowing whether we are running as a secondary server
+ * to allow `noop' and `Root' requests to generate errors as before.
+ */
+static void
+serve_set (char *arg)
+{
+# ifdef PROXY_SUPPORT
+    if (reprocessing) return;
+# endif /* PROXY_SUPPORT */
+
+    /* FIXME: This sends errors immediately (I think); they should be
+       put into pending_error.  */
+    variable_set (arg);
+}
+
+# ifdef ENCRYPTION
+
+#   ifdef HAVE_KERBEROS
+
+static void
+serve_kerberos_encrypt( char *arg )
+{
+#     ifdef PROXY_SUPPORT
+    assert (!proxy_log);
+#     endif /* PROXY_SUPPORT */
+
+    /* All future communication with the client will be encrypted.  */
+
+    buf_to_net = krb_encrypt_buffer_initialize (buf_to_net, 0, sched,
+                                               kblock,
+                                               buf_to_net->memory_error);
+    buf_from_net = krb_encrypt_buffer_initialize (buf_from_net, 1, sched,
+                                                 kblock,
+                                                 buf_from_net->memory_error);
+}
+
+#   endif /* HAVE_KERBEROS */
+
+#   ifdef HAVE_GSSAPI
+
+static void
+serve_gssapi_encrypt( char *arg )
+{
+#     ifdef PROXY_SUPPORT
+    assert (!proxy_log);
+#     endif /* PROXY_SUPPORT */
+
+    if (cvs_gssapi_wrapping)
+    {
+       /* We're already using a gssapi_wrap buffer for stream
+          authentication.  Flush everything we've output so far, and
+          turn on encryption for future data.  On the input side, we
+          should only have unwrapped as far as the Gssapi-encrypt
+          command, so future unwrapping will become encrypted.  */
+       buf_flush (buf_to_net, 1);
+       cvs_gssapi_encrypt = 1;
+       return;
+    }
+
+    /* All future communication with the client will be encrypted.  */
+
+    cvs_gssapi_encrypt = 1;
+
+    buf_to_net = cvs_gssapi_wrap_buffer_initialize (buf_to_net, 0,
+                                                   gcontext,
+                                                   buf_to_net->memory_error);
+    buf_from_net = cvs_gssapi_wrap_buffer_initialize (buf_from_net, 1,
+                                                     gcontext,
+                                                     
buf_from_net->memory_error);
+
+    cvs_gssapi_wrapping = 1;
+}
+
+#   endif /* HAVE_GSSAPI */
+
+# endif /* ENCRYPTION */
+
+# ifdef HAVE_GSSAPI
+
+static void
+serve_gssapi_authenticate (char *arg)
+{
+#   ifdef PROXY_SUPPORT
+    assert (!proxy_log);
+#   endif /* PROXY_SUPPORT */
+
+    if (cvs_gssapi_wrapping)
+    {
+       /* We're already using a gssapi_wrap buffer for encryption.
+          That includes authentication, so we don't have to do
+          anything further.  */
+       return;
+    }
+
+    buf_to_net = cvs_gssapi_wrap_buffer_initialize (buf_to_net, 0,
+                                                   gcontext,
+                                                   buf_to_net->memory_error);
+    buf_from_net = cvs_gssapi_wrap_buffer_initialize (buf_from_net, 1,
+                                                     gcontext,
+                                                     
buf_from_net->memory_error);
+
+    cvs_gssapi_wrapping = 1;
+}
+
+# endif /* HAVE_GSSAPI */
+
+
+
+# ifdef SERVER_FLOWCONTROL
+/* The maximum we'll queue to the remote client before blocking.  */
+#   ifndef SERVER_HI_WATER
+#     define SERVER_HI_WATER (2 * 1024 * 1024)
+#   endif /* SERVER_HI_WATER */
+/* When the buffer drops to this, we restart the child */
+#   ifndef SERVER_LO_WATER
+#     define SERVER_LO_WATER (1 * 1024 * 1024)
+#   endif /* SERVER_LO_WATER */
+# endif /* SERVER_FLOWCONTROL */
+
+
+
+static void
+serve_questionable (char *arg)
+{
+    static int initted;
+
+# ifdef PROXY_SUPPORT
+    if (proxy_log) return;
+# endif /* PROXY_SUPPORT */
+
+    if (error_pending ()) return;
+
+    if (!initted)
+    {
+       /* Pick up ignores from CVSROOTADM_IGNORE, $HOME/.cvsignore on server,
+          and CVSIGNORE on server.  */
+       ign_setup ();
+       initted = 1;
+    }
+
+    if (gDirname == NULL)
+    {
+       if (alloc_pending (80))
+           sprintf (pending_error_text,
+"E Protocol error: `Directory' missing");
+       return;
+    }
+
+    if (outside_dir (arg))
+       return;
+
+    if (!ign_name (arg))
+    {
+       char *update_dir;
+
+       buf_output (buf_to_net, "M ? ", 4);
+       update_dir = gDirname + strlen (server_temp_dir) + 1;
+       if (!(update_dir[0] == '.' && update_dir[1] == '\0'))
+       {
+           buf_output0 (buf_to_net, update_dir);
+           buf_output (buf_to_net, "/", 1);
+       }
+       buf_output0 (buf_to_net, arg);
+       buf_output (buf_to_net, "\n", 1);
+    }
+}
+
+
+
+static struct buffer *protocol = NULL;
+
+/* This is the output which we are saving up to send to the server, in the
+   child process.  We will push it through, via the `protocol' buffer, when
+   we have a complete line.  */
+static struct buffer *saved_output;
+
+/* Likewise, but stuff which will go to stderr.  */
+static struct buffer *saved_outerr;
+
+
+
+static void
+protocol_memory_error (struct buffer *buf)
+{
+    error (1, ENOMEM, "Virtual memory exhausted");
+}
+
+
+
+/* If command is valid, return 1.
+ * Else if command is invalid and croak_on_invalid is set, then die.
+ * Else just return 0 to indicate that command is invalid.
+ */
+static bool
+check_command_valid_p (char *cmd_name)
+{
+    /* Right now, only pserver notices invalid commands -- namely,
+     * write attempts by a read-only user.  Therefore, if CVS_Username
+     * is not set, this just returns 1, because CVS_Username unset
+     * means pserver is not active.
+     */
+# ifdef AUTH_SERVER_SUPPORT
+    if (CVS_Username == NULL)
+       return true;
+
+    if (lookup_command_attribute (cmd_name) & CVS_CMD_MODIFIES_REPOSITORY)
+    {
+       /* This command has the potential to modify the repository, so
+        * we check if the user have permission to do that.
+        *
+        * (Only relevant for remote users -- local users can do
+        * whatever normal Unix file permissions allow them to do.)
+        *
+        * The decision method:
+        *
+        *    If $CVSROOT/CVSADMROOT_READERS exists and user is listed
+        *    in it, then read-only access for user.
+        *
+        *    Or if $CVSROOT/CVSADMROOT_WRITERS exists and user NOT
+        *    listed in it, then also read-only access for user.
+        *
+        *    Else read-write access for user.
+        */
+
+        char *linebuf = NULL;
+        int num_red = 0;
+        size_t linebuf_len = 0;
+        char *fname;
+        size_t flen;
+        FILE *fp;
+        int found_it = 0;
+
+        /* else */
+        flen = strlen (current_parsed_root->directory)
+               + strlen (CVSROOTADM)
+               + strlen (CVSROOTADM_READERS)
+               + 3;
+
+        fname = xmalloc (flen);
+        (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
+                       CVSROOTADM, CVSROOTADM_READERS);
+
+        fp = fopen (fname, "r");
+
+        if (fp == NULL)
+        {
+            if (!existence_error (errno))
+            {
+                /* Need to deny access, so that attackers can't fool
+                   us with some sort of denial of service attack.  */
+                error (0, errno, "cannot open %s", fname);
+                free (fname);
+                return false;
+            }
+        }
+         else  /* successfully opened readers file */
+         {
+             while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
+             {
+                 /* Hmmm, is it worth importing my own readline
+                    library into CVS?  It takes care of chopping
+                    leading and trailing whitespace, "#" comments, and
+                    newlines automatically when so requested.  Would
+                    save some code here...  -kff */
+
+                 /* Chop newline by hand, for strcmp()'s sake. */
+                 if (num_red > 0 && linebuf[num_red - 1] == '\n')
+                     linebuf[num_red - 1] = '\0';
+
+                 if (strcmp (linebuf, CVS_Username) == 0)
+                     goto handle_invalid;
+             }
+            if (num_red < 0 && !feof (fp))
+                error (0, errno, "cannot read %s", fname);
+
+            /* If not listed specifically as a reader, then this user
+               has write access by default unless writers are also
+               specified in a file . */
+            if (fclose (fp) < 0)
+                error (0, errno, "cannot close %s", fname);
+        }
+        free (fname);
+
+        /* Now check the writers file.  */
+
+        flen = strlen (current_parsed_root->directory)
+               + strlen (CVSROOTADM)
+               + strlen (CVSROOTADM_WRITERS)
+               + 3;
+
+        fname = xmalloc (flen);
+        (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
+                       CVSROOTADM, CVSROOTADM_WRITERS);
+
+        fp = fopen (fname, "r");
+
+        if (fp == NULL)
+        {
+            if (linebuf)
+                free (linebuf);
+            if (existence_error (errno))
+            {
+                /* Writers file does not exist, so everyone is a writer,
+                   by default.  */
+                free (fname);
+                return true;
+            }
+            else
+            {
+                /* Need to deny access, so that attackers can't fool
+                   us with some sort of denial of service attack.  */
+                error (0, errno, "cannot read %s", fname);
+                free (fname);
+                return false;
+            }
+        }
+
+        found_it = 0;
+        while ((num_red = getline (&linebuf, &linebuf_len, fp)) >= 0)
+        {
+            /* Chop newline by hand, for strcmp()'s sake. */
+            if (num_red > 0 && linebuf[num_red - 1] == '\n')
+                linebuf[num_red - 1] = '\0';
+
+            if (strcmp (linebuf, CVS_Username) == 0)
+            {
+                found_it = 1;
+                break;
+            }
+        }
+        if (num_red < 0 && !feof (fp))
+            error (0, errno, "cannot read %s", fname);
+
+        if (found_it)
+        {
+            if (fclose (fp) < 0)
+                error (0, errno, "cannot close %s", fname);
+            if (linebuf)
+                free (linebuf);
+            free (fname);
+             return true;
+         }
+         else   /* writers file exists, but this user not listed in it */
+         {
+         handle_invalid:
+             if (fclose (fp) < 0)
+                error (0, errno, "cannot close %s", fname);
+            if (linebuf)
+                free (linebuf);
+            free (fname);
+            return false;
+        }
+    }
+# endif /* AUTH_SERVER_SUPPORT */
+
+    /* If ever reach end of this function, command must be valid. */
+    return true;
+}
+
+
+
+/* Execute COMMAND in a subprocess with the approriate funky things done.  */
+
+static struct fd_set_wrapper { fd_set fds; } command_fds_to_drain;
+# ifdef SUNOS_KLUDGE
+static int max_command_fd;
+# endif
+
+# ifdef SERVER_FLOWCONTROL
+static int flowcontrol_pipe[2];
+# endif /* SERVER_FLOWCONTROL */
+
+
+
+/*
+ * Set buffer FD to non-blocking I/O.  Returns 0 for success or errno
+ * code.
+ */
+int
+set_nonblock_fd (int fd)
+{
+# if defined (F_GETFL) && defined (O_NONBLOCK) && defined (F_SETFL)
+    int flags;
+
+    flags = fcntl (fd, F_GETFL, 0);
+    if (flags < 0)
+       return errno;
+    if (fcntl (fd, F_SETFL, flags | O_NONBLOCK) < 0)
+       return errno;
+# endif /* F_GETFL && O_NONBLOCK && F_SETFL */
+    return 0;
+}
+
+
+
+static void
+do_cvs_command (char *cmd_name, int (*command) (int, char **))
+{
+    /*
+     * The following file descriptors are set to -1 if that file is not
+     * currently open.
+     */
+
+    /* Data on these pipes is a series of '\n'-terminated lines.  */
+    int stdout_pipe[2];
+    int stderr_pipe[2];
+
+    /*
+     * Data on this pipe is a series of counted (see buf_send_counted)
+     * packets.  Each packet must be processed atomically (i.e. not
+     * interleaved with data from stdout_pipe or stderr_pipe).
+     */
+    int protocol_pipe[2];
+
+    int dev_null_fd = -1;
+
+    int errs;
+
+    TRACE (TRACE_FUNCTION, "do_cvs_command (%s)", cmd_name);
+
+    /* Write proxy logging is always terminated when a command is received.
+     * Therefore, we wish to avoid reprocessing the command since that would
+     * cause endless recursion.
+     */
+    if (isProxyServer())
+    {
+# ifdef PROXY_SUPPORT
+       if (reprocessing)
+           /* This must be the second time we've reached this point.
+            * Done reprocessing.
+            */
+           reprocessing = false;
+       else
+       {
+           if (lookup_command_attribute (cmd_name)
+                   & CVS_CMD_MODIFIES_REPOSITORY)
+           {
+               become_proxy ();
+               exit (EXIT_SUCCESS);
+           }
+           else if (/* serve_co may have called this already and missing logs
+                     * should have generated an error in serve_root().
+                     */
+                    proxy_log)
+           {
+               /* Set up the log for reprocessing.  */
+               rewind_buf_from_net ();
+               /* And return to the main loop in server(), where we will now
+                * find the logged secondary data and reread it.
+                */
+               return;
+           }
+       }
+# else /* !PROXY_SUPPORT */
+       if (lookup_command_attribute (cmd_name)
+                   & CVS_CMD_MODIFIES_REPOSITORY
+           && alloc_pending (120))
+           sprintf (pending_error_text, 
+"E You need a CVS client that supports the `Redirect' response for write 
requests to this server.");
+       return;
+# endif /* PROXY_SUPPORT */
+    }
+
+    command_pid = -1;
+    stdout_pipe[0] = -1;
+    stdout_pipe[1] = -1;
+    stderr_pipe[0] = -1;
+    stderr_pipe[1] = -1;
+    protocol_pipe[0] = -1;
+    protocol_pipe[1] = -1;
+
+    server_write_entries ();
+
+    if (print_pending_error ())
+       goto free_args_and_return;
+
+    /* Global `cvs_cmd_name' is probably "server" right now -- only
+       serve_export() sets it to anything else.  So we will use local
+       parameter `cmd_name' to determine if this command is valid for
+       this user.  */
+    if (!check_command_valid_p (cmd_name))
+    {
+       buf_output0 (buf_to_net, "E ");
+       buf_output0 (buf_to_net, program_name);
+       buf_output0 (buf_to_net, " [server aborted]: \"");
+       buf_output0 (buf_to_net, cmd_name);
+       buf_output0 (buf_to_net,
+"\" requires write access to the repository\n\
+error  \n");
+       goto free_args_and_return;
+    }
+    cvs_cmd_name = cmd_name;
+
+    (void) server_notify ();
+
+    /*
+     * We use a child process which actually does the operation.  This
+     * is so we can intercept its standard output.  Even if all of CVS
+     * were written to go to some special routine instead of writing
+     * to stdout or stderr, we would still need to do the same thing
+     * for the RCS commands.
+     */
+
+    if (pipe (stdout_pipe) < 0)
+    {
+       buf_output0 (buf_to_net, "E pipe failed\n");
+       print_error (errno);
+       goto error_exit;
+    }
+    if (pipe (stderr_pipe) < 0)
+    {
+       buf_output0 (buf_to_net, "E pipe failed\n");
+       print_error (errno);
+       goto error_exit;
+    }
+    if (pipe (protocol_pipe) < 0)
+    {
+       buf_output0 (buf_to_net, "E pipe failed\n");
+       print_error (errno);
+       goto error_exit;
+    }
+# ifdef SERVER_FLOWCONTROL
+    if (pipe (flowcontrol_pipe) < 0)
+    {
+       buf_output0 (buf_to_net, "E pipe failed\n");
+       print_error (errno);
+       goto error_exit;
+    }
+    set_nonblock_fd (flowcontrol_pipe[0]);
+    set_nonblock_fd (flowcontrol_pipe[1]);
+# endif /* SERVER_FLOWCONTROL */
+
+    dev_null_fd = CVS_OPEN (DEVNULL, O_RDONLY);
+    if (dev_null_fd < 0)
+    {
+       buf_output0 (buf_to_net, "E open /dev/null failed\n");
+       print_error (errno);
+       goto error_exit;
+    }
+
+    /* We shouldn't have any partial lines from cvs_output and
+       cvs_outerr, but we handle them here in case there is a bug.  */
+    /* FIXME: appending a newline, rather than using "MT" as we
+       do in the child process, is probably not really a very good
+       way to "handle" them.  */
+    if (! buf_empty_p (saved_output))
+    {
+       buf_append_char (saved_output, '\n');
+       buf_copy_lines (buf_to_net, saved_output, 'M');
+    }
+    if (! buf_empty_p (saved_outerr))
+    {
+       buf_append_char (saved_outerr, '\n');
+       buf_copy_lines (buf_to_net, saved_outerr, 'E');
+    }
+
+    /* Flush out any pending data.  */
+    buf_flush (buf_to_net, 1);
+
+    /* Don't use vfork; we're not going to exec().  */
+    command_pid = fork ();
+    if (command_pid < 0)
+    {
+       buf_output0 (buf_to_net, "E fork failed\n");
+       print_error (errno);
+       goto error_exit;
+    }
+    if (command_pid == 0)
+    {
+       int exitstatus;
+
+       /* Since we're in the child, and the parent is going to take
+          care of packaging up our error messages, we can clear this
+          flag.  */
+       error_use_protocol = 0;
+
+       protocol = fd_buffer_initialize (protocol_pipe[1], 0, NULL, false,
+                                        protocol_memory_error);
+
+       /* At this point we should no longer be using buf_to_net and
+          buf_from_net.  Instead, everything should go through
+          protocol.  */
+       if (buf_to_net != NULL)
+       {
+           buf_free (buf_to_net);
+           buf_to_net = NULL;
+       }
+       if (buf_from_net != NULL)
+       {
+           buf_free (buf_from_net);
+           buf_from_net = NULL;
+       }
+
+       /* These were originally set up to use outbuf_memory_error.
+          Since we're now in the child, we should use the simpler
+          protocol_memory_error function.  */
+       saved_output->memory_error = protocol_memory_error;
+       saved_outerr->memory_error = protocol_memory_error;
+
+       if (dup2 (dev_null_fd, STDIN_FILENO) < 0)
+           error (1, errno, "can't set up pipes");
+       if (dup2 (stdout_pipe[1], STDOUT_FILENO) < 0)
+           error (1, errno, "can't set up pipes");
+       if (dup2 (stderr_pipe[1], STDERR_FILENO) < 0)
+           error (1, errno, "can't set up pipes");
+       close (dev_null_fd);
+       close (stdout_pipe[0]);
+       close (stdout_pipe[1]);
+       close (stderr_pipe[0]);
+       close (stderr_pipe[1]);
+       close (protocol_pipe[0]);
+       close_on_exec (protocol_pipe[1]);
+# ifdef SERVER_FLOWCONTROL
+       close_on_exec (flowcontrol_pipe[0]);
+       close (flowcontrol_pipe[1]);
+# endif /* SERVER_FLOWCONTROL */
+
+       /*
+        * Set this in .bashrc if you want to give yourself time to attach
+        * to the subprocess with a debugger.
+        */
+       if (getenv ("CVS_SERVER_SLEEP"))
+       {
+           int secs = atoi (getenv ("CVS_SERVER_SLEEP"));
+           TRACE (TRACE_DATA, "Sleeping CVS_SERVER_SLEEP (%d) seconds", secs);
+           sleep (secs);
+       }
+       else
+           TRACE (TRACE_DATA, "CVS_SERVER_SLEEP not set.");
+
+       exitstatus = (*command) (argument_count, argument_vector);
+
+       /* Output any partial lines.  If the client doesn't support
+          "MT", we go ahead and just tack on a newline since the
+          protocol doesn't support anything better.  */
+       if (! buf_empty_p (saved_output))
+       {
+           buf_output0 (protocol, supported_response ("MT") ? "MT text " : "M 
");
+           buf_append_buffer (protocol, saved_output);
+           buf_output (protocol, "\n", 1);
+           buf_send_counted (protocol);
+       }
+       /* For now we just discard partial lines on stderr.  I suspect
+          that CVS can't write such lines unless there is a bug.  */
+
+       buf_free (protocol);
+       protocol = NULL;
+
+       /* Close the pipes explicitly in order to send an EOF to the parent,
+        * then wait for the parent to close the flow control pipe.  This
+        * avoids a race condition where a child which dumped more than the
+        * high water mark into the pipes could complete its job and exit,
+        * leaving the parent process to attempt to write a stop byte to the
+        * closed flow control pipe, which earned the parent a SIGPIPE, which
+        * it normally only expects on the network pipe and that causes it to
+        * exit with an error message, rather than the SIGCHILD that it knows
+        * how to handle correctly.
+        */
+       /* Let exit() close STDIN - it's from /dev/null anyhow.  */
+       fclose (stderr);
+       fclose (stdout);
+       close (protocol_pipe[1]);
+# ifdef SERVER_FLOWCONTROL
+       {
+           char junk;
+           ssize_t status;
+           while ((status = read (flowcontrol_pipe[0], &junk, 1)) > 0
+                  || (status == -1 && errno == EAGAIN));
+       }
+       /* FIXME: No point in printing an error message with error(),
+        * as STDERR is already closed, but perhaps this could be syslogged?
+        */
+# endif
+
+       exit (exitstatus);
+    }
+
+    /* OK, sit around getting all the input from the child.  */
+    {
+       struct buffer *stdoutbuf;
+       struct buffer *stderrbuf;
+       struct buffer *protocol_inbuf;
+       /* Number of file descriptors to check in select ().  */
+       int num_to_check;
+       int count_needed = 1;
+# ifdef SERVER_FLOWCONTROL
+       int have_flowcontrolled = 0;
+# endif /* SERVER_FLOWCONTROL */
+
+       FD_ZERO (&command_fds_to_drain.fds);
+       num_to_check = stdout_pipe[0];
+       FD_SET (stdout_pipe[0], &command_fds_to_drain.fds);
+       num_to_check = MAX (num_to_check, stderr_pipe[0]);
+       FD_SET (stderr_pipe[0], &command_fds_to_drain.fds);
+       num_to_check = MAX (num_to_check, protocol_pipe[0]);
+       FD_SET (protocol_pipe[0], &command_fds_to_drain.fds);
+       num_to_check = MAX (num_to_check, STDOUT_FILENO);
+# ifdef SUNOS_KLUDGE
+       max_command_fd = num_to_check;
+# endif
+       /*
+        * File descriptors are numbered from 0, so num_to_check needs to
+        * be one larger than the largest descriptor.
+        */
+       ++num_to_check;
+       if (num_to_check > FD_SETSIZE)
+       {
+           buf_output0 (buf_to_net,
+                        "E internal error: FD_SETSIZE not big enough.\n\
+error  \n");
+           goto error_exit;
+       }
+
+       stdoutbuf = fd_buffer_initialize (stdout_pipe[0], 0, NULL, true,
+                                         input_memory_error);
+
+       stderrbuf = fd_buffer_initialize (stderr_pipe[0], 0, NULL, true,
+                                         input_memory_error);
+
+       protocol_inbuf = fd_buffer_initialize (protocol_pipe[0], 0, NULL, true,
+                                              input_memory_error);
+
+       set_nonblock (buf_to_net);
+       set_nonblock (stdoutbuf);
+       set_nonblock (stderrbuf);
+       set_nonblock (protocol_inbuf);
+
+       if (close (stdout_pipe[1]) < 0)
+       {
+           buf_output0 (buf_to_net, "E close failed\n");
+           print_error (errno);
+           goto error_exit;
+       }
+       stdout_pipe[1] = -1;
+
+       if (close (stderr_pipe[1]) < 0)
+       {
+           buf_output0 (buf_to_net, "E close failed\n");
+           print_error (errno);
+           goto error_exit;
+       }
+       stderr_pipe[1] = -1;
+
+       if (close (protocol_pipe[1]) < 0)
+       {
+           buf_output0 (buf_to_net, "E close failed\n");
+           print_error (errno);
+           goto error_exit;
+       }
+       protocol_pipe[1] = -1;
+
+# ifdef SERVER_FLOWCONTROL
+       if (close (flowcontrol_pipe[0]) < 0)
+       {
+           buf_output0 (buf_to_net, "E close failed\n");
+           print_error (errno);
+           goto error_exit;
+       }
+       flowcontrol_pipe[0] = -1;
+# endif /* SERVER_FLOWCONTROL */
+
+       if (close (dev_null_fd) < 0)
+       {
+           buf_output0 (buf_to_net, "E close failed\n");
+           print_error (errno);
+           goto error_exit;
+       }
+       dev_null_fd = -1;
+
+       while (stdout_pipe[0] >= 0
+              || stderr_pipe[0] >= 0
+              || protocol_pipe[0] >= 0
+              || count_needed <= 0)
+       {
+           fd_set readfds;
+           fd_set writefds;
+           int numfds;
+           struct timeval *timeout_ptr;
+           struct timeval timeout;
+# ifdef SERVER_FLOWCONTROL
+           int bufmemsize;
+
+           /*
+            * See if we are swamping the remote client and filling our VM.
+            * Tell child to hold off if we do.
+            */
+           bufmemsize = buf_count_mem (buf_to_net);
+           if (!have_flowcontrolled && (bufmemsize > SERVER_HI_WATER))
+           {
+               if (write(flowcontrol_pipe[1], "S", 1) == 1)
+                   have_flowcontrolled = 1;
+           }
+           else if (have_flowcontrolled && (bufmemsize < SERVER_LO_WATER))
+           {
+               if (write(flowcontrol_pipe[1], "G", 1) == 1)
+                   have_flowcontrolled = 0;
+           }
+# endif /* SERVER_FLOWCONTROL */
+
+           FD_ZERO (&readfds);
+           FD_ZERO (&writefds);
+
+           if (count_needed <= 0)
+           {
+               /* there is data pending which was read from the protocol pipe
+                * so don't block if we don't find any data
+                */
+               timeout.tv_sec = 0;
+               timeout.tv_usec = 0;
+               timeout_ptr = &timeout;
+           }
+           else
+           {
+               /* block indefinately */
+               timeout_ptr = NULL;
+           }
+
+           if (! buf_empty_p (buf_to_net))
+               FD_SET (STDOUT_FILENO, &writefds);
+
+           if (stdout_pipe[0] >= 0)
+           {
+               FD_SET (stdout_pipe[0], &readfds);
+           }
+           if (stderr_pipe[0] >= 0)
+           {
+               FD_SET (stderr_pipe[0], &readfds);
+           }
+           if (protocol_pipe[0] >= 0)
+           {
+               FD_SET (protocol_pipe[0], &readfds);
+           }
+
+           /* This process of selecting on the three pipes means that
+            we might not get output in the same order in which it
+            was written, thus producing the well-known
+            "out-of-order" bug.  If the child process uses
+            cvs_output and cvs_outerr, it will send everything on
+            the protocol_pipe and avoid this problem, so the
+            solution is to use cvs_output and cvs_outerr in the
+            child process.  */
+           do {
+               /* This used to select on exceptions too, but as far
+                  as I know there was never any reason to do that and
+                  SCO doesn't let you select on exceptions on pipes.  */
+               numfds = select (num_to_check, &readfds, &writefds,
+                                NULL, timeout_ptr);
+               if (numfds < 0
+                       && errno != EINTR)
+               {
+                   buf_output0 (buf_to_net, "E select failed\n");
+                   print_error (errno);
+                   goto error_exit;
+               }
+           } while (numfds < 0);
+
+           if (numfds == 0)
+           {
+               FD_ZERO (&readfds);
+               FD_ZERO (&writefds);
+           }
+
+           if (FD_ISSET (STDOUT_FILENO, &writefds))
+           {
+               /* What should we do with errors?  syslog() them?  */
+               buf_send_output (buf_to_net);
+           }
+
+           if (protocol_pipe[0] >= 0
+               && (FD_ISSET (protocol_pipe[0], &readfds)))
+           {
+               int status;
+               size_t count_read;
+
+               status = buf_input_data (protocol_inbuf, &count_read);
+
+               if (status == -1)
+               {
+                   close (protocol_pipe[0]);
+                   protocol_pipe[0] = -1;
+               }
+               else if (status > 0)
+               {
+                   buf_output0 (buf_to_net, "E buf_input_data failed\n");
+                   print_error (status);
+                   goto error_exit;
+               }
+
+               /*
+                * We only call buf_copy_counted if we have read
+                * enough bytes to make it worthwhile.  This saves us
+                * from continually recounting the amount of data we
+                * have.
+                */
+               count_needed -= count_read;
+           }
+           /* this is still part of the protocol pipe procedure, but it is
+            * outside the above conditional so that unprocessed data can be
+            * left in the buffer and stderr/stdout can be read when a flush
+            * signal is received and control can return here without passing
+            * through the select code and maybe blocking
+            */
+           while (count_needed <= 0)
+           {
+               int special = 0;
+
+               count_needed = buf_copy_counted (buf_to_net,
+                                                    protocol_inbuf,
+                                                    &special);
+
+               /* What should we do with errors?  syslog() them?  */
+               buf_send_output (buf_to_net);
+
+               /* If SPECIAL got set to <0, it means that the child
+                * wants us to flush the pipe & maybe stderr or stdout.
+                *
+                * After that we break to read stderr & stdout again before
+                * going back to the protocol pipe
+                *
+                * Upon breaking, count_needed = 0, so the next pass will only
+                * perform a non-blocking select before returning here to finish
+                * processing data we already read from the protocol buffer
+                */
+                if (special == -1)
+                {
+                    cvs_flushout();
+                    break;
+                }
+               if (special == -2)
+               {
+                   /* If the client supports the 'F' command, we send it. */
+                   if (supported_response ("F"))
+                   {
+                       buf_append_char (buf_to_net, 'F');
+                       buf_append_char (buf_to_net, '\n');
+                   }
+                   cvs_flusherr ();
+                   break;
+               }
+           }
+
+           if (stdout_pipe[0] >= 0
+               && (FD_ISSET (stdout_pipe[0], &readfds)))
+           {
+               int status;
+
+               status = buf_input_data (stdoutbuf, NULL);
+
+               buf_copy_lines (buf_to_net, stdoutbuf, 'M');
+
+               if (status == -1)
+               {
+                   close (stdout_pipe[0]);
+                   stdout_pipe[0] = -1;
+               }
+               else if (status > 0)
+               {
+                   buf_output0 (buf_to_net, "E buf_input_data failed\n");
+                   print_error (status);
+                   goto error_exit;
+               }
+
+               /* What should we do with errors?  syslog() them?  */
+               buf_send_output (buf_to_net);
+           }
+
+           if (stderr_pipe[0] >= 0
+               && (FD_ISSET (stderr_pipe[0], &readfds)))
+           {
+               int status;
+
+               status = buf_input_data (stderrbuf, NULL);
+
+               buf_copy_lines (buf_to_net, stderrbuf, 'E');
+
+               if (status == -1)
+               {
+                   close (stderr_pipe[0]);
+                   stderr_pipe[0] = -1;
+               }
+               else if (status > 0)
+               {
+                   buf_output0 (buf_to_net, "E buf_input_data failed\n");
+                   print_error (status);
+                   goto error_exit;
+               }
+
+               /* What should we do with errors?  syslog() them?  */
+               buf_send_output (buf_to_net);
+           }
+       }
+
+       /*
+        * OK, we've gotten EOF on all the pipes.  If there is
+        * anything left on stdoutbuf or stderrbuf (this could only
+        * happen if there was no trailing newline), send it over.
+        */
+       if (! buf_empty_p (stdoutbuf))
+       {
+           buf_append_char (stdoutbuf, '\n');
+           buf_copy_lines (buf_to_net, stdoutbuf, 'M');
+       }
+       if (! buf_empty_p (stderrbuf))
+       {
+           buf_append_char (stderrbuf, '\n');
+           buf_copy_lines (buf_to_net, stderrbuf, 'E');
+       }
+       if (! buf_empty_p (protocol_inbuf))
+           buf_output0 (buf_to_net,
+                        "E Protocol error: uncounted data discarded\n");
+
+# ifdef SERVER_FLOWCONTROL
+       close (flowcontrol_pipe[1]);
+       flowcontrol_pipe[1] = -1;
+# endif /* SERVER_FLOWCONTROL */
+
+       errs = 0;
+
+       while (command_pid > 0)
+       {
+           int status;
+           pid_t waited_pid;
+           waited_pid = waitpid (command_pid, &status, 0);
+           if (waited_pid < 0)
+           {
+               /*
+                * Intentionally ignoring EINTR.  Other errors
+                * "can't happen".
+                */
+               continue;
+           }
+
+           if (WIFEXITED (status))
+               errs += WEXITSTATUS (status);
+           else
+           {
+               int sig = WTERMSIG (status);
+               char buf[50];
+               /*
+                * This is really evil, because signals might be numbered
+                * differently on the two systems.  We should be using
+                * signal names (either of the "Terminated" or the "SIGTERM"
+                * variety).  But cvs doesn't currently use libiberty...we
+                * could roll our own....  FIXME.
+                */
+               buf_output0 (buf_to_net, "E Terminated with fatal signal ");
+               sprintf (buf, "%d\n", sig);
+               buf_output0 (buf_to_net, buf);
+
+               /* Test for a core dump.  */
+               if (WCOREDUMP (status))
+               {
+                   buf_output0 (buf_to_net, "E Core dumped; preserving ");
+                   buf_output0 (buf_to_net, orig_server_temp_dir);
+                   buf_output0 (buf_to_net, " on server.\n\
+E CVS locks may need cleaning up.\n");
+                   dont_delete_temp = 1;
+               }
+               ++errs;
+           }
+           if (waited_pid == command_pid)
+               command_pid = -1;
+       }
+
+       /*
+        * OK, we've waited for the child.  By now all CVS locks are free
+        * and it's OK to block on the network.
+        */
+       set_block (buf_to_net);
+       buf_flush (buf_to_net, 1);
+       buf_shutdown (protocol_inbuf);
+       buf_free (protocol_inbuf);
+       protocol_inbuf = NULL;
+       buf_shutdown (stderrbuf);
+       buf_free (stderrbuf);
+       stderrbuf = NULL;
+       buf_shutdown (stdoutbuf);
+       buf_free (stdoutbuf);
+       stdoutbuf = NULL;
+    }
+
+    if (errs)
+       /* We will have printed an error message already.  */
+       buf_output0 (buf_to_net, "error  \n");
+    else
+       buf_output0 (buf_to_net, "ok\n");
+    goto free_args_and_return;
+
+ error_exit:
+    if (command_pid > 0)
+       kill (command_pid, SIGTERM);
+
+    while (command_pid > 0)
+    {
+       pid_t waited_pid;
+       waited_pid = waitpid (command_pid, NULL, 0);
+       if (waited_pid < 0 && errno == EINTR)
+           continue;
+       if (waited_pid == command_pid)
+           command_pid = -1;
+    }
+
+    close (dev_null_fd);
+    close (protocol_pipe[0]);
+    close (protocol_pipe[1]);
+    close (stderr_pipe[0]);
+    close (stderr_pipe[1]);
+    close (stdout_pipe[0]);
+    close (stdout_pipe[1]);
+# ifdef SERVER_FLOWCONTROL
+    close (flowcontrol_pipe[0]);
+    close (flowcontrol_pipe[1]);
+# endif /* SERVER_FLOWCONTROL */
+
+ free_args_and_return:
+    /* Now free the arguments.  */
+    {
+       /* argument_vector[0] is a dummy argument, we don't mess with it.  */
+       char **cp;
+       for (cp = argument_vector + 1;
+            cp < argument_vector + argument_count;
+            ++cp)
+           free (*cp);
+
+       argument_count = 1;
+    }
+
+    /* Flush out any data not yet sent.  */
+    set_block (buf_to_net);
+    buf_flush (buf_to_net, 1);
+
+    return;
+}
+
+
+
+# ifdef SERVER_FLOWCONTROL
+/*
+ * Called by the child at convenient points in the server's execution for
+ * the server child to block.. ie: when it has no locks active.
+ */
+void
+server_pause_check(void)
+{
+    int paused = 0;
+    char buf[1];
+
+    while (read (flowcontrol_pipe[0], buf, 1) == 1)
+    {
+       if (*buf == 'S')        /* Stop */
+           paused = 1;
+       else if (*buf == 'G')   /* Go */
+           paused = 0;
+       else
+           return;             /* ??? */
+    }
+    while (paused) {
+       int numfds, numtocheck;
+       fd_set fds;
+
+       FD_ZERO (&fds);
+       FD_SET (flowcontrol_pipe[0], &fds);
+       numtocheck = flowcontrol_pipe[0] + 1;
+
+       do {
+           numfds = select (numtocheck, &fds, NULL, NULL, NULL);
+           if (numfds < 0
+               && errno != EINTR)
+           {
+               buf_output0 (buf_to_net, "E select failed\n");
+               print_error (errno);
+               return;
+           }
+       } while (numfds < 0);
+
+       if (FD_ISSET (flowcontrol_pipe[0], &fds))
+       {
+           int got;
+
+           while ((got = read (flowcontrol_pipe[0], buf, 1)) == 1)
+           {
+               if (*buf == 'S')        /* Stop */
+                   paused = 1;
+               else if (*buf == 'G')   /* Go */
+                   paused = 0;
+               else
+                   return;             /* ??? */
+           }
+
+           /* This assumes that we are using BSD or POSIX nonblocking
+              I/O.  System V nonblocking I/O returns zero if there is
+              nothing to read.  */
+           if (got == 0)
+               error (1, 0, "flow control EOF");
+           if (got < 0 && ! blocking_error (errno))
+           {
+               error (1, errno, "flow control read failed");
+           }
+       }
+    }
+}
+# endif /* SERVER_FLOWCONTROL */
+
+
+
+/* This variable commented in server.h.  */
+char *server_dir = NULL;
+
+
+
+static void
+output_dir (const char *update_dir, const char *repository)
+{
+    /* Set up SHORT_REPOS.  */
+    const char *short_repos = Short_Repository (repository);
+
+    /* Send the update_dir/repos.  */
+    if (server_dir != NULL)
+    {
+       buf_output0 (protocol, server_dir);
+       buf_output0 (protocol, "/");
+    }
+    if (update_dir[0] == '\0')
+       buf_output0 (protocol, ".");
+    else
+       buf_output0 (protocol, update_dir);
+    buf_output0 (protocol, "/\n");
+    if (short_repos[0] == '\0')
+       buf_output0 (protocol, ".");
+    else
+       buf_output0 (protocol, short_repos);
+    buf_output0 (protocol, "/");
+}
+
+
+
+/*
+ * Entries line that we are squirreling away to send to the client when
+ * we are ready.
+ */
+static char *entries_line;
+
+/*
+ * File which has been Scratch_File'd, we are squirreling away that fact
+ * to inform the client when we are ready.
+ */
+static char *scratched_file;
+
+/*
+ * The scratched_file will need to be removed as well as having its entry
+ * removed.
+ */
+static int kill_scratched_file;
+
+
+
+void
+server_register (const char *name, const char *version, const char *timestamp,
+                 const char *options, const char *tag, const char *date,
+                 const char *conflict)
+{
+    int len;
+
+    if (options == NULL)
+       options = "";
+
+    TRACE (TRACE_FUNCTION, "server_register(%s, %s, %s, %s, %s, %s, %s)",
+          name, version, timestamp ? timestamp : "", options,
+          tag ? tag : "", date ? date : "",
+          conflict ? conflict : "");
+
+    if (entries_line != NULL)
+    {
+       /*
+        * If CVS decides to Register it more than once (which happens
+        * on "cvs update foo/foo.c" where foo and foo.c are already
+        * checked out), use the last of the entries lines Register'd.
+        */
+       free (entries_line);
+    }
+
+    /*
+     * I have reports of Scratch_Entry and Register both happening, in
+     * two different cases.  Using the last one which happens is almost
+     * surely correct; I haven't tracked down why they both happen (or
+     * even verified that they are for the same file).
+     */
+    if (scratched_file != NULL)
+    {
+       free (scratched_file);
+       scratched_file = NULL;
+    }
+
+    len = (strlen (name) + strlen (version) + strlen (options) + 80);
+    if (tag)
+       len += strlen (tag);
+    if (date)
+       len += strlen (date);
+
+    entries_line = xmalloc (len);
+    sprintf (entries_line, "/%s/%s/", name, version);
+    if (conflict != NULL)
+    {
+       strcat (entries_line, "+=");
+    }
+    strcat (entries_line, "/");
+    strcat (entries_line, options);
+    strcat (entries_line, "/");
+    if (tag != NULL)
+    {
+       strcat (entries_line, "T");
+       strcat (entries_line, tag);
+    }
+    else if (date != NULL)
+    {
+       strcat (entries_line, "D");
+       strcat (entries_line, date);
+    }
+}
+
+
+
+void
+server_scratch (const char *fname)
+{
+    /*
+     * I have reports of Scratch_Entry and Register both happening, in
+     * two different cases.  Using the last one which happens is almost
+     * surely correct; I haven't tracked down why they both happen (or
+     * even verified that they are for the same file).
+     *
+     * Don't know if this is what whoever wrote the above comment was
+     * talking about, but this can happen in the case where a join
+     * removes a file - the call to Register puts the '-vers' into the
+     * Entries file after the file is removed
+     */
+    if (entries_line != NULL)
+    {
+       free (entries_line);
+       entries_line = NULL;
+    }
+
+    if (scratched_file != NULL)
+    {
+       buf_output0 (protocol,
+                    "E CVS server internal error: duplicate Scratch_Entry\n");
+       buf_send_counted (protocol);
+       return;
+    }
+    scratched_file = xstrdup (fname);
+    kill_scratched_file = 1;
+}
+
+
+
+void
+server_scratch_entry_only (void)
+{
+    kill_scratched_file = 0;
+}
+
+
+
+/* Print a new entries line, from a previous server_register.  */
+static void
+new_entries_line (void)
+{
+    if (entries_line)
+    {
+       buf_output0 (protocol, entries_line);
+       buf_output (protocol, "\n", 1);
+    }
+    else
+       /* Return the error message as the Entries line.  */
+       buf_output0 (protocol,
+                    "CVS server internal error: Register missing\n");
+    free (entries_line);
+    entries_line = NULL;
+}
+
+
+
+static void
+serve_ci (char *arg)
+{
+    do_cvs_command ("commit", commit);
+}
+
+
+
+static void
+checked_in_response (const char *file, const char *update_dir,
+                     const char *repository)
+{
+    if (supported_response ("Mode"))
+    {
+       struct stat sb;
+       char *mode_string;
+
+       if (stat (file, &sb) < 0)
+       {
+           /* Not clear to me why the file would fail to exist, but it
+              was happening somewhere in the testsuite.  */
+           if (!existence_error (errno))
+               error (0, errno, "cannot stat %s", file);
+       }
+       else
+       {
+           buf_output0 (protocol, "Mode ");
+           mode_string = mode_to_string (sb.st_mode);
+           buf_output0 (protocol, mode_string);
+           buf_output0 (protocol, "\n");
+           free (mode_string);
+       }
+    }
+
+    buf_output0 (protocol, "Checked-in ");
+    output_dir (update_dir, repository);
+    buf_output0 (protocol, file);
+    buf_output (protocol, "\n", 1);
+    new_entries_line ();
+}
+
+
+
+void
+server_checked_in (const char *file, const char *update_dir,
+                   const char *repository)
+{
+    if (noexec)
+       return;
+    if (scratched_file != NULL && entries_line == NULL)
+    {
+       /*
+        * This happens if we are now doing a "cvs remove" after a previous
+        * "cvs add" (without a "cvs ci" in between).
+        */
+       buf_output0 (protocol, "Remove-entry ");
+       output_dir (update_dir, repository);
+       buf_output0 (protocol, file);
+       buf_output (protocol, "\n", 1);
+       free (scratched_file);
+       scratched_file = NULL;
+    }
+    else
+    {
+       checked_in_response (file, update_dir, repository);
+    }
+    buf_send_counted (protocol);
+}
+
+
+
+void
+server_update_entries (const char *file, const char *update_dir,
+                       const char *repository,
+                       enum server_updated_arg4 updated)
+{
+    if (noexec)
+       return;
+    if (updated == SERVER_UPDATED)
+       checked_in_response (file, update_dir, repository);
+    else
+    {
+       if (!supported_response ("New-entry"))
+           return;
+       buf_output0 (protocol, "New-entry ");
+       output_dir (update_dir, repository);
+       buf_output0 (protocol, file);
+       buf_output (protocol, "\n", 1);
+       new_entries_line ();
+    }
+
+    buf_send_counted (protocol);
+}
+
+
+
+static void
+serve_update (char *arg)
+{
+    do_cvs_command ("update", update);
+}
+
+
+
+static void
+serve_diff (char *arg)
+{
+    do_cvs_command ("diff", diff);
+}
+
+
+
+static void
+serve_log (char *arg)
+{
+    do_cvs_command ("log", cvslog);
+}
+
+
+
+static void
+serve_rlog (char *arg)
+{
+    do_cvs_command ("rlog", cvslog);
+}
+
+
+
+static void
+serve_ls (char *arg)
+{
+  do_cvs_command ("ls", ls);
+}
+
+
+
+static void
+serve_rls (char *arg)
+{
+  do_cvs_command ("rls", ls);
+}
+
+
+
+static void
+serve_add (char *arg)
+{
+    do_cvs_command ("add", add);
+}
+
+
+
+static void
+serve_remove (char *arg)
+{
+    do_cvs_command ("remove", cvsremove);
+}
+
+
+
+static void
+serve_status (char *arg)
+{
+    do_cvs_command ("status", cvsstatus);
+}
+
+
+
+static void
+serve_rdiff (char *arg)
+{
+    do_cvs_command ("rdiff", patch);
+}
+
+
+
+static void
+serve_tag (char *arg)
+{
+    do_cvs_command ("tag", cvstag);
+}
+
+
+
+static void
+serve_rtag (char *arg)
+{
+    do_cvs_command ("rtag", cvstag);
+}
+
+
+
+static void
+serve_import (char *arg)
+{
+    do_cvs_command ("import", import);
+}
+
+
+
+static void
+serve_admin (char *arg)
+{
+    do_cvs_command ("admin", admin);
+}
+
+
+
+static void
+serve_history (char *arg)
+{
+    do_cvs_command ("history", history);
+}
+
+
+
+static void
+serve_release (char *arg)
+{
+    do_cvs_command ("release", release);
+}
+
+
+
+static void
+serve_watch_on (char *arg)
+{
+    do_cvs_command ("watch", watch_on);
+}
+
+
+
+static void
+serve_watch_off (char *arg)
+{
+    do_cvs_command ("watch", watch_off);
+}
+
+
+
+static void
+serve_watch_add (char *arg)
+{
+    do_cvs_command ("watch", watch_add);
+}
+
+
+
+static void
+serve_watch_remove (char *arg)
+{
+    do_cvs_command ("watch", watch_remove);
+}
+
+
+
+static void
+serve_watchers (char *arg)
+{
+    do_cvs_command ("watchers", watchers);
+}
+
+
+
+static void
+serve_editors (char *arg)
+{
+    do_cvs_command ("editors", editors);
+}
+
+
+
+static void
+serve_edit (char *arg)
+{
+    do_cvs_command ("edit", edit);
+}
+
+
+
+# ifdef PROXY_SUPPORT
+/* We need to handle some of this before reprocessing since it is defined to
+ * send a response and print errors before a Root request is received.
+ */
+# endif /* PROXY_SUPPORT */
+static void
+serve_noop (char *arg)
+{
+    /* Errors could be encountered in the first or second passes, so always
+     * send them to the client.
+     */
+    bool pe = print_pending_error();
+
+# ifdef PROXY_SUPPORT
+    /* The portions below need not be handled until reprocessing anyhow since
+     * there should be no entries or notifications prior to that.  */
+    if (!proxy_log)
+# endif /* PROXY_SUPPORT */
+    {
+       server_write_entries ();
+       if (!pe)
+           (void) server_notify ();
+    }
+
+    if (!pe
+# ifdef PROXY_SUPPORT
+        /* "ok" only goes across in the first pass.  */
+        && !reprocessing
+# endif /* PROXY_SUPPORT */
+       )
+       buf_output0 (buf_to_net, "ok\n");
+    buf_flush (buf_to_net, 1);
+}
+
+
+
+static void
+serve_version (char *arg)
+{
+    do_cvs_command ("version", version);
+}
+
+
+
+static void
+serve_init (char *arg)
+{
+    cvsroot_t *saved_parsed_root;
+
+    if (!ISABSOLUTE (arg))
+    {
+       if (alloc_pending (80 + strlen (arg)))
+           sprintf (pending_error_text,
+                    "E init %s must be an absolute pathname", arg);
+    }
+# ifdef AUTH_SERVER_SUPPORT
+    else if (Pserver_Repos != NULL)
+    {
+       if (strcmp (Pserver_Repos, arg) != 0)
+       {
+           if (alloc_pending (80 + strlen (Pserver_Repos) + strlen (arg)))
+               /* The explicitness is to aid people who are writing clients.
+                  I don't see how this information could help an
+                  attacker.  */
+               sprintf (pending_error_text, "\
+E Protocol error: init says \"%s\" but pserver says \"%s\"",
+                        arg, Pserver_Repos);
+       }
+    }
+# endif
+
+    if (print_pending_error ())
+       return;
+
+    saved_parsed_root = current_parsed_root;
+    current_parsed_root = local_cvsroot (arg);
+
+    do_cvs_command ("init", init);
+
+    /* Do not free CURRENT_PARSED_ROOT since it is still in the cache.  */
+    current_parsed_root = saved_parsed_root;
+}
+
+
+
+static void
+serve_annotate (char *arg)
+{
+    do_cvs_command ("annotate", annotate);
+}
+
+
+
+static void
+serve_rannotate (char *arg)
+{
+    do_cvs_command ("rannotate", annotate);
+}
+
+
+
+static void
+serve_co (char *arg)
+{
+    if (print_pending_error ())
+       return;
+
+# ifdef PROXY_SUPPORT
+    /* If we are not a secondary server, the write proxy log will already have
+     * been processed.
+     */
+    if (isProxyServer ())
+    {
+       if (reprocessing)
+           reprocessing = false;
+       else if (/* The proxy log may be closed if the client sent a
+                 * `Command-prep' request.
+                 */
+                proxy_log)
+       {
+           /* Set up the log for reprocessing.  */
+           rewind_buf_from_net ();
+           /* And return to the main loop in server(), where we will now find
+            * the logged secondary data and reread it.
+            */
+           return;
+       }
+    }
+# endif /* PROXY_SUPPORT */
+
+    /* Compensate for server_export()'s setting of cvs_cmd_name.
+     *
+     * [It probably doesn't matter if do_cvs_command() gets "export"
+     *  or "checkout", but we ought to be accurate where possible.]
+     */
+    do_cvs_command (!strcmp (cvs_cmd_name, "export") ? "export" : "checkout",
+                   checkout);
+}
+
+
+
+static void
+serve_export (char *arg)
+{
+    /* Tell checkout() to behave like export not checkout.  */
+    cvs_cmd_name = "export";
+    serve_co (arg);
+}
+
+
+
+void
+server_copy_file (const char *file, const char *update_dir,
+                  const char *repository, const char *newfile)
+{
+    /* At least for now, our practice is to have the server enforce
+       noexec for the repository and the client enforce it for the
+       working directory.  This might want more thought, and/or
+       documentation in cvsclient.texi (other responses do it
+       differently).  */
+
+    if (!supported_response ("Copy-file"))
+       return;
+    buf_output0 (protocol, "Copy-file ");
+    output_dir (update_dir, repository);
+    buf_output0 (protocol, file);
+    buf_output0 (protocol, "\n");
+    buf_output0 (protocol, newfile);
+    buf_output0 (protocol, "\n");
+}
+
+
+
+/* See server.h for description.  */
+void
+server_modtime (struct file_info *finfo, Vers_TS *vers_ts)
+{
+    char date[MAXDATELEN];
+    char outdate[MAXDATELEN];
+
+    assert (vers_ts->vn_rcs != NULL);
+
+    if (!supported_response ("Mod-time"))
+       return;
+
+    if (RCS_getrevtime (finfo->rcs, vers_ts->vn_rcs, date, 0) == (time_t) -1)
+       /* FIXME? should we be printing some kind of warning?  For one
+          thing I'm not 100% sure whether this happens in non-error
+          circumstances.  */
+       return;
+    date_to_internet (outdate, date);
+    buf_output0 (protocol, "Mod-time ");
+    buf_output0 (protocol, outdate);
+    buf_output0 (protocol, "\n");
+}
+
+
+
+void
+server_send_checksum (const unsigned char *checksum)
+{
+    static int checksum_supported = -1;
+
+    if (checksum_supported < 0)
+       checksum_supported = supported_response ("Checksum");
+
+    if (checksum_supported)
+    {
+       int i;
+       char buf[3];
+
+       buf_output0 (protocol, "Checksum ");
+       for (i = 0; i < 16; i++)
+       {
+           sprintf (buf, "%02x", (unsigned int) checksum[i]);
+           buf_output0 (protocol, buf);
+       }
+       buf_append_char (protocol, '\n');
+    }
+}
+
+
+
+static inline void
+output_mode_string (mode_t mode)
+{
+    char *mode_string;
+
+    mode_string = mode_to_string (mode);
+    buf_output0 (protocol, mode_string);
+    buf_output0 (protocol, "\n");
+    free (mode_string);
+}
+
+
+
+static void
+server_send_buffer_as_file (struct buffer *in, mode_t mode)
+{
+    unsigned long size;
+    char *buf;
+
+    if (mode == (mode_t) -1)
+       error (1, 0,
+"CVS server internal error: no mode in server_send_data_as_file");
+
+    output_mode_string (mode);
+
+    size = buf_length (in);
+
+    buf = Xasprintf ("%lu\n", size);
+    buf_output0 (protocol, buf);
+    free (buf);
+
+    buf_append_buffer (protocol, in);
+}
+
+
+
+static void
+server_send_file (const char *file, const char *fullname, mode_t mode)
+{
+    struct stat sb;
+    unsigned long size;
+    char *buf;
+    FILE *f;
+
+    /* The contents of the file will be in one of filebuf or list/last.  */
+    struct buffer_data *list, *last;
+    unsigned char *contents;
+
+    if (stat (file, &sb) < 0)
+       error (1, errno, "reading %s", fullname);
+
+    if (mode == (mode_t) -1)
+       /* FIXME: When we check out files the umask of the
+          server (set in .bashrc if rsh is in use) affects
+          what mode we send, and it shouldn't.  */
+       mode = sb.st_mode;
+
+    output_mode_string (mode);
+
+    size = sb.st_size;
+    contents = NULL;
+
+    /* Throughout this section we use binary mode to read the
+       file we are sending.  The client handles any line ending
+       translation if necessary.  */
+
+    if (file_gzip_level
+       /*
+        * For really tiny files, the gzip process startup
+        * time will outweigh the compression savings.  This
+        * might be computable somehow; using 100 here is just
+        * a first approximation.
+        */
+       && size > 100)
+    {
+       /* Basing this routine on read_and_gzip is not a
+          high-performance approach.  But it seems easier
+          to code than the alternative (and less
+          vulnerable to subtle bugs).  Given that this feature
+          is mainly for compatibility, that is the better
+          tradeoff.  */
+
+       int fd;
+       size_t file_allocated = 0;
+       size_t file_used = 0;
+
+       fd = CVS_OPEN (file, O_RDONLY | OPEN_BINARY, 0);
+       if (fd < 0)
+           error (1, errno, "reading %s", fullname);
+       if (read_and_gzip (fd, fullname, &contents,
+                          &file_allocated, &file_used,
+                          file_gzip_level))
+           error (1, 0, "aborting due to compression error");
+       size = file_used;
+       if (close (fd) < 0)
+           error (1, errno, "reading %s", fullname);
+       /* Prepending length with "z" is flag for using gzip here.  */
+       buf_output0 (protocol, "z");
+    }
+    else if (size > 0)
+    {
+       long status;
+
+       f = CVS_FOPEN (file, "rb");
+       if (f == NULL)
+           error (1, errno, "reading %s", fullname);
+       status = buf_read_file (f, size, &list, &last);
+       if (status == -2)
+           (*protocol->memory_error) (protocol);
+       else if (status != 0)
+           error (1, ferror (f) ? errno : 0, "reading %s", fullname);
+       if (fclose (f) == EOF)
+           error (1, errno, "reading %s", fullname);
+    }
+    else
+       contents = (unsigned char *) xstrdup ("");
+
+    buf = Xasprintf ("%lu\n", size);
+    buf_output0 (protocol, buf);
+    free (buf);
+
+    if (contents)
+    {
+       buf_output (protocol, (char *) contents, size);
+       free (contents);
+    }
+    else
+       buf_append_data (protocol, list, last);
+    /* Note we only send a newline here if the file ended with one.  */
+}
+
+
+
+/* See server.h for description.  */
+void
+server_updated (
+    struct file_info *finfo,
+    Vers_TS *vers,
+    enum server_updated_arg4 updated,
+    mode_t mode,
+    unsigned char *checksum,
+    struct buffer *filebuf)
+{
+    /* The case counter to the assertion below should be easy to handle but it
+     * never has been, to my knowledge, so there appears to be no need.
+     */
+    assert (!(filebuf && file_gzip_level));
+
+    TRACE (TRACE_FUNCTION, "server_updated (%s, %s, %s, %d)",
+          finfo->fullname, vers ? vers->vn_rcs : "(null)",
+          vers ? vers->options : "(null)", updated);
+
+    if (noexec)
+    {
+       /* Hmm, maybe if we did the same thing for entries_file, we
+          could get rid of the kludges in server_register and
+          server_scratch which refrain from warning if both
+          Scratch_Entry and Register get called.  Maybe.  */
+       if (scratched_file)
+       {
+           free (scratched_file);
+           scratched_file = NULL;
+       }
+       buf_send_counted (protocol);
+       return;
+    }
+
+    if (entries_line != NULL && scratched_file == NULL)
+    {
+       if (!filebuf && !isfile (finfo->file))
+       {
+           /* If we have a sticky tag for a branch on which
+              the file is dead, and cvs update the directory,
+              it gets a T_CHECKOUT but no file.  So in this
+              case just forget the whole thing.  */
+           free (entries_line);
+           entries_line = NULL;
+           return;
+       }
+
+       if (strcmp (cvs_cmd_name, "export")
+           && supported_response ("Base-entry"))
+       {
+           /* The client was already asked to create the base file and copy
+            * it into a temp file.  This will complete the process and print
+            * the "U file" line.
+            */
+           if (updated == SERVER_MERGED)
+               buf_output0 (protocol, "Base-merged ");
+           else
+               buf_output0 (protocol, "Base-entry ");
+           output_dir (finfo->update_dir, finfo->repository);
+           buf_output0 (protocol, finfo->file);
+           buf_output (protocol, "\n", 1);
+           new_entries_line ();
+           buf_send_counted (protocol);
+           return;
+       }
+
+       if (checksum)
+           server_send_checksum (checksum);
+
+       if (updated == SERVER_UPDATED)
+       {
+           Node *node;
+           Entnode *entnode;
+
+           if (!(supported_response ("Created")
+                 && supported_response ("Update-existing")))
+               buf_output0 (protocol, "Updated ");
+           else
+           {
+               assert (vers != NULL);
+               if (vers->ts_user == NULL)
+                   buf_output0 (protocol, "Created ");
+               else
+                   buf_output0 (protocol, "Update-existing ");
+           }
+
+           /* Now munge the entries to say that the file is unmodified,
+              in case we end up processing it again (e.g. modules3-6
+              in the testsuite).  */
+           node = findnode_fn (finfo->entries, finfo->file);
+           entnode = node->data;
+           free (entnode->timestamp);
+           entnode->timestamp = xstrdup ("=");
+       }
+       else if (updated == SERVER_MERGED)
+           buf_output0 (protocol, "Merged ");
+       else if (updated == SERVER_PATCHED)
+           buf_output0 (protocol, "Patched ");
+       else if (updated == SERVER_RCS_DIFF)
+           buf_output0 (protocol, "Rcs-diff ");
+       else
+           abort ();
+       output_dir (finfo->update_dir, finfo->repository);
+       buf_output0 (protocol, finfo->file);
+       buf_output (protocol, "\n", 1);
+
+       new_entries_line ();
+
+       if (filebuf)
+           server_send_buffer_as_file (filebuf, mode);
+       else
+           server_send_file (finfo->file, finfo->fullname, mode);
+
+       /*
+        * Avoid using up too much disk space for temporary files.
+        * A file which does not exist indicates that the file is up-to-date,
+        * which is now the case.  If this is SERVER_MERGED, the file is
+        * not up-to-date, and we indicate that by leaving the file there.
+        * I'm thinking of cases like "cvs update foo/foo.c foo".
+        */
+       if ((updated == SERVER_UPDATED
+            || updated == SERVER_PATCHED
+            || updated == SERVER_RCS_DIFF)
+           && filebuf == NULL
+           /* But if we are joining, we'll need the file when we call
+              join_file.  */
+           && !joining ())
+       {
+           if (CVS_UNLINK (finfo->file) < 0)
+               error (0, errno, "cannot remove temp file for %s",
+                      finfo->fullname);
+       }
+    }
+    else if (scratched_file != NULL && entries_line == NULL)
+    {
+       if (strcmp (scratched_file, finfo->file) != 0)
+           error (1, 0,
+                  "CVS server internal error: `%s' vs. `%s' scratched",
+                  scratched_file,
+                  finfo->file);
+       free (scratched_file);
+       scratched_file = NULL;
+
+       if (kill_scratched_file)
+           buf_output0 (protocol, "Removed ");
+       else
+           buf_output0 (protocol, "Remove-entry ");
+       output_dir (finfo->update_dir, finfo->repository);
+       buf_output0 (protocol, finfo->file);
+       buf_output (protocol, "\n", 1);
+       /* keep the vers structure up to date in case we do a join
+        * - if there isn't a file, it can't very well have a version number,
+        *   can it?
+        *
+        * we do it here on the assumption that since we just told the client
+        * to remove the file/entry, it will, and we want to remember that.
+        * If it fails, that's the client's problem, not ours
+        */
+       if (vers && vers->vn_user != NULL)
+       {
+           free (vers->vn_user);
+           vers->vn_user = NULL;
+       }
+       if (vers && vers->ts_user != NULL)
+       {
+           free (vers->ts_user);
+           vers->ts_user = NULL;
+       }
+    }
+    else if (scratched_file == NULL && entries_line == NULL)
+    {
+       /*
+        * This can happen with death support if we were processing
+        * a dead file in a checkout.
+        */
+    }
+    else
+       error (1, 0,
+              "CVS server internal error: Register *and* Scratch_Entry.\n");
+    buf_send_counted (protocol);
+}
+
+
+
+/* Return whether we should send operations on base files.  */
+bool
+server_use_bases (void)
+{
+    return supported_response ("Base-checkout");
+}
+
+
+
+/* Return whether we should send patches in RCS format.  */
+int
+server_use_rcs_diff (void)
+{
+    return supported_response ("Rcs-diff");
+}
+
+
+
+void
+server_set_entstat (const char *update_dir, const char *repository)
+{
+    static int set_static_supported = -1;
+    if (set_static_supported == -1)
+       set_static_supported = supported_response ("Set-static-directory");
+    if (!set_static_supported) return;
+
+    buf_output0 (protocol, "Set-static-directory ");
+    output_dir (update_dir, repository);
+    buf_output0 (protocol, "\n");
+    buf_send_counted (protocol);
+}
+
+
+
+void
+server_clear_entstat (const char *update_dir, const char *repository)
+{
+    static int clear_static_supported = -1;
+    if (clear_static_supported == -1)
+       clear_static_supported = supported_response ("Clear-static-directory");
+    if (!clear_static_supported) return;
+
+    if (noexec)
+       return;
+
+    buf_output0 (protocol, "Clear-static-directory ");
+    output_dir (update_dir, repository);
+    buf_output0 (protocol, "\n");
+    buf_send_counted (protocol);
+}
+
+
+
+void
+server_set_sticky (const char *update_dir, const char *repository,
+                   const char *tag, const char *date, int nonbranch)
+{
+    static int set_sticky_supported = -1;
+
+    assert (update_dir != NULL);
+
+    if (set_sticky_supported == -1)
+       set_sticky_supported = supported_response ("Set-sticky");
+    if (!set_sticky_supported) return;
+
+    if (noexec)
+       return;
+
+    if (tag == NULL && date == NULL)
+    {
+       buf_output0 (protocol, "Clear-sticky ");
+       output_dir (update_dir, repository);
+       buf_output0 (protocol, "\n");
+    }
+    else
+    {
+       buf_output0 (protocol, "Set-sticky ");
+       output_dir (update_dir, repository);
+       buf_output0 (protocol, "\n");
+       if (tag != NULL)
+       {
+           if (nonbranch)
+               buf_output0 (protocol, "N");
+           else
+               buf_output0 (protocol, "T");
+           buf_output0 (protocol, tag);
+       }
+       else
+       {
+           buf_output0 (protocol, "D");
+           buf_output0 (protocol, date);
+       }
+       buf_output0 (protocol, "\n");
+    }
+    buf_send_counted (protocol);
+}
+
+
+
+void
+server_edit_file (struct file_info *finfo)
+{
+    buf_output (protocol, "Edit-file ", 10);
+    output_dir (finfo->update_dir, finfo->repository);
+    buf_output0 (protocol, finfo->file);
+    buf_output (protocol, "\n", 1);
+    buf_send_counted (protocol);
+}
+
+
+
+struct template_proc_data
+{
+    const char *update_dir;
+    const char *repository;
+};
+
+static int
+template_proc (const char *repository, const char *template, void *closure)
+{
+    FILE *fp;
+    char buf[1024];
+    size_t n;
+    struct stat sb;
+    struct template_proc_data *data = (struct template_proc_data *)closure;
+
+    if (!supported_response ("Template"))
+       /* Might want to warn the user that the rcsinfo feature won't work.  */
+       return 0;
+    buf_output0 (protocol, "Template ");
+    output_dir (data->update_dir, data->repository);
+    buf_output0 (protocol, "\n");
+
+    fp = CVS_FOPEN (template, "rb");
+    if (fp == NULL)
+    {
+       error (0, errno, "Couldn't open rcsinfo template file %s", template);
+       return 1;
+    }
+    if (fstat (fileno (fp), &sb) < 0)
+    {
+       error (0, errno, "cannot stat rcsinfo template file %s", template);
+       return 1;
+    }
+    sprintf (buf, "%ld\n", (long) sb.st_size);
+    buf_output0 (protocol, buf);
+    while (!feof (fp))
+    {
+       n = fread (buf, 1, sizeof buf, fp);
+       buf_output (protocol, buf, n);
+       if (ferror (fp))
+       {
+           error (0, errno, "cannot read rcsinfo template file %s", template);
+           (void) fclose (fp);
+           return 1;
+       }
+    }
+    buf_send_counted (protocol);
+    if (fclose (fp) < 0)
+       error (0, errno, "cannot close rcsinfo template file %s", template);
+    return 0;
+}
+
+
+
+void
+server_clear_template (const char *update_dir, const char *repository)
+{
+    assert (update_dir != NULL);
+
+    if (noexec)
+       return;
+
+    if (!supported_response ("Clear-template") &&
+       !supported_response ("Template"))
+       /* Might want to warn the user that the rcsinfo feature won't work.  */
+       return;
+
+    if (supported_response ("Clear-template"))
+    {
+       buf_output0 (protocol, "Clear-template ");
+       output_dir (update_dir, repository);
+       buf_output0 (protocol, "\n");
+       buf_send_counted (protocol);
+    }
+    else
+    {
+       buf_output0 (protocol, "Template ");
+       output_dir (update_dir, repository);
+       buf_output0 (protocol, "\n");
+       buf_output0 (protocol, "0\n");
+       buf_send_counted (protocol);
+    }
+}
+
+
+
+void
+server_template (const char *update_dir, const char *repository)
+{
+    struct template_proc_data data;
+    data.update_dir = update_dir;
+    data.repository = repository;
+    (void) Parse_Info (CVSROOTADM_RCSINFO, repository, template_proc,
+                      PIOPT_ALL, &data);
+}
+
+
+
+static void
+serve_gzip_contents (char *arg)
+{
+    int level;
+    bool forced = false;
+
+# ifdef PROXY_SUPPORT
+    assert (!proxy_log);
+# endif /* PROXY_SUPPORT */
+
+    level = atoi (arg);
+    if (level == 0)
+       level = 6;
+
+    if (config && level < config->MinCompressionLevel)
+    {
+       level = config->MinCompressionLevel;
+       forced = true;
+    }
+    if (config && level > config->MaxCompressionLevel)
+    {
+       level = config->MaxCompressionLevel;
+       forced = true;
+    }
+
+    if (forced && !quiet
+       && alloc_pending_warning (120 + strlen (program_name)))
+       sprintf (pending_warning_text,
+"E %s server: Forcing compression level %d (allowed: %d <= z <= %d).",
+                program_name, level, config->MinCompressionLevel,
+                config->MaxCompressionLevel);
+
+    gzip_level = file_gzip_level = level;
+}
+
+
+
+static void
+serve_gzip_stream (char *arg)
+{
+    int level;
+    bool forced = false;
+
+    level = atoi (arg);
+
+    if (config && level < config->MinCompressionLevel)
+    {
+       level = config->MinCompressionLevel;
+       forced = true;
+    }
+    if (config && level > config->MaxCompressionLevel)
+    {
+       level = config->MaxCompressionLevel;
+       forced = true;
+    }
+
+    if (forced && !quiet
+       && alloc_pending_warning (120 + strlen (program_name)))
+       sprintf (pending_warning_text,
+"E %s server: Forcing compression level %d (allowed: %d <= z <= %d).",
+                program_name, level, config->MinCompressionLevel,
+                config->MaxCompressionLevel);
+       
+    gzip_level = level;
+
+    /* All further communication with the client will be compressed.
+     *
+     * The deflate buffers need to be initialized even for compression level
+     * 0, or the client will no longer be able to understand us.  At
+     * compression level 0, the correct compression headers will be created and
+     * sent, but data will thereafter simply be copied to the network buffers.
+     */
+
+    /* This needs to be processed in both passes so that we may continue to
+     * understand client requests on both the socket and from the log.
+     */
+    buf_from_net = compress_buffer_initialize (buf_from_net, 1,
+                                              0 /* Not used. */,
+                                              buf_from_net->memory_error);
+
+    /* This needs to be skipped in subsequent passes to avoid compressing data
+     * to the client twice.
+     */
+# ifdef PROXY_SUPPORT
+    if (reprocessing) return;
+# endif /* PROXY_SUPPORT */
+    buf_to_net = compress_buffer_initialize (buf_to_net, 0, level,
+                                            buf_to_net->memory_error);
+}
+
+
+
+/* Tell the client about RCS options set in CVSROOT/cvswrappers. */
+static void
+serve_wrapper_sendme_rcs_options (char *arg)
+{
+    /* Actually, this is kind of sdrawkcab-ssa: the client wants
+     * verbatim lines from a cvswrappers file, but the server has
+     * already parsed the cvswrappers file into the wrap_list struct.
+     * Therefore, the server loops over wrap_list, unparsing each
+     * entry before sending it.
+     */
+    char *wrapper_line = NULL;
+
+# ifdef PROXY_SUPPORT
+    if (reprocessing) return;
+# endif /* PROXY_SUPPORT */
+
+    wrap_setup ();
+
+    for (wrap_unparse_rcs_options (&wrapper_line, 1);
+        wrapper_line;
+        wrap_unparse_rcs_options (&wrapper_line, 0))
+    {
+       buf_output0 (buf_to_net, "Wrapper-rcsOption ");
+       buf_output0 (buf_to_net, wrapper_line);
+       buf_output0 (buf_to_net, "\012");;
+       free (wrapper_line);
+    }
+
+    buf_output0 (buf_to_net, "ok\012");
+
+    /* The client is waiting for us, so we better send the data now.  */
+    buf_flush (buf_to_net, 1);
+}
+
+
+
+static void
+serve_ignore (char *arg)
+{
+    /*
+     * Just ignore this command.  This is used to support the
+     * update-patches command, which is not a real command, but a signal
+     * to the client that update will accept the -u argument.
+     */
+# ifdef PROXY_SUPPORT
+    assert (!proxy_log);
+# endif /* PROXY_SUPPORT */
+}
+
+
+
+static int
+expand_proc (int argc, char **argv, char *where, char *mwhere, char *mfile, 
int shorten, int local_specified, char *omodule, char *msg)
+{
+    int i;
+    char *dir = argv[0];
+
+    /* If mwhere has been specified, the thing we're expanding is a
+       module -- just return its name so the client will ask for the
+       right thing later.  If it is an alias or a real directory,
+       mwhere will not be set, so send out the appropriate
+       expansion. */
+
+    if (mwhere != NULL)
+    {
+       buf_output0 (buf_to_net, "Module-expansion ");
+       if (server_dir != NULL)
+       {
+           buf_output0 (buf_to_net, server_dir);
+           buf_output0 (buf_to_net, "/");
+       }
+       buf_output0 (buf_to_net, mwhere);
+       if (mfile != NULL)
+       {
+           buf_append_char (buf_to_net, '/');
+           buf_output0 (buf_to_net, mfile);
+       }
+       buf_append_char (buf_to_net, '\n');
+    }
+    else
+    {
+       /* We may not need to do this anymore -- check the definition
+          of aliases before removing */
+       if (argc == 1)
+       {
+           buf_output0 (buf_to_net, "Module-expansion ");
+           if (server_dir != NULL)
+           {
+               buf_output0 (buf_to_net, server_dir);
+               buf_output0 (buf_to_net, "/");
+           }
+           buf_output0 (buf_to_net, dir);
+           buf_append_char (buf_to_net, '\n');
+       }
+       else
+       {
+           for (i = 1; i < argc; ++i)
+           {
+               buf_output0 (buf_to_net, "Module-expansion ");
+               if (server_dir != NULL)
+               {
+                   buf_output0 (buf_to_net, server_dir);
+                   buf_output0 (buf_to_net, "/");
+               }
+               buf_output0 (buf_to_net, dir);
+               buf_append_char (buf_to_net, '/');
+               buf_output0 (buf_to_net, argv[i]);
+               buf_append_char (buf_to_net, '\n');
+           }
+       }
+    }
+    return 0;
+}
+
+
+
+static void
+serve_expand_modules (char *arg)
+{
+    int i;
+    int err = 0;
+    DBM *db;
+
+# ifdef PROXY_SUPPORT
+    /* This needs to be processed in the first pass since the client expects a
+     * response but we may not yet know if we are a secondary.
+     *
+     * On the second pass, we still must make sure to ignore the arguments.
+     */
+    if (!reprocessing)
+# endif /* PROXY_SUPPORT */
+    {
+       err = 0;
+
+       db = open_module ();
+       for (i = 1; i < argument_count; i++)
+           err += do_module (db, argument_vector[i],
+                             CHECKOUT, "Updating", expand_proc,
+                             NULL, 0, 0, 0, 0, NULL);
+       close_module (db);
+    }
+
+    {
+       /* argument_vector[0] is a dummy argument, we don't mess with it.  */
+       char **cp;
+       for (cp = argument_vector + 1;
+            cp < argument_vector + argument_count;
+            ++cp)
+           free (*cp);
+
+       argument_count = 1;
+    }
+
+# ifdef PROXY_SUPPORT
+    if (!reprocessing)
+# endif /* PROXY_SUPPORT */
+    {
+       if (err)
+           /* We will have printed an error message already.  */
+           buf_output0 (buf_to_net, "error  \n");
+       else
+           buf_output0 (buf_to_net, "ok\n");
+
+       /* The client is waiting for the module expansions, so we must
+          send the output now.  */
+       buf_flush (buf_to_net, 1);
+    }
+}
+
+
+
+/* Decide if we should redirect the client to another server.
+ *
+ * GLOBALS
+ *   config->PrimaryServer     The server to redirect write requests to, if
+ *                             any.
+ *
+ * ASSUMPTIONS
+ *   The `Root' request has already been processed.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+static void
+serve_command_prep (char *arg)
+{
+    bool redirect_supported;
+# ifdef PROXY_SUPPORT
+    bool ditch_log;
+# endif /* PROXY_SUPPORT */
+
+    if (print_pending_error ()) return;
+
+    redirect_supported = supported_response ("Redirect");
+    if (redirect_supported
+       && lookup_command_attribute (arg) & CVS_CMD_MODIFIES_REPOSITORY
+       /* I call isProxyServer() last because it can probably be the slowest
+        * call due to the call to gethostbyname().
+        */
+       && isProxyServer ())
+    {
+       /* Before sending a redirect, send a "Referrer" line to the client,
+        * if possible, to give admins more control over canonicalizing roots
+        * sent from the client.
+        */
+       if (supported_response ("Referrer"))
+       {
+           /* assume :ext:, since that is all we currently support for
+            * proxies and redirection.
+            */
+           char *referrer = Xasprintf (":ext:address@hidden", getcaller(),
+                                       server_hostname,
+                                       current_parsed_root->directory);
+
+           buf_output0 (buf_to_net, "Referrer ");
+           buf_output0 (buf_to_net, referrer);
+           buf_output0 (buf_to_net, "\n");
+
+           free (referrer);
+       }
+
+       /* Send `Redirect' to redirect client requests to the primary.  */
+       buf_output0 (buf_to_net, "Redirect ");
+       buf_output0 (buf_to_net, config->PrimaryServer->original);
+       buf_output0 (buf_to_net, "\n");
+       buf_flush (buf_to_net, 1);
+# ifdef PROXY_SUPPORT
+       ditch_log = true;
+# endif /* PROXY_SUPPORT */
+    }
+    else
+    {
+       /* Send `ok' so the client can proceed.  */
+       buf_output0 (buf_to_net, "ok\n");
+       buf_flush (buf_to_net, 1);
+# ifdef PROXY_SUPPORT
+       if (lookup_command_attribute (arg) & CVS_CMD_MODIFIES_REPOSITORY
+            && isProxyServer ())
+           /* Don't ditch the log for write commands on a proxy server.  We
+            * we got here because the `Redirect' response was not supported.
+            */
+           ditch_log = false;
+       else
+           ditch_log = true;
+# endif /* PROXY_SUPPORT */
+    }
+# ifdef PROXY_SUPPORT
+    if (proxy_log && ditch_log)
+    {
+       /* If the client supported the redirect response, then they will always
+        * be redirected if they are preparing for a write request.  It is
+        * therefore safe to close the proxy logs.
+        *
+        * If the client is broken and ignores the redirect, this will be
+        * detected later, in rewind_buf_from_net().
+        *
+        * Since a `Command-prep' response is only acceptable immediately
+        * following the `Root' request according to the specification, there
+        * is no need to rewind the log and reprocess.
+        */
+       log_buffer_closelog (proxy_log);
+       log_buffer_closelog (proxy_log_out);
+       proxy_log = NULL;
+    }
+# endif /* PROXY_SUPPORT */
+}
+
+
+
+/* Save a referrer, potentially for passing to hook scripts later.
+ *
+ * GLOBALS
+ *   referrer  Where we save the parsed referrer.
+ *
+ * ASSUMPTIONS
+ *   The `Root' request has already been processed.
+ *   There is no need to dispose of REFERRER if it is set.  It's memory is
+ *   tracked by parse_root().
+ *
+ * RETURNS
+ *   Nothing.
+ */
+static void
+serve_referrer (char *arg)
+{
+    if (error_pending ()) return;
+
+    referrer = parse_cvsroot (arg);
+
+    if (!referrer
+       && alloc_pending (80 + strlen (arg)))
+       sprintf (pending_error_text,
+                "E Protocol error: Invalid Referrer: `%s'",
+                arg);
+}
+
+
+
+static void serve_valid_requests (char *arg);
+
+#endif /* SERVER_SUPPORT */
+/*
+ * Comment to move position of the following #if line which works
+ * around an apparent bug in Microsoft Visual C++ 6.0 compiler.
+ */
+#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
+/*
+ * Parts of this table are shared with the client code,
+ * but the client doesn't need to know about the handler
+ * functions.
+ */
+
+struct request requests[] =
+{
+#ifdef SERVER_SUPPORT
+#define REQ_LINE(n, f, s) {n, f, s}
+#else
+#define REQ_LINE(n, f, s) {n, s}
+#endif
+
+  REQ_LINE("Root", serve_root, RQ_ESSENTIAL | RQ_ROOTLESS),
+  REQ_LINE("Valid-responses", serve_valid_responses,
+          RQ_ESSENTIAL | RQ_ROOTLESS),
+  REQ_LINE("valid-requests", serve_valid_requests,
+          RQ_ESSENTIAL | RQ_ROOTLESS),
+  REQ_LINE("Command-prep", serve_command_prep, 0),
+  REQ_LINE("Referrer", serve_referrer, 0),
+  REQ_LINE("Repository", serve_repository, 0),
+  REQ_LINE("Directory", serve_directory, RQ_ESSENTIAL),
+  REQ_LINE("Relative-directory", serve_directory, 0),
+  REQ_LINE("Max-dotdot", serve_max_dotdot, 0),
+  REQ_LINE("Static-directory", serve_static_directory, 0),
+  REQ_LINE("Sticky", serve_sticky, 0),
+  REQ_LINE("Entry", serve_entry, RQ_ESSENTIAL),
+  REQ_LINE("Kopt", serve_kopt, 0),
+  REQ_LINE("Checkin-time", serve_checkin_time, 0),
+  REQ_LINE("Modified", serve_modified, RQ_ESSENTIAL),
+  REQ_LINE("Signature", serve_signature, 0),
+  REQ_LINE("Is-modified", serve_is_modified, 0),
+
+  /* The client must send this request to interoperate with CVS 1.5
+     through 1.9 servers.  The server must support it (although it can
+     be and is a noop) to interoperate with CVS 1.5 to 1.9 clients.  */
+  REQ_LINE("UseUnchanged", serve_enable_unchanged, RQ_ENABLEME | RQ_ROOTLESS),
+
+  REQ_LINE("Unchanged", serve_unchanged, RQ_ESSENTIAL),
+  REQ_LINE("Notify", serve_notify, 0),
+  REQ_LINE("Hostname", serve_hostname, 0),
+  REQ_LINE("LocalDir", serve_localdir, 0),
+  REQ_LINE("Questionable", serve_questionable, 0),
+  REQ_LINE("Argument", serve_argument, RQ_ESSENTIAL),
+  REQ_LINE("Argumentx", serve_argumentx, RQ_ESSENTIAL),
+  REQ_LINE("Global_option", serve_global_option, RQ_ROOTLESS),
+  /* This is rootless, even though the client/server spec does not specify
+   * such, to allow error messages to be understood by the client when they are
+   * sent.
+   */
+  REQ_LINE("Gzip-stream", serve_gzip_stream, RQ_ROOTLESS),
+  REQ_LINE("wrapper-sendme-rcsOptions",
+          serve_wrapper_sendme_rcs_options,
+          0),
+  REQ_LINE("Set", serve_set, RQ_ROOTLESS),
+#ifdef ENCRYPTION
+  /* These are rootless despite what the client/server spec says for the same
+   * reasons as Gzip-stream.
+   */
+#  ifdef HAVE_KERBEROS
+  REQ_LINE("Kerberos-encrypt", serve_kerberos_encrypt, RQ_ROOTLESS),
+#  endif
+#  ifdef HAVE_GSSAPI
+  REQ_LINE("Gssapi-encrypt", serve_gssapi_encrypt, RQ_ROOTLESS),
+#  endif
+#endif
+#ifdef HAVE_GSSAPI
+  REQ_LINE("Gssapi-authenticate", serve_gssapi_authenticate, RQ_ROOTLESS),
+#endif
+  REQ_LINE("expand-modules", serve_expand_modules, 0),
+  REQ_LINE("ci", serve_ci, RQ_ESSENTIAL),
+  REQ_LINE("co", serve_co, RQ_ESSENTIAL),
+  REQ_LINE("update", serve_update, RQ_ESSENTIAL),
+  REQ_LINE("diff", serve_diff, 0),
+  REQ_LINE("log", serve_log, 0),
+  REQ_LINE("rlog", serve_rlog, 0),
+  REQ_LINE("list", serve_ls, 0),
+  REQ_LINE("rlist", serve_rls, 0),
+  /* This allows us to avoid sending `-q' as a command argument to `cvs ls',
+   * or more accurately, allows us to send `-q' to backwards CVSNT servers.
+   */
+  REQ_LINE("global-list-quiet", serve_noop, RQ_ROOTLESS),
+  /* Deprecated synonym for rlist, for compatibility with CVSNT. */
+  REQ_LINE("ls", serve_rls, 0),
+  REQ_LINE("add", serve_add, 0),
+  REQ_LINE("remove", serve_remove, 0),
+  REQ_LINE("update-patches", serve_ignore, 0),
+  REQ_LINE("gzip-file-contents", serve_gzip_contents, RQ_ROOTLESS),
+  REQ_LINE("status", serve_status, 0),
+  REQ_LINE("rdiff", serve_rdiff, 0),
+  REQ_LINE("tag", serve_tag, 0),
+  REQ_LINE("rtag", serve_rtag, 0),
+  REQ_LINE("import", serve_import, 0),
+  REQ_LINE("admin", serve_admin, 0),
+  REQ_LINE("export", serve_export, 0),
+  REQ_LINE("history", serve_history, 0),
+  REQ_LINE("release", serve_release, 0),
+  REQ_LINE("watch-on", serve_watch_on, 0),
+  REQ_LINE("watch-off", serve_watch_off, 0),
+  REQ_LINE("watch-add", serve_watch_add, 0),
+  REQ_LINE("watch-remove", serve_watch_remove, 0),
+  REQ_LINE("watchers", serve_watchers, 0),
+  REQ_LINE("editors", serve_editors, 0),
+  REQ_LINE("edit", serve_edit, 0),
+  REQ_LINE("init", serve_init, RQ_ROOTLESS),
+  REQ_LINE("annotate", serve_annotate, 0),
+  REQ_LINE("rannotate", serve_rannotate, 0),
+  REQ_LINE("noop", serve_noop, RQ_ROOTLESS),
+  REQ_LINE("version", serve_version, RQ_ROOTLESS),
+  REQ_LINE(NULL, NULL, 0)
+
+#undef REQ_LINE
+};
+#endif /* SERVER_SUPPORT or CLIENT_SUPPORT */
+
+
+
+#ifdef SERVER_SUPPORT
+/*
+ * This server request is not ignored by the secondary.
+ */
+static void
+serve_valid_requests (char *arg)
+{
+    struct request *rq;
+
+    /* Since this is processed in the first pass, don't reprocess it in the
+     * second.
+     *
+     * We still print errors since new errors could have been generated in the
+     * second pass.
+     */
+    if (print_pending_error ()
+#ifdef PROXY_SUPPORT
+       || reprocessing
+#endif /* PROXY_SUPPORT */
+       )
+       return;
+
+    buf_output0 (buf_to_net, "Valid-requests");
+    for (rq = requests; rq->name != NULL; rq++)
+    {
+       if (rq->func != NULL)
+       {
+           buf_append_char (buf_to_net, ' ');
+           buf_output0 (buf_to_net, rq->name);
+       }
+    }
+
+    if (config && config->MinCompressionLevel
+       && supported_response ("Force-gzip"))
+    {
+           buf_output0 (buf_to_net, "\n");
+           buf_output0 (buf_to_net, "Force-gzip");
+    }
+
+    buf_output0 (buf_to_net, "\nok\n");
+
+    /* The client is waiting for the list of valid requests, so we
+       must send the output now.  */
+    buf_flush (buf_to_net, 1);
+}
+
+
+
+#ifdef SUNOS_KLUDGE
+/*
+ * Delete temporary files.  SIG is the signal making this happen, or
+ * 0 if not called as a result of a signal.
+ */
+static int command_pid_is_dead;
+static void wait_sig (int sig)
+{
+    int status;
+    pid_t r = wait (&status);
+    if (r == command_pid)
+       command_pid_is_dead++;
+}
+#endif /* SUNOS_KLUDGE */
+
+
+
+/*
+ * This function cleans up after the server.  Specifically, it:
+ *
+ * <ol>
+ * <li>Sets BUF_TO_NET to blocking and fluxhes it.</li>
+ * <li>With SUNOS_KLUDGE enabled:
+ *   <ol>
+ *   <li>Terminates the command process.</li>
+ *   <li>Waits on the command process, draining output as necessary.</li>
+ *   </ol>
+ * </li>
+ * <li>Removes the temporary directory.</li>
+ * <li>Flush and shutdown the buffers.</li>
+ * <li>Set ERROR_USE_PROTOCOL and SERVER_ACTIVE to false.</li>
+ * </ol>
+ *
+ * NOTES
+ *   This function needs to be reentrant since a call to exit() can cause a
+ *   call to this function, which can then be interrupted by a signal, which
+ *   can cause a second call to this function.
+ *
+ * GLOBALS
+ *   buf_from_net              The input buffer which brings data from the
+ *                             CVS client.
+ *   buf_to_net                        The output buffer which moves data to 
the CVS
+ *                             client.
+ *   error_use_protocol                Set when the server parent process is 
active.
+ *                             Cleared for the server child processes.
+ *   dont_delete_temp          Set when a core dump of a child process is
+ *                             detected so that the core and related data may
+ *                             be preserved.
+ *   noexec                    Whether we are supposed to change the disk.
+ *   orig_server_temp_dir      The temporary directory we created within
+ *                             Tmpdir for our duplicate of the client
+ *                             workspace.
+ *
+ * INPUTS
+ *   None.
+ *
+ * ERRORS
+ *   Problems encountered during the cleanup, for instance low memory or
+ *   problems deleting the temp files and directories, can cause the error
+ *   function to be called, which might call exit.  If exit gets called in this
+ *   manner. this routine will not complete, but the other exit handlers
+ *   registered via atexit() will still run.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+void
+server_cleanup (void)
+{
+    TRACE (TRACE_FUNCTION, "server_cleanup()");
+
+    assert (server_active);
+
+    /* FIXME: Do not perform buffered I/O from an interrupt handler like
+     * this (via error).  However, I'm leaving the error-calling code there
+     * in the hope that on the rare occasion the error call is actually made
+     * (e.g., a fluky I/O error or permissions problem prevents the deletion
+     * of a just-created file) reentrancy won't be an issue.
+     */
+
+    /* We don't want to be interrupted during calls which set globals to NULL,
+     * but we know that by the time we reach this function, interrupts have
+     * already been blocked.
+     */
+
+    /* Since we install this function in an atexit() handler before forking,
+     * reuse the ERROR_USE_PROTOCOL flag, which we know is only set in the
+     * parent server process, to avoid cleaning up the temp space multiple
+     * times.  Skip the buf_to_net checks too as an optimization since we know
+     * they will be set to NULL in the child process anyhow.
+     */
+    if (error_use_protocol)
+    {
+       if (buf_to_net != NULL)
+       {
+           int status;
+
+           /* Since we're done, go ahead and put BUF_TO_NET back into blocking
+            * mode and send any pending output.  In the usual case there won't
+            * won't be any, but there might be if an error occured.
+            */
+
+           set_block (buf_to_net);
+           buf_flush (buf_to_net, 1);
+
+           /* Next we shut down BUF_FROM_NET.  That will pick up the checksum
+            * generated when the client shuts down its buffer.  Then, after we
+            * have generated any final output, we shut down BUF_TO_NET.
+            */
+
+           /* SIG_beginCrSect(); */
+           if (buf_from_net)
+           {
+               status = buf_shutdown (buf_from_net);
+               if (status != 0)
+                   error (0, status, "shutting down buffer from client");
+               buf_free (buf_from_net);
+               buf_from_net = NULL;
+           }
+           /* SIG_endCrSect(); */
+       }
+
+       if (!dont_delete_temp)
+       {
+           int save_noexec;
+
+           /* What a bogus kludge.  This disgusting code makes all kinds of
+              assumptions about SunOS, and is only for a bug in that system.
+              So only enable it on Suns.  */
+#ifdef SUNOS_KLUDGE
+           if (command_pid > 0)
+           {
+               /* To avoid crashes on SunOS due to bugs in SunOS tmpfs
+                * triggered by the use of rename() in RCS, wait for the
+                * subprocess to die.  Unfortunately, this means draining
+                * output while waiting for it to unblock the signal we sent
+                * it.  Yuck!
+                */
+               int status;
+               pid_t r;
+
+               signal (SIGCHLD, wait_sig);
+               /* Perhaps SIGTERM would be more correct.  But the child
+                  process will delay the SIGINT delivery until its own
+                  children have exited.  */
+               kill (command_pid, SIGINT);
+               /* The caller may also have sent a signal to command_pid, so
+                * always try waiting.  First, though, check and see if it's
+                * still there....
+                */
+           do_waitpid:
+               r = waitpid (command_pid, &status, WNOHANG);
+               if (r == 0)
+                   ;
+               else if (r == command_pid)
+                   command_pid_is_dead++;
+               else if (r == -1)
+                   switch (errno)
+                   {
+                       case ECHILD:
+                           command_pid_is_dead++;
+                           break;
+                       case EINTR:
+                           goto do_waitpid;
+                   }
+               else
+                   /* waitpid should always return one of the above values */
+                   abort ();
+               while (!command_pid_is_dead)
+               {
+                   struct timeval timeout;
+                   struct fd_set_wrapper readfds;
+                   char buf[100];
+                   int i;
+
+                   /* Use a non-zero timeout to avoid eating up CPU cycles.  */
+                   timeout.tv_sec = 2;
+                   timeout.tv_usec = 0;
+                   readfds = command_fds_to_drain;
+                   switch (select (max_command_fd + 1, &readfds.fds,
+                                   NULL, NULL &timeout))
+                   {
+                       case -1:
+                           if (errno != EINTR)
+                               abort ();
+                       case 0:
+                           /* timeout */
+                           break;
+                       case 1:
+                           for (i = 0; i <= max_command_fd; i++)
+                           {
+                               if (!FD_ISSET (i, &readfds.fds))
+                                   continue;
+                               /* this fd is non-blocking */
+                               while (read (i, buf, sizeof (buf)) >= 1)
+                                   ;
+                           }
+                           break;
+                       default:
+                           abort ();
+                   }
+               }
+           }
+#endif /* SUNOS_KLUDGE */
+
+           /* Make sure our working directory isn't inside the tree we're
+              going to delete.  */
+           CVS_CHDIR (get_cvs_tmp_dir ());
+
+           /* Temporarily clear noexec, so that we clean up our temp directory
+              regardless of it (this could more cleanly be handled by moving
+              the noexec check to all the unlink_file_dir callers from
+              unlink_file_dir itself).  */
+           save_noexec = noexec;
+
+           /* SIG_beginCrSect(); */
+           noexec = 0;
+           unlink_file_dir (orig_server_temp_dir);
+           noexec = save_noexec;
+           /* SIG_endCrSect(); */
+       } /* !dont_delete_temp */
+
+       /* SIG_beginCrSect(); */
+       if (buf_to_net != NULL)
+       {
+           /* Save BUF_TO_NET and set the global pointer to NULL so that any
+            * error messages generated during shutdown go to the syslog rather
+            * than getting lost.
+            */
+           struct buffer *buf_to_net_save = buf_to_net;
+           error_use_protocol = 0;
+           buf_to_net = NULL;
+
+           (void) buf_flush (buf_to_net_save, 1);
+           (void) buf_shutdown (buf_to_net_save);
+           buf_free (buf_to_net_save);
+       }
+       /* SIG_endCrSect(); */
+    }
+
+    server_active = 0;
+}
+
+
+
+#ifdef PROXY_SUPPORT
+size_t MaxProxyBufferSize = (size_t)(8 * 1024 * 1024); /* 8 megabytes,
+                                                        * by default.
+                                                        */
+#endif /* PROXY_SUPPORT */
+
+static const char *const server_usage[] =
+{
+    "Usage: %s %s [-c config-file]\n",
+    "\t-c config-file\tPath to an alternative CVS config file.\n",
+    "Normally invoked by a cvs client on a remote machine.\n",
+    NULL
+};
+
+
+
+void
+parseServerOptions (int argc, char **argv)
+{
+    int c;
+
+    optind = 0;
+    while ((c = getopt (argc, argv, "+c:")) != -1)
+    {
+       switch (c)
+       {
+#ifdef ALLOW_CONFIG_OVERRIDE
+           case 'c':
+               if (gConfigPath) free (gConfigPath);
+               gConfigPath = xstrdup (optarg);
+               break;
+#endif
+           case '?':
+           default:
+               usage (server_usage);
+               break;
+       }
+    }
+}
+
+
+
+int
+server (int argc, char **argv)
+{
+    char *error_prog_name;             /* Used in error messages */
+
+    if (argc == -1)
+       usage (server_usage);
+
+    /* Options were pre-parsed in main.c.  */
+
+    /*
+     * Set this in .bashrc if you want to give yourself time to attach
+     * to the subprocess with a debugger.
+     */
+    if (getenv ("CVS_PARENT_SERVER_SLEEP"))
+    {
+       int secs = atoi (getenv ("CVS_PARENT_SERVER_SLEEP"));
+       TRACE (TRACE_DATA, "Sleeping CVS_PARENT_SERVER_SLEEP (%d) seconds",
+              secs);
+       sleep (secs);
+    }
+    else
+       TRACE (TRACE_DATA, "CVS_PARENT_SERVER_SLEEP not set.");
+
+    /* pserver_authenticate_connection () (called from main ()) can initialize
+     * these.
+     */
+    if (!buf_to_net)
+    {
+       buf_to_net = fd_buffer_initialize (STDOUT_FILENO, 0, NULL, false,
+                                          outbuf_memory_error);
+       buf_from_net = fd_buffer_initialize (STDIN_FILENO, 0, NULL, true,
+                                            outbuf_memory_error);
+    }
+
+    setup_logfiles ("CVS_SERVER_LOG", &buf_to_net, &buf_from_net);
+
+#ifdef PROXY_SUPPORT
+    /* We have to set up the recording for all servers.  Until we receive the
+     * `Root' request and load CVSROOT/config, we can't tell if we are a
+     * secondary or primary.
+     */
+    {
+       /* Open the secondary log.  */
+       buf_from_net = log_buffer_initialize (buf_from_net, NULL,
+# ifdef PROXY_SUPPORT
+                                             true,
+                                             config
+                                               ? config->MaxProxyBufferSize
+                                               : MaxProxyBufferSize,
+# endif /* PROXY_SUPPORT */
+                                             true, outbuf_memory_error);
+       proxy_log = buf_from_net;
+
+       /* And again for the out log.  */
+       buf_to_net = log_buffer_initialize (buf_to_net, NULL,
+# ifdef PROXY_SUPPORT
+                                           true,
+                                           config
+                                             ? config->MaxProxyBufferSize
+                                             : MaxProxyBufferSize,
+# endif /* PROXY_SUPPORT */
+                                           false, outbuf_memory_error);
+       proxy_log_out = buf_to_net;
+    }
+#endif /* PROXY_SUPPORT */
+
+    saved_output = buf_nonio_initialize (outbuf_memory_error);
+    saved_outerr = buf_nonio_initialize (outbuf_memory_error);
+
+    /* Since we're in the server parent process, error should use the
+       protocol to report error messages.  */
+    error_use_protocol = 1;
+
+    /* Now initialize our argument vector (for arguments from the client).  */
+
+    /* Small for testing.  */
+    argument_vector_size = 1;
+    argument_vector = xmalloc (argument_vector_size * sizeof (char *));
+    argument_count = 1;
+    /* This gets printed if the client supports an option which the
+       server doesn't, causing the server to print a usage message.
+       FIXME: just a nit, I suppose, but the usage message the server
+       prints isn't literally true--it suggests "cvs server" followed
+       by options which are for a particular command.  Might be nice to
+       say something like "client apparently supports an option not supported
+       by this server" or something like that instead of usage message.  */
+    error_prog_name = xmalloc (strlen (program_name) + 8);
+    sprintf(error_prog_name, "%s server", program_name);
+    argument_vector[0] = error_prog_name;
+
+    while (1)
+    {
+       char *cmd, *orig_cmd;
+       struct request *rq;
+       int status;
+
+       status = buf_read_line (buf_from_net, &cmd, NULL);
+       if (status == -2)
+       {
+           buf_output0 (buf_to_net, "E Fatal server error, aborting.\n\
+error ENOMEM Virtual memory exhausted.\n");
+           break;
+       }
+       if (status != 0)
+           break;
+
+       orig_cmd = cmd;
+       for (rq = requests; rq->name != NULL; ++rq)
+           if (strncmp (cmd, rq->name, strlen (rq->name)) == 0)
+           {
+               int len = strlen (rq->name);
+               if (cmd[len] == '\0')
+                   cmd += len;
+               else if (cmd[len] == ' ')
+                   cmd += len + 1;
+               else
+                   /*
+                    * The first len characters match, but it's a different
+                    * command.  e.g. the command is "cooperate" but we matched
+                    * "co".
+                    */
+                   continue;
+
+               if (!(rq->flags & RQ_ROOTLESS)
+                   && current_parsed_root == NULL)
+               {
+                   if (alloc_pending (80))
+                       sprintf (pending_error_text,
+                                "E Protocol error: Root request missing");
+               }
+               else
+               {
+                   if (config && config->MinCompressionLevel && !gzip_level
+                       && !(rq->flags & RQ_ROOTLESS))
+                   {
+                       /* This is a rootless request, a minimum compression
+                        * level has been configured, and no compression has
+                        * been requested by the client.
+                        */
+                       if (alloc_pending (80 + strlen (program_name)))
+                           sprintf (pending_error_text,
+"E %s [server aborted]: Compression must be used with this server.",
+                                    program_name);
+                   }
+                   (*rq->func) (cmd);
+               }
+               break;
+           }
+       if (rq->name == NULL)
+       {
+           if (!print_pending_error ())
+           {
+               buf_output0 (buf_to_net, "error  unrecognized request `");
+               buf_output0 (buf_to_net, cmd);
+               buf_append_char (buf_to_net, '\'');
+               buf_append_char (buf_to_net, '\n');
+           }
+       }
+       free (orig_cmd);
+    }
+
+    free (error_prog_name);
+
+    /* We expect the client is done talking to us at this point.  If there is
+     * any data in the buffer or on the network pipe, then something we didn't
+     * prepare for is happening.
+     */
+    if (!buf_empty (buf_from_net))
+    {
+       /* Try to send the error message to the client, but also syslog it, in
+        * case the client isn't listening anymore.
+        */
+#ifdef HAVE_SYSLOG_H
+       /* FIXME: Can the IP address of the connecting client be retrieved
+        * and printed here?
+        */
+       syslog (LOG_DAEMON | LOG_ERR, "Dying gasps received from client.");
+#endif /* HAVE_SYSLOG_H */
+       error (0, 0, "Dying gasps received from client.");
+    }
+
+#ifdef HAVE_PAM
+    if (pamh)
+    {
+        int retval;
+
+        retval = pam_close_session (pamh, 0);
+# ifdef HAVE_SYSLOG_H
+        if (retval != PAM_SUCCESS)
+            syslog (LOG_DAEMON | LOG_ERR, 
+                    "PAM close session error: %s",
+                    pam_strerror (pamh, retval));
+# endif /* HAVE_SYSLOG_H */
+
+        retval = pam_end (pamh, retval);
+# ifdef HAVE_SYSLOG_H
+        if (retval != PAM_SUCCESS)
+            syslog (LOG_DAEMON | LOG_ERR, 
+                    "PAM failed to release authenticator, error: %s",
+                    pam_strerror (pamh, retval));
+# endif /* HAVE_SYSLOG_H */
+    }
+#endif /* HAVE_PAM */
+
+    /* server_cleanup() will be called on a normal exit and close the buffers
+     * explicitly.
+     */
+    return 0;
+}
+
+
+
+#if defined (HAVE_KERBEROS) || defined (AUTH_SERVER_SUPPORT) || defined 
(HAVE_GSSAPI)
+static void
+switch_to_user (const char *cvs_username, const char *username)
+{
+    struct passwd *pw;
+#ifdef HAVE_PAM
+    int retval;
+    char *pam_stage = "open session";
+
+    if (pamh)
+    {
+        retval = pam_open_session (pamh, 0);
+        if (retval == PAM_SUCCESS)
+        {
+            pam_stage = "get pam user";
+            retval = pam_get_item (pamh, PAM_USER, (const void **)&username);
+        }
+
+        if (retval != PAM_SUCCESS)
+        {
+            printf("E PAM %s error: %s\n", pam_stage,
+                    pam_strerror (pamh, retval));
+            exit (EXIT_FAILURE);
+        }
+    }
+#endif
+
+    pw = getpwnam (username);
+    if (pw == NULL)
+    {
+       /* check_password contains a similar check, so this usually won't be
+          reached unless the CVS user is mapped to an invalid system user.  */
+
+       printf ("E Fatal error, aborting.\n\
+error 0 %s: no such system user\n", username);
+       exit (EXIT_FAILURE);
+    }
+
+    if (pw->pw_uid == 0)
+    {
+#ifdef HAVE_SYSLOG_H
+           /* FIXME: Can the IP address of the connecting client be retrieved
+            * and printed here?
+            */
+           syslog (LOG_DAEMON | LOG_ALERT,
+                   "attempt to root from account: %s", cvs_username
+                  );
+#endif /* HAVE_SYSLOG_H */
+        printf("error 0: root not allowed\n");
+       exit (EXIT_FAILURE);
+    }
+
+#if HAVE_INITGROUPS
+    if (initgroups (pw->pw_name, pw->pw_gid) < 0
+#  ifdef EPERM
+       /* At least on the system I tried, initgroups() only works as root.
+          But we do still want to report ENOMEM and whatever other
+          errors initgroups() might dish up.  */
+       && errno != EPERM
+#  endif
+       )
+    {
+       /* This could be a warning, but I'm not sure I see the point
+          in doing that instead of an error given that it would happen
+          on every connection.  We could log it somewhere and not tell
+          the user.  But at least for now make it an error.  */
+       printf ("error 0 initgroups failed: %s\n", strerror (errno));
+       exit (EXIT_FAILURE);
+    }
+#endif /* HAVE_INITGROUPS */
+
+#ifdef HAVE_PAM
+    if (pamh)
+    {
+        retval = pam_setcred (pamh, PAM_ESTABLISH_CRED);
+        if (retval != PAM_SUCCESS)
+        {
+            printf("E PAM reestablish credentials error: %s\n", 
+                    pam_strerror (pamh, retval));
+            exit (EXIT_FAILURE);
+        }
+    }
+#endif
+
+#ifdef SETXID_SUPPORT
+    /* honor the setgid bit iff set*/
+    if (getgid() != getegid())
+    {
+       if (setgid (getegid ()) < 0)
+       {
+           /* See comments at setuid call below for more discussion.  */
+           printf ("error 0 setgid failed: %s\n", strerror (errno));
+           exit (EXIT_FAILURE);
+       }
+    }
+    else
+#endif
+    {
+       if (setgid (pw->pw_gid) < 0)
+       {
+           /* See comments at setuid call below for more discussion.  */
+           printf ("error 0 setgid failed: %s\n", strerror (errno));
+#ifdef HAVE_SYSLOG_H
+           syslog (LOG_DAEMON | LOG_ERR,
+                   "setgid to %d failed (%m): real %d/%d, effective %d/%d ",
+                   pw->pw_gid, getuid(), getgid(), geteuid(), getegid());
+#endif /* HAVE_SYSLOG_H */
+           exit (EXIT_FAILURE);
+       }
+    }
+
+    if (setuid (pw->pw_uid) < 0)
+    {
+       /* Note that this means that if run as a non-root user,
+          CVSROOT/passwd must contain the user we are running as
+          (e.g. "joe:FsEfVcu:cvs" if run as "cvs" user).  This seems
+          cleaner than ignoring the error like CVS 1.10 and older but
+          it does mean that some people might need to update their
+          CVSROOT/passwd file.  */
+       printf ("error 0 setuid failed: %s\n", strerror (errno));
+#ifdef HAVE_SYSLOG_H
+           syslog (LOG_DAEMON | LOG_ERR,
+                   "setuid to %d failed (%m): real %d/%d, effective %d/%d ",
+                   pw->pw_uid, getuid(), getgid(), geteuid(), getegid());
+#endif /* HAVE_SYSLOG_H */
+       exit (EXIT_FAILURE);
+    }
+
+    /* We don't want our umask to change file modes.  The modes should
+       be set by the modes used in the repository, and by the umask of
+       the client.  */
+    umask (0);
+
+#ifdef AUTH_SERVER_SUPPORT
+    /* Make sure our CVS_Username has been set. */
+    if (CVS_Username == NULL)
+       CVS_Username = xstrdup (username);
+#endif
+
+    /* Set LOGNAME, USER and CVS_USER in the environment, in case they
+       are already set to something else.  */
+    setenv ("LOGNAME", username, 1);
+    setenv ("USER", username, 1);
+# ifdef AUTH_SERVER_SUPPORT
+    setenv ("CVS_USER", CVS_Username, 1);
+# endif
+}
+#endif
+
+#ifdef AUTH_SERVER_SUPPORT
+
+extern char *crypt (const char *, const char *);
+
+
+/*
+ * 0 means no entry found for this user.
+ * 1 means entry found and password matches (or found password is empty)
+ * 2 means entry found, but password does not match.
+ *
+ * If 1, host_user_ptr will be set to point at the system
+ * username (i.e., the "real" identity, which may or may not be the
+ * CVS username) of this user; caller may free this.  Global
+ * CVS_Username will point at an allocated copy of cvs username (i.e.,
+ * the username argument below).
+ * kff todo: FIXME: last sentence is not true, it applies to caller.
+ */
+static int
+check_repository_password (char *username, char *password, char *repository, 
char **host_user_ptr)
+{
+    int retval = 0;
+    FILE *fp;
+    char *filename;
+    char *linebuf = NULL;
+    size_t linebuf_len;
+    int found_it = 0;
+    int namelen;
+
+    /* We don't use current_parsed_root->directory because it hasn't been
+     * set yet -- our `repository' argument came from the authentication
+     * protocol, not the regular CVS protocol.
+     */
+
+    filename = xmalloc (strlen (repository)
+                       + 1
+                       + strlen (CVSROOTADM)
+                       + 1
+                       + strlen (CVSROOTADM_PASSWD)
+                       + 1);
+
+    (void) sprintf (filename, "%s/%s/%s", repository,
+                   CVSROOTADM, CVSROOTADM_PASSWD);
+
+    fp = CVS_FOPEN (filename, "r");
+    if (fp == NULL)
+    {
+       if (!existence_error (errno))
+           error (0, errno, "cannot open %s", filename);
+       free (filename);
+       return 0;
+    }
+
+    /* Look for a relevant line -- one with this user's name. */
+    namelen = strlen (username);
+    while (getline (&linebuf, &linebuf_len, fp) >= 0)
+    {
+       if ((strncmp (linebuf, username, namelen) == 0)
+           && (linebuf[namelen] == ':'))
+       {
+           found_it = 1;
+           break;
+       }
+    }
+    if (ferror (fp))
+       error (0, errno, "cannot read %s", filename);
+    if (fclose (fp) < 0)
+       error (0, errno, "cannot close %s", filename);
+
+    /* If found_it, then linebuf contains the information we need. */
+    if (found_it)
+    {
+       char *found_password, *host_user_tmp;
+       char *non_cvsuser_portion;
+
+       /* We need to make sure lines such as
+        *
+        *    "username::sysuser\n"
+        *    "username:\n"
+        *    "username:  \n"
+        *
+        * all result in a found_password of NULL, but we also need to
+        * make sure that
+        *
+        *    "username:   :sysuser\n"
+        *    "username: <whatever>:sysuser\n"
+        *
+        * continues to result in an impossible password.  That way,
+        * an admin would be on safe ground by going in and tacking a
+        * space onto the front of a password to disable the account
+        * (a technique some people use to close accounts
+        * temporarily).
+        */
+
+       /* Make `non_cvsuser_portion' contain everything after the CVS
+          username, but null out any final newline. */
+       non_cvsuser_portion = linebuf + namelen;
+       strtok (non_cvsuser_portion, "\n");
+
+       /* If there's a colon now, we just want to inch past it. */
+       if (strchr (non_cvsuser_portion, ':') == non_cvsuser_portion)
+           non_cvsuser_portion++;
+
+       /* Okay, after this conditional chain, found_password and
+          host_user_tmp will have useful values: */
+
+       if ((non_cvsuser_portion == NULL)
+           || (strlen (non_cvsuser_portion) == 0)
+           || ((strspn (non_cvsuser_portion, " \t"))
+               == strlen (non_cvsuser_portion)))
+       {
+           found_password = NULL;
+           host_user_tmp = NULL;
+       }
+       else if (strncmp (non_cvsuser_portion, ":", 1) == 0)
+       {
+           found_password = NULL;
+           host_user_tmp = non_cvsuser_portion + 1;
+           if (strlen (host_user_tmp) == 0)
+               host_user_tmp = NULL;
+       }
+       else
+       {
+           found_password = strtok (non_cvsuser_portion, ":");
+           host_user_tmp = strtok (NULL, ":");
+       }
+
+       /* Of course, maybe there was no system user portion... */
+       if (host_user_tmp == NULL)
+           host_user_tmp = username;
+
+       /* Verify blank passwords directly, otherwise use crypt(). */
+       if ((found_password == NULL)
+           || ((strcmp (found_password, crypt (password, found_password))
+                == 0)))
+       {
+           /* Give host_user_ptr permanent storage. */
+           *host_user_ptr = xstrdup (host_user_tmp);
+           retval = 1;
+       }
+       else
+       {
+#ifdef LOG_AUTHPRIV
+       syslog (LOG_AUTHPRIV | LOG_NOTICE,
+               "password mismatch for %s in %s: %s vs. %s", username,
+               repository, crypt(password, found_password), found_password);
+#endif
+           *host_user_ptr = NULL;
+           retval       = 2;
+       }
+    }
+    else     /* Didn't find this user, so deny access. */
+    {
+       *host_user_ptr = NULL;
+       retval = 0;
+    }
+
+    free (filename);
+    if (linebuf)
+       free (linebuf);
+
+    return retval;
+}
+
+#ifdef HAVE_PAM
+
+static int
+cvs_pam_conv (int num_msg, const struct pam_message **msg,
+              struct pam_response **resp, void *appdata_ptr)
+{
+    int i;
+    struct pam_response *response;
+
+    assert (msg && resp);
+
+    response = xnmalloc (num_msg, sizeof (struct pam_response));
+    memset (response, 0, num_msg * sizeof (struct pam_response));
+
+    for (i = 0; i < num_msg; i++)
+    {
+       switch (msg[i]->msg_style) 
+       {
+           /* PAM wants a username */
+           case PAM_PROMPT_ECHO_ON:
+                assert (pam_username != 0);
+               response[i].resp = xstrdup (pam_username);
+               break;
+           /* PAM wants a password */
+           case PAM_PROMPT_ECHO_OFF:
+                assert (pam_password != 0);
+               response[i].resp = xstrdup (pam_password);
+               break;
+           case PAM_ERROR_MSG:
+           case PAM_TEXT_INFO:
+               printf ("E %s\n", msg[i]->msg);
+               break;
+           /* PAM wants something we don't understand - bail out */
+           default:
+               goto cleanup;
+       }
+    }
+
+    *resp = response;
+    return PAM_SUCCESS;
+
+cleanup:
+    for (i = 0; i < num_msg; i++)
+    {
+       if (response[i].resp)
+       {
+           free (response[i].resp);
+           response[i].resp = 0;
+       }
+    }
+    free (response);
+    return PAM_CONV_ERR;
+}
+
+static int
+check_pam_password (char **username, char *password)
+{
+    int retval, err;
+    struct pam_conv conv = { cvs_pam_conv, 0 };
+    char *pam_stage = "start";
+    struct sockaddr peer;
+    int len;
+    char host[NI_MAXHOST];
+
+    /* get the client's ip address */
+    len = sizeof (peer);
+    if (getpeername (STDIN_FILENO, &peer, &len) < 0)
+    {
+       printf ("E Fatal error, aborting.\n\
+error %s getpeername failed\n", strerror (errno));
+       exit (EXIT_FAILURE);
+    }
+
+    /* convert the ip address to text */
+    if (getnameinfo(&peer, len, host, NI_MAXHOST,
+                           NULL, 0, NI_NUMERICHOST) < 0)
+    {
+       printf ("E Fatal error, aborting.\n\
+error %s getnameinfo failed\n", strerror (errno));
+       exit (EXIT_FAILURE);
+    }
+
+    pam_username = *username;
+    pam_password = password;
+
+    retval = pam_start (PAM_SERVICE_NAME, *username, &conv, &pamh);
+
+    /* sets a dummy tty name which pam modules can check for */
+    if (retval == PAM_SUCCESS)
+    {
+        pam_stage = "set dummy tty";
+        retval = pam_set_item (pamh, PAM_TTY, PAM_SERVICE_NAME);
+    }
+
+    if (retval == PAM_SUCCESS)
+    {
+        pam_stage = "set remote host ip";
+        retval = pam_set_item (pamh, PAM_RHOST, host);
+    }
+
+    if (retval == PAM_SUCCESS)
+    {
+       pam_stage = "authenticate";
+       retval = pam_authenticate (pamh, 0);
+    }
+
+    if (retval == PAM_SUCCESS)
+    {
+       pam_stage = "account";
+       retval = pam_acct_mgmt (pamh, 0);
+    }
+
+    if (retval == PAM_SUCCESS)
+    {
+        pam_stage = "get pam user";
+        retval = pam_get_item (pamh, PAM_USER, (const void **)username);
+    }
+
+    if (retval != PAM_SUCCESS)
+       printf ("E PAM %s error: %s\n", pam_stage, pam_strerror (pamh, retval));
+
+    /* clear the pointers to make sure we don't use these references again */
+    pam_username = 0;
+    pam_password = 0; 
+
+    return retval == PAM_SUCCESS;       /* indicate success */
+}
+#endif
+
+static int
+check_system_password (char *username, char *password)
+{
+    char *found_passwd = NULL;
+    struct passwd *pw;
+#ifdef HAVE_GETSPNAM
+    {
+       struct spwd *spw;
+
+       spw = getspnam (username);
+       if (spw != NULL)
+           found_passwd = spw->sp_pwdp;
+    }
+#endif
+
+    if (found_passwd == NULL && (pw = getpwnam (username)) != NULL)
+       found_passwd = pw->pw_passwd;
+
+    if (found_passwd == NULL)
+    {
+       printf ("E Fatal error, aborting.\n\
+error 0 %s: no such user\n", username);
+
+       exit (EXIT_FAILURE);
+    }
+
+    /* Allow for dain bramaged HPUX passwd aging
+     *  - Basically, HPUX adds a comma and some data
+     *    about whether the passwd has expired or not
+     *    on the end of the passwd field.
+     *  - This code replaces the ',' with '\0'.
+     *
+     * FIXME - our workaround is brain damaged too.  I'm
+     * guessing that HPUX WANTED other systems to think the
+     * password was wrong so logins would fail if the
+     * system didn't handle expired passwds and the passwd
+     * might be expired.  I think the way to go here
+     * is with PAM.
+     */
+    strtok (found_passwd, ",");
+
+    if (*found_passwd)
+    {
+       /* user exists and has a password */
+       if (strcmp (found_passwd, crypt (password, found_passwd)) == 0)
+           return 1;
+       else
+       {
+#ifdef LOG_AUTHPRIV
+           syslog (LOG_AUTHPRIV | LOG_NOTICE,
+                   "password mismatch for %s: %s vs. %s", username,
+                   crypt(password, found_passwd), found_passwd);
+#endif
+           return 0;
+       }
+    }
+
+#ifdef LOG_AUTHPRIV
+    syslog (LOG_AUTHPRIV | LOG_NOTICE,
+           "user %s authenticated because of blank system password",
+           username);
+#endif
+    return 1;
+}
+
+
+
+/* Return a hosting username if password matches, else NULL. */
+static char *
+check_password (char *username, char *password, char *repository)
+{
+    int rc;
+    char *host_user = NULL;
+
+    /* First we see if this user has a password in the CVS-specific
+       password file.  If so, that's enough to authenticate with.  If
+       not, we'll check /etc/passwd or maybe whatever is configured via PAM. */
+
+    rc = check_repository_password (username, password, repository,
+                                   &host_user);
+
+    if (rc == 2)
+       return NULL;
+
+    if (rc == 1)
+       /* host_user already set by reference, so just return. */
+       goto handle_return;
+
+    assert (rc == 0);
+
+    if (!config->system_auth)
+    {
+       /* Note that the message _does_ distinguish between the case in
+          which we check for a system password and the case in which
+          we do not.  It is a real pain to track down why it isn't
+          letting you in if it won't say why, and I am not convinced
+          that the potential information disclosure to an attacker
+          outweighs this.  */
+       printf ("error 0 no such user %s in CVSROOT/passwd\n", username);
+
+       exit (EXIT_FAILURE);
+    }
+
+    /* No cvs password found, so try /etc/passwd. */
+#ifdef HAVE_PAM
+    if (check_pam_password (&username, password))
+#else /* !HAVE_PAM */
+    if (check_system_password (username, password))
+#endif /* HAVE_PAM */
+       host_user = xstrdup (username);
+    else
+       host_user = NULL;
+
+#ifdef LOG_AUTHPRIV
+    if (!host_user)
+       syslog (LOG_AUTHPRIV | LOG_NOTICE,
+               "login refused for %s: user has no password", username);
+#endif
+
+handle_return:
+    if (host_user)
+    {
+       /* Set CVS_Username here, in allocated space.
+          It might or might not be the same as host_user. */
+       CVS_Username = xmalloc (strlen (username) + 1);
+       strcpy (CVS_Username, username);
+    }
+
+    return host_user;
+}
+
+#endif /* AUTH_SERVER_SUPPORT */
+
+#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
+
+static void
+pserver_read_line (char **tmp, size_t *tmp_len)
+{
+    int status;
+
+    /* Make sure the protocol starts off on the right foot... */
+    status = buf_read_short_line (buf_from_net, tmp, tmp_len, PATH_MAX);
+    if (status == -1)
+    {
+# ifdef HAVE_SYSLOG_H
+       syslog (LOG_DAEMON | LOG_NOTICE,
+               "unexpected EOF encountered during authentication");
+# endif /* HAVE_SYSLOG_H */
+       error (1, 0, "unexpected EOF encountered during authentication");
+    }
+    if (status == -2)
+       status = ENOMEM;
+    if (status != 0)
+    {
+# ifdef HAVE_SYSLOG_H
+       syslog (LOG_DAEMON | LOG_NOTICE,
+                "error reading from net while validating pserver");
+# endif /* HAVE_SYSLOG_H */
+       error (1, status, "error reading from net while validating pserver");
+    }
+}
+
+/* Read username and password from client (i.e., stdin).
+   If correct, then switch to run as that user and send an ACK to the
+   client via stdout, else send NACK and die. */
+void
+pserver_authenticate_connection (void)
+{
+    char *tmp;
+#ifdef AUTH_SERVER_SUPPORT
+    char *repository = NULL;
+    char *username = NULL;
+    char *password = NULL;
+
+    char *host_user;
+    char *descrambled_password;
+#endif /* AUTH_SERVER_SUPPORT */
+    int verify_and_exit = 0;
+
+    /* The Authentication Protocol.  Client sends:
+     *
+     *   BEGIN AUTH REQUEST\n
+     *   <REPOSITORY>\n
+     *   <USERNAME>\n
+     *   <PASSWORD>\n
+     *   END AUTH REQUEST\n
+     *
+     * Server uses above information to authenticate, then sends
+     *
+     *   I LOVE YOU\n
+     *
+     * if it grants access, else
+     *
+     *   I HATE YOU\n
+     *
+     * if it denies access (and it exits if denying).
+     *
+     * When the client is "cvs login", the user does not desire actual
+     * repository access, but would like to confirm the password with
+     * the server.  In this case, the start and stop strings are
+     *
+     *   BEGIN VERIFICATION REQUEST\n
+     *
+     *     and
+     *
+     *   END VERIFICATION REQUEST\n
+     *
+     * On a verification request, the server's responses are the same
+     * (with the obvious semantics), but it exits immediately after
+     * sending the response in both cases.
+     *
+     * Why is the repository sent?  Well, note that the actual
+     * client/server protocol can't start up until authentication is
+     * successful.  But in order to perform authentication, the server
+     * needs to look up the password in the special CVS passwd file,
+     * before trying /etc/passwd.  So the client transmits the
+     * repository as part of the "authentication protocol".  The
+     * repository will be redundantly retransmitted later, but that's no
+     * big deal.
+     */
+
+    /* Initialize buffers.  */
+    buf_to_net = fd_buffer_initialize (STDOUT_FILENO, 0, NULL, false,
+                                      outbuf_memory_error);
+    buf_from_net = fd_buffer_initialize (STDIN_FILENO, 0, NULL, true,
+                                        outbuf_memory_error);
+
+#ifdef SO_KEEPALIVE
+    /* Set SO_KEEPALIVE on the socket, so that we don't hang forever
+       if the client dies while we are waiting for input.  */
+    {
+       int on = 1;
+
+       if (setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
+                       &on, sizeof on) < 0)
+       {
+# ifdef HAVE_SYSLOG_H
+           syslog (LOG_DAEMON | LOG_ERR, "error setting KEEPALIVE: %m");
+# endif /* HAVE_SYSLOG_H */
+       }
+    }
+#endif
+
+    /* Make sure the protocol starts off on the right foot... */
+    pserver_read_line (&tmp, NULL);
+
+    if (strcmp (tmp, "BEGIN VERIFICATION REQUEST") == 0)
+       verify_and_exit = 1;
+    else if (strcmp (tmp, "BEGIN AUTH REQUEST") == 0)
+       ;
+    else if (strcmp (tmp, "BEGIN GSSAPI REQUEST") == 0)
+    {
+#ifdef HAVE_GSSAPI
+       free (tmp);
+       gserver_authenticate_connection ();
+       return;
+#else
+       error (1, 0, "GSSAPI authentication not supported by this server");
+#endif
+    }
+    else
+       error (1, 0, "bad auth protocol start: %s", tmp);
+
+#ifndef AUTH_SERVER_SUPPORT
+
+    error (1, 0, "Password authentication not supported by this server");
+
+#else /* AUTH_SERVER_SUPPORT */
+
+    free (tmp);
+
+    /* Get the three important pieces of information in order. */
+    /* See above comment about error handling.  */
+    pserver_read_line (&repository, NULL);
+    pserver_read_line (&username, NULL);
+    pserver_read_line (&password, NULL);
+
+    /* ... and make sure the protocol ends on the right foot. */
+    /* See above comment about error handling.  */
+    pserver_read_line (&tmp, NULL);
+    if (strcmp (tmp,
+               verify_and_exit ?
+               "END VERIFICATION REQUEST" : "END AUTH REQUEST")
+       != 0)
+    {
+       error (1, 0, "bad auth protocol end: %s", tmp);
+    }
+    free (tmp);
+
+    if (!root_allow_ok (repository))
+    {
+       error (1, 0, "%s: no such repository", repository);
+# ifdef HAVE_SYSLOG_H
+       syslog (LOG_DAEMON | LOG_NOTICE, "login refused for %s", repository);
+# endif /* HAVE_SYSLOG_H */
+       goto i_hate_you;
+    }
+
+    /* OK, now parse the config file, so we can use it to control how
+       to check passwords.  If there was an error parsing the config
+       file, parse_config already printed an error.  We keep going.
+       Why?  Because if we didn't, then there would be no way to check
+       in a new CVSROOT/config file to fix the broken one!  */
+    config = get_root_allow_config (repository, gConfigPath);
+
+    /* We need the real cleartext before we hash it. */
+    descrambled_password = descramble (password);
+    host_user = check_password (username, descrambled_password, repository);
+    if (host_user == NULL)
+    {
+# ifdef HAVE_SYSLOG_H
+       syslog (LOG_DAEMON | LOG_NOTICE, "login failure (for %s)", repository);
+# endif /* HAVE_SYSLOG_H */
+       memset (descrambled_password, 0, strlen (descrambled_password));
+       free (descrambled_password);
+    i_hate_you:
+       buf_output0 (buf_to_net, "I HATE YOU\n");
+       buf_flush (buf_to_net, true);
+
+       /* Don't worry about server_cleanup, server_active isn't set
+          yet.  */
+       exit (EXIT_FAILURE);
+    }
+    memset (descrambled_password, 0, strlen (descrambled_password));
+    free (descrambled_password);
+
+    /* Don't go any farther if we're just responding to "cvs login". */
+    if (verify_and_exit)
+    {
+       buf_output0 (buf_to_net, "I LOVE YOU\n");
+       buf_flush (buf_to_net, true);
+       exit (EXIT_SUCCESS);
+    }
+
+    /* Set Pserver_Repos so that we can check later that the same
+       repository is sent in later client/server protocol. */
+    Pserver_Repos = xmalloc (strlen (repository) + 1);
+    strcpy (Pserver_Repos, repository);
+
+    /* Switch to run as this user. */
+    switch_to_user (username, host_user);
+    free (host_user);
+    free (repository);
+    free (username);
+    free (password);
+
+    buf_output0 (buf_to_net, "I LOVE YOU\n");
+    buf_flush (buf_to_net, true);
+#endif /* AUTH_SERVER_SUPPORT */
+}
+
+#endif /* AUTH_SERVER_SUPPORT || HAVE_GSSAPI */
+
+
+#ifdef HAVE_KERBEROS
+void
+kserver_authenticate_connection( void )
+{
+    int status;
+    char instance[INST_SZ];
+    struct sockaddr_in peer;
+    struct sockaddr_in laddr;
+    int len;
+    KTEXT_ST ticket;
+    AUTH_DAT auth;
+    char version[KRB_SENDAUTH_VLEN];
+    char user[ANAME_SZ];
+
+    strcpy (instance, "*");
+    len = sizeof peer;
+    if (getpeername (STDIN_FILENO, (struct sockaddr *) &peer, &len) < 0
+       || getsockname (STDIN_FILENO, (struct sockaddr *) &laddr,
+                       &len) < 0)
+    {
+       printf ("E Fatal error, aborting.\n\
+error %s getpeername or getsockname failed\n", strerror (errno));
+
+       exit (EXIT_FAILURE);
+    }
+
+#ifdef SO_KEEPALIVE
+    /* Set SO_KEEPALIVE on the socket, so that we don't hang forever
+       if the client dies while we are waiting for input.  */
+    {
+       int on = 1;
+
+       if (setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
+                          (char *) &on, sizeof on) < 0)
+       {
+# ifdef HAVE_SYSLOG_H
+           syslog (LOG_DAEMON | LOG_ERR, "error setting KEEPALIVE: %m");
+# endif /* HAVE_SYSLOG_H */
+       }
+    }
+#endif
+
+    status = krb_recvauth (KOPT_DO_MUTUAL, STDIN_FILENO, &ticket, "rcmd",
+                          instance, &peer, &laddr, &auth, "", sched,
+                          version);
+    if (status != KSUCCESS)
+    {
+       printf ("E Fatal error, aborting.\n\
+error 0 kerberos: %s\n", krb_get_err_text(status));
+
+       exit (EXIT_FAILURE);
+    }
+
+    memcpy (kblock, auth.session, sizeof (C_Block));
+
+    /* Get the local name.  */
+    status = krb_kntoln (&auth, user);
+    if (status != KSUCCESS)
+    {
+       printf ("E Fatal error, aborting.\n"
+               "error 0 kerberos: can't get local name: %s\n",
+               krb_get_err_text(status));
+
+       exit (EXIT_FAILURE);
+    }
+
+    /* Switch to run as this user. */
+    switch_to_user ("Kerberos 4", user);
+}
+#endif /* HAVE_KERBEROS */
+
+
+
+# ifdef HAVE_GSSAPI /* && SERVER_SUPPORT */
+/* Authenticate a GSSAPI connection.  This is called from
+ * pserver_authenticate_connection, and it handles success and failure
+ * the same way.
+ *
+ * GLOBALS
+ *   server_hostname   The name of this host, as set via a call to
+ *                     xgethostname() in main().
+ */
+static void
+gserver_authenticate_connection (void)
+{
+    char *hn;
+    gss_buffer_desc tok_in, tok_out;
+    char buf[1024];
+    char *credbuf;
+    size_t credbuflen;
+    OM_uint32 stat_min, ret;
+    gss_name_t server_name, client_name;
+    gss_cred_id_t server_creds;
+    int nbytes;
+    gss_OID mechid;
+
+    hn = canon_host (server_hostname);
+    if (!hn)
+       error (1, 0, "can't get canonical hostname for `%s': %s",
+              server_hostname, ch_strerror ());
+
+    sprintf (buf, "address@hidden", hn);
+    free (hn);
+    tok_in.value = buf;
+    tok_in.length = strlen (buf);
+
+    if (gss_import_name (&stat_min, &tok_in, GSS_C_NT_HOSTBASED_SERVICE,
+                        &server_name) != GSS_S_COMPLETE)
+       error (1, 0, "could not import GSSAPI service name %s", buf);
+
+    /* Acquire the server credential to verify the client's
+       authentication.  */
+    if (gss_acquire_cred (&stat_min, server_name, 0, GSS_C_NULL_OID_SET,
+                         GSS_C_ACCEPT, &server_creds,
+                         NULL, NULL) != GSS_S_COMPLETE)
+       error (1, 0, "could not acquire GSSAPI server credentials");
+
+    gss_release_name (&stat_min, &server_name);
+
+    /* The client will send us a two byte length followed by that many
+       bytes.  */
+    if (fread (buf, 1, 2, stdin) != 2)
+       error (1, errno, "read of length failed");
+
+    nbytes = ((buf[0] & 0xff) << 8) | (buf[1] & 0xff);
+    if (nbytes <= sizeof buf)
+    {
+        credbuf = buf;
+        credbuflen = sizeof buf;
+    }
+    else
+    {
+        credbuflen = nbytes;
+        credbuf = xmalloc (credbuflen);
+    }
+    
+    if (fread (credbuf, 1, nbytes, stdin) != nbytes)
+       error (1, errno, "read of data failed");
+
+    gcontext = GSS_C_NO_CONTEXT;
+    tok_in.length = nbytes;
+    tok_in.value = credbuf;
+
+    if (gss_accept_sec_context (&stat_min,
+                               &gcontext,      /* context_handle */
+                               server_creds,   /* verifier_cred_handle */
+                               &tok_in,        /* input_token */
+                               NULL,           /* channel bindings */
+                               &client_name,   /* src_name */
+                               &mechid,        /* mech_type */
+                               &tok_out,       /* output_token */
+                               &ret,
+                               NULL,           /* ignore time_rec */
+                               NULL)           /* ignore del_cred_handle */
+       != GSS_S_COMPLETE)
+    {
+       error (1, 0, "could not verify credentials");
+    }
+
+    /* FIXME: Use Kerberos v5 specific code to authenticate to a user.
+       We could instead use an authentication to access mapping.  */
+    {
+       krb5_context kc;
+       krb5_principal p;
+       gss_buffer_desc desc;
+
+       krb5_init_context (&kc);
+       if (gss_display_name (&stat_min, client_name, &desc,
+                             &mechid) != GSS_S_COMPLETE
+           || krb5_parse_name (kc, ((gss_buffer_t) &desc)->value, &p) != 0
+           || krb5_aname_to_localname (kc, p, sizeof buf, buf) != 0
+           || krb5_kuserok (kc, p, buf) != TRUE)
+       {
+           error (1, 0, "access denied");
+       }
+       krb5_free_principal (kc, p);
+       krb5_free_context (kc);
+    }
+
+    if (tok_out.length != 0)
+    {
+       char cbuf[2];
+
+       cbuf[0] = (tok_out.length >> 8) & 0xff;
+       cbuf[1] = tok_out.length & 0xff;
+       if (fwrite (cbuf, 1, 2, stdout) != 2
+           || (fwrite (tok_out.value, 1, tok_out.length, stdout)
+               != tok_out.length))
+           error (1, errno, "fwrite failed");
+    }
+
+    switch_to_user ("GSSAPI", buf);
+
+    if (credbuf != buf)
+        free (credbuf);
+
+    printf ("I LOVE YOU\n");
+    fflush (stdout);
+}
+
+# endif /* HAVE_GSSAPI */
+
+#endif /* SERVER_SUPPORT */
+
+#if defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT)
+
+/* This global variable is non-zero if the user requests encryption on
+   the command line.  */
+int cvsencrypt;
+
+/* This global variable is non-zero if the users requests stream
+   authentication on the command line.  */
+int cvsauthenticate;
+
+#ifdef ENCRYPTION
+
+#ifdef HAVE_KERBEROS
+
+/* An encryption interface using Kerberos.  This is built on top of a
+   packetizing buffer.  */
+
+/* This structure is the closure field of the Kerberos translation
+   routines.  */
+struct krb_encrypt_data
+{
+    /* The Kerberos key schedule.  */
+    Key_schedule sched;
+    /* The Kerberos DES block.  */
+    C_Block block;
+};
+
+
+
+/* Decrypt Kerberos data.  */
+static int
+krb_encrypt_input( void *fnclosure, const char *input, char *output, int size )
+{
+    struct krb_encrypt_data *kd = (struct krb_encrypt_data *) fnclosure;
+    int tcount;
+
+    des_cbc_encrypt ((C_Block *) input, (C_Block *) output,
+                    size, kd->sched, &kd->block, 0);
+
+    /* SIZE is the size of the buffer, which is set by the encryption
+       routine.  The packetizing buffer will arrange for the first two
+       bytes in the decrypted buffer to be the real (unaligned)
+       length.  As a safety check, make sure that the length in the
+       buffer corresponds to SIZE.  Note that the length in the buffer
+       is just the length of the data.  We must add 2 to account for
+       the buffer count itself.  */
+    tcount = ((output[0] & 0xff) << 8) + (output[1] & 0xff);
+    if (((tcount + 2 + 7) & ~7) != size)
+      error (1, 0, "Decryption failure");
+
+    return 0;
+}
+
+
+
+/* Encrypt Kerberos data.  */
+static int
+krb_encrypt_output( void *fnclosure, const char *input, char *output,
+                    int size, int *translated )
+{
+    struct krb_encrypt_data *kd = (struct krb_encrypt_data *) fnclosure;
+    int aligned;
+
+    /* For security against a known plaintext attack, we should
+       initialize any padding bytes to random values.  Instead, we
+       just pick up whatever is on the stack, which is at least better
+       than using zero.  */
+
+    /* Align SIZE to an 8 byte boundary.  Note that SIZE includes the
+       two byte buffer count at the start of INPUT which was added by
+       the packetizing buffer.  */
+    aligned = (size + 7) & ~7;
+
+    /* We use des_cbc_encrypt rather than krb_mk_priv because the
+       latter sticks a timestamp in the block, and krb_rd_priv expects
+       that timestamp to be within five minutes of the current time.
+       Given the way the CVS server buffers up data, that can easily
+       fail over a long network connection.  We trust krb_recvauth to
+       guard against a replay attack.  */
+
+    des_cbc_encrypt ((C_Block *) input, (C_Block *) output, aligned,
+                    kd->sched, &kd->block, 1);
+
+    *translated = aligned;
+
+    return 0;
+}
+
+
+
+/* Create a Kerberos encryption buffer.  We use a packetizing buffer
+   with Kerberos encryption translation routines.  */
+struct buffer *
+krb_encrypt_buffer_initialize( struct buffer *buf, int input,
+                               Key_schedule sched, C_Block block,
+                               void *memory( struct buffer * ) )
+{
+    struct krb_encrypt_data *kd;
+
+    kd = (struct krb_encrypt_data *) xmalloc (sizeof *kd);
+    memcpy (kd->sched, sched, sizeof (Key_schedule));
+    memcpy (kd->block, block, sizeof (C_Block));
+
+    return packetizing_buffer_initialize (buf,
+                                         input ? krb_encrypt_input : NULL,
+                                         input ? NULL : krb_encrypt_output,
+                                         kd,
+                                         memory);
+}
+
+#endif /* HAVE_KERBEROS */
+#endif /* ENCRYPTION */
+#endif /* defined (CLIENT_SUPPORT) || defined (SERVER_SUPPORT) */
+
+
+
+/* Output LEN bytes at STR.  If LEN is zero, then output up to (not including)
+   the first '\0' byte.  */
+void
+cvs_output (const char *str, size_t len)
+{
+    if (len == 0)
+       len = strlen (str);
+#ifdef SERVER_SUPPORT
+    if (error_use_protocol)
+    {
+       if (buf_to_net)
+       {
+           buf_output (saved_output, str, len);
+           buf_copy_lines (buf_to_net, saved_output, 'M');
+       }
+# if HAVE_SYSLOG_H
+       else
+           syslog (LOG_DAEMON | LOG_ERR,
+                   "Attempt to write message after close of network buffer.  "
+                   "Message was: %s",
+                   str);
+# endif /* HAVE_SYSLOG_H */
+    }
+    else if (server_active)
+    {
+       if (protocol)
+       {
+           buf_output (saved_output, str, len);
+           buf_copy_lines (protocol, saved_output, 'M');
+           buf_send_counted (protocol);
+       }
+# if HAVE_SYSLOG_H
+       else
+           syslog (LOG_DAEMON | LOG_ERR,
+                   "Attempt to write message before initialization of "
+                   "protocol buffer.  Message was: %s",
+                   str);
+# endif /* HAVE_SYSLOG_H */
+    }
+    else
+#endif
+    {
+       size_t written;
+       size_t to_write = len;
+       const char *p = str;
+
+       /* Local users that do 'cvs status 2>&1' on a local repository
+          may see the informational messages out-of-order with the
+          status messages unless we use the fflush (stderr) here. */
+       fflush (stderr);
+
+       while (to_write > 0)
+       {
+           written = fwrite (p, 1, to_write, stdout);
+           if (written == 0)
+               break;
+           p += written;
+           to_write -= written;
+       }
+    }
+}
+
+/* Output LEN bytes at STR in binary mode.  If LEN is zero, then
+   output zero bytes.  */
+
+void
+cvs_output_binary (char *str, size_t len)
+{
+#ifdef SERVER_SUPPORT
+    if (error_use_protocol || server_active)
+    {
+       struct buffer *buf;
+       char size_text[40];
+
+       if (error_use_protocol)
+           buf = buf_to_net;
+       else
+           buf = protocol;
+
+       assert (buf);
+
+       if (!supported_response ("Mbinary"))
+       {
+           error (0, 0, "\
+this client does not support writing binary files to stdout");
+           return;
+       }
+
+       buf_output0 (buf, "Mbinary\012");
+       sprintf (size_text, "%lu\012", (unsigned long) len);
+       buf_output0 (buf, size_text);
+
+       /* Not sure what would be involved in using buf_append_data here
+          without stepping on the toes of our caller (which is responsible
+          for the memory allocation of STR).  */
+       buf_output (buf, str, len);
+
+       if (!error_use_protocol)
+           buf_send_counted (protocol);
+    }
+    else
+#endif
+    {
+       size_t written;
+       size_t to_write = len;
+       const char *p = str;
+#ifdef USE_SETMODE_STDOUT
+       int oldmode;
+#endif
+
+       /* Local users that do 'cvs status 2>&1' on a local repository
+          may see the informational messages out-of-order with the
+          status messages unless we use the fflush (stderr) here. */
+       fflush (stderr);
+
+#ifdef USE_SETMODE_STDOUT
+       /* It is possible that this should be the same ifdef as
+          USE_SETMODE_BINARY but at least for the moment we keep them
+          separate.  Mostly this is just laziness and/or a question
+          of what has been tested where.  Also there might be an
+          issue of setmode vs. _setmode.  */
+       /* The Windows doc says to call setmode only right after startup.
+          I assume that what they are talking about can also be helped
+          by flushing the stream before changing the mode.  */
+       fflush (stdout);
+       oldmode = _setmode (_fileno (stdout), OPEN_BINARY);
+       if (oldmode < 0)
+           error (0, errno, "failed to setmode on stdout");
+#endif
+
+       while (to_write > 0)
+       {
+           written = fwrite (p, 1, to_write, stdout);
+           if (written == 0)
+               break;
+           p += written;
+           to_write -= written;
+       }
+#ifdef USE_SETMODE_STDOUT
+       fflush (stdout);
+       if (_setmode (_fileno (stdout), oldmode) != OPEN_BINARY)
+           error (0, errno, "failed to setmode on stdout");
+#endif
+    }
+}
+
+
+
+/* Like CVS_OUTPUT but output is for stderr not stdout.  */
+void
+cvs_outerr (const char *str, size_t len)
+{
+    if (len == 0)
+       len = strlen (str);
+#ifdef SERVER_SUPPORT
+    if (error_use_protocol)
+    {
+       if (buf_to_net)
+       {
+           buf_output (saved_outerr, str, len);
+           buf_copy_lines (buf_to_net, saved_outerr, 'E');
+       }
+# if HAVE_SYSLOG_H
+       else
+           syslog (LOG_DAEMON | LOG_ERR,
+                   "Attempt to write error message after close of network "
+                   "buffer.  Message was: `%s'",
+                   str);
+# endif /* HAVE_SYSLOG_H */
+    }
+    else if (server_active)
+    {
+       if (protocol)
+       {
+           buf_output (saved_outerr, str, len);
+           buf_copy_lines (protocol, saved_outerr, 'E');
+           buf_send_counted (protocol);
+       }
+# if HAVE_SYSLOG_H
+       else
+           syslog (LOG_DAEMON | LOG_ERR,
+                   "Attempt to write error message before initialization of "
+                   "protocol buffer.  Message was: `%s'",
+                   str);
+# endif /* HAVE_SYSLOG_H */
+    }
+    else
+#endif
+    {
+       size_t written;
+       size_t to_write = len;
+       const char *p = str;
+
+       /* Make sure that output appears in order if stdout and stderr
+          point to the same place.  For the server case this is taken
+          care of by the fact that saved_outerr always holds less
+          than a line.  */
+       fflush (stdout);
+
+       while (to_write > 0)
+       {
+           written = fwrite (p, 1, to_write, stderr);
+           if (written == 0)
+               break;
+           p += written;
+           to_write -= written;
+       }
+    }
+}
+
+
+
+/* Flush stderr.  stderr is normally flushed automatically, of course,
+   but this function is used to flush information from the server back
+   to the client.  */
+void
+cvs_flusherr (void)
+{
+#ifdef SERVER_SUPPORT
+    if (error_use_protocol)
+    {
+       /* skip the actual stderr flush in this case since the parent process
+        * on the server should only be writing to stdout anyhow
+        */
+       /* Flush what we can to the network, but don't block.  */
+       buf_flush (buf_to_net, 0);
+    }
+    else if (server_active)
+    {
+       /* make sure stderr is flushed before we send the flush count on the
+        * protocol pipe
+        */
+       fflush (stderr);
+       /* Send a special count to tell the parent to flush.  */
+       buf_send_special_count (protocol, -2);
+    }
+    else
+#endif
+       fflush (stderr);
+}
+
+
+
+/* Make it possible for the user to see what has been written to
+   stdout (it is up to the implementation to decide exactly how far it
+   should go to ensure this).  */
+void
+cvs_flushout (void)
+{
+#ifdef SERVER_SUPPORT
+    if (error_use_protocol)
+    {
+       /* Flush what we can to the network, but don't block.  */
+       buf_flush (buf_to_net, 0);
+    }
+    else if (server_active)
+    {
+       /* Just do nothing.  This is because the code which
+          cvs_flushout replaces, setting stdout to line buffering in
+          main.c, didn't get called in the server child process.  But
+          in the future it is quite plausible that we'll want to make
+          this case work analogously to cvs_flusherr.
+
+          FIXME - DRP - I tried to implement this and triggered the following
+          error: "Protocol error: uncounted data discarded".  I don't need
+          this feature right now, so I'm not going to bother with it yet.
+        */
+       buf_send_special_count (protocol, -1);
+    }
+    else
+#endif
+       fflush (stdout);
+}
+
+
+
+/* Output TEXT, tagging it according to TAG.  There are lots more
+   details about what TAG means in cvsclient.texi but for the simple
+   case (e.g. non-client/server), TAG is just "newline" to output a
+   newline (in which case TEXT must be NULL), and any other tag to
+   output normal text.
+
+   Note that there is no way to output either \0 or \n as part of TEXT.  */
+
+void
+cvs_output_tagged (const char *tag, const char *text)
+{
+    if (text != NULL && strchr (text, '\n') != NULL)
+       /* Uh oh.  The protocol has no way to cope with this.  For now
+          we dump core, although that really isn't such a nice
+          response given that this probably can be caused by newlines
+          in filenames and other causes other than bugs in CVS.  Note
+          that we don't want to turn this into "MT newline" because
+          this case is a newline within a tagged item, not a newline
+          as extraneous sugar for the user.  */
+       assert (0);
+
+    /* Start and end tags don't take any text, per cvsclient.texi.  */
+    if (tag[0] == '+' || tag[0] == '-')
+       assert (text == NULL);
+
+#ifdef SERVER_SUPPORT
+    if (server_active && supported_response ("MT"))
+    {
+       struct buffer *buf;
+
+       if (error_use_protocol)
+           buf = buf_to_net;
+       else
+           buf = protocol;
+
+       buf_output0 (buf, "MT ");
+       buf_output0 (buf, tag);
+       if (text != NULL)
+       {
+           buf_output (buf, " ", 1);
+           buf_output0 (buf, text);
+       }
+       buf_output (buf, "\n", 1);
+
+       if (!error_use_protocol)
+           buf_send_counted (protocol);
+    }
+    else
+#endif /* SERVER_SUPPORT */
+    {
+       /* No MT support or we are using a local repository. */
+       if (strcmp (tag, "newline") == 0)
+           cvs_output ("\n", 1);
+       else if (strcmp (tag, "date") == 0)
+       {
+#ifdef SERVER_SUPPORT
+           if (server_active)
+               /* Output UTC when running as a server without MT support in
+                * the client since it is likely to be more meaningful than
+                * localtime.
+                */
+               cvs_output (text, 0);
+           else
+#endif /* SERVER_SUPPORT */
+           {
+               char *date_in = xstrdup (text);
+               char *date = format_date_alloc (date_in);
+               cvs_output (date, 0);
+               free (date);
+               free (date_in);
+           }
+       }
+       else if (text != NULL)
+           cvs_output (text, 0);
+    }
+}
+
+
+
+static void
+server_send_signatures (RCSNode *rcs, const char *rev)
+{
+    const char *signatures;
+
+    if (!supported_response ("OpenPGP-signatures"))
+       return;
+
+    if (!(signatures = RCS_get_openpgp_signatures (rcs, rev)))
+       return;
+
+    buf_output0 (protocol, "OpenPGP-signatures ");
+    buf_output0 (protocol, signatures);
+    buf_output (protocol, "\n", 1);
+    buf_send_counted (protocol);
+}
+
+
+
+/* Try to tell the client about checking out a base REV of FILE, sending the
+ * diff against PREV when possible.  If the client doesn't understand this
+ * response, just ignore it and later code will also avoid the Base-*
+ * responses.
+ *
+ * NOTES
+ *   Processes PREV == NULL, PREV == REV, and PREV == "0", for convenience.
+ */
+static void
+iserver_base_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,
+                      const char *rev, const char *ptag, const char *tag,
+                      const char *poptions, const char *options,
+                      const char *basefile, const char *fullbase, bool istemp)
+{
+    char *tmpfile = NULL;
+    bool senddiff;
+
+    assert (rev);
+
+    TRACE (TRACE_FUNCTION,
+          "iserver_base_checkout (%s, %s, %s, %s, %s, %s, %s, %s)",
+          finfo->fullname, prev, rev, ptag, tag, poptions, options,
+          istemp ? "true" : "false");
+
+    if (!supported_response (istemp ? "Temp-checkout" : "Base-checkout"))
+       return;
+
+    if (/* Entry rev and new rev are the same...  */
+       prev && !strcmp (prev, rev)
+       /* ...and... */
+       && (   /* ...both option specs are empty...  */
+           (  (!poptions || !poptions[0]) && (!options || !options[0]))
+              /* ...or the option specs match.  */
+           || (poptions && options && !strcmp (poptions, options)))
+       && (   /* ...both option specs are empty...  */
+           (  (!ptag || !ptag[0]) && (!tag || !tag[0]))
+              /* ...or the option specs match.  */
+           || (ptag && tag && !strcmp (ptag, tag)))
+       )
+       /* PREV & REV are the same, so the client should already have this
+        * file.
+        */
+       return;
+
+    server_send_signatures (rcs, rev);
+
+    /* FIXME: It would be more efficient if diffs could be sent when the
+     * revision numbers haven't changed but the keywords have.
+     */
+    if (prev && strcmp (prev, "0") && strcmp (prev, rev))
+    {
+       /* Compute and send diff.  */
+       int dargc = 0;
+       size_t darg_allocated = 0;
+       char **dargv = NULL;
+       int status;
+       char *pbasefile;
+       bool save_noexec = noexec;
+
+       pbasefile = cvs_temp_name ();
+       noexec = false;
+       status = RCS_checkout (rcs, pbasefile, prev, ptag, poptions,
+                              NULL, NULL, NULL);
+       noexec = save_noexec;
+
+       if (status)
+           error (1, 0, "Failed to checkout revision %s of `%s'",
+                  prev, finfo->file);
+
+       run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n");
+       tmpfile = cvs_temp_name ();
+       status = diff_exec (pbasefile, basefile, NULL, NULL, dargc, dargv,
+                           tmpfile);
+       run_arg_free_p (dargc, dargv);
+       free (dargv);
+       if (CVS_UNLINK (pbasefile) < 0)
+           error (0, errno, "cannot remove `%s'", pbasefile);
+       free (pbasefile);
+
+       /* A STATUS of 0 means no differences.  1 means some differences.  */
+       if (status != 0 && status != 1)
+           senddiff = false;
+       else
+           senddiff = true;
+    }
+    else senddiff = false;
+
+    if (senddiff)
+    {
+       struct stat bfi, dfi;
+
+       /* Check to make sure the patch is really shorter */
+       if (stat (basefile, &bfi) < 0)
+           error (1, errno, "could not stat `%s'", basefile);
+       if (stat (tmpfile, &dfi) < 0)
+           error (1, errno, "could not stat `%s'", tmpfile);
+       if (bfi.st_size <= dfi.st_size)
+           senddiff = false;
+    }
+
+    buf_output0 (protocol, istemp ? "Temp-checkout " : "Base-checkout ");
+    output_dir (finfo->update_dir, finfo->repository);
+    buf_output0 (protocol, finfo->file);
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, options);
+    buf_output (protocol, "\n", 1);
+
+    /* If we are not sending a diff, don't send PREV, or the client will expect
+     * one.
+     */
+    buf_output0 (protocol, prev && senddiff ? prev : "");
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, rev);
+    buf_output (protocol, "\n", 1);
+
+    if (senddiff)
+       server_send_file (tmpfile, fullbase, -1);
+    else
+       /* The client does not have a previous base revision, so send the whole
+        * file.
+        */
+       server_send_file (basefile, fullbase, -1);
+
+    buf_send_counted (protocol);
+
+    if (tmpfile)
+    {
+       if (CVS_UNLINK (tmpfile) < 0)
+           error (0, errno, "cannot remove `%s'", tmpfile);
+       free (tmpfile);
+    }
+}
+
+
+
+void
+server_base_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,
+                     const char *rev, const char *ptag, const char *tag,
+                     const char *poptions, const char *options)
+{
+    char *basefile;
+    char *fullbase;
+
+    basefile = make_base_file_name (finfo->file, rev);
+    fullbase = Xasprintf ("%s/%s",
+                         *(finfo->update_dir) ? finfo->update_dir : ".",
+                         basefile);
+
+    iserver_base_checkout (rcs, finfo, prev, rev, ptag, tag, poptions, options,
+                          basefile, fullbase, false);
+
+    free (fullbase);
+    free (basefile);
+}
+
+
+
+void
+server_temp_checkout (RCSNode *rcs, struct file_info *finfo, const char *prev,
+                     const char *rev, const char *ptag, const char *tag,
+                     const char *poptions, const char *options,
+                     const char *tempfile)
+{
+    iserver_base_checkout (rcs, finfo, prev, rev, ptag, tag, poptions, options,
+                          tempfile, tempfile, true);
+}
+
+
+
+void
+server_base_copy (struct file_info *finfo, const char *rev, const char *flags)
+{
+    if (!supported_response ("Base-copy")) return;
+
+    buf_output0 (protocol, "Base-copy ");
+    output_dir (finfo->update_dir, finfo->repository);
+    buf_output0 (protocol, finfo->file);
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, rev);
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, flags);
+    buf_output (protocol, "\n", 1);
+    buf_send_counted (protocol);
+}
+
+
+
+/* Assume CVS/Base/.#FILE.REV1 & CVS/Base/FILE.REV2 exist.  If the client
+ * supports it, ask it to perform a merge using these files.  If not, perform
+ * the merge ourselves.
+ */
+void
+server_base_merge (struct file_info *finfo, const char *rev1, const char *rev2)
+{
+    if (!supported_response ("Base-merge")) return;
+
+    buf_output0 (protocol, "Base-merge ");
+    output_dir (finfo->update_dir, finfo->repository);
+    buf_output0 (protocol, finfo->file);
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, rev1);
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, rev2);
+    buf_output (protocol, "\n", 1);
+    buf_send_counted (protocol);
+    return;
+}
+
+
+
+/*
+ * void cvs_trace(int level, const char *fmt, ...)
+ *
+ * Print tracing information to stderr on request.  Levels are implemented
+ * as with CVSNT.
+ */
+void
+cvs_trace (int level, const char *fmt, ...)
+{
+    if (trace >= level)
+    {
+       va_list va;
+       char *buf;
+       int size;
+
+       va_start (va, fmt);
+#ifdef SERVER_SUPPORT
+       cvs_outerr (server_active ? (isProxyServer() ? "P" : "S") : " ", 1);
+#else
+       cvs_outerr (" ", 1);
+#endif
+       cvs_outerr (" -> ", 4);
+       if ((size = vasprintf (&buf, fmt, va)) < 0)
+           abort ();
+       cvs_outerr (buf, size);
+       cvs_outerr ("\n", 1);
+       va_end (va);
+    }
+}
Index: ccvs/src/server.h
diff -u /dev/null ccvs/src/server.h:1.44.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/server.h   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS kit.
+ *
+ *
+ *
+ * This file contains the interface between the server and the rest of CVS.
+ */
+
+#ifndef SERVER_H
+#define SERVER_H
+
+/* CVS Headers.  */
+#include "root.h"
+#include "vers_ts.h"
+
+/* Miscellaneous stuff which isn't actually particularly server-specific.  */
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+#endif
+
+
+/*
+ * Nonzero if we are using the server.  Used by various places to call
+ * server-specific functions.
+ */
+extern int server_active;
+
+/*
+ * Expand to `S', ` ', or the empty string.  Used in `%s-> ...' trace printfs.
+ */
+#ifdef SERVER_SUPPORT
+# define CLIENT_SERVER_STR ((server_active) ? "S" : " ")
+#else
+# define CLIENT_SERVER_STR ""
+#endif
+
+#ifdef SERVER_SUPPORT
+
+/* Server functions exported to the rest of CVS.  */
+
+/* pre-parse the server options.  */
+void parseServerOptions (int argc, char **argv);
+
+/* Run the server.  */
+int server (int argc, char **argv);
+
+/* kserver user authentication.  */
+# ifdef HAVE_KERBEROS
+void kserver_authenticate_connection (void);
+# endif
+
+/* pserver user authentication.  */
+# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
+void pserver_authenticate_connection (void);
+# endif
+
+/* See server.c for description.  */
+void server_pathname_check (char *);
+
+/* We have a new Entries line for a file.  TAG or DATE can be NULL.  */
+void server_register (const char *name, const char *version,
+                      const char *timestamp, const char *options,
+                      const char *tag, const char *date, const char *conflict);
+
+/* Set the modification time of the next file sent.  This must be
+   followed by a call to server_updated on the same file.  */
+void server_modtime (struct file_info *finfo, Vers_TS *vers_ts);
+
+/*
+ * We want to nuke the Entries line for a file, and (unless
+ * server_scratch_entry_only is subsequently called) the file itself.
+ */
+void server_scratch (const char *name);
+
+/*
+ * The file which just had server_scratch called on it needs to have only
+ * the Entries line removed, not the file itself.
+ */
+void server_scratch_entry_only (void);
+
+/*
+ * We just successfully checked in FILE (which is just the bare
+ * filename, with no directory).  REPOSITORY is the directory for the
+ * repository.
+ */
+void server_checked_in (const char *file, const char *update_dir,
+                        const char *repository);
+
+void server_copy_file (const char *file, const char *update_dir,
+                       const char *repository, const char *newfile);
+
+/* Send the appropriate responses for a file described by FINFO and
+   VERS.  This is called after server_register or server_scratch.  In
+   the latter case the file is to be removed (and VERS can be NULL).
+   In the former case, VERS must be non-NULL, and UPDATED indicates
+   whether the file is now up to date (SERVER_UPDATED, yes,
+   SERVER_MERGED, no, SERVER_PATCHED, yes, but file is a diff from
+   user version to repository version, SERVER_RCS_DIFF, yes, like
+   SERVER_PATCHED but with an RCS style diff).  MODE is the mode the
+   file should get, or (mode_t) -1 if this should be obtained from the
+   file itself.  CHECKSUM is the MD5 checksum of the file, or NULL if
+   this need not be sent.  If FILEBUF is not NULL, it holds the
+   contents of the file, in which case the file itself may not exist.
+   If FILEBUF is not NULL, server_updated will free it.  */
+enum server_updated_arg4
+{
+    SERVER_UPDATED,
+    SERVER_MERGED,
+    SERVER_PATCHED,
+    SERVER_RCS_DIFF
+};
+
+struct buffer;
+
+void server_updated (struct file_info *finfo, Vers_TS *vers,
+                     enum server_updated_arg4 updated, mode_t mode,
+                     unsigned char *checksum, struct buffer *filebuf);
+
+bool server_use_bases (void);
+/* Whether we should send RCS format patches.  */
+int server_use_rcs_diff (void);
+
+/* Set the Entries.Static flag.  */
+void server_set_entstat (const char *update_dir, const char *repository);
+/* Clear it.  */
+void server_clear_entstat (const char *update_dir, const char *repository);
+
+/* Set or clear a per-directory sticky tag or date.  */
+void server_set_sticky (const char *update_dir, const char *repository,
+                        const char *tag, const char *date, int nonbranch);
+
+/* Send Clear-template response.  */
+void server_clear_template (const char *update_dir, const char *repository);
+
+/* Send Template response.  */
+void server_template (const char *update_dir, const char *repository);
+
+void server_update_entries (const char *file, const char *update_dir,
+                            const char *repository,
+                            enum server_updated_arg4 updated);
+
+/* Pointer to a malloc'd string which is the directory which
+   the server should prepend to the pathnames which it sends
+   to the client.  */
+extern char *server_dir;
+
+void server_cleanup (void);
+
+#ifdef SERVER_FLOWCONTROL
+/* Pause if it's convenient to avoid memory blowout */
+void server_pause_check (void);
+#endif /* SERVER_FLOWCONTROL */
+
+#ifdef AUTH_SERVER_SUPPORT
+extern char *CVS_Username;
+#endif /* AUTH_SERVER_SUPPORT */
+
+#endif /* SERVER_SUPPORT */
+
+/* Stuff shared with the client.  */
+struct request
+{
+  /* Name of the request.  */
+  char *name;
+
+#ifdef SERVER_SUPPORT
+  /*
+   * Function to carry out the request.  ARGS is the text of the command
+   * after name and, if present, a single space, have been stripped off.
+   */
+  void (*func) (char *args);
+#endif
+
+  /* One or more of the RQ_* flags described below.  */
+  int flags;
+
+  /* If set, failure to implement this request can imply a fatal
+     error.  This should be set only for commands which were in the
+     original version of the protocol; it should not be set for new
+     commands.  */
+#define RQ_ESSENTIAL 1
+
+  /* Set by the client if the server we are talking to supports it.  */
+#define RQ_SUPPORTED 2
+
+  /* If set, and client and server both support the request, the
+     client should tell the server by making the request.  */
+#define RQ_ENABLEME 4
+
+  /* The server may accept this request before "Root".  */
+#define RQ_ROOTLESS 8
+};
+
+/* Table of requests ending with an entry with a NULL name.  */
+extern struct request requests[];
+
+/* Gzip library, see zlib.c.  */
+int gunzip_in_mem (const char *, unsigned char *, size_t *, char **);
+int gunzip_and_write (int, const char *, unsigned char *, size_t);
+int read_and_gzip (int, const char *, unsigned char **, size_t *, size_t *,
+                   int);
+void server_edit_file (struct file_info *finfo);
+
+/* The TRACE macro */
+void cvs_trace (int level, const char *fmt, ...)
+  __attribute__ ((__format__ (__printf__, 2, 3)));
+#define TRACE cvs_trace
+/* Trace levels:
+ *
+ * TRACE_FUNCTION      Trace function calls, often including function
+ *                     arguments.  This is the trace level that, historically,
+ *                     applied to all trace calls.
+ * TRACE_FLOW          Include the flow control functions, such as
+ *                     start_recursion, do_recursion, and walklist in the
+ *                     function traces.
+ * TRACE_DATA          Trace important internal function data.
+ */ 
+#define TRACE_FUNCTION         1
+#define TRACE_FLOW             2
+#define TRACE_DATA             3
+
+extern cvsroot_t *referrer;
+
+void server_base_checkout (RCSNode *rcs, struct file_info *finfo,
+                          const char *prev, const char *rev, const char *ptag,
+                          const char *tag, const char *poptions,
+                          const char *options);
+void server_temp_checkout (RCSNode *rcs, struct file_info *finfo,
+                          const char *prev, const char *rev, const char *ptag,
+                          const char *tag, const char *poptions,
+                          const char *options, const char *tempfile);
+
+void server_base_copy (struct file_info *file, const char *rev,
+                      const char *flags);
+void server_base_merge (struct file_info *finfo, const char *rev1,
+                       const char *rev2);
+bool server_use_bases (void);
+
+void cvs_output (const char *, size_t);
+void cvs_output_binary (char *, size_t);
+void cvs_outerr (const char *, size_t);
+void cvs_flusherr (void);
+void cvs_flushout (void);
+void cvs_output_tagged (const char *, const char *);
+
+#endif /* !defined SERVER_H */
Index: ccvs/src/sign.c
diff -u /dev/null ccvs/src/sign.c:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/sign.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,366 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "sign.h"
+
+/* Standard headers.  */
+#include <assert.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+/* GNULIB headers.  */
+#include "error.h"
+#include "wait.h"
+#include "xalloc.h"
+
+/* CVS headers.  */
+#include "filesubr.h"
+#include "root.h"
+#include "run.h"
+#include "stack.h"
+#include "stack.h"
+#include "subr.h"
+
+
+
+extern int noexec;
+
+
+
+/*
+ * Globals set via the command line parser in main.c.
+ */
+
+/* If a program capable of generating OpenPGP signatures couldn't be found at
+ * configure time, default the sign state to off, otherwise, depend on the
+ * server support.
+ */
+#ifdef HAVE_OPENPGP
+static sign_state sign_commits = SIGN_DEFAULT;
+#else
+static sign_state sign_commits = SIGN_NEVER;
+#endif
+
+static char *sign_template;
+static char *sign_textmode;
+static List *sign_args;
+
+
+
+void
+set_sign_commits (sign_state sign)
+{
+    sign_commits = sign;
+}
+
+
+
+void
+set_sign_template (const char *template)
+{
+    assert (template);
+    if (sign_template) free (sign_template);
+    sign_template = xstrdup (template);
+}
+
+
+
+void
+set_sign_textmode (const char *textmode)
+{
+    assert (textmode);
+    if (sign_textmode) free (sign_textmode);
+    sign_textmode = xstrdup (textmode);
+}
+
+
+
+void
+add_sign_arg (const char *arg)
+{
+    if (!sign_args) sign_args = getlist ();
+    push_string (sign_args, xstrdup (arg));
+}
+
+
+
+/* Return true if the client should attempt to sign files sent to the server
+ * as part of a commit.
+ *
+ * INPUTS
+ *   server_support    Whether the server supports signed files.
+ */
+bool
+get_sign_commits (bool server_active, bool server_support)
+{
+    sign_state tmp;
+
+    /* Only sign commits from the client (and in local mode).  */
+    if (server_active) return false;
+
+    if (sign_commits == SIGN_DEFAULT)
+       tmp = current_parsed_root->sign;
+    else
+       tmp = sign_commits;
+
+    return tmp == SIGN_ALWAYS || (tmp == SIGN_DEFAULT && server_support);
+}
+
+
+
+/* Return SIGN_TEMPLATE from the command line if it exists, else return the
+ * SIGN_TEMPLATE from CURRENT_PARSED_ROOT.
+ */
+static inline const char *
+get_sign_template (void)
+{
+    if (sign_template) return sign_template;
+    return current_parsed_root->sign_template;
+}
+
+
+
+/* Return SIGN_TEXTMODE from the command line if it exists, else return the
+ * SIGN_TEXTMODE from CURRENT_PARSED_ROOT.
+ */
+static inline const char *
+get_sign_textmode (void)
+{
+    if (sign_textmode) return sign_textmode;
+    return current_parsed_root->sign_textmode;
+}
+
+
+
+/* Return SIGN_ARGS from the command line if it exists, else return the
+ * SIGN_ARGS from CURRENT_PARSED_ROOT.
+ */
+static inline List *
+get_sign_args (void)
+{
+    if (sign_args && !list_isempty (sign_args)) return sign_args;
+    return current_parsed_root->sign_args;
+}
+
+
+
+/* This function is intended to be passed into walklist() with a list of args
+ * to be substituted into the sign template.
+ *
+ * closure will be a struct format_cmdline_walklist_closure
+ * where closure is undefined.
+ */
+static int
+sign_args_list_to_args_proc (Node *p, void *closure)
+{
+    struct format_cmdline_walklist_closure *c = closure;
+    char *arg = NULL;
+    const char *f;
+    char *d;
+    size_t doff;
+
+    if (p->data == NULL) return 1;
+
+    f = c->format;
+    d = *c->d;
+    /* foreach requested attribute */
+    while (*f)
+    {
+       switch (*f++)
+       {
+           case 'a':
+               arg = p->key;
+               break;
+           default:
+               error (1, 0,
+                      "Unknown format character or not a list attribute: %c",
+                      f[-1]);
+               /* NOTREACHED */
+               break;
+       }
+       /* copy the attribute into an argument */
+       if (c->quotes)
+       {
+           arg = cmdlineescape (c->quotes, arg);
+       }
+       else
+       {
+           arg = cmdlinequote ('"', arg);
+       }
+
+       doff = d - *c->buf;
+       expand_string (c->buf, c->length, doff + strlen (arg));
+       d = *c->buf + doff;
+       strncpy (d, arg, strlen (arg));
+       d += strlen (arg);
+       free (arg);
+
+       /* Always put the extra space on.  we'll have to back up a char
+        * when we're done, but that seems most efficient.
+        */
+       doff = d - *c->buf;
+       expand_string (c->buf, c->length, doff + 1);
+       d = *c->buf + doff;
+       *d++ = ' ';
+    }
+    /* correct our original pointer into the buff */
+    *c->d = d;
+    return 0;
+}
+
+
+
+char *
+get_sigfile_name (const char *fn)
+{
+    return Xasprintf ("%s%s%s", BAKPREFIX, fn, ".sig");
+}
+
+
+
+bool
+have_sigfile (bool server_active, const char *fn)
+{
+    char *sfn;
+    bool retval;
+
+    /* Sig files are only created on the server.  Optimize.  */
+    if (!server_active) return false;
+
+    sfn = get_sigfile_name (fn);
+    if (isreadable (sfn)) retval = true;
+    else retval = false;
+
+    free (sfn);
+    return retval;
+}
+
+
+
+/* Generate a signature and return it in allocated memory.  */
+char *
+gen_signature (const char *srepos, const char *filename, bool bin, size_t *len)
+{
+    char *cmdline;
+    FILE *pipefp;
+    bool save_noexec = noexec;
+    char *sigbuf = NULL;
+    size_t sigoff = 0, sigsize = 64;
+    int pipestatus;
+
+    /*
+     * %p = shortrepos
+     * %r = repository
+     * %{a} = user defined sign args
+     * %t = textmode flag
+     * %s = file name
+     */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             false, srepos,
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             get_sign_template (),
+                             "a", ",", get_sign_args (),
+                             sign_args_list_to_args_proc, (void *) NULL,
+                             "r", "s", current_parsed_root->directory,
+                             "p", "s", srepos,
+                             "t", "s", bin ? NULL : get_sign_textmode (),
+                             "s", "s", filename,
+                             (char *) NULL);
+
+    if (!cmdline || !strlen (cmdline))
+       error (1, 0, "sign template resolved to the empty string!");
+
+    noexec = false;
+    if (!(pipefp = run_popen (cmdline, "r")))
+       error (1, errno, "failed to execute signature generator");
+    noexec = save_noexec;
+
+    do
+    {
+       size_t len;
+
+       sigsize *= 2;
+       sigbuf = xrealloc (sigbuf, sigsize);
+       len = fread (sigbuf + sigoff, sizeof *sigbuf, sigsize - sigoff,
+                    pipefp);
+       sigoff += len;
+       /* Fewer bytes than requested means EOF or error.  */
+    } while (sigsize == sigoff);
+
+    if (ferror (pipefp))
+       error (1, ferror (pipefp), "Error reading from sign program.");
+
+    pipestatus = pclose (pipefp);
+    if (pipestatus == -1)
+       error (1, errno,
+              "failed to obtain exit status from signature program");
+    else if (pipestatus)
+    {
+       if (WIFEXITED (pipestatus))
+           error (1, 0, "sign program exited with error code %d",
+                  WEXITSTATUS (pipestatus));
+       else
+           error (1, 0, "sign program exited via signal %d",
+                  WTERMSIG (pipestatus));
+    }
+
+    *len = sigoff;
+    return sigbuf;
+}
+
+
+
+/* Read a signature from a file and return it in allocated memory.  */
+static char *
+read_signature (const char *fn, bool bin, size_t *len)
+{
+    char *sfn = get_sigfile_name (fn);
+    char *data = NULL;
+    size_t datasize;
+
+    get_file (sfn, sfn, bin ? "rb" : "r", &data, &datasize, len);
+
+    free (sfn);
+    return data;
+}
+
+
+
+/* Generate a signature or read one from the sigfile and return it in
+ * allocated memory.
+ */
+char *
+get_signature (bool server_active, const char *srepos, const char *filename,
+              bool bin, size_t *len)
+{
+    if (server_active) return read_signature (filename, bin, len);
+    /* else */ return gen_signature (srepos, filename, bin, len);
+}
Index: ccvs/src/sign.h
diff -u /dev/null ccvs/src/sign.h:1.1.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/sign.h     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SIGN_H
+#define SIGN_H
+
+#include <stdbool.h>
+#include <stddef.h>
+
+/* Get List.  */
+#include "hash.h"
+
+
+
+typedef enum { SIGN_DEFAULT, SIGN_ALWAYS, SIGN_NEVER } sign_state;
+
+
+
+/* Set values to override current_parsed_root.  */
+void set_sign_commits (sign_state sign);
+void set_sign_template (const char *template);
+void set_sign_textmode (const char *textmode);
+void add_sign_arg (const char *arg);
+
+/* Get values.  */
+bool get_sign_commits (bool server_active, bool server_support);
+char *gen_signature (const char *srepos, const char *filename, bool bin,
+                    size_t *len);
+char *get_signature (bool server_active, const char *srepos,
+                    const char *filename, bool bin, size_t *len);
+
+/* Other utilities.  */
+bool have_sigfile (bool server_active, const char *fn);
+char *get_sigfile_name (const char *fn);
+#endif /* SIGN_H */
Index: ccvs/src/subr.c
diff -u /dev/null ccvs/src/subr.c:1.148.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/subr.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,2043 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ * 
+ * Various useful functions for the CVS support code.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Verify interface.  */
+#include "subr.h"
+
+#include "cvs.h"
+
+#include "canonicalize.h"
+#include "canon-host.h"
+#include "getline.h"
+#include "vasprintf.h"
+#include "vasnprintf.h"
+
+/* Get wint_t.  */
+#ifdef HAVE_WINT_T
+# include <wchar.h>
+#endif
+
+
+
+extern char *getlogin (void);
+
+
+
+/* *STRPTR is a pointer returned from malloc (or NULL), pointing to *N
+   characters of space.  Reallocate it so that points to at least
+   NEWSIZE bytes of space.  Gives a fatal error if out of memory;
+   if it returns it was successful.  */
+void
+expand_string (char **strptr, size_t *n, size_t newsize)
+{
+    while (*n < newsize)
+       *strptr = x2realloc (*strptr, n);
+}
+
+
+
+/* char *
+ * Xreadlink (const char *link, size_t size)
+ *
+ * INPUTS
+ *  link       The original path.
+ *  size       A guess as to the size needed for the path. It need
+ *              not be right.
+ * RETURNS
+ *  The resolution of the final symbolic link in the path.
+ *
+ * ERRORS
+ *  This function exits with a fatal error if it fails to read the
+ *  link for any reason.
+ */
+char *
+Xreadlink (const char *link, size_t size)
+{
+    char *file = xreadlink (link, size);
+
+    if (file == NULL)
+       error (1, errno, "cannot readlink %s", link);
+
+    return file;
+}
+
+
+
+/* *STR is a pointer to a malloc'd string or NULL.  *LENP is its allocated
+ * length.  If *STR is NULL then *LENP must be 0 and visa-versa.
+ * Add SRC to the end of *STR, reallocating *STR if necessary.  */
+void
+xrealloc_and_strcat (char **str, size_t *lenp, const char *src)
+{
+    bool newstr = !*lenp;
+    expand_string (str, lenp, (newstr ? 0 : strlen (*str)) + strlen (src) + 1);
+    if (newstr)
+       strcpy (*str, src);
+    else
+       strcat (*str, src);
+}
+
+
+
+/* Remove trailing newlines from STRING, destructively.
+ *
+ * RETURNS
+ *
+ *   True if any newlines were removed, false otherwise.
+ */
+int
+strip_trailing_newlines (char *str)
+{
+    size_t index, origlen;
+    index = origlen = strlen (str);
+
+    while (index > 0 && str[index-1] == '\n')
+       str[--index] = '\0';
+
+    return index != origlen;
+}
+
+
+
+/* Return the number of levels that PATH ascends above where it starts.
+ * For example:
+ *
+ *   "../../foo" -> 2
+ *   "foo/../../bar" -> 1
+ */
+int
+pathname_levels (const char *p)
+{
+    int level;
+    int max_level;
+
+    if (p == NULL) return 0;
+
+    max_level = 0;
+    level = 0;
+    do
+    {
+       /* Now look for pathname level-ups.  */
+       if (p[0] == '.' && p[1] == '.' && (p[2] == '\0' || ISSLASH (p[2])))
+       {
+           --level;
+           if (-level > max_level)
+               max_level = -level;
+       }
+       else if (p[0] == '\0' || ISSLASH (p[0]) ||
+                (p[0] == '.' && (p[1] == '\0' || ISSLASH (p[1]))))
+           ;
+       else
+           ++level;
+
+       /* q = strchr (p, '/'); but sub ISSLASH() for '/': */
+       while (*p != '\0' && !ISSLASH (*p)) p++;
+       if (*p != '\0') p++;
+    } while (*p != '\0');
+    return max_level;
+}
+
+
+
+/* Free a vector, where (*ARGV)[0], (*ARGV)[1], ... (*ARGV)[*PARGC - 1]
+   are malloc'd and so is *ARGV itself.  Such a vector is allocated by
+   line2argv or expand_wild, for example.  */
+void
+free_names (int *pargc, char **argv)
+{
+    register int i;
+
+    for (i = 0; i < *pargc; i++)
+    {                                  /* only do through *pargc */
+       free (argv[i]);
+    }
+    free (argv);
+    *pargc = 0;                                /* and set it to zero when done 
*/
+}
+
+
+
+/* Convert LINE into arguments separated by SEPCHARS.  Set *ARGC
+   to the number of arguments found, and (*ARGV)[0] to the first argument,
+   (*ARGV)[1] to the second, etc.  *ARGV is malloc'd and so are each of
+   (*ARGV)[0], (*ARGV)[1], ...  Use free_names() to return the memory
+   allocated here back to the free pool.  */
+void
+line2argv (int *pargc, char ***argv, char *line, char *sepchars)
+{
+    char *cp;
+    /* Could make a case for size_t or some other unsigned type, but
+       we'll stick with int to avoid signed/unsigned warnings when
+       comparing with *pargc.  */
+    int argv_allocated;
+
+    /* Small for testing.  */
+    argv_allocated = 1;
+    *argv = xnmalloc (argv_allocated, sizeof (**argv));
+
+    *pargc = 0;
+    for (cp = strtok (line, sepchars); cp; cp = strtok (NULL, sepchars))
+    {
+       if (*pargc == argv_allocated)
+       {
+           argv_allocated *= 2;
+           *argv = xnrealloc (*argv, argv_allocated, sizeof (**argv));
+       }
+       (*argv)[*pargc] = xstrdup (cp);
+       (*pargc)++;
+    }
+}
+
+
+
+/*
+ * Returns the number of dots ('.') found in an RCS revision number
+ */
+int
+numdots (const char *s)
+{
+    int dots = 0;
+
+    for (; *s; s++)
+    {
+       if (*s == '.')
+           dots++;
+    }
+    return (dots);
+}
+
+
+
+/* Compare revision numbers REV1 and REV2 by consecutive fields.
+   Return negative, zero, or positive in the manner of strcmp.  The
+   two revision numbers must have the same number of fields, or else
+   compare_revnums will return an inaccurate result. */
+int
+compare_revnums (const char *rev1, const char *rev2)
+{
+    const char *sp, *tp;
+    char *snext, *tnext;
+    int result = 0;
+
+    sp = rev1;
+    tp = rev2;
+    while (result == 0)
+    {
+       result = strtoul (sp, &snext, 10) - strtoul (tp, &tnext, 10);
+       if (*snext == '\0' || *tnext == '\0')
+           break;
+       sp = snext + 1;
+       tp = tnext + 1;
+    }
+
+    return result;
+}
+
+
+
+/* Increment a revision number.  Working on the string is a bit awkward,
+   but it avoid problems with integer overflow should the revision numbers
+   get really big.  */
+char *
+increment_revnum (const char *rev)
+{
+    char *newrev, *p;
+    size_t len = strlen (rev);
+
+    newrev = xmalloc (len + 2);
+    memcpy (newrev, rev, len + 1);
+    for (p = newrev + len; p != newrev; )
+    {
+       --p;
+       if (!isdigit(*p))
+       {
+           ++p;
+           break;
+       }
+       if (*p != '9')
+       {
+           ++*p;
+           return newrev;
+       }
+       *p = '0';
+    }
+    /* The number was all 9s, so change the first character to 1 and add
+       a 0 to the end.  */
+    *p = '1';
+    p = newrev + len;
+    *p++ = '0';
+    *p = '\0';
+    return newrev;
+}
+
+
+
+/* Return the username by which the caller should be identified in
+   CVS, in contexts such as the author field of RCS files, various
+   logs, etc.  */
+char *
+getcaller (void)
+{
+#ifndef SYSTEM_GETCALLER
+    static char *cache;
+    struct passwd *pw;
+    uid_t uid;
+#endif
+
+    /* If there is a CVS username, return it.  */
+#ifdef AUTH_SERVER_SUPPORT
+    if (CVS_Username != NULL)
+       return CVS_Username;
+#endif
+
+#ifdef SYSTEM_GETCALLER
+    return SYSTEM_GETCALLER ();
+#else
+    /* Get the caller's login from his uid.  If the real uid is "root"
+       try LOGNAME USER or getlogin(). If getlogin() and getpwuid()
+       both fail, return the uid as a string.  */
+
+    if (cache != NULL)
+       return cache;
+
+    uid = getuid ();
+    if (uid == (uid_t) 0)
+    {
+       char *name;
+
+       /* super-user; try getlogin() to distinguish */
+       if (((name = getlogin ()) || (name = getenv("LOGNAME")) ||
+            (name = getenv("USER"))) && *name)
+       {
+           cache = xstrdup (name);
+           return cache;
+       }
+    }
+    if ((pw = (struct passwd *) getpwuid (uid)) == NULL)
+    {
+       cache = Xasprintf ("uid%lu", (unsigned long) uid);
+       return cache;
+    }
+    cache = xstrdup (pw->pw_name);
+    return cache;
+#endif
+}
+
+
+
+#ifdef lint
+# ifndef __GNUC__
+/* ARGSUSED */
+bool
+get_date (struct timespec *result, char const *p, struct timespec const *now)
+{
+    result->tv_sec = 0;
+    result->tv_nsec = 0;
+
+    return false;
+}
+# endif
+#endif
+
+
+
+/* Given some revision, REV, return the first prior revision that exists in the
+ * RCS file, RCS.
+ *
+ * ASSUMPTIONS
+ *   REV exists.
+ *
+ * INPUTS
+ *   RCS       The RCS node pointer.
+ *   REV       An existing revision in the RCS file referred to by RCS.
+ *
+ * RETURNS
+ *   The first prior revision that exists in the RCS file, or NULL if no prior
+ *   revision exists.  The caller is responsible for disposing of this string.
+ *
+ * NOTES
+ *   This function currently neglects the case where we are on the trunk with
+ *   rev = X.1, where X != 1.  If rev = X.Y, where X != 1 and Y > 1, then this
+ *   function should work fine, as revision X.1 must exist, due to RCS rules.
+ */
+char *
+previous_rev (RCSNode *rcs, const char *rev)
+{
+    char *p;
+    char *tmp = xstrdup (rev);
+    long r1;
+    char *retval;
+
+    /* Our retval can have no more digits and dots than our input revision.  */
+    retval = xmalloc (strlen (rev) + 1);
+    p = strrchr (tmp, '.');
+    *p = '\0';
+    r1 = strtol (p+1, NULL, 10);
+    do {
+       if (--r1 == 0)
+       {
+               /* If r1 == 0, then we must be on a branch and our parent must
+                * exist, or we must be on the trunk with a REV like X.1.
+                * We are neglecting the X.1 with X != 1 case by assuming that
+                * there is no previous revision when we discover we were on
+                * the trunk.
+                */
+               p = strrchr (tmp, '.');
+               if (p == NULL)
+                   /* We are on the trunk.  */
+                   retval = NULL;
+               else
+               {
+                   *p = '\0';
+                   sprintf (retval, "%s", tmp);
+               }
+               break;
+       }
+       sprintf (retval, "%s.%ld", tmp, r1);
+    } while (!RCS_exist_rev (rcs, retval));
+
+    free (tmp);
+    return retval;
+}
+
+
+
+/* Given two revisions, find their greatest common ancestor.  If the
+   two input revisions exist, then rcs guarantees that the gca will
+   exist.  */
+char *
+gca (const char *rev1, const char *rev2)
+{
+    int dots;
+    char *gca, *g;
+    const char *p1, *p2;
+    int r1, r2;
+    char *retval;
+
+    if (rev1 == NULL || rev2 == NULL)
+    {
+       error (0, 0, "sanity failure in gca");
+       abort();
+    }
+
+    /* The greatest common ancestor will have no more dots, and numbers
+       of digits for each component no greater than the arguments.  Therefore
+       this string will be big enough.  */
+    g = gca = xmalloc (strlen (rev1) + strlen (rev2) + 100);
+
+    /* walk the strings, reading the common parts. */
+    p1 = rev1;
+    p2 = rev2;
+    do
+    {
+       r1 = strtol (p1, (char **) &p1, 10);
+       r2 = strtol (p2, (char **) &p2, 10);
+       
+       /* use the lowest. */
+       (void) sprintf (g, "%d.", r1 < r2 ? r1 : r2);
+       g += strlen (g);
+       if (*p1 == '.') ++p1;
+       else break;
+       if (*p2 == '.') ++p2;
+       else break;
+    } while (r1 == r2);
+
+    /* erase that last dot. */
+    *--g = '\0';
+
+    /* numbers differ, or we ran out of strings.  we're done with the
+       common parts.  */
+
+    dots = numdots (gca);
+    if (dots == 0)
+    {
+       /* revisions differ in trunk major number.  */
+
+       if (r2 < r1) p1 = p2;
+       if (*p1 == '\0')
+       {
+           /* we only got one number.  this is strange.  */
+           error (0, 0, "bad revisions %s or %s", rev1, rev2);
+           abort();
+       }
+       else
+       {
+           /* we have a minor number.  use it.  */
+           *g++ = '.';
+           while (*p1 != '.' && *p1 != '\0')
+               *g++ = *p1++;
+           *g = '\0';
+       }
+    }
+    else if ((dots & 1) == 0)
+    {
+       /* if we have an even number of dots, then we have a branch.
+          remove the last number in order to make it a revision.  */
+       
+       g = strrchr (gca, '.');
+       *g = '\0';
+    }
+
+    retval = xstrdup (gca);
+    free (gca);
+    return retval;
+}
+
+
+
+/* Give fatal error if REV is numeric and ARGC,ARGV imply we are
+   planning to operate on more than one file.  The current directory
+   should be the working directory.  Note that callers assume that we
+   will only be checking the first character of REV; it need not have
+   '\0' at the end of the tag name and other niceties.  Right now this
+   is only called from admin.c, but if people like the concept it probably
+   should also be called from diff -r, update -r, get -r, and log -r.  */
+void
+check_numeric (const char *rev, int argc, char **argv)
+{
+    if (rev == NULL || !isdigit ((unsigned char) *rev))
+       return;
+
+    /* Note that the check for whether we are processing more than one
+       file is (basically) syntactic; that is, we don't behave differently
+       depending on whether a directory happens to contain only a single
+       file or whether it contains more than one.  I strongly suspect this
+       is the least confusing behavior.  */
+    if (argc != 1
+       || (!wrap_name_has (argv[0], WRAP_TOCVS) && isdir (argv[0])))
+    {
+       error (0, 0, "while processing more than one file:");
+       error (1, 0, "attempt to specify a numeric revision");
+    }
+}
+
+
+
+/*
+ *  Sanity checks and any required fix-up on message passed to RCS via '-m'.
+ *  RCS 5.7 requires that a non-total-whitespace, non-null message be provided
+ *  with '-m'.  Returns a newly allocated, non-empty buffer with whitespace
+ *  stripped from end of lines and end of buffer.
+ *
+ *  TODO: We no longer use RCS to manage repository files, so maybe this
+ *  nonsense about non-empty log fields can be dropped.
+ */
+char *
+make_message_rcsvalid (const char *message)
+{
+    char *dst, *dp;
+    const char *mp;
+
+    if (message == NULL) message = "";
+
+    /* Strip whitespace from end of lines and end of string. */
+    dp = dst = (char *) xmalloc (strlen (message) + 1);
+    for (mp = message; *mp != '\0'; ++mp)
+    {
+       if (*mp == '\n')
+       {
+           /* At end-of-line; backtrack to last non-space. */
+           while (dp > dst && (dp[-1] == ' ' || dp[-1] == '\t'))
+               --dp;
+       }
+       *dp++ = *mp;
+    }
+
+    /* Backtrack to last non-space at end of string, and truncate. */
+    while (dp > dst && isspace ((unsigned char) dp[-1]))
+       --dp;
+    *dp = '\0';
+
+    /* After all that, if there was no non-space in the string,
+       substitute a non-empty message. */
+    if (*dst == '\0')
+    {
+       free (dst);
+       dst = xstrdup ("*** empty log message ***");
+    }
+
+    return dst;
+}
+
+
+
+/* Does the file FINFO contain conflict markers?  The whole concept
+   of looking at the contents of the file to figure out whether there are
+   unresolved conflicts is kind of bogus (people do want to manage files
+   which contain those patterns not as conflict markers), but for now it
+   is what we do.  */
+int
+file_has_markers (const struct file_info *finfo)
+{
+    FILE *fp;
+    char *line = NULL;
+    size_t line_allocated = 0;
+    int result;
+
+    result = 0;
+    fp = CVS_FOPEN (finfo->file, "r");
+    if (fp == NULL)
+       error (1, errno, "cannot open %s", finfo->fullname);
+    while (getline (&line, &line_allocated, fp) > 0)
+    {
+       if (strncmp (line, RCS_MERGE_PAT_1, sizeof RCS_MERGE_PAT_1 - 1) == 0 ||
+           strncmp (line, RCS_MERGE_PAT_2, sizeof RCS_MERGE_PAT_2 - 1) == 0 ||
+           strncmp (line, RCS_MERGE_PAT_3, sizeof RCS_MERGE_PAT_3 - 1) == 0)
+       {
+           result = 1;
+           goto out;
+       }
+    }
+    if (ferror (fp))
+       error (0, errno, "cannot read %s", finfo->fullname);
+out:
+    if (fclose (fp) < 0)
+       error (0, errno, "cannot close %s", finfo->fullname);
+    if (line != NULL)
+       free (line);
+    return result;
+}
+
+
+
+bool
+file_contains_keyword (const struct file_info *finfo)
+{
+    FILE *fp;
+    bool result;
+    struct stat st;
+    char *content;
+
+    fp = CVS_FOPEN (finfo->file, "r");
+    if (fp == NULL)
+       error (1, errno, "cannot open %s", finfo->fullname);
+    if (fstat (fileno (fp), &st))
+       error (1, errno, "cannot fstat `%s'", finfo->fullname);
+    content = xmalloc (st.st_size);
+    if (fread (content, sizeof *content, st.st_size, fp) < st.st_size)
+       error (1, errno, "Failed to read from `%s'", finfo->fullname);
+    result = contains_keyword (content, st.st_size);
+    if (fclose (fp) < 0)
+       error (0, errno, "cannot close %s", finfo->fullname);
+    free (content);
+    return result;
+}
+
+
+
+/* Read the entire contents of the file NAME into *BUF.
+   If NAME is NULL, read from stdin.  *BUF
+   is a pointer returned from malloc (or NULL), pointing to *BUFSIZE
+   bytes of space.  The actual size is returned in *LEN.  On error,
+   give a fatal error.  The name of the file to use in error messages
+   (typically will include a directory if we have changed directory)
+   is FULLNAME.  MODE is "r" for text or "rb" for binary.  */
+void
+get_file (const char *name, const char *fullname, const char *mode, char **buf,
+         size_t *bufsize, size_t *len)
+{
+    struct stat s;
+    size_t nread;
+    char *tobuf;
+    FILE *e;
+    size_t filesize;
+
+    if (name == NULL)
+    {
+       e = stdin;
+       filesize = 100; /* force allocation of minimum buffer */
+    }
+    else
+    {
+       /* Although it would be cleaner in some ways to just read
+          until end of file, reallocating the buffer, this function
+          does get called on files in the working directory which can
+          be of arbitrary size, so I think we better do all that
+          extra allocation.  */
+
+       if (stat (name, &s) < 0)
+           error (1, errno, "can't stat %s", fullname);
+
+       /* Convert from signed to unsigned.  */
+       filesize = s.st_size;
+
+       e = xfopen (name, mode);
+    }
+
+    if (*buf == NULL || *bufsize <= filesize)
+    {
+       *bufsize = filesize + 1;
+       *buf = xrealloc (*buf, *bufsize);
+    }
+
+    tobuf = *buf;
+    nread = 0;
+    while (1)
+    {
+       size_t got;
+
+       got = fread (tobuf, 1, *bufsize - (tobuf - *buf), e);
+       if (ferror (e))
+           error (1, errno, "can't read %s", fullname);
+       nread += got;
+       tobuf += got;
+
+       if (feof (e))
+           break;
+
+       /* Allocate more space if needed.  */
+       if (tobuf == *buf + *bufsize)
+       {
+           int c;
+           long off;
+
+           c = getc (e);
+           if (c == EOF)
+               break;
+           off = tobuf - *buf;
+           expand_string (buf, bufsize, *bufsize + 100);
+           tobuf = *buf + off;
+           *tobuf++ = c;
+           ++nread;
+       }
+    }
+
+    if (e != stdin && fclose (e) < 0)
+       error (0, errno, "cannot close %s", fullname);
+
+    *len = nread;
+
+    /* Force *BUF to be large enough to hold a null terminator. */
+    if (nread == *bufsize)
+       expand_string (buf, bufsize, *bufsize + 1);
+    (*buf)[nread] = '\0';
+}
+
+
+
+/* Follow a chain of symbolic links to its destination.  FILENAME
+   should be a handle to a malloc'd block of memory which contains the
+   beginning of the chain.  This routine will replace the contents of
+   FILENAME with the destination (a real file).  */
+void
+resolve_symlink (char **filename)
+{
+    ssize_t rsize;
+
+    if (filename == NULL || *filename == NULL)
+       return;
+
+    while ((rsize = islink (*filename)) > 0)
+    {
+#ifdef HAVE_READLINK
+       /* The clean thing to do is probably to have each filesubr.c
+          implement this (with an error if not supported by the
+          platform, in which case islink would presumably return 0).
+          But that would require editing each filesubr.c and so the
+          expedient hack seems to be looking at HAVE_READLINK.  */
+       char *newname = Xreadlink (*filename, rsize);
+       
+       if (ISABSOLUTE (newname))
+       {
+           free (*filename);
+           *filename = newname;
+       }
+       else
+       {
+           const char *oldname = last_component (*filename);
+           int dirlen = oldname - *filename;
+           char *fullnewname = xmalloc (dirlen + strlen (newname) + 1);
+           strncpy (fullnewname, *filename, dirlen);
+           strcpy (fullnewname + dirlen, newname);
+           free (newname);
+           free (*filename);
+           *filename = fullnewname;
+       }
+#else
+       error (1, 0, "internal error: islink doesn't like readlink");
+#endif
+    }
+}
+
+
+
+/*
+ * Rename a file to an appropriate backup name based on BAKPREFIX.
+ * If suffix non-null, then ".<suffix>" is appended to the new name.
+ *
+ * Returns the new name, which caller may free() if desired.
+ */
+char *
+backup_file (const char *filename, const char *suffix)
+{
+    char *backup_name = Xasprintf ("%s%s%s%s", BAKPREFIX, filename,
+                                  suffix ? "." : "", suffix ? suffix : "");
+
+    if (isfile (filename))
+        copy_file (filename, backup_name);
+
+    return backup_name;
+}
+
+
+
+/*
+ * Copy a string into a buffer escaping any shell metacharacters.  The
+ * buffer should be at least twice as long as the string.
+ *
+ * Returns a pointer to the terminating NUL byte in buffer.
+ */
+char *
+shell_escape(char *buf, const char *str)
+{
+    static const char meta[] = "$`\\\"";
+    const char *p;
+
+    for (;;)
+    {
+       p = strpbrk(str, meta);
+       if (!p) p = str + strlen(str);
+       if (p > str)
+       {
+           memcpy(buf, str, p - str);
+           buf += p - str;
+       }
+       if (!*p) break;
+       *buf++ = '\\';
+       *buf++ = *p++;
+       str = p;
+    }
+    *buf = '\0';
+    return buf;
+}
+
+
+
+/*
+ * We can only travel forwards in time, not backwards.  :)
+ */
+void
+sleep_past (time_t desttime)
+{
+    time_t t;
+    long s;
+    long us;
+
+    while (time (&t) <= desttime)
+    {
+#ifdef HAVE_GETTIMEOFDAY
+       struct timeval tv;
+       gettimeofday (&tv, NULL);
+       if (tv.tv_sec > desttime)
+           break;
+       s = desttime - tv.tv_sec;
+       if (tv.tv_usec > 0)
+           us = 1000000 - tv.tv_usec;
+       else
+       {
+           s++;
+           us = 0;
+       }
+#else
+       /* default to 20 ms increments */
+       s = desttime - t;
+       us = 20000;
+#endif
+
+       {
+           struct timespec ts;
+           ts.tv_sec = s;
+           ts.tv_nsec = us * 1000;
+           (void)nanosleep (&ts, NULL);
+       }
+    }
+}
+
+
+
+/* used to store callback data in a list indexed by the user format string
+ */
+typedef int (*CONVPROC_t) (Node *, void *);
+struct cmdline_bindings
+{
+    char conversion;
+    void *data;
+    CONVPROC_t convproc;
+    void *closure;
+};
+/* since we store the above in a list, we need to dispose of the data field.
+ * we don't have to worry about convproc or closure since pointers are stuck
+ * in there directly and format_cmdline's caller is responsible for disposing
+ * of those if necessary.
+ */
+static void
+cmdline_bindings_hash_node_delete (Node *p)
+{
+    struct cmdline_bindings *b = p->data;
+
+    if (b->conversion != ',')
+    {
+       free (b->data);
+    }
+    free (b);
+}
+
+
+
+/*
+ * assume s is a literal argument and put it between quotes,
+ * escaping as appropriate for a shell command line
+ *
+ * the caller is responsible for disposing of the new string
+ */
+char *
+cmdlinequote (char quotes, char *s)
+{
+    char *quoted = cmdlineescape (quotes, s);
+    char *buf = Xasprintf ("%c%s%c", quotes, quoted, quotes);
+
+    free (quoted);
+    return buf;
+}
+
+
+
+/* read quotes as the type of quotes we are between (if any) and then make our
+ * argument so it could make it past a cmdline parser (using sh as a model)
+ * inside the quotes (if any).
+ *
+ * if you were planning on expanding any paths, it should be done before
+ * calling this function, as it escapes shell metacharacters.
+ *
+ * the caller is responsible for disposing of the new string
+ *
+ * FIXME: See about removing/combining this functionality with shell_escape()
+ * in subr.c.
+ */
+char *
+cmdlineescape (char quotes, char *s)
+{
+    char *buf = NULL;
+    size_t length = 0;
+    char *d = NULL;
+    size_t doff;
+    char *lastspace;
+
+    lastspace = s - 1;
+    do
+    {
+       /* FIXME: Single quotes only require other single quotes to be escaped
+        * for Bourne Shell.
+        */
+       if ( isspace( *s ) ) lastspace = s;
+       if( quotes
+           ? ( *s == quotes
+               || ( quotes == '"'
+                    && ( *s == '$' || *s == '`' || *s == '\\' ) ) )
+           : ( strchr( "\\$`'\"*?", *s )
+               || isspace( *s )
+               || ( lastspace == ( s - 1 )
+                    && *s == '~' ) ) )
+       {
+           doff = d - buf;
+           expand_string (&buf, &length, doff + 1);
+           d = buf + doff;
+           *d++ = '\\';
+       }       
+       doff = d - buf;
+       expand_string (&buf, &length, doff + 1);
+       d = buf + doff;
+    } while ((*d++ = *s++) != '\0');
+    return (buf);
+}
+
+
+
+/* expand format strings in a command line.  modeled roughly after printf
+ *
+ * this function's arg list must be NULL terminated
+ *
+ * assume a space delimited list of args is the desired final output,
+ * but args can be quoted (" or ').
+ *
+ * the best usage examples are in tag.c & logmsg.c, but here goes:
+ *
+ * INPUTS
+ *    int oldway       to support old format strings
+ *    char *srepos     you guessed it
+ *    char *format     the format string to parse
+ *    ...              NULL terminated data list in the following format:
+ *                     char *userformat, char *printfformat, <type> data
+ *                         where
+ *                             char *userformat        a list of possible
+ *                                                     format characters the
+ *                                                     end user might pass us
+ *                                                     in the format string
+ *                                                     (e.g. those found in
+ *                                                     taginfo or loginfo)
+ *                                                     multiple characters in
+ *                                                     this strings will be
+ *                                                     aliases for each other
+ *                             char *printfformat      the same list of args
+ *                                                     printf uses to
+ *                                                     determine what kind of
+ *                                                     data the next arg will
+ *                                                     be
+ *                             <type> data             a piece of data to be
+ *                                                     formatted into the user
+ *                                                     string, <type>
+ *                                                     determined by the
+ *                                                     printfformat string.
+ *             or      
+ *                     char *userformat, char *printfformat, List *data,
+ *                             int (*convproc) (Node *, void *), void *closure
+ *                         where
+ *                             char *userformat        same as above, except
+ *                                                     multiple characters in
+ *                                                     this string represent
+ *                                                     different node
+ *                                                     attributes which can be
+ *                                                     retrieved from data by
+ *                                                     convproc
+ *                             char *printfformat      = ","
+ *                             List *data              the list to be walked
+ *                                                     with walklist &
+ *                                                     convproc to retrieve
+ *                                                     data for each of the
+ *                                                     possible format
+ *                                                     characters in
+ *                                                     userformat
+ *                             int (*convproc)()       see data
+ *                             void *closure           arg to be passed into
+ *                                                     walklist as closure
+ *                                                     data for convproc
+ *
+ * EXAMPLE
+ *    (ignoring oldway variable and srepos since those are only around while we
+ *    SUPPORT_OLD_INFO_FMT_STRINGS)
+ *    format_cmdline ("/cvsroot/CVSROOT/mytaginfoproc %t %o %{sVv}",
+ *                    "t", "s", "newtag",
+ *                    "o", "s", "mov",
+ *                    "xG", "ld", longintwhichwontbeusedthispass,
+ *                    "sVv", ",", tlist, pretag_list_to_args_proc,
+ *                    (void *) mydata,
+ *                    (char *) NULL);
+ *
+ *    would generate the following command line, assuming two files in tlist,
+ *    file1 & file2, each with old versions 1.1 and new version 1.1.2.3:
+ *
+ *       /cvsroot/CVSROOT/mytaginfoproc "newtag" "mov" "file1" "1.1" "1.1.2.3" 
"file2" "1.1" "1.1.2.3"
+ *
+ * RETURNS
+ *    pointer to newly allocated string.  the caller is responsible for
+ *    disposing of this string.
+ */
+char *
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+format_cmdline (bool oldway, const char *srepos, const char *format, ...)
+#else /* SUPPORT_OLD_INFO_FMT_STRINGS */
+format_cmdline (const char *format, ...)
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+{
+    va_list args;      /* our input function args */
+    char *buf;         /* where we store our output string */
+    size_t length;     /* the allocated length of our output string in bytes.
+                        * used as a temporary storage for the length of the
+                        * next function argument during function
+                        * initialization
+                        */
+    char *pfmt;                /* initially the list of fmt keys passed in,
+                        * but used as a temporary key buffer later
+                        */
+    char *fmt;         /* buffer for format string which we are processing */
+    size_t flen;       /* length of fmt buffer */
+    char *d, *q, *r;    /* for walking strings */
+    const char *s;
+    size_t doff, qoff;
+    char inquotes;
+
+    List *pflist = getlist();  /* our list of input data indexed by format
+                                * "strings"
+                                */
+    Node *p;
+    struct cmdline_bindings *b;
+    static int warned_of_deprecation = 0;
+    char key[] = "?";          /* Used as temporary storage for a single
+                                * character search string used to locate a
+                                * hash key.
+                                */
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+    /* state varialbes in the while loop which parses the actual
+     * format string in the final parsing pass*/
+    int onearg;
+    int subbedsomething;
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+    if (oldway && !warned_of_deprecation)
+    {
+       /* warn the user that we don't like his kind 'round these parts */
+       warned_of_deprecation = 1;
+       error (0, 0,
+"warning:  Set to use deprecated info format strings.  Establish\n"
+"compatibility with the new info file format strings (add a temporary '1' in\n"
+"all info files after each '%%' which doesn't represent a literal percent)\n"
+"and set UseNewInfoFmtStrings=yes in CVSROOT/config.  After that, convert\n"
+"individual command lines and scripts to handle the new format at your\n"
+"leisure.");
+    }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+
+    va_start (args, format);
+
+    /* read our possible format strings
+     * expect a certain number of arguments by type and a NULL format
+     * string to terminate the list.
+     */
+    while ((pfmt = va_arg (args, char *)) != NULL)
+    {
+       char *conversion = va_arg (args, char *);
+
+       char conversion_error = 0;
+       char char_conversion = 0;
+       char decimal_conversion = 0;
+       char integer_conversion = 0;
+       char string_conversion = 0;
+
+       /* allocate space to save our data */
+       b = xmalloc(sizeof(struct cmdline_bindings));
+
+       /* where did you think we were going to store all this data??? */
+       b->convproc = NULL;
+       b->closure = NULL;
+
+       /* read a length from the conversion string */
+       s = conversion;
+       length = 0;
+       while (!length && *s)
+       {
+           switch (*s)
+           {
+               case 'h':
+                   integer_conversion = 1;
+                   if (s[1] == 'h')
+                   {
+                       length = sizeof (char);
+                       s += 2;
+                   }
+                   else
+                   {
+                       char_conversion = 1;
+                       length = sizeof (short);
+                       s++;
+                   }
+                   break;
+#ifdef HAVE_INTMAX_T
+               case 'j':
+                   integer_conversion = 1;
+                   length = sizeof (intmax_t);
+                   s++;
+                   break;
+#endif /* HAVE_INTMAX_T */
+               case 'l':
+                   integer_conversion = 1;
+                   if (s[1] == 'l')
+                   {
+#ifdef HAVE_LONG_LONG
+                       length = sizeof (long long);
+#endif
+                       s += 2;
+                   }
+                   else
+                   {
+                       char_conversion = 2;
+                       string_conversion = 2;
+                       length = sizeof (long);
+                       s++;
+                   }
+                   break;
+               case 't':
+                   integer_conversion = 1;
+                   length = sizeof (ptrdiff_t);
+                   s++;
+                   break;
+               case 'z':
+                   integer_conversion = 1;
+                   length = sizeof (size_t);
+                   s++;
+                   break;
+#ifdef HAVE_LONG_DOUBLE
+               case 'L':
+                   decimal_conversion = 1;
+                   length = sizeof (long double);
+                   s++;
+                   break;
+#endif
+               default:
+                   char_conversion = 1;
+                   decimal_conversion = 1;
+                   integer_conversion = 1;
+                   string_conversion = 1;
+                   /* take care of it when we find out what we're looking for 
*/
+                   length = -1;
+                   break;
+           }
+       }
+       /* if we don't have a valid conversion left, that is an error */
+       /* read an argument conversion */
+       buf = xmalloc (strlen(conversion) + 2);
+       *buf = '%';
+       strcpy (buf+1, conversion);
+       switch (*s)
+       {
+           case 'c':
+               /* chars (an integer conversion) */
+               if (!char_conversion)
+               {
+                   conversion_error = 1;
+                   break;
+               }
+               if (char_conversion == 2)
+               {
+#ifdef HAVE_WINT_T
+                   length = sizeof (wint_t);
+#else
+                   conversion_error = 1;
+                   break;
+#endif
+               }
+               else
+                   length = sizeof (char);
+               /* fall through... */
+           case 'd':
+           case 'i':
+           case 'o':
+           case 'u':
+           case 'x':
+           case 'X':
+               /* integer conversions */
+               if (!integer_conversion)
+               {
+                   conversion_error = 1;
+                   break;
+               }
+               if (length == -1)
+               {
+                   length = sizeof (int);
+               }
+               switch (length)
+               {
+                   case sizeof(char):
+                   {
+                       char arg_char = (char) va_arg (args, int);
+                       b->data = Xasprintf (buf, arg_char);
+                       break;
+                   }
+#ifdef UNIQUE_INT_TYPE_WINT_T          /* implies HAVE_WINT_T */
+                   case sizeof(wint_t):
+                   {
+                       wint_t arg_wint_t = va_arg (args, wint_t);
+                       b->data = Xasprintf (buf, arg_wint_t);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_WINT_T */
+#ifdef UNIQUE_INT_TYPE_SHORT
+                   case sizeof(short):
+                   {
+                       short arg_short = (short) va_arg (args, int);
+                       b->data = Xasprintf (buf, arg_short);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_SHORT */
+#ifdef UNIQUE_INT_TYPE_INT
+                   case sizeof(int):
+                   {
+                       int arg_int = va_arg (args, int);
+                       b->data = Xasprintf(buf, arg_int);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_INT */
+#ifdef UNIQUE_INT_TYPE_LONG
+                   case sizeof(long):
+                   {
+                       long arg_long = va_arg (args, long);
+                       b->data = Xasprintf (buf, arg_long);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_LONG */
+#ifdef UNIQUE_INT_TYPE_LONG_LONG       /* implies HAVE_LONG_LONG */
+                   case sizeof(long long):
+                   {
+                       long long arg_long_long = va_arg (args, long long);
+                       b->data = Xasprintf (buf, arg_long_long);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_LONG_LONG */
+#ifdef UNIQUE_INT_TYPE_INTMAX_T                /* implies HAVE_INTMAX_T */
+                   case sizeof(intmax_t):
+                   {
+                       intmax_t arg_intmax_t = va_arg (args, intmax_t);
+                       b->data = Xasprintf (buf, arg_intmax_t);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_INTMAX_T */
+#ifdef UNIQUE_INT_TYPE_SIZE_T
+                   case sizeof(size_t):
+                   {
+                       size_t arg_size_t = va_arg (args, size_t);
+                       b->data = Xasprintf (buf, arg_size_t);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_SIZE_T */
+#ifdef UNIQUE_INT_TYPE_PTRDIFF_T
+                   case sizeof(ptrdiff_t):
+                   {
+                       ptrdiff_t arg_ptrdiff_t = va_arg (args, ptrdiff_t);
+                       b->data = Xasprintf (buf, arg_ptrdiff_t);
+                       break;
+                   }
+#endif /* UNIQUE_INT_TYPE_PTRDIFF_T */
+                   default:
+                       dellist(&pflist);
+                       free(b);
+                       error (1, 0,
+"internal error:  unknown integer arg size (%d)",
+                               length);
+                       break;
+               }
+               break;
+           case 'a':
+           case 'A':
+           case 'e':
+           case 'E':
+           case 'f':
+           case 'F':
+           case 'g':
+           case 'G':
+               /* decimal conversions */
+               if (!decimal_conversion)
+               {
+                   conversion_error = 1;
+                   break;
+               }
+               if (length == -1)
+               {
+                   length = sizeof (double);
+               }
+               switch (length)
+               {
+                   case sizeof(double):
+                   {
+                       double arg_double = va_arg (args, double);
+                       b->data = Xasprintf (buf, arg_double);
+                       break;
+                   }
+#ifdef UNIQUE_FLOAT_TYPE_LONG_DOUBLE   /* implies HAVE_LONG_DOUBLE */
+                   case sizeof(long double):
+                   {
+                       long double arg_long_double = va_arg (args, long 
double);
+                       b->data = Xasprintf (buf, arg_long_double);
+                       break;
+                   }
+#endif /* UNIQUE_FLOAT_TYPE_LONG_DOUBLE */
+                   default:
+                       dellist(&pflist);
+                       free(b);
+                       error (1, 0,
+"internal error:  unknown floating point arg size (%d)",
+                               length);
+                       break;
+               }
+               break;
+           case 's':
+               switch (string_conversion)
+               {
+                   case 1:
+                       b->data = xstrdup (va_arg (args, char *));
+                       break;
+#ifdef HAVE_WCHAR_T
+                   case 2:
+                   {
+                       wchar_t *arg_wchar_t_string = va_arg (args, wchar_t *);
+                       b->data = Xasprintf (buf, arg_wchar_t_string);
+                       break;
+                   }
+#endif /* HAVE_WCHAR_T */
+                   default:
+                       conversion_error = 1;
+                       break;
+               }
+               break;
+           case ',':
+               if (length != -1)
+               {
+                   conversion_error = 1;
+                   break;
+               }
+               b->data = va_arg (args, List *);
+               b->convproc = va_arg (args, CONVPROC_t);
+               b->closure = va_arg (args, void *);
+               break;
+           default:
+               conversion_error = 1;
+               break;
+       }
+       free (buf);
+       /* fail if we found an error or haven't found the end of the string */
+       if (conversion_error || s[1])
+       {
+           error (1, 0,
+"internal error (format_cmdline): '%s' is not a valid conversion!!!",
+                   conversion);
+       }
+
+
+       /* save our type  - we really only care wheter it's a list type (',')
+        * or not from now on, but what the hell...
+        */
+       b->conversion = *s;
+
+       /* separate the user format string into parts and stuff our data into
+        * the pflist (once for each possible string - diverse keys can have
+        * duplicate data).
+        */
+       q = pfmt;
+       while (*q)
+       {
+           struct cmdline_bindings *tb;
+           if (*q == '{')
+           {
+               s = q + 1;
+               while (*++q && *q != '}');
+               r = q + 1;
+           }
+           else
+           {
+               s = q++;
+               r = q;
+           }
+           if (*r)
+           {
+               /* copy the data since we'll need it again */
+               tb = xmalloc(sizeof(struct cmdline_bindings));
+               if (b->conversion == ',')
+               {
+                   tb->data = b->data;
+               }
+               else
+               {
+                   tb->data = xstrdup(b->data);
+               }
+               tb->conversion = b->conversion;
+               tb->convproc = b->convproc;
+               tb->closure = b->closure;
+           }
+           else
+           {
+               /* we're done after this, so we don't need to copy the data */
+               tb = b;
+           }
+           p = getnode();
+           p->key = xmalloc((q - s) + 1);
+           strncpy (p->key, s, q - s);
+           p->key[q-s] = '\0';
+           p->data = tb;
+           p->delproc = cmdline_bindings_hash_node_delete;
+           addnode(pflist,p);
+       }
+    }
+
+    /* we're done with va_list */
+    va_end(args);
+
+    /* All formatted strings include a format character that resolves to the
+     * empty string by default, so put it in pflist.
+     */
+    /* allocate space to save our data */
+    b = xmalloc(sizeof(struct cmdline_bindings));
+    b->conversion = 's';
+    b->convproc = NULL;
+    b->closure = NULL;
+    b->data = xstrdup( "" );
+    p = getnode();
+    p->key = xstrdup( "n" );
+    p->data = b;
+    p->delproc = cmdline_bindings_hash_node_delete;
+    addnode( pflist,p );
+
+    /* finally, read the user string and copy it into rargv as appropriate */
+    /* user format strings look as follows:
+     *
+     * %% is a literal %
+     * \X, where X is any character = \X, (this is the escape you'd expect, but
+     *        we are leaving the \ for an expected final pass which splits our
+     *        output string into separate arguments
+     *
+     * %X means sub var "X" into location
+     * %{VWXYZ} means sub V,W,X,Y,Z into location as a single arg.  The shell
+     *        || would be to quote the comma separated arguments.  Each list
+     *        that V, W, X, Y, and Z represent attributes of will cause a new
+     *        tuple to be inserted for each list item with a space between
+     *        items.
+     *        e.g."V W1,X1,Z1 W2,X2,Z2 W3,X3,Z3 Y1 Y2" where V is not a list
+     *        variable, W,X,&Z are attributes of a list with 3 items and Y is 
an
+     *        attribute of a second list with 2 items.
+     * %,{VWXYZ} means to separate the args.  The previous example would 
produce
+     *        V W1 X1 Z1 W2 X2 Z2 W3 X3 Z3 Y1 Y2, where each variable is now a
+     *        separate, space delimited, arguments within a single argument.
+     * a%{XY}, where 'a' is a literal, still produces a single arg (a"X Y", in
+     *        shell)
+     * a%1{XY}, where 'a' is a literal, splits the literal as it produces
+     *        multiple args (a X Y).  The rule is that each sub will produce a
+     *        separate arg.  Without a comma, attributes will still be grouped
+     *        together & comma separated in what could be a single argument,
+     *        but internal quotes, commas, and spaces are not excaped.
+     *
+     * clearing the variable oldway, passed into this function, causes the
+     * behavior of '1' and "," in the format string to reverse.
+     */
+
+    /* for convenience, use fmt as a temporary key buffer.
+     * for speed, attempt to realloc it as little as possible
+     */
+    fmt = NULL;
+    flen = 0;
+    
+    /* buf = current argv entry being built
+     * length = current length of buf
+     * s = next char in source buffer to read
+     * d = next char location to write (in buf)
+     * inquotes = current quote char or NUL
+     */
+    s = format;
+    d = buf = NULL;
+    length = 0;
+    doff = d - buf;
+    expand_string (&buf, &length, doff + 1);
+    d = buf + doff;
+
+    inquotes = '\0';
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+    subbedsomething = 0;
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+    while ((*d++ = *s) != '\0')
+    {
+       int list = 0;
+       switch (*s++)
+       {
+           case '\\':
+               /* the character after a \ goes unprocessed but leave the \ in
+                * the string so the function that splits this string into a
+                * command line later can deal with quotes properly
+                *
+                * ignore a NUL
+                */
+               if (*s)
+               {
+                   doff = d - buf;
+                   expand_string (&buf, &length, doff + 1);
+                   d = buf + doff;
+                   *d++ = *s++;
+               }
+               break;
+           case '\'':
+           case '"':
+               /* keep track of quotes so we can escape quote chars we sub in
+                * - the API is that a quoted format string will guarantee that
+                * it gets passed into the command as a single arg
+                */
+               if (!inquotes) inquotes = s[-1];
+               else if (s[-1] == inquotes) inquotes = '\0';
+               break;
+           case '%':
+               if (*s == '%')
+               {
+                   /* "%%" is a literal "%" */
+                   s++;
+                   break;
+               }
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+               if (oldway && subbedsomething)
+               {
+                   /* the old method was to sub only the first format string */
+                   break;
+               }
+               /* initialize onearg each time we get a new format string */
+               onearg = oldway ? 1 : 0;
+               subbedsomething = 1;
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+               d--;    /* we're going to overwrite the '%' regardless
+                        * of other factors... */
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+               /* detect '1' && ',' in the fmt string. */
+               if (*s == '1')
+               {
+                   onearg = 1;
+                   s++;
+                   if (!oldway)
+                   {
+                       /* FIXME - add FILE && LINE */
+                       error (0, 0,
+"Using deprecated info format strings.  Convert your scripts to use\n"
+"the new argument format and remove '1's from your info file format strings.");
+                   }
+               }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                   
+               /* parse the format string and sub in... */
+               if (*s == '{')
+               {
+                   list = 1;
+                   s++;
+               }
+               /* q = fmt start
+                * r = fmt end + 1
+                */
+               q = fmt;
+               do
+               {
+                   qoff = q - fmt;
+                   expand_string (&fmt, &flen, qoff + 1);
+                   q = fmt + qoff;
+               } while ((*q = *s++) && list && *q++ != '}');
+               /* we will always copy one character, so, whether in list mode
+                * or not, if we just copied a '\0', then we hit the end of the
+                * string before we should have
+                */
+               if (!s[-1])
+               {
+                   /* if we copied a NUL while processing a list, fail
+                    * - we had an empty fmt string or didn't find a list
+                    * terminator ('}')
+                    */
+                   /* FIXME - this wants a file name and line number in a bad
+                    * way.
+                    */
+                   error(1, 0,
+"unterminated format string encountered in command spec.\n"
+"This error is likely to have been caused by an invalid line in a hook 
script\n"
+"spec (see taginfo, loginfo, verifymsginfo, etc. in the Cederqvist).  Most\n"
+"likely the offending line would end with a '%%' character or contain a 
string\n"
+"beginning \"%%{\" and no closing '}' before the end of the line.");
+               }
+               if (list)
+               {
+                   q[-1] = '\0';
+               }
+               else
+               {
+                   /* We're not in a list, so we must have just copied a
+                    * single character.  Terminate the string.
+                    */
+                   q++;
+                   qoff = q - fmt;
+                   expand_string (&fmt, &flen, qoff + 1);
+                   q = fmt + qoff;
+                   *q = '\0';
+               }
+               /* fmt is now a pointer to a list of fmt chars, though the list
+                * could be a single element one
+                */
+               q = fmt;
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+               /* always add quotes in the deprecated onearg case - for
+                * backwards compatibility
+                */
+               if (onearg)
+               {
+                   doff = d - buf;
+                   expand_string (&buf, &length, doff + 1);
+                   d = buf + doff;
+                   *d++ = '"';
+               }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+               /*
+                * for each character in the fmt string,
+                *
+                * all output will be separate quoted arguments (with
+                * internal quotes escaped) if the argument is in quotes
+                * unless the oldway variable is set, in which case the fmt
+                * statment will correspond to a single argument with
+                * internal space or comma delimited arguments
+                *
+                * see the "user format strings" section above for more info
+                */
+               key[0] = *q;
+               if ((p = findnode (pflist, key)) != NULL)
+               {
+                   b = p->data;
+                   if (b->conversion == ',')
+                   {
+                       /* process the rest of the format string as a list */
+                       struct format_cmdline_walklist_closure c;
+                       c.format = q;
+                       c.buf = &buf;
+                       c.length = &length;
+                       c.d = &d;
+                       c.quotes = inquotes;
+                       c.closure = b->closure;
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                       c.onearg = onearg;
+                       c.firstpass = 1;
+                       c.srepos = srepos;
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                       walklist(b->data, b->convproc, &c);
+                       d--;    /* back up one space.  we know that ^
+                                  always adds 1 extra */
+                       q += strlen(q);
+                   }
+                   else
+                   {
+                       /* got a flat item */
+                       char *outstr;
+                       if (strlen(q) > 1)
+                       {
+                           error (1, 0,
+"Multiple non-list variables are not allowed in a single format string.");
+                       }
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                       if (onearg)
+                       {
+                           outstr = b->data;
+                       }
+                       else /* !onearg */
+                       {
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                           /* the *only* case possible without
+                            * SUPPORT_OLD_INFO_FORMAT_STRINGS
+                            * - !onearg
+                            */
+                           /* Avoid adding an empty argument for NULL data.
+                            */
+                           if (!inquotes && b->data)
+                           {
+                               doff = d - buf;
+                               expand_string (&buf, &length, doff + 1);
+                               d = buf + doff;
+                               *d++ = '"';
+                           }
+                           if (b->data)
+                               outstr = cmdlineescape (inquotes ? inquotes
+                                                                : '"',
+                                                       b->data);
+                           else
+                               outstr = xstrdup ("");
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                       } /* onearg */
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                       doff = d - buf;
+                       expand_string (&buf, &length, doff + strlen(outstr));
+                       d = buf + doff;
+                       strncpy(d, outstr, strlen(outstr));
+                       d += strlen(outstr);
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                       if (!onearg)
+                       {
+                           free(outstr);
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                           if (!inquotes && b->data)
+                           {
+                               doff = d - buf;
+                               expand_string (&buf, &length, doff + 1);
+                               d = buf + doff;
+                               *d++ = '"';
+                           }
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                       }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                       q++;
+                   }
+               }
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+               else if (onearg)
+               {
+                   /* the old standard was to ignore unknown format
+                    * characters (print the empty string), but also that
+                    * any format character meant print srepos first
+                    */
+                   q++;
+                   doff = d - buf;
+                   expand_string (&buf, &length, doff + strlen(srepos));
+                   d = buf + doff;
+                   strncpy(d, srepos, strlen(srepos));
+                   d += strlen(srepos);
+               }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+               else /* no key */
+               {
+                   /* print an error message to the user
+                    * FIXME - this should have a file and line number!!! */
+                   error (1, 0,
+"Unknown format character in info file ('%s').\n"
+"Info files are the hook files, verifymsg, taginfo, commitinfo, etc.",
+                           q);
+               }
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+               /* always add quotes in the deprecated onearg case - for
+                * backwards compatibility
+                */
+               if (onearg)
+               {
+                   doff = d - buf;
+                   expand_string (&buf, &length, doff + 1);
+                   d = buf + doff;
+                   *d++ = '"';
+               }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+               break;
+       }
+       doff = d - buf;
+       expand_string (&buf, &length, doff + 1);
+       d = buf + doff;
+    } /* while (*d++ = *s) */
+    if (fmt) free (fmt);
+    if (inquotes)
+    {
+       /* FIXME - we shouldn't need this - Parse_Info should be handling
+        * multiple lines...
+        */
+       error (1, 0, "unterminated quote in format string: %s", format);
+    }
+
+    dellist (&pflist);
+    return buf;
+}
+
+
+
+/* Like xstrdup (), but can handle a NULL argument.
+ */
+char *
+Xstrdup (const char *string)
+{
+  if (string == NULL) return NULL;
+  return xmemdup (string, strlen (string) + 1);
+}
+
+
+
+/* Like xasprintf(), but consider all errors fatal (may never return NULL).
+ */
+char *
+Xasprintf (const char *format, ...)
+{
+    va_list args;
+    char *result;
+
+    va_start (args, format);
+    if (vasprintf (&result, format, args) < 0)
+       error (1, errno, "Failed to write to string.");
+    va_end (args);
+
+    return result;
+}
+
+
+
+/* Like xasnprintf(), but consider all errors fatal (may never return NULL).
+ */
+char *
+Xasnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+    va_list args;
+    char *result;
+
+    va_start (args, format);
+    result = vasnprintf (resultbuf, lengthp, format, args);
+    if (result == NULL)
+       error (1, errno, "Failed to write to string.");
+    va_end (args);
+
+    return result;
+}
+
+
+
+/* Print a warning and return false if P doesn't look like a string specifying
+ * a boolean value.
+ *
+ * Sets *VAL to the parsed value when it is found to be valid.  *VAL will not
+ * be altered when false is returned.
+ *
+ * INPUTS
+ *   infopath  Where the error is reported to be from on error.  This could
+ *             be, for example, the name of the file the boolean is being read
+ *             from.
+ *   option    An option name being parsed, reported in traces and any error
+ *             message.
+ *   p         The string to actually read the option from.
+ *   val       Pointer to where to store the boolean read from P.
+ *
+ * OUTPUTS
+ *   val       TRUE/FALSE stored, as read, when there are no errors.
+ *
+ * RETURNS
+ *   true      If VAL was read.
+ *   false     On error.
+ */
+bool
+readBool (const char *infopath, const char *option, const char *p, bool *val)
+{
+    TRACE (TRACE_FLOW, "readBool (%s, %s, %s)", infopath, option, p);
+    if (!strcasecmp (p, "no") || !strcasecmp (p, "false")
+        || !strcasecmp (p, "off") || !strcmp (p, "0"))
+    {
+       TRACE (TRACE_DATA, "Read %d for %s", *val, option);
+       *val = false;
+       return true;
+    }
+    else if (!strcasecmp (p, "yes") || !strcasecmp (p, "true")
+            || !strcasecmp (p, "on") || !strcmp (p, "1"))
+    {
+       TRACE (TRACE_DATA, "Read %d for %s", *val, option);
+       *val = true;
+       return true;
+    }
+
+    error (0, 0, "%s: unrecognized value `%s' for `%s'",
+          infopath, p, option);
+    return false;
+}
+
+
+
+/*
+ * Open a file, exiting with a message on error.
+ *
+ * INPUTS
+ *   name      The name of the file to open.
+ *   mode      Mode to open file in, as POSIX fopen().
+ *
+ * NOTES
+ *   If you want to handle errors, just call fopen (NAME, MODE).
+ *
+ * RETURNS
+ *   The new FILE pointer.
+ */
+FILE *
+xfopen (const char *name, const char *mode)
+{
+    FILE *fp;
+
+    if (!(fp = fopen (name, mode)))
+       error (1, errno, "cannot open %s", name);
+    return fp;
+}
+
+
+
+/* char *
+ * xcanonicalize_file_name (const char *path)
+ *
+ * Like canonicalize_file_name(), but exit on error.
+ *
+ * INPUTS
+ *  path       The original path.
+ *
+ * RETURNS
+ *  The path with any symbolic links, `.'s, or `..'s, expanded.
+ *
+ * ERRORS
+ *  This function exits with a fatal error if it fails to read the link for
+ *  any reason.
+ */
+char *
+xcanonicalize_file_name (const char *path)
+{
+    char *hardpath = canonicalize_file_name (path);
+    if (!hardpath)
+       error (1, errno, "Failed to resolve path: `%s'", path);
+    return hardpath;
+}
+
+
+
+/* Declared in main.c.  */
+extern char *server_hostname;
+
+/* Return true if OTHERHOST resolves to this host in the DNS.
+ *
+ * GLOBALS
+ *   server_hostname   The name of this host, as determined by the call to
+ *                     xgethostname() in main().
+ *
+ * RETURNS
+ *   true      If OTHERHOST equals or resolves to HOSTNAME.
+ *   false     Otherwise.
+ */
+bool
+isThisHost (const char *otherhost)
+{
+    char *fqdno;
+    char *fqdns;
+    bool retval;
+
+    /* As an optimization, check the literal strings before looking up
+     * OTHERHOST in the DNS.
+     */
+    if (!strcasecmp (server_hostname, otherhost))
+       return true;
+
+    fqdno = canon_host (otherhost);
+    if (!fqdno)
+       error (1, 0, "Name lookup failed for `%s': %s",
+              otherhost, ch_strerror ());
+    fqdns = canon_host (server_hostname);
+    if (!fqdns)
+       error (1, 0, "Name lookup failed for `%s': %s",
+              server_hostname, ch_strerror ());
+
+    retval = !strcasecmp (fqdns, fqdno);
+
+    free (fqdno);
+    free (fqdns);
+    return retval;
+}
+
+
+
+/* Return true if two paths match, resolving symlinks.
+ */
+bool
+isSamePath (const char *path1_in, const char *path2_in)
+{
+    char *p1, *p2;
+    bool same;
+
+    if (!strcmp (path1_in, path2_in))
+       return true;
+
+    /* Path didn't match, but try to resolve any links that may be
+     * present.
+     */
+    if (!isdir (path1_in) || !isdir (path2_in))
+       /* To be resolvable, paths must exist on this server.  */
+       return false;
+
+    p1 = xcanonicalize_file_name (path1_in);
+    p2 = xcanonicalize_file_name (path2_in);
+    if (strcmp (p1, p2))
+       same = false;
+    else
+       same = true;
+
+    free (p1);
+    free (p2);
+    return same;
+}
Index: ccvs/src/subr.h
diff -u /dev/null ccvs/src/subr.h:1.7.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/subr.h     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 1992, Brian Berliner and Jeff Polk
+ * Copyright (c) 1989-1992, Brian Berliner
+ * Copyright (c) 2004, Derek R. Price and Ximbiot <http://ximbiot.com>
+ * Copyright (c) 1989-2004 The Free Software Foundation <http://gnu.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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.
+ */
+
+#ifndef SUBR_H
+# define SUBR_H
+
+/* FIXME - This shouldn't be needed here.  Any routine that needs to understand
+ * the underlying structure of an RCSNode should be in rcs*.c.
+ */
+#include "rcs.h"
+
+
+
+#ifdef USE_VMS_FILENAMES
+# define BAKPREFIX     "_$"
+#else /* USE_VMS_FILENAMES */
+# define BAKPREFIX     ".#"            /* when rcsmerge'ing */
+#endif /* USE_VMS_FILENAMES */
+
+
+
+void expand_string (char **, size_t *, size_t);
+char *Xreadlink (const char *link, size_t size);
+void xrealloc_and_strcat (char **, size_t *, const char *);
+int strip_trailing_newlines (char *str);
+int pathname_levels (const char *path);
+void free_names (int *pargc, char *argv[]);
+void line2argv (int *pargc, char ***argv, char *line, char *sepchars);
+int numdots (const char *s);
+int compare_revnums (const char *, const char *);
+char *increment_revnum (const char *);
+char *getcaller (void);
+char *previous_rev (RCSNode *rcs, const char *rev);
+char *gca (const char *rev1, const char *rev2);
+void check_numeric (const char *, int, char **);
+char *make_message_rcsvalid (const char *message);
+int file_has_markers (const struct file_info *);
+bool file_contains_keyword (const struct file_info *finfo);
+void get_file (const char *, const char *, const char *,
+               char **, size_t *, size_t *);
+void resolve_symlink (char **filename);
+char *backup_file (const char *file, const char *suffix);
+char *shell_escape (char *buf, const char *str);
+void sleep_past (time_t desttime);
+
+/* for format_cmdline function - when a list variable is bound to a user 
string,
+ * we need to pass some data through walklist into the callback function.
+ * We use this struct.
+ */
+struct format_cmdline_walklist_closure
+{
+    const char *format;        /* the format string the user passed us */
+    char **buf;                /* *dest = our NUL terminated and possibly too 
short
+                        * destination string
+                        */
+    size_t *length;    /* *dlen = how many bytes have already been allocated to
+                        * *dest.
+                        */
+    char **d;          /* our pointer into buf where the next char should go */
+    char quotes;       /* quotes we are currently between, if any */
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+    int onearg;
+    int firstpass;
+    const char *srepos;
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+    void *closure;     /* our user defined closure */
+};
+char *cmdlinequote (char quotes, char *s);
+char *cmdlineescape (char quotes, char *s);
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+char *format_cmdline (bool oldway, const char *srepos, const char *format, 
...);
+#else /* SUPPORT_OLD_INFO_FMT_STRINGS */
+char *format_cmdline (const char *format, ...);
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+
+/* Many, many CVS calls to xstrdup depend on it to return NULL when its
+ * argument is NULL.
+ */
+#define xstrdup Xstrdup
+char *Xstrdup (const char *str)
+       __attribute__ ((__malloc__));
+
+char *Xasprintf (const char *format, ...)
+       __attribute__ ((__malloc__, __format__ (__printf__, 1, 2)));
+char *Xasnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+        __attribute__ ((__malloc__, __format__ (__printf__, 3, 4)));
+bool readBool (const char *infopath, const char *option,
+              const char *p, bool *val);
+
+FILE *xfopen (const char *, const char *);
+char *xcanonicalize_file_name (const char *path);
+bool isThisHost (const char *otherhost);
+bool isSamePath (const char *path1_in, const char *path2_in);
+#endif /* !SUBR_H */
Index: ccvs/src/tag.c
diff -u /dev/null ccvs/src/tag.c:1.142.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/tag.c      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1690 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ *
+ * Tag and Rtag
+ *
+ * Add or delete a symbolic name to an RCS file, or a collection of RCS files.
+ * Tag uses the checked out revision in the current directory, rtag uses
+ * the modules database, if necessary.
+ */
+
+#include "cvs.h"
+#include "save-cwd.h"
+
+static int rtag_proc (int argc, char **argv, char *xwhere,
+                     char *mwhere, char *mfile, int shorten,
+                     int local_specified, char *mname, char *msg);
+static int check_fileproc (void *callerdat, struct file_info *finfo);
+static int check_filesdoneproc (void *callerdat, int err,
+                               const char *repos, const char *update_dir,
+                               List *entries);
+static int pretag_proc (const char *_repository, const char *_filter,
+                        void *_closure);
+static void masterlist_delproc (Node *_p);
+static void tag_delproc (Node *_p);
+static int pretag_list_to_args_proc (Node *_p, void *_closure);
+
+static Dtype tag_dirproc (void *callerdat, const char *dir,
+                          const char *repos, const char *update_dir,
+                          List *entries);
+static int rtag_fileproc (void *callerdat, struct file_info *finfo);
+static int rtag_delete (RCSNode *rcsfile);
+static int tag_fileproc (void *callerdat, struct file_info *finfo);
+
+static char *numtag;                   /* specific revision to tag */
+static bool numtag_validated = false;
+static char *date = NULL;
+static char *symtag;                   /* tag to add or delete */
+static bool delete_flag;               /* adding a tag by default */
+static bool branch_mode;               /* make an automagic "branch" tag */
+static bool disturb_branch_tags = false;/* allow -F,-d to disturb branch tags 
*/
+static bool force_tag_match = true;    /* force tag to match by default */
+static bool force_tag_move;            /* don't force tag to move by default */
+static bool check_uptodate;            /* no uptodate-check by default */
+static bool attic_too;                 /* remove tag from Attic files */
+static bool is_rtag;
+
+struct tag_info
+{
+    Ctype status;
+    char *oldrev;
+    char *rev;
+    char *tag;
+    char *options;
+};
+
+struct master_lists
+{
+    List *tlist;
+};
+
+static List *mtlist;
+
+static const char rtag_opts[] = "+aBbdFflnQqRr:D:";
+static const char *const rtag_usage[] =
+{
+    "Usage: %s %s [-abdFflnR] [-r rev|-D date] tag modules...\n",
+    "\t-a\tClear tag from removed files that would not otherwise be tagged.\n",
+    "\t-b\tMake the tag a \"branch\" tag, allowing concurrent development.\n",
+    "\t-B\tAllows -F and -d to disturb branch tags.  Use with extreme care.\n",
+    "\t-d\tDelete the given tag.\n",
+    "\t-F\tMove tag if it already exists.\n",
+    "\t-f\tForce a head revision match if tag/date not found.\n",
+    "\t-l\tLocal directory only, not recursive.\n",
+    "\t-n\tNo execution of 'tag program'.\n",
+    "\t-R\tProcess directories recursively.\n",
+    "\t-r rev\tExisting revision/tag.\n",
+    "\t-D\tExisting date.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+static const char tag_opts[] = "+BbcdFflQqRr:D:";
+static const char *const tag_usage[] =
+{
+    "Usage: %s %s [-bcdFflR] [-r rev|-D date] tag [files...]\n",
+    "\t-b\tMake the tag a \"branch\" tag, allowing concurrent development.\n",
+    "\t-B\tAllows -F and -d to disturb branch tags.  Use with extreme care.\n",
+    "\t-c\tCheck that working files are unmodified.\n",
+    "\t-d\tDelete the given tag.\n",
+    "\t-F\tMove tag if it already exists.\n",
+    "\t-f\tForce a head revision match if tag/date not found.\n",
+    "\t-l\tLocal directory only, not recursive.\n",
+    "\t-R\tProcess directories recursively.\n",
+    "\t-r rev\tExisting revision/tag.\n",
+    "\t-D\tExisting date.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+
+
+int
+cvstag (int argc, char **argv)
+{
+    bool local = false;                        /* recursive by default */
+    int c;
+    int err = 0;
+    bool run_module_prog = true;
+
+    is_rtag = (strcmp (cvs_cmd_name, "rtag") == 0);
+
+    if (argc == -1)
+       usage (is_rtag ? rtag_usage : tag_usage);
+
+    optind = 0;
+    while ((c = getopt (argc, argv, is_rtag ? rtag_opts : tag_opts)) != -1)
+    {
+       switch (c)
+       {
+           case 'a':
+               attic_too = true;
+               break;
+           case 'b':
+               branch_mode = true;
+               break;
+           case 'B':
+               disturb_branch_tags = true;
+               break;
+           case 'c':
+               check_uptodate = true;
+               break;
+           case 'd':
+               delete_flag = true;
+               break;
+            case 'F':
+               force_tag_move = true;
+               break;
+           case 'f':
+               force_tag_match = false;
+               break;
+           case 'l':
+               local = true;
+               break;
+           case 'n':
+               run_module_prog = false;
+               break;
+           case 'Q':
+           case 'q':
+               /* The CVS 1.5 client sends these options (in addition to
+                  Global_option requests), so we must ignore them.  */
+               if (!server_active)
+                   error (1, 0,
+                          "-q or -Q must be specified before \"%s\"",
+                          cvs_cmd_name);
+               break;
+           case 'R':
+               local = false;
+               break;
+            case 'r':
+               parse_tagdate (&numtag, &date, optarg);
+                break;
+            case 'D':
+                if (date) free (date);
+                date = Make_Date (optarg);
+                break;
+           case '?':
+           default:
+               usage (is_rtag ? rtag_usage : tag_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+    if (argc < (is_rtag ? 2 : 1))
+       usage (is_rtag ? rtag_usage : tag_usage);
+    symtag = argv[0];
+    argc--;
+    argv++;
+
+    if (date && delete_flag)
+       error (1, 0, "-d makes no sense with a date specification.");
+    if (delete_flag && branch_mode)
+       error (0, 0, "warning: -b ignored with -d options");
+    RCS_check_tag (symtag);
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote)
+    {
+       /* We're the client side.  Fire up the remote server.  */
+       start_server ();
+       
+       ign_setup ();
+
+       if (attic_too)
+           send_arg ("-a");
+       if (branch_mode)
+           send_arg ("-b");
+       if (disturb_branch_tags)
+           send_arg ("-B");
+       if (check_uptodate)
+           send_arg ("-c");
+       if (delete_flag)
+           send_arg ("-d");
+       if (force_tag_move)
+           send_arg ("-F");
+       if (!force_tag_match)
+           send_arg ("-f");
+       if (local)
+           send_arg ("-l");
+       if (!run_module_prog)
+           send_arg ("-n");
+
+       if (numtag)
+           option_with_arg ("-r", numtag);
+       if (date)
+           client_senddate (date);
+
+       send_arg ("--");
+
+       send_arg (symtag);
+
+       if (is_rtag)
+       {
+           int i;
+           for (i = 0; i < argc; ++i)
+               send_arg (argv[i]);
+           send_to_server ("rtag\012", 0);
+       }
+       else
+       {
+           send_files (argc, argv, local, 0,
+
+                       /* I think the -c case is like "cvs status", in
+                        * which we really better be correct rather than
+                        * being fast; it is just too confusing otherwise.
+                        */
+                       check_uptodate ? 0 : SEND_NO_CONTENTS);
+           send_file_names (argc, argv, SEND_EXPAND_WILD);
+           send_to_server ("tag\012", 0);
+       }
+
+        return get_responses_and_close ();
+    }
+#endif
+
+    if (is_rtag)
+    {
+       DBM *db;
+       int i;
+       db = open_module ();
+       for (i = 0; i < argc; i++)
+       {
+           /* XXX last arg should be repository, but doesn't make sense here */
+           history_write ('T', (delete_flag ? "D" : (numtag ? numtag :
+                          (date ? date : "A"))), symtag, argv[i], "");
+           err += do_module (db, argv[i], TAG,
+                             delete_flag ? "Untagging" : "Tagging",
+                             rtag_proc, NULL, 0, local, run_module_prog,
+                             0, symtag);
+       }
+       close_module (db);
+    }
+    else
+    {
+       err = rtag_proc (argc + 1, argv - 1, NULL, NULL, NULL, 0, local, NULL,
+                        NULL);
+    }
+
+    return err;
+}
+
+
+
+struct pretag_proc_data {
+     List *tlist;
+     bool delete_flag;
+     bool force_tag_move;
+     char *symtag;
+};
+
+/*
+ * called from Parse_Info, this routine processes a line that came out
+ * of the posttag file and turns it into a command and executes it.
+ *
+ * RETURNS
+ *    the absolute value of the return value of run_exec, which may or
+ *    may not be the return value of the child process.  this is
+ *    contrained to return positive values because Parse_Info is summing
+ *    return values and testing for non-zeroness to signify one or more
+ *    of its callbacks having returned an error.
+ */
+static int
+posttag_proc (const char *repository, const char *filter, void *closure)
+{
+    char *cmdline;
+    const char *srepos = Short_Repository (repository);
+    struct pretag_proc_data *ppd = closure;
+
+    /* %t = tag being added/moved/removed
+     * %o = operation = "add" | "mov" | "del"
+     * %b = branch mode = "?" (delete ops - unknown) | "T" (branch)
+     *                    | "N" (not branch)
+     * %c = cvs_cmd_name
+     * %p = path from $CVSROOT
+     * %r = path from root
+     * %{sVv} = attribute list = file name, old version tag will be deleted
+     *                           from, new version tag will be added to (or
+     *                           deleted from until
+     *                           SUPPORT_OLD_INFO_FMT_STRINGS is undefined).
+     */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             false, srepos,
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             filter,
+                             "t", "s", ppd->symtag,
+                             "o", "s", ppd->delete_flag
+                             ? "del" : ppd->force_tag_move ? "mov" : "add",
+                             "b", "c", delete_flag
+                             ? '?' : branch_mode ? 'T' : 'N',
+                             "c", "s", cvs_cmd_name,
+#ifdef SERVER_SUPPORT
+                             "R", "s", referrer ? referrer->original : "NONE",
+#endif /* SERVER_SUPPORT */
+                             "p", "s", srepos,
+                             "r", "s", current_parsed_root->directory,
+                             "sVv", ",", ppd->tlist,
+                             pretag_list_to_args_proc, (void *) NULL,
+                             (char *) NULL);
+
+    if (!cmdline || !strlen (cmdline))
+    {
+       if (cmdline) free (cmdline);
+       error (0, 0, "pretag proc resolved to the empty string!");
+       return 1;
+    }
+
+    run_setup (cmdline);
+
+    free (cmdline);
+    return abs (run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL));
+}
+
+
+
+/*
+ * Call any postadmin procs.
+ */
+static int
+tag_filesdoneproc (void *callerdat, int err, const char *repository,
+                   const char *update_dir, List *entries)
+{
+    Node *p;
+    List *mtlist, *tlist;
+    struct pretag_proc_data ppd;
+
+    TRACE (TRACE_FUNCTION, "tag_filesdoneproc (%d, %s, %s)", err, repository,
+           update_dir);
+
+    mtlist = callerdat;
+    p = findnode (mtlist, update_dir);
+    if (p != NULL)
+        tlist = ((struct master_lists *) p->data)->tlist;
+    else
+        tlist = NULL;
+    if (tlist == NULL || tlist->list->next == tlist->list)
+        return err;
+
+    ppd.tlist = tlist;
+    ppd.delete_flag = delete_flag;
+    ppd.force_tag_move = force_tag_move;
+    ppd.symtag = symtag;
+    Parse_Info (CVSROOTADM_POSTTAG, repository, posttag_proc,
+                PIOPT_ALL, &ppd);
+
+    return err;
+}
+
+
+
+/*
+ * callback proc for doing the real work of tagging
+ */
+/* ARGSUSED */
+static int
+rtag_proc (int argc, char **argv, char *xwhere, char *mwhere, char *mfile,
+           int shorten, int local_specified, char *mname, char *msg)
+{
+    /* Begin section which is identical to patch_proc--should this
+       be abstracted out somehow?  */
+    char *myargv[2];
+    int err = 0;
+    int which;
+    char *repository;
+    char *where;
+
+#ifdef HAVE_PRINTF_PTR
+    TRACE (TRACE_FUNCTION,
+          "rtag_proc (argc=%d, argv=%p, xwhere=%s,\n"
+      "                mwhere=%s, mfile=%s, shorten=%d,\n"
+      "                local_specified=%d, mname=%s, msg=%s)",
+           argc, (void *)argv, xwhere ? xwhere : "(null)",
+           mwhere ? mwhere : "(null)", mfile ? mfile : "(null)",
+           shorten, local_specified,
+           mname ? mname : "(null)", msg ? msg : "(null)" );
+#else
+    TRACE (TRACE_FUNCTION,
+          "rtag_proc (argc=%d, argv=%lx, xwhere=%s,\n"
+      "                mwhere=%s, mfile=%s, shorten=%d,\n"
+      "                local_specified=%d, mname=%s, msg=%s )",
+           argc, (unsigned long)argv, xwhere ? xwhere : "(null)",
+           mwhere ? mwhere : "(null)", mfile ? mfile : "(null)",
+           shorten, local_specified,
+           mname ? mname : "(null)", msg ? msg : "(null)" );
+#endif
+
+    if (is_rtag)
+    {
+       repository = xmalloc (strlen (current_parsed_root->directory)
+                              + strlen (argv[0])
+                             + (mfile == NULL ? 0 : strlen (mfile) + 1)
+                              + 2);
+       (void) sprintf (repository, "%s/%s", current_parsed_root->directory,
+                        argv[0]);
+       where = xmalloc (strlen (argv[0])
+                         + (mfile == NULL ? 0 : strlen (mfile) + 1)
+                        + 1);
+       (void) strcpy (where, argv[0]);
+
+       /* If MFILE isn't null, we need to set up to do only part of the
+         * module.
+         */
+       if (mfile != NULL)
+       {
+           char *cp;
+           char *path;
+
+           /* If the portion of the module is a path, put the dir part on
+             * REPOS.
+             */
+           if ((cp = strrchr (mfile, '/')) != NULL)
+           {
+               *cp = '\0';
+               (void) strcat (repository, "/");
+               (void) strcat (repository, mfile);
+               (void) strcat (where, "/");
+               (void) strcat (where, mfile);
+               mfile = cp + 1;
+           }
+
+           /* take care of the rest */
+           path = xmalloc (strlen (repository) + strlen (mfile) + 5);
+           (void) sprintf (path, "%s/%s", repository, mfile);
+           if (isdir (path))
+           {
+               /* directory means repository gets the dir tacked on */
+               (void) strcpy (repository, path);
+               (void) strcat (where, "/");
+               (void) strcat (where, mfile);
+           }
+           else
+           {
+               myargv[0] = argv[0];
+               myargv[1] = mfile;
+               argc = 2;
+               argv = myargv;
+           }
+           free (path);
+       }
+
+       /* cd to the starting repository */
+       if (CVS_CHDIR (repository) < 0)
+       {
+           error (0, errno, "cannot chdir to %s", repository);
+           free (repository);
+           free (where);
+           return 1;
+       }
+       /* End section which is identical to patch_proc.  */
+
+       if (delete_flag || attic_too || (force_tag_match && numtag))
+           which = W_REPOS | W_ATTIC;
+       else
+           which = W_REPOS;
+    }
+    else
+    {
+        where = NULL;
+        which = W_LOCAL;
+        repository = "";
+    }
+
+    if (numtag != NULL && !numtag_validated)
+    {
+       tag_check_valid (numtag, argc - 1, argv + 1, local_specified, 0,
+                        repository, false);
+       numtag_validated = true;
+    }
+
+    /* check to make sure they are authorized to tag all the
+       specified files in the repository */
+
+    mtlist = getlist ();
+    err = start_recursion (check_fileproc, check_filesdoneproc,
+                           NULL, NULL, NULL,
+                          argc - 1, argv + 1, local_specified, which, 0,
+                          CVS_LOCK_READ, where, 1, repository);
+
+    if (err)
+    {
+       error (1, 0, "correct the above errors first!");
+    }
+
+    /* It would be nice to provide consistency with respect to
+       commits; however CVS lacks the infrastructure to do that (see
+       Concurrency in cvs.texinfo and comment in do_recursion).  */
+
+    /* start the recursion processor */
+    err = start_recursion
+       (is_rtag ? rtag_fileproc : tag_fileproc,
+        tag_filesdoneproc, tag_dirproc, NULL, mtlist, argc - 1, argv + 1,
+        local_specified, which, 0, CVS_LOCK_WRITE, where, 1,
+        repository);
+    dellist (&mtlist);
+    if (which & W_REPOS) free (repository);
+    if (where != NULL)
+       free (where);
+    return err;
+}
+
+
+
+/* check file that is to be tagged */
+/* All we do here is add it to our list */
+static int
+check_fileproc (void *callerdat, struct file_info *finfo)
+{
+    const char *xdir;
+    Node *p;
+    Vers_TS *vers;
+    List *tlist;
+    struct tag_info *ti;
+    int addit = 1;
+
+    TRACE (TRACE_FUNCTION, "check_fileproc (%s, %s, %s)",
+          finfo->repository ? finfo->repository : "(null)",
+          finfo->fullname ? finfo->fullname : "(null)",
+          finfo->rcs ? (finfo->rcs->path ? finfo->rcs->path : "(null)")
+          : "NULL");
+
+    if (check_uptodate)
+    {
+       switch (Classify_File (finfo, NULL, NULL, NULL, 1, 0, &vers, 0))
+       {
+       case T_UPTODATE:
+       case T_CHECKOUT:
+       case T_PATCH:
+       case T_REMOVE_ENTRY:
+           break;
+       case T_UNKNOWN:
+       case T_CONFLICT:
+       case T_NEEDS_MERGE:
+       case T_MODIFIED:
+       case T_ADDED:
+       case T_REMOVED:
+       default:
+           error (0, 0, "%s is locally modified", finfo->fullname);
+           freevers_ts (&vers);
+           return 1;
+       }
+    }
+    else
+       vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0);
+
+    if (finfo->update_dir[0] == '\0')
+       xdir = ".";
+    else
+       xdir = finfo->update_dir;
+    if ((p = findnode (mtlist, xdir)) != NULL)
+    {
+       tlist = ((struct master_lists *) p->data)->tlist;
+    }
+    else
+    {
+       struct master_lists *ml;
+
+       tlist = getlist ();
+       p = getnode ();
+       p->key = xstrdup (xdir);
+       p->type = UPDATE;
+       ml = xmalloc (sizeof (struct master_lists));
+       ml->tlist = tlist;
+       p->data = ml;
+       p->delproc = masterlist_delproc;
+       (void) addnode (mtlist, p);
+    }
+    /* do tlist */
+    p = getnode ();
+    p->key = xstrdup (finfo->file);
+    p->type = UPDATE;
+    p->delproc = tag_delproc;
+    if (vers->srcfile == NULL)
+    {
+        if (!really_quiet)
+           error (0, 0, "nothing known about %s", finfo->file);
+       freevers_ts (&vers);
+       freenode (p);
+       return 1;
+    }
+
+    /* Here we duplicate the calculation in tag_fileproc about which
+       version we are going to tag.  There probably are some subtle races
+       (e.g. numtag is "foo" which gets moved between here and
+       tag_fileproc).  */
+    p->data = ti = xmalloc (sizeof (struct tag_info));
+    ti->tag = xstrdup (numtag ? numtag : vers->tag);
+    if (!is_rtag && numtag == NULL && date == NULL)
+       ti->rev = xstrdup (vers->vn_user);
+    else
+       ti->rev = RCS_getversion (vers->srcfile, numtag, date,
+                                 force_tag_match, NULL);
+
+    if (ti->rev != NULL)
+    {
+        ti->oldrev = RCS_getversion (vers->srcfile, symtag, NULL, 1, NULL);
+
+       if (ti->oldrev == NULL)
+        {
+            if (delete_flag)
+            {
+               /* Deleting a tag which did not exist is a noop and
+                  should not be logged.  */
+                addit = 0;
+            }
+        }
+       else if (delete_flag)
+       {
+           free (ti->rev);
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+           /* a hack since %v used to mean old or new rev */
+           ti->rev = xstrdup (ti->oldrev);
+#else /* SUPPORT_OLD_INFO_FMT_STRINGS */
+           ti->rev = NULL;
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+       }
+        else if (strcmp(ti->oldrev, p->data) == 0)
+            addit = 0;
+        else if (!force_tag_move)
+            addit = 0;
+    }
+    else
+       addit = 0;
+    if (!addit)
+    {
+       free(p->data);
+       p->data = NULL;
+    }
+    freevers_ts (&vers);
+    (void)addnode (tlist, p);
+    return 0;
+}
+
+
+
+static int
+check_filesdoneproc (void *callerdat, int err, const char *repos,
+                     const char *update_dir, List *entries)
+{
+    int n;
+    Node *p;
+    List *tlist;
+    struct pretag_proc_data ppd;
+
+    p = findnode (mtlist, update_dir);
+    if (p != NULL)
+        tlist = ((struct master_lists *) p->data)->tlist;
+    else
+        tlist = NULL;
+    if (tlist == NULL || tlist->list->next == tlist->list)
+        return err;
+
+    ppd.tlist = tlist;
+    ppd.delete_flag = delete_flag;
+    ppd.force_tag_move = force_tag_move;
+    ppd.symtag = symtag;
+    if ((n = Parse_Info (CVSROOTADM_TAGINFO, repos, pretag_proc, PIOPT_ALL,
+                        &ppd)) > 0)
+    {
+        error (0, 0, "Pre-tag check failed");
+        err += n;
+    }
+    return err;
+}
+
+
+
+/*
+ * called from Parse_Info, this routine processes a line that came out
+ * of a taginfo file and turns it into a command and executes it.
+ *
+ * RETURNS
+ *    the absolute value of the return value of run_exec, which may or
+ *    may not be the return value of the child process.  this is
+ *    contrained to return positive values because Parse_Info is adding up
+ *    return values and testing for non-zeroness to signify one or more
+ *    of its callbacks having returned an error.
+ */
+static int
+pretag_proc (const char *repository, const char *filter, void *closure)
+{
+    char *newfilter = NULL;
+    char *cmdline;
+    const char *srepos = Short_Repository (repository);
+    struct pretag_proc_data *ppd = closure;
+
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+    if (!strchr (filter, '%'))
+    {
+       error (0,0,
+               "warning: taginfo line contains no format strings:\n"
+               "    \"%s\"\n"
+               "Filling in old defaults ('%%t %%o %%p %%{sv}'), but please be 
aware that this\n"
+               "usage is deprecated.", filter);
+       newfilter = xmalloc (strlen (filter) + 16);
+       strcpy (newfilter, filter);
+       strcat (newfilter, " %t %o %p %{sv}");
+       filter = newfilter;
+    }
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+
+    /* %t = tag being added/moved/removed
+     * %o = operation = "add" | "mov" | "del"
+     * %b = branch mode = "?" (delete ops - unknown) | "T" (branch)
+     *                    | "N" (not branch)
+     * %c = cvs_cmd_name
+     * %p = path from $CVSROOT
+     * %r = path from root
+     * %{sVv} = attribute list = file name, old version tag will be deleted
+     *                           from, new version tag will be added to (or
+     *                           deleted from until
+     *                           SUPPORT_OLD_INFO_FMT_STRINGS is undefined)
+     */
+    /*
+     * Cast any NULL arguments as appropriate pointers as this is an
+     * stdarg function and we need to be certain the caller gets what
+     * is expected.
+     */
+    cmdline = format_cmdline (
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                             false, srepos,
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                             filter,
+                             "t", "s", ppd->symtag,
+                             "o", "s", ppd->delete_flag ? "del" :
+                             ppd->force_tag_move ? "mov" : "add",
+                             "b", "c", delete_flag
+                             ? '?' : branch_mode ? 'T' : 'N',
+                             "c", "s", cvs_cmd_name,
+#ifdef SERVER_SUPPORT
+                             "R", "s", referrer ? referrer->original : "NONE",
+#endif /* SERVER_SUPPORT */
+                             "p", "s", srepos,
+                             "r", "s", current_parsed_root->directory,
+                             "sVv", ",", ppd->tlist,
+                             pretag_list_to_args_proc, (void *) NULL,
+                             (char *) NULL);
+
+    if (newfilter) free (newfilter);
+
+    if (!cmdline || !strlen (cmdline))
+    {
+       if (cmdline) free (cmdline);
+       error (0, 0, "pretag proc resolved to the empty string!");
+       return 1;
+    }
+
+    run_setup (cmdline);
+
+    /* FIXME - the old code used to run the following here:
+     *
+     * if (!isfile(s))
+     * {
+     *     error (0, errno, "cannot find pre-tag filter '%s'", s);
+     *     free(s);
+     *     return (1);
+     * }
+     *
+     * not sure this is really necessary.  it might give a little finer grained
+     * error than letting the execution attempt fail but i'm not sure.  in any
+     * case it should be easy enough to add a function in run.c to test its
+     * first arg for fileness & executability.
+     */
+
+    free (cmdline);
+    return abs (run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL));
+}
+
+
+
+static void
+masterlist_delproc (Node *p)
+{
+    struct master_lists *ml = p->data;
+
+    dellist (&ml->tlist);
+    free (ml);
+    return;
+}
+
+
+
+static void
+tag_delproc (Node *p)
+{
+    struct tag_info *ti;
+    if (p->data)
+    {
+       ti = (struct tag_info *) p->data;
+       if (ti->oldrev) free (ti->oldrev);
+       if (ti->rev) free (ti->rev);
+       free (ti->tag);
+        free (p->data);
+        p->data = NULL;
+    }
+    return;
+}
+
+
+
+/* to be passed into walklist with a list of tags
+ * p->key = tagname
+ * p->data = struct tag_info *
+ * p->data->oldrev = rev tag will be deleted from
+ * p->data->rev = rev tag will be added to
+ * p->data->tag = tag oldrev is attached to, if any
+ *
+ * closure will be a struct format_cmdline_walklist_closure
+ * where closure is undefined
+ */
+static int
+pretag_list_to_args_proc (Node *p, void *closure)
+{
+    struct tag_info *taginfo = (struct tag_info *)p->data;
+    struct format_cmdline_walklist_closure *c =
+            (struct format_cmdline_walklist_closure *)closure;
+    char *arg = NULL;
+    const char *f;
+    char *d;
+    size_t doff;
+
+    if (!p->data) return 1;
+
+    f = c->format;
+    d = *c->d;
+    /* foreach requested attribute */
+    while (*f)
+    {
+       switch (*f++)
+       {
+           case 's':
+               arg = p->key;
+               break;
+           case 'T':
+               arg = taginfo->tag ? taginfo->tag : "";
+               break;
+           case 'v':
+               arg = taginfo->rev ? taginfo->rev : "NONE";
+               break;
+           case 'V':
+               arg = taginfo->oldrev ? taginfo->oldrev : "NONE";
+               break;
+           default:
+               error(1,0,
+                      "Unknown format character or not a list attribute: %c",
+                     f[-1]);
+               break;
+       }
+       /* copy the attribute into an argument */
+       if (c->quotes)
+       {
+           arg = cmdlineescape (c->quotes, arg);
+       }
+       else
+       {
+           arg = cmdlinequote ('"', arg);
+       }
+
+       doff = d - *c->buf;
+       expand_string (c->buf, c->length, doff + strlen (arg));
+       d = *c->buf + doff;
+       strncpy (d, arg, strlen (arg));
+       d += strlen (arg);
+
+       free (arg);
+
+       /* and always put the extra space on.  we'll have to back up a char 
when we're
+        * done, but that seems most efficient
+        */
+       doff = d - *c->buf;
+       expand_string (c->buf, c->length, doff + 1);
+       d = *c->buf + doff;
+       *d++ = ' ';
+    }
+    /* correct our original pointer into the buff */
+    *c->d = d;
+    return 0;
+}
+
+
+/*
+ * Called to rtag a particular file, as appropriate with the options that were
+ * set above.
+ */
+/* ARGSUSED */
+static int
+rtag_fileproc (void *callerdat, struct file_info *finfo)
+{
+    RCSNode *rcsfile;
+    char *version = NULL, *rev = NULL;
+    int retcode = 0;
+    int retval = 0;
+    static bool valtagged = false;
+
+    /* find the parsed RCS data */
+    if ((rcsfile = finfo->rcs) == NULL)
+    {
+       retval = 1;
+       goto free_vars_and_return;
+    }
+
+    /*
+     * For tagging an RCS file which is a symbolic link, you'd best be
+     * running with RCS 5.6, since it knows how to handle symbolic links
+     * correctly without breaking your link!
+     */
+
+    if (delete_flag)
+    {
+       retval = rtag_delete (rcsfile);
+       goto free_vars_and_return;
+    }
+
+    /*
+     * If we get here, we are adding a tag.  But, if -a was specified, we
+     * need to check to see if a -r or -D option was specified.  If neither
+     * was specified and the file is in the Attic, remove the tag.
+     */
+    if (attic_too && (!numtag && !date))
+    {
+       if ((rcsfile->flags & VALID) && (rcsfile->flags & INATTIC))
+       {
+           retval = rtag_delete (rcsfile);
+           goto free_vars_and_return;
+       }
+    }
+
+    version = RCS_getversion (rcsfile, numtag, date, force_tag_match, NULL);
+    if (version == NULL)
+    {
+       /* If -a specified, clean up any old tags */
+       if (attic_too)
+           (void)rtag_delete (rcsfile);
+
+       if (!quiet && !force_tag_match)
+       {
+           error (0, 0, "cannot find tag `%s' in `%s'",
+                  numtag ? numtag : "head", rcsfile->path);
+           retval = 1;
+       }
+       goto free_vars_and_return;
+    }
+    if (numtag
+       && isdigit ((unsigned char)*numtag)
+       && strcmp (numtag, version) != 0)
+    {
+
+       /*
+        * We didn't find a match for the numeric tag that was specified, but
+        * that's OK.  just pass the numeric tag on to rcs, to be tagged as
+        * specified.  Could get here if one tried to tag "1.1.1" and there
+        * was a 1.1.1 branch with some head revision.  In this case, we want
+        * the tag to reference "1.1.1" and not the revision at the head of
+        * the branch.  Use a symbolic tag for that.
+        */
+       rev = branch_mode ? RCS_magicrev (rcsfile, version) : numtag;
+       retcode = RCS_settag(rcsfile, symtag, numtag);
+       if (retcode == 0)
+           RCS_rewrite (rcsfile, NULL, NULL);
+    }
+    else
+    {
+       char *oversion;
+
+       /*
+        * As an enhancement for the case where a tag is being re-applied to
+        * a large body of a module, make one extra call to RCS_getversion to
+        * see if the tag is already set in the RCS file.  If so, check to
+        * see if it needs to be moved.  If not, do nothing.  This will
+        * likely save a lot of time when simply moving the tag to the
+        * "current" head revisions of a module -- which I have found to be a
+        * typical tagging operation.
+        */
+       rev = branch_mode ? RCS_magicrev (rcsfile, version) : version;
+       oversion = RCS_getversion (rcsfile, symtag, NULL, 1, NULL);
+       if (oversion != NULL)
+       {
+           int isbranch = RCS_nodeisbranch (finfo->rcs, symtag);
+
+           /*
+            * if versions the same and neither old or new are branches don't
+            * have to do anything
+            */
+           if (strcmp (version, oversion) == 0 && !branch_mode && !isbranch)
+           {
+               free (oversion);
+               goto free_vars_and_return;
+           }
+
+           if (!force_tag_move)
+           {
+               /* we're NOT going to move the tag */
+               (void)printf ("W %s", finfo->fullname);
+
+               (void)printf (" : %s already exists on %s %s",
+                             symtag, isbranch ? "branch" : "version",
+                             oversion);
+               (void)printf (" : NOT MOVING tag to %s %s\n",
+                             branch_mode ? "branch" : "version", rev);
+               free (oversion);
+               goto free_vars_and_return;
+           }
+           else /* force_tag_move is set and... */
+               if ((isbranch && !disturb_branch_tags) ||
+                   (!isbranch && disturb_branch_tags))
+           {
+               error(0,0, "%s: Not moving %s tag `%s' from %s to %s%s.",
+                       finfo->fullname,
+                       isbranch ? "branch" : "non-branch",
+                       symtag, oversion, rev,
+                       isbranch ? "" : " due to `-B' option");
+               free (oversion);
+               goto free_vars_and_return;
+           }
+           free (oversion);
+       }
+       retcode = RCS_settag (rcsfile, symtag, rev);
+       if (retcode == 0)
+           RCS_rewrite (rcsfile, NULL, NULL);
+    }
+
+    if (retcode != 0)
+    {
+       error (1, retcode == -1 ? errno : 0,
+              "failed to set tag `%s' to revision `%s' in `%s'",
+              symtag, rev, rcsfile->path);
+        retval = 1;
+       goto free_vars_and_return;
+    }
+
+free_vars_and_return:
+    if (branch_mode && rev) free (rev);
+    if (version) free (version);
+    if (!delete_flag && !retval && !valtagged)
+    {
+       tag_check_valid (symtag, 0, NULL, 0, 0, NULL, true);
+       valtagged = true;
+    }
+    return retval;
+}
+
+
+
+/*
+ * If -d is specified, "force_tag_match" is set, so that this call to
+ * RCS_getversion() will return a NULL version string if the symbolic
+ * tag does not exist in the RCS file.
+ *
+ * If the -r flag was used, numtag is set, and we only delete the
+ * symtag from files that have numtag.
+ *
+ * This is done here because it's MUCH faster than just blindly calling
+ * "rcs" to remove the tag... trust me.
+ */
+static int
+rtag_delete (RCSNode *rcsfile)
+{
+    char *version;
+    int retcode, isbranch;
+
+    if (numtag)
+    {
+       version = RCS_getversion (rcsfile, numtag, NULL, 1, NULL);
+       if (version == NULL)
+           return (0);
+       free (version);
+    }
+
+    version = RCS_getversion (rcsfile, symtag, NULL, 1, NULL);
+    if (version == NULL)
+       return 0;
+    free (version);
+
+
+    isbranch = RCS_nodeisbranch (rcsfile, symtag);
+    if ((isbranch && !disturb_branch_tags) ||
+       (!isbranch && disturb_branch_tags))
+    {
+       if (!quiet)
+           error (0, 0,
+                   "Not removing %s tag `%s' from `%s'%s.",
+                   isbranch ? "branch" : "non-branch",
+                   symtag, rcsfile->path,
+                   isbranch ? "" : " due to `-B' option");
+       return 1;
+    }
+
+    if ((retcode = RCS_deltag(rcsfile, symtag)) != 0)
+    {
+       if (!quiet)
+           error (0, retcode == -1 ? errno : 0,
+                  "failed to remove tag `%s' from `%s'", symtag,
+                  rcsfile->path);
+       return 1;
+    }
+    RCS_rewrite (rcsfile, NULL, NULL);
+    return 0;
+}
+
+
+
+/*
+ * Called to tag a particular file (the currently checked out version is
+ * tagged with the specified tag - or the specified tag is deleted).
+ */
+/* ARGSUSED */
+static int
+tag_fileproc (void *callerdat, struct file_info *finfo)
+{
+    char *version, *oversion;
+    char *nversion = NULL;
+    char *rev;
+    Vers_TS *vers;
+    int retcode = 0;
+    int retval = 0;
+    static bool valtagged = false;
+
+    vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0);
+
+    if (numtag || date)
+    {
+        nversion = RCS_getversion (vers->srcfile, numtag, date,
+                                   force_tag_match, NULL);
+        if (!nversion)
+           goto free_vars_and_return;
+    }
+    if (delete_flag)
+    {
+
+       int isbranch;
+       /*
+        * If -d is specified, "force_tag_match" is set, so that this call to
+        * RCS_getversion() will return a NULL version string if the symbolic
+        * tag does not exist in the RCS file.
+        *
+        * This is done here because it's MUCH faster than just blindly calling
+        * "rcs" to remove the tag... trust me.
+        */
+
+       version = RCS_getversion (vers->srcfile, symtag, NULL, 1, NULL);
+       if (version == NULL || vers->srcfile == NULL)
+           goto free_vars_and_return;
+
+       free (version);
+
+       isbranch = RCS_nodeisbranch (finfo->rcs, symtag);
+       if ((isbranch && !disturb_branch_tags) ||
+           (!isbranch && disturb_branch_tags))
+       {
+           if (!quiet)
+               error(0, 0,
+                      "Not removing %s tag `%s' from `%s'%s.",
+                       isbranch ? "branch" : "non-branch",
+                       symtag, vers->srcfile->path,
+                       isbranch ? "" : " due to `-B' option");
+           retval = 1;
+           goto free_vars_and_return;
+       }
+
+       if ((retcode = RCS_deltag (vers->srcfile, symtag)) != 0)
+       {
+           if (!quiet)
+               error (0, retcode == -1 ? errno : 0,
+                      "failed to remove tag %s from %s", symtag,
+                      vers->srcfile->path);
+           retval = 1;
+           goto free_vars_and_return;
+       }
+       RCS_rewrite (vers->srcfile, NULL, NULL);
+
+       /* warm fuzzies */
+       if (!really_quiet)
+       {
+           cvs_output ("D ", 2);
+           cvs_output (finfo->fullname, 0);
+           cvs_output ("\n", 1);
+       }
+
+       goto free_vars_and_return;
+    }
+
+    /*
+     * If we are adding a tag, we need to know which version we have checked
+     * out and we'll tag that version.
+     */
+    if (!nversion)
+        version = vers->vn_user;
+    else
+        version = nversion;
+    if (!version)
+       goto free_vars_and_return;
+    else if (strcmp (version, "0") == 0)
+    {
+       if (!quiet)
+           error (0, 0, "couldn't tag added but un-commited file `%s'",
+                  finfo->file);
+       goto free_vars_and_return;
+    }
+    else if (version[0] == '-')
+    {
+       if (!quiet)
+           error (0, 0, "skipping removed but un-commited file `%s'",
+                  finfo->file);
+       goto free_vars_and_return;
+    }
+    else if (vers->srcfile == NULL)
+    {
+       if (!quiet)
+           error (0, 0, "cannot find revision control file for `%s'",
+                  finfo->file);
+       goto free_vars_and_return;
+    }
+
+    /*
+     * As an enhancement for the case where a tag is being re-applied to a
+     * large number of files, make one extra call to RCS_getversion to see
+     * if the tag is already set in the RCS file.  If so, check to see if it
+     * needs to be moved.  If not, do nothing.  This will likely save a lot of
+     * time when simply moving the tag to the "current" head revisions of a
+     * module -- which I have found to be a typical tagging operation.
+     */
+    rev = branch_mode ? RCS_magicrev (vers->srcfile, version) : version;
+    oversion = RCS_getversion (vers->srcfile, symtag, NULL, 1, NULL);
+    if (oversion != NULL)
+    {
+       int isbranch = RCS_nodeisbranch (finfo->rcs, symtag);
+
+       /*
+        * if versions the same and neither old or new are branches don't have
+        * to do anything
+        */
+       if (strcmp (version, oversion) == 0 && !branch_mode && !isbranch)
+       {
+           free (oversion);
+           if (branch_mode)
+               free (rev);
+           goto free_vars_and_return;
+       }
+
+       if (!force_tag_move)
+       {
+           /* we're NOT going to move the tag */
+           cvs_output ("W ", 2);
+           cvs_output (finfo->fullname, 0);
+           cvs_output (" : ", 0);
+           cvs_output (symtag, 0);
+           cvs_output (" already exists on ", 0);
+           cvs_output (isbranch ? "branch" : "version", 0);
+           cvs_output (" ", 0);
+           cvs_output (oversion, 0);
+           cvs_output (" : NOT MOVING tag to ", 0);
+           cvs_output (branch_mode ? "branch" : "version", 0);
+           cvs_output (" ", 0);
+           cvs_output (rev, 0);
+           cvs_output ("\n", 1);
+           free (oversion);
+           if (branch_mode)
+               free (rev);
+           goto free_vars_and_return;
+       }
+       else    /* force_tag_move == 1 and... */
+               if ((isbranch && !disturb_branch_tags) ||
+                   (!isbranch && disturb_branch_tags))
+       {
+           error (0,0, "%s: Not moving %s tag `%s' from %s to %s%s.",
+                  finfo->fullname,
+                  isbranch ? "branch" : "non-branch",
+                  symtag, oversion, rev,
+                  isbranch ? "" : " due to `-B' option");
+           free (oversion);
+           if (branch_mode)
+               free (rev);
+           goto free_vars_and_return;
+       }
+       free (oversion);
+    }
+
+    if ((retcode = RCS_settag(vers->srcfile, symtag, rev)) != 0)
+    {
+       error (1, retcode == -1 ? errno : 0,
+              "failed to set tag %s to revision %s in %s",
+              symtag, rev, vers->srcfile->path);
+       if (branch_mode)
+           free (rev);
+       retval = 1;
+       goto free_vars_and_return;
+    }
+    if (branch_mode)
+       free (rev);
+    RCS_rewrite (vers->srcfile, NULL, NULL);
+
+    /* more warm fuzzies */
+    if (!really_quiet)
+    {
+       cvs_output ("T ", 2);
+       cvs_output (finfo->fullname, 0);
+       cvs_output ("\n", 1);
+    }
+
+ free_vars_and_return:
+    if (nversion != NULL)
+        free (nversion);
+    freevers_ts (&vers);
+    if (!delete_flag && !retval && !valtagged)
+    {
+       tag_check_valid (symtag, 0, NULL, 0, 0, NULL, true);
+       valtagged = true;
+    }
+    return retval;
+}
+
+
+
+/*
+ * Print a warm fuzzy message
+ */
+/* ARGSUSED */
+static Dtype
+tag_dirproc (void *callerdat, const char *dir, const char *repos,
+             const char *update_dir, List *entries)
+{
+
+    if (ignore_directory (update_dir))
+    {
+       /* print the warm fuzzy message */
+       if (!quiet)
+         error (0, 0, "Ignoring %s", update_dir);
+        return R_SKIP_ALL;
+    }
+
+    if (!quiet)
+       error (0, 0, "%s %s", delete_flag ? "Untagging" : "Tagging",
+               update_dir);
+    return R_PROCESS;
+}
+
+
+
+/* Code relating to the val-tags file.  Note that this file has no way
+   of knowing when a tag has been deleted.  The problem is that there
+   is no way of knowing whether a tag still exists somewhere, when we
+   delete it some places.  Using per-directory val-tags files (in
+   CVSREP) might be better, but that might slow down the process of
+   verifying that a tag is correct (maybe not, for the likely cases,
+   if carefully done), and/or be harder to implement correctly.  */
+
+struct val_args {
+    const char *name;
+    int found;
+};
+
+static int
+val_fileproc (void *callerdat, struct file_info *finfo)
+{
+    RCSNode *rcsdata;
+    struct val_args *args = callerdat;
+    char *tag;
+
+    if ((rcsdata = finfo->rcs) == NULL)
+       /* Not sure this can happen, after all we passed only
+          W_REPOS | W_ATTIC.  */
+       return 0;
+
+    tag = RCS_gettag (rcsdata, args->name, 1, NULL);
+    if (tag != NULL)
+    {
+       /* FIXME: should find out a way to stop the search at this point.  */
+       args->found = 1;
+       free (tag);
+    }
+    return 0;
+}
+
+
+
+/* This routine determines whether a tag appears in CVSROOT/val-tags.
+ *
+ * The val-tags file will be open read-only when IDB is NULL.  Since writes to
+ * val-tags always append to it, the lack of locking is okay.  The worst case
+ * race condition might misinterpret a partially written "foobar" matched, for
+ * instance,  a request for "f", "foo", of "foob".  Such a mismatch would be
+ * caught harmlessly later.
+ *
+ * Before CVS adds a tag to val-tags, it will lock val-tags for write and
+ * verify that the tag is still not present to avoid adding it twice.
+ *
+ * NOTES
+ *   This function expects its parent to handle any necessary locking of the
+ *   val-tags file.
+ *
+ * INPUTS
+ *   idb       When this value is NULL, the val-tags file is opened in
+ *             in read-only mode.  When present, the val-tags file is opened
+ *             in read-write mode and the DBM handle is stored in *IDB.
+ *   name      The tag to search for.
+ *
+ * OUTPUTS
+ *   *idb      The val-tags file opened for read/write, or NULL if it couldn't
+ *             be opened.
+ *
+ * ERRORS
+ *   Exits with an error message if the val-tags file cannot be opened for
+ *   read (failure to open val-tags read/write is harmless - see below).
+ *
+ * RETURNS
+ *   true      1. If NAME exists in val-tags.
+ *             2. If IDB is non-NULL and val-tags cannot be opened for write.
+ *                This allows callers to ignore the harmless inability to
+ *                update the val-tags cache.
+ *   false     If the file could be opened and the tag is not present.
+ */
+static int is_in_val_tags (DBM **idb, const char *name)
+{
+    DBM *db = NULL;
+    char *valtags_filename;
+    datum mytag;
+    int status;
+
+    /* Casting out const should be safe here - input datums are not
+     * written to by the myndbm functions.
+     */
+    mytag.dptr = (char *)name;
+    mytag.dsize = strlen (name);
+
+    valtags_filename = Xasprintf ("%s/%s/%s", current_parsed_root->directory,
+                                 CVSROOTADM, CVSROOTADM_VALTAGS);
+
+    if (idb)
+    {
+       mode_t omask;
+
+       omask = umask (cvsumask);
+       db = dbm_open (valtags_filename, O_RDWR | O_CREAT, 0666);
+       umask (omask);
+
+       if (!db)
+       {
+
+           error (0, errno, "warning: cannot open `%s' read/write",
+                  valtags_filename);
+           *idb = NULL;
+           return 1;
+       }
+
+       *idb = db;
+    }
+    else
+    {
+       db = dbm_open (valtags_filename, O_RDONLY, 0444);
+       if (!db && !existence_error (errno))
+           error (1, errno, "cannot read %s", valtags_filename);
+    }
+
+    /* If the file merely fails to exist, we just keep going and create
+       it later if need be.  */
+
+    status = 0;
+    if (db)
+    {
+       datum val;
+
+       val = dbm_fetch (db, mytag);
+       if (val.dptr != NULL)
+           /* Found.  The tag is valid.  */
+           status = 1;
+
+       /* FIXME: should check errors somehow (add dbm_error to myndbm.c?).  */
+
+       if (!idb) dbm_close (db);
+    }
+
+    free (valtags_filename);
+    return status;
+}
+
+
+
+/* Add a tag to the CVSROOT/val-tags cache.  Establishes a write lock and
+ * reverifies that the tag does not exist before adding it.
+ */
+static void add_to_val_tags (const char *name)
+{
+    DBM *db;
+    datum mytag;
+    datum value;
+
+    if (noexec) return;
+
+    val_tags_lock (current_parsed_root->directory);
+
+    /* Check for presence again since we have a lock now.  */
+    if (is_in_val_tags (&db, name)) return;
+
+    /* Casting out const should be safe here - input datums are not
+     * written to by the myndbm functions.
+     */
+    mytag.dptr = (char *)name;
+    mytag.dsize = strlen (name);
+    value.dptr = "y";
+    value.dsize = 1;
+
+    if (dbm_store (db, mytag, value, DBM_REPLACE) < 0)
+       error (0, errno, "failed to store %s into val-tags", name);
+    dbm_close (db);
+
+    clear_val_tags_lock ();
+}
+
+
+
+static Dtype
+val_direntproc (void *callerdat, const char *dir, const char *repository,
+                const char *update_dir, List *entries)
+{
+    /* This is not quite right--it doesn't get right the case of "cvs
+       update -d -r foobar" where foobar is a tag which exists only in
+       files in a directory which does not exist yet, but which is
+       about to be created.  */
+    if (isdir (dir))
+       return R_PROCESS;
+    return R_SKIP_ALL;
+}
+
+
+
+/* With VALID set, insert NAME into val-tags if it is not already present
+ * there.
+ *
+ * Without VALID set, check to see whether NAME is a valid tag.  If so, return.
+ * If not print an error message and exit.
+ *
+ * INPUTS
+ *
+ *   ARGC, ARGV, LOCAL, and AFLAG specify which files we will be operating on.
+ *
+ *   REPOSITORY is the repository if we need to cd into it, or NULL if
+ *     we are already there, or "" if we should do a W_LOCAL recursion.
+ *     Sorry for three cases, but the "" case is needed in case the
+ *     working directories come from diverse parts of the repository, the
+ *     NULL case avoids an unneccesary chdir, and the non-NULL, non-""
+ *     case is needed for checkout, where we don't want to chdir if the
+ *     tag is found in CVSROOTADM_VALTAGS, but there is not (yet) any
+ *     local directory.
+ *
+ * ERRORS
+ *   Errors may be encountered opening and accessing the DBM file.  Write
+ *   errors generate warnings and read errors are fatal.  When !VALID and NAME
+ *   is not in val-tags, errors may also be generated as per start_recursion.
+ *   When !VALID, non-existance of tags both in val-tags and in the archive
+ *   files also causes a fatal error.
+ *
+ * RETURNS
+ *   Nothing.
+ */
+void
+tag_check_valid (const char *name, int argc, char **argv, int local, int aflag,
+                 char *repository, bool valid)
+{
+    struct val_args the_val_args;
+    struct saved_cwd cwd;
+    int which;
+
+#ifdef HAVE_PRINTF_PTR
+    TRACE (TRACE_FUNCTION,
+          "tag_check_valid (name=%s, argc=%d, argv=%p, local=%d,\n"
+      "                      aflag=%d, repository=%s, valid=%s)",
+          name ? name : "(name)", argc, (void *)argv, local, aflag,
+          repository ? repository : "(null)",
+          valid ? "true" : "false");
+#else
+    TRACE (TRACE_FUNCTION,
+          "tag_check_valid (name=%s, argc=%d, argv=%lx, local=%d,\n"
+      "                      aflag=%d, repository=%s, valid=%s)",
+          name ? name : "(name)", argc, (unsigned long)argv, local, aflag,
+          repository ? repository : "(null)",
+          valid ? "true" : "false");
+#endif
+
+    /* Numeric tags require only a syntactic check.  */
+    if (isdigit ((unsigned char) name[0]))
+    {
+       /* insert is not possible for numeric revisions */
+       assert (!valid);
+       if (RCS_valid_rev (name)) return;
+       else
+           error (1, 0, "\
+Numeric tag %s invalid.  Numeric tags should be of the form X[.X]...", name);
+    }
+
+    /* Special tags are always valid.  */
+    if (strcmp (name, TAG_BASE) == 0
+       || strcmp (name, TAG_HEAD) == 0)
+    {
+       /* insert is not possible for numeric revisions */
+       assert (!valid);
+       return;
+    }
+
+    /* Verify that the tag is valid syntactically.  Some later code once made
+     * assumptions about this.
+     */
+    RCS_check_tag (name);
+
+    if (is_in_val_tags (NULL, name)) return;
+
+    if (!valid)
+    {
+       /* We didn't find the tag in val-tags, so look through all the RCS files
+        * to see whether it exists there.  Yes, this is expensive, but there
+        * is no other way to cope with a tag which might have been created
+        * by an old version of CVS, from before val-tags was invented
+        */
+
+       the_val_args.name = name;
+       the_val_args.found = 0;
+       which = W_REPOS | W_ATTIC;
+
+       if (repository == NULL || repository[0] == '\0')
+           which |= W_LOCAL;
+       else
+       {
+           if (save_cwd (&cwd))
+               error (1, errno, "Failed to save current directory.");
+           if (CVS_CHDIR (repository) < 0)
+               error (1, errno, "cannot change to %s directory", repository);
+       }
+
+       start_recursion
+           (val_fileproc, NULL, val_direntproc, NULL,
+            &the_val_args, argc, argv, local, which, aflag,
+            CVS_LOCK_READ, NULL, 1, repository);
+       if (repository != NULL && repository[0] != '\0')
+       {
+           if (restore_cwd (&cwd))
+               error (1, errno, "Failed to restore current directory, `%s'.",
+                      cwd.name);
+           free_cwd (&cwd);
+       }
+
+       if (!the_val_args.found)
+           error (1, 0, "no such tag `%s'", name);
+    }
+
+    /* The tags is valid but not mentioned in val-tags.  Add it.  */
+    add_to_val_tags (name);
+}
Index: ccvs/src/update.c
diff -u /dev/null ccvs/src/update.c:1.259.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/update.c   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,2920 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ *
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ *
+ * "update" updates the version in the present directory with respect to the 
RCS
+ * repository.  The present version must have been created by "checkout". The
+ * user can keep up-to-date by calling "update" whenever he feels like it.
+ *
+ * The present version can be committed by "commit", but this keeps the version
+ * in tact.
+ *
+ * Arguments following the options are taken to be file names to be updated,
+ * rather than updating the entire directory.
+ *
+ * Modified or non-existent RCS files are checked out and reported as U
+ * <user_file>
+ *
+ * Modified user files are reported as M <user_file>.  If both the RCS file and
+ * the user file have been modified, the user file is replaced by the result
+ * of rcsmerge, and a backup file is written for the user in .#file.version.
+ * If this throws up irreconcilable differences, the file is reported as C
+ * <user_file>, and as M <user_file> otherwise.
+ *
+ * Files added but not yet committed are reported as A <user_file>. Files
+ * removed but not yet committed are reported as R <user_file>.
+ *
+ * If the current directory contains subdirectories that hold concurrent
+ * versions, these are updated too.  If the -d option was specified, new
+ * directories added to the repository are automatically created and updated
+ * as well.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* GNULIB */
+#include "getline.h"
+#include "save-cwd.h"
+
+#ifdef SERVER_SUPPORT
+# include "md5.h"
+#endif
+
+/* CVS */
+#include "base.h"
+
+#include "cvs.h"
+#include "watch.h"
+#include "fileattr.h"
+#include "edit.h"
+#include "buffer.h"
+#include "hardlink.h"
+
+/* C89 */
+#include <assert.h>
+
+static int checkout_file (struct file_info *finfo, Vers_TS *vers_ts,
+                                int adding, int merging, int update_server);
+#ifdef SERVER_SUPPORT
+static int patch_file (struct file_info *finfo,
+                       Vers_TS *vers_ts, 
+                       int *docheckout, struct stat *file_info,
+                       unsigned char *checksum);
+static void patch_file_write (void *, const char *, size_t);
+#endif
+static int merge_file (struct file_info *finfo, Vers_TS *vers);
+static int scratch_file (struct file_info *finfo, Vers_TS *vers);
+static Dtype update_dirent_proc (void *callerdat, const char *dir,
+                                 const char *repository,
+                                 const char *update_dir,
+                                 List *entries);
+static int update_dirleave_proc (void *callerdat, const char *dir,
+                                 int err, const char *update_dir,
+                                 List *entries);
+static int update_fileproc (void *callerdat, struct file_info *);
+static int update_filesdone_proc (void *callerdat, int err,
+                                  const char *repository,
+                                  const char *update_dir, List *entries);
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+static int get_linkinfo_proc( void *_callerdat, struct _finfo * );
+#endif
+static void join_file (struct file_info *finfo, Vers_TS *vers_ts);
+
+static char *options = NULL;
+static char *tag = NULL;
+static char *date = NULL;
+/* This is a bit of a kludge.  We call WriteTag at the beginning
+   before we know whether nonbranch is set or not.  And then at the
+   end, once we have the right value for nonbranch, we call WriteTag
+   again.  I don't know whether the first call is necessary or not.
+   rewrite_tag is nonzero if we are going to have to make that second
+   call.  warned is nonzero if we've already warned the user that the
+   tag occurs as both a revision tag and a branch tag.  */
+static int rewrite_tag;
+static int nonbranch;
+static int warned;
+
+/* If we set the tag or date for a subdirectory, we use this to undo
+   the setting.  See update_dirent_proc.  */
+static char *tag_update_dir;
+
+static char *join_rev1, *join_date1;
+static char *join_rev2, *join_date2;
+static int aflag = 0;
+static int toss_local_changes = 0;
+static int force_tag_match = 1;
+static int update_build_dirs = 0;
+static int update_prune_dirs = 0;
+static int pipeout = 0;
+static int dotemplate = 0;
+#ifdef SERVER_SUPPORT
+static bool bases;
+static bool rcs_diff_patches;
+#endif
+static List *ignlist = NULL;
+static time_t last_register_time;
+static const char *const update_usage[] =
+{
+    "Usage: %s %s [-APCdflRp] [-k kopt] [-r rev] [-D date] [-j rev]\n",
+    "    [-I ign] [-W spec] [files...]\n",
+    "\t-A\tReset any sticky tags/date/kopts.\n",
+    "\t-P\tPrune empty directories.\n",
+    "\t-C\tOverwrite locally modified files with clean repository copies.\n",
+    "\t-d\tBuild directories, like checkout does.\n",
+    "\t-f\tForce a head revision match if tag/date not found.\n",
+    "\t-l\tLocal directory only, no recursion.\n",
+    "\t-R\tProcess directories recursively.\n",
+    "\t-p\tSend updates to standard output (avoids stickiness).\n",
+    "\t-k kopt\tUse RCS kopt -k option on checkout. (is sticky)\n",
+    "\t-r rev\tUpdate using specified revision/tag (is sticky).\n",
+    "\t-D date\tSet date to update from (is sticky).\n",
+    "\t-j rev\tMerge in changes made between current revision and rev.\n",
+    "\t-I ign\tMore files to ignore (! to reset).\n",
+    "\t-W spec\tWrappers specification line.\n",
+    "(Specify the --help global option for a list of other help options)\n",
+    NULL
+};
+
+
+
+/*
+ * update is the argv,argc based front end for arg parsing
+ */
+int
+update (int argc, char **argv)
+{
+    int c, err;
+    int local = 0;                     /* recursive by default */
+    int which;                         /* where to look for files and dirs */
+    char *xjoin_rev1, *xjoin_date1,
+        *xjoin_rev2, *xjoin_date2,
+        *join_orig1, *join_orig2;
+
+    if (argc == -1)
+       usage (update_usage);
+
+    xjoin_rev1 = xjoin_date1 = xjoin_rev2 = xjoin_date2 = join_orig1 =
+                join_orig2 = NULL;
+
+    ign_setup ();
+    wrap_setup ();
+
+    /* parse the args */
+    optind = 0;
+    while ((c = getopt (argc, argv, "+ApCPflRQqduk:r:D:j:I:W:")) != -1)
+    {
+       switch (c)
+       {
+           case 'A':
+               aflag = 1;
+               break;
+           case 'C':
+               toss_local_changes = 1;
+               break;
+           case 'I':
+               ign_add (optarg, 0);
+               break;
+           case 'W':
+               wrap_add (optarg, 0);
+               break;
+           case 'k':
+               if (options)
+                   free (options);
+               options = RCS_check_kflag (optarg);
+               break;
+           case 'l':
+               local = 1;
+               break;
+           case 'R':
+               local = 0;
+               break;
+           case 'Q':
+           case 'q':
+               /* The CVS 1.5 client sends these options (in addition to
+                  Global_option requests), so we must ignore them.  */
+               if (!server_active)
+                   error (1, 0,
+                          "-q or -Q must be specified before \"%s\"",
+                          cvs_cmd_name);
+               break;
+           case 'd':
+               update_build_dirs = 1;
+               break;
+           case 'f':
+               force_tag_match = 0;
+               break;
+           case 'r':
+               parse_tagdate (&tag, &date, optarg);
+               break;
+           case 'D':
+               if (date) free (date);
+               date = Make_Date (optarg);
+               break;
+           case 'P':
+               update_prune_dirs = 1;
+               break;
+           case 'p':
+               pipeout = 1;
+               noexec = 1;             /* so no locks will be created */
+               break;
+           case 'j':
+               if (join_orig2)
+                   error (1, 0, "only two -j options can be specified");
+               if (join_orig1)
+               {
+                   join_orig2 = xstrdup (optarg);
+                   parse_tagdate (&xjoin_rev2, &xjoin_date2, optarg);
+               }
+               else
+               {
+                   join_orig1 = xstrdup (optarg);
+                   parse_tagdate (&xjoin_rev1, &xjoin_date1, optarg);
+               }
+               break;
+           case 'u':
+#ifdef SERVER_SUPPORT
+               if (server_active)
+                   rcs_diff_patches = server_use_rcs_diff ();
+               else
+#endif
+                   usage (update_usage);
+               break;
+           case '?':
+           default:
+               usage (update_usage);
+               break;
+       }
+    }
+    argc -= optind;
+    argv += optind;
+
+#ifdef CLIENT_SUPPORT
+    if (current_parsed_root->isremote) 
+    {
+       int pass;
+       unsigned int flags = 0;
+
+       /* The first pass does the regular update.  If we receive at least
+          one patch which failed, we do a second pass and just fetch
+          those files whose patches failed.  */
+       pass = 1;
+       do
+       {
+           int status;
+
+           start_server ();
+
+           if (local)
+               send_arg("-l");
+           if (update_build_dirs)
+               send_arg("-d");
+           if (pipeout)
+               send_arg("-p");
+           if (!force_tag_match)
+               send_arg("-f");
+           if (aflag)
+               send_arg("-A");
+           if (toss_local_changes)
+               send_arg("-C");
+           if (update_prune_dirs)
+               send_arg("-P");
+           client_prune_dirs = update_prune_dirs;
+           option_with_arg ("-r", tag);
+           if (options && options[0] != '\0')
+               send_arg (options);
+           if (date)
+               client_senddate (date);
+           if (join_orig1)
+               option_with_arg ("-j", join_orig1);
+           if (join_orig2)
+               option_with_arg ("-j", join_orig2);
+           wrap_send ();
+
+           if (failed_patches_count == 0)
+           {
+               /* If the server supports the command "update-patches", that 
+                  means that it knows how to handle the -u argument to update,
+                  which means to send patches instead of complete files.
+
+                  We don't send -u if failed_patches != NULL, so that the
+                  server doesn't try to send patches which will just fail
+                  again.  At least currently, the client also clobbers the
+                  file and tells the server it is lost, which also will get
+                  a full file instead of a patch, but it seems clean to omit
+                  -u.  */
+               if (supported_request ("update-patches"))
+                   send_arg ("-u");
+
+               send_arg ("--");
+
+                if (update_build_dirs)
+                    flags |= SEND_BUILD_DIRS;
+
+                if (toss_local_changes) {
+                    flags |= SEND_NO_CONTENTS;
+                    flags |= BACKUP_MODIFIED_FILES;
+                }
+
+               /* If noexec, probably could be setting SEND_NO_CONTENTS.
+                  Same caveats as for "cvs status" apply.  */
+
+               send_files (argc, argv, local, aflag, flags);
+               send_file_names (argc, argv, SEND_EXPAND_WILD);
+           }
+           else
+           {
+               fprintf (stderr, "%s client: refetching unpatchable files\n",
+                        program_name);
+
+               if (toplevel_wd != NULL
+                   && CVS_CHDIR (toplevel_wd) < 0)
+               {
+                   error (1, errno, "could not chdir to %s", toplevel_wd);
+               }
+
+               send_arg ("--");
+
+               /* Failed patches should only occur with files that were not
+                * locally modified.
+                */
+               flags |= SEND_NO_CONTENTS;
+
+               send_files (failed_patches_count, failed_patches, local,
+                           aflag, flags);
+               send_file_names (failed_patches_count, failed_patches, 0);
+               free_names (&failed_patches_count, failed_patches);
+           }
+
+           send_to_server ("update\012", 0);
+
+           status = get_responses_and_close ();
+
+           /* If there are any conflicts, the server will return a
+               non-zero exit status.  If any patches failed, we still
+               want to run the update again.  We use a pass count to
+               avoid an endless loop.  */
+
+           /* Notes: (1) assuming that status != 0 implies a
+              potential conflict is the best we can cleanly do given
+              the current protocol.  I suppose that trying to
+              re-fetch in cases where there was a more serious error
+              is probably more or less harmless, but it isn't really
+              ideal.  (2) it would be nice to have a testsuite case for the
+              conflict-and-patch-failed case.  */
+
+           if (status != 0
+               && (failed_patches_count == 0 || pass > 1))
+           {
+               if (failed_patches_count > 0)
+                   free_names (&failed_patches_count, failed_patches);
+               return status;
+           }
+
+           ++pass;
+       } while (failed_patches_count > 0);
+
+       return 0;
+    }
+#endif
+
+    if (tag != NULL)
+       tag_check_valid (tag, argc, argv, local, aflag, "", false);
+    if (join_rev1 != NULL)
+       tag_check_valid (xjoin_rev1, argc, argv, local, aflag, "", false);
+    if (join_rev2 != NULL)
+       tag_check_valid (xjoin_rev2, argc, argv, local, aflag, "", false);
+
+    /*
+     * If we are updating the entire directory (for real) and building dirs
+     * as we go, we make sure there is no static entries file and write the
+     * tag file as appropriate
+     */
+    if (argc <= 0 && !pipeout)
+    {
+       if (update_build_dirs)
+       {
+           if (unlink_file (CVSADM_ENTSTAT) < 0 && ! existence_error (errno))
+               error (1, errno, "cannot remove file %s", CVSADM_ENTSTAT);
+#ifdef SERVER_SUPPORT
+           if (server_active)
+           {
+               char *repos = Name_Repository (NULL, NULL);
+               server_clear_entstat (".", repos);
+               free (repos);
+           }
+#endif
+       }
+
+       /* keep the CVS/Tag file current with the specified arguments */
+       if (aflag || tag || date)
+       {
+           char *repos = Name_Repository (NULL, NULL);
+           WriteTag (NULL, tag, date, 0, ".", repos);
+           free (repos);
+           rewrite_tag = 1;
+           nonbranch = -1;
+           warned = 0;
+       }
+    }
+
+    /* look for files/dirs locally and in the repository */
+    which = W_LOCAL | W_REPOS;
+
+    /* look in the attic too if a tag or date is specified */
+    if (tag || date || join_orig1)
+    {
+       TRACE (TRACE_DATA, "update: searching attic");
+       which |= W_ATTIC;
+    }
+
+    /* call the command line interface */
+    err = do_update (argc, argv, options, tag, date, force_tag_match,
+                    local, update_build_dirs, aflag, update_prune_dirs,
+                    pipeout, which, xjoin_rev1, xjoin_date1, xjoin_rev2,
+                    xjoin_date2, NULL, 1, NULL);
+
+    /* Free the space allocated for tags and dates, if necessary.  */
+    if (tag) free (tag);
+    if (date) free (date);
+
+    return err;
+}
+
+
+
+/*
+ * Command line interface to update (used by checkout)
+ *
+ * repository = cvsroot->repository + update_dir.  This is necessary for
+ * checkout so that start_recursion can determine our repository.  In the
+ * update case, start_recursion can use the CVS/Root & CVS/Repository file
+ * to determine this value.
+ */
+int
+do_update (int argc, char **argv, char *xoptions, char *xtag, char *xdate,
+           int xforce, int local, int xbuild, int xaflag, int xprune,
+           int xpipeout, int which, char *xjoin_rev1, char *xjoin_date1,
+          char *xjoin_rev2, char *xjoin_date2,
+           char *preload_update_dir, int xdotemplate, char *repository)
+{
+    int err = 0;
+
+    TRACE (TRACE_FUNCTION,
+"do_update (%s, %s, %s, %d, %d, %d, %d, %d, %d, %d, %s, %s, %s, %s, %s, %d, 
%s)",
+           xoptions ? xoptions : "(null)", xtag ? xtag : "(null)",
+          xdate ? xdate : "(null)", xforce, local, xbuild, xaflag, xprune,
+          xpipeout, which, xjoin_rev1 ? xjoin_rev1 : "(null)",
+          xjoin_date1 ? xjoin_date1 : "(null)",
+          xjoin_rev2 ? xjoin_rev2 : "(null)",
+          xjoin_date2 ? xjoin_date2 : "(null)",
+          preload_update_dir ? preload_update_dir : "(null)", xdotemplate,
+          repository ? repository : "(null)");
+
+    /* Set globals.  */
+    if (server_active && server_use_bases ())
+       bases = true;
+
+    /* fill in the statics */
+    options = xoptions;
+    tag = xtag;
+    date = xdate;
+    force_tag_match = xforce;
+    update_build_dirs = xbuild;
+    aflag = xaflag;
+    update_prune_dirs = xprune;
+    pipeout = xpipeout;
+    dotemplate = xdotemplate;
+
+    /* setup the join support */
+    join_rev1 = xjoin_rev1;
+    join_date1 = xjoin_date1;
+    join_rev2 = xjoin_rev2;
+    join_date2 = xjoin_date2;
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    if (preserve_perms)
+    {
+       /* We need to do an extra recursion, bleah.  It's to make sure
+          that we know as much as possible about file linkage. */
+       hardlist = getlist();
+       working_dir = xgetcwd ();               /* save top-level working dir */
+
+       /* FIXME-twp: the arguments to start_recursion make me dizzy.  This
+          function call was copied from the update_fileproc call that
+          follows it; someone should make sure that I did it right. */
+       err = start_recursion
+           (get_linkinfo_proc, NULL, NULL, NULL, NULL,
+            argc, argv, local, which, aflag, CVS_LOCK_READ,
+            preload_update_dir, 1, NULL);
+       if (err)
+           return err;
+
+       /* FIXME-twp: at this point we should walk the hardlist
+          and update the `links' field of each hardlink_info struct
+          to list the files that are linked on dist.  That would make
+          it easier & more efficient to compare the disk linkage with
+          the repository linkage (a simple strcmp). */
+    }
+#endif
+
+    /* call the recursion processor */
+    err = start_recursion (update_fileproc, update_filesdone_proc,
+                          update_dirent_proc, update_dirleave_proc, NULL,
+                          argc, argv, local, which, aflag, CVS_LOCK_READ,
+                          preload_update_dir, 1, repository);
+
+    /* see if we need to sleep before returning to avoid time-stamp races */
+    if (!server_active && last_register_time)
+    {
+       sleep_past (last_register_time);
+    }
+
+    return err;
+}
+
+
+
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+/*
+ * The get_linkinfo_proc callback adds each file to the hardlist
+ * (see hardlink.c).
+ */
+
+static int
+get_linkinfo_proc (void *callerdat, struct file_info *finfo)
+{
+    char *fullpath;
+    Node *linkp;
+    struct hardlink_info *hlinfo;
+
+    /* Get the full pathname of the current file. */
+    fullpath = Xasprintf ("%s/%s", working_dir, finfo->fullname);
+
+    /* To permit recursing into subdirectories, files
+       are keyed on the full pathname and not on the basename. */
+    linkp = lookup_file_by_inode (fullpath);
+    if (linkp == NULL)
+    {
+       /* The file isn't on disk; we are probably restoring
+          a file that was removed. */
+       return 0;
+    }
+    
+    /* Create a new, empty hardlink_info node. */
+    hlinfo = xmalloc (sizeof (struct hardlink_info));
+
+    hlinfo->status = (Ctype) 0;        /* is this dumb? */
+    hlinfo->checked_out = 0;
+
+    linkp->data = hlinfo;
+
+    return 0;
+}
+#endif
+
+
+
+/*
+ * This is the callback proc for update.  It is called for each file in each
+ * directory by the recursion code.  The current directory is the local
+ * instantiation.  file is the file name we are to operate on. update_dir is
+ * set to the path relative to where we started (for pretty printing).
+ * repository is the repository. entries and srcfiles are the pre-parsed
+ * entries and source control files.
+ * 
+ * This routine decides what needs to be done for each file and does the
+ * appropriate magic for checkout
+ */
+static int
+update_fileproc (void *callerdat, struct file_info *finfo)
+{
+    int retval, nb;
+    Ctype status;
+    Vers_TS *vers;
+
+    TRACE (TRACE_FUNCTION, "update_fileproc (%s)", finfo->fullname);
+
+    status = Classify_File (finfo, tag, date, options, force_tag_match,
+                           aflag, &vers, pipeout);
+
+    /* Keep track of whether TAG is a branch tag.
+       Note that if it is a branch tag in some files and a nonbranch tag
+       in others, treat it as a nonbranch tag.  */
+    if (rewrite_tag
+       && tag != NULL
+       && finfo->rcs != NULL)
+    {
+       char *rev = RCS_getversion (finfo->rcs, tag, NULL, 1, NULL);
+       if (rev != NULL
+           && nonbranch != (nb = !RCS_nodeisbranch (finfo->rcs, tag)))
+       {
+           if (nonbranch >= 0 && !warned && !quiet)
+           {
+               error (0, 0,
+"warning: %s is a branch tag in some files and a revision tag in others.",
+                       tag);
+               warned = 1;
+           }
+           if (nonbranch < nb) nonbranch = nb;
+       }
+       if (rev != NULL)
+           free (rev);
+    }
+
+    if (pipeout)
+    {
+       /*
+        * We just return success without doing anything if any of the really
+        * funky cases occur
+        * 
+        * If there is still a valid RCS file, do a regular checkout type
+        * operation
+        */
+       switch (status)
+       {
+           case T_UNKNOWN:             /* unknown file was explicitly asked
+                                        * about */
+           case T_REMOVE_ENTRY:        /* needs to be un-registered */
+           case T_ADDED:               /* added but not committed */
+               retval = 0;
+               break;
+           case T_CONFLICT:            /* old punt-type errors */
+               retval = 1;
+               break;
+           case T_UPTODATE:            /* file was already up-to-date */
+           case T_NEEDS_MERGE:         /* needs merging */
+           case T_MODIFIED:            /* locally modified */
+           case T_REMOVED:             /* removed but not committed */
+           case T_CHECKOUT:            /* needs checkout */
+           case T_PATCH:               /* needs patch */
+               retval = checkout_file (finfo, vers, 0, 0, 0);
+               break;
+
+           default:                    /* can't ever happen :-) */
+               error (0, 0,
+                      "unknown file status %d for file %s", status, 
finfo->file);
+               retval = 0;
+               break;
+       }
+    }
+    else
+    {
+       switch (status)
+       {
+           case T_UNKNOWN:             /* unknown file was explicitly asked
+                                        * about */
+           case T_UPTODATE:            /* file was already up-to-date */
+               retval = 0;
+               break;
+           case T_CONFLICT:            /* old punt-type errors */
+               retval = 1;
+               write_letter (finfo, 'C');
+               break;
+           case T_NEEDS_MERGE:         /* needs merging */
+               if (! toss_local_changes)
+               {
+                   retval = merge_file (finfo, vers);
+                   break;
+               }
+               /* else FALL THROUGH */
+           case T_MODIFIED:            /* locally modified */
+               retval = 0;
+                if (toss_local_changes)
+                {
+                    char *bakname;
+                    bakname = backup_file (finfo->file, vers->vn_user);
+                    /* This behavior is sufficiently unexpected to
+                       justify overinformativeness, I think. */
+                    if (!really_quiet && !server_active)
+                        (void) printf ("(Locally modified %s moved to %s)\n",
+                                       finfo->file, bakname);
+                    free (bakname);
+
+                    /* The locally modified file is still present, but
+                       it will be overwritten by the repository copy
+                       after this. */
+                    status = T_CHECKOUT;
+                    retval = checkout_file (finfo, vers, 0, 0, 1);
+                }
+                else 
+                {
+                    if (vers->ts_conflict)
+                    {
+                       if (file_has_markers (finfo))
+                        {
+                            write_letter (finfo, 'C');
+                            retval = 1;
+                        }
+                        else
+                        {
+                            /* Reregister to clear conflict flag. */
+                            Register (finfo->entries, finfo->file, 
+                                      vers->vn_rcs, vers->ts_rcs,
+                                      vers->options, vers->tag,
+                                      vers->date, NULL);
+                        }
+                    }
+                    if (!retval)
+                        write_letter (finfo, 'M');
+                }
+               break;
+           case T_PATCH:               /* needs patch */
+#ifdef SERVER_SUPPORT
+               if (server_active && !bases)
+               {
+                   int docheckout;
+                   struct stat file_info;
+                   unsigned char checksum[16];
+
+                   retval = patch_file (finfo,
+                                        vers, &docheckout,
+                                        &file_info, checksum);
+                   if (!docheckout)
+                   {
+                       if (retval == 0)
+                           server_updated (finfo, vers,
+                                           (rcs_diff_patches
+                                            ? SERVER_RCS_DIFF
+                                            : SERVER_PATCHED),
+                                           file_info.st_mode, checksum,
+                                           NULL);
+                       break;
+                   }
+               }
+#endif
+               /* If we're not running as a server or the client can handle
+                * base operations, just check the file out.  It's simpler and
+                * faster than producing and applying patches.
+                */
+               /* Fall through.  */
+           case T_CHECKOUT:            /* needs checkout */
+               retval = checkout_file (finfo, vers, 0, 0, 1);
+               break;
+           case T_ADDED:               /* added but not committed */
+               write_letter (finfo, 'A');
+               retval = 0;
+               break;
+           case T_REMOVED:             /* removed but not committed */
+               write_letter (finfo, 'R');
+               retval = 0;
+               break;
+           case T_REMOVE_ENTRY:        /* needs to be un-registered */
+               retval = scratch_file (finfo, vers);
+               break;
+           default:                    /* can't ever happen :-) */
+               error (0, 0,
+                      "unknown file status %d for file %s", status, 
finfo->file);
+               retval = 0;
+               break;
+       }
+    }
+
+    /* only try to join if things have gone well thus far */
+    if (retval == 0 && join_rev1)
+       join_file (finfo, vers);
+
+    /* if this directory has an ignore list, add this file to it */
+    if (ignlist && (status != T_UNKNOWN || vers->ts_user == NULL))
+    {
+       Node *p;
+
+       p = getnode ();
+       p->type = FILES;
+       p->key = xstrdup (finfo->file);
+       if (addnode (ignlist, p) != 0)
+           freenode (p);
+    }
+
+    freevers_ts (&vers);
+    return retval;
+}
+
+
+
+static void
+update_ignproc (const char *file, const char *dir)
+{
+    struct file_info finfo;
+    char *tmp;
+
+    memset (&finfo, 0, sizeof (finfo));
+    finfo.file = file;
+    finfo.update_dir = dir;
+
+    finfo.fullname = tmp = Xasprintf ("%s%s%s",
+                                     dir[0] == '\0' ? "" : dir,
+                                     dir[0] == '\0' ? "" : "/",
+                                     file);
+    write_letter (&finfo, '?');
+    free (tmp);
+}
+
+
+
+/* ARGSUSED */
+static int
+update_filesdone_proc (void *callerdat, int err, const char *repository,
+                       const char *update_dir, List *entries)
+{
+    if (nonbranch < 0) nonbranch = 0;
+    if (rewrite_tag)
+    {
+       WriteTag (NULL, tag, date, nonbranch, update_dir, repository);
+       rewrite_tag = 0;
+    }
+
+    /* if this directory has an ignore list, process it then free it */
+    if (ignlist)
+    {
+       ignore_files (ignlist, entries, update_dir, update_ignproc);
+       dellist (&ignlist);
+    }
+
+    /* Clean up CVS admin dirs if we are export */
+    if (strcmp (cvs_cmd_name, "export") == 0)
+    {
+       /* I'm not sure the existence_error is actually possible (except
+          in cases where we really should print a message), but since
+          this code used to ignore all errors, I'll play it safe.  */
+       if (unlink_file_dir (CVSADM) < 0 && !existence_error (errno))
+           error (0, errno, "cannot remove %s directory", CVSADM);
+    }
+    else if (!server_active && !pipeout)
+    {
+        /* If there is no CVS/Root file, add one */
+        if (!isfile (CVSADM_ROOT))
+           Create_Root (NULL, original_parsed_root->original);
+    }
+
+    return err;
+}
+
+
+
+/*
+ * update_dirent_proc () is called back by the recursion processor before a
+ * sub-directory is processed for update.  In this case, update_dirent proc
+ * will probably create the directory unless -d isn't specified and this is a
+ * new directory.  A return code of 0 indicates the directory should be
+ * processed by the recursion code.  A return of non-zero indicates the
+ * recursion code should skip this directory.
+ */
+static Dtype
+update_dirent_proc (void *callerdat, const char *dir, const char *repository,
+                    const char *update_dir, List *entries)
+{
+    if (ignore_directory (update_dir))
+    {
+       /* print the warm fuzzy message */
+       if (!quiet)
+         error (0, 0, "Ignoring %s", update_dir);
+        return R_SKIP_ALL;
+    }
+
+    if (!isdir (dir))
+    {
+       /* if we aren't building dirs, blow it off */
+       if (!update_build_dirs)
+           return R_SKIP_ALL;
+
+       /* Various CVS administrators are in the habit of removing
+          the repository directory for things they don't want any
+          more.  I've even been known to do it myself (on rare
+          occasions).  Not the usual recommended practice, but we
+          want to try to come up with some kind of
+          reasonable/documented/sensible behavior.  Generally
+          the behavior is to just skip over that directory (see
+          dirs test in sanity.sh; the case which reaches here
+          is when update -d is specified, and the working directory
+          is gone but the subdirectory is still mentioned in
+          CVS/Entries).  */
+       /* In the remote case, the client should refrain from
+          sending us the directory in the first place.  So we
+          want to continue to give an error, so clients make
+          sure to do this.  */
+       if (!server_active && !isdir (repository))
+           return R_SKIP_ALL;
+
+       if (noexec)
+       {
+           /* ignore the missing dir if -n is specified */
+           error (0, 0, "New directory `%s' -- ignored", update_dir);
+           return R_SKIP_ALL;
+       }
+       else
+       {
+           /* otherwise, create the dir and appropriate adm files */
+
+           /* If no tag or date were specified on the command line,
+               and we're not using -A, we want the subdirectory to use
+               the tag and date, if any, of the current directory.
+               That way, update -d will work correctly when working on
+               a branch.
+
+              We use TAG_UPDATE_DIR to undo the tag setting in
+              update_dirleave_proc.  If we did not do this, we would
+              not correctly handle a working directory with multiple
+              tags (and maybe we should prohibit such working
+              directories, but they work now and we shouldn't make
+              them stop working without more thought).  */
+           if ((tag == NULL && date == NULL) && ! aflag)
+           {
+               ParseTag (&tag, &date, &nonbranch);
+               if (tag != NULL || date != NULL)
+                   tag_update_dir = xstrdup (update_dir);
+           }
+
+           make_directory (dir);
+           Create_Admin (dir, update_dir, repository, tag, date,
+                         /* This is a guess.  We will rewrite it later
+                            via WriteTag.  */
+                         0,
+                         0,
+                         dotemplate);
+           rewrite_tag = 1;
+           nonbranch = -1;
+           warned = 0;
+           Subdir_Register (entries, NULL, dir);
+       }
+    }
+    /* Do we need to check noexec here? */
+    else if (!pipeout)
+    {
+       char *cvsadmdir;
+
+       /* The directory exists.  Check to see if it has a CVS
+          subdirectory.  */
+
+       cvsadmdir = Xasprintf ("%s/%s", dir, CVSADM);
+
+       if (!isdir (cvsadmdir))
+       {
+           /* We cannot successfully recurse into a directory without a CVS
+              subdirectory.  Generally we will have already printed
+              "? foo".  */
+           free (cvsadmdir);
+           return R_SKIP_ALL;
+       }
+       free (cvsadmdir);
+    }
+
+    /*
+     * If we are building dirs and not going to stdout, we make sure there is
+     * no static entries file and write the tag file as appropriate
+     */
+    if (!pipeout)
+    {
+       if (update_build_dirs)
+       {
+           char *tmp = Xasprintf ("%s/%s", dir, CVSADM_ENTSTAT);
+
+           if (unlink_file (tmp) < 0 && ! existence_error (errno))
+               error (1, errno, "cannot remove file %s", tmp);
+#ifdef SERVER_SUPPORT
+           if (server_active)
+               server_clear_entstat (update_dir, repository);
+#endif
+           free (tmp);
+       }
+
+       /* keep the CVS/Tag file current with the specified arguments */
+       if (aflag || tag || date)
+       {
+           WriteTag (dir, tag, date, 0, update_dir, repository);
+           rewrite_tag = 1;
+           nonbranch = -1;
+           warned = 0;
+       }
+
+       WriteTemplate (update_dir, dotemplate, repository);
+
+       /* initialize the ignore list for this directory */
+       ignlist = getlist ();
+    }
+
+    /* print the warm fuzzy message */
+    if (!quiet)
+       error (0, 0, "Updating %s", update_dir);
+
+    return R_PROCESS;
+}
+
+
+
+/*
+ * update_dirleave_proc () is called back by the recursion code upon leaving
+ * a directory.  It will prune empty directories if needed and will execute
+ * any appropriate update programs.
+ */
+/* ARGSUSED */
+static int
+update_dirleave_proc (void *callerdat, const char *dir, int err,
+                      const char *update_dir, List *entries)
+{
+    /* Delete the ignore list if it hasn't already been done.  */
+    if (ignlist)
+       dellist (&ignlist);
+
+    /* If we set the tag or date for a new subdirectory in
+       update_dirent_proc, and we're now done with that subdirectory,
+       undo the tag/date setting.  Note that we know that the tag and
+       date were both originally NULL in this case.  */
+    if (tag_update_dir != NULL && strcmp (update_dir, tag_update_dir) == 0)
+    {
+       if (tag != NULL)
+       {
+           free (tag);
+           tag = NULL;
+       }
+       if (date != NULL)
+       {
+           free (date);
+           date = NULL;
+       }
+       nonbranch = -1;
+       warned = 0;
+       free (tag_update_dir);
+       tag_update_dir = NULL;
+    }
+
+    if (strchr (dir, '/') == NULL)
+    {
+       /* FIXME: chdir ("..") loses with symlinks.  */
+       /* Prune empty dirs on the way out - if necessary */
+       (void) CVS_CHDIR ("..");
+       if (update_prune_dirs && isemptydir (dir, 0))
+       {
+           /* I'm not sure the existence_error is actually possible (except
+              in cases where we really should print a message), but since
+              this code used to ignore all errors, I'll play it safe.  */
+           if (unlink_file_dir (dir) < 0 && !existence_error (errno))
+               error (0, errno, "cannot remove %s directory", dir);
+           Subdir_Deregister (entries, NULL, dir);
+       }
+    }
+
+    return err;
+}
+
+
+
+/* Returns 1 if the file indicated by node has been removed.  */
+static int
+isremoved (Node *node, void *closure)
+{
+    Entnode *entdata = node->data;
+
+    /* If the first character of the version is a '-', the file has been
+       removed. */
+    return (entdata->version && entdata->version[0] == '-') ? 1 : 0;
+}
+
+
+
+/* Returns 1 if the argument directory is completely empty, other than the
+   existence of the CVS directory entry.  Zero otherwise.  If MIGHT_NOT_EXIST
+   and the directory doesn't exist, then just return 0.  */
+int
+isemptydir (const char *dir, int might_not_exist)
+{
+    DIR *dirp;
+    struct dirent *dp;
+
+    if ((dirp = CVS_OPENDIR (dir)) == NULL)
+    {
+       if (might_not_exist && existence_error (errno))
+           return 0;
+       error (0, errno, "cannot open directory %s for empty check", dir);
+       return 0;
+    }
+    errno = 0;
+    while ((dp = CVS_READDIR (dirp)) != NULL)
+    {
+       if (strcmp (dp->d_name, ".") != 0
+           && strcmp (dp->d_name, "..") != 0)
+       {
+           if (strcmp (dp->d_name, CVSADM) != 0)
+           {
+               /* An entry other than the CVS directory.  The directory
+                  is certainly not empty. */
+               (void) CVS_CLOSEDIR (dirp);
+               return 0;
+           }
+           else
+           {
+               /* The CVS directory entry.  We don't have to worry about
+                  this unless the Entries file indicates that files have
+                  been removed, but not committed, in this directory.
+                  (Removing the directory would prevent people from
+                  comitting the fact that they removed the files!) */
+               List *l;
+               int files_removed;
+               struct saved_cwd cwd;
+
+               if (save_cwd (&cwd))
+                   error (1, errno, "Failed to save current directory.");
+
+               if (CVS_CHDIR (dir) < 0)
+                   error (1, errno, "cannot change directory to %s", dir);
+               l = Entries_Open (0, NULL);
+               files_removed = walklist (l, isremoved, 0);
+               Entries_Close (l);
+
+               if (restore_cwd (&cwd))
+                   error (1, errno,
+                          "Failed to restore current directory, `%s'.",
+                          cwd.name);
+               free_cwd (&cwd);
+
+               if (files_removed != 0)
+               {
+                   /* There are files that have been removed, but not
+                      committed!  Do not consider the directory empty. */
+                   (void) CVS_CLOSEDIR (dirp);
+                   return 0;
+               }
+           }
+       }
+       errno = 0;
+    }
+    if (errno != 0)
+    {
+       error (0, errno, "cannot read directory %s", dir);
+       (void) CVS_CLOSEDIR (dirp);
+       return 0;
+    }
+    (void) CVS_CLOSEDIR (dirp);
+    return 1;
+}
+
+
+
+/*
+ * scratch the Entries file entry associated with a file
+ */
+static int
+scratch_file (struct file_info *finfo, Vers_TS *vers)
+{
+    history_write ('W', finfo->update_dir, "", finfo->file, finfo->repository);
+    Scratch_Entry (finfo->entries, finfo->file);
+#ifdef SERVER_SUPPORT
+    if (server_active)
+    {
+       if (vers->ts_user == NULL)
+           server_scratch_entry_only ();
+       server_updated (finfo, vers, SERVER_UPDATED, (mode_t) -1, NULL, NULL);
+    }
+#endif
+    if (unlink_file (finfo->file) < 0 && ! existence_error (errno))
+       error (0, errno, "unable to remove %s", finfo->fullname);
+    else if (!server_active)
+    {
+       /* skip this step when the server is running since
+        * server_updated should have handled it */
+       /* keep the vers structure up to date in case we do a join
+        * - if there isn't a file, it can't very well have a version number, 
can it?
+        */
+       if (vers->vn_user != NULL)
+       {
+           free (vers->vn_user);
+           vers->vn_user = NULL;
+       }
+       if (vers->ts_user != NULL)
+       {
+           free (vers->ts_user);
+           vers->ts_user = NULL;
+       }
+    }
+    return 0;
+}
+
+
+
+/*
+ * Check out a file.
+ *
+ * INPUTS
+ *   finfo             The file to be updated.
+ *   vers_ts           Version information about the file to be updated.
+ *   adding
+ *   merging
+ *   update_server
+ */
+static int
+checkout_file (struct file_info *finfo, Vers_TS *vers_ts, int adding,
+               int merging, int update_server)
+{
+    char *backup;
+    int set_time, retval = 0;
+    int status;
+    bool file_is_dead;
+
+    TRACE (TRACE_FUNCTION, "checkout_file (%s)", finfo->fullname);
+
+    backup = NULL;
+
+    /* Don't screw with backup files if we're going to stdout, or if
+       we are the server.  */
+    if (!pipeout && !server_active)
+    {
+       backup = Xasprintf ("%s/%s%s", CVSADM, CVSPREFIX, finfo->file);
+       if (isfile (finfo->file))
+           force_copy_file (finfo->file, backup);
+       else /* FIXME: -f/-t has been disabled for so long it should probably
+             * just be stripped out to reduce clutter.
+             */
+       {
+           /* If -f/-t wrappers are being used to wrap up a directory,
+              then backup might be a directory instead of just a file.  */
+           if (unlink_file_dir (backup) < 0)
+           {
+               /* Not sure if the existence_error check is needed here.  */
+               if (!existence_error (errno))
+                   /* FIXME: should include update_dir in message.  */
+                   error (0, errno, "error removing %s", backup);
+           }
+           free (backup);
+           backup = NULL;
+       }
+    }
+
+    file_is_dead = RCS_isdead (vers_ts->srcfile, vers_ts->vn_rcs);
+
+    if (!file_is_dead)
+    {
+       /*
+        * if we are checking out to stdout, print a nice message to
+        * stderr, and add the -p flag to the command */
+       if (pipeout)
+       {
+           if (!quiet)
+           {
+               cvs_outerr ("\
+===================================================================\n\
+Checking out ", 0);
+               cvs_outerr (finfo->fullname, 0);
+               cvs_outerr ("\n\
+RCS:  ", 0);
+               cvs_outerr (vers_ts->srcfile->print_path, 0);
+               cvs_outerr ("\n\
+VERS: ", 0);
+               cvs_outerr (vers_ts->vn_rcs, 0);
+               cvs_outerr ("\n***************\n", 0);
+           }
+
+           status = RCS_checkout (vers_ts->srcfile,
+                                  pipeout ? NULL : finfo->file,
+                                  vers_ts->vn_rcs, vers_ts->tag,
+                                  vers_ts->options, RUN_TTY, NULL, NULL);
+       }
+       else
+           /* There used to be a special case here to check out to a buffer
+            * when UPDATE_SERVER && SERVER_ACTIVE && !PIPEOUT
+            * && !FILE_GZIP_LEVEL && !joining ()
+            * && !wrap_name_has (finfo->file, WRAP_FROMCVS), but I don't think
+            * it is important to optimize for old clients which don't support
+            * bandwidth saving base files and openpgp signatures.
+            */
+           status = base_checkout (vers_ts->srcfile, finfo,
+                                   vers_ts->vn_user, vers_ts->vn_rcs,
+                                   vers_ts->entdata
+                                   ? vers_ts->entdata->tag : NULL,
+                                   vers_ts->tag,
+                                   vers_ts->entdata
+                                   ? vers_ts->entdata->options : NULL,
+                                   vers_ts->options);
+    }
+
+    if (file_is_dead || status == 0)
+    {
+       mode_t mode = (mode_t) -1;
+
+       if (!pipeout)
+       {
+           Vers_TS *xvers_ts;
+
+           if (!file_is_dead)
+           {
+               char flags[3];
+               if (vers_ts->ts_user)
+                   flags[0] = 'y';
+               else
+                   flags[0] = 'n';
+               if (cvswrite && !fileattr_get (finfo->file, "_watched"))
+                   flags[1] = 'y';
+               else
+                   flags[1] = 'n';
+               flags[2] = '\0';
+               base_copy (finfo, vers_ts->vn_rcs, flags);
+           }
+           {
+               /* A newly checked out file is never under the spell
+                  of "cvs edit".  If we think we were editing it
+                  from a previous life, clean up.  Would be better to
+                  check for same the working directory instead of
+                  same user, but that is hairy.  */
+
+               struct addremove_args args;
+
+               editor_set (finfo->file, getcaller (), NULL);
+
+               memset (&args, 0, sizeof args);
+               args.remove_temp = 1;
+               watch_modify_watchers (finfo->file, &args);
+           }
+
+           /* set the time from the RCS file iff it was unknown before */
+           set_time =
+               (!noexec
+                && (!vers_ts->vn_user ||
+                    !strncmp (vers_ts->ts_rcs, "Initial", 7))
+                && !file_is_dead);
+
+           wrap_fromcvs_process_file (finfo->file);
+
+           xvers_ts = Version_TS (finfo, options, tag, date, 
+                                  force_tag_match, set_time);
+           if (strcmp (xvers_ts->options, "-V4") == 0)
+               xvers_ts->options[0] = '\0';
+
+           (void) time (&last_register_time);
+
+           if (file_is_dead)
+           {
+               if (xvers_ts->vn_user != NULL)
+               {
+                   error (0, 0,
+                          "warning: %s is not (any longer) pertinent",
+                          finfo->fullname);
+               }
+               Scratch_Entry (finfo->entries, finfo->file);
+#ifdef SERVER_SUPPORT
+               if (server_active && xvers_ts->ts_user == NULL)
+                   server_scratch_entry_only ();
+#endif
+               /* FIXME: Rather than always unlink'ing, and ignoring the
+                  existence_error, we should do the unlink only if
+                  vers_ts->ts_user is non-NULL.  Then there would be no
+                  need to ignore an existence_error (for example, if the
+                  user removes the file while we are running).  */
+               if (unlink_file (finfo->file) < 0 && ! existence_error (errno))
+               {
+                   error (0, errno, "cannot remove %s", finfo->fullname);
+               }
+           }
+           else
+               Register (finfo->entries, finfo->file,
+                         adding ? "0" : xvers_ts->vn_rcs,
+                         xvers_ts->ts_user, xvers_ts->options,
+                         xvers_ts->tag, xvers_ts->date,
+                         NULL); /* Clear conflict flag on fresh checkout */
+
+           /* fix up the vers structure, in case it is used by join */
+           if (join_rev1)
+           {
+               Node *n;
+
+               /* FIXME: Throwing away the original revision info is almost
+                  certainly wrong -- what if join_rev1 is "BASE"?  */
+               if (vers_ts->vn_user != NULL)
+                   free (vers_ts->vn_user);
+               if (vers_ts->vn_rcs != NULL)
+                   free (vers_ts->vn_rcs);
+               vers_ts->vn_user = xstrdup (xvers_ts->vn_rcs);
+               vers_ts->vn_rcs = xstrdup (xvers_ts->vn_rcs);
+               n = findnode_fn (finfo->entries, finfo->file);
+               if (n)
+                   vers_ts->entdata = n->data;
+               else
+                   vers_ts->entdata = NULL;
+           }
+
+           /* If this is really Update and not Checkout, recode history */
+           if (strcmp (cvs_cmd_name, "update") == 0)
+               history_write ('U', finfo->update_dir, xvers_ts->vn_rcs,
+                              finfo->file, finfo->repository);
+
+           freevers_ts (&xvers_ts);
+
+           if (!really_quiet && !file_is_dead)
+               write_letter (finfo, 'U');
+       }
+
+#ifdef SERVER_SUPPORT
+       if (update_server && server_active)
+           server_updated (finfo, vers_ts,
+                           merging ? SERVER_MERGED : SERVER_UPDATED,
+                           mode, NULL, NULL);
+#endif
+    }
+    else
+    {
+       if (backup != NULL)
+       {
+           rename_file (backup, finfo->file);
+           free (backup);
+           backup = NULL;
+       }
+
+       error (0, 0, "could not check out %s", finfo->fullname);
+
+       retval = status;
+    }
+
+    if (backup)
+    {
+       /* If -f/-t wrappers are being used to wrap up a directory,
+          then backup might be a directory instead of just a file.  */
+       if (unlink_file_dir (backup) < 0)
+       {
+           /* Not sure if the existence_error check is needed here.  */
+           if (!existence_error (errno))
+               /* FIXME: should include update_dir in message.  */
+               error (0, errno, "error removing %s", backup);
+       }
+       free (backup);
+    }
+
+    return retval;
+}
+
+
+
+#ifdef SERVER_SUPPORT
+
+/* This structure is used to pass information between patch_file and
+   patch_file_write.  */
+
+struct patch_file_data
+{
+    /* File name, for error messages.  */
+    const char *filename;
+    /* File to which to write.  */
+    FILE *fp;
+    /* Whether to compute the MD5 checksum.  */
+    int compute_checksum;
+    /* Data structure for computing the MD5 checksum.  */
+    struct md5_ctx context;
+    /* Set if the file has a final newline.  */
+    int final_nl;
+};
+
+/* Patch a file.  Runs diff.  This is only done when running as the
+ * server.  The hope is that the diff will be smaller than the file
+ * itself.
+ */
+static int
+patch_file (struct file_info *finfo, Vers_TS *vers_ts, int *docheckout,
+           struct stat *file_info, unsigned char *checksum)
+{
+    char *backup;
+    char *file1;
+    char *file2;
+    int retval = 0;
+    int retcode = 0;
+    int fail;
+    FILE *e;
+    struct patch_file_data data;
+
+    *docheckout = 0;
+
+    if (noexec || pipeout || joining ())
+    {
+       *docheckout = 1;
+       return 0;
+    }
+
+    /* If this file has been marked as being binary, then never send a
+       patch.  */
+    if (strcmp (vers_ts->options, "-kb") == 0)
+    {
+       *docheckout = 1;
+       return 0;
+    }
+
+    /* First check that the first revision exists.  If it has been nuked
+       by cvs admin -o, then just fall back to checking out entire
+       revisions.  In some sense maybe we don't have to do this; after
+       all cvs.texinfo says "Make sure that no-one has checked out a
+       copy of the revision you outdate" but then again, that advice
+       doesn't really make complete sense, because "cvs admin" operates
+       on a working directory and so _someone_ will almost always have
+       _some_ revision checked out.  */
+    {
+       char *rev;
+
+       rev = RCS_gettag (finfo->rcs, vers_ts->vn_user, 1, NULL);
+       if (rev == NULL)
+       {
+           *docheckout = 1;
+           return 0;
+       }
+       else
+           free (rev);
+    }
+
+    /* If the revision is dead, let checkout_file handle it rather
+       than duplicating the processing here.  */
+    if (RCS_isdead (vers_ts->srcfile, vers_ts->vn_rcs))
+    {
+       *docheckout = 1;
+       return 0;
+    }
+
+    backup = Xasprintf ("%s/%s%s", CVSADM, CVSPREFIX, finfo->file);
+    if (isfile (finfo->file))
+        rename_file (finfo->file, backup);
+    else
+    {
+       if (unlink_file (backup) < 0
+           && !existence_error (errno))
+           error (0, errno, "cannot remove %s", backup);
+    }
+
+    file1 = Xasprintf ("%s/%s%s-1", CVSADM, CVSPREFIX, finfo->file);
+    file2 = Xasprintf ("%s/%s%s-2", CVSADM, CVSPREFIX, finfo->file);
+
+    fail = 0;
+
+    /* We need to check out both revisions first, to see if either one
+       has a trailing newline.  Because of this, we don't use rcsdiff,
+       but just use diff.  */
+
+    e = CVS_FOPEN (file1, "w");
+    if (e == NULL)
+       error (1, errno, "cannot open %s", file1);
+
+    data.filename = file1;
+    data.fp = e;
+    data.final_nl = 0;
+    data.compute_checksum = 0;
+
+    /* FIXME - Passing vers_ts->tag here is wrong in the least number
+     * of cases.  Since we don't know whether vn_user was checked out
+     * using a tag, we pass vers_ts->tag, which, assuming the user did
+     * not specify a new TAG to -r, will be the branch we are on.
+     *
+     * The only thing it is used for is to substitute in for the Name
+     * RCS keyword, so in the error case, the patch fails to apply on
+     * the client end and we end up resending the whole file.
+     *
+     * At least, if we are keeping track of the tag vn_user came from,
+     * I don't know where yet. -DRP
+     */
+    retcode = RCS_checkout (vers_ts->srcfile, NULL,
+                           vers_ts->vn_user, vers_ts->tag,
+                           vers_ts->options, RUN_TTY,
+                           patch_file_write, (void *) &data);
+
+    if (fclose (e) < 0)
+       error (1, errno, "cannot close %s", file1);
+
+    if (retcode != 0 || ! data.final_nl)
+       fail = 1;
+
+    if (! fail)
+    {
+       e = CVS_FOPEN (file2, "w");
+       if (e == NULL)
+           error (1, errno, "cannot open %s", file2);
+
+       data.filename = file2;
+       data.fp = e;
+       data.final_nl = 0;
+       data.compute_checksum = 1;
+       md5_init_ctx (&data.context);
+
+       retcode = RCS_checkout (vers_ts->srcfile, NULL,
+                               vers_ts->vn_rcs, vers_ts->tag,
+                               vers_ts->options, RUN_TTY,
+                               patch_file_write, (void *) &data);
+
+       if (fclose (e) < 0)
+           error (1, errno, "cannot close %s", file2);
+
+       if (retcode != 0 || ! data.final_nl)
+           fail = 1;
+       else
+           md5_finish_ctx (&data.context, checksum);
+    }    
+
+    retcode = 0;
+    if (! fail)
+    {
+       int dargc = 0;
+       size_t darg_allocated = 0;
+       char **dargv = NULL;
+
+       /* If the client does not support the Rcs-diff command, we
+           send a context diff, and the client must invoke patch.
+           That approach was problematical for various reasons.  The
+           new approach only requires running diff in the server; the
+           client can handle everything without invoking an external
+           program.  */
+       if (!rcs_diff_patches)
+           /* We use -c, not -u, because that is what CVS has
+              traditionally used.  Kind of a moot point, now that
+              Rcs-diff is preferred, so there is no point in making
+              the compatibility issues worse.  */
+           run_add_arg_p (&dargc, &darg_allocated, &dargv, "-c");
+       else
+           /* Now that diff is librarified, we could be passing -a if
+              we wanted to.  However, it is unclear to me whether we
+              would want to.  Does diff -a, in any significant
+              percentage of cases, produce patches which are smaller
+              than the files it is patching?  I guess maybe text
+              files with character sets which diff regards as
+              'binary'.  Conversely, do they tend to be much larger
+              in the bad cases?  This needs some more
+              thought/investigation, I suspect.  */
+           run_add_arg_p (&dargc, &darg_allocated, &dargv, "-n");
+       retcode = diff_exec (file1, file2, NULL, NULL, dargc, dargv,
+                            finfo->file);
+       run_arg_free_p (dargc, dargv);
+       free (dargv);
+
+       /* A retcode of 0 means no differences.  1 means some differences.  */
+       if (retcode != 0 && retcode != 1)
+           fail = 1;
+    }
+
+    if (!fail)
+    {
+       struct stat file2_info;
+
+       /* Check to make sure the patch is really shorter */
+       if (stat (file2, &file2_info) < 0)
+           error (1, errno, "could not stat %s", file2);
+       if (stat (finfo->file, file_info) < 0)
+           error (1, errno, "could not stat %s", finfo->file);
+       if (file2_info.st_size <= file_info->st_size)
+           fail = 1;
+    }
+
+    if (! fail)
+    {
+# define BINARY "Binary"
+       char buf[sizeof BINARY];
+       unsigned int c;
+
+       /* Check the diff output to make sure patch will be handle it.  */
+       e = CVS_FOPEN (finfo->file, "r");
+       if (e == NULL)
+           error (1, errno, "could not open diff output file %s",
+                  finfo->fullname);
+       c = fread (buf, 1, sizeof BINARY - 1, e);
+       buf[c] = '\0';
+       if (strcmp (buf, BINARY) == 0)
+       {
+           /* These are binary files.  We could use diff -a, but
+              patch can't handle that.  */
+           fail = 1;
+       }
+       fclose (e);
+    }
+
+    if (! fail)
+    {
+        Vers_TS *xvers_ts;
+
+       /* Stat the original RCS file, and then adjust it the way
+          that RCS_checkout would.  FIXME: This is an abstraction
+          violation.  */
+       if (stat (vers_ts->srcfile->path, file_info) < 0)
+           error (1, errno, "could not stat %s", vers_ts->srcfile->path);
+       if (chmod (finfo->file,
+                  file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH))
+           < 0)
+           error (0, errno, "cannot change mode of file %s", finfo->file);
+       if (cvswrite
+           && !fileattr_get (finfo->file, "_watched"))
+           xchmod (finfo->file, 1);
+
+        /* This stuff is just copied blindly from checkout_file.  I
+          don't really know what it does.  */
+        xvers_ts = Version_TS (finfo, options, tag, date,
+                              force_tag_match, 0);
+       if (strcmp (xvers_ts->options, "-V4") == 0)
+           xvers_ts->options[0] = '\0';
+
+       Register (finfo->entries, finfo->file, xvers_ts->vn_rcs,
+                 xvers_ts->ts_user, xvers_ts->options,
+                 xvers_ts->tag, xvers_ts->date, NULL);
+
+       if (stat (finfo->file, file_info) < 0)
+           error (1, errno, "could not stat %s", finfo->file);
+
+       /* If this is really Update and not Checkout, record history.  */
+       if (strcmp (cvs_cmd_name, "update") == 0)
+           history_write ('P', finfo->update_dir, xvers_ts->vn_rcs,
+                          finfo->file, finfo->repository);
+
+       freevers_ts (&xvers_ts);
+
+       if (!really_quiet)
+       {
+           if (trace)
+               write_letter (finfo, 'P');
+           else
+               write_letter (finfo, 'U');
+       }
+    }
+    else
+    {
+       int old_errno = errno;          /* save errno value over the rename */
+
+       if (isfile (backup))
+           rename_file (backup, finfo->file);
+
+       if (retcode != 0 && retcode != 1)
+           error (retcode == -1 ? 1 : 0, retcode == -1 ? old_errno : 0,
+                  "could not diff %s", finfo->fullname);
+
+       *docheckout = 1;
+       retval = retcode;
+    }
+
+    if (unlink_file (backup) < 0
+       && !existence_error (errno))
+       error (0, errno, "cannot remove %s", backup);
+    if (unlink_file (file1) < 0
+       && !existence_error (errno))
+       error (0, errno, "cannot remove %s", file1);
+    if (unlink_file (file2) < 0
+       && !existence_error (errno))
+       error (0, errno, "cannot remove %s", file2);
+
+    free (backup);
+    free (file1);
+    free (file2);
+    return retval;
+}
+
+
+
+/* Write data to a file.  Record whether the last byte written was a
+   newline.  Optionally compute a checksum.  This is called by
+   patch_file via RCS_checkout.  */
+
+static void
+patch_file_write (void *callerdat, const char *buffer, size_t len)
+{
+    struct patch_file_data *data = (struct patch_file_data *) callerdat;
+
+    if (fwrite (buffer, 1, len, data->fp) != len)
+       error (1, errno, "cannot write %s", data->filename);
+
+    data->final_nl = (buffer[len - 1] == '\n');
+
+    if (data->compute_checksum)
+       md5_process_bytes (buffer, len, &data->context);
+}
+
+#endif /* SERVER_SUPPORT */
+
+/*
+ * Several of the types we process only print a bit of information consisting
+ * of a single letter and the name.
+ */
+void
+write_letter (struct file_info *finfo, int letter)
+{
+    if (!really_quiet)
+    {
+       char *tag = NULL;
+       /* Big enough for "+updated" or any of its ilk.  */
+       char buf[80];
+
+       switch (letter)
+       {
+           case 'U':
+               tag = "updated";
+               break;
+           default:
+               /* We don't yet support tagged output except for "U".  */
+               break;
+       }
+
+       if (tag != NULL)
+       {
+           sprintf (buf, "+%s", tag);
+           cvs_output_tagged (buf, NULL);
+       }
+       buf[0] = letter;
+       buf[1] = ' ';
+       buf[2] = '\0';
+       cvs_output_tagged ("text", buf);
+       cvs_output_tagged ("fname", finfo->fullname);
+       cvs_output_tagged ("newline", NULL);
+       if (tag != NULL)
+       {
+           sprintf (buf, "-%s", tag);
+           cvs_output_tagged (buf, NULL);
+       }
+    }
+    return;
+}
+
+
+
+/* Reregister a file after a merge.  */
+static void
+RegisterMerge (struct file_info *finfo, Vers_TS *vers,
+              const char *backup, bool has_conflicts, bool force_addition)
+{
+    /* This file is the result of a merge, which means that it has
+       been modified.  We use a special timestamp string which will
+       not compare equal to any actual timestamp.  */
+    char *cp = NULL;
+
+    TRACE (TRACE_FUNCTION, "RegisterMerge (%s, %s, %s, %s, %s)",
+          finfo->fullname, vers->vn_user, backup,
+          has_conflicts ? "true" : "false",
+          force_addition ? "true" : "false");
+
+    if (has_conflicts)
+    {
+       time (&last_register_time);
+       cp = time_stamp (finfo->file);
+    }
+    Register (finfo->entries, finfo->file,
+             vers->vn_rcs && !force_addition ? vers->vn_rcs : "0",
+             "Result of merge", vers->options, vers->tag, vers->date, cp);
+    if (cp)
+       free (cp);
+
+#ifdef SERVER_SUPPORT
+    /* Send the new contents of the file before the message.  If we
+       wanted to be totally correct, we would have the client write
+       the message only after the file has safely been written.  */
+    if (server_active)
+    {
+       if (vers->ts_user)
+           server_copy_file (finfo->file, finfo->update_dir,
+                             finfo->repository, backup);
+       server_updated (finfo, vers, SERVER_MERGED, (mode_t) -1, NULL, NULL);
+    }
+#endif
+}
+
+
+
+/*
+ * Do all the magic associated with a file which needs to be merged
+ */
+static int
+merge_file (struct file_info *finfo, Vers_TS *vers)
+{
+    char *backup;
+    int status;
+    int retval;
+
+    assert (vers->vn_user);
+
+    /*
+     * The users currently modified file is moved to a backup file name
+     * ".#filename.version", so that it will stay around for a few days
+     * before being automatically removed by some cron daemon.  The "version"
+     * is the version of the file that the user was most up-to-date with
+     * before the merge.
+     */
+    backup = Xasprintf ("%s%s.%s", BAKPREFIX, finfo->file, vers->vn_user);
+
+    if (unlink_file (backup) && !existence_error (errno))
+       error (0, errno, "unable to remove %s", backup);
+    copy_file (finfo->file, backup);
+    xchmod (finfo->file, 1);
+
+    if (strcmp (vers->options, "-kb") == 0
+       || wrap_merge_is_copy (finfo->file)
+       || special_file_mismatch (finfo, NULL, vers->vn_rcs))
+    {
+       /* For binary files, a merge is always a conflict.  Same for
+          files whose permissions or linkage do not match.  We give the
+          user the two files, and let them resolve it.  It is possible
+          that we should require a "touch foo" or similar step before
+          we allow a checkin.  */
+
+       /* TODO: it may not always be necessary to regard a permission
+          mismatch as a conflict.  The working file and the RCS file
+          have a common ancestor `A'; if the working file's permissions
+          match A's, then it's probably safe to overwrite them with the
+          RCS permissions.  Only if the working file, the RCS file, and
+          A all disagree should this be considered a conflict.  But more
+          thought needs to go into this, and in the meantime it is safe
+          to treat any such mismatch as an automatic conflict. -twp */
+
+       status = base_checkout (finfo->rcs, finfo, vers->vn_user, vers->vn_rcs,
+                               vers->entdata->tag, vers->tag,
+                               vers->entdata->options, vers->options);
+       base_copy (finfo, vers->vn_rcs, "yy");
+
+       if (status)
+       {
+           error (0, 0, "failed to check out `%s' file", finfo->fullname);
+           error (0, 0, "restoring `%s' from backup file `%s'",
+                  finfo->fullname, backup);
+           rename_file (backup, finfo->file);
+           retval = 1;
+           goto out;
+       }
+
+       RegisterMerge (finfo, vers, backup, true, false);
+
+       /* Is there a better term than "nonmergeable file"?  What we
+          really mean is, not something that CVS cannot or does not
+          want to merge (there might be an external manual or
+          automatic merge process).  */
+       error (0, 0, "nonmergeable file needs merge");
+       error (0, 0, "revision %s from repository is now in %s",
+              vers->vn_rcs, finfo->fullname);
+       error (0, 0, "file from working directory is now in %s", backup);
+       write_letter (finfo, 'C');
+
+       history_write ('C', finfo->update_dir, vers->vn_rcs, finfo->file,
+                      finfo->repository);
+       retval = 0;
+       goto out;
+    }
+
+    status = base_merge (finfo->rcs, finfo, vers->entdata->tag,
+                        vers->entdata->options, vers->options, vers->vn_user,
+                        vers->vn_user, vers->vn_rcs, false);
+
+    if (status != 0 && status != 1)
+    {
+       error (0, status == -1 ? errno : 0,
+              "could not merge revision %s of %s", vers->vn_user,
+              finfo->fullname);
+       error (status == -1 ? 1 : 0, 0, "restoring %s from backup file %s",
+              finfo->fullname, backup);
+       rename_file (backup, finfo->file);
+       retval = 1;
+       base_remove (finfo->file, vers->vn_rcs);
+       goto out;
+    }
+    base_remove (finfo->file, vers->vn_user);
+
+    if (strcmp (vers->options, "-V4") == 0)
+       vers->options[0] = '\0';
+
+    /* fix up the vers structure, in case it is used by join */
+    if (join_rev1)
+    {
+       /* FIXME: Throwing away the original revision info is almost
+          certainly wrong -- what if join_rev1 is "BASE"?  */
+       if (vers->vn_user != NULL)
+           free (vers->vn_user);
+       vers->vn_user = xstrdup (vers->vn_rcs);
+    }
+
+    RegisterMerge (finfo, vers, backup, status, false);
+
+    if (status == 1)
+    {
+       if (!really_quiet)
+           write_letter (finfo, 'C');
+
+       history_write ('C', finfo->update_dir, vers->vn_rcs, finfo->file,
+                      finfo->repository);
+
+    }
+    else /* status == 0 */
+    {
+       /* FIXME: When BASES, a zero status might mean the server didn't
+        * perform the merge.
+        */
+       history_write ('G', finfo->update_dir, vers->vn_rcs, finfo->file,
+                      finfo->repository);
+
+       /* FIXME: the noexec case is broken.  RCS_merge could be doing the
+          xcmp on the temporary files without much hassle, I think.  */
+       if (!noexec && !bases && !xcmp (backup, finfo->file))
+       {
+           if (!quiet)
+           {
+               /* The client will handle these messages when BASES.  */
+               cvs_output ("`", 1);
+               cvs_output (finfo->fullname, 0);
+               cvs_output ("' already contains the differences between ", 0);
+               cvs_output (vers->vn_user, 0);
+               cvs_output (" and ", 5);
+               cvs_output (vers->vn_rcs, 0);
+               cvs_output ("\n", 1);
+           }
+
+           retval = 0;
+           goto out;
+       }
+
+       if (!bases)
+           /* The client may determine this is a conflict rather than
+            * modified.  Let it write the correct message.
+            */
+           write_letter (finfo, 'M');
+    }
+    retval = 0;
+ out:
+    free (backup);
+    return retval;
+}
+
+
+
+/*
+ * Do all the magic associated with a file which needs to be joined
+ * (reached via the -j option to checkout or update).
+ *
+ * INPUTS
+ *   finfo             File information about the destination file.
+ *   vers              The Vers_TS structure for finfo.
+ *
+ * GLOBALS
+ *   join_rev1         From the command line.
+ *   join_rev2         From the command line.
+ *   server_active     Natch.
+ *
+ * ASSUMPTIONS
+ *   1.  Is not called in client mode.
+ */
+static void
+join_file (struct file_info *finfo, Vers_TS *vers)
+{
+    char *backup;
+    char *t_options;
+    int status;
+
+    char *rev1;
+    char *rev2;
+    char *jrev1;
+    char *jrev2;
+    char *jdate1;
+    char *jdate2;
+    bool replace_it;
+
+    TRACE (TRACE_FUNCTION, "join_file (%s, %s%s%s%s, %s, %s)",
+          finfo->file,
+          vers->tag ? vers->tag : "",
+          vers->tag ? " (" : "",
+          vers->vn_rcs ? vers->vn_rcs : "",
+          vers->tag ? ")" : "",
+          join_rev1 ? join_rev1 : "",
+          join_rev2 ? join_rev2 : "");
+
+    jrev1 = join_rev1;
+    jrev2 = join_rev2;
+    jdate1 = join_date1;
+    jdate2 = join_date2;
+
+    /* Determine if we need to do anything at all.  */
+    if (vers->srcfile == NULL ||
+       vers->srcfile->path == NULL)
+    {
+       return;
+    }
+
+    /* If only one join revision is specified, it becomes the second
+       revision.  */
+    if (jrev2 == NULL)
+    {
+       jrev2 = jrev1;
+       jrev1 = NULL;
+       jdate2 = jdate1;
+       jdate1 = NULL;
+    }
+
+    /* FIXME: Need to handle "BASE" for jrev1 and/or jrev2.  Note caveat
+       below about vn_user.  */
+
+    /* Convert the second revision, walking branches and dates.  */
+    rev2 = RCS_getversion (vers->srcfile, jrev2, jdate2, 1, NULL);
+
+    /* If this is a merge of two revisions, get the first revision.
+       If only one join tag was specified, then the first revision is
+       the greatest common ancestor of the second revision and the
+       working file.  */
+    if (jrev1 != NULL)
+       rev1 = RCS_getversion (vers->srcfile, jrev1, jdate1, 1, NULL);
+    else
+    {
+       /* Note that we use vn_rcs here, since vn_user may contain a
+           special string such as "-nn".  */
+       if (vers->vn_rcs == NULL)
+           rev1 = NULL;
+       else if (rev2 == NULL)
+       {
+           /* This means that the file never existed on the branch.
+               It does not mean that the file was removed on the
+               branch: that case is represented by a dead rev2.  If
+               the file never existed on the branch, then we have
+               nothing to merge, so we just return.  */
+           return;
+       }
+       else
+           rev1 = gca (vers->vn_rcs, rev2);
+    }
+
+    /* Handle a nonexistent or dead merge target.  */
+    if (rev2 == NULL || RCS_isdead (vers->srcfile, rev2))
+    {
+       char *mrev;
+
+       if (rev2 != NULL)
+           free (rev2);
+
+       /* If the first revision doesn't exist either, then there is
+           no change between the two revisions, so we don't do
+           anything.  */
+       if (rev1 == NULL || RCS_isdead (vers->srcfile, rev1))
+       {
+           if (rev1 != NULL)
+               free (rev1);
+           return;
+       }
+
+       /* If we are merging two revisions, then the file was removed
+          between the first revision and the second one.  In this
+          case we want to mark the file for removal.
+
+          If we are merging one revision, then the file has been
+          removed between the greatest common ancestor and the merge
+          revision.  From the perspective of the branch on to which
+          we ar emerging, which may be the trunk, either 1) the file
+          does not currently exist on the target, or 2) the file has
+          not been modified on the target branch since the greatest
+          common ancestor, or 3) the file has been modified on the
+          target branch since the greatest common ancestor.  In case
+          1 there is nothing to do.  In case 2 we mark the file for
+          removal.  In case 3 we have a conflict.
+
+          Note that the handling is slightly different depending upon
+          whether one or two join targets were specified.  If two
+          join targets were specified, we don't check whether the
+          file was modified since a given point.  My reasoning is
+          that if you ask for an explicit merge between two tags,
+          then you want to merge in whatever was changed between
+          those two tags.  If a file was removed between the two
+          tags, then you want it to be removed.  However, if you ask
+          for a merge of a branch, then you want to merge in all
+          changes which were made on the branch.  If a file was
+          removed on the branch, that is a change to the file.  If
+          the file was also changed on the main line, then that is
+          also a change.  These two changes--the file removal and the
+          modification--must be merged.  This is a conflict.  */
+
+       /* If the user file is dead, or does not exist, or has been
+           marked for removal, then there is nothing to do.  */
+       if (vers->vn_user == NULL
+           || vers->vn_user[0] == '-'
+           || RCS_isdead (vers->srcfile, vers->vn_user))
+       {
+           if (rev1 != NULL)
+               free (rev1);
+           return;
+       }
+
+       /* If the user file has been marked for addition, or has been
+          locally modified, then we have a conflict which we can not
+          resolve.  No_Difference will already have been called in
+          this case, so comparing the timestamps is sufficient to
+          determine whether the file is locally modified.  */
+       if (strcmp (vers->vn_user, "0") == 0
+           || (vers->ts_user != NULL
+               && strcmp (vers->ts_user, vers->ts_rcs) != 0))
+       {
+           if (jdate2 != NULL)
+               error (0, 0,
+                      "file %s is locally modified, but has been removed in 
revision %s as of %s",
+                      finfo->fullname, jrev2, jdate2);
+           else
+               error (0, 0,
+                      "file %s is locally modified, but has been removed in 
revision %s",
+                      finfo->fullname, jrev2);
+
+           /* FIXME: Should we arrange to return a non-zero exit
+               status?  */
+
+           if (rev1 != NULL)
+               free (rev1);
+
+           return;
+       }
+
+       /* If only one join tag was specified, and the user file has
+           been changed since the greatest common ancestor (rev1),
+           then there is a conflict we can not resolve.  See above for
+           the rationale.  */
+       if (join_rev2 == NULL
+           && strcmp (rev1, vers->vn_user) != 0)
+       {
+           if (jdate2 != NULL)
+               error (0, 0,
+                      "file %s has been modified, but has been removed in 
revision %s as of %s",
+                      finfo->fullname, jrev2, jdate2);
+           else
+               error (0, 0,
+                      "file %s has been modified, but has been removed in 
revision %s",
+                      finfo->fullname, jrev2);
+
+           /* FIXME: Should we arrange to return a non-zero exit
+               status?  */
+
+           if (rev1 != NULL)
+               free (rev1);
+
+           return;
+       }
+
+       if (rev1 != NULL)
+           free (rev1);
+
+       /* The user file exists and has not been modified.  Mark it
+           for removal.  FIXME: If we are doing a checkout, this has
+           the effect of first checking out the file, and then
+           removing it.  It would be better to just register the
+           removal. 
+       
+          The same goes for a removal then an add.  e.g.
+          cvs up -rbr -jbr2 could remove and readd the same file
+        */
+       /* save the rev since server_updated might invalidate it */
+       mrev = Xasprintf ("-%s", vers->vn_user);
+#ifdef SERVER_SUPPORT
+       if (server_active)
+       {
+           server_scratch (finfo->file);
+           server_updated (finfo, vers, SERVER_UPDATED, (mode_t) -1,
+                           NULL, NULL);
+       }
+#endif
+       Register (finfo->entries, finfo->file, mrev, vers->ts_rcs,
+                 vers->options, vers->tag, vers->date, vers->ts_conflict);
+       free (mrev);
+       /* We need to check existence_error here because if we are
+           running as the server, and the file is up to date in the
+           working directory, the client will not have sent us a copy.  */
+       if (unlink_file (finfo->file) < 0 && ! existence_error (errno))
+           error (0, errno, "cannot remove file %s", finfo->fullname);
+#ifdef SERVER_SUPPORT
+       if (server_active)
+           server_checked_in (finfo->file, finfo->update_dir,
+                              finfo->repository);
+#endif
+       if (!really_quiet)
+           error (0, 0, "scheduling `%s' for removal", finfo->fullname);
+
+       return;
+    }
+
+    /* If the two merge revisions are the same, then there is nothing
+     * to do.  This needs to be checked before the rev2 == up-to-date base
+     * revision check tha comes next.  Otherwise, rev1 can == rev2 and get an
+     * "already contains the changes between <rev1> and <rev1>" message.
+     */
+    if (rev1 && strcmp (rev1, rev2) == 0)
+    {
+       free (rev1);
+       free (rev2);
+       return;
+    }
+
+    /* If we know that the user file is up-to-date, then it becomes an
+     * optimization to skip the merge when rev2 is the same as the base
+     * revision.  i.e. we know that diff3(file2,file1,file2) will produce
+     * file2.
+     */
+    if (vers->vn_user != NULL && vers->ts_user != NULL
+        && strcmp (vers->ts_user, vers->ts_rcs) == 0
+        && strcmp (rev2, vers->vn_user) == 0)
+    {
+       if (!quiet)
+       {
+           cvs_output ("`", 1);
+           cvs_output (finfo->fullname, 0);
+           cvs_output ("' already contains the differences between ", 0);
+           cvs_output (rev1 ? rev1 : "creation", 0);
+           cvs_output (" and ", 5);
+           cvs_output (rev2, 0);
+           cvs_output ("\n", 1);
+       }
+
+       if (rev1 != NULL)
+           free (rev1);
+       free (rev2);
+
+       return;
+    }
+
+    /* If rev1 is dead or does not exist, then the file was added
+       between rev1 and rev2.  */
+    if (rev1 == NULL || RCS_isdead (vers->srcfile, rev1))
+    {
+       if (rev1 != NULL)
+           free (rev1);
+       free (rev2);
+
+       /* If the file does not exist in the working directory, then
+           we can just check out the new revision and mark it for
+           addition.  */
+       if (vers->vn_user == NULL)
+       {
+           Vers_TS *xvers;
+           char *tempfile;
+
+           /* Use NULL for keyword expansion options.  Otherwise, when a
+              command like `cvs update -kk -jT1 -jT2' creates a new file
+              (because a file had the T2 tag, but not T1), the subsequent
+              commit of that just-added file effectively would set the
+              admin `-kk' option for that file in the repository.  */
+           xvers = Version_TS (finfo, NULL, jrev2, jdate2, 1, 0);
+
+           if (!really_quiet)
+               error (0, 0, "scheduling addition from revision %s of `%s'.",
+                      xvers->vn_rcs, finfo->fullname);
+
+           TRACE (TRACE_DATA, "Adding with keyword mode `%s'", xvers->options);
+
+           /* FIXME: If base_checkout fails, we should arrange to
+               return a non-zero exit status.  */
+           tempfile = temp_checkout (xvers->srcfile, finfo,
+                                     NULL, xvers->vn_rcs,
+                                     xvers->entdata
+                                     ? xvers->entdata->tag : NULL,
+                                     xvers->tag,
+                                     xvers->entdata
+                                     ? xvers->entdata->options : NULL,
+                                     xvers->options);
+           /* Added files are always writable until commit.  */
+           temp_copy (finfo, "ny", tempfile);
+           free (tempfile);
+
+           Register (finfo->entries, finfo->file, "0",
+                     "Result of merge", NULL, vers->tag, vers->date, NULL);
+           if (server_active)
+               /* No need to create a backup for an addition - if the file
+                * exists, the client will abort with a warning.
+                */
+               server_updated (finfo, vers, SERVER_UPDATED, (mode_t) -1,
+                               NULL, NULL);
+
+           freevers_ts (&xvers);
+           return;
+       }
+
+       /* The file currently exists in the working directory, so we
+           have a conflict which we can not resolve.  Note that this
+           is true even if the file is marked for addition or removal.  */
+
+       if (jdate2 != NULL)
+           error (0, 0,
+                  "file %s exists, but has been added in revision %s as of %s",
+                  finfo->fullname, jrev2, jdate2);
+       else
+           error (0, 0,
+                  "file %s exists, but has been added in revision %s",
+                  finfo->fullname, jrev2);
+
+       return;
+    }
+
+    /* If there is no working file, then we can't do the merge.  */
+    if (vers->vn_user == NULL || vers->vn_user[0] == '-')
+    {
+       free (rev1);
+       free (rev2);
+
+       if (jdate2 != NULL)
+           error (0, 0,
+                  "file %s does not exist, but is present in revision %s as of 
%s",
+                  finfo->fullname, jrev2, jdate2);
+       else
+           error (0, 0,
+                  "file %s does not exist, but is present in revision %s",
+                  finfo->fullname, jrev2);
+
+       /* FIXME: Should we arrange to return a non-zero exit status?  */
+
+       return;
+    }
+
+#ifdef SERVER_SUPPORT
+    if (server_active && !isreadable (finfo->file))
+    {
+       int retcode;
+       /* The file is up to date.  Need to check out the current contents.  */
+       /* FIXME - see the FIXME comment above the call to RCS_checkout in the
+        * patch_file function.
+        */
+       retcode = RCS_checkout (vers->srcfile, finfo->file,
+                               vers->vn_user, vers->tag,
+                               NULL, RUN_TTY, NULL, NULL);
+       if (retcode != 0)
+           error (1, 0,
+                  "failed to check out %s file", finfo->fullname);
+    }
+#endif
+
+    /*
+     * The users currently modified file is moved to a backup file name
+     * ".#filename.version", so that it will stay around for a few days
+     * before being automatically removed by some cron daemon.  The "version"
+     * is the version of the file that the user was most up-to-date with
+     * before the merge.
+     */
+    backup = Xasprintf ("%s%s.%s", BAKPREFIX, finfo->file, vers->vn_user);
+
+    if (unlink_file (backup) < 0
+       && !existence_error (errno))
+       error (0, errno, "cannot remove %s", backup);
+    copy_file (finfo->file, backup);
+    xchmod (finfo->file, 1);
+
+    t_options = vers->options;
+#if 0
+    if (*t_options == '\0')
+       t_options = "-kk";              /* to ignore keyword expansions */
+#endif
+
+    /* If the source of the merge is the same as the working file
+       revision, then we can just RCS_checkout the target (no merging
+       as such).  In the text file case, this is probably quite
+       similar to the RCS_merge, but in the binary file case,
+       RCS_merge gives all kinds of trouble.  */
+    replace_it =
+       vers->vn_user && !strcmp (rev1, vers->vn_user)
+       /* See comments above about how No_Difference has already been
+          called.  */
+       && vers->ts_user && !strcmp (vers->ts_user, vers->ts_rcs);
+
+    if (!strcmp (vers->options, "-kb")
+       || special_file_mismatch (finfo, rev1, rev2)
+       || replace_it)
+    {
+       if (!really_quiet)
+       {
+           /* Is there a better term than "nonmergeable file"?  What we
+              really mean is, not something that CVS cannot or does not
+              want to merge (there might be an external manual or
+              automatic merge process).  */
+           if (!replace_it)
+               error (0, 0, "Nonmergeable file needs merge.");
+           error (0, 0, "Replacing `%s' with contents of revision %s.",
+                  finfo->fullname, rev2);
+       }
+
+       /* FIXME: Verify my comment below:
+        *
+        * RCS_merge does nothing with keywords.  It merges the changes between
+        * two revisions without expanding the keywords (it might expand in
+        * -kk mode before computing the diff between rev1 and rev2 - I'm not
+        * sure).  In other words, the keyword lines in the current work file
+        * get left alone.
+        *
+        * Therfore, checking out the destination revision (rev2) is probably
+        * incorrect in the text case since we should see the keywords that were
+        * substituted into the original file at the time it was checked out
+        * and not the keywords from rev2.
+        *
+        * Also, it is safe to pass in NULL for nametag since we know no
+        * substitution is happening during the binary mode checkout.
+        */
+       if (base_checkout (finfo->rcs, finfo, vers->vn_user, rev2,
+                          vers->entdata->tag, vers->tag,
+                          vers->entdata->options, t_options) != 0)
+           error (1, 0, "Checkout of revision %s of `%s' failed.",
+                  rev2, finfo->fullname);
+
+       base_copy (finfo, rev2, "yy");
+
+       if (replace_it)
+       {
+           /* FIXME: It would be more consistent if the client printed this
+            * message when BASES.
+            */
+           if (!really_quiet && bases)
+               write_letter (finfo, 'M');
+           status = 0;
+       }
+       else
+       {
+           if (!really_quiet)
+           {
+               error (0, 0, "File from working directory is now in `%s'.",
+                      backup);
+           }
+           status = 1;
+       }
+    }
+    else
+       status = base_merge (finfo->rcs, finfo, vers->entdata->tag,
+                            vers->entdata->options, t_options,
+                            vers->vn_user, rev1, rev2, true);
+
+    if (status != 0)
+    {
+       if (status != 1)
+       {
+           error (0, status == -1 ? errno : 0,
+                  "could not merge revision %s of %s", rev2, finfo->fullname);
+           error (status == -1 ? 1 : 0, 0, "restoring %s from backup file %s",
+                  finfo->fullname, backup);
+           rename_file (backup, finfo->file);
+       }
+       else if (!really_quiet)
+           /* FIXME: It would be more consistent if the client printed
+            * this message when BASES.
+            */
+           write_letter (finfo, 'C');
+    }
+    else if (!bases) /* status == 0 */
+    {
+       bool unchanged, isbase;
+       char *basefile;
+       /* The client will handle these messages when BASES.  */
+
+       /* FIXME: the noexec case is broken.  RCS_merge could be doing the
+          xcmp on the temporary files without much hassle, I think.  */
+       if (!noexec && !xcmp (backup, finfo->file))
+           unchanged = true;
+       else
+           unchanged = false;
+       basefile = make_base_file_name (finfo->file, vers->vn_user);
+       if (!noexec
+           && ((isfile (basefile) && !xcmp (basefile, finfo->file))
+               || (strcmp (vers->vn_user, "0")
+                   && !RCS_cmp_file (finfo->rcs, vers->vn_user, NULL, NULL,
+                                     vers->options, finfo->file))))
+           isbase = true;
+       else
+           isbase = false;
+       free (basefile);
+       if (unchanged && !quiet)
+       {
+           cvs_output ("`", 1);
+           cvs_output (finfo->fullname, 0);
+           cvs_output ("' already contains the differences between ", 0);
+           cvs_output (rev1, 0);
+           cvs_output (" and ", 5);
+           cvs_output (rev2, 0);
+           cvs_output ("\n", 1);
+       }
+
+       if (!isbase && !really_quiet)
+           write_letter (finfo, 'M');
+
+       if (unchanged)
+           /* and skip the registering and sending the new file since it
+            * hasn't been updated.
+            */
+           goto out;
+    }
+
+    /* The file has changed, but if we just checked it out it may
+       still have the same timestamp it did when it was first
+       registered above in checkout_file.  We register it again with a
+       dummy timestamp to make sure that later runs of CVS will
+       recognize that it has changed.
+
+       We don't actually need to register again if we called
+       RCS_checkout above, and we aren't running as the server.
+       However, that is not the normal case, and calling Register
+       again won't cost much in that case.  */
+    RegisterMerge (finfo, vers, backup, status, false);
+
+out:
+    free (rev1);
+    free (rev2);
+    free (backup);
+}
+
+
+
+/*
+ * Report whether revisions REV1 and REV2 of FINFO agree on:
+ *   . file ownership
+ *   . permissions
+ *   . major and minor device numbers
+ *   . symbolic links
+ *   . hard links
+ *
+ * If either REV1 or REV2 is NULL, the working copy is used instead.
+ *
+ * Return 1 if the files differ on these data.
+ */
+
+int
+special_file_mismatch (struct file_info *finfo, char *rev1, char *rev2)
+{
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+    struct stat sb;
+    RCSVers *vp;
+    Node *n;
+    uid_t rev1_uid, rev2_uid;
+    gid_t rev1_gid, rev2_gid;
+    mode_t rev1_mode, rev2_mode;
+    unsigned long dev_long;
+    dev_t rev1_dev, rev2_dev;
+    char *rev1_symlink = NULL;
+    char *rev2_symlink = NULL;
+    List *rev1_hardlinks = NULL;
+    List *rev2_hardlinks = NULL;
+    int check_uids, check_gids, check_modes;
+    int result;
+
+    /* If we don't care about special file info, then
+       don't report a mismatch in any case. */
+    if (!preserve_perms)
+       return 0;
+
+    /* When special_file_mismatch is called from No_Difference, the
+       RCS file has been only partially parsed.  We must read the
+       delta tree in order to compare special file info recorded in
+       the delta nodes.  (I think this is safe. -twp) */
+    if (finfo->rcs->flags & PARTIAL)
+       RCS_reparsercsfile (finfo->rcs, NULL, NULL);
+
+    check_uids = check_gids = check_modes = 1;
+
+    /* Obtain file information for REV1.  If this is null, then stat
+       finfo->file and use that info. */
+    /* If a revision does not know anything about its status,
+       then presumably it doesn't matter, and indicates no conflict. */
+
+    if (rev1 == NULL)
+    {
+       ssize_t rsize;
+
+       if ((rsize = islink (finfo->file)) > 0)
+           rev1_symlink = Xreadlink (finfo->file, rsize);
+       else
+       {
+# ifdef HAVE_STRUCT_STAT_ST_RDEV
+           if (lstat (finfo->file, &sb) < 0)
+               error (1, errno, "could not get file information for %s",
+                      finfo->file);
+           rev1_uid = sb.st_uid;
+           rev1_gid = sb.st_gid;
+           rev1_mode = sb.st_mode;
+           if (S_ISBLK (rev1_mode) || S_ISCHR (rev1_mode))
+               rev1_dev = sb.st_rdev;
+# else
+           error (1, 0, "cannot handle device files on this system (%s)",
+                  finfo->file);
+# endif
+       }
+       rev1_hardlinks = list_linked_files_on_disk (finfo->file);
+    }
+    else
+    {
+       n = findnode (finfo->rcs->versions, rev1);
+       vp = n->data;
+
+       n = findnode (vp->other_delta, "symlink");
+       if (n != NULL)
+           rev1_symlink = xstrdup (n->data);
+       else
+       {
+           n = findnode (vp->other_delta, "owner");
+           if (n == NULL)
+               check_uids = 0; /* don't care */
+           else
+               rev1_uid = strtoul (n->data, NULL, 10);
+
+           n = findnode (vp->other_delta, "group");
+           if (n == NULL)
+               check_gids = 0; /* don't care */
+           else
+               rev1_gid = strtoul (n->data, NULL, 10);
+
+           n = findnode (vp->other_delta, "permissions");
+           if (n == NULL)
+               check_modes = 0;        /* don't care */
+           else
+               rev1_mode = strtoul (n->data, NULL, 8);
+
+           n = findnode (vp->other_delta, "special");
+           if (n == NULL)
+               rev1_mode |= S_IFREG;
+           else
+           {
+               /* If the size of `ftype' changes, fix the sscanf call also */
+               char ftype[16];
+               if (sscanf (n->data, "%15s %lu", ftype,
+                           &dev_long) < 2)
+                   error (1, 0, "%s:%s has bad `special' newphrase %s",
+                          finfo->file, rev1, (char *)n->data);
+               rev1_dev = dev_long;
+               if (strcmp (ftype, "character") == 0)
+                   rev1_mode |= S_IFCHR;
+               else if (strcmp (ftype, "block") == 0)
+                   rev1_mode |= S_IFBLK;
+               else
+                   error (0, 0, "%s:%s unknown file type `%s'",
+                          finfo->file, rev1, ftype);
+           }
+
+           rev1_hardlinks = vp->hardlinks;
+           if (rev1_hardlinks == NULL)
+               rev1_hardlinks = getlist();
+       }
+    }
+
+    /* Obtain file information for REV2. */
+    if (rev2 == NULL)
+    {
+       ssize_t rsize;
+
+       if ((rsize = islink (finfo->file)) > 0)
+           rev2_symlink = Xreadlink (finfo->file, rsize);
+       else
+       {
+# ifdef HAVE_STRUCT_STAT_ST_RDEV
+           if (lstat (finfo->file, &sb) < 0)
+               error (1, errno, "could not get file information for %s",
+                      finfo->file);
+           rev2_uid = sb.st_uid;
+           rev2_gid = sb.st_gid;
+           rev2_mode = sb.st_mode;
+           if (S_ISBLK (rev2_mode) || S_ISCHR (rev2_mode))
+               rev2_dev = sb.st_rdev;
+# else
+           error (1, 0, "cannot handle device files on this system (%s)",
+                  finfo->file);
+# endif
+       }
+       rev2_hardlinks = list_linked_files_on_disk (finfo->file);
+    }
+    else
+    {
+       n = findnode (finfo->rcs->versions, rev2);
+       vp = n->data;
+
+       n = findnode (vp->other_delta, "symlink");
+       if (n != NULL)
+           rev2_symlink = xstrdup (n->data);
+       else
+       {
+           n = findnode (vp->other_delta, "owner");
+           if (n == NULL)
+               check_uids = 0; /* don't care */
+           else
+               rev2_uid = strtoul (n->data, NULL, 10);
+
+           n = findnode (vp->other_delta, "group");
+           if (n == NULL)
+               check_gids = 0; /* don't care */
+           else
+               rev2_gid = strtoul (n->data, NULL, 10);
+
+           n = findnode (vp->other_delta, "permissions");
+           if (n == NULL)
+               check_modes = 0;        /* don't care */
+           else
+               rev2_mode = strtoul (n->data, NULL, 8);
+
+           n = findnode (vp->other_delta, "special");
+           if (n == NULL)
+               rev2_mode |= S_IFREG;
+           else
+           {
+               /* If the size of `ftype' changes, fix the sscanf call also */
+               char ftype[16];
+               if (sscanf (n->data, "%15s %lu", ftype,
+                           &dev_long) < 2)
+                   error (1, 0, "%s:%s has bad `special' newphrase %s",
+                          finfo->file, rev2, (char *)n->data);
+               rev2_dev = dev_long;
+               if (strcmp (ftype, "character") == 0)
+                   rev2_mode |= S_IFCHR;
+               else if (strcmp (ftype, "block") == 0)
+                   rev2_mode |= S_IFBLK;
+               else
+                   error (0, 0, "%s:%s unknown file type `%s'",
+                          finfo->file, rev2, ftype);
+           }
+
+           rev2_hardlinks = vp->hardlinks;
+           if (rev2_hardlinks == NULL)
+               rev2_hardlinks = getlist();
+       }
+    }
+
+    /* Check the user/group ownerships and file permissions, printing
+       an error for each mismatch found.  Return 0 if all characteristics
+       matched, and 1 otherwise. */
+
+    result = 0;
+
+    /* Compare symlinks first, since symlinks are simpler (don't have
+       any other characteristics). */
+    if (rev1_symlink != NULL && rev2_symlink == NULL)
+    {
+       error (0, 0, "%s is a symbolic link",
+              (rev1 == NULL ? "working file" : rev1));
+       result = 1;
+    }
+    else if (rev1_symlink == NULL && rev2_symlink != NULL)
+    {
+       error (0, 0, "%s is a symbolic link",
+              (rev2 == NULL ? "working file" : rev2));
+       result = 1;
+    }
+    else if (rev1_symlink != NULL)
+       result = (strcmp (rev1_symlink, rev2_symlink) == 0);
+    else
+    {
+       /* Compare user ownership. */
+       if (check_uids && rev1_uid != rev2_uid)
+       {
+           error (0, 0, "%s: owner mismatch between %s and %s",
+                  finfo->file,
+                  (rev1 == NULL ? "working file" : rev1),
+                  (rev2 == NULL ? "working file" : rev2));
+           result = 1;
+       }
+
+       /* Compare group ownership. */
+       if (check_gids && rev1_gid != rev2_gid)
+       {
+           error (0, 0, "%s: group mismatch between %s and %s",
+                  finfo->file,
+                  (rev1 == NULL ? "working file" : rev1),
+                  (rev2 == NULL ? "working file" : rev2));
+           result = 1;
+       }
+    
+       /* Compare permissions. */
+       if (check_modes &&
+           (rev1_mode & 07777) != (rev2_mode & 07777))
+       {
+           error (0, 0, "%s: permission mismatch between %s and %s",
+                  finfo->file,
+                  (rev1 == NULL ? "working file" : rev1),
+                  (rev2 == NULL ? "working file" : rev2));
+           result = 1;
+       }
+
+       /* Compare device file characteristics. */
+       if ((rev1_mode & S_IFMT) != (rev2_mode & S_IFMT))
+       {
+           error (0, 0, "%s: %s and %s are different file types",
+                  finfo->file,
+                  (rev1 == NULL ? "working file" : rev1),
+                  (rev2 == NULL ? "working file" : rev2));
+           result = 1;
+       }
+       else if (S_ISBLK (rev1_mode))
+       {
+           if (rev1_dev != rev2_dev)
+           {
+               error (0, 0, "%s: device numbers of %s and %s do not match",
+                      finfo->file,
+                      (rev1 == NULL ? "working file" : rev1),
+                      (rev2 == NULL ? "working file" : rev2));
+               result = 1;
+           }
+       }
+
+       /* Compare hard links. */
+       if (compare_linkage_lists (rev1_hardlinks, rev2_hardlinks) == 0)
+       {
+           error (0, 0, "%s: hard linkage of %s and %s do not match",
+                  finfo->file,
+                  (rev1 == NULL ? "working file" : rev1),
+                  (rev2 == NULL ? "working file" : rev2));
+           result = 1;
+       }
+    }
+
+    if (rev1_symlink != NULL)
+       free (rev1_symlink);
+    if (rev2_symlink != NULL)
+       free (rev2_symlink);
+    if (rev1_hardlinks != NULL)
+       dellist (&rev1_hardlinks);
+    if (rev2_hardlinks != NULL)
+       dellist (&rev2_hardlinks);
+
+    return result;
+#else
+    return 0;
+#endif
+}
+
+
+
+int
+joining (void)
+{
+    return join_rev1 || join_date1;
+}
Index: ccvs/src/vers_ts.c
diff -u /dev/null ccvs/src/vers_ts.c:1.65.6.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/vers_ts.c  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,469 @@
+/*
+ * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+ *
+ * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+ *                                  and others.
+ *
+ * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
+ * Portions Copyright (C) 1989-1992, Brian Berliner
+ * 
+ * You may distribute under the terms of the GNU General Public License as
+ * specified in the README file that comes with the CVS source distribution.
+ */
+
+#include "cvs.h"
+#include "lstat.h"
+
+#ifdef SERVER_SUPPORT
+static void time_stamp_server (const char *, Vers_TS *, Entnode *);
+#endif
+
+/* Fill in and return a Vers_TS structure for the file FINFO.
+ *
+ * INPUTS
+ *   finfo             struct file_info data about the file to be examined.
+ *   options           Keyword expansion options, I think generally from the
+ *                     command line.  Can be either NULL or "" to indicate
+ *                     none are specified here.
+ *   tag               Tag specified by user on the command line (via -r).
+ *   date              Date specified by user on the command line (via -D).
+ *   force_tag_match   If set and TAG is specified, will only set RET->vn_rcs
+ *                     based on TAG.  Otherwise, if TAG is specified and does
+ *                     not exist in the file, RET->vn_rcs will be set to the
+ *                     head revision.
+ *   set_time          If set, set the last modification time of the user file
+ *                     specified by FINFO to the checkin time of RET->vn_rcs.
+ *
+ * RETURNS
+ *   Vers_TS structure for FINFO.
+ */
+Vers_TS *
+Version_TS (struct file_info *finfo, char *options, char *tag, char *date,
+            int force_tag_match, int set_time)
+{
+    Node *p;
+    RCSNode *rcsdata;
+    Vers_TS *vers_ts;
+    struct stickydirtag *sdtp;
+    Entnode *entdata;
+    char *rcsexpand = NULL;
+
+    TRACE (TRACE_FUNCTION, "Version_TS (%s, %s, %s, %s, %d, %d)",
+          finfo->fullname, options ? options : "(null)", tag ? tag : "(null)",
+          date ? date : "(null)", force_tag_match, set_time);
+
+    /* get a new Vers_TS struct */
+
+    vers_ts = xmalloc (sizeof (Vers_TS));
+    memset (vers_ts, 0, sizeof (*vers_ts));
+
+    /*
+     * look up the entries file entry and fill in the version and timestamp
+     * if entries is NULL, there is no entries file so don't bother trying to
+     * look it up (used by checkout -P)
+     */
+    if (finfo->entries == NULL)
+    {
+       sdtp = NULL;
+       p = NULL;
+    }
+    else
+    {
+       p = findnode_fn (finfo->entries, finfo->file);
+       sdtp = finfo->entries->list->data; /* list-private */
+    }
+
+    if (p == NULL)
+    {
+       TRACE (TRACE_DATA, "Version_TS: No entries data found.");
+       entdata = NULL;
+    }
+    else
+    {
+       entdata = p->data;
+
+       if (entdata->type == ENT_SUBDIR)
+       {
+           /* According to cvs.texinfo, the various fields in the Entries
+              file for a directory (other than the name) do not have a
+              defined meaning.  We need to pass them along without getting
+              confused based on what is in them.  Therefore we make sure
+              not to set vn_user and the like from Entries, add.c and
+              perhaps other code will expect these fields to be NULL for
+              a directory.  */
+           vers_ts->entdata = entdata;
+       }
+       else
+#ifdef SERVER_SUPPORT
+       /* An entries line with "D" in the timestamp indicates that the
+          client sent Is-modified without sending Entry.  So we want to
+          use the entries line for the sole purpose of telling
+          time_stamp_server what is up; we don't want the rest of CVS
+          to think there is an entries line.  */
+       if (strcmp (entdata->timestamp, "D") != 0)
+#endif
+       {
+           vers_ts->vn_user = xstrdup (entdata->version);
+           vers_ts->ts_rcs = xstrdup (entdata->timestamp);
+           vers_ts->ts_conflict = xstrdup (entdata->conflict);
+           if (!(tag || date) && !(sdtp && sdtp->aflag))
+           {
+               vers_ts->tag = xstrdup (entdata->tag);
+               vers_ts->date = xstrdup (entdata->date);
+           }
+           vers_ts->entdata = entdata;
+       }
+       /* Even if we don't have an "entries line" as such
+          (vers_ts->entdata), we want to pick up options which could
+          have been from a Kopt protocol request.  */
+       if (!options || *options == '\0')
+       {
+           if (!(sdtp && sdtp->aflag))
+               vers_ts->options = xstrdup (entdata->options);
+       }
+    }
+
+    /* Always look up the RCS keyword mode when we have an RCS archive.  It
+     * will either be needed as a default or to avoid allowing the -k options
+     * specified on the command line from overriding binary mode (-kb).
+     */
+    if (finfo->rcs != NULL)
+       rcsexpand = RCS_getexpand (finfo->rcs);
+
+    /*
+     * -k options specified on the command line override (and overwrite)
+     * options stored in the entries file and default options from the RCS
+     * archive, except for binary mode (-kb).
+     */
+    if (options && *options != '\0')
+    {
+       if (vers_ts->options != NULL)
+           free (vers_ts->options);
+       if (rcsexpand != NULL && strcmp (rcsexpand, "b") == 0)
+           vers_ts->options = xstrdup ("-kb");
+       else
+           vers_ts->options = xstrdup (options);
+    }
+    else if ((!vers_ts->options || *vers_ts->options == '\0')
+             && rcsexpand != NULL)
+    {
+       /* If no keyword expansion was specified on command line,
+          use whatever was in the rcs file (if there is one).  This
+          is how we, if we are the server, tell the client whether
+          a file is binary.  */
+       if (vers_ts->options != NULL)
+           free (vers_ts->options);
+       vers_ts->options = xmalloc (strlen (rcsexpand) + 3);
+       strcpy (vers_ts->options, "-k");
+       strcat (vers_ts->options, rcsexpand);
+    }
+    if (!vers_ts->options)
+       vers_ts->options = xstrdup ("");
+
+    /*
+     * if tags were specified on the command line, they override what is in
+     * the Entries file
+     */
+    if (tag || date)
+    {
+       vers_ts->tag = xstrdup (tag);
+       vers_ts->date = xstrdup (date);
+    }
+    else if (!vers_ts->entdata && (sdtp && sdtp->aflag == 0))
+    {
+       if (!vers_ts->tag)
+       {
+           vers_ts->tag = xstrdup (sdtp->tag);
+           vers_ts->nonbranch = sdtp->nonbranch;
+       }
+       if (!vers_ts->date)
+           vers_ts->date = xstrdup (sdtp->date);
+    }
+
+    /* Now look up the info on the source controlled file */
+    if (finfo->rcs != NULL)
+    {
+       rcsdata = finfo->rcs;
+       rcsdata->refcount++;
+    }
+    else if (finfo->repository != NULL)
+       rcsdata = RCS_parse (finfo->file, finfo->repository);
+    else
+       rcsdata = NULL;
+
+    if (rcsdata != NULL)
+    {
+       /* squirrel away the rcsdata pointer for others */
+       vers_ts->srcfile = rcsdata;
+
+       if (vers_ts->tag && strcmp (vers_ts->tag, TAG_BASE) == 0)
+       {
+           vers_ts->vn_rcs = xstrdup (vers_ts->vn_user);
+           vers_ts->vn_tag = xstrdup (vers_ts->vn_user);
+       }
+       else
+       {
+           int simple;
+
+           vers_ts->vn_rcs = RCS_getversion (rcsdata, vers_ts->tag,
+                                             vers_ts->date, force_tag_match,
+                                             &simple);
+           if (vers_ts->vn_rcs == NULL)
+               vers_ts->vn_tag = NULL;
+           else if (simple)
+               vers_ts->vn_tag = xstrdup (vers_ts->tag);
+           else
+               vers_ts->vn_tag = xstrdup (vers_ts->vn_rcs);
+       }
+
+       /*
+        * If the source control file exists and has the requested revision,
+        * get the Date the revision was checked in.  If "user" exists, set
+        * its mtime.
+        */
+       if (set_time && vers_ts->vn_rcs != NULL)
+       {
+#ifdef SERVER_SUPPORT
+           if (server_active)
+               server_modtime (finfo, vers_ts);
+           else
+#endif
+           {
+               struct utimbuf t;
+
+               memset (&t, 0, sizeof (t));
+               t.modtime = RCS_getrevtime (rcsdata, vers_ts->vn_rcs, 0, 0);
+               if (t.modtime != (time_t) -1)
+               {
+#ifdef UTIME_EXPECTS_WRITABLE
+                   int change_it_back = 0;
+#endif
+
+                   (void) time (&t.actime);
+
+#ifdef UTIME_EXPECTS_WRITABLE
+                   if (!iswritable (finfo->file))
+                   {
+                       xchmod (finfo->file, 1);
+                       change_it_back = 1;
+                   }
+#endif  /* UTIME_EXPECTS_WRITABLE  */
+
+                   /* This used to need to ignore existence_errors
+                      (for cases like where update.c now clears
+                      set_time if noexec, but didn't used to).  I
+                      think maybe now it doesn't (server_modtime does
+                      not like those kinds of cases).  */
+                   (void) utime (finfo->file, &t);
+
+#ifdef UTIME_EXPECTS_WRITABLE
+                   if (change_it_back)
+                       xchmod (finfo->file, 0);
+#endif  /*  UTIME_EXPECTS_WRITABLE  */
+               }
+           }
+       }
+    }
+
+    /* get user file time-stamp in ts_user */
+    if (finfo->entries != NULL)
+    {
+#ifdef SERVER_SUPPORT
+       if (server_active)
+           time_stamp_server (finfo->file, vers_ts, entdata);
+       else
+#endif
+           vers_ts->ts_user = time_stamp (finfo->file);
+    }
+
+    return (vers_ts);
+}
+
+
+
+#ifdef SERVER_SUPPORT
+
+/* Set VERS_TS->TS_USER to time stamp for FILE.  */
+
+/* Separate these out to keep the logic below clearer.  */
+#define mark_lost(V)           ((V)->ts_user = 0)
+#define mark_unchanged(V)      ((V)->ts_user = xstrdup ((V)->ts_rcs))
+
+static void
+time_stamp_server (const char *file, Vers_TS *vers_ts, Entnode *entdata)
+{
+    struct stat sb;
+    char *cp;
+
+    TRACE (TRACE_FUNCTION, "time_stamp_server (%s, %s, %s, %s)",
+          file,
+          entdata && entdata->version ? entdata->version : "(null)",
+          entdata && entdata->timestamp ? entdata->timestamp : "(null)",
+          entdata && entdata->conflict ? entdata->conflict : "(null)");
+
+    if (lstat (file, &sb) < 0)
+    {
+       if (! existence_error (errno))
+           error (1, errno, "cannot stat temp file");
+
+       /* Missing file means lost or unmodified; check entries
+          file to see which.
+
+          XXX FIXME - If there's no entries file line, we
+          wouldn't be getting the file at all, so consider it
+          lost.  I don't know that that's right, but it's not
+          clear to me that either choice is.  Besides, would we
+          have an RCS string in that case anyways?  */
+       if (entdata == NULL)
+           mark_lost (vers_ts);
+       else if (entdata->timestamp
+                && entdata->timestamp[0] == '='
+                && entdata->timestamp[1] == '\0')
+           mark_unchanged (vers_ts);
+       else if (entdata->conflict
+                && entdata->conflict[0] == '=')
+       {
+           /* These just need matching content.  Might as well minimize it.  */
+           vers_ts->ts_user = xstrdup ("");
+           vers_ts->ts_conflict = xstrdup ("");
+       }
+       else if (entdata->timestamp
+                && (entdata->timestamp[0] == 'M'
+                    || entdata->timestamp[0] == 'D')
+                && entdata->timestamp[1] == '\0')
+           vers_ts->ts_user = xstrdup ("Is-modified");
+       else
+           mark_lost (vers_ts);
+    }
+    else if (sb.st_mtime == 0)
+    {
+       /* We shouldn't reach this case any more!  */
+       abort ();
+    }
+    else
+    {
+        struct tm *tm_p;
+
+       vers_ts->ts_user = xmalloc (25);
+       /* We want to use the same timestamp format as is stored in the
+          st_mtime.  For unix (and NT I think) this *must* be universal
+          time (UT), so that files don't appear to be modified merely
+          because the timezone has changed.  For VMS, or hopefully other
+          systems where gmtime returns NULL, the modification time is
+          stored in local time, and therefore it is not possible to cause
+          st_mtime to be out of sync by changing the timezone.  */
+       tm_p = gmtime (&sb.st_mtime);
+       cp = tm_p ? asctime (tm_p) : ctime (&sb.st_mtime);
+       cp[24] = 0;
+       /* Fix non-standard format.  */
+       if (cp[8] == '0') cp[8] = ' ';
+       (void) strcpy (vers_ts->ts_user, cp);
+    }
+}
+
+#endif /* SERVER_SUPPORT */
+
+
+
+/* Given a UNIX seconds since the epoch, return a string in the format used by
+ * the Entries file.
+ *
+ *
+ * INPUTS
+ *   UNIXTIME  The timestamp to be formatted.
+ *
+ * RETURNS
+ *   A freshly allocated string the caller is responsible for disposing of.
+ */
+char *
+entries_time (time_t unixtime)
+{
+    struct tm *tm_p;
+    char *cp;
+
+    /* We want to use the same timestamp format as is stored in the
+       st_mtime.  For unix (and NT I think) this *must* be universal
+       time (UT), so that files don't appear to be modified merely
+       because the timezone has changed.  For VMS, or hopefully other
+       systems where gmtime returns NULL, the modification time is
+       stored in local time, and therefore it is not possible to cause
+       st_mtime to be out of sync by changing the timezone.  */
+    tm_p = gmtime (&unixtime);
+    cp = tm_p ? asctime (tm_p) : ctime (&unixtime);
+    /* Get rid of the EOL */
+    cp[24] = '\0';
+    /* Fix non-standard format.  */
+    if (cp[8] == '0') cp[8] = ' ';
+
+    return Xasprintf ("%s", cp);
+}
+
+
+
+time_t
+unix_time_stamp (const char *file)
+{
+    struct stat sb;
+    time_t mtime = 0L;
+
+    if (!lstat (file, &sb))
+    {
+       mtime = sb.st_mtime;
+    }
+
+    /* If it's a symlink, return whichever is the newest mtime of
+       the link and its target, for safety.
+    */
+    if (!stat (file, &sb))
+    {
+        if (mtime < sb.st_mtime)
+           mtime = sb.st_mtime;
+    }
+
+    return mtime;
+}
+
+
+
+/*
+ * Gets the time-stamp for the file "file" and returns it in space it
+ * allocates
+ */
+char *
+time_stamp (const char *file)
+{
+    time_t mtime = unix_time_stamp (file);
+    return mtime ? entries_time (mtime) : NULL;
+}
+
+
+
+/*
+ * free up a Vers_TS struct
+ */
+void
+freevers_ts (Vers_TS **versp)
+{
+    if ((*versp)->srcfile)
+       freercsnode (&((*versp)->srcfile));
+    if ((*versp)->vn_user)
+       free ((*versp)->vn_user);
+    if ((*versp)->vn_rcs)
+       free ((*versp)->vn_rcs);
+    if ((*versp)->vn_tag)
+       free ((*versp)->vn_tag);
+    if ((*versp)->ts_user)
+       free ((*versp)->ts_user);
+    if ((*versp)->ts_rcs)
+       free ((*versp)->ts_rcs);
+    if ((*versp)->options)
+       free ((*versp)->options);
+    if ((*versp)->tag)
+       free ((*versp)->tag);
+    if ((*versp)->date)
+       free ((*versp)->date);
+    if ((*versp)->ts_conflict)
+       free ((*versp)->ts_conflict);
+    free ((char *) *versp);
+    *versp = NULL;
+}
Index: ccvs/src/vers_ts.h
diff -u /dev/null ccvs/src/vers_ts.h:1.1.4.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/vers_ts.h  Wed Dec 21 13:25:10 2005
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2005 The 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
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef VERS_TS_H
+#define VERS_TS_H
+
+#include "entries.h"
+#include "rcs.h"
+
+struct vers_ts
+{
+    /* rcs version user file derives from, from CVS/Entries.
+       It can have the following special values:
+
+       NULL = file is not mentioned in Entries (this is also used for a
+             directory).
+       "" = INVALID!  The comment used to say that it meant "no user file"
+           but as far as I know CVS didn't actually use it that way.
+           Note that according to cvs.texinfo, "" is not valid in the
+           Entries file.
+       0 = user file is new
+       -vers = user file to be removed.  */
+    char *vn_user;
+
+    /* Numeric revision number corresponding to ->vn_tag (->vn_tag
+       will often be symbolic).  */
+    char *vn_rcs;
+    /* If ->tag is a simple tag in the RCS file--a tag which really
+       exists which is not a magic revision--and if ->date is NULL,
+       then this is a copy of ->tag.  Otherwise, it is a copy of
+       ->vn_rcs.  */
+    char *vn_tag;
+
+    /* This is the timestamp from stating the file in the working directory.
+       It is NULL if there is no file in the working directory.  It is
+       "Is-modified" if we know the file is modified but don't have its
+       contents.  */
+    char *ts_user;
+    /* Timestamp from CVS/Entries.  For the server, ts_user and ts_rcs
+       are computed in a slightly different way, but the fact remains that
+       if they are equal the file in the working directory is unmodified
+       and if they differ it is modified.  */
+    char *ts_rcs;
+
+    /* Options from CVS/Entries (keyword expansion), malloc'd.  If none,
+       then it is an empty string (never NULL).  */
+    char *options;
+
+    /* If non-NULL, there was a conflict (or merely a merge?  See merge_file)
+       and the time stamp in this field is the time stamp of the working
+       directory file which was created with the conflict markers in it.
+       This is from CVS/Entries.  */
+    char *ts_conflict;
+
+    /* Tag specified on the command line, or if none, tag stored in
+       CVS/Entries.  */
+    char *tag;
+    /* Date specified on the command line, or if none, date stored in
+       CVS/Entries.  */
+    char *date;
+    /* If this is 1, then tag is not a branch tag.  If this is 0, then
+       tag may or may not be a branch tag.  */
+    int nonbranch;
+
+    /* Pointer to entries file node  */
+    Entnode *entdata;
+
+    /* Pointer to parsed src file info */
+    RCSNode *srcfile;
+};
+typedef struct vers_ts Vers_TS;
+
+#endif /* VERS_TS_H */
Index: ccvs/src/zlib.c
diff -u /dev/null ccvs/src/zlib.c:1.32.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/src/zlib.c     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,839 @@
+/* zlib.c --- interface to the zlib compression library
+   Ian Lance Taylor <address@hidden>
+
+   This file is part of GNU CVS.
+
+   GNU CVS 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.
+
+   This program 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.  */
+
+/* The routines in this file are the interface between the CVS
+   client/server support and the zlib compression library.  */
+
+#include "cvs.h"
+#include "buffer.h"
+#include "pagealign_alloc.h"
+
+#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
+
+#if HAVE_ZLIB_H
+# include <zlib.h>
+#else
+# include "zlib.h"
+#endif
+
+/* OS/2 doesn't have EIO.  FIXME: this whole notion of turning
+   a different error into EIO strikes me as pretty dubious.  */
+#if !defined (EIO)
+#define EIO EBADPOS
+#endif
+
+/* The compression interface is built upon the buffer data structure.
+   We provide a buffer type which compresses or decompresses the data
+   which passes through it.  An input buffer decompresses the data
+   read from an underlying buffer, and an output buffer compresses the
+   data before writing it to an underlying buffer.  */
+
+/* This structure is the closure field of the buffer.  */
+
+struct compress_buffer
+{
+    /* The underlying buffer.  */
+    struct buffer *buf;
+
+    /* The compression information.  */
+    z_stream zstr;
+    int level;
+};
+
+static void compress_error (int, int, z_stream *, const char *);
+static int compress_buffer_input (void *, char *, size_t, size_t, size_t *);
+static int compress_buffer_output (void *, const char *, size_t, size_t *);
+static int compress_buffer_flush (void *);
+static int compress_buffer_block (void *, bool);
+static int compress_buffer_get_fd (void *);
+static int compress_buffer_shutdown_input (struct buffer *);
+static int compress_buffer_shutdown_output (struct buffer *);
+
+/* Report an error from one of the zlib functions.  */
+
+static void
+compress_error (int status, int zstatus, z_stream *zstr, const char *msg)
+{
+    int hold_errno;
+    const char *zmsg;
+    char buf[100];
+
+    hold_errno = errno;
+
+    zmsg = zstr->msg;
+    if (zmsg == NULL)
+    {
+        sprintf (buf, "error %d", zstatus);
+       zmsg = buf;
+    }
+
+    error (status,
+          zstatus == Z_ERRNO ? hold_errno : 0,
+          "%s: %s", msg, zmsg);
+}
+
+
+
+/* Create a compression buffer.  */
+struct buffer *
+compress_buffer_initialize (struct buffer *buf, int input, int level,
+                            void (*memory) (struct buffer *))
+{
+    struct compress_buffer *n;
+    int zstatus;
+
+    n = xmalloc (sizeof *n);
+    memset (n, 0, sizeof *n);
+
+    n->buf = buf;
+    n->level = level;
+
+    if (input)
+       zstatus = inflateInit (&n->zstr);
+    else
+       zstatus = deflateInit (&n->zstr, level);
+    if (zstatus != Z_OK)
+       compress_error (1, zstatus, &n->zstr, "compression initialization");
+
+    /* There may already be data buffered on BUF.  For an output
+       buffer, this is OK, because these routines will just use the
+       buffer routines to append data to the (uncompressed) data
+       already on BUF.  An input buffer expects to handle a single
+       buffer_data of buffered input to be uncompressed, so that is OK
+       provided there is only one buffer.  At present that is all
+       there ever will be; if this changes, compress_buffer_input must
+       be modified to handle multiple input buffers.  */
+    assert (! input || buf->data == NULL || buf->data->next == NULL);
+
+    return buf_initialize (input ? compress_buffer_input : NULL,
+                          input ? NULL : compress_buffer_output,
+                          input ? NULL : compress_buffer_flush,
+                          compress_buffer_block, compress_buffer_get_fd,
+                          (input
+                           ? compress_buffer_shutdown_input
+                           : compress_buffer_shutdown_output),
+                          memory,
+                          n);
+}
+
+
+
+/* Input data from a compression buffer.  */
+static int
+compress_buffer_input (void *closure, char *data, size_t need, size_t size,
+                      size_t *got)
+{
+    struct compress_buffer *cb = closure;
+    struct buffer_data *bd;
+
+    assert (cb->buf->input);
+
+    /* We use a single buffer_data structure to buffer up data which
+       the z_stream structure won't use yet.  We can safely store this
+       on cb->buf->data, because we never call the buffer routines on
+       cb->buf; we only call the buffer input routine, since that
+       gives us the semantics we want.  As noted in
+       compress_buffer_initialize, the buffer_data structure may
+       already exist, and hold data which was already read and
+       buffered before the decompression began.  */
+    bd = cb->buf->data;
+    if (bd == NULL)
+    {
+       bd = xmalloc (sizeof (struct buffer_data));
+       if (bd == NULL)
+           return -2;
+       bd->text = pagealign_xalloc (BUFFER_DATA_SIZE);
+       if (bd->text == NULL)
+       {
+           free (bd);
+           return -2;
+       }
+       bd->bufp = bd->text;
+       bd->size = 0;
+       cb->buf->data = bd;
+    }
+
+    cb->zstr.avail_out = size;
+    cb->zstr.next_out = (Bytef *) data;
+
+    while (1)
+    {
+       int zstatus, sofar, status;
+       size_t nread;
+
+       /* First try to inflate any data we already have buffered up.
+          This is useful even if we don't have any buffered data,
+          because there may be data buffered inside the z_stream
+          structure.  */
+
+       cb->zstr.avail_in = bd->size;
+       cb->zstr.next_in = (Bytef *) bd->bufp;
+
+       do
+       {
+           zstatus = inflate (&cb->zstr, Z_NO_FLUSH);
+           if (zstatus == Z_STREAM_END)
+               break;
+           if (zstatus != Z_OK && zstatus != Z_BUF_ERROR)
+           {
+               compress_error (0, zstatus, &cb->zstr, "inflate");
+               return EIO;
+           }
+       } while (cb->zstr.avail_in > 0
+                && cb->zstr.avail_out > 0);
+
+       bd->size = cb->zstr.avail_in;
+       bd->bufp = (char *) cb->zstr.next_in;
+
+       sofar = size - cb->zstr.avail_out;
+
+       if (zstatus == Z_STREAM_END)
+       {
+           /* If we read any data, then return it, relying on the fact that
+            * we will get Z_STREAM_END on the next read too.
+            */
+           if (sofar > 0) break;
+
+           /* Otherwise, return EOF.  */
+           return -1;
+       }
+
+       /* If we have obtained NEED bytes, then return, unless NEED is
+           zero and we haven't obtained anything at all.  If NEED is
+           zero, we will attempt at least one nonblocking read and see if
+          we can inflate anything then.  */
+       if (sofar > 0 && sofar >= need)
+           break;
+
+       /* All our buffered data should have been processed at this
+           point.  */
+       assert (bd->size == 0);
+
+       /* On the server, this will do an unblocking read of as much data as is
+        * available.  On the client, with a blocking input descriptor and the
+        * current fd_buffer implementation, this should read as much data as
+        * is currently available, and at least 1 byte (or EOF), from the
+        * underlying buffer.
+        */
+       status = (*cb->buf->input) (cb->buf->closure, bd->text,
+                                   need ? 1 : 0, BUFFER_DATA_SIZE, &nread);
+
+       if (status == -2)
+           /* Don't try to recover from memory allcoation errors.  */
+           return status;
+
+       if (status != 0)
+       {
+           /* If we read any data, then return it, relying on the fact that
+            * we will get the same error reading the underlying buffer
+            * on the next read too.
+            */
+           if (sofar > 0) break;
+
+           /* Otherwise, return EOF.  */
+           return status;
+       }
+
+       /* If we didn't read anything, then presumably the buffer is
+           in nonblocking mode, and we should just get out now with
+           whatever we've inflated.  */
+       if (nread == 0)
+       {
+           assert (need == 0);
+           break;
+       }
+
+       bd->bufp = bd->text;
+       bd->size = nread;
+    }
+
+    *got = size - cb->zstr.avail_out;
+
+    return 0;
+}
+
+
+
+extern int gzip_level;
+
+/* Output data to a compression buffer.
+ *
+ * GLOBALS
+ *   gzip_level                If GZIP_LEVEL has changed to a value different 
from
+ *                     CLOSURE->level, then set the compression level on the
+ *                     stream to the new value.
+ */
+static int
+compress_buffer_output (void *closure, const char *data, size_t have,
+                       size_t *wrote)
+{
+    struct compress_buffer *cb = closure;
+
+    /* This is only used within the while loop below, but allocated here for
+     * efficiency.
+     */
+    static char *buffer = NULL;
+    if (!buffer)
+       buffer = pagealign_xalloc (BUFFER_DATA_SIZE);
+
+    if (cb->level != gzip_level)
+    {
+       cb->level = gzip_level;
+       deflateParams (&cb->zstr, gzip_level, Z_DEFAULT_STRATEGY);
+    }
+
+    cb->zstr.avail_in = have;
+    cb->zstr.next_in = (unsigned char *) data;
+
+    while (cb->zstr.avail_in > 0)
+    {
+       int zstatus;
+
+       cb->zstr.avail_out = BUFFER_DATA_SIZE;
+       cb->zstr.next_out = (unsigned char *) buffer;
+
+       zstatus = deflate (&cb->zstr, Z_NO_FLUSH);
+       if (zstatus != Z_OK)
+       {
+           compress_error (0, zstatus, &cb->zstr, "deflate");
+           return EIO;
+       }
+
+       if (cb->zstr.avail_out != BUFFER_DATA_SIZE)
+           buf_output (cb->buf, buffer,
+                       BUFFER_DATA_SIZE - cb->zstr.avail_out);
+    }
+
+    *wrote = have;
+
+    /* We will only be here because buf_send_output was called on the
+       compression buffer.  That means that we should now call
+       buf_send_output on the underlying buffer.  */
+    return buf_send_output (cb->buf);
+}
+
+
+
+/* Flush a compression buffer.  */
+static int
+compress_buffer_flush (void *closure)
+{
+    struct compress_buffer *cb = closure;
+
+    /* This is only used within the while loop below, but allocated here for
+     * efficiency.
+     */
+    static char *buffer = NULL;
+    if (!buffer)
+       buffer = pagealign_xalloc (BUFFER_DATA_SIZE);
+
+    cb->zstr.avail_in = 0;
+    cb->zstr.next_in = NULL;
+
+    while (1)
+    {
+       int zstatus;
+
+       cb->zstr.avail_out = BUFFER_DATA_SIZE;
+       cb->zstr.next_out = (unsigned char *) buffer;
+
+       zstatus = deflate (&cb->zstr, Z_SYNC_FLUSH);
+
+       /* The deflate function will return Z_BUF_ERROR if it can't do
+           anything, which in this case means that all data has been
+           flushed.  */
+       if (zstatus == Z_BUF_ERROR)
+           break;
+
+       if (zstatus != Z_OK)
+       {
+           compress_error (0, zstatus, &cb->zstr, "deflate flush");
+           return EIO;
+       }
+
+       if (cb->zstr.avail_out != BUFFER_DATA_SIZE)
+           buf_output (cb->buf, buffer,
+                       BUFFER_DATA_SIZE - cb->zstr.avail_out);
+
+       /* If the deflate function did not fill the output buffer,
+           then all data has been flushed.  */
+       if (cb->zstr.avail_out > 0)
+           break;
+    }
+
+    /* Now flush the underlying buffer.  Note that if the original
+       call to buf_flush passed 1 for the BLOCK argument, then the
+       buffer will already have been set into blocking mode, so we
+       should always pass 0 here.  */
+    return buf_flush (cb->buf, 0);
+}
+
+
+
+/* The block routine for a compression buffer.  */
+static int
+compress_buffer_block (void *closure, bool block)
+{
+    struct compress_buffer *cb = closure;
+
+    if (block)
+       return set_block (cb->buf);
+    else
+       return set_nonblock (cb->buf);
+}
+
+
+
+/* Return the file descriptor underlying any child buffers.  */
+static int
+compress_buffer_get_fd (void *closure)
+{
+    struct compress_buffer *cb = closure;
+    return buf_get_fd (cb->buf);
+}
+
+
+
+/* Shut down an input buffer.  */
+static int
+compress_buffer_shutdown_input (struct buffer *buf)
+{
+    struct compress_buffer *cb = buf->closure;
+    int zstatus;
+
+    /* Don't make any attempt to pick up trailing data since we are shutting
+     * down.  If the client doesn't know we are shutting down, we might not
+     * see the EOF we are expecting.
+     */
+
+    zstatus = inflateEnd (&cb->zstr);
+    if (zstatus != Z_OK)
+    {
+       compress_error (0, zstatus, &cb->zstr, "inflateEnd");
+       return EIO;
+    }
+
+    return buf_shutdown (cb->buf);
+}
+
+
+
+/* Shut down an output buffer.  */
+static int
+compress_buffer_shutdown_output (struct buffer *buf)
+{
+    struct compress_buffer *cb = buf->closure;
+    int zstatus, status;
+
+    /* This is only used within the while loop below, but allocated here for
+     * efficiency.
+     */
+    static char *buffer = NULL;
+    if (!buffer)
+       buffer = pagealign_xalloc (BUFFER_DATA_SIZE);
+
+    do
+    {
+       cb->zstr.avail_out = BUFFER_DATA_SIZE;
+       cb->zstr.next_out = (unsigned char *) buffer;
+
+       zstatus = deflate (&cb->zstr, Z_FINISH);
+       if (zstatus != Z_OK && zstatus != Z_STREAM_END)
+       {
+           compress_error (0, zstatus, &cb->zstr, "deflate finish");
+           return EIO;
+       }
+
+       if (cb->zstr.avail_out != BUFFER_DATA_SIZE)
+           buf_output (cb->buf, buffer,
+                       BUFFER_DATA_SIZE - cb->zstr.avail_out);
+    } while (zstatus != Z_STREAM_END);
+
+    zstatus = deflateEnd (&cb->zstr);
+    if (zstatus != Z_OK)
+    {
+       compress_error (0, zstatus, &cb->zstr, "deflateEnd");
+       return EIO;
+    }
+
+    status = buf_flush (cb->buf, 1);
+    if (status != 0)
+       return status;
+
+    return buf_shutdown (cb->buf);
+}
+
+
+
+/* Here is our librarified gzip implementation.  It is very minimal
+   but attempts to be RFC1952 compliant.  */
+
+/* GZIP ID byte values */
+#define GZIP_ID1       31
+#define GZIP_ID2       139
+
+/* Compression methods */
+#define GZIP_CDEFLATE  8
+
+/* Flags */
+#define GZIP_FTEXT     1
+#define GZIP_FHCRC     2
+#define GZIP_FEXTRA    4
+#define GZIP_FNAME     8
+#define GZIP_FCOMMENT  16
+
+/* BUF should contain SIZE bytes of gzipped data (RFC1952/RFC1951).
+   We are to uncompress the data and write the result to the file
+   descriptor FD.  If something goes wrong, give a nonfatal error message
+   mentioning FULLNAME as the name of the file for FD.  Return 1 if
+   it is an error we can't recover from.  */
+
+int
+gunzip_in_mem (const char *fullname, unsigned char *buf, size_t *size_in,
+              char **retval)
+{
+    size_t pos;
+    z_stream zstr;
+    int zstatus;
+    unsigned char outbuf[32768];
+    unsigned long crc;
+    size_t size = *size_in;
+
+    *retval = NULL;
+    *size_in = 0;
+
+    if (size < 10)
+    {
+       error (0, 0, "gzipped data too small - lacks complete header");
+       return 1;
+    }
+    if (buf[0] != GZIP_ID1 || buf[1] != GZIP_ID2)
+    {
+       error (0, 0, "gzipped data does not start with gzip identification");
+       return 1;
+    }
+    if (buf[2] != GZIP_CDEFLATE)
+    {
+       error (0, 0, "only the deflate compression method is supported");
+       return 1;
+    }
+
+    /* Skip over the fixed header, and then skip any of the variable-length
+       fields.  As we skip each field, we keep pos <= size. The checks
+       on positions and lengths are really checks for malformed or 
+       incomplete gzip data.  */
+    pos = 10;
+    if (buf[3] & GZIP_FEXTRA)
+    {
+       if (pos + 2 >= size) 
+       {
+           error (0, 0, "%s lacks proper gzip XLEN field", fullname);
+           return 1;
+       }
+       pos += buf[pos] + (buf[pos + 1] << 8) + 2;
+       if (pos > size) 
+       {
+           error (0, 0, "%s lacks proper gzip \"extra field\"", fullname);
+           return 1;
+       }
+
+    }
+    if (buf[3] & GZIP_FNAME)
+    {
+       unsigned char *p = memchr(buf + pos, '\0', size - pos);
+       if (p == NULL)
+       {
+           error (0, 0, "%s has bad gzip filename field", fullname);
+           return 1;
+       }
+       pos = p - buf + 1;
+    }
+    if (buf[3] & GZIP_FCOMMENT)
+    {
+       unsigned char *p = memchr(buf + pos, '\0', size - pos);
+       if (p == NULL)
+       {
+           error (0, 0, "%s has bad gzip comment field", fullname);
+           return 1;
+       }
+       pos = p - buf + 1;
+    }
+    if (buf[3] & GZIP_FHCRC)
+    {
+       pos += 2;
+       if (pos > size) 
+       {
+           error (0, 0, "%s has bad gzip CRC16 field", fullname);
+           return 1;
+       }
+    }
+
+    /* There could be no data to decompress - check and short circuit.  */
+    if (pos >= size)
+    {
+       error (0, 0, "gzip data incomplete for %s (no data)", fullname);
+       return 1;
+    }
+
+    memset (&zstr, 0, sizeof zstr);
+    /* Passing a negative argument tells zlib not to look for a zlib
+       (RFC1950) header.  This is an undocumented feature; I suppose if
+       we wanted to be anal we could synthesize a header instead,
+       but why bother?  */
+    zstatus = inflateInit2 (&zstr, -15);
+
+    if (zstatus != Z_OK)
+       compress_error (1, zstatus, &zstr, fullname);
+
+    /* I don't see why we should have to include the 8 byte trailer in
+       avail_in.  But I see that zlib/gzio.c does, and it seemed to fix
+       a fairly rare bug in which we'd get a Z_BUF_ERROR for no obvious
+       reason.  */
+    zstr.avail_in = size - pos;
+    zstr.next_in = buf + pos;
+
+    crc = crc32 (0, NULL, 0);
+
+    do
+    {
+       zstr.avail_out = sizeof (outbuf);
+       zstr.next_out = outbuf;
+       zstatus = inflate (&zstr, Z_NO_FLUSH);
+       if (zstatus != Z_STREAM_END && zstatus != Z_OK)
+       {
+           compress_error (0, zstatus, &zstr, fullname);
+           if (*retval) free (*retval);
+           return 1;
+       }
+       *retval = xrealloc (*retval,
+                          *size_in + sizeof (outbuf) - zstr.avail_out);
+       memcpy (*retval + *size_in, outbuf, sizeof (outbuf) - zstr.avail_out);
+       *size_in += sizeof (outbuf) - zstr.avail_out;
+       crc = crc32 (crc, outbuf, sizeof (outbuf) - zstr.avail_out);
+    } while (zstatus != Z_STREAM_END);
+    zstatus = inflateEnd (&zstr);
+    if (zstatus != Z_OK)
+       compress_error (0, zstatus, &zstr, fullname);
+
+    /* Check that there is still 8 trailer bytes remaining (CRC32
+       and ISIZE).  Check total decomp. data, plus header len (pos)
+       against input buffer total size.  */
+    pos += zstr.total_in;
+    if (size - pos != 8)
+    {
+       error (0, 0, "gzip data incomplete for %s (no trailer)", fullname);
+       if (*retval) free (*retval);
+       return 1;
+    }
+
+    if (crc != ((unsigned long)buf[pos]
+               + ((unsigned long)buf[pos + 1] << 8)
+               + ((unsigned long)buf[pos + 2] << 16)
+               + ((unsigned long)buf[pos + 3] << 24)))
+    {
+       error (0, 0, "CRC error uncompressing %s", fullname);
+       if (*retval) free (*retval);
+       return 1;
+    }
+
+    if (zstr.total_out != ((unsigned long)buf[pos + 4]
+                          + ((unsigned long)buf[pos + 5] << 8)
+                          + ((unsigned long)buf[pos + 6] << 16)
+                          + ((unsigned long)buf[pos + 7] << 24)))
+    {
+       error (0, 0, "invalid length uncompressing %s", fullname);
+       if (*retval) free (*retval);
+       return 1;
+    }
+
+    return 0;
+}
+
+
+
+int
+gunzip_and_write (int fd, const char *fullname, unsigned char *buf,
+                 size_t size)
+{
+    char *dbuf;
+
+    if (gunzip_in_mem (fullname, buf, &size, &dbuf)) return 1;
+
+    if (write (fd, dbuf, size) < 0)
+    {
+       error (0, errno, "writing decompressed file %s", fullname);
+       free (dbuf);
+       return 1;
+    }
+
+    free (dbuf);
+    return 0;
+}
+
+
+
+/* Read all of FD and put the gzipped data (RFC1952/RFC1951) into *BUF,
+   replacing previous contents of *BUF.  *BUF is xmalloc'd and *SIZE is
+   its allocated size.  Put the actual number of bytes of data in
+   *LEN.  If something goes wrong, give a nonfatal error mentioning
+   FULLNAME as the name of the file for FD, and return 1 if we can't
+   recover from it).  LEVEL is the compression level (1-9).  */
+
+int
+read_and_gzip (int fd, const char *fullname, unsigned char **buf, size_t *size,
+               size_t *len, int level)
+{
+    z_stream zstr;
+    int zstatus;
+    unsigned char inbuf[8192];
+    int nread;
+    unsigned long crc;
+
+    if (*size < 1024)
+    {
+       unsigned char *newbuf;
+
+       *size = 1024;
+       newbuf = xrealloc (*buf, *size);
+       if (newbuf == NULL)
+       {
+           error (0, 0, "out of memory");
+           return 1;
+       }
+       *buf = newbuf;
+    }
+    (*buf)[0] = GZIP_ID1;
+    (*buf)[1] = GZIP_ID2;
+    (*buf)[2] = GZIP_CDEFLATE;
+    (*buf)[3] = 0;
+    (*buf)[4] = (*buf)[5] = (*buf)[6] = (*buf)[7] = 0;
+    /* Could set this based on level, but why bother?  */
+    (*buf)[8] = 0;
+    (*buf)[9] = 255;
+
+    memset (&zstr, 0, sizeof zstr);
+    zstatus = deflateInit2 (&zstr, level, Z_DEFLATED, -15, 8,
+                           Z_DEFAULT_STRATEGY);
+    crc = crc32 (0, NULL, 0);
+    if (zstatus != Z_OK)
+    {
+       compress_error (0, zstatus, &zstr, fullname);
+       return 1;
+    }
+    
+    /* Adjust for 10-byte output header (filled in above) */
+    zstr.total_out = 10;
+    zstr.avail_out = *size - 10;
+    zstr.next_out = *buf + 10;
+
+    while (1)
+    {
+       int finish = 0;
+
+       nread = read (fd, inbuf, sizeof inbuf);
+       if (nread < 0)
+       {
+           error (0, errno, "cannot read %s", fullname);
+           return 1;
+       }
+       else if (nread == 0)
+           /* End of file.  */
+           finish = 1;
+       crc = crc32 (crc, inbuf, nread);
+       zstr.next_in = inbuf;
+       zstr.avail_in = nread;
+
+       do
+       {
+           /* I don't see this documented anywhere, but deflate seems
+              to tend to dump core sometimes if we pass it Z_FINISH and
+              a small (e.g. 2147 byte) avail_out.  So we insist on at
+              least 4096 bytes (that is what zlib/gzio.c uses).  */
+
+           if (zstr.avail_out < 4096)
+           {
+               unsigned char *newbuf;
+
+               assert(zstr.avail_out + zstr.total_out == *size);
+               assert(zstr.next_out == *buf + zstr.total_out);
+               *size *= 2;
+               newbuf = xrealloc (*buf, *size);
+               if (newbuf == NULL)
+               {
+                   error (0, 0, "out of memory");
+                   return 1;
+               }
+               *buf = newbuf;
+               zstr.next_out = *buf + zstr.total_out;
+               zstr.avail_out = *size - zstr.total_out;
+               assert(zstr.avail_out + zstr.total_out == *size);
+               assert(zstr.next_out == *buf + zstr.total_out);
+           }
+
+           zstatus = deflate (&zstr, finish ? Z_FINISH : 0);
+           if (zstatus == Z_STREAM_END)
+               goto done;
+           else if (zstatus != Z_OK)
+               compress_error (0, zstatus, &zstr, fullname);
+       } while (zstr.avail_out == 0);
+    }
+ done:
+    /* Need to add the CRC information (8 bytes)
+       to the end of the gzip'd output.
+       Ensure there is enough space in the output buffer
+       to do so.  */
+    if (zstr.avail_out < 8)
+    {
+       unsigned char *newbuf;
+
+       assert(zstr.avail_out + zstr.total_out == *size);
+       assert(zstr.next_out == *buf + zstr.total_out);
+       *size += 8 - zstr.avail_out;
+       newbuf = realloc (*buf, *size);
+       if (newbuf == NULL)
+       {
+           error (0, 0, "out of memory");
+           return 1;
+       }
+       *buf = newbuf;
+       zstr.next_out = *buf + zstr.total_out;
+       zstr.avail_out = *size - zstr.total_out;
+       assert(zstr.avail_out + zstr.total_out == *size);
+       assert(zstr.next_out == *buf + zstr.total_out);
+    } 
+    *zstr.next_out++ = (unsigned char)(crc & 0xff);
+    *zstr.next_out++ = (unsigned char)((crc >> 8) & 0xff);
+    *zstr.next_out++ = (unsigned char)((crc >> 16) & 0xff);
+    *zstr.next_out++ = (unsigned char)((crc >> 24) & 0xff);
+
+    *zstr.next_out++ = (unsigned char)(zstr.total_in & 0xff);
+    *zstr.next_out++ = (unsigned char)((zstr.total_in >> 8) & 0xff);
+    *zstr.next_out++ = (unsigned char)((zstr.total_in >> 16) & 0xff);
+    *zstr.next_out++ = (unsigned char)((zstr.total_in >> 24) & 0xff);
+
+    zstr.total_out += 8;
+    zstr.avail_out -= 8;
+    assert(zstr.avail_out + zstr.total_out == *size);
+    assert(zstr.next_out == *buf + zstr.total_out);
+
+    *len = zstr.total_out;
+
+    zstatus = deflateEnd (&zstr);
+    if (zstatus != Z_OK)
+       compress_error (0, zstatus, &zstr, fullname);
+
+    return 0;
+}
+#endif /* defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT) */
Index: ccvs/tools/Makefile.in
diff -u /dev/null ccvs/tools/Makefile.in:1.81.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/tools/Makefile.in      Wed Dec 21 13:25:10 2005
@@ -0,0 +1,427 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# Makefile for GNU CVS auxiliary tools.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = tools
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+EXTRA_DIST = \
+       README .cvsignore
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tools/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  tools/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-info-am
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/vms/Makefile.in
diff -u /dev/null ccvs/vms/Makefile.in:1.84.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/vms/Makefile.in        Wed Dec 21 13:25:10 2005
@@ -0,0 +1,490 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# *** Under VMS, we use *.COM to build, not
+# *** this makefile.  However, we need this file in order for 'make
+# *** dist' to work properly on Unix machines.
+
+# Makefile for GNU CVS VMS distribution.
+#
+# Copyright (C) 1986-2002 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2002 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = vms
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+EXTRA_DIST = \
+       .cvsignore \
+       ChangeLog \
+       Makefile.in \
+       build_vms.com \
+       config.h \
+       config.h.in \
+       dir.h \
+       filesubr.c \
+       filutils.c \
+       filutils.h \
+       getpass.c \
+       getwd.c \
+       misc.c \
+       misc.h \
+       ndir.c \
+       ndir.h \
+       pathnames.h \
+       pc.c \
+       pipe.c \
+       pipe.h \
+       piped_child.c \
+       pwd.c \
+       pwd.h \
+       rcmd.c \
+       readlink.c \
+       rmdir.c \
+       startserver.c \
+       stat.c \
+       unlink.c \
+       utime.c \
+       vms-types.h \
+       vms.h \
+       vmsmunch.c \
+       vmsmunch.h \
+       vmsmunch_private.h \
+       waitpid.c
+
+DISTCLEANFILES = stamp-ch
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  vms/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  vms/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile all-local
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am all-local check check-am clean clean-generic \
+       distclean distclean-generic distdir dvi dvi-am html html-am \
+       info info-am install install-am install-data install-data-am \
+       install-exec install-exec-am install-info install-info-am \
+       install-man install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+       uninstall-am uninstall-info-am
+
+
+###
+### Maintainer targets
+###
+all-local: config.h
+config.h: stamp-ch
+stamp-ch: config.h.in $(top_srcdir)/configure
+       @echo "/* This file is generated via a rule in Makefile.am from the" \
+         >config.tmp
+       @echo " * config.h.in file." >>config.tmp
+       @echo " *" >>config.tmp
+       @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>config.tmp
+       @echo " *" >>config.tmp
+       @echo " * Edit config.h.in instead." >>config.tmp
+       @echo " */" >>config.tmp
+       sed -e "s/%PACKAGE_STRING%/$(PACKAGE_STRING)/"  \
+           -e "s/%PACKAGE_BUGREPORT%/$(PACKAGE_BUGREPORT)/" \
+         <$(srcdir)/config.h.in >>config.tmp
+       @cmp -s config.tmp $(srcdir)/config.h \
+         || (echo "Updating config.h"; \
+             cp config.tmp $(srcdir)/config.h)
+       address@hidden -f config.tmp
+       @cp $(srcdir)/config.h $@
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/windows-NT/Makefile.in
diff -u /dev/null ccvs/windows-NT/Makefile.in:1.113.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/windows-NT/Makefile.in Wed Dec 21 13:25:10 2005
@@ -0,0 +1,711 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# *** Under Windows NT and Microsoft Visual C++, we use cvsnt.mak, not
+# *** this makefile.  However, we need this file in order for 'make
+# *** dist' to work properly on Unix machines.
+
+# Makefile for GNU CVS windows-NT dist.
+#
+# Copyright (C) 1986-2005 The Free Software Foundation, Inc.
+#
+# Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
+#                                  and others.
+
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = windows-NT
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+       html-recursive info-recursive install-data-recursive \
+       install-exec-recursive install-info-recursive \
+       install-recursive installcheck-recursive installdirs-recursive \
+       pdf-recursive ps-recursive uninstall-info-recursive \
+       uninstall-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+EXTRA_DIST = \
+       JmgStat.c \
+       JmgStat.h \
+       config.h \
+       config.h.in \
+       config.h.in.in \
+       config.h.in.footer \
+       stamp-chi \
+       mkconfig.pl \
+       fix-msvc-mak.pl \
+       ndir.h \
+       pwd.h \
+       rcmd.h \
+       stdbool.h \
+       stdint.h \
+       filesubr.c \
+       mkdir.c \
+       ndir.c \
+       netdb.h \
+       pwd.c \
+       rcmd.c \
+       run.c \
+       sockerror.c \
+       startserver.c \
+       arpa/inet.h \
+       netinet/in.h \
+       sys/socket.h \
+       sys/types.h \
+       unistd.c \
+       unistd.h \
+       waitpid.c \
+       woe32.c \
+       woe32.h \
+       .cvsignore
+
+SUBDIRS = SCC
+
+###
+### Maintainer targets
+###
+MAINTAINERCLEANFILES = $(srcdir)/config.h.in $(srcdir)/stamp-chi
+DISTCLEANFILES = stamp-ch stamp-sh stamp-sh2
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  windows-NT/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  windows-NT/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       dot_seen=no; \
+       case "$@" in \
+         distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+         *) list='$(SUBDIRS)' ;; \
+       esac; \
+       rev=''; for subdir in $$list; do \
+         if test "$$subdir" = "."; then :; else \
+           rev="$$subdir $$rev"; \
+         fi; \
+       done; \
+       rev="$$rev ."; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+         || eval $$failcom; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); 
\
+       done
+ctags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
+       done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+         include_option=--etags-include; \
+         empty_fix=.; \
+       else \
+         include_option=--include; \
+         empty_fix=; \
+       fi; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test ! -f $$subdir/TAGS || \
+             tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+         fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       $(mkdir_p) $(distdir)/arpa $(distdir)/netinet $(distdir)/sys
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
+           test -d "$(distdir)/$$subdir" \
+           || $(mkdir_p) "$(distdir)/$$subdir" \
+           || exit 1; \
+           distdir=`$(am__cd) $(distdir) && pwd`; \
+           top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+           (cd $$subdir && \
+             $(MAKE) $(AM_MAKEFLAGS) \
+               top_distdir="$$top_distdir" \
+               distdir="$$distdir/$$subdir" \
+               distdir) \
+             || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-recursive
+all-am: Makefile all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local check \
+       check-am clean clean-generic clean-recursive ctags \
+       ctags-recursive distclean distclean-generic \
+       distclean-recursive distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-exec install-exec-am install-info \
+       install-info-am install-man install-strip installcheck \
+       installcheck-am installdirs installdirs-am maintainer-clean \
+       maintainer-clean-generic maintainer-clean-recursive \
+       mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       uninstall-info-am
+
+
+all-local: config.h stdbool.h stdint.h
+config.h: stamp-ch
+stamp-ch: config.h.in $(top_srcdir)/configure
+       @echo "/* This file is generated via a rule in Makefile.am from the" \
+         >config.tmp
+       @echo " * config.h.in file." >>config.tmp
+       @echo " *" >>config.tmp
+       @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>config.tmp
+       @echo " *" >>config.tmp
+       @echo " * Edit config.h.in instead." >>config.tmp
+       @echo " */" >>config.tmp
+       sed -e "s/%PACKAGE_STRING%/$(PACKAGE_STRING)/" \
+           -e "s/%PACKAGE_BUGREPORT%/$(PACKAGE_BUGREPORT)/" \
+           <$(srcdir)/config.h.in >>config.tmp
+       @cmp -s config.tmp $(srcdir)/config.h \
+         || (echo "Updating config.h"; \
+             cp config.tmp $(srcdir)/config.h)
+       address@hidden -f config.tmp
+       @cp $(srcdir)/config.h $@
+
+# The shell portion of this target is so that this file will be regenerated
+# when it is missing, even when not in maintainer mode.
+config.h.in: @MAINTAINER_MODE_TRUE@ stamp-chi
+       @if test ! -f $(srcdir)/$@; then \
+         rm -f $(srcdir)/stamp-chi; \
+         $(MAKE) stamp-chi; \
+       else :; fi
+
+# The following target exists for two reasons.  The first is so that the rule
+# for config.h.in above may be conditionally dependent on it and thus only
+# built in maintainer mode.  The second reason is so that the config.h.in, and
+# thus the config.h file, only gets touched when it actually changes, which
+# could potentially save unnecessary rebuilds of many dependent files.
+#
+# This file is distributed since, without it, config.h.in will always be
+# rebuilt on the first run in maintainer mode, even if its dependencies are
+# unchanged.
+stamp-chi: $(srcdir)/mkconfig.pl $(top_srcdir)/config.h.in \
+          $(srcdir)/config.h.in.in $(srcdir)/config.h.in.footer
+       @$(PERL) mkconfig.pl -q $(top_srcdir)/config.h.in \
+                               $(srcdir)/config.h.in \
+                               $(srcdir)/config.h.in.in \
+                               $(srcdir)/config.h.in.footer
+       @cp $(srcdir)/config.h.in $(srcdir)/$@
+
+stdbool.h: stamp-sh
+stamp-sh: $(top_srcdir)/lib/stdbool_.h
+       @echo "/* This file is generated via a rule in Makefile.am from the" \
+         >stdbool.tmp
+       @echo " * ../lib/stdbool_.h.in file." >>stdbool.tmp
+       @echo " *" >>stdbool.tmp
+       @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>stdbool.tmp
+       @echo " *" >>stdbool.tmp
+       @echo " * Edit ../lib/stdbool_.h instead." >>stdbool.tmp
+       @echo " */" >>stdbool.tmp
+       sed 's/@''HAVE__BOOL''@/0/' <$(top_srcdir)/lib/stdbool_.h \
+         >>stdbool.tmp
+       @cmp -s stdbool.tmp $(srcdir)/stdbool.h \
+         || (echo "Updating stdbool.h"; \
+             cp stdbool.tmp $(srcdir)/stdbool.h)
+       address@hidden -f stdbool.tmp
+       @cp $(srcdir)/stdbool.h $@
+
+stdint.h: stamp-sh2
+stamp-sh2: $(top_srcdir)/lib/stdint_.h
+       @echo "/* This file is generated via a rule in Makefile.am from the" \
+         >stdint.tmp
+       @echo " * ../lib/stdint_.h.in file." >>stdint.tmp
+       @echo " *" >>stdint.tmp
+       @echo " * *** DO NOT EDIT THIS FILE DIRECTLY ***" >>stdint.tmp
+       @echo " *" >>stdint.tmp
+       @echo " * Edit ../lib/stdint_.h instead." >>stdint.tmp
+       @echo " */" >>stdint.tmp
+       sed 's/@''HAVE_LONG_64BIT''@/0/g;s/@''HAVE_LONG_LONG_64BIT@/0/g' \
+         <$(top_srcdir)/lib/stdint_.h >>stdint.tmp
+       @cmp -s stdint.tmp $(srcdir)/stdint.h \
+         || (echo "Updating stdint.h"; \
+             cp stdint.tmp $(srcdir)/stdint.h)
+       address@hidden -f stdint.tmp
+       @cp $(srcdir)/stdint.h $@
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/windows-NT/SCC/Makefile.in
diff -u /dev/null ccvs/windows-NT/SCC/Makefile.in:1.75.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/windows-NT/SCC/Makefile.in     Wed Dec 21 13:25:10 2005
@@ -0,0 +1,434 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
address@hidden@
+
+# *** Under Windows NT and Microsoft Visual C++, we use cvsnt.mak, not
+# *** this makefile.  However, we need this file in order for 'make
+# *** dist' to work properly on Unix machines.
+
+# Makefile for GNU CVS windows-NT/SCC dist.
+# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
+#               1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+#               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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program 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.
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = windows-NT/SCC
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx_extract_cpp_defn.m4 \
+       $(top_srcdir)/m4/acx_with_external_zlib.m4 \
+       $(top_srcdir)/m4/acx_with_gssapi.m4 $(top_srcdir)/m4/alloca.m4 \
+       $(top_srcdir)/m4/allocsa.m4 \
+       $(top_srcdir)/m4/asx_version_compare.m4 \
+       $(top_srcdir)/m4/atexit.m4 $(top_srcdir)/m4/base64.m4 \
+       $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/canon-host.m4 \
+       $(top_srcdir)/m4/canonicalize.m4 \
+       $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/clock_time.m4 \
+       $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \
+       $(top_srcdir)/m4/cvs_func_printf_ptr.m4 \
+       $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/d-type.m4 \
+       $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \
+       $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/eealloc.m4 \
+       $(top_srcdir)/m4/eoverflow.m4 $(top_srcdir)/m4/error.m4 \
+       $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+       $(top_srcdir)/m4/fcntl-safer.m4 \
+       $(top_srcdir)/m4/filenamecat.m4 $(top_srcdir)/m4/fnmatch.m4 \
+       $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/ftruncate.m4 \
+       $(top_srcdir)/m4/getaddrinfo.m4 \
+       $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \
+       $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdelim.m4 \
+       $(top_srcdir)/m4/gethostname.m4 $(top_srcdir)/m4/getline.m4 \
+       $(top_srcdir)/m4/getlogin_r.m4 $(top_srcdir)/m4/getndelim2.m4 \
+       $(top_srcdir)/m4/getnline.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/getpagesize.m4 $(top_srcdir)/m4/getpass.m4 \
+       $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \
+       $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glob.m4 \
+       $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+       $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes.m4 \
+       $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lib-ld.m4 \
+       $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+       $(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
+       $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbchar.m4 \
+       $(top_srcdir)/m4/mbiter.m4 $(top_srcdir)/m4/mbrtowc.m4 \
+       $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/md5.m4 \
+       $(top_srcdir)/m4/memchr.m4 $(top_srcdir)/m4/memmove.m4 \
+       $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \
+       $(top_srcdir)/m4/minmax.m4 $(top_srcdir)/m4/mkdir-slash.m4 \
+       $(top_srcdir)/m4/mkstemp.m4 $(top_srcdir)/m4/mktime.m4 \
+       $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/nanosleep.m4 \
+       $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
+       $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pagealign_alloc.m4 \
+       $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+       $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quotearg.m4 \
+       $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/regex.m4 \
+       $(top_srcdir)/m4/rename.m4 $(top_srcdir)/m4/restrict.m4 \
+       $(top_srcdir)/m4/rpmatch.m4 $(top_srcdir)/m4/save-cwd.m4 \
+       $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/signed.m4 \
+       $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sockpfaf.m4 \
+       $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-macros.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+       $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strcase.m4 \
+       $(top_srcdir)/m4/strdup.m4 $(top_srcdir)/m4/strerror.m4 \
+       $(top_srcdir)/m4/strftime.m4 $(top_srcdir)/m4/strstr.m4 \
+       $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/strtoul.m4 \
+       $(top_srcdir)/m4/sunos57-select.m4 $(top_srcdir)/m4/time_r.m4 \
+       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \
+       $(top_srcdir)/m4/tzset.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+       $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/vasnprintf.m4 \
+       $(top_srcdir)/m4/vasprintf.m4 $(top_srcdir)/m4/wchar_t.m4 \
+       $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xalloc.m4 \
+       $(top_srcdir)/m4/xgetcwd.m4 $(top_srcdir)/m4/xreadlink.m4 \
+       $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/yesno.m4 \
+       $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSH = @CSH@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EDITOR = @EDITOR@
+EGREP = @EGREP@
+EOVERFLOW = @EOVERFLOW@
+EXEEXT = @EXEEXT@
+FNMATCH_H = @FNMATCH_H@
+GETOPT_H = @GETOPT_H@
+GLOB_H = @GLOB_H@
+GL_COND_LIBTOOL_FALSE = @GL_COND_LIBTOOL_FALSE@
+GL_COND_LIBTOOL_TRUE = @GL_COND_LIBTOOL_TRUE@
+GMSGFMT = @GMSGFMT@
+GPG = @GPG@
+HAVE_LONG_64BIT = @HAVE_LONG_64BIT@
+HAVE_LONG_LONG_64BIT = @HAVE_LONG_LONG_64BIT@
+HAVE__BOOL = @HAVE__BOOL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+KRB4 = @KRB4@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
+LIB_NANOSLEEP = @LIB_NANOSLEEP@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MAKE_TARGETS_IN_VPATH_FALSE = @MAKE_TARGETS_IN_VPATH_FALSE@
+MAKE_TARGETS_IN_VPATH_TRUE = @MAKE_TARGETS_IN_VPATH_TRUE@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MKTEMP = @MKTEMP@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+RSH_DFLT = @RSH_DFLT@
+SENDMAIL = @SENDMAIL@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+ZLIB_CPPFLAGS = @ZLIB_CPPFLAGS@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZLIB_SUBDIRS = @ZLIB_SUBDIRS@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_prefix_program = @ac_prefix_program@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+cvs_client_objects = @cvs_client_objects@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+with_default_rsh = @with_default_rsh@
+EXTRA_DIST = \
+       .cvsignore \
+       README.txt \
+       SCC.mak \
+       SCC.dsp \
+       scc.c \
+       scc.def \
+       pubscc.h
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  windows-NT/SCC/Makefile'; 
\
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  windows-NT/SCC/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+       distclean-generic distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-info install-info-am install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+       uninstall-info-am
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: ccvs/windows-NT/config.h
diff -u /dev/null ccvs/windows-NT/config.h:1.173.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/windows-NT/config.h    Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1525 @@
+/* This file is generated via a rule in Makefile.am from the
+ * config.h.in file.
+ *
+ * *** DO NOT EDIT THIS FILE DIRECTLY ***
+ *
+ * Edit config.h.in instead.
+ */
+/***
+ *** config.h.in, generated by mkconfig.pl:
+ ***
+ ***   (config.h.in.in
+ ***    + ../config.h.in)
+ ***   . config.h.in.footer
+ ***   --> config.h.in
+ ***
+ *** ***** DO NOT ALTER THIS FILE!!! *****
+ ***
+ *** Changes to this file will be overwritten by automatic script runs.
+ *** Changes should be made to the config.h.in.in & config.h.in.footer
+ *** files instead.
+ ***/
+
+/* config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define this to a NULL terminated list of allowed path prefixes (for
+   directories) and paths to files the CVS server will allow configuration to
+   be read from when specified from the command line. */
+#undef ALLOW_CONFIG_OVERRIDE
+
+/* Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access method in
+   the CVS client (default) */
+#define AUTH_CLIENT_SUPPORT 1
+
+/* Define if you want to use the password authenticated server. */
+#undef AUTH_SERVER_SUPPORT
+
+/* Define if you want CVS to be able to be a remote repository client. */
+#define CLIENT_SUPPORT
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* define if cross compiling */
+#undef CROSS_COMPILING
+
+/* The CVS admin command is restricted to the members of the group
+   CVS_ADMIN_GROUP. If this group does not exist, all users are allowed to run
+   CVS admin. To disable the CVS admin command for all users, create an empty
+   CVS_ADMIN_GROUP by running configure with the --with-cvs-admin-group=
+   option. To disable access control for CVS admin, run configure with the
+   --without-cvs-admin-group option in order to comment out the define below.
+   */
+#undef CVS_ADMIN_GROUP
+
+/* When committing a permanent change, CVS and RCS make a log entry of who
+   committed the change. If you are committing the change logged in as "root"
+   (not under "su" or other root-priv giving program), CVS/RCS cannot
+   determine who is actually making the change. As such, by default, CVS
+   prohibits changes committed by users logged in as "root". You can disable
+   checking by passing the "--enable-rootcommit" option to configure or by
+   commenting out the lines below. */
+#undef CVS_BADROOT
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to a command line template that will write an OpenPGP signature for
+   the file `%s' to its standard out. `%t' is substituted at run time with an
+   option which flags files as text files, when necessary, and the empty
+   string, otherwise. `%a' is substituted with a list of arguments provided by
+   the user. */
+#undef DEFAULT_SIGN_TEMPLATE
+
+/* Define to the option string that the OpenPGP program used in the
+   DEFAULT_SIGN_TEMPLATE would like to see for text files (substituted at run
+   time in place of `%t' in the DEFAULT_SIGN_TEMPLATE). */
+#undef DEFAULT_SIGN_TEXTMODE
+
+/* Define if there is a member named d_ino in the struct describing directory
+   headers. */
+#undef D_INO_IN_DIRENT
+
+/* The default editor to use, if one does not specify the "-e" option to cvs,
+   or does not have an EDITOR environment variable. If this is not set to an
+   absolute path to an executable, use the shell to find where the editor
+   actually is. This allows sites with /usr/bin/vi or /usr/ucb/vi to work
+   equally well (assuming that their PATH is reasonable). */
+#define EDITOR_DFLT "notepad"
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to enable encryption support. */
+#undef ENCRYPTION
+
+/* Define as good substitute value for EOVERFLOW. */
+#define EOVERFLOW EINVAL
+
+/* Define if this executable will be running on case insensitive file systems.
+   In the client case, this means that it will request that the server pretend
+   to be case insensitive if it isn't already. */
+#define FILENAMES_CASE_INSENSITIVE 1
+
+/* Define on systems for which file names may have a so-called `drive letter'
+   prefix, define this to compute the length of that prefix, including the
+   colon. */
+#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1
+
+/* Define if the backslash character may also serve as a file name component
+   separator. */
+#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1
+
+#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+#endif
+
+/* When committing or importing files, you must enter a log message. Normally,
+   you can do this either via the -m flag on the command line, the -F flag on
+   the command line, or an editor will be started for you. If you like to use
+   logging templates (the rcsinfo file within the $CVSROOT/CVSROOT directory),
+   you might want to force people to use the editor even if they specify a
+   message with -m or -F. Enabling FORCE_USE_EDITOR will cause the -m or -F
+   message to be appended to the temp file when the editor is started. */
+#undef FORCE_USE_EDITOR
+
+/* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+   in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only
+   relevant when using GSSAPI. */
+#undef GSS_C_NT_HOSTBASED_SERVICE
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have `alloca' after including <alloca.h>, a header that
+   may be supplied by this distribution. */
+#undef HAVE_ALLOCA
+
+/* Define HAVE_ALLOCA_H for backward compatibility with older code that
+   includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `atexit' function. */
+#define HAVE_ATEXIT 1
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#undef HAVE_BP_SYM_H
+
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `chsize' function. */
+#define HAVE_CHSIZE 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define if you have compound literals. */
+#undef HAVE_COMPOUND_LITERALS
+
+/* Define if you have the connect function. */
+#define HAVE_CONNECT
+
+/* Define if you have the crypt function. */
+#undef HAVE_CRYPT
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FERROR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `flockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FLOCKFILE
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FREAD_UNLOCKED
+
+/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FREEADDRINFO
+
+/* Define to 1 if you have the declaration of `funlockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FUNLOCKFILE
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GAI_STRERROR
+
+/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETADDRINFO
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
+   */
+#define HAVE_DECL_GETCWD 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDELIM
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+   */
+#define HAVE_DECL_GETENV 1
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLINE
+
+/* Define to 1 if you have the declaration of `getlogin', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN
+
+/* Define to 1 if you have the declaration of `getlogin_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN_R
+
+/* Define to 1 if you have the declaration of `getpass', and to 0 if you
+   don't. */
+#define HAVE_DECL_GETPASS 1
+
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
+   don't. */
+#define HAVE_DECL_NANOSLEEP 1
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_PUTCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#define HAVE_DECL_STRDUP 1
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+   don't. */
+#define HAVE_DECL___FPENDING 0
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dup2' function. */
+#define HAVE_DUP2 1
+
+/* Define if you have the declaration of environ. */
+#define HAVE_ENVIRON_DECL 1
+
+/* Define if you have the declaration of errno. */
+#define HAVE_ERRNO_DECL 1
+
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
+/* Define to 1 if you have the `fchmod' function. */
+#undef HAVE_FCHMOD
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `fsync' function. */
+#undef HAVE_FSYNC
+
+/* Define to 1 if you have the `ftime' function. */
+#define HAVE_FTIME 1
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `funlockfile' function. */
+#undef HAVE_FUNLOCKFILE
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#undef HAVE_GAI_STRERROR
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getdelim' function. */
+#undef HAVE_GETDELIM
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgroups' function. */
+#undef HAVE_GETGROUPS
+
+/* Define to 1 if you have the `gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the `getlogin_r' function. */
+#undef HAVE_GETLOGIN_R
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getpwnam_r' function. */
+#undef HAVE_GETPWNAM_R
+
+/* Define if you have the getspnam function. */
+#undef HAVE_GETSPNAM
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <glob.h> header file. */
+#define HAVE_GLOB_H 1
+
+/* Define if you have GSSAPI with Kerberos version 5 available. */
+#undef HAVE_GSSAPI
+
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
+
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_H
+
+/* Define to 1 if you have the <gssapi.h> header file. */
+#undef HAVE_GSSAPI_H
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the `initgroups' function. */
+#undef HAVE_INITGROUPS
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <io.h> header file. */
+#define HAVE_IO_H 1
+
+/* Define to 1 if <sys/socket.h> defines AF_INET. */
+#define HAVE_IPV4 1
+
+/* Define to 1 if <sys/socket.h> defines AF_INET6. */
+#undef HAVE_IPV6
+
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII 1
+
+/* Define to 1 if you have the `isblank' function. */
+#undef HAVE_ISBLANK
+
+/* Define to 1 if you have the `iswprint' function. */
+#define HAVE_ISWPRINT 1
+
+/* Define if you have MIT Kerberos version 4 available. */
+#undef HAVE_KERBEROS
+
+/* Define to 1 if you have the <krb5.h> header file. */
+#undef HAVE_KRB5_H
+
+/* Define to 1 if you have the `krb_get_err_text' function. */
+#undef HAVE_KRB_GET_ERR_TEXT
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the `krb' library (-lkrb). */
+#undef HAVE_LIBKRB
+
+/* Define to 1 if you have the `krb4' library (-lkrb4). */
+#undef HAVE_LIBKRB4
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `login' function. */
+#undef HAVE_LOGIN
+
+/* Define to 1 if you have the `logout' function. */
+#undef HAVE_LOGOUT
+
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if you support file names longer than 14 characters. */
+#define HAVE_LONG_FILE_NAMES 1
+
+/* Define if you have the 'long long' type. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+   config.h and <sys/mman.h>. */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to 1 if you have the `mblen' function. */
+#define HAVE_MBLEN 1
+
+/* Define to 1 if you have the `mbrlen' function. */
+#define HAVE_MBRLEN 1
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#define HAVE_MBRTOWC 1
+
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
+/* Define to 1 if you have the `mbsrtowcs' function. */
+#define HAVE_MBSRTOWCS 1
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#define HAVE_MBSTATE_T 1
+
+/* Define if you have memchr (always for CVS). */
+#define HAVE_MEMCHR 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
+#define HAVE_MINMAX_IN_LIMITS_H 1
+
+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_SYS_PARAM_H
+
+/* Define to 1 if you have the `mknod' function. */
+#undef HAVE_MKNOD
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `nanotime' function. */
+#undef HAVE_NANOTIME
+
+/* Define to 1 if you have the <ndbm.h> header file. */
+#undef HAVE_NDBM_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#define HAVE_NDIR_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
+/* Define if an OpenPGP capable program is available (and, assumedly, usable
+   command line templates are in the DEFAULT_SIGN_TEMPLATE and
+   DEFAULT_VERIFY_TEMPLATE macros). */
+#undef HAVE_OPENPGP
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
+/* Define to enable system authentication with PAM instead of using the simple
+   getpwnam interface. This allows authentication (in theory) with any PAM
+   module, e.g. on systems with shadow passwords or via LDAP */
+#undef HAVE_PAM
+
+/* Define to 1 if pam/pam_appl.h is available */
+#undef HAVE_PAM_PAM_APPL_H
+
+/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX is not
+   defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD is defined.
+   */
+#undef HAVE_PARTLY_WORKING_GETCWD
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
+
+/* Define to 1 if the `printf' function supports the %p format for printing
+   pointers. */
+#define HAVE_PRINTF_PTR 1
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#define HAVE_PTRDIFF_T 1
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the `regcomp' function. */
+#undef HAVE_REGCOMP
+
+/* Define to 1 if you have the `regerror' function. */
+#undef HAVE_REGERROR
+
+/* Define to 1 if you have the `regexec' function. */
+#undef HAVE_REGEXEC
+
+/* Define to 1 if you have the `regfree' function. */
+#undef HAVE_REGFREE
+
+/* Define to 1 if you have the `resolvepath' function. */
+#undef HAVE_RESOLVEPATH
+
+/* Define to 1 if you have the `rpmatch' function. */
+#undef HAVE_RPMATCH
+
+/* Define to 1 if you have run the test for working tzset. */
+#define HAVE_RUN_TZSET_TEST 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#define HAVE_SEARCH_H 1
+
+/* Define to 1 if security/pam_appl.h is available */
+#undef HAVE_SECURITY_PAM_APPL_H
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define if the diff library should use setmode for binary files. */
+#define HAVE_SETMODE 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `sigblock' function. */
+#undef HAVE_SIGBLOCK
+
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define to 1 if you have the `sigsetmask' function. */
+#undef HAVE_SIGSETMASK
+
+/* Define to 1 if you have the `sigvec' function. */
+#undef HAVE_SIGVEC
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have strchr (always for CVS). */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#undef HAVE_STRUCT_ADDRINFO
+
+/* Define if there is a member named d_type in the struct describing directory
+   headers. */
+#undef HAVE_STRUCT_DIRENT_D_TYPE
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+
+/* Define if struct timespec is declared in <time.h>. */
+#undef HAVE_STRUCT_TIMESPEC
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/bsdtypes.h> header file. */
+#undef HAVE_SYS_BSDTYPES_H
+
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#undef HAVE_TCGETATTR
+
+/* Define to 1 if you have the `tcsetattr' function. */
+#undef HAVE_TCSETATTR
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `timezone' function. */
+#undef HAVE_TIMEZONE
+
+/* Define to 1 if localtime_r, etc. have the type signatures that POSIX
+   requires. */
+#undef HAVE_TIME_R_POSIX
+
+/* Define if struct tm has the tm_gmtoff member. */
+#undef HAVE_TM_GMTOFF
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#define HAVE_TZNAME 1
+
+/* Define to 1 if you have the `tzset' function. */
+#define HAVE_TZSET 1
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
+#define HAVE_UTIME_NULL 1
+
+/* Define to 1 if you have the `vasnprintf' function. */
+#undef HAVE_VASNPRINTF
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `wait3' function. */
+#undef HAVE_WAIT3
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define if you have the 'wchar_t' type. */
+#define HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#define HAVE_WCRTOMB 1
+
+/* Define to 1 if you have the `wcscoll' function. */
+#define HAVE_WCSCOLL 1
+
+/* Define to 1 if you have the `wcslen' function. */
+#define HAVE_WCSLEN 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define HAVE_WCTYPE_H 1
+
+/* Define if you have the 'wint_t' type. */
+#define HAVE_WINT_T 1
+
+/* Define to 1 if you have the `wmemchr' function. */
+#define HAVE_WMEMCHR 1
+
+/* Define to 1 if you have the `wmemcpy' function. */
+#define HAVE_WMEMCPY 1
+
+/* Define to 1 if you have the `wmempcpy' function. */
+#undef HAVE_WMEMPCPY
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `__fpending' function. */
+#undef HAVE___FPENDING
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+/* Define to include locking code which prevents versions of CVS earlier than
+   1.12.4 directly accessing the same repositiory as this executable from
+   ignoring this executable's promotable read locks. If only CVS versions
+   1.12.4 and later will be accessing your repository directly (as a server or
+   locally), you can safely disable this option in return for fewer disk
+   accesses and a small speed increase. Disabling this option when versions of
+   CVS earlier than 1,12,4 _will_ be accessing your repository, however, is
+   *VERY* *VERY* *VERY* dangerous and could result in data loss. As such, by
+   default, CVS is compiled with this code enabled. If you are sure you would
+   like this code disabled, you can disable it by passing the
+   "--disable-lock-compatibility" option to configure or by commenting out the
+   lines below. */
+#define LOCK_COMPATIBILITY
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#undef MALLOC_0_IS_NONNULL
+
+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
+#undef MAP_ANONYMOUS
+
+/* By default, CVS stores its modules and other such items in flat text files
+   (MY_NDBM enables this). Turning off MY_NDBM causes CVS to look for a
+   system-supplied ndbm database library and use it instead. That may speed
+   things up, but the default setting generally works fine too. */
+#define MY_NDBM
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "address@hidden"
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "Concurrent Versions System (CVS) 1.12.13.1"
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to set a service name for PAM. This must be defined. Define to
+   `program_name', without the quotes, to use whatever name CVS was invoked
+   as. Otherwise, define to a double-quoted literal string, such as `"cvs"'.
+   */
+#undef PAM_SERVICE_NAME
+
+/* the number of pending output bytes on stream `fp' */
+#define PENDING_OUTPUT_N_BYTES ( fp ? fp->_ptr - fp->_base : 0 )
+
+/* Define if you want CVS to be able to serve as a transparent proxy for write
+   operations. Disabling this may produce a slight performance gain on some
+   systems, at the expense of write proxy support. */
+#undef PROXY_SUPPORT
+
+/* Path to the pr utility */
+#undef PR_PROGRAM
+
+/* Define to force lib/regex.c to use malloc instead of alloca. */
+#define REGEX_MALLOC 1
+
+/* Define if rename does not work for source file names with a trailing slash,
+   like the one from SunOS 4.1.1_U1. */
+#undef RENAME_TRAILING_SLASH_BUG
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The default remote shell to use, if one does not specify the CVS_RSH
+   environment variable. */
+#define RSH_DFLT "rsh"
+
+/* If you are working with a large remote repository and a 'cvs checkout' is
+   swamping your network and memory, define these to enable flow control. You
+   will end up with even less probability of a consistent checkout (see
+   Concurrency in cvs.texinfo), but CVS doesn't try to guarantee that anyway.
+   The master server process will monitor how far it is getting behind, if it
+   reaches the high water mark, it will signal the child process to stop
+   generating data when convenient (ie: no locks are held, currently at the
+   beginning of a new directory). Once the buffer has drained sufficiently to
+   reach the low water mark, it will be signalled to start again. */
+#undef SERVER_FLOWCONTROL
+
+/* The high water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_HI_WATER
+
+/* The low water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_LO_WATER
+
+/* Define if you want CVS to be able to serve repositories to remote clients.
+   */
+#undef SERVER_SUPPORT
+
+/* The size of a `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of a `double', as computed by sizeof. */
+#define SIZEOF_DOUBLE 8
+
+/* The size of a `float', as computed by sizeof. */
+#define SIZEOF_FLOAT 4
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `intmax_t', as computed by sizeof. */
+#undef SIZEOF_INTMAX_T
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of a `long double', as computed by sizeof. */
+#define SIZEOF_LONG_DOUBLE 8
+
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of a `ptrdiff_t', as computed by sizeof. */
+#define SIZEOF_PTRDIFF_T 4
+
+/* The size of a `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of a `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
+/* The size of a `wint_t', as computed by sizeof. */
+#define SIZEOF_WINT_T 2
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#define SIZE_MAX (~(size_t)0)
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#define STAT_MACROS_BROKEN 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Enable support for the pre 1.12.1 *info scripting hook format strings.
+   Disable this option for a smaller executable once your scripting hooks have
+   been updated to use the new *info format strings by passing
+   "--disable-old-info-format-support" option to configure or by commenting
+   out the line below. */
+#undef SUPPORT_OLD_INFO_FMT_STRINGS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Directory used for storing temporary files, if not overridden by
+   environment variables or the -T global option. There should be little need
+   to change this (-T is a better mechanism if you need to use a different
+   directory for temporary files). */
+#define TMPDIR_DFLT "c:\\temp"
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define if tzset clobbers localtime's static buffer. */
+#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
+
+/* The default umask to use when creating or otherwise setting file or
+   directory permissions in the repository. Must be a value in the range of 0
+   through 0777. For example, a value of 002 allows group rwx access and world
+   rx access; a value of 007 allows group rwx access but no world access. This
+   value is overridden by the value of the CVSUMASK environment variable,
+   which is interpreted as an octal number. */
+#define UMASK_DFLT 002
+
+/* Define if double is the first floating point type detected with its size.
+   */
+#undef UNIQUE_FLOAT_TYPE_DOUBLE
+
+/* Define if float is the first floating point type detected with its size. */
+#undef UNIQUE_FLOAT_TYPE_FLOAT
+
+/* Define if long double is the first floating point type detected with its
+   size. */
+#undef UNIQUE_FLOAT_TYPE_LONG_DOUBLE
+
+/* Define if char is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_CHAR
+
+/* Define if int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INT
+
+/* Define if intmax_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INTMAX_T
+
+/* Define if long int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG
+
+/* Define if long long is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG_LONG
+
+/* Define if ptrdiff_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_PTRDIFF_T
+
+/* Define if short is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SHORT
+
+/* Define if size_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SIZE_T
+
+/* Define if wint_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_WINT_T
+
+/* Define if setmode is required when writing binary data to stdout. */
+#define USE_SETMODE_STDOUT 1
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+   Unlocked I/O can improve performance in unithreaded apps, but it is not
+   safe for multithreaded apps. */
+#undef USE_UNLOCKED_IO
+
+/* Define if utime requires write access to the file (true on Windows, but not
+   Unix). */
+#define UTIME_EXPECTS_WRITABLE
+
+/* Define if unsetenv() returns void, not int. */
+#undef VOID_UNSETENV
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
+/* Define to force lib/regex.c to define re_comp et al. */
+#define _REGEX_RE_COMP 1
+
+/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+
+/* Define to rpl_ if the getcwd replacement function should be used. */
+#undef __GETCWD_PREFIX
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+   used. */
+#define __GETOPT_PREFIX rpl_
+
+/* Define to rpl_ if the openat replacement function should be used. */
+#undef __OPENAT_PREFIX
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to a replacement function name for fnmatch(). */
+#undef fnmatch
+
+/* Define to a replacement function name for getline(). */
+#undef getline
+
+/* Define to a replacement function name for getpass(). */
+#undef getpass
+
+/* Define to rpl_gettimeofday if the replacement function should be used. */
+#undef gettimeofday
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#define inline __inline
+#endif
+
+/* Define to long or long long if <inttypes.h> and <stdint.h> don't define. */
+#undef intmax_t
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to a type if <wchar.h> does not define. */
+#undef mbstate_t
+
+/* Define to rpl_mkdir if the replacement function should be used. */
+#undef mkdir
+
+/* Define to rpl_mkstemp if the replacement function should be used. */
+#undef mkstemp
+
+/* Define to rpl_mktime if the replacement function should be used. */
+#undef mktime
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define mode_t int
+
+/* Define to the name of the strftime replacement function. */
+#define my_strftime nstrftime
+
+/* Define to rpl_nanosleep if the replacement function should be used. */
+#define nanosleep woe32_nanosleep
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
+
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#define realloc rpl_realloc
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to rpl_rename if the replacement function should be used. */
+#undef rename
+
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+   supported. Do not define if restrict is supported directly. */
+#define restrict
+
+/* Define to rpl_select if the replacement function should be used. */
+#undef select
+
+/* Define to empty if the C compiler doesn't support this keyword. */
+#undef signed
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define as a signed type of the same size as size_t. */
+#define ssize_t int
+
+/* Define to rpl_strcasecmp always. */
+#define strcasecmp rpl_strcasecmp
+
+/* Define to rpl_tzset if the wrapper function should be used. */
+#undef tzset
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
+/*============================================================================*/
+/* config.h.in.footer:  configuration file for Windows NT
+   Conrad T. Pino <address@hidden> --- May 2004 */
+
+/* This file lives in the windows-NT subdirectory, which is only included
+   in your header search path if you're working under Microsoft Visual C++,
+   and use ../cvsnt.mak for your project.  Thus, this is the right place to
+   put configuration information for Windows NT.  */
+
+/* This file is getting chaotic and will be organized as follows:
+
+               Macros appears first alphabetized in case sensitive order.
+               Typedefs appear next alphabetized in case sensitive order.
+               Function prototypes alphabetized in case sensitive order.
+
+       Reorgnized by Conrad T. Pino <address@hidden> May 25, 2005 */
+
+/* just one time please */
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+/* ======================= Macro Definnitions Follow ====================== */
+
+/* Under Windows NT, mkdir only takes one argument.  */
+#define CVS_MKDIR wnt_mkdir
+
+#define CVS_RENAME wnt_rename
+
+/* This is where old bits go to die under Windows NT.  */
+#define DEVNULL "nul"
+
+/* Windows has no ELOOP value in errno.h */
+#define ELOOP EMLINK
+
+/* Windows has _snprintf function.
+   HAVE_DECL__SNPRINTF used in ../lib/vasnprintf.c */
+#define HAVE_DECL__SNPRINTF 1
+
+#define HAVE_WINSOCK_H
+
+/* This tells the client that it must use send()/recv() to talk to the
+   server if it is connected to the server via a socket; Win95 needs
+   it because _open_osfhandle doesn't work.  */
+#define NO_SOCKET_TO_FD 1
+
+/* Is this true on NT?  Seems like I remember reports that NT 3.51 has
+   problems with 200K writes (of course, the issue of large writes is
+   moot since the use of buffer.c ensures that writes will only be as big
+   as the buffers).  */
+#define SEND_NEVER_PARTIAL 1
+
+/* Stop server macro */
+#define SHUTDOWN_SERVER wnt_shutdown_server
+
+/* This tells the client that, in addition to needing to use
+   send()/recv() to do socket I/O, the error codes for send()/recv()
+   and other socket operations are not available through errno.
+   Instead, this macro should be used to obtain an error code. */
+#define SOCK_ERRNO (WSAGetLastError ())
+
+/* This tells the client that, in addition to needing to use
+   send()/recv() to do socket I/O, the error codes for send()/recv()
+   and other socket operations are not known to strerror.  Instead,
+   this macro should be used to convert the error codes to strings. */
+#define SOCK_STRERROR sock_strerror
+
+/* Start server macro */
+#define START_SERVER wnt_start_server
+
+/* The internal rsh client uses sockets not file descriptors.  Note
+   that as the code stands now, it often takes values from a SOCKET and
+   puts them in an int.  This is ugly but it seems like sizeof
+   (SOCKET) <= sizeof (int) on win32, even the 64-bit variants.  */
+#define START_SERVER_RETURNS_SOCKET 1
+
+/* Macro name tells the story */
+#define SYSTEM_CLEANUP woe32_cleanup
+
+/* Macro name tells the story */
+#define SYSTEM_INITIALIZE(pargc,pargv) woe32_init_winsock()
+
+/*
+ * According to GNU conventions, we should avoid referencing any macro
+ * containing "WIN" as a reference to Microsoft Windows, as we would like to
+ * avoid any implication that we consider Microsoft Windows any sort of "win".
+ *
+ * FIXME: As of 2003-06-09, folks on the GNULIB project were discussing
+ * defining a configure macro to define WOE32 appropriately.  If they ever do
+ * write such a beast, we should use it, though in most cases it would be
+ * preferable to avoid referencing any OS or compiler anyhow, per Autoconf
+ * convention, and reference only tested features of the system.
+ *
+ * re FIXME: This definition would still be necessary since systems which run
+ * configure do not use this config.h and vice-versa.
+ */
+#define WOE32 1
+
+/* Define POSIX name to Microsoft name */
+#define dup _dup
+
+/* getpagesize is missing on Windows, 4096 does the right thing. */
+#define getpagesize() 4096
+
+/* Define to a substitute for the `lstat' function. */
+#define lstat stat
+
+/* Define POSIX name to Microsoft name */
+#define popen _popen
+
+/* Define POSIX name to Microsoft name */
+#define pclose _pclose
+
+/* Diff needs us to define this.  I think it could always be
+   -1 for CVS, because we pass temporary files to diff, but
+   config.h seems like the easiest place to put this, so for
+   now we put it here.  */
+#define same_file(s,t) (-1)
+
+/* Define to a substitute for the stat function. */
+#define stat wnt_stat
+
+/* ====================== Typedef Declarations Follow ===================== */
+
+/* ====================== Function Prototypes Follow ====================== */
+
+#include <woe32.h>
+
+/* #define SOCK_STRERROR sock_strerror */
+char *sock_strerror (int errnum);
+
+/* #define CVS_MKDIR wnt_mkdir */
+int wnt_mkdir (const char *PATH, int MODE);
+
+/* #define CVS_RENAME wnt_rename */
+int wnt_rename (const char *, const char *);
+
+/* #define SHUTDOWN_SERVER wnt_shutdown_server */
+void wnt_shutdown_server (int fd);
+
+/* #define START_SERVER wnt_start_server */
+void wnt_start_server (int *tofd, int *fromfd,
+                      char *client_user,
+                      char *server_user,
+                      char *server_host,
+                      char *server_cvsroot);
+
+/* #define stat wnt_stat and #define lstat wnt_stat */
+int wnt_stat (const char *file, struct wnt_stat *sb);
+
+/* =============== Special mkdir Prototype Handling Follows =============== */
+
+#include <direct.h>
+#define mkdir wnt_mkdir
+
+/* ===================== Special Function Definitions ===================== */
+
+/*
+       Microsoft defines "mbinit" in <wchar.h> for C++ code only.
+
+       Expect link errors for versions:
+
+               earlier than Visual C++ 5.0
+
+               later than Visual C++ .NET 2003
+
+       and Visual C++ .NET is just a guess which might be wrong.
+*/
+
+#if _MSC_VER >= 1100 && _MSC_VER <= 1200
+
+/* If within Visual C++ 5.0 to Visual C++ 6.0 */
+
+inline int mbsinit (const void * arg)
+       { return 1; }
+
+#elif _MSC_VER >= 1300 && _MSC_VER <= 1310
+
+/* If within Visual C++ .NET to Visual C++ .NET 2003 */
+
+inline int mbsinit (const int * arg)
+        { return arg == NULL || ! *arg; }
+
+#endif
+
+/* =========================== End Of This File =========================== */
Index: ccvs/windows-NT/config.h.in
diff -u /dev/null ccvs/windows-NT/config.h.in:1.101.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/windows-NT/config.h.in Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1518 @@
+/***
+ *** config.h.in, generated by mkconfig.pl:
+ ***
+ ***   (config.h.in.in
+ ***    + ../config.h.in)
+ ***   . config.h.in.footer
+ ***   --> config.h.in
+ ***
+ *** ***** DO NOT ALTER THIS FILE!!! *****
+ ***
+ *** Changes to this file will be overwritten by automatic script runs.
+ *** Changes should be made to the config.h.in.in & config.h.in.footer
+ *** files instead.
+ ***/
+
+/* config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define this to a NULL terminated list of allowed path prefixes (for
+   directories) and paths to files the CVS server will allow configuration to
+   be read from when specified from the command line. */
+#undef ALLOW_CONFIG_OVERRIDE
+
+/* Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access method in
+   the CVS client (default) */
+#define AUTH_CLIENT_SUPPORT 1
+
+/* Define if you want to use the password authenticated server. */
+#undef AUTH_SERVER_SUPPORT
+
+/* Define if you want CVS to be able to be a remote repository client. */
+#define CLIENT_SUPPORT
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* define if cross compiling */
+#undef CROSS_COMPILING
+
+/* The CVS admin command is restricted to the members of the group
+   CVS_ADMIN_GROUP. If this group does not exist, all users are allowed to run
+   CVS admin. To disable the CVS admin command for all users, create an empty
+   CVS_ADMIN_GROUP by running configure with the --with-cvs-admin-group=
+   option. To disable access control for CVS admin, run configure with the
+   --without-cvs-admin-group option in order to comment out the define below.
+   */
+#undef CVS_ADMIN_GROUP
+
+/* When committing a permanent change, CVS and RCS make a log entry of who
+   committed the change. If you are committing the change logged in as "root"
+   (not under "su" or other root-priv giving program), CVS/RCS cannot
+   determine who is actually making the change. As such, by default, CVS
+   prohibits changes committed by users logged in as "root". You can disable
+   checking by passing the "--enable-rootcommit" option to configure or by
+   commenting out the lines below. */
+#undef CVS_BADROOT
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to a command line template that will write an OpenPGP signature for
+   the file `%s' to its standard out. `%t' is substituted at run time with an
+   option which flags files as text files, when necessary, and the empty
+   string, otherwise. `%a' is substituted with a list of arguments provided by
+   the user. */
+#undef DEFAULT_SIGN_TEMPLATE
+
+/* Define to the option string that the OpenPGP program used in the
+   DEFAULT_SIGN_TEMPLATE would like to see for text files (substituted at run
+   time in place of `%t' in the DEFAULT_SIGN_TEMPLATE). */
+#undef DEFAULT_SIGN_TEXTMODE
+
+/* Define if there is a member named d_ino in the struct describing directory
+   headers. */
+#undef D_INO_IN_DIRENT
+
+/* The default editor to use, if one does not specify the "-e" option to cvs,
+   or does not have an EDITOR environment variable. If this is not set to an
+   absolute path to an executable, use the shell to find where the editor
+   actually is. This allows sites with /usr/bin/vi or /usr/ucb/vi to work
+   equally well (assuming that their PATH is reasonable). */
+#define EDITOR_DFLT "notepad"
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to enable encryption support. */
+#undef ENCRYPTION
+
+/* Define as good substitute value for EOVERFLOW. */
+#define EOVERFLOW EINVAL
+
+/* Define if this executable will be running on case insensitive file systems.
+   In the client case, this means that it will request that the server pretend
+   to be case insensitive if it isn't already. */
+#define FILENAMES_CASE_INSENSITIVE 1
+
+/* Define on systems for which file names may have a so-called `drive letter'
+   prefix, define this to compute the length of that prefix, including the
+   colon. */
+#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1
+
+/* Define if the backslash character may also serve as a file name component
+   separator. */
+#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1
+
+#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+#endif
+
+/* When committing or importing files, you must enter a log message. Normally,
+   you can do this either via the -m flag on the command line, the -F flag on
+   the command line, or an editor will be started for you. If you like to use
+   logging templates (the rcsinfo file within the $CVSROOT/CVSROOT directory),
+   you might want to force people to use the editor even if they specify a
+   message with -m or -F. Enabling FORCE_USE_EDITOR will cause the -m or -F
+   message to be appended to the temp file when the editor is started. */
+#undef FORCE_USE_EDITOR
+
+/* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+   in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only
+   relevant when using GSSAPI. */
+#undef GSS_C_NT_HOSTBASED_SERVICE
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have `alloca' after including <alloca.h>, a header that
+   may be supplied by this distribution. */
+#undef HAVE_ALLOCA
+
+/* Define HAVE_ALLOCA_H for backward compatibility with older code that
+   includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `atexit' function. */
+#define HAVE_ATEXIT 1
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#undef HAVE_BP_SYM_H
+
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `chsize' function. */
+#define HAVE_CHSIZE 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define if you have compound literals. */
+#undef HAVE_COMPOUND_LITERALS
+
+/* Define if you have the connect function. */
+#define HAVE_CONNECT
+
+/* Define if you have the crypt function. */
+#undef HAVE_CRYPT
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FERROR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `flockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FLOCKFILE
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FREAD_UNLOCKED
+
+/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FREEADDRINFO
+
+/* Define to 1 if you have the declaration of `funlockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FUNLOCKFILE
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GAI_STRERROR
+
+/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETADDRINFO
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
+   */
+#define HAVE_DECL_GETCWD 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDELIM
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+   */
+#define HAVE_DECL_GETENV 1
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLINE
+
+/* Define to 1 if you have the declaration of `getlogin', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN
+
+/* Define to 1 if you have the declaration of `getlogin_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN_R
+
+/* Define to 1 if you have the declaration of `getpass', and to 0 if you
+   don't. */
+#define HAVE_DECL_GETPASS 1
+
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
+   don't. */
+#define HAVE_DECL_NANOSLEEP 1
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_PUTCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#define HAVE_DECL_STRDUP 1
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+   don't. */
+#define HAVE_DECL___FPENDING 0
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dup2' function. */
+#define HAVE_DUP2 1
+
+/* Define if you have the declaration of environ. */
+#define HAVE_ENVIRON_DECL 1
+
+/* Define if you have the declaration of errno. */
+#define HAVE_ERRNO_DECL 1
+
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
+/* Define to 1 if you have the `fchmod' function. */
+#undef HAVE_FCHMOD
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `fsync' function. */
+#undef HAVE_FSYNC
+
+/* Define to 1 if you have the `ftime' function. */
+#define HAVE_FTIME 1
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `funlockfile' function. */
+#undef HAVE_FUNLOCKFILE
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#undef HAVE_GAI_STRERROR
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getdelim' function. */
+#undef HAVE_GETDELIM
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgroups' function. */
+#undef HAVE_GETGROUPS
+
+/* Define to 1 if you have the `gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the `getlogin_r' function. */
+#undef HAVE_GETLOGIN_R
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getpwnam_r' function. */
+#undef HAVE_GETPWNAM_R
+
+/* Define if you have the getspnam function. */
+#undef HAVE_GETSPNAM
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <glob.h> header file. */
+#define HAVE_GLOB_H 1
+
+/* Define if you have GSSAPI with Kerberos version 5 available. */
+#undef HAVE_GSSAPI
+
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
+
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_H
+
+/* Define to 1 if you have the <gssapi.h> header file. */
+#undef HAVE_GSSAPI_H
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the `initgroups' function. */
+#undef HAVE_INITGROUPS
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <io.h> header file. */
+#define HAVE_IO_H 1
+
+/* Define to 1 if <sys/socket.h> defines AF_INET. */
+#define HAVE_IPV4 1
+
+/* Define to 1 if <sys/socket.h> defines AF_INET6. */
+#undef HAVE_IPV6
+
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII 1
+
+/* Define to 1 if you have the `isblank' function. */
+#undef HAVE_ISBLANK
+
+/* Define to 1 if you have the `iswprint' function. */
+#define HAVE_ISWPRINT 1
+
+/* Define if you have MIT Kerberos version 4 available. */
+#undef HAVE_KERBEROS
+
+/* Define to 1 if you have the <krb5.h> header file. */
+#undef HAVE_KRB5_H
+
+/* Define to 1 if you have the `krb_get_err_text' function. */
+#undef HAVE_KRB_GET_ERR_TEXT
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the `krb' library (-lkrb). */
+#undef HAVE_LIBKRB
+
+/* Define to 1 if you have the `krb4' library (-lkrb4). */
+#undef HAVE_LIBKRB4
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `login' function. */
+#undef HAVE_LOGIN
+
+/* Define to 1 if you have the `logout' function. */
+#undef HAVE_LOGOUT
+
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if you support file names longer than 14 characters. */
+#define HAVE_LONG_FILE_NAMES 1
+
+/* Define if you have the 'long long' type. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+   config.h and <sys/mman.h>. */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to 1 if you have the `mblen' function. */
+#define HAVE_MBLEN 1
+
+/* Define to 1 if you have the `mbrlen' function. */
+#define HAVE_MBRLEN 1
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#define HAVE_MBRTOWC 1
+
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
+/* Define to 1 if you have the `mbsrtowcs' function. */
+#define HAVE_MBSRTOWCS 1
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#define HAVE_MBSTATE_T 1
+
+/* Define if you have memchr (always for CVS). */
+#define HAVE_MEMCHR 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
+#define HAVE_MINMAX_IN_LIMITS_H 1
+
+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_SYS_PARAM_H
+
+/* Define to 1 if you have the `mknod' function. */
+#undef HAVE_MKNOD
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `nanotime' function. */
+#undef HAVE_NANOTIME
+
+/* Define to 1 if you have the <ndbm.h> header file. */
+#undef HAVE_NDBM_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#define HAVE_NDIR_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
+/* Define if an OpenPGP capable program is available (and, assumedly, usable
+   command line templates are in the DEFAULT_SIGN_TEMPLATE and
+   DEFAULT_VERIFY_TEMPLATE macros). */
+#undef HAVE_OPENPGP
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
+/* Define to enable system authentication with PAM instead of using the simple
+   getpwnam interface. This allows authentication (in theory) with any PAM
+   module, e.g. on systems with shadow passwords or via LDAP */
+#undef HAVE_PAM
+
+/* Define to 1 if pam/pam_appl.h is available */
+#undef HAVE_PAM_PAM_APPL_H
+
+/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX is not
+   defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD is defined.
+   */
+#undef HAVE_PARTLY_WORKING_GETCWD
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
+
+/* Define to 1 if the `printf' function supports the %p format for printing
+   pointers. */
+#define HAVE_PRINTF_PTR 1
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#define HAVE_PTRDIFF_T 1
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the `regcomp' function. */
+#undef HAVE_REGCOMP
+
+/* Define to 1 if you have the `regerror' function. */
+#undef HAVE_REGERROR
+
+/* Define to 1 if you have the `regexec' function. */
+#undef HAVE_REGEXEC
+
+/* Define to 1 if you have the `regfree' function. */
+#undef HAVE_REGFREE
+
+/* Define to 1 if you have the `resolvepath' function. */
+#undef HAVE_RESOLVEPATH
+
+/* Define to 1 if you have the `rpmatch' function. */
+#undef HAVE_RPMATCH
+
+/* Define to 1 if you have run the test for working tzset. */
+#define HAVE_RUN_TZSET_TEST 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#define HAVE_SEARCH_H 1
+
+/* Define to 1 if security/pam_appl.h is available */
+#undef HAVE_SECURITY_PAM_APPL_H
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define if the diff library should use setmode for binary files. */
+#define HAVE_SETMODE 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `sigblock' function. */
+#undef HAVE_SIGBLOCK
+
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define to 1 if you have the `sigsetmask' function. */
+#undef HAVE_SIGSETMASK
+
+/* Define to 1 if you have the `sigvec' function. */
+#undef HAVE_SIGVEC
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have strchr (always for CVS). */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#undef HAVE_STRUCT_ADDRINFO
+
+/* Define if there is a member named d_type in the struct describing directory
+   headers. */
+#undef HAVE_STRUCT_DIRENT_D_TYPE
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+
+/* Define if struct timespec is declared in <time.h>. */
+#undef HAVE_STRUCT_TIMESPEC
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/bsdtypes.h> header file. */
+#undef HAVE_SYS_BSDTYPES_H
+
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#undef HAVE_TCGETATTR
+
+/* Define to 1 if you have the `tcsetattr' function. */
+#undef HAVE_TCSETATTR
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `timezone' function. */
+#undef HAVE_TIMEZONE
+
+/* Define to 1 if localtime_r, etc. have the type signatures that POSIX
+   requires. */
+#undef HAVE_TIME_R_POSIX
+
+/* Define if struct tm has the tm_gmtoff member. */
+#undef HAVE_TM_GMTOFF
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#define HAVE_TZNAME 1
+
+/* Define to 1 if you have the `tzset' function. */
+#define HAVE_TZSET 1
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
+#define HAVE_UTIME_NULL 1
+
+/* Define to 1 if you have the `vasnprintf' function. */
+#undef HAVE_VASNPRINTF
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `wait3' function. */
+#undef HAVE_WAIT3
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define if you have the 'wchar_t' type. */
+#define HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#define HAVE_WCRTOMB 1
+
+/* Define to 1 if you have the `wcscoll' function. */
+#define HAVE_WCSCOLL 1
+
+/* Define to 1 if you have the `wcslen' function. */
+#define HAVE_WCSLEN 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define HAVE_WCTYPE_H 1
+
+/* Define if you have the 'wint_t' type. */
+#define HAVE_WINT_T 1
+
+/* Define to 1 if you have the `wmemchr' function. */
+#define HAVE_WMEMCHR 1
+
+/* Define to 1 if you have the `wmemcpy' function. */
+#define HAVE_WMEMCPY 1
+
+/* Define to 1 if you have the `wmempcpy' function. */
+#undef HAVE_WMEMPCPY
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `__fpending' function. */
+#undef HAVE___FPENDING
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+/* Define to include locking code which prevents versions of CVS earlier than
+   1.12.4 directly accessing the same repositiory as this executable from
+   ignoring this executable's promotable read locks. If only CVS versions
+   1.12.4 and later will be accessing your repository directly (as a server or
+   locally), you can safely disable this option in return for fewer disk
+   accesses and a small speed increase. Disabling this option when versions of
+   CVS earlier than 1,12,4 _will_ be accessing your repository, however, is
+   *VERY* *VERY* *VERY* dangerous and could result in data loss. As such, by
+   default, CVS is compiled with this code enabled. If you are sure you would
+   like this code disabled, you can disable it by passing the
+   "--disable-lock-compatibility" option to configure or by commenting out the
+   lines below. */
+#define LOCK_COMPATIBILITY
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#undef MALLOC_0_IS_NONNULL
+
+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
+#undef MAP_ANONYMOUS
+
+/* By default, CVS stores its modules and other such items in flat text files
+   (MY_NDBM enables this). Turning off MY_NDBM causes CVS to look for a
+   system-supplied ndbm database library and use it instead. That may speed
+   things up, but the default setting generally works fine too. */
+#define MY_NDBM
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "%PACKAGE_BUGREPORT%"
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "%PACKAGE_STRING%"
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to set a service name for PAM. This must be defined. Define to
+   `program_name', without the quotes, to use whatever name CVS was invoked
+   as. Otherwise, define to a double-quoted literal string, such as `"cvs"'.
+   */
+#undef PAM_SERVICE_NAME
+
+/* the number of pending output bytes on stream `fp' */
+#define PENDING_OUTPUT_N_BYTES ( fp ? fp->_ptr - fp->_base : 0 )
+
+/* Define if you want CVS to be able to serve as a transparent proxy for write
+   operations. Disabling this may produce a slight performance gain on some
+   systems, at the expense of write proxy support. */
+#undef PROXY_SUPPORT
+
+/* Path to the pr utility */
+#undef PR_PROGRAM
+
+/* Define to force lib/regex.c to use malloc instead of alloca. */
+#define REGEX_MALLOC 1
+
+/* Define if rename does not work for source file names with a trailing slash,
+   like the one from SunOS 4.1.1_U1. */
+#undef RENAME_TRAILING_SLASH_BUG
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The default remote shell to use, if one does not specify the CVS_RSH
+   environment variable. */
+#define RSH_DFLT "rsh"
+
+/* If you are working with a large remote repository and a 'cvs checkout' is
+   swamping your network and memory, define these to enable flow control. You
+   will end up with even less probability of a consistent checkout (see
+   Concurrency in cvs.texinfo), but CVS doesn't try to guarantee that anyway.
+   The master server process will monitor how far it is getting behind, if it
+   reaches the high water mark, it will signal the child process to stop
+   generating data when convenient (ie: no locks are held, currently at the
+   beginning of a new directory). Once the buffer has drained sufficiently to
+   reach the low water mark, it will be signalled to start again. */
+#undef SERVER_FLOWCONTROL
+
+/* The high water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_HI_WATER
+
+/* The low water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_LO_WATER
+
+/* Define if you want CVS to be able to serve repositories to remote clients.
+   */
+#undef SERVER_SUPPORT
+
+/* The size of a `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of a `double', as computed by sizeof. */
+#define SIZEOF_DOUBLE 8
+
+/* The size of a `float', as computed by sizeof. */
+#define SIZEOF_FLOAT 4
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `intmax_t', as computed by sizeof. */
+#undef SIZEOF_INTMAX_T
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of a `long double', as computed by sizeof. */
+#define SIZEOF_LONG_DOUBLE 8
+
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of a `ptrdiff_t', as computed by sizeof. */
+#define SIZEOF_PTRDIFF_T 4
+
+/* The size of a `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of a `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
+/* The size of a `wint_t', as computed by sizeof. */
+#define SIZEOF_WINT_T 2
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#define SIZE_MAX (~(size_t)0)
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#define STAT_MACROS_BROKEN 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Enable support for the pre 1.12.1 *info scripting hook format strings.
+   Disable this option for a smaller executable once your scripting hooks have
+   been updated to use the new *info format strings by passing
+   "--disable-old-info-format-support" option to configure or by commenting
+   out the line below. */
+#undef SUPPORT_OLD_INFO_FMT_STRINGS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Directory used for storing temporary files, if not overridden by
+   environment variables or the -T global option. There should be little need
+   to change this (-T is a better mechanism if you need to use a different
+   directory for temporary files). */
+#define TMPDIR_DFLT "c:\\temp"
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define if tzset clobbers localtime's static buffer. */
+#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
+
+/* The default umask to use when creating or otherwise setting file or
+   directory permissions in the repository. Must be a value in the range of 0
+   through 0777. For example, a value of 002 allows group rwx access and world
+   rx access; a value of 007 allows group rwx access but no world access. This
+   value is overridden by the value of the CVSUMASK environment variable,
+   which is interpreted as an octal number. */
+#define UMASK_DFLT 002
+
+/* Define if double is the first floating point type detected with its size.
+   */
+#undef UNIQUE_FLOAT_TYPE_DOUBLE
+
+/* Define if float is the first floating point type detected with its size. */
+#undef UNIQUE_FLOAT_TYPE_FLOAT
+
+/* Define if long double is the first floating point type detected with its
+   size. */
+#undef UNIQUE_FLOAT_TYPE_LONG_DOUBLE
+
+/* Define if char is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_CHAR
+
+/* Define if int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INT
+
+/* Define if intmax_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INTMAX_T
+
+/* Define if long int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG
+
+/* Define if long long is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG_LONG
+
+/* Define if ptrdiff_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_PTRDIFF_T
+
+/* Define if short is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SHORT
+
+/* Define if size_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SIZE_T
+
+/* Define if wint_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_WINT_T
+
+/* Define if setmode is required when writing binary data to stdout. */
+#define USE_SETMODE_STDOUT 1
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+   Unlocked I/O can improve performance in unithreaded apps, but it is not
+   safe for multithreaded apps. */
+#undef USE_UNLOCKED_IO
+
+/* Define if utime requires write access to the file (true on Windows, but not
+   Unix). */
+#define UTIME_EXPECTS_WRITABLE
+
+/* Define if unsetenv() returns void, not int. */
+#undef VOID_UNSETENV
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
+/* Define to force lib/regex.c to define re_comp et al. */
+#define _REGEX_RE_COMP 1
+
+/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+
+/* Define to rpl_ if the getcwd replacement function should be used. */
+#undef __GETCWD_PREFIX
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+   used. */
+#define __GETOPT_PREFIX rpl_
+
+/* Define to rpl_ if the openat replacement function should be used. */
+#undef __OPENAT_PREFIX
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to a replacement function name for fnmatch(). */
+#undef fnmatch
+
+/* Define to a replacement function name for getline(). */
+#undef getline
+
+/* Define to a replacement function name for getpass(). */
+#undef getpass
+
+/* Define to rpl_gettimeofday if the replacement function should be used. */
+#undef gettimeofday
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#define inline __inline
+#endif
+
+/* Define to long or long long if <inttypes.h> and <stdint.h> don't define. */
+#undef intmax_t
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to a type if <wchar.h> does not define. */
+#undef mbstate_t
+
+/* Define to rpl_mkdir if the replacement function should be used. */
+#undef mkdir
+
+/* Define to rpl_mkstemp if the replacement function should be used. */
+#undef mkstemp
+
+/* Define to rpl_mktime if the replacement function should be used. */
+#undef mktime
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define mode_t int
+
+/* Define to the name of the strftime replacement function. */
+#define my_strftime nstrftime
+
+/* Define to rpl_nanosleep if the replacement function should be used. */
+#define nanosleep woe32_nanosleep
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
+
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#define realloc rpl_realloc
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to rpl_rename if the replacement function should be used. */
+#undef rename
+
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+   supported. Do not define if restrict is supported directly. */
+#define restrict
+
+/* Define to rpl_select if the replacement function should be used. */
+#undef select
+
+/* Define to empty if the C compiler doesn't support this keyword. */
+#undef signed
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define as a signed type of the same size as size_t. */
+#define ssize_t int
+
+/* Define to rpl_strcasecmp always. */
+#define strcasecmp rpl_strcasecmp
+
+/* Define to rpl_tzset if the wrapper function should be used. */
+#undef tzset
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
+/*============================================================================*/
+/* config.h.in.footer:  configuration file for Windows NT
+   Conrad T. Pino <address@hidden> --- May 2004 */
+
+/* This file lives in the windows-NT subdirectory, which is only included
+   in your header search path if you're working under Microsoft Visual C++,
+   and use ../cvsnt.mak for your project.  Thus, this is the right place to
+   put configuration information for Windows NT.  */
+
+/* This file is getting chaotic and will be organized as follows:
+
+               Macros appears first alphabetized in case sensitive order.
+               Typedefs appear next alphabetized in case sensitive order.
+               Function prototypes alphabetized in case sensitive order.
+
+       Reorgnized by Conrad T. Pino <address@hidden> May 25, 2005 */
+
+/* just one time please */
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+/* ======================= Macro Definnitions Follow ====================== */
+
+/* Under Windows NT, mkdir only takes one argument.  */
+#define CVS_MKDIR wnt_mkdir
+
+#define CVS_RENAME wnt_rename
+
+/* This is where old bits go to die under Windows NT.  */
+#define DEVNULL "nul"
+
+/* Windows has no ELOOP value in errno.h */
+#define ELOOP EMLINK
+
+/* Windows has _snprintf function.
+   HAVE_DECL__SNPRINTF used in ../lib/vasnprintf.c */
+#define HAVE_DECL__SNPRINTF 1
+
+#define HAVE_WINSOCK_H
+
+/* This tells the client that it must use send()/recv() to talk to the
+   server if it is connected to the server via a socket; Win95 needs
+   it because _open_osfhandle doesn't work.  */
+#define NO_SOCKET_TO_FD 1
+
+/* Is this true on NT?  Seems like I remember reports that NT 3.51 has
+   problems with 200K writes (of course, the issue of large writes is
+   moot since the use of buffer.c ensures that writes will only be as big
+   as the buffers).  */
+#define SEND_NEVER_PARTIAL 1
+
+/* Stop server macro */
+#define SHUTDOWN_SERVER wnt_shutdown_server
+
+/* This tells the client that, in addition to needing to use
+   send()/recv() to do socket I/O, the error codes for send()/recv()
+   and other socket operations are not available through errno.
+   Instead, this macro should be used to obtain an error code. */
+#define SOCK_ERRNO (WSAGetLastError ())
+
+/* This tells the client that, in addition to needing to use
+   send()/recv() to do socket I/O, the error codes for send()/recv()
+   and other socket operations are not known to strerror.  Instead,
+   this macro should be used to convert the error codes to strings. */
+#define SOCK_STRERROR sock_strerror
+
+/* Start server macro */
+#define START_SERVER wnt_start_server
+
+/* The internal rsh client uses sockets not file descriptors.  Note
+   that as the code stands now, it often takes values from a SOCKET and
+   puts them in an int.  This is ugly but it seems like sizeof
+   (SOCKET) <= sizeof (int) on win32, even the 64-bit variants.  */
+#define START_SERVER_RETURNS_SOCKET 1
+
+/* Macro name tells the story */
+#define SYSTEM_CLEANUP woe32_cleanup
+
+/* Macro name tells the story */
+#define SYSTEM_INITIALIZE(pargc,pargv) woe32_init_winsock()
+
+/*
+ * According to GNU conventions, we should avoid referencing any macro
+ * containing "WIN" as a reference to Microsoft Windows, as we would like to
+ * avoid any implication that we consider Microsoft Windows any sort of "win".
+ *
+ * FIXME: As of 2003-06-09, folks on the GNULIB project were discussing
+ * defining a configure macro to define WOE32 appropriately.  If they ever do
+ * write such a beast, we should use it, though in most cases it would be
+ * preferable to avoid referencing any OS or compiler anyhow, per Autoconf
+ * convention, and reference only tested features of the system.
+ *
+ * re FIXME: This definition would still be necessary since systems which run
+ * configure do not use this config.h and vice-versa.
+ */
+#define WOE32 1
+
+/* Define POSIX name to Microsoft name */
+#define dup _dup
+
+/* getpagesize is missing on Windows, 4096 does the right thing. */
+#define getpagesize() 4096
+
+/* Define to a substitute for the `lstat' function. */
+#define lstat stat
+
+/* Define POSIX name to Microsoft name */
+#define popen _popen
+
+/* Define POSIX name to Microsoft name */
+#define pclose _pclose
+
+/* Diff needs us to define this.  I think it could always be
+   -1 for CVS, because we pass temporary files to diff, but
+   config.h seems like the easiest place to put this, so for
+   now we put it here.  */
+#define same_file(s,t) (-1)
+
+/* Define to a substitute for the stat function. */
+#define stat wnt_stat
+
+/* ====================== Typedef Declarations Follow ===================== */
+
+/* ====================== Function Prototypes Follow ====================== */
+
+#include <woe32.h>
+
+/* #define SOCK_STRERROR sock_strerror */
+char *sock_strerror (int errnum);
+
+/* #define CVS_MKDIR wnt_mkdir */
+int wnt_mkdir (const char *PATH, int MODE);
+
+/* #define CVS_RENAME wnt_rename */
+int wnt_rename (const char *, const char *);
+
+/* #define SHUTDOWN_SERVER wnt_shutdown_server */
+void wnt_shutdown_server (int fd);
+
+/* #define START_SERVER wnt_start_server */
+void wnt_start_server (int *tofd, int *fromfd,
+                      char *client_user,
+                      char *server_user,
+                      char *server_host,
+                      char *server_cvsroot);
+
+/* #define stat wnt_stat and #define lstat wnt_stat */
+int wnt_stat (const char *file, struct wnt_stat *sb);
+
+/* =============== Special mkdir Prototype Handling Follows =============== */
+
+#include <direct.h>
+#define mkdir wnt_mkdir
+
+/* ===================== Special Function Definitions ===================== */
+
+/*
+       Microsoft defines "mbinit" in <wchar.h> for C++ code only.
+
+       Expect link errors for versions:
+
+               earlier than Visual C++ 5.0
+
+               later than Visual C++ .NET 2003
+
+       and Visual C++ .NET is just a guess which might be wrong.
+*/
+
+#if _MSC_VER >= 1100 && _MSC_VER <= 1200
+
+/* If within Visual C++ 5.0 to Visual C++ 6.0 */
+
+inline int mbsinit (const void * arg)
+       { return 1; }
+
+#elif _MSC_VER >= 1300 && _MSC_VER <= 1310
+
+/* If within Visual C++ .NET to Visual C++ .NET 2003 */
+
+inline int mbsinit (const int * arg)
+        { return arg == NULL || ! *arg; }
+
+#endif
+
+/* =========================== End Of This File =========================== */
Index: ccvs/windows-NT/stamp-chi
diff -u /dev/null ccvs/windows-NT/stamp-chi:1.87.2.1
--- /dev/null   Wed Dec 21 13:25:13 2005
+++ ccvs/windows-NT/stamp-chi   Wed Dec 21 13:25:10 2005
@@ -0,0 +1,1518 @@
+/***
+ *** config.h.in, generated by mkconfig.pl:
+ ***
+ ***   (config.h.in.in
+ ***    + ../config.h.in)
+ ***   . config.h.in.footer
+ ***   --> config.h.in
+ ***
+ *** ***** DO NOT ALTER THIS FILE!!! *****
+ ***
+ *** Changes to this file will be overwritten by automatic script runs.
+ *** Changes should be made to the config.h.in.in & config.h.in.footer
+ *** files instead.
+ ***/
+
+/* config.h.in.  Generated from configure.in by autoheader.  */
+
+/* Define this to a NULL terminated list of allowed path prefixes (for
+   directories) and paths to files the CVS server will allow configuration to
+   be read from when specified from the command line. */
+#undef ALLOW_CONFIG_OVERRIDE
+
+/* Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access method in
+   the CVS client (default) */
+#define AUTH_CLIENT_SUPPORT 1
+
+/* Define if you want to use the password authenticated server. */
+#undef AUTH_SERVER_SUPPORT
+
+/* Define if you want CVS to be able to be a remote repository client. */
+#define CLIENT_SUPPORT
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* define if cross compiling */
+#undef CROSS_COMPILING
+
+/* The CVS admin command is restricted to the members of the group
+   CVS_ADMIN_GROUP. If this group does not exist, all users are allowed to run
+   CVS admin. To disable the CVS admin command for all users, create an empty
+   CVS_ADMIN_GROUP by running configure with the --with-cvs-admin-group=
+   option. To disable access control for CVS admin, run configure with the
+   --without-cvs-admin-group option in order to comment out the define below.
+   */
+#undef CVS_ADMIN_GROUP
+
+/* When committing a permanent change, CVS and RCS make a log entry of who
+   committed the change. If you are committing the change logged in as "root"
+   (not under "su" or other root-priv giving program), CVS/RCS cannot
+   determine who is actually making the change. As such, by default, CVS
+   prohibits changes committed by users logged in as "root". You can disable
+   checking by passing the "--enable-rootcommit" option to configure or by
+   commenting out the lines below. */
+#undef CVS_BADROOT
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to a command line template that will write an OpenPGP signature for
+   the file `%s' to its standard out. `%t' is substituted at run time with an
+   option which flags files as text files, when necessary, and the empty
+   string, otherwise. `%a' is substituted with a list of arguments provided by
+   the user. */
+#undef DEFAULT_SIGN_TEMPLATE
+
+/* Define to the option string that the OpenPGP program used in the
+   DEFAULT_SIGN_TEMPLATE would like to see for text files (substituted at run
+   time in place of `%t' in the DEFAULT_SIGN_TEMPLATE). */
+#undef DEFAULT_SIGN_TEXTMODE
+
+/* Define if there is a member named d_ino in the struct describing directory
+   headers. */
+#undef D_INO_IN_DIRENT
+
+/* The default editor to use, if one does not specify the "-e" option to cvs,
+   or does not have an EDITOR environment variable. If this is not set to an
+   absolute path to an executable, use the shell to find where the editor
+   actually is. This allows sites with /usr/bin/vi or /usr/ucb/vi to work
+   equally well (assuming that their PATH is reasonable). */
+#define EDITOR_DFLT "notepad"
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#undef ENABLE_NLS
+
+/* Define to enable encryption support. */
+#undef ENCRYPTION
+
+/* Define as good substitute value for EOVERFLOW. */
+#define EOVERFLOW EINVAL
+
+/* Define if this executable will be running on case insensitive file systems.
+   In the client case, this means that it will request that the server pretend
+   to be case insensitive if it isn't already. */
+#define FILENAMES_CASE_INSENSITIVE 1
+
+/* Define on systems for which file names may have a so-called `drive letter'
+   prefix, define this to compute the length of that prefix, including the
+   colon. */
+#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1
+
+/* Define if the backslash character may also serve as a file name component
+   separator. */
+#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1
+
+#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+  ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0)
+#else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+#endif
+
+/* When committing or importing files, you must enter a log message. Normally,
+   you can do this either via the -m flag on the command line, the -F flag on
+   the command line, or an editor will be started for you. If you like to use
+   logging templates (the rcsinfo file within the $CVSROOT/CVSROOT directory),
+   you might want to force people to use the editor even if they specify a
+   message with -m or -F. Enabling FORCE_USE_EDITOR will cause the -m or -F
+   message to be appended to the temp file when the editor is started. */
+#undef FORCE_USE_EDITOR
+
+/* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+   in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only
+   relevant when using GSSAPI. */
+#undef GSS_C_NT_HOSTBASED_SERVICE
+
+/* Define to 1 if you have the `alarm' function. */
+#undef HAVE_ALARM
+
+/* Define to 1 if you have `alloca' after including <alloca.h>, a header that
+   may be supplied by this distribution. */
+#undef HAVE_ALLOCA
+
+/* Define HAVE_ALLOCA_H for backward compatibility with older code that
+   includes <alloca.h> only if HAVE_ALLOCA_H is defined. */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `atexit' function. */
+#define HAVE_ATEXIT 1
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#undef HAVE_BP_SYM_H
+
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+   CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+   the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `chsize' function. */
+#define HAVE_CHSIZE 1
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if you have the `clock_settime' function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define if you have compound literals. */
+#undef HAVE_COMPOUND_LITERALS
+
+/* Define if you have the connect function. */
+#define HAVE_CONNECT
+
+/* Define if you have the crypt function. */
+#undef HAVE_CRYPT
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FERROR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `flockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FLOCKFILE
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FREAD_UNLOCKED
+
+/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FREEADDRINFO
+
+/* Define to 1 if you have the declaration of `funlockfile', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FUNLOCKFILE
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `gai_strerror', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GAI_STRERROR
+
+/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETADDRINFO
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
+   */
+#define HAVE_DECL_GETCWD 1
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDELIM
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+   */
+#define HAVE_DECL_GETENV 1
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLINE
+
+/* Define to 1 if you have the declaration of `getlogin', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN
+
+/* Define to 1 if you have the declaration of `getlogin_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN_R
+
+/* Define to 1 if you have the declaration of `getpass', and to 0 if you
+   don't. */
+#define HAVE_DECL_GETPASS 1
+
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
+   don't. */
+#define HAVE_DECL_NANOSLEEP 1
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+   you don't. */
+#undef HAVE_DECL_PUTCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+   don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#define HAVE_DECL_STRDUP 1
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+   don't. */
+#define HAVE_DECL___FPENDING 0
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the `dup2' function. */
+#define HAVE_DUP2 1
+
+/* Define if you have the declaration of environ. */
+#define HAVE_ENVIRON_DECL 1
+
+/* Define if you have the declaration of errno. */
+#define HAVE_ERRNO_DECL 1
+
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
+/* Define to 1 if you have the `fchmod' function. */
+#undef HAVE_FCHMOD
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `fsync' function. */
+#undef HAVE_FSYNC
+
+/* Define to 1 if you have the `ftime' function. */
+#define HAVE_FTIME 1
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `funlockfile' function. */
+#undef HAVE_FUNLOCKFILE
+
+/* Define to 1 if you have the `gai_strerror' function. */
+#undef HAVE_GAI_STRERROR
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `getdelim' function. */
+#undef HAVE_GETDELIM
+
+/* Define to 1 if you have the `geteuid' function. */
+#undef HAVE_GETEUID
+
+/* Define to 1 if you have the `getgroups' function. */
+#undef HAVE_GETGROUPS
+
+/* Define to 1 if you have the `gethostname' function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define to 1 if you have the `getlogin_r' function. */
+#undef HAVE_GETLOGIN_R
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getpwnam_r' function. */
+#undef HAVE_GETPWNAM_R
+
+/* Define if you have the getspnam function. */
+#undef HAVE_GETSPNAM
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <glob.h> header file. */
+#define HAVE_GLOB_H 1
+
+/* Define if you have GSSAPI with Kerberos version 5 available. */
+#undef HAVE_GSSAPI
+
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_GENERIC_H
+
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
+#undef HAVE_GSSAPI_GSSAPI_H
+
+/* Define to 1 if you have the <gssapi.h> header file. */
+#undef HAVE_GSSAPI_H
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the `initgroups' function. */
+#undef HAVE_INITGROUPS
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+   declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <io.h> header file. */
+#define HAVE_IO_H 1
+
+/* Define to 1 if <sys/socket.h> defines AF_INET. */
+#define HAVE_IPV4 1
+
+/* Define to 1 if <sys/socket.h> defines AF_INET6. */
+#undef HAVE_IPV6
+
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII 1
+
+/* Define to 1 if you have the `isblank' function. */
+#undef HAVE_ISBLANK
+
+/* Define to 1 if you have the `iswprint' function. */
+#define HAVE_ISWPRINT 1
+
+/* Define if you have MIT Kerberos version 4 available. */
+#undef HAVE_KERBEROS
+
+/* Define to 1 if you have the <krb5.h> header file. */
+#undef HAVE_KRB5_H
+
+/* Define to 1 if you have the `krb_get_err_text' function. */
+#undef HAVE_KRB_GET_ERR_TEXT
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the `krb' library (-lkrb). */
+#undef HAVE_LIBKRB
+
+/* Define to 1 if you have the `krb4' library (-lkrb4). */
+#undef HAVE_LIBKRB4
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `login' function. */
+#undef HAVE_LOGIN
+
+/* Define to 1 if you have the `logout' function. */
+#undef HAVE_LOGOUT
+
+/* Define if you have the 'long double' type. */
+#undef HAVE_LONG_DOUBLE
+
+/* Define to 1 if you support file names longer than 14 characters. */
+#define HAVE_LONG_FILE_NAMES 1
+
+/* Define if you have the 'long long' type. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+   config.h and <sys/mman.h>. */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to 1 if you have the `mblen' function. */
+#define HAVE_MBLEN 1
+
+/* Define to 1 if you have the `mbrlen' function. */
+#define HAVE_MBRLEN 1
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#define HAVE_MBRTOWC 1
+
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
+/* Define to 1 if you have the `mbsrtowcs' function. */
+#define HAVE_MBSRTOWCS 1
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#define HAVE_MBSTATE_T 1
+
+/* Define if you have memchr (always for CVS). */
+#define HAVE_MEMCHR 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if <limits.h> defines the MIN and MAX macros. */
+#define HAVE_MINMAX_IN_LIMITS_H 1
+
+/* Define to 1 if <sys/param.h> defines the MIN and MAX macros. */
+#undef HAVE_MINMAX_IN_SYS_PARAM_H
+
+/* Define to 1 if you have the `mknod' function. */
+#undef HAVE_MKNOD
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the `nanotime' function. */
+#undef HAVE_NANOTIME
+
+/* Define to 1 if you have the <ndbm.h> header file. */
+#undef HAVE_NDBM_H
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#define HAVE_NDIR_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
+/* Define if an OpenPGP capable program is available (and, assumedly, usable
+   command line templates are in the DEFAULT_SIGN_TEMPLATE and
+   DEFAULT_VERIFY_TEMPLATE macros). */
+#undef HAVE_OPENPGP
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
+/* Define to enable system authentication with PAM instead of using the simple
+   getpwnam interface. This allows authentication (in theory) with any PAM
+   module, e.g. on systems with shadow passwords or via LDAP */
+#undef HAVE_PAM
+
+/* Define to 1 if pam/pam_appl.h is available */
+#undef HAVE_PAM_PAM_APPL_H
+
+/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX is not
+   defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD is defined.
+   */
+#undef HAVE_PARTLY_WORKING_GETCWD
+
+/* Define to 1 if you have the `posix_memalign' function. */
+#undef HAVE_POSIX_MEMALIGN
+
+/* Define to 1 if the `printf' function supports the %p format for printing
+   pointers. */
+#define HAVE_PRINTF_PTR 1
+
+/* Define to 1 if the system has the type `ptrdiff_t'. */
+#define HAVE_PTRDIFF_T 1
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the `regcomp' function. */
+#undef HAVE_REGCOMP
+
+/* Define to 1 if you have the `regerror' function. */
+#undef HAVE_REGERROR
+
+/* Define to 1 if you have the `regexec' function. */
+#undef HAVE_REGEXEC
+
+/* Define to 1 if you have the `regfree' function. */
+#undef HAVE_REGFREE
+
+/* Define to 1 if you have the `resolvepath' function. */
+#undef HAVE_RESOLVEPATH
+
+/* Define to 1 if you have the `rpmatch' function. */
+#undef HAVE_RPMATCH
+
+/* Define to 1 if you have run the test for working tzset. */
+#define HAVE_RUN_TZSET_TEST 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#define HAVE_SEARCH_H 1
+
+/* Define to 1 if security/pam_appl.h is available */
+#undef HAVE_SECURITY_PAM_APPL_H
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define if the diff library should use setmode for binary files. */
+#define HAVE_SETMODE 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `sigblock' function. */
+#undef HAVE_SIGBLOCK
+
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
+/* Define to 1 if you have the `sigprocmask' function. */
+#undef HAVE_SIGPROCMASK
+
+/* Define to 1 if you have the `sigsetmask' function. */
+#undef HAVE_SIGSETMASK
+
+/* Define to 1 if you have the `sigvec' function. */
+#undef HAVE_SIGVEC
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+   uintmax_t. */
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have strchr (always for CVS). */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if the system has the type `struct addrinfo'. */
+#undef HAVE_STRUCT_ADDRINFO
+
+/* Define if there is a member named d_type in the struct describing directory
+   headers. */
+#undef HAVE_STRUCT_DIRENT_D_TYPE
+
+/* Define to 1 if `st_blksize' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLKSIZE
+
+/* Define to 1 if `st_rdev' is member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_RDEV 1
+
+/* Define if struct timespec is declared in <time.h>. */
+#undef HAVE_STRUCT_TIMESPEC
+
+/* Define to 1 if `tm_zone' is member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/bsdtypes.h> header file. */
+#undef HAVE_SYS_BSDTYPES_H
+
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#undef HAVE_TCGETATTR
+
+/* Define to 1 if you have the `tcsetattr' function. */
+#undef HAVE_TCSETATTR
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `timezone' function. */
+#undef HAVE_TIMEZONE
+
+/* Define to 1 if localtime_r, etc. have the type signatures that POSIX
+   requires. */
+#undef HAVE_TIME_R_POSIX
+
+/* Define if struct tm has the tm_gmtoff member. */
+#undef HAVE_TM_GMTOFF
+
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+   `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+   `tzname'. */
+#define HAVE_TZNAME 1
+
+/* Define to 1 if you have the `tzset' function. */
+#define HAVE_TZSET 1
+
+/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_UINTMAX_T
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define if you have the 'unsigned long long' type. */
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
+#define HAVE_UTIME_NULL 1
+
+/* Define to 1 if you have the `vasnprintf' function. */
+#undef HAVE_VASNPRINTF
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if you have the `vprintf' function. */
+#define HAVE_VPRINTF 1
+
+/* Define to 1 if you have the `wait3' function. */
+#undef HAVE_WAIT3
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define if you have the 'wchar_t' type. */
+#define HAVE_WCHAR_T 1
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#define HAVE_WCRTOMB 1
+
+/* Define to 1 if you have the `wcscoll' function. */
+#define HAVE_WCSCOLL 1
+
+/* Define to 1 if you have the `wcslen' function. */
+#define HAVE_WCSLEN 1
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#define HAVE_WCTYPE_H 1
+
+/* Define if you have the 'wint_t' type. */
+#define HAVE_WINT_T 1
+
+/* Define to 1 if you have the `wmemchr' function. */
+#define HAVE_WMEMCHR 1
+
+/* Define to 1 if you have the `wmemcpy' function. */
+#define HAVE_WMEMCPY 1
+
+/* Define to 1 if you have the `wmempcpy' function. */
+#undef HAVE_WMEMPCPY
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `__fpending' function. */
+#undef HAVE___FPENDING
+
+/* Define to 1 if you have the `__fsetlocking' function. */
+#undef HAVE___FSETLOCKING
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+/* Define to include locking code which prevents versions of CVS earlier than
+   1.12.4 directly accessing the same repositiory as this executable from
+   ignoring this executable's promotable read locks. If only CVS versions
+   1.12.4 and later will be accessing your repository directly (as a server or
+   locally), you can safely disable this option in return for fewer disk
+   accesses and a small speed increase. Disabling this option when versions of
+   CVS earlier than 1,12,4 _will_ be accessing your repository, however, is
+   *VERY* *VERY* *VERY* dangerous and could result in data loss. As such, by
+   default, CVS is compiled with this code enabled. If you are sure you would
+   like this code disabled, you can disable it by passing the
+   "--disable-lock-compatibility" option to configure or by commenting out the
+   lines below. */
+#define LOCK_COMPATIBILITY
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+   slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#undef MALLOC_0_IS_NONNULL
+
+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
+#undef MAP_ANONYMOUS
+
+/* By default, CVS stores its modules and other such items in flat text files
+   (MY_NDBM enables this). Turning off MY_NDBM causes CVS to look for a
+   system-supplied ndbm database library and use it instead. That may speed
+   things up, but the default setting generally works fine too. */
+#define MY_NDBM
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "%PACKAGE_BUGREPORT%"
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "%PACKAGE_STRING%"
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to set a service name for PAM. This must be defined. Define to
+   `program_name', without the quotes, to use whatever name CVS was invoked
+   as. Otherwise, define to a double-quoted literal string, such as `"cvs"'.
+   */
+#undef PAM_SERVICE_NAME
+
+/* the number of pending output bytes on stream `fp' */
+#define PENDING_OUTPUT_N_BYTES ( fp ? fp->_ptr - fp->_base : 0 )
+
+/* Define if you want CVS to be able to serve as a transparent proxy for write
+   operations. Disabling this may produce a slight performance gain on some
+   systems, at the expense of write proxy support. */
+#undef PROXY_SUPPORT
+
+/* Path to the pr utility */
+#undef PR_PROGRAM
+
+/* Define to force lib/regex.c to use malloc instead of alloca. */
+#define REGEX_MALLOC 1
+
+/* Define if rename does not work for source file names with a trailing slash,
+   like the one from SunOS 4.1.1_U1. */
+#undef RENAME_TRAILING_SLASH_BUG
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* The default remote shell to use, if one does not specify the CVS_RSH
+   environment variable. */
+#define RSH_DFLT "rsh"
+
+/* If you are working with a large remote repository and a 'cvs checkout' is
+   swamping your network and memory, define these to enable flow control. You
+   will end up with even less probability of a consistent checkout (see
+   Concurrency in cvs.texinfo), but CVS doesn't try to guarantee that anyway.
+   The master server process will monitor how far it is getting behind, if it
+   reaches the high water mark, it will signal the child process to stop
+   generating data when convenient (ie: no locks are held, currently at the
+   beginning of a new directory). Once the buffer has drained sufficiently to
+   reach the low water mark, it will be signalled to start again. */
+#undef SERVER_FLOWCONTROL
+
+/* The high water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_HI_WATER
+
+/* The low water mark in bytes for server flow control. Required if
+   SERVER_FLOWCONTROL is defined, and useless otherwise. */
+#undef SERVER_LO_WATER
+
+/* Define if you want CVS to be able to serve repositories to remote clients.
+   */
+#undef SERVER_SUPPORT
+
+/* The size of a `char', as computed by sizeof. */
+#define SIZEOF_CHAR 1
+
+/* The size of a `double', as computed by sizeof. */
+#define SIZEOF_DOUBLE 8
+
+/* The size of a `float', as computed by sizeof. */
+#define SIZEOF_FLOAT 4
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `intmax_t', as computed by sizeof. */
+#undef SIZEOF_INTMAX_T
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of a `long double', as computed by sizeof. */
+#define SIZEOF_LONG_DOUBLE 8
+
+/* The size of a `long long', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG
+
+/* The size of a `ptrdiff_t', as computed by sizeof. */
+#define SIZEOF_PTRDIFF_T 4
+
+/* The size of a `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of a `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
+/* The size of a `wint_t', as computed by sizeof. */
+#define SIZEOF_WINT_T 2
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+   it. */
+#define SIZE_MAX (~(size_t)0)
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at run-time.
+       STACK_DIRECTION > 0 => grows toward higher addresses
+       STACK_DIRECTION < 0 => grows toward lower addresses
+       STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#define STAT_MACROS_BROKEN 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Enable support for the pre 1.12.1 *info scripting hook format strings.
+   Disable this option for a smaller executable once your scripting hooks have
+   been updated to use the new *info format strings by passing
+   "--disable-old-info-format-support" option to configure or by commenting
+   out the line below. */
+#undef SUPPORT_OLD_INFO_FMT_STRINGS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Directory used for storing temporary files, if not overridden by
+   environment variables or the -T global option. There should be little need
+   to change this (-T is a better mechanism if you need to use a different
+   directory for temporary files). */
+#define TMPDIR_DFLT "c:\\temp"
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define if tzset clobbers localtime's static buffer. */
+#undef TZSET_CLOBBERS_LOCALTIME_BUFFER
+
+/* The default umask to use when creating or otherwise setting file or
+   directory permissions in the repository. Must be a value in the range of 0
+   through 0777. For example, a value of 002 allows group rwx access and world
+   rx access; a value of 007 allows group rwx access but no world access. This
+   value is overridden by the value of the CVSUMASK environment variable,
+   which is interpreted as an octal number. */
+#define UMASK_DFLT 002
+
+/* Define if double is the first floating point type detected with its size.
+   */
+#undef UNIQUE_FLOAT_TYPE_DOUBLE
+
+/* Define if float is the first floating point type detected with its size. */
+#undef UNIQUE_FLOAT_TYPE_FLOAT
+
+/* Define if long double is the first floating point type detected with its
+   size. */
+#undef UNIQUE_FLOAT_TYPE_LONG_DOUBLE
+
+/* Define if char is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_CHAR
+
+/* Define if int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INT
+
+/* Define if intmax_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_INTMAX_T
+
+/* Define if long int is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG
+
+/* Define if long long is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_LONG_LONG
+
+/* Define if ptrdiff_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_PTRDIFF_T
+
+/* Define if short is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SHORT
+
+/* Define if size_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_SIZE_T
+
+/* Define if wint_t is the first integer type detected with its size. */
+#undef UNIQUE_INT_TYPE_WINT_T
+
+/* Define if setmode is required when writing binary data to stdout. */
+#define USE_SETMODE_STDOUT 1
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+   Unlocked I/O can improve performance in unithreaded apps, but it is not
+   safe for multithreaded apps. */
+#undef USE_UNLOCKED_IO
+
+/* Define if utime requires write access to the file (true on Windows, but not
+   Unix). */
+#define UTIME_EXPECTS_WRITABLE
+
+/* Define if unsetenv() returns void, not int. */
+#undef VOID_UNSETENV
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if on AIX 3.
+   System headers sometimes define this.
+   We just want to avoid a redefinition error message.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
+/* Define to force lib/regex.c to define re_comp et al. */
+#define _REGEX_RE_COMP 1
+
+/* Enable extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+
+/* Define to rpl_ if the getcwd replacement function should be used. */
+#undef __GETCWD_PREFIX
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+   used. */
+#define __GETOPT_PREFIX rpl_
+
+/* Define to rpl_ if the openat replacement function should be used. */
+#undef __OPENAT_PREFIX
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to a replacement function name for fnmatch(). */
+#undef fnmatch
+
+/* Define to a replacement function name for getline(). */
+#undef getline
+
+/* Define to a replacement function name for getpass(). */
+#undef getpass
+
+/* Define to rpl_gettimeofday if the replacement function should be used. */
+#undef gettimeofday
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#define inline __inline
+#endif
+
+/* Define to long or long long if <inttypes.h> and <stdint.h> don't define. */
+#undef intmax_t
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to a type if <wchar.h> does not define. */
+#undef mbstate_t
+
+/* Define to rpl_mkdir if the replacement function should be used. */
+#undef mkdir
+
+/* Define to rpl_mkstemp if the replacement function should be used. */
+#undef mkstemp
+
+/* Define to rpl_mktime if the replacement function should be used. */
+#undef mktime
+
+/* Define to `int' if <sys/types.h> does not define. */
+#define mode_t int
+
+/* Define to the name of the strftime replacement function. */
+#define my_strftime nstrftime
+
+/* Define to rpl_nanosleep if the replacement function should be used. */
+#define nanosleep woe32_nanosleep
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
+
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#define realloc rpl_realloc
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to rpl_rename if the replacement function should be used. */
+#undef rename
+
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+   supported. Do not define if restrict is supported directly. */
+#define restrict
+
+/* Define to rpl_select if the replacement function should be used. */
+#undef select
+
+/* Define to empty if the C compiler doesn't support this keyword. */
+#undef signed
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define as a signed type of the same size as size_t. */
+#define ssize_t int
+
+/* Define to rpl_strcasecmp always. */
+#define strcasecmp rpl_strcasecmp
+
+/* Define to rpl_tzset if the wrapper function should be used. */
+#undef tzset
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define to unsigned long or unsigned long long if <stdint.h> and
+   <inttypes.h> don't define. */
+#undef uintmax_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
+/*============================================================================*/
+/* config.h.in.footer:  configuration file for Windows NT
+   Conrad T. Pino <address@hidden> --- May 2004 */
+
+/* This file lives in the windows-NT subdirectory, which is only included
+   in your header search path if you're working under Microsoft Visual C++,
+   and use ../cvsnt.mak for your project.  Thus, this is the right place to
+   put configuration information for Windows NT.  */
+
+/* This file is getting chaotic and will be organized as follows:
+
+               Macros appears first alphabetized in case sensitive order.
+               Typedefs appear next alphabetized in case sensitive order.
+               Function prototypes alphabetized in case sensitive order.
+
+       Reorgnized by Conrad T. Pino <address@hidden> May 25, 2005 */
+
+/* just one time please */
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+/* ======================= Macro Definnitions Follow ====================== */
+
+/* Under Windows NT, mkdir only takes one argument.  */
+#define CVS_MKDIR wnt_mkdir
+
+#define CVS_RENAME wnt_rename
+
+/* This is where old bits go to die under Windows NT.  */
+#define DEVNULL "nul"
+
+/* Windows has no ELOOP value in errno.h */
+#define ELOOP EMLINK
+
+/* Windows has _snprintf function.
+   HAVE_DECL__SNPRINTF used in ../lib/vasnprintf.c */
+#define HAVE_DECL__SNPRINTF 1
+
+#define HAVE_WINSOCK_H
+
+/* This tells the client that it must use send()/recv() to talk to the
+   server if it is connected to the server via a socket; Win95 needs
+   it because _open_osfhandle doesn't work.  */
+#define NO_SOCKET_TO_FD 1
+
+/* Is this true on NT?  Seems like I remember reports that NT 3.51 has
+   problems with 200K writes (of course, the issue of large writes is
+   moot since the use of buffer.c ensures that writes will only be as big
+   as the buffers).  */
+#define SEND_NEVER_PARTIAL 1
+
+/* Stop server macro */
+#define SHUTDOWN_SERVER wnt_shutdown_server
+
+/* This tells the client that, in addition to needing to use
+   send()/recv() to do socket I/O, the error codes for send()/recv()
+   and other socket operations are not available through errno.
+   Instead, this macro should be used to obtain an error code. */
+#define SOCK_ERRNO (WSAGetLastError ())
+
+/* This tells the client that, in addition to needing to use
+   send()/recv() to do socket I/O, the error codes for send()/recv()
+   and other socket operations are not known to strerror.  Instead,
+   this macro should be used to convert the error codes to strings. */
+#define SOCK_STRERROR sock_strerror
+
+/* Start server macro */
+#define START_SERVER wnt_start_server
+
+/* The internal rsh client uses sockets not file descriptors.  Note
+   that as the code stands now, it often takes values from a SOCKET and
+   puts them in an int.  This is ugly but it seems like sizeof
+   (SOCKET) <= sizeof (int) on win32, even the 64-bit variants.  */
+#define START_SERVER_RETURNS_SOCKET 1
+
+/* Macro name tells the story */
+#define SYSTEM_CLEANUP woe32_cleanup
+
+/* Macro name tells the story */
+#define SYSTEM_INITIALIZE(pargc,pargv) woe32_init_winsock()
+
+/*
+ * According to GNU conventions, we should avoid referencing any macro
+ * containing "WIN" as a reference to Microsoft Windows, as we would like to
+ * avoid any implication that we consider Microsoft Windows any sort of "win".
+ *
+ * FIXME: As of 2003-06-09, folks on the GNULIB project were discussing
+ * defining a configure macro to define WOE32 appropriately.  If they ever do
+ * write such a beast, we should use it, though in most cases it would be
+ * preferable to avoid referencing any OS or compiler anyhow, per Autoconf
+ * convention, and reference only tested features of the system.
+ *
+ * re FIXME: This definition would still be necessary since systems which run
+ * configure do not use this config.h and vice-versa.
+ */
+#define WOE32 1
+
+/* Define POSIX name to Microsoft name */
+#define dup _dup
+
+/* getpagesize is missing on Windows, 4096 does the right thing. */
+#define getpagesize() 4096
+
+/* Define to a substitute for the `lstat' function. */
+#define lstat stat
+
+/* Define POSIX name to Microsoft name */
+#define popen _popen
+
+/* Define POSIX name to Microsoft name */
+#define pclose _pclose
+
+/* Diff needs us to define this.  I think it could always be
+   -1 for CVS, because we pass temporary files to diff, but
+   config.h seems like the easiest place to put this, so for
+   now we put it here.  */
+#define same_file(s,t) (-1)
+
+/* Define to a substitute for the stat function. */
+#define stat wnt_stat
+
+/* ====================== Typedef Declarations Follow ===================== */
+
+/* ====================== Function Prototypes Follow ====================== */
+
+#include <woe32.h>
+
+/* #define SOCK_STRERROR sock_strerror */
+char *sock_strerror (int errnum);
+
+/* #define CVS_MKDIR wnt_mkdir */
+int wnt_mkdir (const char *PATH, int MODE);
+
+/* #define CVS_RENAME wnt_rename */
+int wnt_rename (const char *, const char *);
+
+/* #define SHUTDOWN_SERVER wnt_shutdown_server */
+void wnt_shutdown_server (int fd);
+
+/* #define START_SERVER wnt_start_server */
+void wnt_start_server (int *tofd, int *fromfd,
+                      char *client_user,
+                      char *server_user,
+                      char *server_host,
+                      char *server_cvsroot);
+
+/* #define stat wnt_stat and #define lstat wnt_stat */
+int wnt_stat (const char *file, struct wnt_stat *sb);
+
+/* =============== Special mkdir Prototype Handling Follows =============== */
+
+#include <direct.h>
+#define mkdir wnt_mkdir
+
+/* ===================== Special Function Definitions ===================== */
+
+/*
+       Microsoft defines "mbinit" in <wchar.h> for C++ code only.
+
+       Expect link errors for versions:
+
+               earlier than Visual C++ 5.0
+
+               later than Visual C++ .NET 2003
+
+       and Visual C++ .NET is just a guess which might be wrong.
+*/
+
+#if _MSC_VER >= 1100 && _MSC_VER <= 1200
+
+/* If within Visual C++ 5.0 to Visual C++ 6.0 */
+
+inline int mbsinit (const void * arg)
+       { return 1; }
+
+#elif _MSC_VER >= 1300 && _MSC_VER <= 1310
+
+/* If within Visual C++ .NET to Visual C++ .NET 2003 */
+
+inline int mbsinit (const int * arg)
+        { return arg == NULL || ! *arg; }
+
+#endif
+
+/* =========================== End Of This File =========================== */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]