summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2001-09-28 23:26:35 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2001-09-28 23:26:35 +0000
commit257b9a3b99db7b3c79cdafe49da86e76e8fcc4ed (patch)
tree906d81699e697bc1cc7fc3f44194e5131f47346d /gnu/usr.bin
parent9894d5f1308eb568c700ab3424cc50396c5b4a3f (diff)
Merge local changes; work in progress
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/Makefile.in685
-rw-r--r--gnu/usr.bin/cvs/configure925
-rw-r--r--gnu/usr.bin/cvs/configure.in126
-rw-r--r--gnu/usr.bin/cvs/contrib/Makefile.in424
-rw-r--r--gnu/usr.bin/cvs/contrib/clmerge.pl152
-rw-r--r--gnu/usr.bin/cvs/contrib/cln_hist.pl92
-rw-r--r--gnu/usr.bin/cvs/contrib/commit_prep.pl216
-rw-r--r--gnu/usr.bin/cvs/contrib/cvs_acls.pl143
-rw-r--r--gnu/usr.bin/cvs/contrib/log.pl167
-rw-r--r--gnu/usr.bin/cvs/contrib/log_accum.pl492
-rw-r--r--gnu/usr.bin/cvs/contrib/mfpipe.pl88
-rw-r--r--gnu/usr.bin/cvs/contrib/rcslock.pl235
-rw-r--r--gnu/usr.bin/cvs/contrib/sccs2rcs.csh277
-rw-r--r--gnu/usr.bin/cvs/diff/.cvsignore3
-rw-r--r--gnu/usr.bin/cvs/diff/Makefile.in369
-rw-r--r--gnu/usr.bin/cvs/lib/Makefile.in490
-rw-r--r--gnu/usr.bin/cvs/lib/getdate.c2023
-rw-r--r--gnu/usr.bin/cvs/lib/getdate.y46
-rw-r--r--gnu/usr.bin/cvs/src/Makefile.in679
-rw-r--r--gnu/usr.bin/cvs/src/checkout.c125
-rw-r--r--gnu/usr.bin/cvs/src/client.c343
-rw-r--r--gnu/usr.bin/cvs/src/commit.c84
-rw-r--r--gnu/usr.bin/cvs/src/cvs.h56
-rw-r--r--gnu/usr.bin/cvs/src/cvsbug.sh538
-rw-r--r--gnu/usr.bin/cvs/src/ignore.c42
-rw-r--r--gnu/usr.bin/cvs/src/import.c28
-rw-r--r--gnu/usr.bin/cvs/src/lock.c22
-rw-r--r--gnu/usr.bin/cvs/src/main.c217
-rw-r--r--gnu/usr.bin/cvs/src/mkmodules.c10
-rw-r--r--gnu/usr.bin/cvs/src/parseinfo.c10
-rw-r--r--gnu/usr.bin/cvs/src/patch.c51
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c240
-rw-r--r--gnu/usr.bin/cvs/src/rcscmds.c8
-rw-r--r--gnu/usr.bin/cvs/src/recurse.c24
-rw-r--r--gnu/usr.bin/cvs/src/root.c488
-rw-r--r--gnu/usr.bin/cvs/src/rtag.c692
-rw-r--r--gnu/usr.bin/cvs/src/server.c445
-rw-r--r--gnu/usr.bin/cvs/src/update.c131
-rw-r--r--gnu/usr.bin/cvs/stamp-h.in1
-rw-r--r--gnu/usr.bin/cvs/zlib/algorithm.doc105
-rw-r--r--gnu/usr.bin/cvs/zlib/build_zlib.com18
-rw-r--r--gnu/usr.bin/cvs/zlib/zlib.def46
-rw-r--r--gnu/usr.bin/cvs/zlib/zlib.dsp146
-rw-r--r--gnu/usr.bin/cvs/zlib/zlib.rc32
44 files changed, 5258 insertions, 6276 deletions
diff --git a/gnu/usr.bin/cvs/Makefile.in b/gnu/usr.bin/cvs/Makefile.in
index 955cee96100..cc75e73e97b 100644
--- a/gnu/usr.bin/cvs/Makefile.in
+++ b/gnu/usr.bin/cvs/Makefile.in
@@ -1,5 +1,20 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+@SET_MAKE@
+
# Master Makefile for the GNU Concurrent Versions System.
-# Copyright (C) 1986, 1988-1992, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1992, 1994, 2000 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
@@ -11,284 +26,456 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
-#### Start of system configuration section. ####
+SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-
-# If you use gcc, you should either run the fixincludes script that
-# comes with it or else use gcc with the -traditional option. Otherwise
-# ioctl calls will be compiled incorrectly on some systems.
-CC = @CC@
-AR = ar
-
-@SET_MAKE@
-
-# Set RANLIB = echo if your system doesn't have or need ranlib.
-RANLIB = @RANLIB@
-# Set YACC = bison or yacc, depending on which you have on your system
-YACC = @YACC@
-# Use cp if you don't have install.
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-
-DEFS = @DEFS@
-LIBS = @LIBS@
-
-INCLUDES = -I. -I../lib @includeopt@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to install the executables.
bindir = @bindir@
-
-# Where to put auxilliary programs
+sbindir = @sbindir@
libexecdir = @libexecdir@
-
-# Where to put the system-wide .cvsrc file
datadir = @datadir@
-
-# Where to put the Info files
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
-
-# Where to put the manual pages.
mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+AUTOMAKE_OPTIONS = 1.4a dist-bzip2
-#### End of system configuration section. ####
-
-FLAGS_TO_PASS = \
- AR='$(AR)' \
- CC='$(CC)' \
- CFLAGS='$(CFLAGS)' \
- LDFLAGS='$(LDFLAGS)' \
- LIBPROGS='$(LIBPROGS)' \
- LIBS='$(LIBS)' \
- MAKE='$(MAKE)' \
- MAKEINFO='$(MAKEINFO)' \
- RANLIB='$(RANLIB)' \
- TEXI2DVI='$(TEXI2DVI)' \
- YACC='$(YACC)' \
- bindir='$(bindir)' \
- infodir='$(infodir)' \
- libexecdir='$(libexecdir)' \
- datadir='$(datadir)' \
- mandir='$(mandir)' \
- prefix='$(prefix)' \
- exec_prefix='$(exec_prefix)'
-
-DISTFILES = \
- COPYING COPYING.LIB INSTALL README TODO PROJECTS \
- BUGS MINOR-BUGS FAQ HACKING DEVEL-CVS TESTS \
- README.VMS build.com \
- ChangeLog NEWS ChangeLog.zoo \
- configure configure.in stamp-h.in config.h.in Makefile.in acconfig.h \
- cvs-format.el mkinstalldirs install-sh \
- cvsnt.mak cvsnt.dsp cvsnt.dsw \
- .cvsignore cvs.spec
-
-### Subdirectories to run make in for the primary targets.
# Unix source subdirs, where we'll want to run lint and etags:
+# This is a legacy variable from b4 Automake
USOURCE_SUBDIRS = lib @ZLIBSUBDIRS@ diff src
# Documentation directories; special handling
INSTALL_MAN=man
# All other subdirs:
SUBDIRS = ${USOURCE_SUBDIRS} ${INSTALL_MAN} doc contrib tools \
windows-NT os2 emx vms
-# Only make TAGS/tags files in these directories.
-TSUBDIRS= src lib
-# Set default target.
-all:
-.PHONY: all install uninstall installdirs
-all install uninstall installdirs: config.h Makefile all-local
- @for subdir in $(SUBDIRS); do \
- echo "making $@ in $$subdir"; \
- ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
+EXTRA_DIST = \
+ .cvsignore \
+ BUGS \
+ ChangeLog.zoo \
+ DEVEL-CVS \
+ FAQ \
+ HACKING \
+ MINOR-BUGS \
+ PROJECTS \
+ README.VMS \
+ TESTS \
+ build.com \
+ cvs-format.el \
+ cvs.spec \
+ cvs.spec.in \
+ cvsnt.dsp \
+ cvsnt.dsw \
+ cvsnt.mak
+
+EXEEXT =
+OBJEXT = o
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES = emx/Makefile os2/Makefile zlib/Makefile
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = all-recursive install-data-recursive \
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = README ./stamp-h1.in AUTHORS COPYING COPYING.LIB \
+ ChangeLog INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h \
+ acinclude.m4 aclocal.m4 config.h.in configure configure.in \
+ depcomp install-sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$@ $(SHELL) ./config.status
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.in acinclude.m4
+ 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 stamp-h1T
+ @echo timestamp > stamp-h1T 2> /dev/null
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @mv stamp-h1T stamp-h1
+$(srcdir)/config.h.in: $(srcdir)/./stamp-h1.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/./stamp-h1.in; \
+ $(MAKE) $(srcdir)/./stamp-h1.in; \
+ else :; fi
+$(srcdir)/./stamp-h1.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
+ @rm -f $(srcdir)/./stamp-h1.in $(srcdir)/./stamp-h1.inT
+ @echo timestamp > $(srcdir)/./stamp-h1.inT 2> /dev/null
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @mv $(srcdir)/./stamp-h1.inT $(srcdir)/./stamp-h1.in
+
+distclean-hdr:
+ -rm -f config.h
+emx/Makefile: $(top_builddir)/config.status $(top_srcdir)/emx/Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+os2/Makefile: $(top_builddir)/config.status $(top_srcdir)/os2/Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+zlib/Makefile: $(top_builddir)/config.status $(top_srcdir)/zlib/Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+
+# 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):
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ 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) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ 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:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ 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) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
-installdirs: installdirs-local
-
-install: all install-local install-info
-
-.PHONY: all-local
-all-local:
-
-.PHONY: info dvi clean-info install-info
-info dvi clean-info install-info:
- cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1
-
-.PHONY: install-local
-install-local: all-local
- @: nothing to do locally
-
-.PHONY: installdirs-local
-installdirs-local: all-local
- @: nothing to do locally
-
-.PHONY: tags
-tags:
- @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- @echo making $@ in .
- @ctags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls\` ; do echo $(srcdir)/$$i ; done`
-
-.PHONY: TAGS
-TAGS:
- @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- @echo making $@ in .
- @etags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls | grep -v 'make\[[0-9]\]'\` ; do echo $(srcdir)/$$i ; done`
-
-.PHONY: ls
-ls:
- @echo $(DISTFILES)
- @for dir in $(SUBDIRS); do \
- for i in `cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ | grep -v 'make\[[0-9]\]'` ; do \
- echo $$dir/$$i ; \
- done ; \
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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 $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags $(ETAGS_INCLUDE_OPTION)$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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 "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+GZIP_ENV = --best
+
+distdir: $(DISTFILES)
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ mkdir $(distdir)
+ $(mkinstalldirs) $(distdir)/contrib $(distdir)/emx $(distdir)/os2 $(distdir)/src $(distdir)/zlib
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (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: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+dist-bzip2: distdir
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(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
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ chmod a-w $(distdir)
+ dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+ && cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && $(MAKE) $(AM_MAKEFLAGS) distclean \
+ && rm -f $(distdir).tar.gz \
+ && (test `find . -type f -print | wc -l` -eq 0 \
+ || (echo "Error: files left after distclean" 1>&2; \
+ exit 1) )
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+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_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+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 Makefile.in
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+dist-all: dist dist-bzip2
+
+distclean: distclean-recursive
+ -rm -f config.status
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
-.PHONY: clean
-clean: clean-local
- @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
-
-.PHONY: distclean
-distclean: distclean-local
- @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- rm -f config.status
-
-.PHONY: realclean
-realclean: realclean-local
- @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- rm -f config.status
-
-.PHONY: mostlyclean-local
-mostlyclean-local:
- rm -f *~
-
-.PHONY: clean-local
-clean-local: mostlyclean-local
-
-.PHONY: distclean-local
-distclean-local: clean-local
- rm -f Makefile config.cache config.h config.log stamp-h
- rm -f tags TAGS
-
-.PHONY: realclean-local
-realclean-local: distclean-local
-
-.PHONY: saber
-saber:
- @for dir in $(SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
-
-.PHONY: -dependency
--dependency:
-
-.PHONY: zlib-dependency
-zlib-dependency:
- cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
+mostlyclean-am: mostlyclean-generic
+
+.PHONY: $(RECURSIVE_TARGETS) all all-am check check-am clean \
+ clean-generic clean-recursive dist dist-all dist-bzip2 \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-recursive distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-data install-data-am \
+ install-data-recursive install-exec install-exec-am \
+ install-exec-recursive install-info install-man \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive tags tags-recursive uninstall \
+ uninstall-am uninstall-recursive
-.PHONY: check
-check: @ZLIBSUBDIRS@-dependency
- cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- cd diff ; $(MAKE) $(FLAGS_TO_PASS)
- cd src ; $(MAKE) $(FLAGS_TO_PASS) check
.PHONY: remotecheck
-remotecheck: @ZLIBSUBDIRS@-dependency
- cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- cd diff ; $(MAKE) $(FLAGS_TO_PASS)
- cd src ; $(MAKE) $(FLAGS_TO_PASS) remotecheck
-
-.PHONY: installcheck
-installcheck: @ZLIBSUBDIRS@-dependency
- cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- cd diff ; $(MAKE) $(FLAGS_TO_PASS)
- cd src ; $(MAKE) $(FLAGS_TO_PASS) installcheck
-
-.PHONY: lint
-lint:
- @for dir in $(USOURCE_SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) xlint || exit 1; cd ..; done
-
-.PHONY: dist
-GZIP=gzip --best
-GZIP_EXT=.gz
-TAR_VERBOSE=
-dist: spec
- rm -rf `cat .fname`
- ${MAKE} dist-dir DISTDIR="`cat .fname`"
- for dir in ${SUBDIRS}; do \
- ( DISTDIR="../`cat .fname`/$${dir}"; \
- cd $${dir} && \
- ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
- ); \
- done
- (unset GZIP; tar chf${TAR_VERBOSE} - `cat .fname` | ${GZIP} > "`cat .fname`.tar${GZIP_EXT}")
- rm -rf `cat .fname` .fname .version
-
-.PHONY: dist-dir
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
+remotecheck: all
+ cd src && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+.PHONY: doc
+doc:
+ cd doc && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+# - cvs.spec needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+cvs.spec: $(srcdir)/cvs.spec.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/cvs.spec.in >cvs.tspec
+ mv cvs.tspec $(srcdir)/cvs.spec
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
-.PHONY: spec
-spec:
- rm -f .version .fname
- sed < $(srcdir)/src/version.c \
- -e '/version_string/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
- -e q > .version
- echo > .fname cvs-`cat .version`
- rm -f `cat .fname`.spec
- sed < $(top_srcdir)/cvs.spec \
- -e 's/@VERSION@/'`cat .version`'/g' \
- > `cat .fname`.spec
-
-
-# For the justification of the following Makefile rules, see node
-# `Automatic Remaking' in GNU Autoconf documentation.
-Makefile: Makefile.in config.status
- CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
-
-# Use @CFLAGS@ not $(CFLAGS) because it would be confusing for "make CFLAGS="
-# to sometimes (i.e., if configure is modified) change the configured CFLAGS,
-# and sometimes not.
-config.status: configure
- CFLAGS="@CFLAGS@" ./config.status --recheck
-
-# The rules to run autoconf and autoheader are commented out. This is because
-# when the user unpacks a tarfile, configure.in might end up newer than
-# configure, but the user might not have (and does not need to have) autoconf
-# installed.
-#configure: configure.in #aclocal.m4
-# cd $(srcdir); autoconf
-
-config.h: stamp-h
-
-# This used to do a ./config.status --recheck, to update config.status with
-# any new #defines from config.h.in. The problem was that the rule itself
-# depends on config.status, so that the --recheck would get run several
-# times, which is bad if the user was trying to specify CFLAGS manually.
-# It was a big pain in the neck.
-stamp-h: config.h.in config.status
- CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
-
-#config.h.in: stamp-h.in
-#stamp-h.in: configure.in #aclocal.m4 acconfig.h
-# cd $(srcdir); autoheader
-# date > $(srcdir)/stamp-h.in
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# 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:
diff --git a/gnu/usr.bin/cvs/configure b/gnu/usr.bin/cvs/configure
index b5e23129894..fb4dc86c783 100644
--- a/gnu/usr.bin/cvs/configure
+++ b/gnu/usr.bin/cvs/configure
@@ -533,13 +533,14 @@ else
fi
+AM_INIT_AUTOMAKE(cvs, 1.11.1p1)
if test "x$prefix" = xNONE; then
echo $ac_n "checking for prefix by $ac_c" 1>&6
# Extract the first word of "cvs", so it can be a program name with args.
set dummy cvs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:543: checking for $ac_word" >&5
+echo "configure:544: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -576,14 +577,14 @@ fi
fi
fi
-
+AM_CONFIG_HEADER(config.h src/options.h)
for ac_prog in mawk gawk 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:587: checking for $ac_word" >&5
+echo "configure:588: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -615,7 +616,7 @@ done
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:619: checking for $ac_word" >&5
+echo "configure:620: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -645,7 +646,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:649: checking for $ac_word" >&5
+echo "configure:650: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -696,7 +697,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:700: checking for $ac_word" >&5
+echo "configure:701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -728,7 +729,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -739,12 +740,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 743 "configure"
+#line 744 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -770,12 +771,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:774: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:779: checking whether we are using GNU C" >&5
+echo "configure:780: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -784,7 +785,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -803,7 +804,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:807: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:808: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -835,7 +836,7 @@ else
fi
ac_aux_dir=
-for ac_dir in ${GNUSYSTEM_AUX_DIR} $srcdir $srcdir/.. $srcdir/../..; do
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -865,7 +866,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:869: checking for a BSD compatible install" >&5
+echo "configure:870: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -918,7 +919,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:922: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:923: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -944,10 +945,11 @@ else
SET_MAKE="MAKE=${MAKE-make}"
fi
+# Automake's more advanced version of AC_PROG_RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:951: checking for $ac_word" >&5
+echo "configure:953: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -979,7 +981,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:983: checking for $ac_word" >&5
+echo "configure:985: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1009,20 +1011,41 @@ test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1016: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1017: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_perl_path'+set}'`\" = set"; then
+echo "configure:1040: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$perl_path" in
+ case "$PERL" in
/*)
- ac_cv_path_perl_path="$perl_path" # Let the user override the test with a path.
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
;;
?:/*)
- ac_cv_path_perl_path="$perl_path" # Let the user override the test with a dos path.
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
@@ -1030,18 +1053,18 @@ else
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_path_perl_path="$ac_dir/$ac_word"
+ ac_cv_path_PERL="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_perl_path" && ac_cv_path_perl_path="no"
+ test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
;;
esac
fi
-perl_path="$ac_cv_path_perl_path"
-if test -n "$perl_path"; then
- echo "$ac_t""$perl_path" 1>&6
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+ echo "$ac_t""$PERL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
@@ -1049,16 +1072,175 @@ fi
# Extract the first word of "csh", so it can be a program name with args.
set dummy csh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1053: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_csh_path'+set}'`\" = set"; then
+echo "configure:1076: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CSH'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$CSH" in
+ /*)
+ ac_cv_path_CSH="$CSH" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_CSH="$CSH" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_CSH="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_CSH" && ac_cv_path_CSH="no"
+ ;;
+esac
+fi
+CSH="$ac_cv_path_CSH"
+if test -n "$CSH"; then
+ echo "$ac_t""$CSH" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "pr", so it can be a program name with args.
+set dummy pr; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1112: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PR" in
+ /*)
+ ac_cv_path_PR="$PR" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PR="$PR" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PR="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_PR" && ac_cv_path_PR="no"
+ ;;
+esac
+fi
+PR="$ac_cv_path_PR"
+if test -n "$PR"; then
+ echo "$ac_t""$PR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# For diff/util.c
+if test x"$PR" != xno; then
+ cat >> confdefs.h <<EOF
+#define PR_PROGRAM "$PR"
+EOF
+
+fi
+
+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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1160: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_ROFF'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$ROFF" in
+ /*)
+ ac_cv_path_ROFF="$ROFF" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_ROFF="$ROFF" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$glocs"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_ROFF="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+ROFF="$ac_cv_path_ROFF"
+if test -n "$ROFF"; then
+ echo "$ac_t""$ROFF" 1>&6
+else
+ echo "$ac_t""no" 1>&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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1199: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PS2PDF'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PS2PDF" in
+ /*)
+ ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PS2PDF="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ 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 "$ac_t""$PS2PDF" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "texi2dvi", so it can be a program name with args.
+set dummy texi2dvi; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1235: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_TEXI2DVI'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$csh_path" in
+ case "$TEXI2DVI" in
/*)
- ac_cv_path_csh_path="$csh_path" # Let the user override the test with a path.
+ ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a path.
;;
?:/*)
- ac_cv_path_csh_path="$csh_path" # Let the user override the test with a dos path.
+ ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
@@ -1066,18 +1248,18 @@ else
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_path_csh_path="$ac_dir/$ac_word"
+ ac_cv_path_TEXI2DVI="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_csh_path" && ac_cv_path_csh_path="no"
+ test -z "$ac_cv_path_TEXI2DVI" && ac_cv_path_TEXI2DVI="$missing_dir/missing texi2dvi"
;;
esac
fi
-csh_path="$ac_cv_path_csh_path"
-if test -n "$csh_path"; then
- echo "$ac_t""$csh_path" 1>&6
+TEXI2DVI="$ac_cv_path_TEXI2DVI"
+if test -n "$TEXI2DVI"; then
+ echo "$ac_t""$TEXI2DVI" 1>&6
else
echo "$ac_t""no" 1>&6
fi
@@ -1086,7 +1268,7 @@ fi
# Pull the hash mark out of the macro call to avoid m4 problems.
ac_msg="whether #! works in shell scripts"
echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
-echo "configure:1090: checking $ac_msg" >&5
+echo "configure:1272: checking $ac_msg" >&5
if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1112,8 +1294,43 @@ if test X"$ac_cv_sys_interpreter" != X"yes" ; then
echo "configure: warning: $ac_msg" 1>&2
fi
+# BSD's logo is a devil for a reason, hey?
+echo $ac_n "checking for BSD VPATH bug in make""... $ac_c" 1>&6
+echo "configure:1300: checking for BSD VPATH bug in make" >&5
+if eval "test \"`echo '$''{'ccvs_cv_bsd_make_vpath_bug'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test ! -d ac_test_dir ; then
+ { ac_try='mkdir ac_test_dir'; { (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
+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 configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; 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 configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
+fi
+
+echo "$ac_t""$ccvs_cv_bsd_make_vpath_bug" 1>&6
+# 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 = .)
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1117: checking how to run the C preprocessor" >&5
+echo "configure:1334: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1128,13 +1345,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1132 "configure"
+#line 1349 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1145,13 +1362,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1149 "configure"
+#line 1366 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1162,13 +1379,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1166 "configure"
+#line 1383 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1193,9 +1410,9 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1197: checking for AIX" >&5
+echo "configure:1414: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 1199 "configure"
+#line 1416 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -1218,17 +1435,17 @@ rm -f conftest*
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1222: checking for minix/config.h" >&5
+echo "configure:1439: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1227 "configure"
+#line 1444 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1266,7 +1483,7 @@ EOF
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1270: checking for POSIXized ISC" >&5
+echo "configure:1487: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1296,12 +1513,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1300: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1517: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1305 "configure"
+#line 1522 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1309,7 +1526,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1334,7 +1551,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1338: checking for opendir in -ldir" >&5
+echo "configure:1555: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1342,7 +1559,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1346 "configure"
+#line 1563 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1353,7 +1570,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1375,7 +1592,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1379: checking for opendir in -lx" >&5
+echo "configure:1596: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1383,7 +1600,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1387 "configure"
+#line 1604 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1394,7 +1611,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1417,12 +1634,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1421: checking for ANSI C header files" >&5
+echo "configure:1638: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1426 "configure"
+#line 1643 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1430,7 +1647,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1447,7 +1664,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1451 "configure"
+#line 1668 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1465,7 +1682,7 @@ 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 <<EOF
-#line 1469 "configure"
+#line 1686 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1486,7 +1703,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1490 "configure"
+#line 1707 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1497,7 +1714,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1521,12 +1738,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1525: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1742: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1530 "configure"
+#line 1747 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1542,7 +1759,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1565,21 +1782,21 @@ fi
for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
sys/param.h sys/select.h sys/time.h sys/timeb.h \
- io.h direct.h sys/bsdtypes.h sys/resource.h
+ io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1573: checking for $ac_hdr" >&5
+echo "configure:1790: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1578 "configure"
+#line 1795 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1606,12 +1823,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:1610: checking whether stat file-mode macros are broken" >&5
+echo "configure:1827: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1615 "configure"
+#line 1832 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1662,12 +1879,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1666: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1883: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1671 "configure"
+#line 1888 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1676,7 +1893,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1698,12 +1915,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1702: checking for working const" >&5
+echo "configure:1919: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1707 "configure"
+#line 1924 "configure"
#include "confdefs.h"
int main() {
@@ -1752,7 +1969,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1773,12 +1990,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1777: checking for uid_t in sys/types.h" >&5
+echo "configure:1994: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1782 "configure"
+#line 1999 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1807,12 +2024,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1811: checking for mode_t" >&5
+echo "configure:2028: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1816 "configure"
+#line 2033 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1840,12 +2057,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1844: checking for pid_t" >&5
+echo "configure:2061: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1849 "configure"
+#line 2066 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1873,12 +2090,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1877: checking for size_t" >&5
+echo "configure:2094: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1882 "configure"
+#line 2099 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1906,12 +2123,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1910: checking return type of signal handlers" >&5
+echo "configure:2127: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1915 "configure"
+#line 2132 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1928,7 +2145,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1948,12 +2165,12 @@ EOF
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:1952: checking for st_blksize in struct stat" >&5
+echo "configure:2169: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1957 "configure"
+#line 2174 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1961,7 +2178,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -1982,12 +2199,12 @@ EOF
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:1986: checking for st_rdev in struct stat" >&5
+echo "configure:2203: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1991 "configure"
+#line 2208 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1995,7 +2212,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2018,12 +2235,12 @@ fi
for ac_func in mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2022: checking for $ac_func" >&5
+echo "configure:2239: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2027 "configure"
+#line 2244 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2046,7 +2263,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2072,15 +2289,41 @@ fi
done
-for ac_func in fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 mknod getpassphrase
+for ac_func in \
+ fchdir \
+ fchmod \
+ fsync \
+ ftime \
+ ftruncate \
+ getgroups \
+ getpagesize \
+ getpassphrase \
+ gettimeofday \
+ initgroups \
+ mknod \
+ mkstemp \
+ mktemp \
+ putenv \
+ readlink \
+ sigaction \
+ sigblock \
+ sigprocmask \
+ sigsetmask \
+ sigvec \
+ tempnam \
+ timezone \
+ tzset \
+ vprintf \
+ wait3 \
+
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2079: checking for $ac_func" >&5
+echo "configure:2322: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2084 "configure"
+#line 2327 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2103,7 +2346,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2127,6 +2370,66 @@ else
fi
done
+# we only need one of the following
+for ac_func in \
+ nanosleep \
+ usleep \
+ select \
+
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2382: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2387 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* 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();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
cat >> confdefs.h <<\EOF
#define HAVE_STRCHR 1
@@ -2147,17 +2450,17 @@ EOF
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2151: checking for vfork.h" >&5
+echo "configure:2454: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2156 "configure"
+#line 2459 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2182,18 +2485,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2186: checking for working vfork" >&5
+echo "configure:2489: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2192: checking for vfork" >&5
+echo "configure:2495: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2197 "configure"
+#line 2500 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2216,7 +2519,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2238,7 +2541,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2242 "configure"
+#line 2545 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2333,7 +2636,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2356,7 +2659,7 @@ EOF
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
-echo "configure:2360: checking whether closedir returns void" >&5
+echo "configure:2663: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2364,13 +2667,13 @@ else
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <<EOF
-#line 2368 "configure"
+#line 2671 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
-if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
@@ -2395,14 +2698,14 @@ fi
echo $ac_n "checking for library containing getspnam""... $ac_c" 1>&6
-echo "configure:2399: checking for library containing getspnam" >&5
+echo "configure:2702: checking for library containing getspnam" >&5
if eval "test \"`echo '$''{'ac_cv_search_getspnam'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getspnam="no"
cat > conftest.$ac_ext <<EOF
-#line 2406 "configure"
+#line 2709 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2413,7 +2716,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getspnam="none required"
else
@@ -2424,7 +2727,7 @@ rm -f conftest*
test "$ac_cv_search_getspnam" = "no" && for i in sec gen; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2428 "configure"
+#line 2731 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2435,7 +2738,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getspnam="-l$i"
break
@@ -2460,7 +2763,7 @@ else :
fi
echo $ac_n "checking for zlibVersion in -lz""... $ac_c" 1>&6
-echo "configure:2464: checking for zlibVersion in -lz" >&5
+echo "configure:2767: checking for zlibVersion in -lz" >&5
ac_lib_var=`echo z'_'zlibVersion | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2468,7 +2771,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2472 "configure"
+#line 2775 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2479,7 +2782,7 @@ int main() {
zlibVersion()
; return 0; }
EOF
-if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2505,7 +2808,7 @@ fi
echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
-echo "configure:2509: checking whether utime accepts a null argument" >&5
+echo "configure:2812: checking whether utime accepts a null argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2515,7 +2818,7 @@ if test "$cross_compiling" = yes; then
ac_cv_func_utime_null=no
else
cat > conftest.$ac_ext <<EOF
-#line 2519 "configure"
+#line 2822 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2526,7 +2829,7 @@ exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& t.st_mtime - s.st_mtime < 120));
}
EOF
-if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_utime_null=yes
else
@@ -2550,7 +2853,7 @@ EOF
fi
echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:2554: checking for long file names" >&5
+echo "configure:2857: checking for long file names" >&5
if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2595,7 +2898,7 @@ fi
echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
-echo "configure:2599: checking for working fnmatch" >&5
+echo "configure:2902: checking for working fnmatch" >&5
if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2606,11 +2909,11 @@ if test "$cross_compiling" = yes; then
ac_cv_func_fnmatch_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 2610 "configure"
+#line 2913 "configure"
#include "confdefs.h"
main() { exit (fnmatch ("a*", "abc", 0) != 0); }
EOF
-if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_fnmatch_works=yes
else
@@ -2638,7 +2941,7 @@ fi
# Try to find connect and gethostbyname.
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:2642: checking for main in -lnsl" >&5
+echo "configure:2945: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2646,14 +2949,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2650 "configure"
+#line 2953 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2670,14 +2973,14 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
-echo "configure:2674: checking for library containing connect" >&5
+echo "configure:2977: checking for library containing connect" >&5
if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_connect="no"
cat > conftest.$ac_ext <<EOF
-#line 2681 "configure"
+#line 2984 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2688,7 +2991,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="none required"
else
@@ -2699,7 +3002,7 @@ rm -f conftest*
test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
LIBS="-l$i -lnsl $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2703 "configure"
+#line 3006 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2710,7 +3013,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="-l$i"
break
@@ -2737,14 +3040,14 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
-echo "configure:2741: checking for library containing connect" >&5
+echo "configure:3044: checking for library containing connect" >&5
if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_connect="no"
cat > conftest.$ac_ext <<EOF
-#line 2748 "configure"
+#line 3051 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2755,7 +3058,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="none required"
else
@@ -2766,7 +3069,7 @@ rm -f conftest*
test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2770 "configure"
+#line 3073 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2777,7 +3080,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="-l$i"
break
@@ -2804,14 +3107,14 @@ fi
echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
-echo "configure:2808: checking for library containing gethostbyname" >&5
+echo "configure:3111: checking for library containing gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostbyname="no"
cat > conftest.$ac_ext <<EOF
-#line 2815 "configure"
+#line 3118 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2822,7 +3125,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="none required"
else
@@ -2833,7 +3136,7 @@ rm -f conftest*
test "$ac_cv_search_gethostbyname" = "no" && for i in netinet nsl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2837 "configure"
+#line 3140 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2844,7 +3147,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="-l$i"
break
@@ -2877,19 +3180,19 @@ echo "default place for krb4 is $KRB4"
krb_h=
echo $ac_n "checking for krb.h""... $ac_c" 1>&6
-echo "configure:2881: checking for krb.h" >&5
+echo "configure:3184: checking for krb.h" >&5
if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$KRB4/include"
cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
+#line 3189 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=$KRB4/include
else
@@ -2898,14 +3201,14 @@ else
rm -rf conftest*
CFLAGS=$hold_cflags
cat > conftest.$ac_ext <<EOF
-#line 2902 "configure"
+#line 3205 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=
else
@@ -2918,14 +3221,14 @@ rm -f conftest*
CFLAGS=$hold_cflags
else
cat > conftest.$ac_ext <<EOF
-#line 2922 "configure"
+#line 3225 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=
else
@@ -2936,14 +3239,14 @@ rm -f conftest*
fi
if test -z "$krb_h"; then
cat > conftest.$ac_ext <<EOF
-#line 2940 "configure"
+#line 3243 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=
else
@@ -2954,14 +3257,14 @@ else
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
cat > conftest.$ac_ext <<EOF
-#line 2958 "configure"
+#line 3261 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=$KRB4/include/kerberosIV
else
@@ -2984,16 +3287,15 @@ if test -n "$krb_h"; then
hold_ldflags=$LDFLAGS
LDFLAGS="-L${KRB4}/lib $LDFLAGS"
echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
-echo "configure:2988: checking for printf in -lkrb" >&5
+echo "configure:3291: checking for printf in -lkrb" >&5
ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-# -lkrb is handled explicitly later
-#LIBS="-lkrb $LIBS"
+LIBS="-lkrb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2996 "configure"
+#line 3299 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3004,7 +3306,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3026,16 +3328,15 @@ LDFLAGS=$hold_ldflags
# Using open here instead of printf so we don't
# get confused by the cached value for printf from above.
echo $ac_n "checking for open in -lkrb""... $ac_c" 1>&6
-echo "configure:3029: checking for open in -lkrb" >&5
+echo "configure:3332: checking for open in -lkrb" >&5
ac_lib_var=`echo krb'_'open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-# -lkrb is handled explicitly later
-#LIBS="-lkrb $LIBS"
+LIBS="-lkrb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3037 "configure"
+#line 3340 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3046,7 +3347,7 @@ int main() {
open()
; return 0; }
EOF
-if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3071,16 +3372,15 @@ fi
LDFLAGS=$hold_ldflags
else
echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
-echo "configure:3073: checking for printf in -lkrb" >&5
+echo "configure:3376: checking for printf in -lkrb" >&5
ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-# -lkrb is handled explicitly later
-#LIBS="-lkrb $LIBS"
+LIBS="-lkrb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3081 "configure"
+#line 3384 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3091,7 +3391,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3118,24 +3418,22 @@ fi
EOF
test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
-# -lkrb is handled explicitly later
-# LIBS="${LIBS} -lkrb"
+ LIBS="${LIBS} -lkrb"
# 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 $ac_n "checking for printf in -ldes""... $ac_c" 1>&6
-echo "configure:3126: checking for printf in -ldes" >&5
+echo "configure:3429: checking for printf in -ldes" >&5
ac_lib_var=`echo des'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
-# -ldes is handled explicitly later
-#LIBS="-ldes $LIBS"
+LIBS="-ldes $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3134 "configure"
+#line 3437 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3146,7 +3444,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3161,8 +3459,7 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
-# -ldes is handled explicitly later
-# LIBS="${LIBS} -ldes"
+ LIBS="${LIBS} -ldes"
else
echo "$ac_t""no" 1>&6
fi
@@ -3176,12 +3473,12 @@ fi
for ac_func in krb_get_err_text
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3174: checking for $ac_func" >&5
+echo "configure:3477: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3179 "configure"
+#line 3482 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3204,7 +3501,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3245,17 +3542,17 @@ for ac_hdr in krb5.h gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3243: checking for $ac_hdr" >&5
+echo "configure:3546: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3248 "configure"
+#line 3551 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3293,15 +3590,15 @@ EOF
includeopt="${includeopt} -I$GSSAPI/include/kerberosV"
# FIXME: This is ugly, but these things don't seem to be standardized.
if test "$ac_cv_header_gssapi_h" = "yes"; then
- LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkafs -lkrb5 -lkrb -lasn1 -ldes -lcrypto -lcom_err"
+ LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkrb lkrb5 -lasn1 -lcrypto -lcom_err -lkafs"
else
- LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkafs -lkrb5 -lkrb -ldes -lcrypto -lcom_err"
+ LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb -lkrb5 -lcrypto -lcom_err -lkafs"
fi
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$GSSAPI/include/kerberosV $CPPFLAGS"
if test "$ac_cv_header_gssapi_h" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 3299 "configure"
+#line 3602 "configure"
#include "confdefs.h"
#include <gssapi.h>
EOF
@@ -3317,7 +3614,7 @@ rm -f conftest*
else
cat > conftest.$ac_ext <<EOF
-#line 3315 "configure"
+#line 3618 "configure"
#include "confdefs.h"
#include <gssapi/gssapi.h>
EOF
@@ -3336,7 +3633,7 @@ rm -f conftest*
# 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 $ac_n "checking for compile in -lgen""... $ac_c" 1>&6
-echo "configure:3334: checking for compile in -lgen" >&5
+echo "configure:3637: checking for compile in -lgen" >&5
ac_lib_var=`echo gen'_'compile | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3344,7 +3641,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3342 "configure"
+#line 3645 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3355,7 +3652,7 @@ int main() {
compile()
; return 0; }
EOF
-if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3404,12 +3701,12 @@ EOF
fi
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
-echo "configure:3402: checking for gethostname" >&5
+echo "configure:3705: checking for gethostname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3407 "configure"
+#line 3710 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostname(); below. */
@@ -3432,7 +3729,7 @@ gethostname();
; return 0; }
EOF
-if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostname=yes"
else
@@ -3511,12 +3808,12 @@ if test "$enable_server" = yes; then
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3509: checking for $ac_func" >&5
+echo "configure:3812: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3514 "configure"
+#line 3817 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3539,7 +3836,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3565,7 +3862,7 @@ done
if test "$ac_cv_func_crypt" = no; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:3563: checking for crypt in -lcrypt" >&5
+echo "configure:3866: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3573,7 +3870,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3571 "configure"
+#line 3874 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3584,7 +3881,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3614,12 +3911,12 @@ fi
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3612: checking for $ac_func" >&5
+echo "configure:3915: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3617 "configure"
+#line 3920 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3642,7 +3939,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3678,19 +3975,19 @@ fi # enable_server
echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
-echo "configure:3676: checking for cygwin32" >&5
+echo "configure:3979: checking for cygwin32" >&5
if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3681 "configure"
+#line 3984 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN32__;
; return 0; }
EOF
-if { (eval echo configure:3688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ccvs_cv_sys_cygwin32=yes
else
@@ -3792,7 +4089,19 @@ fi
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-DEFS=-DHAVE_CONFIG_H
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
@@ -3830,12 +4139,30 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
- man/Makefile tools/Makefile \
+trap 'rm -fr `echo "Makefile \
contrib/Makefile \
- windows-NT/Makefile windows-NT/SCC/Makefile \
- os2/Makefile emx/Makefile vms/Makefile \
- stamp-h config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ diff/Makefile \
+ doc/Makefile \
+ emx/Makefile \
+ lib/Makefile \
+ man/Makefile \
+ os2/Makefile \
+ src/Makefile \
+ src/cvsbug \
+ tools/Makefile \
+ vms/Makefile \
+ windows-NT/Makefile \
+ windows-NT/SCC/Makefile \
+ zlib/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3876,8 +4203,13 @@ s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@SET_MAKE@%$SET_MAKE%g
s%@RANLIB@%$RANLIB%g
s%@YACC@%$YACC%g
-s%@perl_path@%$perl_path%g
-s%@csh_path@%$csh_path%g
+s%@LN_S@%$LN_S%g
+s%@PERL@%$PERL%g
+s%@CSH@%$CSH%g
+s%@PR@%$PR%g
+s%@ROFF@%$ROFF%g
+s%@PS2PDF@%$PS2PDF%g
+s%@TEXI2DVI@%$TEXI2DVI%g
s%@CPP@%$CPP%g
s%@LIBOBJS@%$LIBOBJS%g
s%@ZLIB@%$ZLIB%g
@@ -3927,12 +4259,30 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
- man/Makefile tools/Makefile \
+CONFIG_FILES=\${CONFIG_FILES-"Makefile \
contrib/Makefile \
- windows-NT/Makefile windows-NT/SCC/Makefile \
- os2/Makefile emx/Makefile vms/Makefile \
- stamp-h"}
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ diff/Makefile \
+ doc/Makefile \
+ emx/Makefile \
+ lib/Makefile \
+ man/Makefile \
+ os2/Makefile \
+ src/Makefile \
+ src/cvsbug \
+ tools/Makefile \
+ vms/Makefile \
+ windows-NT/Makefile \
+ windows-NT/SCC/Makefile \
+ zlib/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3991,119 +4341,22 @@ s%@INSTALL@%$INSTALL%g
fi; done
rm -f conftest.s*
-# 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='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='\([ ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="config.h src/options.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- echo creating $ac_file
-
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h. 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.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# 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.vals <<\EOF
-s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
-' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
-fi; done
-
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
-
+chmod -f +x \
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ src/cvsbug
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/gnu/usr.bin/cvs/configure.in b/gnu/usr.bin/cvs/configure.in
index cb847b653a9..883136813a5 100644
--- a/gnu/usr.bin/cvs/configure.in
+++ b/gnu/usr.bin/cvs/configure.in
@@ -1,18 +1,35 @@
dnl configure.in for cvs
AC_INIT(src/cvs.h)
+AM_INIT_AUTOMAKE(cvs, 1.11.1p1)
AC_PREREQ(2.13)
AC_PREFIX_PROGRAM(cvs)
-AC_CONFIG_HEADER(config.h src/options.h)
+AM_CONFIG_HEADER(config.h src/options.h)
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+# Automake's more advanced version of AC_PROG_RANLIB
AC_PROG_RANLIB
AC_PROG_YACC
+AC_PROG_LN_S
+
+AC_PATH_PROG(PERL, perl, no)
+AC_PATH_PROG(CSH, csh, no)
+AC_PATH_PROG(PR, pr, no)
+# For diff/util.c
+if test x"$PR" != xno; then
+ AC_DEFINE_UNQUOTED([PR_PROGRAM], ["$PR"], [Path to the pr utility])
+fi
-AC_PATH_PROG(perl_path, perl, no)
-AC_PATH_PROG(csh_path, csh, no)
+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?
+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
@@ -21,6 +38,34 @@ if test X"$ac_cv_sys_interpreter" != X"yes" ; then
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_AIX
AC_MINIX
AC_ISC_POSIX
@@ -35,7 +80,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
sys/param.h sys/select.h sys/time.h sys/timeb.h \
- io.h direct.h sys/bsdtypes.h sys/resource.h)
+ io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h)
AC_HEADER_STAT
AC_HEADER_TIME
@@ -49,7 +94,39 @@ AC_TYPE_SIGNAL
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_RDEV
AC_REPLACE_FUNCS(mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul)
-AC_CHECK_FUNCS(fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 mknod getpassphrase)
+AC_CHECK_FUNCS(\
+ fchdir \
+ fchmod \
+ fsync \
+ ftime \
+ ftruncate \
+ getgroups \
+ getpagesize \
+ getpassphrase \
+ gettimeofday \
+ initgroups \
+ mknod \
+ mkstemp \
+ mktemp \
+ putenv \
+ readlink \
+ sigaction \
+ sigblock \
+ sigprocmask \
+ sigsetmask \
+ sigvec \
+ tempnam \
+ timezone \
+ tzset \
+ vprintf \
+ wait3 \
+)
+# we only need one of the following
+AC_CHECK_FUNCS([\
+ nanosleep \
+ usleep \
+ select \
+], [break])
dnl
dnl The CVS coding standard (as specified in HACKING) is that if it exists
@@ -351,9 +428,38 @@ test -f src/options.h && (
cp ./src/options.h ./src/options.h-SAVED
)
-AC_OUTPUT(Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
- man/Makefile tools/Makefile \
+AC_OUTPUT([Makefile \
contrib/Makefile \
- windows-NT/Makefile windows-NT/SCC/Makefile \
- os2/Makefile emx/Makefile vms/Makefile \
- stamp-h)
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ diff/Makefile \
+ doc/Makefile \
+ emx/Makefile \
+ lib/Makefile \
+ man/Makefile \
+ os2/Makefile \
+ src/Makefile \
+ src/cvsbug \
+ tools/Makefile \
+ vms/Makefile \
+ windows-NT/Makefile \
+ windows-NT/SCC/Makefile \
+ zlib/Makefile],
+ [chmod -f +x \
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ src/cvsbug])
diff --git a/gnu/usr.bin/cvs/contrib/Makefile.in b/gnu/usr.bin/cvs/contrib/Makefile.in
index 71c56bb751e..910546e282e 100644
--- a/gnu/usr.bin/cvs/contrib/Makefile.in
+++ b/gnu/usr.bin/cvs/contrib/Makefile.in
@@ -1,3 +1,18 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+@SET_MAKE@
+
# Makefile for GNU CVS contributed sources.
# Do not use this makefile directly, but only from `../Makefile'.
# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
@@ -12,120 +27,365 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
+# DISTFILES = \
+# ChangeLog README .cvsignore intro.doc \
+# Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs2vendor.sh \
+# cvs_acls.pl cvscheck.sh cvscheck.man cvshelp.man debug_check_log.sh \
+# descend.sh \
+# descend.man dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh \
+# rcs2log.sh rcslock.pl sccs2rcs.csh rcs2sccs.sh
+
+# files installed in $(pkgdatadir)
+#
+# CONTRIB_FILES = README intro.doc cvscheck.man
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to install the executables.
bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
-# Where to put the system-wide .cvsrc file
-libexecdir = $(prefix)/libexec
-
-# Where to put the system-wide .cvsrc file
-datadir = $(prefix)/share
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-# Where to put the manual pages.
-mandir = @mandir@
+top_builddir = ..
-# where to find command interpreters
-perl_path = @perl_path@
-csh_path = @csh_path@
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-# Use cp if you don't have install.
INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
-DISTFILES = \
- ChangeLog README .cvsignore intro.doc \
- Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs2vendor.sh \
- cvs_acls.pl cvscheck.sh cvscheck.man cvshelp.man descend.sh \
- descend.man dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh \
- rcs2log.sh rcslock.pl sccs2rcs.csh rcs2sccs.sh
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
-# files installed in $(datadir)/cvs/contrib
-#
-CONTRIB_FILES = README intro.doc cvscheck.man
+contribdir = $(pkgdatadir)/contrib
-# things we actually build and install....
-#
-PROGS = rcs2log
-CONTRIB_PROGS = clmerge cln_hist commit_prep cvs2vendor cvs_acls cvscheck \
- log log_accum mfpipe rcs-to-cvs rcs2log rcslock sccs2rcs
+contrib_SCRIPTS = \
+ clmerge \
+ cln_hist \
+ commit_prep \
+ cvs2vendor \
+ cvs_acls \
+ cvscheck \
+ debug_check_log \
+ log \
+ log_accum \
+ mfpipe \
+ rcs-to-cvs \
+ rcs2log \
+ rcslock \
+ sccs2rcs
-.SUFFIXES: .pl .sh .csh
-.pl:
- rm -f $@
- sed -e 's,xPERL_PATHx,$(perl_path),' $< > $@-t
- mv $@-t $@
- chmod +x $@
+contrib_DATA = \
+ README \
+ intro.doc
-.csh:
- rm -f $@
- sed -e 's,xCSH_PATHx,$(csh_path),' $< > $@-t
- mv $@-t $@
- chmod +x $@
-.sh:
- rm -f $@
- cp $< $@
- chmod +x $@
+contrib_MANS = \
+ cvscheck.man
+
+
+bin_LINKS = \
+ rcs2log
+
+
+EXTRA_DIST = \
+ .cvsignore \
+ $(contrib_DATA) \
+ $(contrib_MANS) \
+ cvs2vendor.sh \
+ cvscheck.sh \
+ cvshelp.man \
+ debug_check_log.sh \
+ descend.sh \
+ descend.man \
+ dirfns.shar \
+ rcs-to-cvs.sh \
+ rcs2log.sh \
+ rcs2sccs.sh
+
-all: Makefile $(PROGS) $(CONTRIB_PROGS)
-.PHONY: all
+CLEANFILES = $(bin_SCRIPTS) $(contrib_SCRIPTS)
-install: all installdirs
- for f in $(CONTRIB_FILES) ; do\
- $(INSTALL_DATA) $(srcdir)/$$f $(datadir)/cvs/contrib/$$f; \
+SUFFIXES = .sh
+EXEEXT =
+OBJEXT = o
+subdir = contrib
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES = clmerge cln_hist commit_prep cvs_acls log log_accum \
+ mfpipe rcslock sccs2rcs
+SCRIPTS = $(contrib_SCRIPTS)
+
+DIST_SOURCES =
+DATA = $(contrib_DATA)
+
+DIST_COMMON = README ChangeLog Makefile.am Makefile.in clmerge.in \
+ cln_hist.in commit_prep.in cvs_acls.in log.in log_accum.in \
+ mfpipe.in rcslock.in sccs2rcs.in
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sh
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu contrib/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+clmerge: $(top_builddir)/config.status clmerge.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+cln_hist: $(top_builddir)/config.status cln_hist.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+commit_prep: $(top_builddir)/config.status commit_prep.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+cvs_acls: $(top_builddir)/config.status cvs_acls.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+log: $(top_builddir)/config.status log.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+log_accum: $(top_builddir)/config.status log_accum.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+mfpipe: $(top_builddir)/config.status mfpipe.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+rcslock: $(top_builddir)/config.status rcslock.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+sccs2rcs: $(top_builddir)/config.status sccs2rcs.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+install-contribSCRIPTS: $(contrib_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(contribdir)
+ @list='$(contrib_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(contribdir)/$$f"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(contribdir)/$$f; \
+ elif test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(contribdir)/$$f"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(contribdir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-contribSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(contrib_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \
+ rm -f $(DESTDIR)$(contribdir)/$$f; \
+ done
+install-contribDATA: $(contrib_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(contribdir)
+ @list='$(contrib_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(contribdir)/$$f"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(contribdir)/$$f; \
done
- for f in $(CONTRIB_PROGS) ; do\
- $(INSTALL_PROGRAM) $$f $(libexecdir)/cvs/contrib/$$f; \
+
+uninstall-contribDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(contrib_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \
+ rm -f $(DESTDIR)$(contribdir)/$$f; \
done
- for f in $(PROGS) ; do\
- $(INSTALL_PROGRAM) $$f $(bindir)/$$f; \
+tags: TAGS
+TAGS:
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
done
-.PHONY: install
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
- $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir)/cvs/contrib
- $(SHELL) $(top_srcdir)/mkinstalldirs $(libexecdir)/cvs/contrib
-.PHONY: installdirs
+ $(mkinstalldirs) $(DESTDIR)$(contribdir) $(DESTDIR)$(contribdir)
-tags:
-.PHONY: tags
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-TAGS:
-.PHONY: TAGS
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+installcheck: installcheck-am
-clean:
- rm -f *.o core
-.PHONY: clean
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-distclean: clean
- rm -f Makefile $(PROGS) $(CONTRIB_PROGS)
-.PHONY: distclean
+mostlyclean-generic:
-realclean: distclean
-.PHONY: realclean
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+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 Makefile.in
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am: install-contribDATA install-contribSCRIPTS \
+ install-data-local
+
+install-exec-am:
+
+install-info:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+uninstall-am: uninstall-contribDATA uninstall-contribSCRIPTS \
+ uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-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-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ uninstall uninstall-am uninstall-contribDATA \
+ uninstall-contribSCRIPTS 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
+ # & contribdir
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_LINKS)'; for p in $$list; do \
+ echo "test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ echo " && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` ."; \
+ (test ! -e $(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
-.PHONY: dist-dir
-subdir = contrib
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+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:
diff --git a/gnu/usr.bin/cvs/contrib/clmerge.pl b/gnu/usr.bin/cvs/contrib/clmerge.pl
deleted file mode 100644
index ac813713a82..00000000000
--- a/gnu/usr.bin/cvs/contrib/clmerge.pl
+++ /dev/null
@@ -1,152 +0,0 @@
-#! xPERL_PATHx
-
-# Merge conflicted ChangeLogs
-# tromey Mon Aug 15 1994
-
-# Usage is:
-#
-# cl-merge [-i] file ...
-#
-# With -i, it works in place (backups put in a ~ file). Otherwise the
-# merged ChangeLog is printed to stdout.
-
-# Please report any bugs to me. I wrote this yesterday, so there are no
-# guarantees about its performance. I recommend checking its output
-# carefully. If you do send a bug report, please include the failing
-# ChangeLog, so I can include it in my test suite.
-#
-# Tom
-# ---
-# tromey@busco.lanl.gov Member, League for Programming Freedom
-# Sadism and farce are always inexplicably linked.
-# -- Alexander Theroux
-
-
-# Month->number mapping. Used for sorting.
-%months = ('Jan', 0,
- 'Feb', 1,
- 'Mar', 2,
- 'Apr', 3,
- 'May', 4,
- 'Jun', 5,
- 'Jul', 6,
- 'Aug', 7,
- 'Sep', 8,
- 'Oct', 9,
- 'Nov', 10,
- 'Dec', 11);
-
-# If '-i' is given, do it in-place.
-if ($ARGV[0] eq '-i') {
- shift (@ARGV);
- $^I = '~';
-}
-
-$lastkey = '';
-$lastval = '';
-$conf = 0;
-%conflist = ();
-
-$tjd = 0;
-
-# Simple state machine. The states:
-#
-# 0 Not in conflict. Just copy input to output.
-# 1 Beginning an entry. Next non-blank line is key.
-# 2 In entry. Entry beginner transitions to state 1.
-while (<>) {
- if (/^<<<</ || /^====/) {
- # Start of a conflict.
-
- # Copy last key into array.
- if ($lastkey ne '') {
- $conflist{$lastkey} = $lastval;
-
- $lastkey = '';
- $lastval = '';
- }
-
- $conf = 1;
- } elsif (/^>>>>/) {
- # End of conflict. Output.
-
- # Copy last key into array.
- if ($lastkey ne '') {
- $conflist{$lastkey} = $lastval;
-
- $lastkey = '';
- $lastval = '';
- }
-
- foreach (reverse sort clcmp keys %conflist) {
- print STDERR "doing $_" if $tjd;
- print $_;
- print $conflist{$_};
- }
-
- $lastkey = '';
- $lastval = '';
- $conf = 0;
- %conflist = ();
- } elsif ($conf == 1) {
- # Beginning an entry. Skip empty lines. Error if not a real
- # beginner.
- if (/^$/) {
- # Empty line; just skip at this point.
- } elsif (/^[MTWFS]/) {
- # Looks like the name of a day; assume opener and move to
- # "in entry" state.
- $lastkey = $_;
- $conf = 2;
- print STDERR "found $_" if $tjd;
- } else {
- die ("conflict crosses entry boundaries: $_");
- }
- } elsif ($conf == 2) {
- # In entry. Copy into variable until we see beginner line.
- if (/^[MTWFS]/) {
- # Entry beginner line.
-
- # Copy last key into array.
- if ($lastkey ne '') {
- $conflist{$lastkey} = $lastval;
-
- $lastkey = '';
- $lastval = '';
- }
-
- $lastkey = $_;
- print STDERR "found $_" if $tjd;
- $lastval = '';
- } else {
- $lastval .= $_;
- }
- } else {
- # Just copy.
- print;
- }
-}
-
-# Compare ChangeLog time strings like <=>.
-#
-# 0 1 2 3
-# Thu Aug 11 13:22:42 1994 Tom Tromey (tromey@creche.colorado.edu)
-# 0123456789012345678901234567890
-#
-sub clcmp {
- # First check year.
- $r = substr ($a, 20, 4) <=> substr ($b, 20, 4);
-
- # Now check month.
- $r = $months{substr ($a, 4, 3)} <=> $months{substr ($b, 4, 3)} if !$r;
-
- # Now check day.
- $r = substr ($a, 8, 2) <=> substr ($b, 8, 2) if !$r;
-
- # Now check time (3 parts).
- $r = substr ($a, 11, 2) <=> substr ($b, 11, 2) if !$r;
- $r = substr ($a, 14, 2) <=> substr ($b, 14, 2) if !$r;
- $r = substr ($a, 17, 2) <=> substr ($b, 17, 2) if !$r;
-
- $r;
-}
diff --git a/gnu/usr.bin/cvs/contrib/cln_hist.pl b/gnu/usr.bin/cvs/contrib/cln_hist.pl
deleted file mode 100644
index 7724331ba48..00000000000
--- a/gnu/usr.bin/cvs/contrib/cln_hist.pl
+++ /dev/null
@@ -1,92 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-#
-# $Id: cln_hist.pl,v 1.1 1995/12/19 09:21:39 deraadt Exp $
-# Contributed by David G. Grubbs <dgg@ksr.com>
-#
-# Clean up the history file. 10 Record types: MAR OFT WUCG
-#
-# WUCG records are thrown out.
-# MAR records are retained.
-# T records: retain only last tag with same combined tag/module.
-#
-# Two passes: Walk through the first time and remember the
-# 1. Last Tag record with same "tag" and "module" names.
-# 2. Last O record with unique user/module/directory, unless followed
-# by a matching F record.
-#
-
-$r = $ENV{"CVSROOT"};
-$c = "$r/CVSROOT";
-$h = "$c/history";
-
-eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
- while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV));
-exit 255 if $die; # process any variable=value switches
-
-%tags = ();
-%outs = ();
-
-#
-# Move history file to safe place and re-initialize a new one.
-#
-rename($h, "$h.bak");
-open(XX, ">$h");
-close(XX);
-
-#
-# Pass1 -- remember last tag and checkout.
-#
-open(HIST, "$h.bak");
-while (<HIST>) {
- next if /^[MARWUCG]/;
-
- # Save whole line keyed by tag|module
- if (/^T/) {
- @tmp = split(/\|/, $_);
- $tags{$tmp[4] . '|' . $tmp[5]} = $_;
- }
- # Save whole line
- if (/^[OF]/) {
- @tmp = split(/\|/, $_);
- $outs{$tmp[1] . '|' . $tmp[2] . '|' . $tmp[5]} = $_;
- }
-}
-
-#
-# Pass2 -- print out what we want to save.
-#
-open(SAVE, ">$h.work");
-open(HIST, "$h.bak");
-while (<HIST>) {
- next if /^[FWUCG]/;
-
- # If whole line matches saved (i.e. "last") one, print it.
- if (/^T/) {
- @tmp = split(/\|/, $_);
- next if $tags{$tmp[4] . '|' . $tmp[5]} ne $_;
- }
- # Save whole line
- if (/^O/) {
- @tmp = split(/\|/, $_);
- next if $outs{$tmp[1] . '|' . $tmp[2] . '|' . $tmp[5]} ne $_;
- }
-
- print SAVE $_;
-}
-
-#
-# Put back the saved stuff
-#
-system "cat $h >> $h.work";
-
-if (-s $h) {
- rename ($h, "$h.interim");
- print "history.interim has non-zero size.\n";
-} else {
- unlink($h);
-}
-
-rename ("$h.work", $h);
-
-exit(0);
diff --git a/gnu/usr.bin/cvs/contrib/commit_prep.pl b/gnu/usr.bin/cvs/contrib/commit_prep.pl
deleted file mode 100644
index 61e20055919..00000000000
--- a/gnu/usr.bin/cvs/contrib/commit_prep.pl
+++ /dev/null
@@ -1,216 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-#
-#ident "@(#)cvs/contrib:$Name: $:$Id: commit_prep.pl,v 1.1 1995/12/19 09:21:39 deraadt Exp $"
-#
-# Perl filter to handle pre-commit checking of files. This program
-# records the last directory where commits will be taking place for
-# use by the log_accum.pl script. For new files, it forces the
-# existence of a RCS "Id" keyword in the first ten lines of the file.
-# For existing files, it checks version number in the "Id" line to
-# prevent losing changes because an old version of a file was copied
-# into the direcory.
-#
-# Possible future enhancements:
-#
-# Check for cruft left by unresolved conflicts. Search for
-# "^<<<<<<<$", "^-------$", and "^>>>>>>>$".
-#
-# Look for a copyright and automagically update it to the
-# current year. [[ bad idea! -- woods ]]
-#
-#
-# Contributed by David Hampton <hampton@cisco.com>
-#
-# Hacked on lots by Greg A. Woods <woods@web.net>
-
-#
-# Configurable options
-#
-
-# Constants (remember to protect strings from RCS keyword substitution)
-#
-$LAST_FILE = "/tmp/#cvs.lastdir"; # must match name in log_accum.pl
-$ENTRIES = "CVS/Entries";
-
-# Patterns to find $Log keywords in files
-#
-$LogString1 = "\\\$\\Log: .* \\\$";
-$LogString2 = "\\\$\\Log\\\$";
-$NoLog = "%s - contains an RCS \$Log keyword. It must not!\n";
-
-# pattern to match an RCS Id keyword line with an existing ID
-#
-$IDstring = "\"@\\(#\\)[^:]*:.*\\\$\Id: .*\\\$\"";
-$NoId = "
-%s - Does not contain a properly formatted line with the keyword \"Id:\".
- I.e. no lines match \"" . $IDstring . "\".
- Please see the template files for an example.\n";
-
-# pattern to match an RCS Id keyword line for a new file (i.e. un-expanded)
-#
-$NewId = "\"@(#)[^:]*:.*\\$\Id\\$\"";
-
-$NoName = "
-%s - The ID line should contain only \"@(#)module/path:\$Name\$:\$\Id\$\"
- for a newly created file.\n";
-
-$BadName = "
-%s - The file name '%s' in the ID line does not match
- the actual filename.\n";
-
-$BadVersion = "
-%s - How dare you!!! You replaced your copy of the file '%s',
- which was based upon version %s, with an %s version based
- upon %s. Please move your '%s' out of the way, perform an
- update to get the current version, and them merge your changes
- into that file, then try the commit again.\n";
-
-#
-# Subroutines
-#
-
-sub write_line {
- local($filename, $line) = @_;
- open(FILE, ">$filename") || die("Cannot open $filename, stopped");
- print(FILE $line, "\n");
- close(FILE);
-}
-
-sub check_version {
- local($i, $id, $rname, $version);
- local($filename, $cvsversion) = @_;
-
- open(FILE, "<$filename") || return(0);
-
- @all_lines = ();
- $idpos = -1;
- $newidpos = -1;
- for ($i = 0; <FILE>; $i++) {
- chop;
- push(@all_lines, $_);
- if ($_ =~ /$IDstring/) {
- $idpos = $i;
- }
- if ($_ =~ /$NewId/) {
- $newidpos = $i;
- }
- }
-
- if (grep(/$LogString1/, @all_lines) || grep(/$LogString2/, @all_lines)) {
- print STDERR sprintf($NoLog, $filename);
- return(1);
- }
-
- if ($debug != 0) {
- print STDERR sprintf("file = %s, version = %d.\n", $filename, $cvsversion{$filename});
- }
-
- if ($cvsversion{$filename} == 0) {
- if ($newidpos != -1 && $all_lines[$newidpos] !~ /$NewId/) {
- print STDERR sprintf($NoName, $filename);
- return(1);
- }
- return(0);
- }
-
- if ($idpos == -1) {
- print STDERR sprintf($NoId, $filename);
- return(1);
- }
-
- $line = $all_lines[$idpos];
- $pos = index($line, "Id: ");
- if ($debug != 0) {
- print STDERR sprintf("%d in '%s'.\n", $pos, $line);
- }
- ($id, $rname, $version) = split(' ', substr($line, $pos));
- if ($rname ne "$filename,v") {
- print STDERR sprintf($BadName, $filename, substr($rname, 0, length($rname)-2));
- return(1);
- }
- if ($cvsversion{$filename} < $version) {
- print STDERR sprintf($BadVersion, $filename, $filename, $cvsversion{$filename},
- "newer", $version, $filename);
- return(1);
- }
- if ($cvsversion{$filename} > $version) {
- print STDERR sprintf($BadVersion, $filename, $filename, $cvsversion{$filename},
- "older", $version, $filename);
- return(1);
- }
- return(0);
-}
-
-#
-# Main Body
-#
-
-$id = getpgrp(); # You *must* use a shell that does setpgrp()!
-
-# Check each file (except dot files) for an RCS "Id" keyword.
-#
-$check_id = 0;
-
-# Record the directory for later use by the log_accumulate stript.
-#
-$record_directory = 0;
-
-# parse command line arguments
-#
-while (@ARGV) {
- $arg = shift @ARGV;
-
- if ($arg eq '-d') {
- $debug = 1;
- print STDERR "Debug turned on...\n";
- } elsif ($arg eq '-c') {
- $check_id = 1;
- } elsif ($arg eq '-r') {
- $record_directory = 1;
- } else {
- push(@files, $arg);
- }
-}
-
-$directory = shift @files;
-
-if ($debug != 0) {
- print STDERR "dir - ", $directory, "\n";
- print STDERR "files - ", join(":", @files), "\n";
- print STDERR "id - ", $id, "\n";
-}
-
-# Suck in the CVS/Entries file
-#
-open(ENTRIES, $ENTRIES) || die("Cannot open $ENTRIES.\n");
-while (<ENTRIES>) {
- local($filename, $version) = split('/', substr($_, 1));
- $cvsversion{$filename} = $version;
-}
-
-# Now check each file name passed in, except for dot files. Dot files
-# are considered to be administrative files by this script.
-#
-if ($check_id != 0) {
- $failed = 0;
- foreach $arg (@files) {
- if (index($arg, ".") == 0) {
- next;
- }
- $failed += &check_version($arg);
- }
- if ($failed) {
- print STDERR "\n";
- exit(1);
- }
-}
-
-# Record this directory as the last one checked. This will be used
-# by the log_accumulate script to determine when it is processing
-# the final directory of a multi-directory commit.
-#
-if ($record_directory != 0) {
- &write_line("$LAST_FILE.$id", $directory);
-}
-exit(0);
diff --git a/gnu/usr.bin/cvs/contrib/cvs_acls.pl b/gnu/usr.bin/cvs/contrib/cvs_acls.pl
deleted file mode 100644
index 9149a604801..00000000000
--- a/gnu/usr.bin/cvs/contrib/cvs_acls.pl
+++ /dev/null
@@ -1,143 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-#
-# $Id: cvs_acls.pl,v 1.1 1995/12/19 09:21:39 deraadt Exp $
-#
-# Access control lists for CVS. dgg@ksr.com (David G. Grubbs)
-#
-# CVS "commitinfo" for matching repository names, running the program it finds
-# on the same line. More information is available in the CVS man pages.
-#
-# ==== INSTALLATION:
-#
-# To use this program as I intended, do the following four things:
-#
-# 0. Install PERL. :-)
-#
-# 1. Put one line, as the *only* non-comment line, in your commitinfo file:
-#
-# DEFAULT /usr/local/bin/cvs_acls
-#
-# 2. Install this file as /usr/local/bin/cvs_acls and make it executable.
-#
-# 3. Create a file named $CVSROOT/CVSROOT/avail.
-#
-# ==== FORMAT OF THE avail FILE:
-#
-# The avail file determines whether you may commit files. It contains lines
-# read from top to bottom, keeping track of a single "bit". The "bit"
-# defaults to "on". It can be turned "off" by "unavail" lines and "on" by
-# "avail" lines. ==> Last one counts.
-#
-# Any line not beginning with "avail" or "unavail" is ignored.
-#
-# Lines beginning with "avail" or "unavail" are assumed to be '|'-separated
-# triples: (All spaces and tabs are ignored in a line.)
-#
-# {avail.*,unavail.*} [| user,user,... [| repos,repos,...]]
-#
-# 1. String starting with "avail" or "unavail".
-# 2. Optional, comma-separated list of usernames.
-# 3. Optional, comma-separated list of repository pathnames.
-# These are pathnames relative to $CVSROOT. They can be directories or
-# filenames. A directory name allows access to all files and
-# directories below it.
-#
-# Example: (Text from the ';;' rightward may not appear in the file.)
-#
-# unavail ;; Make whole repository unavailable.
-# avail|dgg ;; Except for user "dgg".
-# avail|fred, john|bin/ls ;; Except when "fred" or "john" commit to
-# ;; the module whose repository is "bin/ls"
-#
-# PROGRAM LOGIC:
-#
-# CVS passes to @ARGV an absolute directory pathname (the repository
-# appended to your $CVSROOT variable), followed by a list of filenames
-# within that directory.
-#
-# We walk through the avail file looking for a line that matches both
-# the username and repository.
-#
-# A username match is simply the user's name appearing in the second
-# column of the avail line in a space-or-comma separate list.
-#
-# A repository match is either:
-# - One element of the third column matches $ARGV[0], or some
-# parent directory of $ARGV[0].
-# - Otherwise *all* file arguments ($ARGV[1..$#ARGV]) must be
-# in the file list in one avail line.
-# - In other words, using directory names in the third column of
-# the avail file allows committing of any file (or group of
-# files in a single commit) in the tree below that directory.
-# - If individual file names are used in the third column of
-# the avail file, then files must be committed individually or
-# all files specified in a single commit must all appear in
-# third column of a single avail line.
-#
-
-$debug = 0;
-$cvsroot = $ENV{'CVSROOT'};
-$availfile = $cvsroot . "/CVSROOT/avail";
-$myname = $ENV{"USER"} if !($myname = $ENV{"LOGNAME"});
-
-eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
- while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV));
-exit 255 if $die; # process any variable=value switches
-
-die "Must set CVSROOT\n" if !$cvsroot;
-($repos = shift) =~ s:^$cvsroot/::;
-grep($_ = $repos . '/' . $_, @ARGV);
-
-print "$$ Repos: $repos\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug;
-
-$exit_val = 0; # Good Exit value
-
-$universal_off = 0;
-open (AVAIL, $availfile) || exit(0); # It is ok for avail file not to exist
-while (<AVAIL>) {
- chop;
- next if /^\s*\#/;
- next if /^\s*$/;
- ($flagstr, $u, $m) = split(/[\s,]*\|[\s,]*/, $_);
-
- # Skip anything not starting with "avail" or "unavail" and complain.
- (print "Bad avail line: $_\n"), next
- if ($flagstr !~ /^avail/ && $flagstr !~ /^unavail/);
-
- # Set which bit we are playing with. ('0' is OK == Available).
- $flag = (($& eq "avail") ? 0 : 1);
-
- # If we find a "universal off" flag (i.e. a simple "unavail") remember it
- $universal_off = 1 if ($flag && !$u && !$m);
-
- # $myname considered "in user list" if actually in list or is NULL
- $in_user = (!$u || grep ($_ eq $myname, split(/[\s,]+/,$u)));
- print "$$ \$myname($myname) in user list: $_\n" if $debug && $in_user;
-
- # Module matches if it is a NULL module list in the avail line. If module
- # list is not null, we check every argument combination.
- if (!($in_repo = !$m)) {
- @tmp = split(/[\s,]+/,$m);
- for $j (@tmp) {
- # If the repos from avail is a parent(or equal) dir of $repos, OK
- $in_repo = 1, last if ($repos eq $j || $repos =~ /^$j\//);
- }
- if (!$in_repo) {
- $in_repo = 1;
- for $j (@ARGV) {
- last if !($in_repo = grep ($_ eq $j, @tmp));
- }
- }
- }
- print "$$ \$repos($repos) in repository list: $_\n" if $debug && $in_repo;
-
- $exit_val = $flag if ($in_user && $in_repo);
- print "$$ ==== \$exit_val = $exit_val\n$$ ==== \$flag = $flag\n" if $debug;
-}
-close(AVAIL);
-print "$$ ==== \$exit_val = $exit_val\n" if $debug;
-print "**** Access denied: Insufficient Karma ($myname|$repos)\n" if $exit_val;
-print "**** Access allowed: Personal Karma exceeds Environmental Karma.\n"
- if $universal_off && !$exit_val;
-exit($exit_val);
diff --git a/gnu/usr.bin/cvs/contrib/log.pl b/gnu/usr.bin/cvs/contrib/log.pl
deleted file mode 100644
index 51f759cc4c5..00000000000
--- a/gnu/usr.bin/cvs/contrib/log.pl
+++ /dev/null
@@ -1,167 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-#
-# XXX: FIXME: handle multiple '-f logfile' arguments
-#
-# XXX -- I HATE Perl! This will be re-written in shell/awk/sed soon!
-#
-
-# Usage: log.pl [[-m user] ...] [-s] -f logfile 'dirname file ...'
-#
-# -m user - for each user to receive cvs log reports
-# (multiple -m's permitted)
-# -s - to prevent "cvs status -v" messages
-# -f logfile - for the logfile to append to (mandatory,
-# but only one logfile can be specified).
-
-# here is what the output looks like:
-#
-# From: woods@kuma.domain.top
-# Subject: CVS update: testmodule
-#
-# Date: Wednesday November 23, 1994 @ 14:15
-# Author: woods
-#
-# Update of /local/src-CVS/testmodule
-# In directory kuma:/home/kuma/woods/work.d/testmodule
-#
-# Modified Files:
-# test3
-# Added Files:
-# test6
-# Removed Files:
-# test4
-# Log Message:
-# - wow, what a test
-#
-# (and for each file the "cvs status -v" output is appended unless -s is used)
-#
-# ==================================================================
-# File: test3 Status: Up-to-date
-#
-# Working revision: 1.41 Wed Nov 23 14:15:59 1994
-# Repository revision: 1.41 /local/src-CVS/cvs/testmodule/test3,v
-# Sticky Options: -ko
-#
-# Existing Tags:
-# local-v2 (revision: 1.7)
-# local-v1 (revision: 1.1.1.2)
-# CVS-1_4A2 (revision: 1.1.1.2)
-# local-v0 (revision: 1.2)
-# CVS-1_4A1 (revision: 1.1.1.1)
-# CVS (branch: 1.1.1)
-
-$cvsroot = $ENV{'CVSROOT'};
-
-# turn off setgid
-#
-$) = $(;
-
-$dostatus = 1;
-
-# parse command line arguments
-#
-while (@ARGV) {
- $arg = shift @ARGV;
-
- if ($arg eq '-m') {
- $users = "$users " . shift @ARGV;
- } elsif ($arg eq '-f') {
- ($logfile) && die "Too many '-f' args";
- $logfile = shift @ARGV;
- } elsif ($arg eq '-s') {
- $dostatus = 0;
- } else {
- ($donefiles) && die "Too many arguments!\n";
- $donefiles = 1;
- @files = split(/ /, $arg);
- }
-}
-
-# the first argument is the module location relative to $CVSROOT
-#
-$modulepath = shift @files;
-
-$mailcmd = "| Mail -s 'CVS update: $modulepath'";
-
-# Initialise some date and time arrays
-#
-@mos = (January,February,March,April,May,June,July,August,September,
- October,November,December);
-@days = (Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday);
-
-($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
-
-# get a login name for the guy doing the commit....
-#
-$login = getlogin || (getpwuid($<))[0] || "nobody";
-
-# open log file for appending
-#
-open(OUT, ">>" . $logfile) || die "Could not open(" . $logfile . "): $!\n";
-
-# send mail, if there's anyone to send to!
-#
-if ($users) {
- $mailcmd = "$mailcmd $users";
- open(MAIL, $mailcmd) || die "Could not Exec($mailcmd): $!\n";
-}
-
-# print out the log Header
-#
-print OUT "\n";
-print OUT "****************************************\n";
-print OUT "Date:\t$days[$wday] $mos[$mon] $mday, 19$year @ $hour:" . sprintf("%02d", $min) . "\n";
-print OUT "Author:\t$login\n\n";
-
-if (MAIL) {
- print MAIL "\n";
- print MAIL "Date:\t$days[$wday] $mos[$mon] $mday, 19$year @ $hour:" . sprintf("%02d", $min) . "\n";
- print MAIL "Author:\t$login\n\n";
-}
-
-# print the stuff from logmsg that comes in on stdin to the logfile
-#
-open(IN, "-");
-while (<IN>) {
- print OUT $_;
- if (MAIL) {
- print MAIL $_;
- }
-}
-close(IN);
-
-print OUT "\n";
-
-# after log information, do an 'cvs -Qqv status' on each file in the arguments.
-#
-if ($dostatus != 0) {
- while (@files) {
- $file = shift @files;
- if ($file eq "-") {
- print OUT "[input file was '-']\n";
- if (MAIL) {
- print MAIL "[input file was '-']\n";
- }
- last;
- }
- open(RCS, "-|") || exec 'cvs', '-nQq', 'status', '-v', $file;
- while (<RCS>) {
- print OUT;
- if (MAIL) {
- print MAIL;
- }
- }
- close(RCS);
- }
-}
-
-close(OUT);
-die "Write to $logfile failed" if $?;
-
-close(MAIL);
-die "Pipe to $mailcmd failed" if $?;
-
-## must exit cleanly
-##
-exit 0;
diff --git a/gnu/usr.bin/cvs/contrib/log_accum.pl b/gnu/usr.bin/cvs/contrib/log_accum.pl
deleted file mode 100644
index 1b38033d430..00000000000
--- a/gnu/usr.bin/cvs/contrib/log_accum.pl
+++ /dev/null
@@ -1,492 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-#
-# Perl filter to handle the log messages from the checkin of files in
-# a directory. This script will group the lists of files by log
-# message, and mail a single consolidated log message at the end of
-# the commit.
-#
-# This file assumes a pre-commit checking program that leaves the
-# names of the first and last commit directories in a temporary file.
-#
-# Contributed by David Hampton <hampton@cisco.com>
-#
-# hacked greatly by Greg A. Woods <woods@web.net>
-
-# Usage: log_accum.pl [-d] [-s] [-M module] [[-m mailto] ...] [-f logfile]
-# -d - turn on debugging
-# -m mailto - send mail to "mailto" (multiple)
-# -M modulename - set module name to "modulename"
-# -f logfile - write commit messages to logfile too
-# -s - *don't* run "cvs status -v" for each file
-
-#
-# Configurable options
-#
-
-$MAILER = "Mail"; # set this to something that takes "-s"
-
-# Constants (don't change these!)
-#
-$STATE_NONE = 0;
-$STATE_CHANGED = 1;
-$STATE_ADDED = 2;
-$STATE_REMOVED = 3;
-$STATE_LOG = 4;
-
-$LAST_FILE = "/tmp/#cvs.lastdir";
-
-$CHANGED_FILE = "/tmp/#cvs.files.changed";
-$ADDED_FILE = "/tmp/#cvs.files.added";
-$REMOVED_FILE = "/tmp/#cvs.files.removed";
-$LOG_FILE = "/tmp/#cvs.files.log";
-
-$FILE_PREFIX = "#cvs.files";
-
-#
-# Subroutines
-#
-
-sub cleanup_tmpfiles {
- local($wd, @files);
-
- $wd = `pwd`;
- chdir("/tmp") || die("Can't chdir('/tmp')\n");
- opendir(DIR, ".");
- push(@files, grep(/^$FILE_PREFIX\..*\.$id$/, readdir(DIR)));
- closedir(DIR);
- foreach (@files) {
- unlink $_;
- }
- unlink $LAST_FILE . "." . $id;
-
- chdir($wd);
-}
-
-sub write_logfile {
- local($filename, @lines) = @_;
-
- open(FILE, ">$filename") || die("Cannot open log file $filename.\n");
- print FILE join("\n", @lines), "\n";
- close(FILE);
-}
-
-sub append_to_logfile {
- local($filename, @lines) = @_;
-
- open(FILE, ">$filename") || die("Cannot open log file $filename.\n");
- print FILE join("\n", @lines), "\n";
- close(FILE);
-}
-
-sub format_names {
- local($dir, @files) = @_;
- local(@lines);
-
- $format = "\t%-" . sprintf("%d", length($dir)) . "s%s ";
-
- $lines[0] = sprintf($format, $dir, ":");
-
- if ($debug) {
- print STDERR "format_names(): dir = ", $dir, "; files = ", join(":", @files), ".\n";
- }
- foreach $file (@files) {
- if (length($lines[$#lines]) + length($file) > 65) {
- $lines[++$#lines] = sprintf($format, " ", " ");
- }
- $lines[$#lines] .= $file . " ";
- }
-
- @lines;
-}
-
-sub format_lists {
- local(@lines) = @_;
- local(@text, @files, $lastdir);
-
- if ($debug) {
- print STDERR "format_lists(): ", join(":", @lines), "\n";
- }
- @text = ();
- @files = ();
- $lastdir = shift @lines; # first thing is always a directory
- if ($lastdir !~ /.*\/$/) {
- die("Damn, $lastdir doesn't look like a directory!\n");
- }
- foreach $line (@lines) {
- if ($line =~ /.*\/$/) {
- push(@text, &format_names($lastdir, @files));
- $lastdir = $line;
- @files = ();
- } else {
- push(@files, $line);
- }
- }
- push(@text, &format_names($lastdir, @files));
-
- @text;
-}
-
-sub append_names_to_file {
- local($filename, $dir, @files) = @_;
-
- if (@files) {
- open(FILE, ">>$filename") || die("Cannot open file $filename.\n");
- print FILE $dir, "\n";
- print FILE join("\n", @files), "\n";
- close(FILE);
- }
-}
-
-sub read_line {
- local($line);
- local($filename) = @_;
-
- open(FILE, "<$filename") || die("Cannot open file $filename.\n");
- $line = <FILE>;
- close(FILE);
- chop($line);
- $line;
-}
-
-sub read_logfile {
- local(@text);
- local($filename, $leader) = @_;
-
- open(FILE, "<$filename");
- while (<FILE>) {
- chop;
- push(@text, $leader.$_);
- }
- close(FILE);
- @text;
-}
-
-sub build_header {
- local($header);
- local($sec,$min,$hour,$mday,$mon,$year) = localtime(time);
- $header = sprintf("CVSROOT:\t%s\nModule name:\t%s\nChanges by:\t%s@%s\t%02d/%02d/%02d %02d:%02d:%02d",
- $cvsroot,
- $modulename,
- $login, $hostdomain,
- $year%100, $mon+1, $mday,
- $hour, $min, $sec);
-}
-
-sub mail_notification {
- local($name, @text) = @_;
- open(MAIL, "| $MAILER -s \"CVS Update: " . $modulename . "\" " . $name);
- print MAIL join("\n", @text), "\n";
- close(MAIL);
-}
-
-sub write_commitlog {
- local($logfile, @text) = @_;
-
- open(FILE, ">>$logfile");
- print FILE join("\n", @text), "\n";
- close(FILE);
-}
-
-#
-# Main Body
-#
-
-# Initialize basic variables
-#
-$debug = 0;
-$id = getpgrp(); # note, you *must* use a shell which does setpgrp()
-$state = $STATE_NONE;
-$login = getlogin || (getpwuid($<))[0] || "nobody";
-chop($hostname = `hostname`);
-chop($domainname = `domainname`);
-$hostdomain = $hostname . $domainname;
-$cvsroot = $ENV{'CVSROOT'};
-$do_status = 1;
-$modulename = "";
-
-# parse command line arguments (file list is seen as one arg)
-#
-while (@ARGV) {
- $arg = shift @ARGV;
-
- if ($arg eq '-d') {
- $debug = 1;
- print STDERR "Debug turned on...\n";
- } elsif ($arg eq '-m') {
- $mailto = "$mailto " . shift @ARGV;
- } elsif ($arg eq '-M') {
- $modulename = shift @ARGV;
- } elsif ($arg eq '-s') {
- $do_status = 0;
- } elsif ($arg eq '-f') {
- ($commitlog) && die("Too many '-f' args\n");
- $commitlog = shift @ARGV;
- } else {
- ($donefiles) && die("Too many arguments! Check usage.\n");
- $donefiles = 1;
- @files = split(/ /, $arg);
- }
-}
-($mailto) || die("No -m mail recipient specified\n");
-
-# for now, the first "file" is the repository directory being committed,
-# relative to the $CVSROOT location
-#
-@path = split('/', $files[0]);
-
-# XXX there are some ugly assumptions in here about module names and
-# XXX directories relative to the $CVSROOT location -- really should
-# XXX read $CVSROOT/CVSROOT/modules, but that's not so easy to do, since
-# XXX we have to parse it backwards.
-#
-if ($modulename eq "") {
- $modulename = $path[0]; # I.e. the module name == top-level dir
-}
-if ($#path == 0) {
- $dir = ".";
-} else {
- $dir = join('/', @path);
-}
-$dir = $dir . "/";
-
-if ($debug) {
- print STDERR "module - ", $modulename, "\n";
- print STDERR "dir - ", $dir, "\n";
- print STDERR "path - ", join(":", @path), "\n";
- print STDERR "files - ", join(":", @files), "\n";
- print STDERR "id - ", $id, "\n";
-}
-
-# Check for a new directory first. This appears with files set as follows:
-#
-# files[0] - "path/name/newdir"
-# files[1] - "-"
-# files[2] - "New"
-# files[3] - "directory"
-#
-if ($files[2] =~ /New/ && $files[3] =~ /directory/) {
- local(@text);
-
- @text = ();
- push(@text, &build_header());
- push(@text, "");
- push(@text, $files[0]);
- push(@text, "");
-
- while (<STDIN>) {
- chop; # Drop the newline
- push(@text, $_);
- }
-
- &mail_notification($mailto, @text);
-
- exit 0;
-}
-
-# Check for an import command. This appears with files set as follows:
-#
-# files[0] - "path/name"
-# files[1] - "-"
-# files[2] - "Imported"
-# files[3] - "sources"
-#
-if ($files[2] =~ /Imported/ && $files[3] =~ /sources/) {
- local(@text);
-
- @text = ();
- push(@text, &build_header());
- push(@text, "");
- push(@text, $files[0]);
- push(@text, "");
-
- while (<STDIN>) {
- chop; # Drop the newline
- push(@text, $_);
- }
-
- &mail_notification($mailto, @text);
-
- exit 0;
-}
-
-# Iterate over the body of the message collecting information.
-#
-while (<STDIN>) {
- chop; # Drop the newline
-
- if (/^In directory/) {
- push(@log_lines, $_);
- push(@log_lines, "");
- next;
- }
-
- if (/^Modified Files/) { $state = $STATE_CHANGED; next; }
- if (/^Added Files/) { $state = $STATE_ADDED; next; }
- if (/^Removed Files/) { $state = $STATE_REMOVED; next; }
- if (/^Log Message/) { $state = $STATE_LOG; next; }
-
- s/^[ \t\n]+//; # delete leading whitespace
- s/[ \t\n]+$//; # delete trailing whitespace
-
- if ($state == $STATE_CHANGED) { push(@changed_files, split); }
- if ($state == $STATE_ADDED) { push(@added_files, split); }
- if ($state == $STATE_REMOVED) { push(@removed_files, split); }
- if ($state == $STATE_LOG) { push(@log_lines, $_); }
-}
-
-# Strip leading and trailing blank lines from the log message. Also
-# compress multiple blank lines in the body of the message down to a
-# single blank line.
-#
-while ($#log_lines > -1) {
- last if ($log_lines[0] ne "");
- shift(@log_lines);
-}
-while ($#log_lines > -1) {
- last if ($log_lines[$#log_lines] ne "");
- pop(@log_lines);
-}
-for ($i = $#log_lines; $i > 0; $i--) {
- if (($log_lines[$i - 1] eq "") && ($log_lines[$i] eq "")) {
- splice(@log_lines, $i, 1);
- }
-}
-
-if ($debug) {
- print STDERR "Searching for log file index...";
-}
-# Find an index to a log file that matches this log message
-#
-for ($i = 0; ; $i++) {
- local(@text);
-
- last if (! -e "$LOG_FILE.$i.$id"); # the next available one
- @text = &read_logfile("$LOG_FILE.$i.$id", "");
- last if ($#text == -1); # nothing in this file, use it
- last if (join(" ", @log_lines) eq join(" ", @text)); # it's the same log message as another
-}
-if ($debug) {
- print STDERR " found log file at $i.$id, now writing tmp files.\n";
-}
-
-# Spit out the information gathered in this pass.
-#
-&append_names_to_file("$CHANGED_FILE.$i.$id", $dir, @changed_files);
-&append_names_to_file("$ADDED_FILE.$i.$id", $dir, @added_files);
-&append_names_to_file("$REMOVED_FILE.$i.$id", $dir, @removed_files);
-&write_logfile("$LOG_FILE.$i.$id", @log_lines);
-
-# Check whether this is the last directory. If not, quit.
-#
-if ($debug) {
- print STDERR "Checking current dir against last dir.\n";
-}
-$_ = &read_line("$LAST_FILE.$id");
-
-if ($_ ne $cvsroot . "/" . $files[0]) {
- if ($debug) {
- print STDERR sprintf("Current directory %s is not last directory %s.\n", $cvsroot . "/" .$files[0], $_);
- }
- exit 0;
-}
-if ($debug) {
- print STDERR sprintf("Current directory %s is last directory %s -- all commits done.\n", $files[0], $_);
-}
-
-#
-# End Of Commits!
-#
-
-# This is it. The commits are all finished. Lump everything together
-# into a single message, fire a copy off to the mailing list, and drop
-# it on the end of the Changes file.
-#
-
-#
-# Produce the final compilation of the log messages
-#
-@text = ();
-@status_txt = ();
-push(@text, &build_header());
-push(@text, "");
-
-for ($i = 0; ; $i++) {
- last if (! -e "$LOG_FILE.$i.$id"); # we're done them all!
- @lines = &read_logfile("$CHANGED_FILE.$i.$id", "");
- if ($#lines >= 0) {
- push(@text, "Modified files:");
- push(@text, &format_lists(@lines));
- }
- @lines = &read_logfile("$ADDED_FILE.$i.$id", "");
- if ($#lines >= 0) {
- push(@text, "Added files:");
- push(@text, &format_lists(@lines));
- }
- @lines = &read_logfile("$REMOVED_FILE.$i.$id", "");
- if ($#lines >= 0) {
- push(@text, "Removed files:");
- push(@text, &format_lists(@lines));
- }
- if ($#text >= 0) {
- push(@text, "");
- }
- @lines = &read_logfile("$LOG_FILE.$i.$id", "\t");
- if ($#lines >= 0) {
- push(@text, "Log message:");
- push(@text, @lines);
- push(@text, "");
- }
- if ($do_status) {
- local(@changed_files);
-
- @changed_files = ();
- push(@changed_files, &read_logfile("$CHANGED_FILE.$i.$id", ""));
- push(@changed_files, &read_logfile("$ADDED_FILE.$i.$id", ""));
- push(@changed_files, &read_logfile("$REMOVED_FILE.$i.$id", ""));
-
- if ($debug) {
- print STDERR "main: pre-sort changed_files = ", join(":", @changed_files), ".\n";
- }
- sort(@changed_files);
- if ($debug) {
- print STDERR "main: post-sort changed_files = ", join(":", @changed_files), ".\n";
- }
-
- foreach $dofile (@changed_files) {
- if ($dofile =~ /\/$/) {
- next; # ignore the silly "dir" entries
- }
- if ($debug) {
- print STDERR "main(): doing status on $dofile\n";
- }
- open(STATUS, "-|") || exec 'cvs', '-n', 'status', '-Qqv', $dofile;
- while (<STATUS>) {
- chop;
- push(@status_txt, $_);
- }
- }
- }
-}
-
-# Write to the commitlog file
-#
-if ($commitlog) {
- &write_commitlog($commitlog, @text);
-}
-
-if ($#status_txt >= 0) {
- push(@text, @status_txt);
-}
-
-# Mailout the notification.
-#
-&mail_notification($mailto, @text);
-
-# cleanup
-#
-if (! $debug) {
- &cleanup_tmpfiles();
-}
-
-exit 0;
diff --git a/gnu/usr.bin/cvs/contrib/mfpipe.pl b/gnu/usr.bin/cvs/contrib/mfpipe.pl
deleted file mode 100644
index 622fe98a82b..00000000000
--- a/gnu/usr.bin/cvs/contrib/mfpipe.pl
+++ /dev/null
@@ -1,88 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-#
-# From: clyne@niwot.scd.ucar.EDU (John Clyne)
-# Date: Fri, 28 Feb 92 09:54:21 MST
-#
-# BTW, i wrote a perl script that is similar to 'nfpipe' except that in
-# addition to logging to a file it provides a command line option for mailing
-# change notices to a group of users. Obviously you probably wouldn't want
-# to mail every change. But there may be certain directories that are commonly
-# accessed by a group of users who would benefit from an email notice.
-# Especially if they regularly beat on the same directory. Anyway if you
-# think anyone would be interested here it is.
-#
-# $Id: mfpipe.pl,v 1.1 1995/12/19 09:21:40 deraadt Exp $
-#
-#
-# File: mfpipe
-#
-# Author: John Clyne
-# National Center for Atmospheric Research
-# PO 3000, Boulder, Colorado
-#
-# Date: Wed Feb 26 18:34:53 MST 1992
-#
-# Description: Tee standard input to mail a list of users and to
-# a file. Used by CVS logging.
-#
-# Usage: mfpipe [-f file] [user@host...]
-#
-# Environment: CVSROOT
-# Path to CVS root.
-#
-# Files:
-#
-#
-# Options: -f file
-# Capture output to 'file'
-#
-
-$header = "Log Message:\n";
-
-$mailcmd = "| mail -s 'CVS update notice'";
-$whoami = `whoami`;
-chop $whoami;
-$date = `date`;
-chop $date;
-
-$cvsroot = $ENV{'CVSROOT'};
-
-while (@ARGV) {
- $arg = shift @ARGV;
-
- if ($arg eq '-f') {
- $file = shift @ARGV;
- }
- else {
- $users = "$users $arg";
- }
-}
-
-if ($users) {
- $mailcmd = "$mailcmd $users";
- open(MAIL, $mailcmd) || die "Execing $mail: $!\n";
-}
-
-if ($file) {
- $logfile = "$cvsroot/LOG/$file";
- open(FILE, ">> $logfile") || die "Opening $logfile: $!\n";
-}
-
-print FILE "$whoami $date--------BEGIN LOG ENTRY-------------\n" if ($logfile);
-
-while (<>) {
- print FILE $log if ($log && $logfile);
-
- print FILE $_ if ($logfile);
- print MAIL $_ if ($users);
-
- $log = "log: " if ($_ eq $header);
-}
-
-close FILE;
-die "Write failed" if $?;
-close MAIL;
-die "Mail failed" if $?;
-
-exit 0;
diff --git a/gnu/usr.bin/cvs/contrib/rcslock.pl b/gnu/usr.bin/cvs/contrib/rcslock.pl
deleted file mode 100644
index 01e349ff025..00000000000
--- a/gnu/usr.bin/cvs/contrib/rcslock.pl
+++ /dev/null
@@ -1,235 +0,0 @@
-#! xPERL_PATHx
-# -*-Perl-*-
-
-# Author: John Rouillard (rouilj@cs.umb.edu)
-# Supported: Yeah right. (Well what do you expect for 2 hours work?)
-# Blame-to: rouilj@cs.umb.edu
-# Complaints to: Anybody except Brian Berliner, he's blameless for
-# this script.
-# Acknowlegements: The base code for this script has been acquired
-# from the log.pl script.
-
-# rcslock.pl - A program to prevent commits when a file to be ckecked
-# in is locked in the repository.
-
-# There are times when you need exclusive access to a file. This
-# often occurs when binaries are checked into the repository, since
-# cvs's (actually rcs's) text based merging mechanism won't work. This
-# script allows you to use the rcs lock mechanism (rcs -l) to make
-# sure that no changes to a repository are able to be committed if
-# those changes would result in a locked file being changed.
-
-# WARNING:
-# This script will work only if locking is set to strict.
-#
-
-# Setup:
-# Add the following line to the commitinfo file:
-
-# ALL /local/location/for/script/lockcheck [options]
-
-# Where ALL is replaced by any suitable regular expression.
-# Options are -v for verbose info, or -d for debugging info.
-# The %s will provide the repository directory name and the names of
-# all changed files.
-
-# Use:
-# When a developer needs exclusive access to a version of a file, s/he
-# should use "rcs -l" in the repository tree to lock the version they
-# are working on. CVS will automagically release the lock when the
-# commit is performed.
-
-# Method:
-# An "rlog -h" is exec'ed to give info on all about to be
-# committed files. This (header) information is parsed to determine
-# if any locks are outstanding and what versions of the file are
-# locked. This filename, version number info is used to index an
-# associative array. All of the files to be committed are checked to
-# see if any locks are outstanding. If locks are outstanding, the
-# version number of the current file (taken from the CVS/Entries
-# subdirectory) is used in the key to determine if that version is
-# locked. If the file being checked in is locked by the person doing
-# the checkin, the commit is allowed, but if the lock is held on that
-# version of a file by another person, the commit is not allowed.
-
-$ext = ",v"; # The extension on your rcs files.
-
-$\="\n"; # I hate having to put \n's at the end of my print statements
-$,=' '; # Spaces should occur between arguments to print when printed
-
-# turn off setgid
-#
-$) = $(;
-
-#
-# parse command line arguments
-#
-require 'getopts.pl';
-
-&Getopts("vd"); # verbose or debugging
-
-# Verbose is useful when debugging
-$opt_v = $opt_d if defined $opt_d;
-
-# $files[0] is really the name of the subdirectory.
-# @files = split(/ /,$ARGV[0]);
-@files = @ARGV[0..$#ARGV];
-$cvsroot = $ENV{'CVSROOT'};
-
-#
-# get login name
-#
-$login = getlogin || (getpwuid($<))[0] || "nobody";
-
-#
-# save the current directory since we have to return here to parse the
-# CVS/Entries file if a lock is found.
-#
-$pwd = `/bin/pwd`;
-chop $pwd;
-
-print "Starting directory is $pwd" if defined $opt_d ;
-
-#
-# cd to the repository directory and check on the files.
-#
-print "Checking directory ", $files[0] if defined $opt_v ;
-
-if ( $files[0] =~ /^\// )
-{
- print "Directory path is $files[0]" if defined $opt_d ;
- chdir $files[0] || die "Can't change to repository directory $files[0]" ;
-}
-else
-{
- print "Directory path is $cvsroot/$files[0]" if defined $opt_d ;
- chdir ($cvsroot . "/" . $files[0]) ||
- die "Can't change to repository directory $files[0] in $cvsroot" ;
-}
-
-
-# Open the rlog process and apss all of the file names to that one
-# process to cut down on exec overhead. This may backfire if there
-# are too many files for the system buffer to handle, but if there are
-# that many files, chances are that the cvs repository is not set up
-# cleanly.
-
-print "opening rlog -h @files[1..$#files] |" if defined $opt_d;
-
-open( RLOG, "rlog -h @files[1..$#files] |") || die "Can't run rlog command" ;
-
-# Create the locks associative array. The elements in the array are
-# of two types:
-#
-# The name of the RCS file with a value of the total number of locks found
-# for that file,
-# or
-#
-# The name of the rcs file concatenated with the version number of the lock.
-# The value of this element is the name of the locker.
-
-# The regular expressions used to split the rcs info may have to be changed.
-# The current ones work for rcs 5.6.
-
-$lock = 0;
-
-while (<RLOG>)
-{
- chop;
- next if /^$/; # ditch blank lines
-
- if ( $_ =~ /^RCS file: (.*)$/ )
- {
- $curfile = $1;
- next;
- }
-
- if ( $_ =~ /^locks: strict$/ )
- {
- $lock = 1 ;
- next;
- }
-
- if ( $lock )
- {
- # access list: is the line immediately following the list of locks.
- if ( /^access list:/ )
- { # we are done getting lock info for this file.
- $lock = 0;
- }
- else
- { # We are accumulating lock info.
-
- # increment the lock count
- $locks{$curfile}++;
- # save the info on the version that is locked. $2 is the
- # version number $1 is the name of the locker.
- $locks{"$curfile" . "$2"} = $1
- if /[ ]*([a-zA-Z._]*): ([0-9.]*)$/;
-
- print "lock by $1 found on $curfile version $2" if defined $opt_d;
-
- }
- }
-}
-
-# Lets go back to the starting directory and see if any locked files
-# are ones we are interested in.
-
-chdir $pwd;
-
-# fo all of the file names (remember $files[0] is the directory name
-foreach $i (@files[1..$#files])
-{
- if ( defined $locks{$i . $ext} )
- { # well the file has at least one lock outstanding
-
- # find the base version number of our file
- &parse_cvs_entry($i,*entry);
-
- # is our version of this file locked?
- if ( defined $locks{$i . $ext . $entry{"version"}} )
- { # if so, it is by us?
- if ( $login ne ($by = $locks{$i . $ext . $entry{"version"}}) )
- {# crud somebody else has it locked.
- $outstanding_lock++ ;
- print "$by has file $i locked for version " , $entry{"version"};
- }
- else
- { # yeah I have it locked.
- print "You have a lock on file $i for version " , $entry{"version"}
- if defined $opt_v;
- }
- }
- }
-}
-
-exit $outstanding_lock;
-
-
-### End of main program
-
-sub parse_cvs_entry
-{ # a very simple minded hack at parsing an entries file.
-local ( $file, *entry ) = @_;
-local ( @pp );
-
-
-open(ENTRIES, "< CVS/Entries") || die "Can't open entries file";
-
-while (<ENTRIES>)
- {
- if ( $_ =~ /^\/$file\// )
- {
- @pp = split('/');
-
- $entry{"name"} = $pp[1];
- $entry{"version"} = $pp[2];
- $entry{"dates"} = $pp[3];
- $entry{"name"} = $pp[4];
- $entry{"name"} = $pp[5];
- $entry{"sticky"} = $pp[6];
- return;
- }
- }
-}
diff --git a/gnu/usr.bin/cvs/contrib/sccs2rcs.csh b/gnu/usr.bin/cvs/contrib/sccs2rcs.csh
deleted file mode 100644
index a9c380be5c6..00000000000
--- a/gnu/usr.bin/cvs/contrib/sccs2rcs.csh
+++ /dev/null
@@ -1,277 +0,0 @@
-#! xCSH_PATHx -f
-#
-# Sccs2rcs is a script to convert an existing SCCS
-# history into an RCS history without losing any of
-# the information contained therein.
-# It has been tested under the following OS's:
-# SunOS 3.5, 4.0.3, 4.1
-# Ultrix-32 2.0, 3.1
-#
-# Things to note:
-# + It will NOT delete or alter your ./SCCS history under any circumstances.
-#
-# + Run in a directory where ./SCCS exists and where you can
-# create ./RCS
-#
-# + /usr/local/bin is put in front of the default path.
-# (SCCS under Ultrix is set-uid sccs, bad bad bad, so
-# /usr/local/bin/sccs here fixes that)
-#
-# + Date, time, author, comments, branches, are all preserved.
-#
-# + If a command fails somewhere in the middle, it bombs with
-# a message -- remove what it's done so far and try again.
-# "rm -rf RCS; sccs unedit `sccs tell`; sccs clean"
-# There is no recovery and exit is far from graceful.
-# If a particular module is hanging you up, consider
-# doing it separately; move it from the current area so that
-# the next run will have a better chance or working.
-# Also (for the brave only) you might consider hacking
-# the s-file for simpler problems: I've successfully changed
-# the date of a delta to be in sync, then run "sccs admin -z"
-# on the thing.
-#
-# + After everything finishes, ./SCCS will be moved to ./old-SCCS.
-#
-# This file may be copied, processed, hacked, mutilated, and
-# even destroyed as long as you don't tell anyone you wrote it.
-#
-# Ken Cox
-# Viewlogic Systems, Inc.
-# kenstir@viewlogic.com
-# ...!harvard!cg-atla!viewlog!kenstir
-#
-# Various hacks made by Brian Berliner before inclusion in CVS contrib area.
-#
-# $Id: sccs2rcs.csh,v 1.1 1995/12/19 09:21:40 deraadt Exp $
-
-
-#we'll assume the user set up the path correctly
-# for the Pmax, /usr/ucb/sccs is suid sccs, what a pain
-# /usr/local/bin/sccs should override /usr/ucb/sccs there
-set path = (/usr/local/bin $path)
-
-
-############################################################
-# Error checking
-#
-if (! -w .) then
- echo "Error: ./ not writeable by you."
- exit 1
-endif
-if (! -d SCCS) then
- echo "Error: ./SCCS directory not found."
- exit 1
-endif
-set edits = (`sccs tell`)
-if ($#edits) then
- echo "Error: $#edits file(s) out for edit...clean up before converting."
- exit 1
-endif
-if (-d RCS) then
- echo "Warning: RCS directory exists"
- if (`ls -a RCS | wc -l` > 2) then
- echo "Error: RCS directory not empty
- exit 1
- endif
-else
- mkdir RCS
-endif
-
-sccs clean
-
-set logfile = /tmp/sccs2rcs_$$_log
-rm -f $logfile
-set tmpfile = /tmp/sccs2rcs_$$_tmp
-rm -f $tmpfile
-set emptyfile = /tmp/sccs2rcs_$$_empty
-echo -n "" > $emptyfile
-set initialfile = /tmp/sccs2rcs_$$_init
-echo "Initial revision" > $initialfile
-set sedfile = /tmp/sccs2rcs_$$_sed
-rm -f $sedfile
-set revfile = /tmp/sccs2rcs_$$_rev
-rm -f $revfile
-
-# the quotes surround the dollar signs to fool RCS when I check in this script
-set sccs_keywords = (\
- '%W%[ ]*%G%'\
- '%W%[ ]*%E%'\
- '%W%'\
- '%Z%%M%[ ]*%I%[ ]*%G%'\
- '%Z%%M%[ ]*%I%[ ]*%E%'\
- '%M%[ ]*%I%[ ]*%G%'\
- '%M%[ ]*%I%[ ]*%E%'\
- '%M%'\
- '%I%'\
- '%G%'\
- '%E%'\
- '%U%')
-set rcs_keywords = (\
- '$'Id'$'\
- '$'Id'$'\
- '$'Id'$'\
- '$'SunId'$'\
- '$'SunId'$'\
- '$'Id'$'\
- '$'Id'$'\
- '$'RCSfile'$'\
- '$'Revision'$'\
- '$'Date'$'\
- '$'Date'$'\
- '')
-
-
-############################################################
-# Get some answers from user
-#
-echo ""
-echo "Do you want to be prompted for a description of each"
-echo "file as it is checked in to RCS initially?"
-echo -n "(y=prompt for description, n=null description) [y] ?"
-set ans = $<
-if ((_$ans == _) || (_$ans == _y) || (_$ans == _Y)) then
- set nodesc = 0
-else
- set nodesc = 1
-endif
-echo ""
-echo "The default keyword substitutions are as follows and are"
-echo "applied in the order specified:"
-set i = 1
-while ($i <= $#sccs_keywords)
-# echo ' '\"$sccs_keywords[$i]\"' ==> '\"$rcs_keywords[$i]\"
- echo " $sccs_keywords[$i] ==> $rcs_keywords[$i]"
- @ i = $i + 1
-end
-echo ""
-echo -n "Do you want to change them [n] ?"
-set ans = $<
-if ((_$ans != _) && (_$ans != _n) && (_$ans != _N)) then
- echo "You can't always get what you want."
- echo "Edit this script file and change the variables:"
- echo ' $sccs_keywords'
- echo ' $rcs_keywords'
-else
- echo "good idea."
-endif
-
-# create the sed script
-set i = 1
-while ($i <= $#sccs_keywords)
- echo "s,$sccs_keywords[$i],$rcs_keywords[$i],g" >> $sedfile
- @ i = $i + 1
-end
-
-onintr ERROR
-
-############################################################
-# Loop over every s-file in SCCS dir
-#
-foreach sfile (SCCS/s.*)
- # get rid of the "s." at the beginning of the name
- set file = `echo $sfile:t | sed -e "s/^..//"`
-
- # work on each rev of that file in ascending order
- set firsttime = 1
- sccs prs $file | grep "^D " | awk '{print $2}' | sed -e 's/\./ /g' | sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g' > $revfile
- foreach rev (`cat $revfile`)
- if ($status != 0) goto ERROR
-
- # get file into current dir and get stats
- set date = `sccs prs -r$rev $file | grep "^D " | awk '{printf("19%s %s", $3, $4); exit}'`
- set author = `sccs prs -r$rev $file | grep "^D " | awk '{print $5; exit}'`
- echo ""
- echo "==> file $file, rev=$rev, date=$date, author=$author"
- sccs edit -r$rev $file >>& $logfile
- if ($status != 0) goto ERROR
- echo checked out of SCCS
-
- # add RCS keywords in place of SCCS keywords
- sed -f $sedfile $file > $tmpfile
- if ($status != 0) goto ERROR
- echo performed keyword substitutions
- cp $tmpfile $file
-
- # check file into RCS
- if ($firsttime) then
- set firsttime = 0
- if ($nodesc) then
- echo about to do ci
- echo ci -f -r$rev -d"$date" -w$author -t$emptyfile $file
- ci -f -r$rev -d"$date" -w$author -t$emptyfile $file < $initialfile >>& $logfile
- if ($status != 0) goto ERROR
- echo initial rev checked into RCS without description
- else
- echo ""
- echo Enter a brief description of the file $file \(end w/ Ctrl-D\):
- cat > $tmpfile
- ci -f -r$rev -d"$date" -w$author -t$tmpfile $file < $initialfile >>& $logfile
- if ($status != 0) goto ERROR
- echo initial rev checked into RCS
- endif
- else
- # get RCS lock
- set lckrev = `echo $rev | sed -e 's/\.[0-9]*$//'`
- if ("$lckrev" =~ [0-9]*.*) then
- # need to lock the brach -- it is OK if the lock fails
- rcs -l$lckrev $file >>& $logfile
- else
- # need to lock the trunk -- must succeed
- rcs -l $file >>& $logfile
- if ($status != 0) goto ERROR
- endif
- echo got lock
- sccs prs -r$rev $file | grep "." > $tmpfile
- # it's OK if grep fails here and gives status == 1
- # put the delta message in $tmpfile
- ed $tmpfile >>& $logfile <<EOF
-/COMMENTS
-1,.d
-w
-q
-EOF
- ci -f -r$rev -d"$date" -w$author $file < $tmpfile >>& $logfile
- if ($status != 0) goto ERROR
- echo checked into RCS
- endif
- sccs unedit $file >>& $logfile
- if ($status != 0) goto ERROR
- end
- rm -f $file
-end
-
-
-############################################################
-# Clean up
-#
-echo cleaning up...
-mv SCCS old-SCCS
-rm -f $tmpfile $emptyfile $initialfile $sedfile
-echo ===================================================
-echo " Conversion Completed Successfully"
-echo ""
-echo " SCCS history now in old-SCCS/"
-echo ===================================================
-set exitval = 0
-goto cleanup
-
-ERROR:
-foreach f (`sccs tell`)
- sccs unedit $f
-end
-echo ""
-echo ""
-echo Danger\! Danger\!
-echo Some command exited with a non-zero exit status.
-echo Log file exists in $logfile.
-echo ""
-echo Incomplete history in ./RCS -- remove it
-echo Original unchanged history in ./SCCS
-set exitval = 1
-
-cleanup:
-# leave log file
-rm -f $tmpfile $emptyfile $initialfile $sedfile $revfile
-
-exit $exitval
diff --git a/gnu/usr.bin/cvs/diff/.cvsignore b/gnu/usr.bin/cvs/diff/.cvsignore
deleted file mode 100644
index be755f8b416..00000000000
--- a/gnu/usr.bin/cvs/diff/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Debug
-Release
diff --git a/gnu/usr.bin/cvs/diff/Makefile.in b/gnu/usr.bin/cvs/diff/Makefile.in
index c4d253aca22..d9d1703d9a8 100644
--- a/gnu/usr.bin/cvs/diff/Makefile.in
+++ b/gnu/usr.bin/cvs/diff/Makefile.in
@@ -1,102 +1,327 @@
-# Makefile for GNU DIFF
-# Copyright (C) 1988,1989,1991,1992,1993,1994,1997,1998 Free Software Foundation, Inc.
-#
-# This file is part of GNU DIFF.
-#
-# GNU DIFF 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.
-#
-# GNU DIFF 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.
-
-#### Start of system configuration section. ####
-
-srcdir = @srcdir@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+@SET_MAKE@
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-subdir = diff
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+INCLUDES = -I$(top_srcdir)/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 = ChangeLog build_diff.com diagmeet.note libdiff.dsp
+EXEEXT =
+OBJEXT = o
+subdir = diff
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+libdiff_a_AR = $(AR) cru
+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)
AR = ar
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CFLAGS = @CFLAGS@
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-CPPFLAGS = @CPPFLAGS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src
DEFS = @DEFS@
-RANLIB = @RANLIB@
-CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+DIST_SOURCES = $(libdiff_a_SOURCES)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/analyze.Po $(DEPDIR)/cmpbuf.Po \
+@AMDEP_TRUE@ $(DEPDIR)/context.Po $(DEPDIR)/diff.Po \
+@AMDEP_TRUE@ $(DEPDIR)/diff3.Po $(DEPDIR)/dir.Po $(DEPDIR)/ed.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ifdef.Po $(DEPDIR)/io.Po \
+@AMDEP_TRUE@ $(DEPDIR)/normal.Po $(DEPDIR)/side.Po \
+@AMDEP_TRUE@ $(DEPDIR)/util.Po $(DEPDIR)/version.Po
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+SOURCES = $(libdiff_a_SOURCES)
+OBJECTS = $(am_libdiff_a_OBJECTS)
-prefix = @prefix@
-exec_prefix = @exec_prefix@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu diff/Makefile
-PR_PROGRAM = /usr/bin/pr
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-#### End of system configuration section. ####
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-SHELL = /bin/sh
+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
-# The source files for all of the programs.
-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
-OBJECTS = diff.o diff3.o analyze.o cmpbuf.o dir.o io.o util.o \
- context.o ed.o ifdef.o normal.o side.o version.o
-DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in diagmeet.note \
- libdiff.dsp .cvsignore
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
-all: libdiff.a
+distclean-compile:
+ -rm -f *.tab.c
-# $(top_srcdir)/lib is so we don't get the system-supplied headers for
-# functions that we supply ourselves in lib. $(srcdir) is perhaps not
-# necessary if we assume the unix compiler behavior whereby "" looks
-# in the directory containing the .c file first.
-# -I. is probably unnecessary (I don't think we generate any .h files).
-# -I.. is for config.h.
-COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \
- -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS)
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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 $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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 "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+@_am_include@ @_am_quote@$(DEPDIR)/analyze.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/cmpbuf.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/context.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/diff.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/diff3.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/dir.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ed.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ifdef.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/io.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/normal.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/side.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/util.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/version.Po@_am_quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+CCDEPMODE = @CCDEPMODE@
.c.o:
- $(COMPILE) $<
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
-libdiff libdiff.a: $(OBJECTS)
- $(AR) cr libdiff.a $(OBJECTS)
- -$(RANLIB) libdiff.a
+.c.obj:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `cygpath -w $<`
-$(OBJECTS): diff.h diffrun.h system.h
-analyze.o cmpbuf.o: cmpbuf.h
-util.o: util.c
- $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $<
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-install: all
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || 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:
- @: nothing to do for installdirs
-.PHONY: installdirs
-TAGS: $(SOURCES)
- etags $(SOURCES)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-clean:
- rm -f *.o *.a core
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-mostlyclean: clean
+installcheck: installcheck-am
-distclean: clean
- rm -f TAGS tags Makefile
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-realclean: distclean
+mostlyclean-generic:
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+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 Makefile.in
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+.PHONY: all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES distclean distclean-compile \
+ distclean-depend distclean-generic distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic tags \
+ uninstall uninstall-am
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-# Prevent GNU make v3 from overflowing arg limit on SysV.
+# 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:
diff --git a/gnu/usr.bin/cvs/lib/Makefile.in b/gnu/usr.bin/cvs/lib/Makefile.in
index 736f1319e3f..f53c852ea32 100644
--- a/gnu/usr.bin/cvs/lib/Makefile.in
+++ b/gnu/usr.bin/cvs/lib/Makefile.in
@@ -1,6 +1,20 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+@SET_MAKE@
+
# Makefile for library files used by GNU CVS.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1988-1994 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1994, 2000 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
@@ -12,157 +26,403 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-cvs_srcdir = @top_srcdir@/src
-VPATH = @srcdir@
+# For now we need to include $(top_srcdir)/src because some systems
+# (at least 'AIX rioscpu2 3 4 000030498200',
+# 'HP-UX hp60 B.10.20 A 9000/770 hp60 two-user license', &
+# 'IRIX64 sgiop110 6.5 07151433 IP30') have trouble finding error.h
+# when compiling savecwd.c
+#
+# FIXME - the fact that compiling on my Linux 2.2.16 system finds
+# /usr/include/error.h instead of $(top_srcdir)/src/error.h but
+# everything compiles and tests anyhow implies that src/error.h may
+# be unecessary now. Should look more deeply into this
+#
+# $(includeopt) is CVS specific and set by configure
+
-SHELL = /bin/sh
+SHELL = @SHELL@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-SOURCES = \
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+INCLUDES = -I$(top_srcdir)/src $(includeopt)
+
+noinst_LIBRARIES = libcvs.a
+
+# Always use CVS's regular expression matcher regex.o, because of
+# variations in regular expression syntax - we want to be the same
+# across systems and (probably) compared with old versions of CVS too.
+#
+# On a more mundane/detail level, having regex.h match regex.c can be
+# an issue if we aren't careful.
+#
+# Also 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 = \
argmatch.c \
- dup2.c \
- fncase.c \
- fnmatch.c \
ftruncate.c \
- getdate.c \
getdate.y \
getline.c \
getopt.c \
getopt1.c \
- hostname.c \
md5.c \
- memmove.c \
- mkdir.c \
regex.c \
- rename.c \
savecwd.c \
sighandle.c \
- strstr.c \
- strerror.c \
stripslash.c \
- strtoul.c \
- valloc.c \
- waitpid.c \
xgetwd.c \
- yesno.c
+ yesno.c \
+ getline.h \
+ getopt.h \
+ fnmatch.h \
+ md5.h \
+ regex.h \
+ savecwd.h \
+ system.h \
+ wait.h \
+ xselect.h \
+ xtime.h
-HEADERS = getline.h getopt.h fnmatch.h regex.h system.h wait.h md5.h savecwd.h
+libcvs_a_LIBADD = @LIBOBJS@
-# Always use CVS's regular expression matcher regex.o, because of
-# variations in regular expression syntax - we want to be the same
-# across systems and (probably) compared with old versions of CVS too.
-#
-# On a more mundane/detail level, having regex.h match regex.c can be
-# an issue if we aren't careful.
-#
-# Also should look into unifying regular expression matching in CVS
-# with the diff library (perhaps to have the caller, CVS, do the
-# matching?)
-OBJECTS = \
- @LIBOBJS@ \
- argmatch.o \
- getline.o \
- getopt.o \
- getopt1.o \
- md5.o \
- regex.o \
- savecwd.o \
- sighandle.o \
- stripslash.o \
- xgetwd.o \
- yesno.o \
- getdate.o
-
-DISTFILES = \
- .cvsignore ChangeLog ChangeLog.fsf Makefile.in \
- ${SOURCES} ${HEADERS} build_lib.com
+EXTRA_DIST = \
+ .cvsignore \
+ ChangeLog.fsf \
+ build_lib.com \
+ xgssapi.h
-DEFS = @DEFS@
-RANLIB = @RANLIB@
+EXEEXT =
+OBJEXT = o
+subdir = lib
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
-CC = @CC@
+libcvs_a_AR = $(AR) cru
+libcvs_a_DEPENDENCIES = @LIBOBJS@
+am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) ftruncate.$(OBJEXT) \
+ getdate.$(OBJEXT) getline.$(OBJEXT) getopt.$(OBJEXT) \
+ getopt1.$(OBJEXT) md5.$(OBJEXT) regex.$(OBJEXT) \
+ savecwd.$(OBJEXT) sighandle.$(OBJEXT) stripslash.$(OBJEXT) \
+ xgetwd.$(OBJEXT) yesno.$(OBJEXT)
+libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS)
+AR = ar
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CFLAGS = @CFLAGS@
-CPPFLAGS=
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-YACC = @YACC@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+DIST_SOURCES = $(libcvs_a_SOURCES)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/argmatch.Po $(DEPDIR)/dup2.Po \
+@AMDEP_TRUE@ $(DEPDIR)/fncase.Po $(DEPDIR)/fnmatch.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ftruncate.Po $(DEPDIR)/getdate.Po \
+@AMDEP_TRUE@ $(DEPDIR)/getline.Po $(DEPDIR)/getopt.Po \
+@AMDEP_TRUE@ $(DEPDIR)/getopt1.Po $(DEPDIR)/hostname.Po \
+@AMDEP_TRUE@ $(DEPDIR)/md5.Po $(DEPDIR)/memmove.Po \
+@AMDEP_TRUE@ $(DEPDIR)/mkdir.Po $(DEPDIR)/regex.Po \
+@AMDEP_TRUE@ $(DEPDIR)/rename.Po $(DEPDIR)/savecwd.Po \
+@AMDEP_TRUE@ $(DEPDIR)/sighandle.Po $(DEPDIR)/strerror.Po \
+@AMDEP_TRUE@ $(DEPDIR)/stripslash.Po $(DEPDIR)/strstr.Po \
+@AMDEP_TRUE@ $(DEPDIR)/strtoul.Po $(DEPDIR)/valloc.Po \
+@AMDEP_TRUE@ $(DEPDIR)/waitpid.Po $(DEPDIR)/xgetwd.Po \
+@AMDEP_TRUE@ $(DEPDIR)/yesno.Po
+DIST_COMMON = ChangeLog Makefile.am Makefile.in dup2.c fncase.c \
+ fnmatch.c getdate.c hostname.c memmove.c mkdir.c rename.c \
+ strerror.c strstr.c strtoul.c valloc.c waitpid.c
+SOURCES = $(libcvs_a_SOURCES)
+OBJECTS = $(am_libcvs_a_OBJECTS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj .y
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu lib/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+
+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
+
+.y.c:
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then \
+ rm -f y.tab.h; \
+ else \
+ mv y.tab.h $*.h; \
+ fi; \
+ fi
+
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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 $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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 "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+@_am_include@ @_am_quote@$(DEPDIR)/argmatch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/dup2.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/fncase.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/fnmatch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ftruncate.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getdate.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getline.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getopt.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getopt1.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/hostname.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/md5.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/memmove.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/mkdir.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/regex.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/rename.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/savecwd.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/sighandle.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/strerror.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/stripslash.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/strstr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/strtoul.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/valloc.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/waitpid.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/xgetwd.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/yesno.Po@_am_quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+CCDEPMODE = @CCDEPMODE@
.c.o:
- $(CC) $(CPPFLAGS) -I.. -I$(srcdir) -I$(cvs_srcdir) \
- $(DEFS) $(CFLAGS) -c $<
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.c.obj:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `cygpath -w $<`
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-all: libcvs.a
-.PHONY: all
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-install: all
-.PHONY: install
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || 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:
-.PHONY: installdirs
-tags: $(DISTFILES)
- ctags `for i in $(DISTFILES); do echo $(srcdir)/$$i; done`
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-TAGS: $(DISTFILES)
- etags `for i in $(DISTFILES); do echo $(srcdir)/$$i; done`
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+installcheck: installcheck-am
-clean:
- rm -f *.a *.o
-.PHONY: clean
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-distclean: clean
- rm -f tags TAGS Makefile
-.PHONY: distclean
+mostlyclean-generic:
-realclean: distclean
- rm -f *.tab.c getdate.c
-.PHONY: realclean
+clean-generic:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-.PHONY: dist-dir
-
-libcvs.a: $(OBJECTS)
- $(AR) cr $@ $(OBJECTS)
- -$(RANLIB) $@
-
-getdate.c: getdate.y
- @echo expect 10 shift/reduce conflicts
- $(YACC) $(srcdir)/getdate.y
- -@if test -f y.tab.c; then \
- mv y.tab.c getdate.c ;\
- else \
- if test -f getdate.tab.c ; then \
- mv getdate.tab.c getdate.c ; \
- else \
- echo '*** Unable to create getdate.c' ;\
- fi ;\
- fi
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-fnmatch.o: fnmatch.h
-getopt1.o: getopt.h
-regex.o: regex.h
-md5.o: md5.h
+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 Makefile.in
+ -test -z "getdate.c" || rm -f getdate.c
+clean: clean-am
-xlint:
- @echo xlint does nothing
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
-subdir = lib
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
-#../config.status: ../configure
-# cd .. ; $(SHELL) config.status --recheck
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+.PHONY: all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES distclean distclean-compile \
+ distclean-depend distclean-generic distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic tags \
+ uninstall uninstall-am
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
-#../configure: ../configure.in
-# cd $(top_srcdir) ; autoconf
+# 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:
diff --git a/gnu/usr.bin/cvs/lib/getdate.c b/gnu/usr.bin/cvs/lib/getdate.c
index aed844da9c9..a94d7ed3def 100644
--- a/gnu/usr.bin/cvs/lib/getdate.c
+++ b/gnu/usr.bin/cvs/lib/getdate.c
@@ -1,17 +1,25 @@
-#ifndef lint
-static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93 (BSDI)";
-#endif
-#include <stdlib.h>
-#define YYBYACC 1
-#define YYMAJOR 1
-#define YYMINOR 9
-#define YYEMPTY (-1)
-#define YYLEX yylex()
-#define yyclearin (yychar=YYEMPTY)
-#define yyerrok (yyerrflag=0)
-#define YYRECOVERING (yyerrflag!=0)
-#define YYPREFIX "yy"
-#line 2 "/u/scjones/cvs-nightly/lib/getdate.y"
+
+/* A Bison parser, made from getdate.y
+ by GNU Bison version 1.28 */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define tAGO 257
+#define tDAY 258
+#define tDAYZONE 259
+#define tID 260
+#define tMERIDIAN 261
+#define tMINUTE_UNIT 262
+#define tMONTH 263
+#define tMONTH_UNIT 264
+#define tSEC_UNIT 265
+#define tSNUMBER 266
+#define tUNUMBER 267
+#define tZONE 268
+#define tDST 269
+
+#line 1 "getdate.y"
+
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
** at the University of North Carolina at Chapel Hill. Later tweaked by
@@ -52,46 +60,11 @@ static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93 (BSDI)";
Include <sys/time.h> if that will be used. */
#if defined(vms)
-
-#include <types.h>
-#include <time.h>
-
-#else
-
-#include <sys/types.h>
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif
-
-#ifdef timezone
-#undef timezone /* needed for sgi */
-#endif
-
-#if defined(HAVE_SYS_TIMEB_H)
-#include <sys/timeb.h>
-#else
-/*
-** We use the obsolete `struct timeb' as part of our interface!
-** Since the system doesn't have it, we define it here;
-** our callers must do likewise.
-*/
-struct timeb {
- time_t time; /* Seconds since the epoch */
- unsigned short millitm; /* Field not used */
- short timezone; /* Minutes west of GMT */
- short dstflag; /* Field not used */
-};
-#endif /* defined(HAVE_SYS_TIMEB_H) */
-
-#endif /* defined(vms) */
+# include <types.h>
+#else /* defined(vms) */
+# include <sys/types.h>
+# include "xtime.h"
+#endif /* !defined(vms) */
#if defined (STDC_HEADERS) || defined (USG)
#include <string.h>
@@ -128,6 +101,7 @@ extern struct tm *localtime();
#define yylex getdate_yylex
#define yyerror getdate_yyerror
+static int yyparse ();
static int yylex ();
static int yyerror ();
@@ -187,228 +161,1223 @@ static MERIDIAN yyMeridian;
static time_t yyRelMonth;
static time_t yyRelSeconds;
-#line 179 "/u/scjones/cvs-nightly/lib/getdate.y"
+
+#line 145 "getdate.y"
typedef union {
time_t Number;
enum _MERIDIAN Meridian;
} YYSTYPE;
-#line 196 "y.tab.c"
-#define tAGO 257
-#define tDAY 258
-#define tDAYZONE 259
-#define tID 260
-#define tMERIDIAN 261
-#define tMINUTE_UNIT 262
-#define tMONTH 263
-#define tMONTH_UNIT 264
-#define tSEC_UNIT 265
-#define tSNUMBER 266
-#define tUNUMBER 267
-#define tZONE 268
-#define tDST 269
-#define YYERRCODE 256
-short yylhs[] = { -1,
- 0, 0, 2, 2, 2, 2, 2, 2, 3, 3,
- 3, 3, 3, 4, 4, 4, 6, 6, 6, 5,
- 5, 5, 5, 5, 5, 5, 5, 7, 7, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 8, 1,
- 1,
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 52
+#define YYFLAG -32768
+#define YYNTBASE 19
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 269 ? yytranslate[x] : 29)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 17, 2, 2, 18, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15
};
-short yylen[] = { 2,
- 0, 2, 1, 1, 1, 1, 1, 1, 2, 4,
- 4, 6, 6, 1, 1, 2, 1, 2, 2, 3,
- 5, 3, 3, 2, 4, 2, 3, 2, 1, 2,
- 2, 1, 2, 2, 1, 2, 2, 1, 1, 0,
- 1,
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 1, 4, 6, 8, 10, 12, 14, 16, 19,
+ 24, 29, 36, 43, 45, 47, 50, 52, 55, 58,
+ 62, 68, 72, 76, 79, 84, 87, 91, 94, 96,
+ 99, 102, 104, 107, 110, 112, 115, 118, 120, 122,
+ 123
};
-short yydefred[] = { 1,
- 0, 0, 15, 32, 0, 38, 35, 0, 0, 0,
- 2, 3, 4, 5, 6, 7, 8, 0, 18, 0,
- 31, 36, 33, 19, 9, 30, 0, 37, 34, 0,
- 0, 0, 16, 28, 0, 23, 27, 22, 0, 0,
- 25, 41, 11, 0, 10, 0, 0, 21, 13, 12,
+
+static const short yyrhs[] = { -1,
+ 19, 20, 0, 21, 0, 22, 0, 24, 0, 23,
+ 0, 25, 0, 27, 0, 13, 7, 0, 13, 16,
+ 13, 28, 0, 13, 16, 13, 12, 0, 13, 16,
+ 13, 16, 13, 28, 0, 13, 16, 13, 16, 13,
+ 12, 0, 14, 0, 5, 0, 14, 15, 0, 4,
+ 0, 4, 17, 0, 13, 4, 0, 13, 18, 13,
+ 0, 13, 18, 13, 18, 13, 0, 13, 12, 12,
+ 0, 13, 9, 12, 0, 9, 13, 0, 9, 13,
+ 17, 13, 0, 13, 9, 0, 13, 9, 13, 0,
+ 26, 3, 0, 26, 0, 13, 8, 0, 12, 8,
+ 0, 8, 0, 12, 11, 0, 13, 11, 0, 11,
+ 0, 12, 10, 0, 13, 10, 0, 10, 0, 13,
+ 0, 0, 7, 0
};
-short yydgoto[] = { 1,
- 45, 11, 12, 13, 14, 15, 16, 17, 18,
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 159, 160, 163, 166, 169, 172, 175, 178, 181, 187,
+ 193, 200, 206, 216, 220, 224, 231, 235, 239, 245,
+ 249, 260, 266, 272, 276, 281, 285, 292, 296, 299,
+ 302, 305, 308, 311, 314, 317, 320, 323, 328, 355,
+ 358
};
-short yysindex[] = { 0,
- -249, -38, 0, 0, -260, 0, 0, -240, -47, -248,
- 0, 0, 0, 0, 0, 0, 0, -237, 0, -18,
- 0, 0, 0, 0, 0, 0, -262, 0, 0, -239,
- -238, -236, 0, 0, -235, 0, 0, 0, -56, -19,
- 0, 0, 0, -234, 0, -232, -258, 0, 0, 0,
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","tAGO","tDAY",
+"tDAYZONE","tID","tMERIDIAN","tMINUTE_UNIT","tMONTH","tMONTH_UNIT","tSEC_UNIT",
+"tSNUMBER","tUNUMBER","tZONE","tDST","':'","','","'/'","spec","item","time",
+"zone","day","date","rel","relunit","number","o_merid", NULL
};
-short yyrindex[] = { 0,
- 0, 1, 0, 0, 0, 0, 0, 0, 69, 12,
- 0, 0, 0, 0, 0, 0, 0, 23, 0, 34,
- 0, 0, 0, 0, 0, 0, 67, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 56, 45,
- 0, 0, 0, 0, 0, 0, 56, 0, 0, 0,
+#endif
+
+static const short yyr1[] = { 0,
+ 19, 19, 20, 20, 20, 20, 20, 20, 21, 21,
+ 21, 21, 21, 22, 22, 22, 23, 23, 23, 24,
+ 24, 24, 24, 24, 24, 24, 24, 25, 25, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 27, 28,
+ 28
};
-short yygindex[] = { 0,
- -17, 0, 0, 0, 0, 0, 0, 0, 0,
+
+static const short yyr2[] = { 0,
+ 0, 2, 1, 1, 1, 1, 1, 1, 2, 4,
+ 4, 6, 6, 1, 1, 2, 1, 2, 2, 3,
+ 5, 3, 3, 2, 4, 2, 3, 2, 1, 2,
+ 2, 1, 2, 2, 1, 2, 2, 1, 1, 0,
+ 1
};
-#define YYTABLESIZE 337
-short yytable[] = { 32,
- 17, 44, 42, 36, 37, 19, 20, 49, 2, 3,
- 31, 14, 4, 5, 6, 7, 8, 9, 10, 34,
- 33, 21, 29, 22, 23, 35, 38, 46, 39, 50,
- 40, 41, 47, 24, 48, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 20, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 26, 0, 39, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 42, 0, 0, 0, 0, 43,
- 24, 0, 0, 25, 26, 27, 28, 29, 30, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 17, 17,
- 0, 0, 17, 17, 17, 17, 17, 17, 17, 14,
- 14, 0, 0, 14, 14, 14, 14, 14, 14, 14,
- 29, 29, 0, 0, 29, 29, 29, 29, 29, 29,
- 29, 24, 24, 0, 0, 24, 24, 24, 24, 24,
- 24, 24, 20, 20, 0, 0, 20, 20, 20, 20,
- 20, 20, 20, 40, 40, 0, 0, 40, 40, 40,
- 40, 0, 40, 40, 26, 26, 0, 39, 26, 26,
- 26, 26, 0, 0, 26, 39, 39,
+
+static const short yydefact[] = { 1,
+ 0, 17, 15, 32, 0, 38, 35, 0, 39, 14,
+ 2, 3, 4, 6, 5, 7, 29, 8, 18, 24,
+ 31, 36, 33, 19, 9, 30, 26, 37, 34, 0,
+ 0, 0, 16, 28, 0, 23, 27, 22, 40, 20,
+ 25, 41, 11, 0, 10, 0, 40, 21, 13, 12,
+ 0, 0
};
-short yycheck[] = { 47,
- 0, 58, 261, 266, 267, 44, 267, 266, 258, 259,
- 58, 0, 262, 263, 264, 265, 266, 267, 268, 257,
- 269, 262, 0, 264, 265, 44, 266, 47, 267, 47,
- 267, 267, 267, 0, 267, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 0, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 0, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 0, -1, 0, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 261, -1, -1, -1, -1, 266,
- 258, -1, -1, 261, 262, 263, 264, 265, 266, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 258, 259,
- -1, -1, 262, 263, 264, 265, 266, 267, 268, 258,
- 259, -1, -1, 262, 263, 264, 265, 266, 267, 268,
- 258, 259, -1, -1, 262, 263, 264, 265, 266, 267,
- 268, 258, 259, -1, -1, 262, 263, 264, 265, 266,
- 267, 268, 258, 259, -1, -1, 262, 263, 264, 265,
- 266, 267, 268, 258, 259, -1, -1, 262, 263, 264,
- 265, -1, 267, 268, 258, 259, -1, 259, 262, 263,
- 264, 265, -1, -1, 268, 267, 268,
+
+static const short yydefgoto[] = { 1,
+ 11, 12, 13, 14, 15, 16, 17, 18, 45
};
-#define YYFINAL 1
-#ifndef YYDEBUG
-#define YYDEBUG 0
-#endif
-#define YYMAXTOKEN 269
-#if YYDEBUG
-char *yyname[] = {
-"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,"','",0,0,"'/'",0,0,0,0,0,0,0,0,0,0,"':'",0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"tAGO","tDAY",
-"tDAYZONE","tID","tMERIDIAN","tMINUTE_UNIT","tMONTH","tMONTH_UNIT","tSEC_UNIT",
-"tSNUMBER","tUNUMBER","tZONE","tDST",
+
+static const short yypact[] = {-32768,
+ 0, -1,-32768,-32768, 4,-32768,-32768, 25, 11, -8,
+-32768,-32768,-32768,-32768,-32768,-32768, 21,-32768,-32768, 9,
+-32768,-32768,-32768,-32768,-32768,-32768, -10,-32768,-32768, 16,
+ 19, 24,-32768,-32768, 26,-32768,-32768,-32768, 18, 13,
+-32768,-32768,-32768, 27,-32768, 28, -6,-32768,-32768,-32768,
+ 38,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -5
+};
+
+
+#define YYLAST 42
+
+
+static const short yytable[] = { 51,
+ 42, 36, 37, 2, 3, 49, 33, 4, 5, 6,
+ 7, 8, 9, 10, 24, 19, 20, 25, 26, 27,
+ 28, 29, 30, 34, 42, 35, 31, 38, 32, 43,
+ 46, 39, 21, 44, 22, 23, 40, 52, 41, 47,
+ 48, 50
};
-char *yyrule[] = {
-"$accept : spec",
-"spec :",
-"spec : spec item",
-"item : time",
-"item : zone",
-"item : date",
-"item : day",
-"item : rel",
-"item : number",
-"time : tUNUMBER tMERIDIAN",
-"time : tUNUMBER ':' tUNUMBER o_merid",
-"time : tUNUMBER ':' tUNUMBER tSNUMBER",
-"time : tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid",
-"time : tUNUMBER ':' tUNUMBER ':' tUNUMBER tSNUMBER",
-"zone : tZONE",
-"zone : tDAYZONE",
-"zone : tZONE tDST",
-"day : tDAY",
-"day : tDAY ','",
-"day : tUNUMBER tDAY",
-"date : tUNUMBER '/' tUNUMBER",
-"date : tUNUMBER '/' tUNUMBER '/' tUNUMBER",
-"date : tUNUMBER tSNUMBER tSNUMBER",
-"date : tUNUMBER tMONTH tSNUMBER",
-"date : tMONTH tUNUMBER",
-"date : tMONTH tUNUMBER ',' tUNUMBER",
-"date : tUNUMBER tMONTH",
-"date : tUNUMBER tMONTH tUNUMBER",
-"rel : relunit tAGO",
-"rel : relunit",
-"relunit : tUNUMBER tMINUTE_UNIT",
-"relunit : tSNUMBER tMINUTE_UNIT",
-"relunit : tMINUTE_UNIT",
-"relunit : tSNUMBER tSEC_UNIT",
-"relunit : tUNUMBER tSEC_UNIT",
-"relunit : tSEC_UNIT",
-"relunit : tSNUMBER tMONTH_UNIT",
-"relunit : tUNUMBER tMONTH_UNIT",
-"relunit : tMONTH_UNIT",
-"number : tUNUMBER",
-"o_merid :",
-"o_merid : tMERIDIAN",
+
+static const short yycheck[] = { 0,
+ 7, 12, 13, 4, 5, 12, 15, 8, 9, 10,
+ 11, 12, 13, 14, 4, 17, 13, 7, 8, 9,
+ 10, 11, 12, 3, 7, 17, 16, 12, 18, 12,
+ 18, 13, 8, 16, 10, 11, 13, 0, 13, 13,
+ 13, 47
};
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/lib/bison.simple"
+/* This file comes from bison-1.28. */
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 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.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
#endif
-#ifdef YYSTACKSIZE
-#undef YYMAXDEPTH
-#define YYMAXDEPTH YYSTACKSIZE
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
#else
-#ifdef YYMAXDEPTH
-#define YYSTACKSIZE YYMAXDEPTH
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
-#define YYSTACKSIZE 10000
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
+
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ unsigned int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+ register char *t = to;
+ register char *f = from;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
#endif
-#define YYINITSTACKSIZE 200
-int yydebug;
-int yynerrs;
-struct yystack {
- short *ssp;
- YYSTYPE *vsp;
- short *ss;
- YYSTYPE *vs;
- int stacksize;
- short *sslim;
-};
-int yychar; /* some people use this, so we copy it in & out */
-int yyerrflag; /* must be global for yyerrok & YYRECOVERING */
-YYSTYPE yylval;
-#line 398 "/u/scjones/cvs-nightly/lib/getdate.y"
+#endif
+
+#line 217 "/usr/lib/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 3:
+#line 163 "getdate.y"
+{
+ yyHaveTime++;
+ ;
+ break;}
+case 4:
+#line 166 "getdate.y"
+{
+ yyHaveZone++;
+ ;
+ break;}
+case 5:
+#line 169 "getdate.y"
+{
+ yyHaveDate++;
+ ;
+ break;}
+case 6:
+#line 172 "getdate.y"
+{
+ yyHaveDay++;
+ ;
+ break;}
+case 7:
+#line 175 "getdate.y"
+{
+ yyHaveRel++;
+ ;
+ break;}
+case 9:
+#line 181 "getdate.y"
+{
+ yyHour = yyvsp[-1].Number;
+ yyMinutes = 0;
+ yySeconds = 0;
+ yyMeridian = yyvsp[0].Meridian;
+ ;
+ break;}
+case 10:
+#line 187 "getdate.y"
+{
+ yyHour = yyvsp[-3].Number;
+ yyMinutes = yyvsp[-1].Number;
+ yySeconds = 0;
+ yyMeridian = yyvsp[0].Meridian;
+ ;
+ break;}
+case 11:
+#line 193 "getdate.y"
+{
+ yyHour = yyvsp[-3].Number;
+ yyMinutes = yyvsp[-1].Number;
+ yyMeridian = MER24;
+ yyDSTmode = DSToff;
+ yyTimezone = - (yyvsp[0].Number % 100 + (yyvsp[0].Number / 100) * 60);
+ ;
+ break;}
+case 12:
+#line 200 "getdate.y"
+{
+ yyHour = yyvsp[-5].Number;
+ yyMinutes = yyvsp[-3].Number;
+ yySeconds = yyvsp[-1].Number;
+ yyMeridian = yyvsp[0].Meridian;
+ ;
+ break;}
+case 13:
+#line 206 "getdate.y"
+{
+ yyHour = yyvsp[-5].Number;
+ yyMinutes = yyvsp[-3].Number;
+ yySeconds = yyvsp[-1].Number;
+ yyMeridian = MER24;
+ yyDSTmode = DSToff;
+ yyTimezone = - (yyvsp[0].Number % 100 + (yyvsp[0].Number / 100) * 60);
+ ;
+ break;}
+case 14:
+#line 216 "getdate.y"
+{
+ yyTimezone = yyvsp[0].Number;
+ yyDSTmode = DSToff;
+ ;
+ break;}
+case 15:
+#line 220 "getdate.y"
+{
+ yyTimezone = yyvsp[0].Number;
+ yyDSTmode = DSTon;
+ ;
+ break;}
+case 16:
+#line 225 "getdate.y"
+{
+ yyTimezone = yyvsp[-1].Number;
+ yyDSTmode = DSTon;
+ ;
+ break;}
+case 17:
+#line 231 "getdate.y"
+{
+ yyDayOrdinal = 1;
+ yyDayNumber = yyvsp[0].Number;
+ ;
+ break;}
+case 18:
+#line 235 "getdate.y"
+{
+ yyDayOrdinal = 1;
+ yyDayNumber = yyvsp[-1].Number;
+ ;
+ break;}
+case 19:
+#line 239 "getdate.y"
+{
+ yyDayOrdinal = yyvsp[-1].Number;
+ yyDayNumber = yyvsp[0].Number;
+ ;
+ break;}
+case 20:
+#line 245 "getdate.y"
+{
+ yyMonth = yyvsp[-2].Number;
+ yyDay = yyvsp[0].Number;
+ ;
+ break;}
+case 21:
+#line 249 "getdate.y"
+{
+ if (yyvsp[-4].Number >= 100) {
+ yyYear = yyvsp[-4].Number;
+ yyMonth = yyvsp[-2].Number;
+ yyDay = yyvsp[0].Number;
+ } else {
+ yyMonth = yyvsp[-4].Number;
+ yyDay = yyvsp[-2].Number;
+ yyYear = yyvsp[0].Number;
+ }
+ ;
+ break;}
+case 22:
+#line 260 "getdate.y"
+{
+ /* ISO 8601 format. yyyy-mm-dd. */
+ yyYear = yyvsp[-2].Number;
+ yyMonth = -yyvsp[-1].Number;
+ yyDay = -yyvsp[0].Number;
+ ;
+ break;}
+case 23:
+#line 266 "getdate.y"
+{
+ /* e.g. 17-JUN-1992. */
+ yyDay = yyvsp[-2].Number;
+ yyMonth = yyvsp[-1].Number;
+ yyYear = -yyvsp[0].Number;
+ ;
+ break;}
+case 24:
+#line 272 "getdate.y"
+{
+ yyMonth = yyvsp[-1].Number;
+ yyDay = yyvsp[0].Number;
+ ;
+ break;}
+case 25:
+#line 276 "getdate.y"
+{
+ yyMonth = yyvsp[-3].Number;
+ yyDay = yyvsp[-2].Number;
+ yyYear = yyvsp[0].Number;
+ ;
+ break;}
+case 26:
+#line 281 "getdate.y"
+{
+ yyMonth = yyvsp[0].Number;
+ yyDay = yyvsp[-1].Number;
+ ;
+ break;}
+case 27:
+#line 285 "getdate.y"
+{
+ yyMonth = yyvsp[-1].Number;
+ yyDay = yyvsp[-2].Number;
+ yyYear = yyvsp[0].Number;
+ ;
+ break;}
+case 28:
+#line 292 "getdate.y"
+{
+ yyRelSeconds = -yyRelSeconds;
+ yyRelMonth = -yyRelMonth;
+ ;
+ break;}
+case 30:
+#line 299 "getdate.y"
+{
+ yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
+ ;
+ break;}
+case 31:
+#line 302 "getdate.y"
+{
+ yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
+ ;
+ break;}
+case 32:
+#line 305 "getdate.y"
+{
+ yyRelSeconds += yyvsp[0].Number * 60L;
+ ;
+ break;}
+case 33:
+#line 308 "getdate.y"
+{
+ yyRelSeconds += yyvsp[-1].Number;
+ ;
+ break;}
+case 34:
+#line 311 "getdate.y"
+{
+ yyRelSeconds += yyvsp[-1].Number;
+ ;
+ break;}
+case 35:
+#line 314 "getdate.y"
+{
+ yyRelSeconds++;
+ ;
+ break;}
+case 36:
+#line 317 "getdate.y"
+{
+ yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
+ ;
+ break;}
+case 37:
+#line 320 "getdate.y"
+{
+ yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
+ ;
+ break;}
+case 38:
+#line 323 "getdate.y"
+{
+ yyRelMonth += yyvsp[0].Number;
+ ;
+ break;}
+case 39:
+#line 328 "getdate.y"
+{
+ if (yyHaveTime && yyHaveDate && !yyHaveRel)
+ yyYear = yyvsp[0].Number;
+ else {
+ if(yyvsp[0].Number>10000) {
+ yyHaveDate++;
+ yyDay= (yyvsp[0].Number)%100;
+ yyMonth= (yyvsp[0].Number/100)%100;
+ yyYear = yyvsp[0].Number/10000;
+ }
+ else {
+ yyHaveTime++;
+ if (yyvsp[0].Number < 100) {
+ yyHour = yyvsp[0].Number;
+ yyMinutes = 0;
+ }
+ else {
+ yyHour = yyvsp[0].Number / 100;
+ yyMinutes = yyvsp[0].Number % 100;
+ }
+ yySeconds = 0;
+ yyMeridian = MER24;
+ }
+ }
+ ;
+ break;}
+case 40:
+#line 355 "getdate.y"
+{
+ yyval.Meridian = MER24;
+ ;
+ break;}
+case 41:
+#line 358 "getdate.y"
+{
+ yyval.Meridian = yyvsp[0].Meridian;
+ ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/lib/bison.simple"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
+}
+#line 363 "getdate.y"
+
/* Month and day table. */
static TABLE const MonthDayTable[] = {
@@ -1052,547 +2021,3 @@ main(ac, av)
/* NOTREACHED */
}
#endif /* defined(TEST) */
-#line 1056 "y.tab.c"
-/* allocate initial stack */
-#if defined(__STDC__) || defined(__cplusplus)
-static int yyinitstack(struct yystack *sp)
-#else
-static int yyinitstack(sp)
- struct yystack *sp;
-#endif
-{
- int newsize;
- short *newss;
- YYSTYPE *newvs;
-
- newsize = YYINITSTACKSIZE;
- newss = (short *)malloc(newsize * sizeof *newss);
- newvs = (YYSTYPE *)malloc(newsize * sizeof *newvs);
- sp->ss = sp->ssp = newss;
- sp->vs = sp->vsp = newvs;
- if (newss == NULL || newvs == NULL) return -1;
- sp->stacksize = newsize;
- sp->sslim = newss + newsize - 1;
- return 0;
-}
-
-/* double stack size, up to YYMAXDEPTH */
-#if defined(__STDC__) || defined(__cplusplus)
-static int yygrowstack(struct yystack *sp)
-#else
-static int yygrowstack(sp)
- struct yystack *sp;
-#endif
-{
- int newsize, i;
- short *newss;
- YYSTYPE *newvs;
-
- if ((newsize = sp->stacksize) >= YYMAXDEPTH) return -1;
- if ((newsize *= 2) > YYMAXDEPTH) newsize = YYMAXDEPTH;
- i = sp->ssp - sp->ss;
- if ((newss = (short *)realloc(sp->ss, newsize * sizeof *newss)) == NULL)
- return -1;
- sp->ss = newss;
- sp->ssp = newss + i;
- if ((newvs = (YYSTYPE *)realloc(sp->vs, newsize * sizeof *newvs)) == NULL)
- return -1;
- sp->vs = newvs;
- sp->vsp = newvs + i;
- sp->stacksize = newsize;
- sp->sslim = newss + newsize - 1;
- return 0;
-}
-
-#define YYFREESTACK(sp) { free((sp)->ss); free((sp)->vs); }
-
-#define YYABORT goto yyabort
-#define YYREJECT goto yyabort
-#define YYACCEPT goto yyaccept
-#define YYERROR goto yyerrlab
-int
-yyparse()
-{
- register int yym, yyn, yystate, yych;
- register YYSTYPE *yyvsp;
- YYSTYPE yyval;
- struct yystack yystk;
-#if YYDEBUG
- register char *yys;
- extern char *getenv();
-
- if (yys = getenv("YYDEBUG"))
- {
- yyn = *yys;
- if (yyn >= '0' && yyn <= '9')
- yydebug = yyn - '0';
- }
-#endif
-
- yynerrs = 0;
- yyerrflag = 0;
- yychar = yych = YYEMPTY;
-
- if (yyinitstack(&yystk)) goto yyoverflow;
- *yystk.ssp = yystate = 0;
-
-yyloop:
- if (yyn = yydefred[yystate]) goto yyreduce;
- if (yych < 0)
- {
- if ((yych = YYLEX) < 0) yych = 0;
- yychar = yych;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yych <= YYMAXTOKEN) yys = yyname[yych];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, yystate, yych, yys);
- }
-#endif
- }
- if ((yyn = yysindex[yystate]) && (yyn += yych) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yych)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, shifting to state %d\n",
- YYPREFIX, yystate, yytable[yyn]);
-#endif
- if (yystk.ssp >= yystk.sslim && yygrowstack(&yystk))
- goto yyoverflow;
- *++yystk.ssp = yystate = yytable[yyn];
- *++yystk.vsp = yylval;
- yychar = yych = YYEMPTY;
- if (yyerrflag > 0) --yyerrflag;
- goto yyloop;
- }
- if ((yyn = yyrindex[yystate]) && (yyn += yych) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yych)
- {
- yyn = yytable[yyn];
- goto yyreduce;
- }
- if (yyerrflag) goto yyinrecovery;
-#ifdef lint
- goto yynewerror;
-#endif
-yynewerror:
- yyerror("syntax error");
-#ifdef lint
- goto yyerrlab;
-#endif
-yyerrlab:
- ++yynerrs;
-yyinrecovery:
- if (yyerrflag < 3)
- {
- yyerrflag = 3;
- for (;;)
- {
- if ((yyn = yysindex[*yystk.ssp]) &&
- (yyn += YYERRCODE) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, error recovery shifting\
- to state %d\n", YYPREFIX, *yystk.ssp, yytable[yyn]);
-#endif
- if (yystk.ssp >= yystk.sslim && yygrowstack(&yystk))
- goto yyoverflow;
- *++yystk.ssp = yystate = yytable[yyn];
- *++yystk.vsp = yylval;
- goto yyloop;
- }
- else
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: error recovery discarding state %d\n",
- YYPREFIX, *yystk.ssp);
-#endif
- if (yystk.ssp <= yystk.ss) goto yyabort;
- --yystk.ssp;
- --yystk.vsp;
- }
- }
- }
- else
- {
- if (yych == 0) goto yyabort;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yych <= YYMAXTOKEN) yys = yyname[yych];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
- YYPREFIX, yystate, yych, yys);
- }
-#endif
- yychar = yych = YYEMPTY;
- goto yyloop;
- }
-yyreduce:
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: state %d, reducing by rule %d (%s)\n",
- YYPREFIX, yystate, yyn, yyrule[yyn]);
-#endif
- yym = yylen[yyn];
- yyvsp = yystk.vsp; /* for speed in code under switch() */
- yyval = yyvsp[1-yym];
- switch (yyn)
- {
-case 3:
-#line 197 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHaveTime++;
- }
-break;
-case 4:
-#line 200 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHaveZone++;
- }
-break;
-case 5:
-#line 203 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHaveDate++;
- }
-break;
-case 6:
-#line 206 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHaveDay++;
- }
-break;
-case 7:
-#line 209 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHaveRel++;
- }
-break;
-case 9:
-#line 215 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHour = yyvsp[-1].Number;
- yyMinutes = 0;
- yySeconds = 0;
- yyMeridian = yyvsp[0].Meridian;
- }
-break;
-case 10:
-#line 221 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHour = yyvsp[-3].Number;
- yyMinutes = yyvsp[-1].Number;
- yySeconds = 0;
- yyMeridian = yyvsp[0].Meridian;
- }
-break;
-case 11:
-#line 227 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHour = yyvsp[-3].Number;
- yyMinutes = yyvsp[-1].Number;
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = - (yyvsp[0].Number % 100 + (yyvsp[0].Number / 100) * 60);
- }
-break;
-case 12:
-#line 234 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHour = yyvsp[-5].Number;
- yyMinutes = yyvsp[-3].Number;
- yySeconds = yyvsp[-1].Number;
- yyMeridian = yyvsp[0].Meridian;
- }
-break;
-case 13:
-#line 240 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyHour = yyvsp[-5].Number;
- yyMinutes = yyvsp[-3].Number;
- yySeconds = yyvsp[-1].Number;
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = - (yyvsp[0].Number % 100 + (yyvsp[0].Number / 100) * 60);
- }
-break;
-case 14:
-#line 250 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyTimezone = yyvsp[0].Number;
- yyDSTmode = DSToff;
- }
-break;
-case 15:
-#line 254 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyTimezone = yyvsp[0].Number;
- yyDSTmode = DSTon;
- }
-break;
-case 16:
-#line 259 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyTimezone = yyvsp[-1].Number;
- yyDSTmode = DSTon;
- }
-break;
-case 17:
-#line 265 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyDayOrdinal = 1;
- yyDayNumber = yyvsp[0].Number;
- }
-break;
-case 18:
-#line 269 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyDayOrdinal = 1;
- yyDayNumber = yyvsp[-1].Number;
- }
-break;
-case 19:
-#line 273 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyDayOrdinal = yyvsp[-1].Number;
- yyDayNumber = yyvsp[0].Number;
- }
-break;
-case 20:
-#line 279 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyMonth = yyvsp[-2].Number;
- yyDay = yyvsp[0].Number;
- }
-break;
-case 21:
-#line 283 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- if (yyvsp[-4].Number >= 100) {
- yyYear = yyvsp[-4].Number;
- yyMonth = yyvsp[-2].Number;
- yyDay = yyvsp[0].Number;
- } else {
- yyMonth = yyvsp[-4].Number;
- yyDay = yyvsp[-2].Number;
- yyYear = yyvsp[0].Number;
- }
- }
-break;
-case 22:
-#line 294 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- /* ISO 8601 format. yyyy-mm-dd. */
- yyYear = yyvsp[-2].Number;
- yyMonth = -yyvsp[-1].Number;
- yyDay = -yyvsp[0].Number;
- }
-break;
-case 23:
-#line 300 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- /* e.g. 17-JUN-1992. */
- yyDay = yyvsp[-2].Number;
- yyMonth = yyvsp[-1].Number;
- yyYear = -yyvsp[0].Number;
- }
-break;
-case 24:
-#line 306 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyMonth = yyvsp[-1].Number;
- yyDay = yyvsp[0].Number;
- }
-break;
-case 25:
-#line 310 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyMonth = yyvsp[-3].Number;
- yyDay = yyvsp[-2].Number;
- yyYear = yyvsp[0].Number;
- }
-break;
-case 26:
-#line 315 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyMonth = yyvsp[0].Number;
- yyDay = yyvsp[-1].Number;
- }
-break;
-case 27:
-#line 319 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyMonth = yyvsp[-1].Number;
- yyDay = yyvsp[-2].Number;
- yyYear = yyvsp[0].Number;
- }
-break;
-case 28:
-#line 326 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds = -yyRelSeconds;
- yyRelMonth = -yyRelMonth;
- }
-break;
-case 30:
-#line 333 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
- }
-break;
-case 31:
-#line 336 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L;
- }
-break;
-case 32:
-#line 339 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds += yyvsp[0].Number * 60L;
- }
-break;
-case 33:
-#line 342 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds += yyvsp[-1].Number;
- }
-break;
-case 34:
-#line 345 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds += yyvsp[-1].Number;
- }
-break;
-case 35:
-#line 348 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelSeconds++;
- }
-break;
-case 36:
-#line 351 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
- }
-break;
-case 37:
-#line 354 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number;
- }
-break;
-case 38:
-#line 357 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyRelMonth += yyvsp[0].Number;
- }
-break;
-case 39:
-#line 362 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- if (yyHaveTime && yyHaveDate && !yyHaveRel)
- yyYear = yyvsp[0].Number;
- else {
- if(yyvsp[0].Number>10000) {
- yyHaveDate++;
- yyDay= (yyvsp[0].Number)%100;
- yyMonth= (yyvsp[0].Number/100)%100;
- yyYear = yyvsp[0].Number/10000;
- }
- else {
- yyHaveTime++;
- if (yyvsp[0].Number < 100) {
- yyHour = yyvsp[0].Number;
- yyMinutes = 0;
- }
- else {
- yyHour = yyvsp[0].Number / 100;
- yyMinutes = yyvsp[0].Number % 100;
- }
- yySeconds = 0;
- yyMeridian = MER24;
- }
- }
- }
-break;
-case 40:
-#line 389 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyval.Meridian = MER24;
- }
-break;
-case 41:
-#line 392 "/u/scjones/cvs-nightly/lib/getdate.y"
-{
- yyval.Meridian = yyvsp[0].Meridian;
- }
-break;
-#line 1541 "y.tab.c"
- }
- yystk.ssp -= yym;
- yystate = *yystk.ssp;
- yystk.vsp -= yym;
- yym = yylhs[yyn];
- yych = yychar;
- if (yystate == 0 && yym == 0)
- {
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: after reduction, shifting from state 0 to\
- state %d\n", YYPREFIX, YYFINAL);
-#endif
- yystate = YYFINAL;
- *++yystk.ssp = YYFINAL;
- *++yystk.vsp = yyval;
- if (yych < 0)
- {
- if ((yych = YYLEX) < 0) yych = 0;
- yychar = yych;
-#if YYDEBUG
- if (yydebug)
- {
- yys = 0;
- if (yych <= YYMAXTOKEN) yys = yyname[yych];
- if (!yys) yys = "illegal-symbol";
- printf("%sdebug: state %d, reading %d (%s)\n",
- YYPREFIX, YYFINAL, yych, yys);
- }
-#endif
- }
- if (yych == 0) goto yyaccept;
- goto yyloop;
- }
- if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
- yystate = yytable[yyn];
- else
- yystate = yydgoto[yym];
-#if YYDEBUG
- if (yydebug)
- printf("%sdebug: after reduction, shifting from state %d \
-to state %d\n", YYPREFIX, *yystk.ssp, yystate);
-#endif
- if (yystk.ssp >= yystk.sslim && yygrowstack(&yystk))
- goto yyoverflow;
- *++yystk.ssp = yystate;
- *++yystk.vsp = yyval;
- goto yyloop;
-yyoverflow:
- yyerror("yacc stack overflow");
-yyabort:
- YYFREESTACK(&yystk);
- return (1);
-yyaccept:
- YYFREESTACK(&yystk);
- return (0);
-}
diff --git a/gnu/usr.bin/cvs/lib/getdate.y b/gnu/usr.bin/cvs/lib/getdate.y
index 9caaa367881..d090ff5359e 100644
--- a/gnu/usr.bin/cvs/lib/getdate.y
+++ b/gnu/usr.bin/cvs/lib/getdate.y
@@ -39,46 +39,11 @@
Include <sys/time.h> if that will be used. */
#if defined(vms)
-
-#include <types.h>
-#include <time.h>
-
-#else
-
-#include <sys/types.h>
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif
-
-#ifdef timezone
-#undef timezone /* needed for sgi */
-#endif
-
-#if defined(HAVE_SYS_TIMEB_H)
-#include <sys/timeb.h>
-#else
-/*
-** We use the obsolete `struct timeb' as part of our interface!
-** Since the system doesn't have it, we define it here;
-** our callers must do likewise.
-*/
-struct timeb {
- time_t time; /* Seconds since the epoch */
- unsigned short millitm; /* Field not used */
- short timezone; /* Minutes west of GMT */
- short dstflag; /* Field not used */
-};
-#endif /* defined(HAVE_SYS_TIMEB_H) */
-
-#endif /* defined(vms) */
+# include <types.h>
+#else /* defined(vms) */
+# include <sys/types.h>
+# include "xtime.h"
+#endif /* !defined(vms) */
#if defined (STDC_HEADERS) || defined (USG)
#include <string.h>
@@ -115,6 +80,7 @@ extern struct tm *localtime();
#define yylex getdate_yylex
#define yyerror getdate_yyerror
+static int yyparse ();
static int yylex ();
static int yyerror ();
diff --git a/gnu/usr.bin/cvs/src/Makefile.in b/gnu/usr.bin/cvs/src/Makefile.in
index 833d35780eb..c80deab8794 100644
--- a/gnu/usr.bin/cvs/src/Makefile.in
+++ b/gnu/usr.bin/cvs/src/Makefile.in
@@ -1,6 +1,20 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+@SET_MAKE@
+
# Makefile for GNU CVS program.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1990, 2000 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
@@ -12,185 +26,584 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
-srcdir = @srcdir@
+srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to install the executables.
bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
-# Where to put the system-wide .cvsrc file
-datadir = $(prefix)/share
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-# Where to put the manual pages.
-mandir = @mandir@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-# Use cp if you don't have install.
INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
-LIBS = @LIBS@
-
-SOURCES = add.c admin.c buffer.c checkin.c checkout.c classify.c client.c \
-commit.c create_adm.c cvsrc.c diff.c edit.c entries.c error.c expand_path.c \
-fileattr.c find_names.c hardlink.c hash.c history.c ignore.c 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 rcscmds.c recurse.c release.c remove.c repos.c \
-root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \
-tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c
+SHELL = /bin/sh
-OBJECTS = add.o admin.o buffer.o checkin.o checkout.o classify.o client.o \
-commit.o create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \
-fileattr.o find_names.o hardlink.o hash.o history.o ignore.o import.o \
-lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o \
-parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \
-root.o rtag.o scramble.o server.o status.o tag.o update.o \
-watch.o wrapper.o vers_ts.o \
-subr.o filesubr.o run.o version.o error.o zlib.o
+# $(includeopt) is CVS specific and set by configure
+# FIXME - This includes line is dependant on its order. This means there is
+# some namespace hackery going on that maybe shouldn't be. Long term fix is to
+# try and remove naming ocnflicts and fix Automake to allow particular includes
+# to be attached only to particular object files. Short term fix is either or.
+INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt)
+
+bin_PROGRAMS = cvs
+bin_SCRIPTS = cvsbug
+
+# The cvs executable
+cvs_SOURCES = \
+ add.c \
+ admin.c \
+ annotate.c \
+ buffer.c \
+ checkin.c \
+ checkout.c \
+ classify.c \
+ client.c \
+ commit.c \
+ create_adm.c \
+ cvsrc.c diff.c \
+ edit.c \
+ entries.c \
+ error.c \
+ expand_path.c \
+ fileattr.c \
+ filesubr.c \
+ find_names.c \
+ hardlink.c \
+ hash.c \
+ history.c \
+ ignore.c \
+ 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 \
+ rcscmds.c \
+ recurse.c \
+ release.c \
+ remove.c \
+ repos.c \
+ root.c \
+ run.c \
+ scramble.c \
+ server.c \
+ status.c \
+ subr.c \
+ tag.c \
+ update.c \
+ vers_ts.c \
+ watch.c \
+ wrapper.c \
+ zlib.c \
+ buffer.h \
+ client.h \
+ cvs.h \
+ edit.h \
+ error.h \
+ fileattr.h \
+ hardlink.h \
+ hash.h \
+ myndbm.h \
+ rcs.h \
+ server.h \
+ update.h \
+ watch.h
+
+cvs_LDADD = \
+ ../diff/libdiff.a \
+ ../lib/libcvs.a \
+ ../zlib/libz.a \
+ version.o
+
+cvs_EXTRA_DIST = version.c
+
+# extra clean targets
+# wish this could be distclean-hdr-local but it's not part of automake
+DISTCLEANFILES = options.h-SAVED check.log check.plog
+
+# General
+EXTRA_DIST = \
+ $(cvs_EXTRA_DIST) \
+ .cvsignore \
+ ChangeLog-9194 \
+ ChangeLog-9395 \
+ ChangeLog-96 \
+ ChangeLog-97 \
+ build_src.com \
+ sanity.sh \
+ version.c \
+ version.c.in
+
+EXEEXT =
+OBJEXT = o
+subdir = src
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h options.h
+CONFIG_CLEAN_FILES = cvsbug
+bin_PROGRAMS = cvs$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \
+ buffer.$(OBJEXT) checkin.$(OBJEXT) checkout.$(OBJEXT) \
+ classify.$(OBJEXT) client.$(OBJEXT) commit.$(OBJEXT) \
+ create_adm.$(OBJEXT) cvsrc.$(OBJEXT) diff.$(OBJEXT) \
+ edit.$(OBJEXT) entries.$(OBJEXT) error.$(OBJEXT) \
+ expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \
+ find_names.$(OBJEXT) hardlink.$(OBJEXT) hash.$(OBJEXT) \
+ history.$(OBJEXT) ignore.$(OBJEXT) import.$(OBJEXT) \
+ lock.$(OBJEXT) log.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \
+ main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \
+ myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \
+ patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \
+ recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \
+ repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) scramble.$(OBJEXT) \
+ server.$(OBJEXT) status.$(OBJEXT) subr.$(OBJEXT) tag.$(OBJEXT) \
+ update.$(OBJEXT) vers_ts.$(OBJEXT) watch.$(OBJEXT) \
+ wrapper.$(OBJEXT) zlib.$(OBJEXT)
+cvs_OBJECTS = $(am_cvs_OBJECTS)
+cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a \
+ version.o
+cvs_LDFLAGS =
+SCRIPTS = $(bin_SCRIPTS)
+
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CFLAGS = @CFLAGS@
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-HEADERS = buffer.h cvs.h rcs.h hardlink.h hash.h myndbm.h \
- update.h server.h client.h error.h fileattr.h edit.h watch.h
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I.
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+DIST_SOURCES = $(cvs_SOURCES)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/add.Po $(DEPDIR)/admin.Po \
+@AMDEP_TRUE@ $(DEPDIR)/annotate.Po $(DEPDIR)/buffer.Po \
+@AMDEP_TRUE@ $(DEPDIR)/checkin.Po $(DEPDIR)/checkout.Po \
+@AMDEP_TRUE@ $(DEPDIR)/classify.Po $(DEPDIR)/client.Po \
+@AMDEP_TRUE@ $(DEPDIR)/commit.Po $(DEPDIR)/create_adm.Po \
+@AMDEP_TRUE@ $(DEPDIR)/cvsrc.Po $(DEPDIR)/diff.Po \
+@AMDEP_TRUE@ $(DEPDIR)/edit.Po $(DEPDIR)/entries.Po \
+@AMDEP_TRUE@ $(DEPDIR)/error.Po $(DEPDIR)/expand_path.Po \
+@AMDEP_TRUE@ $(DEPDIR)/fileattr.Po $(DEPDIR)/filesubr.Po \
+@AMDEP_TRUE@ $(DEPDIR)/find_names.Po $(DEPDIR)/hardlink.Po \
+@AMDEP_TRUE@ $(DEPDIR)/hash.Po $(DEPDIR)/history.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ignore.Po $(DEPDIR)/import.Po \
+@AMDEP_TRUE@ $(DEPDIR)/lock.Po $(DEPDIR)/log.Po \
+@AMDEP_TRUE@ $(DEPDIR)/login.Po $(DEPDIR)/logmsg.Po \
+@AMDEP_TRUE@ $(DEPDIR)/main.Po $(DEPDIR)/mkmodules.Po \
+@AMDEP_TRUE@ $(DEPDIR)/modules.Po $(DEPDIR)/myndbm.Po \
+@AMDEP_TRUE@ $(DEPDIR)/no_diff.Po $(DEPDIR)/parseinfo.Po \
+@AMDEP_TRUE@ $(DEPDIR)/patch.Po $(DEPDIR)/rcs.Po \
+@AMDEP_TRUE@ $(DEPDIR)/rcscmds.Po $(DEPDIR)/recurse.Po \
+@AMDEP_TRUE@ $(DEPDIR)/release.Po $(DEPDIR)/remove.Po \
+@AMDEP_TRUE@ $(DEPDIR)/repos.Po $(DEPDIR)/root.Po \
+@AMDEP_TRUE@ $(DEPDIR)/run.Po $(DEPDIR)/scramble.Po \
+@AMDEP_TRUE@ $(DEPDIR)/server.Po $(DEPDIR)/status.Po \
+@AMDEP_TRUE@ $(DEPDIR)/subr.Po $(DEPDIR)/tag.Po \
+@AMDEP_TRUE@ $(DEPDIR)/update.Po $(DEPDIR)/vers_ts.Po \
+@AMDEP_TRUE@ $(DEPDIR)/watch.Po $(DEPDIR)/wrapper.Po \
+@AMDEP_TRUE@ $(DEPDIR)/zlib.Po
+DIST_COMMON = ./stamp-h2.in ChangeLog Makefile.am Makefile.in cvsbug.in \
+ options.h.in
+SOURCES = $(cvs_SOURCES)
+OBJECTS = $(am_cvs_OBJECTS)
+
+all: options.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+
+options.h: stamp-h2
+ @if test ! -f $@; then \
+ rm -f stamp-h2; \
+ $(MAKE) stamp-h2; \
+ else :; fi
+stamp-h2: $(srcdir)/options.h.in $(top_builddir)/config.status
+ @rm -f stamp-h2 stamp-h2T
+ @echo timestamp > stamp-h2T 2> /dev/null
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=src/options.h \
+ $(SHELL) ./config.status
+ @mv stamp-h2T stamp-h2
+$(srcdir)/options.h.in: $(srcdir)/./stamp-h2.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/./stamp-h2.in; \
+ $(MAKE) $(srcdir)/./stamp-h2.in; \
+ else :; fi
+$(srcdir)/./stamp-h2.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
+ @rm -f $(srcdir)/./stamp-h2.in $(srcdir)/./stamp-h2.inT
+ @echo timestamp > $(srcdir)/./stamp-h2.inT 2> /dev/null
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @mv $(srcdir)/./stamp-h2.inT $(srcdir)/./stamp-h2.in
+
+distclean-hdr:
+ -rm -f options.h
+cvsbug: $(top_builddir)/config.status cvsbug.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
-TAGFILES = $(HEADERS) options.h.in $(SOURCES)
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
-DISTFILES = .cvsignore Makefile.in \
- ChangeLog ChangeLog-97 ChangeLog-96 ChangeLog-9395 ChangeLog-9194 \
- sanity.sh cvsbug.sh $(TAGFILES) build_src.com
+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)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \
+ elif test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
-PROGS = cvs cvsbug
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
-DEFS = @DEFS@ @includeopt@
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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 $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) options.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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 "$(ETAGS_ARGS)options.h.in$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags options.h.in $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+@_am_include@ @_am_quote@$(DEPDIR)/add.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/admin.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/annotate.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/buffer.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/checkin.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/checkout.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/classify.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/client.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/commit.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/create_adm.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/cvsrc.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/diff.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/edit.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/entries.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/error.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/expand_path.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/fileattr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/filesubr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/find_names.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/hardlink.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/hash.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/history.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ignore.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/import.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/lock.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/log.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/login.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/logmsg.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/main.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/mkmodules.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/modules.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/myndbm.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/no_diff.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/parseinfo.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/patch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/rcs.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/rcscmds.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/recurse.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/release.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/remove.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/repos.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/root.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/run.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/scramble.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/server.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/status.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/subr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/tag.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/update.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/vers_ts.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/watch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/wrapper.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/zlib.Po@_am_quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+CCDEPMODE = @CCDEPMODE@
-CC = @CC@
-CFLAGS = @CFLAGS@
-CPPFLAGS =
-LDFLAGS = @LDFLAGS@
-ZLIB = @ZLIB@
+.c.o:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.c.obj:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `cygpath -w $<`
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || 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) options.h
-INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
-ZLIB_INCLUDES = @ZLIB_INCLUDES@
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)
-.c.o:
- $(CC) $(CPPFLAGS) $(INCLUDES) $(DEFS) $(CFLAGS) -c $<
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-all: Makefile $(PROGS)
-.PHONY: all
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-saber_cvs:
- @cd ..; $(MAKE) saber SUBDIRS=src
+installcheck: installcheck-am
-lint:
- @cd ..; $(MAKE) lint SUBDIRS=src
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-install: installdirs
- @for prog in $(PROGS); do \
- echo Installing $$prog in $(bindir); \
- $(INSTALL_PROGRAM) $$prog $(bindir)/$$prog ; \
- done
+mostlyclean-generic:
-installdirs:
- $(SHELL) $(top_srcdir)/mkinstalldirs $(bindir)
+clean-generic:
-.PHONY: install installdirs
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-installcheck:
- $(SHELL) $(srcdir)/sanity.sh $(bindir)/cvs
-.PHONY: installcheck
+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 Makefile.in
+clean: clean-am
-check: all
- $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
-.PHONY: check
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-# I'm not sure there is any remaining reason for this to be separate from
-# `make check'.
-remotecheck: all
- $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
-.PHONY: remotecheck
+distclean: distclean-am
-tags: $(TAGFILES)
- ctags $(TAGFILES)
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-hdr distclean-tags
-TAGS: $(TAGFILES)
- etags `for i in $(TAGFILES); do echo $(srcdir)/$$i; done`
+dvi:
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+dvi-am:
-clean:
- rm -f $(PROGS) *.o core check.log check.plog
-.PHONY: clean
+info:
-distclean: clean
- rm -f tags TAGS Makefile options.h
-.PHONY: distclean
+info-am:
-realclean: distclean
-.PHONY: realclean
+install-data-am:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-.PHONY: dist-dir
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
-# Linking rules.
+install-info:
-$(PROGS): ../lib/libcvs.a ../diff/libdiff.a
+install-man:
-cvs: $(OBJECTS)
- $(CC) $(OBJECTS) ../lib/libcvs.a ../diff/libdiff.a $(ZLIB) $(LIBS) $(LDFLAGS) -o $@
+installcheck-am:
-xlint: $(SOURCES)
- files= ; \
- for i in $(SOURCES) ; do \
- files="$$files $(srcdir)/$$i" ; \
- done ; \
- sh -c "lint $(DEFS) $(INCLUDES) $$files | grep -v \"possible pointer alignment problem\" \
- | grep -v \"argument closure unused\""
+maintainer-clean: maintainer-clean-am
-saber: $(SOURCES)
- # load $(CFLAGS) $(SOURCES)
- # load ../lib/libcvs.a $(LIBS)
+maintainer-clean-am: distclean-am maintainer-clean-generic
-cvsbug: cvsbug.sh $(srcdir)/version.c
- echo > .fname \
- cvs-`sed < $(srcdir)/version.c \
- -e '/version_string/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
- -e q`
- sed -e 's,xDATADIRx,$(datadir)/cvs,g' \
- -e "s,xVERSIONx,`cat .fname`,g" $(srcdir)/$@.sh > $@-t
- rm -f .fname
- mv $@-t $@
- chmod a+x $@
+mostlyclean: mostlyclean-am
-# Compilation rules.
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
-$(OBJECTS): $(HEADERS) options.h
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS
-rcscmds.o: rcscmds.c $(top_srcdir)/diff/diffrun.h
- $(CC) $(CPPFLAGS) $(INCLUDES) -I$(top_srcdir)/diff $(DEFS) $(CFLAGS) -c $(srcdir)/rcscmds.c
+.PHONY: all all-am check check-am check-local clean clean-binPROGRAMS \
+ clean-generic distclean distclean-compile distclean-depend \
+ distclean-generic distclean-hdr distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-binPROGRAMS \
+ install-binSCRIPTS install-data install-data-am install-exec \
+ install-exec-am install-info install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-binSCRIPTS
-zlib.o: zlib.c
- $(CC) $(CPPFLAGS) $(INCLUDES) ${ZLIB_INCLUDES} $(DEFS) $(CFLAGS) -c $(srcdir)/zlib.c
-subdir = src
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+check-local:
+ $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
-options.h: ../config.status options.h.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+.PHONY: remotecheck
+remotecheck: all
+ $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
-#../config.status: ../configure
-# cd .. ; $(SHELL) config.status --recheck
+# version.c
+# - build this here so that we can distribute it
+# - version.c needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+# - need the explicit version.o dependency or else make won't match
+# $(srcdir)/version.c when looking for a dependency for version.c
+version.o: $(srcdir)/version.c
+$(srcdir)/version.c: $(srcdir)/version.c.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.c.in >$(srcdir)/version.tc
+ mv $(srcdir)/version.tc $(srcdir)/version.c
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
-#../configure: ../configure.in
-# cd $(top_srcdir) ; autoconf
+# 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:
diff --git a/gnu/usr.bin/cvs/src/checkout.c b/gnu/usr.bin/cvs/src/checkout.c
index 1a66b5be6f9..86dc9510eb0 100644
--- a/gnu/usr.bin/cvs/src/checkout.c
+++ b/gnu/usr.bin/cvs/src/checkout.c
@@ -44,7 +44,7 @@ static int checkout_proc PROTO((int argc, char **argv, char *where,
static const char *const checkout_usage[] =
{
- "Usage:\n %s %s [-ANPRcflnps] [-r rev | -D date] [-d dir]\n",
+ "Usage:\n %s %s [-ANPRcflnps] [-r rev] [-D date] [-d dir]\n",
" [-j rev1] [-j rev2] [-k kopt] modules...\n",
"\t-A\tReset any sticky tags/date/kopts.\n",
"\t-N\tDon't shorten module paths if -d specified.\n",
@@ -59,7 +59,7 @@ static const char *const checkout_usage[] =
"\t-r rev\tCheck out revision or tag. (implies -P) (is sticky)\n",
"\t-D date\tCheck out revisions as of date. (implies -P) (is sticky)\n",
"\t-d dir\tCheck out into dir instead of module name.\n",
- "\t-k kopt\tUse RCS kopt -k option on checkout.\n",
+ "\t-k kopt\tUse RCS kopt -k option on checkout. (is sticky)\n",
"\t-j rev\tMerge in changes made between current revision and rev.\n",
"(Specify the --help global option for a list of other help options)\n",
NULL
@@ -67,7 +67,7 @@ static const char *const checkout_usage[] =
static const char *const export_usage[] =
{
- "Usage: %s %s [-NRfln] [-r rev | -D date] [-d dir] [-k kopt] module...\n",
+ "Usage: %s %s [-NRfln] [-r rev] [-D date] [-d dir] [-k kopt] module...\n",
"\t-N\tDon't shorten module paths if -d specified.\n",
"\t-f\tForce a head revision match if tag/date not found.\n",
"\t-l\tLocal directory only, not recursive\n",
@@ -190,7 +190,7 @@ checkout (argc, argv)
shorten = 1;
break;
case 's':
- status = 1;
+ cat = status = 1;
break;
case 'f':
force_tag_match = 0;
@@ -223,10 +223,10 @@ checkout (argc, argv)
if (shorten == -1)
shorten = 0;
- if ((cat || status) && argc != 0)
+ if (cat && argc != 0)
error (1, 0, "-c and -s must not get any arguments");
- if (!(cat || status) && argc == 0)
+ if (!cat && argc == 0)
error (1, 0, "must specify at least one module or directory");
if (where && pipeout)
@@ -248,12 +248,12 @@ checkout (argc, argv)
}
#endif
- if (!safe_location()) {
+ if (!cat && !safe_location()) {
error(1, 0, "Cannot check out files into the repository itself");
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int expand_modules;
@@ -269,7 +269,7 @@ checkout (argc, argv)
below in !expand_modules), those files (CVS/Checkin.prog
or CVS/Update.prog) don't get created. Grrr. */
- expand_modules = (!cat && !status && !pipeout
+ expand_modules = (!cat && !pipeout
&& supported_request ("expand-modules"));
if (expand_modules)
@@ -296,7 +296,7 @@ checkout (argc, argv)
if (checkout_prune_dirs && m_type == CHECKOUT)
send_arg("-P");
client_prune_dirs = checkout_prune_dirs;
- if (cat)
+ if (cat && !status)
send_arg("-c");
if (where != NULL)
option_with_arg ("-d", where);
@@ -329,7 +329,7 @@ checkout (argc, argv)
}
#endif /* CLIENT_SUPPORT */
- if (cat || status)
+ if (cat)
{
cat_module (status);
if (options)
@@ -367,7 +367,7 @@ checkout (argc, argv)
for (i = 0; i < argc; i++)
err += do_module (db, argv[i], m_type, "Updating", checkout_proc,
- where, shorten, local, run_module_prog,
+ where, shorten, local, run_module_prog, !pipeout,
(char *) NULL);
close_module (db);
if (options)
@@ -391,13 +391,13 @@ safe_location ()
/* FIXME-arbitrary limit: should be retrying this like xgetwd.
But how does readlink let us know that the buffer was too small?
(by returning sizeof hardpath - 1?). */
- x = readlink(CVSroot_directory, hardpath, sizeof hardpath - 1);
+ x = readlink(current_parsed_root->directory, hardpath, sizeof hardpath - 1);
#else
x = -1;
#endif
if (x == -1)
{
- strcpy(hardpath, CVSroot_directory);
+ strcpy(hardpath, current_parsed_root->directory);
}
else
{
@@ -466,8 +466,8 @@ build_one_dir (repository, dirpath, sticky)
error (1, 0, "there is no repository %s", repository);
if (Create_Admin (".", dirpath, repository,
- sticky ? (char *) NULL : tag,
- sticky ? (char *) NULL : date,
+ sticky ? tag : (char *) NULL,
+ sticky ? date : (char *) NULL,
/* FIXME? This is a guess. If it is important
for nonbranch to be set correctly here I
@@ -529,11 +529,11 @@ checkout_proc (argc, argv, where_orig, mwhere, mfile, shorten,
/* Set up the repository (maybe) for the bottom directory.
Allocate more space than we need so we don't need to keep
reallocating this string. */
- repository = xmalloc (strlen (CVSroot_directory)
+ repository = xmalloc (strlen (current_parsed_root->directory)
+ strlen (argv[0])
+ (mfile == NULL ? 0 : strlen (mfile))
+ 10);
- (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
Sanitize_Repository_Name (repository);
@@ -709,11 +709,11 @@ checkout_proc (argc, argv, where_orig, mwhere, mfile, shorten,
struct dir_to_build *head;
char *reposcopy;
- if (strncmp (repository, CVSroot_directory,
- strlen (CVSroot_directory)) != 0)
+ if (strncmp (repository, current_parsed_root->directory,
+ strlen (current_parsed_root->directory)) != 0)
error (1, 0, "\
internal error: %s doesn't start with %s in checkout_proc",
- repository, CVSroot_directory);
+ repository, current_parsed_root->directory);
/* We always create at least one directory, which corresponds to
the entire strings for WHERE and REPOSITORY. */
@@ -798,7 +798,7 @@ internal error: %s doesn't start with %s in checkout_proc",
bar -> Emptydir (generated dir -- not in repos)
baz -> quux (finally!) */
- if (strcmp (reposcopy, CVSroot_directory) == 0)
+ if (strcmp (reposcopy, current_parsed_root->directory) == 0)
{
/* We can't walk up past CVSROOT. Instead, the
repository should be Emptydir. */
@@ -806,55 +806,30 @@ internal error: %s doesn't start with %s in checkout_proc",
}
else
{
- if ((where_orig != NULL)
- && (strcmp (new->dirpath, where_orig) == 0))
- {
- /* It's the case that the user specified a
- * destination directory with the "-d" flag. The
- * repository in this directory should be "."
- * since the user's command is equivalent to:
- *
- * cd <dir>; cvs co blah */
-
- strcpy (reposcopy, CVSroot_directory);
- goto allocate_repos;
- }
- else if (mwhere != NULL)
- {
- /* This is a generated directory, so point to
- CVSNULLREPOS. */
-
- new->repository = emptydir_name ();
- }
- else
- {
- /* It's a directory in the repository! */
+ /* It's a directory in the repository! */
- char *rp;
+ char *rp;
- /* We'll always be below CVSROOT, but check for
- paranoia's sake. */
- rp = strrchr (reposcopy, '/');
- if (rp == NULL)
- error (1, 0,
- "internal error: %s doesn't contain a slash",
- reposcopy);
+ /* We'll always be below CVSROOT, but check for
+ paranoia's sake. */
+ rp = strrchr (reposcopy, '/');
+ if (rp == NULL)
+ error (1, 0,
+ "internal error: %s doesn't contain a slash",
+ reposcopy);
- *rp = '\0';
-
- allocate_repos:
- new->repository = xmalloc (strlen (reposcopy) + 5);
- (void) strcpy (new->repository, reposcopy);
+ *rp = '\0';
+ new->repository = xmalloc (strlen (reposcopy) + 5);
+ (void) strcpy (new->repository, reposcopy);
- if (strcmp (reposcopy, CVSroot_directory) == 0)
- {
- /* Special case -- the repository name needs
- to be "/path/to/repos/." (the trailing dot
- is important). We might be able to get rid
- of this after the we check out the other
- code that handles repository names. */
- (void) strcat (new->repository, "/.");
- }
+ if (strcmp (reposcopy, current_parsed_root->directory) == 0)
+ {
+ /* Special case -- the repository name needs
+ to be "/path/to/repos/." (the trailing dot
+ is important). We might be able to get rid
+ of this after the we check out the other
+ code that handles repository names. */
+ (void) strcat (new->repository, "/.");
}
}
}
@@ -866,7 +841,7 @@ internal error: %s doesn't start with %s in checkout_proc",
int where_is_absolute = isabsolute (where);
/* The top-level CVSADM directory should always be
- CVSroot_directory. Create it, but only if WHERE is
+ current_parsed_root->directory. Create it, but only if WHERE is
relative. If WHERE is absolute, our current directory
may not have a thing to do with where the sources are
being checked out. If it does, build_dirs_and_chdir
@@ -880,7 +855,7 @@ internal error: %s doesn't start with %s in checkout_proc",
{
/* It may be argued that we shouldn't set any sticky
bits for the top-level repository. FIXME? */
- build_one_dir (CVSroot_directory, ".", argc <= 1);
+ build_one_dir (current_parsed_root->directory, ".", argc <= 1);
#ifdef SERVER_SUPPORT
/* We _always_ want to have a top-level admin
@@ -892,7 +867,7 @@ internal error: %s doesn't start with %s in checkout_proc",
will be ignored on the client side. */
if (server_active)
- server_clear_entstat (".", CVSroot_directory);
+ server_clear_entstat (".", current_parsed_root->directory);
#endif
}
@@ -1033,7 +1008,7 @@ internal error: %s doesn't start with %s in checkout_proc",
force_tag_match, 0 /* !local */ ,
1 /* update -d */ , aflag, checkout_prune_dirs,
pipeout, which, join_rev1, join_rev2,
- preload_update_dir);
+ preload_update_dir, m_type == CHECKOUT);
goto out;
}
@@ -1089,7 +1064,7 @@ internal error: %s doesn't start with %s in checkout_proc",
err += do_update (argc - 1, argv + 1, options, tag, date,
force_tag_match, local_specified, 1 /* update -d */,
aflag, checkout_prune_dirs, pipeout, which, join_rev1,
- join_rev2, preload_update_dir);
+ join_rev2, preload_update_dir, m_type == CHECKOUT);
out:
free (preload_update_dir);
preload_update_dir = oldupdate;
@@ -1121,11 +1096,11 @@ emptydir_name ()
{
char *repository;
- repository = xmalloc (strlen (CVSroot_directory)
+ repository = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ sizeof (CVSNULLREPOS)
- + 10);
- (void) sprintf (repository, "%s/%s/%s", CVSroot_directory,
+ + 3);
+ (void) sprintf (repository, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSNULLREPOS);
if (!isfile (repository))
{
diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c
index c82896ab21c..999beb31f3b 100644
--- a/gnu/usr.bin/cvs/src/client.c
+++ b/gnu/usr.bin/cvs/src/client.c
@@ -32,6 +32,7 @@
# else /* No winsock.h */
# include <sys/socket.h>
# include <netinet/in.h>
+# include <arpa/inet.h>
# include <netdb.h>
# endif /* No winsock.h */
#endif
@@ -77,19 +78,7 @@ static Key_schedule sched;
#ifdef HAVE_GSSAPI
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
-#include <gssapi/gssapi_generic.h>
-#endif
-
-#ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
+# include "xgssapi.h"
/* This is needed for GSSAPI encryption. */
static gss_ctx_id_t gcontext;
@@ -97,7 +86,7 @@ static gss_ctx_id_t gcontext;
static int connect_to_gserver PROTO((int, struct hostent *));
#endif /* HAVE_GSSAPI */
-
+
static void add_prune_candidate PROTO((char *));
/* All the commands. */
@@ -198,7 +187,7 @@ arg_should_not_be_sent_to_server (arg)
4) the argument lies within one of the paths in
dirs_sent_to_server.
- 4) */
+ */
if (list_isempty (dirs_sent_to_server))
return 0; /* always send it */
@@ -270,8 +259,8 @@ arg_should_not_be_sent_to_server (arg)
*/
#if 0
/* Now check the value for root. */
- if (this_root && current_root
- && (strcmp (this_root, current_root) != 0))
+ if (this_root && current_parsed_root
+ && (strcmp (this_root, current_parsed_root->original) != 0))
{
/* Don't send this, since the CVSROOTs don't match. */
free (this_root);
@@ -1285,6 +1274,32 @@ warning: server is not creating directories one at a time");
if ( CVS_CHDIR (dir_name) < 0)
error (1, errno, "could not chdir to %s", dir_name);
}
+ 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 = xmalloc (strlen (reposdirname)
+ + strlen (toplevel_repos)
+ + 10);
+ strcpy (repo, toplevel_repos);
+ strcat (repo, "/");
+ strcat (repo, reposdirname);
+ }
+
+ Create_Admin (".", ".", repo, (char *)NULL, (char *)NULL, 0, 1, 1);
+ if (repo != reposdirname)
+ free (repo);
+ }
if (strcmp (command_name, "export") != 0)
{
@@ -2290,7 +2305,7 @@ static int
is_cvsroot_level (pathname)
char *pathname;
{
- if (strcmp (toplevel_repos, CVSroot_directory) != 0)
+ if (strcmp (toplevel_repos, current_parsed_root->directory) != 0)
return 0;
return strchr (pathname, '/') == NULL;
@@ -2930,14 +2945,14 @@ send_a_repository (dir, repository, 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"
- CVSroot_directory, set toplevel_repos to
- CVSroot_directory. */
+ 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) == 0)
- /* TOPLEVEL_REPOS shouldn't be above CVSroot_directory */
+ /* TOPLEVEL_REPOS shouldn't be above current_parsed_root->directory */
&& ((repository_len - update_dir_len)
- > strlen (CVSroot_directory)))
+ > strlen (current_parsed_root->directory)))
{
/* The repository name contains UPDATE_DIR. Set
toplevel_repos to the repository name without
@@ -2951,7 +2966,7 @@ send_a_repository (dir, repository, update_dir)
}
else
{
- toplevel_repos = xstrdup (CVSroot_directory);
+ toplevel_repos = xstrdup (current_parsed_root->directory);
}
}
}
@@ -3009,7 +3024,7 @@ client_expand_modules (argc, argv, local)
for (i = 0; i < argc; ++i)
send_arg (argv[i]);
- send_a_repository ("", CVSroot_directory, "");
+ send_a_repository ("", current_parsed_root->directory, "");
send_to_server ("expand-modules\012", 0);
@@ -3047,13 +3062,13 @@ client_send_expansions (local, where, build_dirs)
if (isfile (argv[0]))
send_files (1, argv, local, 0, build_dirs ? SEND_BUILD_DIRS : 0);
}
- send_a_repository ("", CVSroot_directory, "");
+ send_a_repository ("", current_parsed_root->directory, "");
}
void
client_nonexpanded_setup ()
{
- send_a_repository ("", CVSroot_directory, "");
+ send_a_repository ("", current_parsed_root->directory, "");
}
/* Receive a cvswrappers line from the server; it must be a line
@@ -3568,7 +3583,8 @@ get_responses_and_close ()
{
if (shutdown (server_fd, 1) < 0)
error (1, 0, "shutting down connection to %s: %s",
- CVSroot_hostname, SOCK_STRERROR (SOCK_ERRNO));
+ current_parsed_root->hostname, SOCK_STRERROR (SOCK_ERRNO));
+ server_fd = -1;
/*
* This test will always be true because we dup the descriptor
*/
@@ -3577,7 +3593,7 @@ get_responses_and_close ()
if (fclose (to_server_fp) != 0)
error (1, errno,
"closing down connection to %s",
- CVSroot_hostname);
+ current_parsed_root->hostname);
}
}
else
@@ -3595,15 +3611,15 @@ get_responses_and_close ()
#endif /* START_RSH_WITH_POPEN_RW */
{
error (1, errno, "closing connection to %s",
- CVSroot_hostname);
+ current_parsed_root->hostname);
}
}
if (! buf_empty_p (from_server)
|| getc (from_server_fp) != EOF)
- error (0, 0, "dying gasps from %s unexpected", CVSroot_hostname);
+ error (0, 0, "dying gasps from %s unexpected", current_parsed_root->hostname);
else if (ferror (from_server_fp))
- error (0, errno, "reading from %s", CVSroot_hostname);
+ error (0, errno, "reading from %s", current_parsed_root->hostname);
fclose (from_server_fp);
#endif /* SHUTDOWN_SERVER */
@@ -3620,8 +3636,7 @@ get_responses_and_close ()
/* see if we need to sleep before returning to avoid time-stamp races */
if (last_register_time)
{
- while (time ((time_t *) NULL) == last_register_time)
- sleep (1);
+ sleep_past (last_register_time);
}
return errs;
@@ -3645,7 +3660,8 @@ supported_request (name)
return 0;
}
-
+
+
#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS)
static struct hostent *init_sockaddr PROTO ((struct sockaddr_in *, char *,
unsigned int));
@@ -3674,22 +3690,86 @@ init_sockaddr (name, hostname, port)
#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) */
-#ifdef AUTH_CLIENT_SUPPORT
-static int auth_server_port_number PROTO ((void));
+#ifdef AUTH_CLIENT_SUPPORT
+
+/* 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
-auth_server_port_number ()
+get_port_number (envname, portname, defaultport)
+ const char *envname;
+ const char *portname;
+ int defaultport;
{
- struct servent *s = getservbyname ("cvspserver", "tcp");
+ struct servent *s;
+ char *port_s;
- if (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 ssh, 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 CVS_AUTH_PORT;
+ 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 the commands do that now, but here's to planning
+ * for the future, eh? cheers.
+ *
+ * FIXME - We could cache the port lookup safely right now as we never change
+ * it for a single root on the fly, but we'd have to un'const some other
+ * functions
+ */
+int
+get_cvs_port_number (root)
+ const cvsroot_t *root;
+{
+
+ if (root->port) return root->port;
+
+ switch (root->method)
+ {
+ case gserver_method:
+ case pserver_method:
+ return get_port_number ("CVS_CLIENT_PORT", "cvspserver", CVS_AUTH_PORT);
+#ifdef HAVE_KERBEROS
+ case kserver_method:
+ return get_port_number ("CVS_CLIENT_PORT", "cvs", CVS_PORT);
+#endif
+ default:
+ error(1, EINVAL, "internal error: get_cvs_port_number called for invalid connection method (%s)",
+ method_names[root->method]);
+ break;
+ }
}
+
/* Read a line from socket SOCK. Result does not include the
terminating linefeed. This is only used by the authentication
protocol, which we call before we set up all the buffering stuff.
@@ -3717,7 +3797,7 @@ recv_line (sock, resultp)
int n;
n = recv (sock, &ch, 1, 0);
if (n <= 0)
- error (1, 0, "recv() from server %s: %s", CVSroot_hostname,
+ error (1, 0, "recv() from server %s: %s", current_parsed_root->hostname,
n == 0 ? "EOF" : SOCK_STRERROR (SOCK_ERRNO));
if (ch == '\012')
@@ -3755,11 +3835,15 @@ connect_to_forked_server (tofdp, fromfdp)
command[0] = getenv ("CVS_SERVER");
if (! command[0])
- command[0] = "cvs";
+ command[0] = program_path;
command[1] = "server";
command[2] = NULL;
+ if (trace)
+ {
+ fprintf (stderr, " -> Forking server: %s %s\n", command[0], command[1]);
+ }
if (! piped_child (command, tofdp, fromfdp))
error (1, 0, "could not fork server process");
}
@@ -3787,20 +3871,29 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
int tofd, fromfd;
#endif
int port_number;
+ char *username; /* the username we use to connect */
struct sockaddr_in client_sai;
struct hostent *hostinfo;
- char no_passwd = 0; /* gets set if no password found */
+ char no_passwd = 0; /* gets set if no password found */
sock = socket (AF_INET, SOCK_STREAM, 0);
if (sock == -1)
{
error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
}
- port_number = auth_server_port_number ();
- hostinfo = init_sockaddr (&client_sai, CVSroot_hostname, port_number);
+ port_number = get_cvs_port_number (current_parsed_root);
+ hostinfo = init_sockaddr (&client_sai, current_parsed_root->hostname, port_number);
+ if (trace)
+ {
+ fprintf (stderr, " -> Connecting to %s(%s):%d\n",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr), port_number);
+ }
if (connect (sock, (struct sockaddr *) &client_sai, sizeof (client_sai))
< 0)
- error (1, 0, "connect to %s:%d failed: %s", CVSroot_hostname,
+ error (1, 0, "connect to %s(%s):%d failed: %s",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr),
port_number, SOCK_STRERROR (SOCK_ERRNO));
/* Run the authorization mini-protocol before anything else. */
@@ -3808,7 +3901,12 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
{
#ifdef HAVE_GSSAPI
if (! connect_to_gserver (sock, hostinfo))
+ {
+ error (0, 0,
+ "authorization failed: server %s rejected access to %s",
+ current_parsed_root->hostname, current_parsed_root->directory);
goto rejected;
+ }
#else
error (1, 0, "This client does not support GSSAPI authentication");
#endif
@@ -3816,11 +3914,9 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
else
{
char *begin = NULL;
- char *repository = CVSroot_directory;
- char *username = CVSroot_username;
char *password = NULL;
char *end = NULL;
-
+
if (verify_only)
{
begin = "BEGIN VERIFICATION REQUEST\012";
@@ -3834,7 +3930,8 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
/* Get the password, probably from ~/.cvspass. */
password = get_cvs_password ();
-
+ username = current_parsed_root->username ? current_parsed_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 == NULL)
@@ -3848,7 +3945,7 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
/* Send the data the server needs. */
- if (send (sock, repository, strlen (repository), 0) < 0)
+ if (send (sock, current_parsed_root->directory, strlen (current_parsed_root->directory), 0) < 0)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
if (send (sock, "\012", 1, 0) < 0)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
@@ -3879,7 +3976,29 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
if (strcmp (read_buf, "I HATE YOU") == 0)
{
- /* Authorization not granted. */
+ /* 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).
+ *
+ * i.e. This is a pserver specific error message and shoiuld be since
+ * GSSAPI doesn't use username.
+ */
+ error (0, 0,
+ "authorization failed: server %s rejected access to %s for user %s",
+ current_parsed_root->hostname, current_parsed_root->directory, username);
+
+ /* 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");
+ }
goto rejected;
}
else if (strncmp (read_buf, "E ", 2) == 0)
@@ -3917,15 +4036,15 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
{
error (0, 0,
"unrecognized auth response from %s: %s",
- CVSroot_hostname, read_buf);
+ current_parsed_root->hostname, read_buf);
error (1, 0,
"shutdown() failed, server %s: %s",
- CVSroot_hostname,
+ current_parsed_root->hostname,
SOCK_STRERROR (SOCK_ERRNO));
}
error (1, 0,
"unrecognized auth response from %s: %s",
- CVSroot_hostname, read_buf);
+ current_parsed_root->hostname, read_buf);
}
free (read_buf);
}
@@ -3934,7 +4053,7 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
if (verify_only)
{
if (shutdown (sock, 2) < 0)
- error (0, 0, "shutdown() failed, server %s: %s", CVSroot_hostname,
+ error (0, 0, "shutdown() failed, server %s: %s", current_parsed_root->hostname,
SOCK_STRERROR (SOCK_ERRNO));
return;
}
@@ -3959,24 +4078,11 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
return;
rejected:
- error (0, 0,
- "authorization failed: server %s rejected access to %s for user %s",
- CVSroot_hostname, CVSroot_directory, CVSroot_username);
-
- /* 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");
- }
-
if (shutdown (sock, 2) < 0)
{
error (0, 0,
"shutdown() failed (server %s): %s",
- CVSroot_hostname,
+ current_parsed_root->hostname,
SOCK_STRERROR (SOCK_ERRNO));
}
@@ -3984,8 +4090,9 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
}
#endif /* AUTH_CLIENT_SUPPORT */
-
-#if HAVE_KERBEROS
+
+
+#ifdef HAVE_KERBEROS
/* This function has not been changed to deal with NO_SOCKET_TO_FD
(i.e., systems on which sockets cannot be converted to file
@@ -4007,42 +4114,26 @@ start_tcp_server (tofdp, fromfdp)
if (s < 0)
error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
- /* Get CVS_CLIENT_PORT or look up cvs/tcp with CVS_PORT as default */
- portenv = getenv ("CVS_CLIENT_PORT");
- if (portenv != NULL)
- {
- port = atoi (portenv);
- if (port <= 0)
- {
- error (0, 0, "CVS_CLIENT_PORT must be a positive number! If you");
- error (0, 0, "are trying to force a connection via ssh, please");
- error (0, 0, "put \":server:\" at the beginning of your CVSROOT");
- error (1, 0, "variable.");
- }
- if (trace)
- fprintf(stderr, "Using TCP port %d to contact server.\n", port);
- }
- else
- {
- struct servent *sp;
-
- sp = getservbyname ("cvs", "tcp");
- if (sp == NULL)
- port = CVS_PORT;
- else
- port = ntohs (sp->s_port);
- }
+ port = get_cvs_port_number (current_parsed_root);
- hp = init_sockaddr (&sin, CVSroot_hostname, port);
+ hp = init_sockaddr (&sin, current_parsed_root->hostname, port);
hname = xmalloc (strlen (hp->h_name) + 1);
strcpy (hname, hp->h_name);
+ if (trace)
+ {
+ fprintf (stderr, " -> Connecting to %s(%s):%d\n",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr), port);
+ }
+
if (connect (s, (struct sockaddr *) &sin, sizeof sin) < 0)
- error (1, 0, "connect to %s:%d failed: %s", CVSroot_hostname,
+ error (1, 0, "connect to %s(%s):%d failed: %s",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr),
port, SOCK_STRERROR (SOCK_ERRNO));
-#ifdef HAVE_KERBEROS
{
const char *realm;
struct sockaddr_in laddr;
@@ -4067,7 +4158,6 @@ start_tcp_server (tofdp, fromfdp)
krb_get_err_text (status));
memcpy (kblock, cred.session, sizeof (C_Block));
}
-#endif /* HAVE_KERBEROS */
server_fd = s;
close_on_exec (server_fd);
@@ -4096,9 +4186,10 @@ recv_bytes (sock, buf, need)
int got;
got = recv (sock, buf, need, 0);
- if (got < 0)
- error (1, 0, "recv() from server %s: %s", CVSroot_hostname,
- SOCK_STRERROR (SOCK_ERRNO));
+ if (got <= 0)
+ error (1, 0, "recv() from server %s: %s", current_parsed_root->hostname,
+ got == 0 ? "EOF" : SOCK_STRERROR (SOCK_ERRNO));
+
buf += got;
need -= got;
}
@@ -4191,11 +4282,11 @@ connect_to_gserver (sock, hostinfo)
got = recv (sock, buf + 2, sizeof buf - 2, 0);
if (got < 0)
error (1, 0, "recv() from server %s: %s",
- CVSroot_hostname, SOCK_STRERROR (SOCK_ERRNO));
+ current_parsed_root->hostname, SOCK_STRERROR (SOCK_ERRNO));
buf[got + 2] = '\0';
if (buf[got + 1] == '\n')
buf[got + 1] = '\0';
- error (1, 0, "error from server %s: %s", CVSroot_hostname,
+ error (1, 0, "error from server %s: %s", current_parsed_root->hostname,
buf);
}
@@ -4247,7 +4338,7 @@ start_server ()
(*really* slow on a 14.4kbps link); the clean way to have a CVS
which supports several ways of connecting is with access methods. */
- switch (CVSroot_method)
+ switch (current_parsed_root->method)
{
#ifdef AUTH_CLIENT_SUPPORT
@@ -4264,7 +4355,7 @@ start_server ()
break;
#endif
-#if HAVE_GSSAPI
+#ifdef HAVE_GSSAPI
case gserver_method:
/* GSSAPI authentication is handled by the pserver. */
connect_to_pserver (&tofd, &fromfd, 0, 1);
@@ -4283,8 +4374,8 @@ start_server ()
case server_method:
#if defined(START_SERVER)
START_SERVER (&tofd, &fromfd, getcaller (),
- CVSroot_username, CVSroot_hostname,
- CVSroot_directory);
+ current_parsed_root->username, current_parsed_root->hostname,
+ current_parsed_root->directory);
# if defined (START_SERVER_RETURNS_SOCKET) && defined (NO_SOCKET_TO_FD)
/* This is a system on which we can only write to a socket
using send/recv. Therefore its START_SERVER needs to
@@ -4415,7 +4506,7 @@ the :server: access method is not supported by this port of CVS");
if (!rootless)
{
send_to_server ("Root ", 0);
- send_to_server (CVSroot_directory, 0);
+ send_to_server (current_parsed_root->directory, 0);
send_to_server ("\012", 1);
}
@@ -4545,7 +4636,7 @@ the :server: access method is not supported by this port of CVS");
on encryption, bomb out; don't let the user think the data
is being encrypted when it is not. */
#ifdef HAVE_KERBEROS
- if (CVSroot_method == kserver_method)
+ if (current_parsed_root->method == kserver_method)
{
if (! supported_request ("Kerberos-encrypt"))
error (1, 0, "This server does not support encryption");
@@ -4560,7 +4651,7 @@ the :server: access method is not supported by this port of CVS");
else
#endif /* HAVE_KERBEROS */
#ifdef HAVE_GSSAPI
- if (CVSroot_method == gserver_method)
+ if (current_parsed_root->method == gserver_method)
{
if (! supported_request ("Gssapi-encrypt"))
error (1, 0, "This server does not support encryption");
@@ -4633,7 +4724,7 @@ the :server: access method is not supported by this port of CVS");
ability to decrypt the data stream is itself a form of
authentication. */
#ifdef HAVE_GSSAPI
- if (CVSroot_method == gserver_method)
+ if (current_parsed_root->method == gserver_method)
{
if (! supported_request ("Gssapi-authenticate"))
error (1, 0,
@@ -4740,13 +4831,13 @@ start_rsh_server (tofdp, fromfdp)
#endif /* RSH_NEEDS_BINARY_FLAG */
/* Then we strcat more things on the end one by one. */
- if (CVSroot_username != NULL)
+ if (current_parsed_root->username != NULL)
{
rsh_argv[i++] = "-l";
- rsh_argv[i++] = CVSroot_username;
+ rsh_argv[i++] = current_parsed_root->username;
}
- rsh_argv[i++] = CVSroot_hostname;
+ rsh_argv[i++] = current_parsed_root->hostname;
rsh_argv[i++] = cvs_server;
rsh_argv[i++] = "server";
@@ -4756,6 +4847,8 @@ start_rsh_server (tofdp, fromfdp)
if (trace)
{
fprintf (stderr, " -> Starting server: ");
+ for (i = 0; rsh_argv[i]; i++)
+ fprintf (stderr, "%s ", rsh_argv[i]);
putc ('\n', stderr);
}
@@ -4793,7 +4886,7 @@ start_rsh_server (tofdp, fromfdp)
versions of rsh that grab switches out of the middle of the
command (they're calling the GNU getopt routines incorrectly). */
command = xmalloc (strlen (cvs_server)
- + strlen (CVSroot_directory)
+ + strlen (current_parsed_root->directory)
+ 50);
/* If you are running a very old (Nov 3, 1994, before 1.5)
@@ -4807,15 +4900,15 @@ start_rsh_server (tofdp, fromfdp)
char **p = argv;
*p++ = cvs_rsh;
- *p++ = CVSroot_hostname;
+ *p++ = current_parsed_root->hostname;
/* If the login names differ between client and server
* pass it on to rsh.
*/
- if (CVSroot_username != NULL)
+ if (current_parsed_root->username != NULL)
{
*p++ = "-l";
- *p++ = CVSroot_username;
+ *p++ = current_parsed_root->username;
}
*p++ = command;
@@ -5542,7 +5635,7 @@ send_files (argc, argv, local, aflag, flags)
* latter case; I don't think toplevel_repos matters for the
* former.
*/
- toplevel_repos = xstrdup (CVSroot_directory);
+ toplevel_repos = xstrdup (current_parsed_root->directory);
send_repository ("", toplevel_repos, ".");
}
@@ -5661,7 +5754,7 @@ client_import_done ()
*/
/* FIXME: "can't happen" now that we call client_import_setup
at the beginning. */
- toplevel_repos = xstrdup (CVSroot_directory);
+ toplevel_repos = xstrdup (current_parsed_root->directory);
send_repository ("", toplevel_repos, ".");
}
@@ -5841,9 +5934,9 @@ client_senddate (date)
void
send_init_command ()
{
- /* This is here because we need the CVSroot_directory variable. */
+ /* This is here because we need the current_parsed_root->directory variable. */
send_to_server ("init ", 0);
- send_to_server (CVSroot_directory, 0);
+ send_to_server (current_parsed_root->directory, 0);
send_to_server ("\012", 0);
}
diff --git a/gnu/usr.bin/cvs/src/commit.c b/gnu/usr.bin/cvs/src/commit.c
index 1c1f71c48a3..149da7cb74d 100644
--- a/gnu/usr.bin/cvs/src/commit.c
+++ b/gnu/usr.bin/cvs/src/commit.c
@@ -85,13 +85,13 @@ static time_t last_register_time;
static const char *const commit_usage[] =
{
"Usage: %s %s [-nRlf] [-m msg | -F logfile] [-r rev] files...\n",
- "\t-n\tDo not run the module program (if any).\n",
- "\t-R\tProcess directories recursively.\n",
- "\t-l\tLocal directory only (not recursive).\n",
- "\t-f\tForce the file to be committed; disables recursion.\n",
- "\t-F file\tRead the log message from file.\n",
- "\t-m msg\tLog message.\n",
- "\t-r rev\tCommit to this branch or trunk revision.\n",
+ " -n Do not run the module program (if any).\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
};
@@ -344,7 +344,7 @@ commit (argc, argv)
if (geteuid () == (uid_t) 0
# ifdef CLIENT_SUPPORT
/* Who we are on the client side doesn't affect logging. */
- && !client_active
+ && !current_parsed_root->isremote
# endif
)
{
@@ -432,7 +432,7 @@ commit (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
struct find_data find_args;
@@ -591,8 +591,7 @@ commit (argc, argv)
char *fname;
FILE *fp;
- fname = cvs_temp_name ();
- fp = CVS_FOPEN (fname, "w+");
+ 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)
@@ -601,6 +600,7 @@ commit (argc, argv)
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;
}
@@ -615,7 +615,7 @@ commit (argc, argv)
wrap_setup ();
- lock_tree_for_write (argc, argv, local, aflag);
+ lock_tree_for_write (argc, argv, local, W_LOCAL, aflag);
/*
* Set up the master update list and hard link list
@@ -663,11 +663,15 @@ commit (argc, argv)
Lock_Cleanup ();
dellist (&mulist);
+#ifdef SERVER_SUPPORT
+ if (server_active)
+ return err;
+#endif
+
/* see if we need to sleep before returning to avoid time-stamp races */
if (last_register_time)
{
- while (time ((time_t *) NULL) == last_register_time)
- sleep (1);
+ sleep_past (last_register_time);
}
return (err);
@@ -778,7 +782,7 @@ check_fileproc (callerdat, finfo)
struct commit_info *ci;
struct logfile_info *li;
- size_t cvsroot_len = strlen (CVSroot_directory);
+ size_t cvsroot_len = strlen (current_parsed_root->directory);
if (!finfo->repository)
{
@@ -786,7 +790,7 @@ check_fileproc (callerdat, finfo)
return (1);
}
- if (strncmp (finfo->repository, CVSroot_directory, cvsroot_len) == 0
+ if (strncmp (finfo->repository, current_parsed_root->directory, cvsroot_len) == 0
&& ISDIRSEP (finfo->repository[cvsroot_len])
&& strncmp (finfo->repository + cvsroot_len + 1,
CVSROOTADM,
@@ -810,9 +814,7 @@ check_fileproc (callerdat, finfo)
switch (status)
{
case T_CHECKOUT:
-#ifdef SERVER_SUPPORT
case T_PATCH:
-#endif
case T_NEEDS_MERGE:
case T_CONFLICT:
case T_REMOVE_ENTRY:
@@ -829,7 +831,7 @@ check_fileproc (callerdat, finfo)
* Also,
* - if status is T_REMOVED, can't have a numeric tag
* - if status is T_ADDED, rcs file must not exist unless on
- * a branch
+ * 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
@@ -926,29 +928,17 @@ warning: file `%s' seems to still contain conflict indicators",
{
if (vers->tag == NULL)
{
- char *rcs;
-
- rcs = xmalloc (strlen (finfo->repository)
- + strlen (finfo->file)
- + sizeof RCSEXT
- + 5);
-
- /* Don't look in the attic; if it exists there we
- will move it back out in checkaddfile. */
- sprintf(rcs, "%s/%s%s", finfo->repository, finfo->file,
- RCSEXT);
- if (isreadable (rcs))
+ 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, rcs);
+ finfo->fullname, finfo->rcs->path);
freevers_ts (&vers);
- free (rcs);
return (1);
}
- free (rcs);
}
- if (vers->tag && isdigit ((unsigned char) *vers->tag) &&
+ else if (isdigit ((unsigned char) *vers->tag) &&
numdots (vers->tag) > 1)
{
error (0, 0,
@@ -1311,6 +1301,12 @@ commit_fileproc (callerdat, finfo)
/* 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 = xmalloc (20);
@@ -1430,12 +1426,12 @@ commit_filesdoneproc (callerdat, err, repository, update_dir, entries)
{
char *p;
- if (strncmp (CVSroot_directory, repository,
- strlen (CVSroot_directory)) != 0)
+ 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, CVSroot_directory);
- p = repository + strlen (CVSroot_directory);
+ repository, current_parsed_root->directory);
+ p = repository + strlen (current_parsed_root->directory);
if (*p == '/')
++p;
if (strcmp ("CVSROOT", p) == 0
@@ -1596,19 +1592,13 @@ findmaxrev (p, closure)
Node *p;
void *closure;
{
- char *cp;
int thisrev;
Entnode *entdata;
entdata = (Entnode *) p->data;
if (entdata->type != ENT_FILE)
return (0);
- cp = strchr (entdata->version, '.');
- if (cp != NULL)
- *cp = '\0';
thisrev = atoi (entdata->version);
- if (cp != NULL)
- *cp = '.';
if (thisrev > maxrev)
maxrev = thisrev;
return (0);
@@ -1956,10 +1946,8 @@ checkaddfile (file, repository, tag, options, rcsnode)
Attic. */
if (!(rcsfile->flags & INATTIC))
{
- error (0, 0, "internal error: confused about attic for %s",
+ error (0, 0, "warning: expected %s to be in Attic",
rcsfile->path);
- retval = 1;
- goto out;
}
sprintf (rcs, "%s/%s%s", repository, file, RCSEXT);
diff --git a/gnu/usr.bin/cvs/src/cvs.h b/gnu/usr.bin/cvs/src/cvs.h
index 40892ceb3fb..961e02c5240 100644
--- a/gnu/usr.bin/cvs/src/cvs.h
+++ b/gnu/usr.bin/cvs/src/cvs.h
@@ -316,7 +316,7 @@ typedef struct entnode Entnode;
/* The type of request that is being done in do_module() */
enum mtype
{
- CHECKOUT, TAG, PATCH, EXPORT
+ CHECKOUT, TAG, PATCH, EXPORT, MISC
};
/*
@@ -369,28 +369,34 @@ extern char *RCS_citag;
/* Access method specified in CVSroot. */
typedef enum {
- local_method, server_method, pserver_method, kserver_method, gserver_method,
+ null_method, local_method, server_method, pserver_method, kserver_method, gserver_method,
ext_method, fork_method
} CVSmethod;
extern char *method_names[]; /* 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 *username; /* the username or NULL if method == local */
+ char *password; /* the username or NULL if method == local */
+ char *hostname; /* the hostname or NULL if method == local */
+ int port; /* the port or zero if method == local */
+ char *directory; /* the directory name */
+#ifdef CLIENT_SUPPORT
+ unsigned char isremote; /* nonzero if we are doing remote access */
+#endif /* CLIENT_SUPPORT */
+} cvsroot_t;
+
/* 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;
-extern char *CVSroot_original; /* the active, complete CVSroot string */
-extern int client_active; /* nonzero if we are doing remote access */
-extern CVSmethod CVSroot_method; /* one of the enum values above */
-extern char *CVSroot_username; /* the username or NULL if method == local */
-extern char *CVSroot_hostname; /* the hostname or NULL if method == local */
-extern char *CVSroot_directory; /* the directory name */
-
/* These variables keep track of all of the CVSROOT directories that
have been seen by the client and the current one of those selected. */
extern List *root_directories;
-extern char *current_root;
+extern cvsroot_t *current_parsed_root;
extern char *emptydir_name PROTO ((void));
extern int safe_location PROTO ((void));
@@ -426,8 +432,9 @@ extern int RCS_exec_rcsdiff PROTO ((RCSNode *rcsfile,
char *rev1, char *rev2,
char *label1, char *label2,
char *workfile));
-extern int diff_exec PROTO ((char *file1, char *file2, char *options,
- char *out));
+extern int diff_exec PROTO ((char *file1, char *file2,
+ char *label1, char *label2,
+ char *options, char *out));
extern int diff_execv PROTO ((char *file1, char *file2,
char *label1, char *label2,
char *options, char *out));
@@ -447,15 +454,18 @@ void Subdir_Deregister PROTO((List *, const char *, const char *));
char *Make_Date PROTO((char *rawdate));
char *date_from_time_t PROTO ((time_t));
-void date_to_internet PROTO ((char *, char *));
+void date_to_internet PROTO ((char *, const char *));
+void date_to_tm PROTO ((struct tm *, const char *));
+void tm_to_internet PROTO ((char *, const struct tm *));
char *Name_Repository PROTO((char *dir, char *update_dir));
char *Short_Repository PROTO((char *repository));
void Sanitize_Repository_Name PROTO((char *repository));
char *Name_Root PROTO((char *dir, char *update_dir));
-int parse_cvsroot PROTO((char *CVSroot));
-void set_local_cvsroot PROTO((char *dir));
+void free_cvsroot_t PROTO((cvsroot_t *root_in));
+cvsroot_t *parse_cvsroot PROTO((char *root));
+cvsroot_t *local_cvsroot PROTO((char *dir));
void Create_Root PROTO((char *dir, char *rootdir));
void root_allow_add PROTO ((char *));
void root_allow_free PROTO ((void));
@@ -469,6 +479,7 @@ char *time_stamp PROTO((char *file));
void *xmalloc PROTO((size_t bytes));
void *xrealloc PROTO((void *ptr, size_t bytes));
void expand_string PROTO ((char **, size_t *, size_t));
+void allocate_and_strcat PROTO ((char **, size_t *, const char *));
char *xstrdup PROTO((const char *str));
void strip_trailing_newlines PROTO((char *str));
int pathname_levels PROTO ((char *path));
@@ -491,6 +502,7 @@ char *xreadlink PROTO((const char *link));
char *last_component PROTO((char *path));
char *get_homedir PROTO ((void));
char *cvs_temp_name PROTO ((void));
+FILE *cvs_temp_file PROTO ((char **filename));
int numdots PROTO((const char *s));
char *increment_revnum PROTO ((const char *));
@@ -514,7 +526,8 @@ void Lock_Cleanup PROTO((void));
/* Writelock an entire subtree, well the part specified by ARGC, ARGV, LOCAL,
and AFLAG, anyway. */
-void lock_tree_for_write PROTO ((int argc, char **argv, int local, int aflag));
+void lock_tree_for_write PROTO ((int argc, char **argv, int local, int which,
+ int aflag));
/* See lock.c for description. */
extern void lock_dir_for_write PROTO ((char *));
@@ -551,7 +564,6 @@ void make_directories PROTO((const char *name));
void make_directory PROTO((const char *name));
extern int mkdir_if_needed PROTO ((char *name));
void rename_file PROTO((const char *from, const char *to));
-char *backup_file PROTO((const char *file, const char *suffix));
/* 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
@@ -631,7 +643,8 @@ extern int init PROTO ((int argc, char **argv));
int do_module PROTO((DBM * db, char *mname, enum mtype m_type, char *msg,
CALLBACKPROC callback_proc, char *where, int shorten,
- int local_specified, int run_module_prog, char *extra_arg));
+ int local_specified, int run_module_prog, int build_dirs,
+ char *extra_arg));
void history_write PROTO((int type, char *update_dir, char *revs, char *name,
char *repository));
int start_recursion PROTO((FILEPROC fileproc, FILESDONEPROC filesdoneproc,
@@ -649,7 +662,10 @@ char *make_message_rcslegal PROTO((char *message));
extern int file_has_markers PROTO ((const struct file_info *));
extern void get_file PROTO ((const char *, const char *, const char *,
char **, size_t *, size_t *));
+extern char *shell_escape PROTO((char *buf, const char *str));
+char *backup_file PROTO((const char *file, const char *suffix));
extern void resolve_symlink PROTO ((char **filename));
+void sleep_past PROTO ((time_t desttime));
/* flags for run_exec(), the fast system() for CVS */
#define RUN_NORMAL 0x0000 /* no special behaviour */
@@ -779,9 +795,7 @@ enum classify_type
T_REMOVED, /* R (removed file) list */
T_REMOVE_ENTRY, /* W (removed entry) list */
T_UPTODATE, /* File is up-to-date */
-#ifdef SERVER_SUPPORT
T_PATCH, /* P Like C, but can patch */
-#endif
T_TITLE /* title for node type */
};
typedef enum classify_type Ctype;
@@ -871,6 +885,8 @@ char *descramble PROTO ((char *str));
#ifdef AUTH_CLIENT_SUPPORT
char *get_cvs_password PROTO((void));
+int get_cvs_port_number PROTO((const cvsroot_t *root));
+char *normalize_cvsroot PROTO((const cvsroot_t *root));
#endif /* AUTH_CLIENT_SUPPORT */
extern void tag_check_valid PROTO ((char *, int, char **, int, int, char *));
diff --git a/gnu/usr.bin/cvs/src/cvsbug.sh b/gnu/usr.bin/cvs/src/cvsbug.sh
deleted file mode 100644
index b47597f93cd..00000000000
--- a/gnu/usr.bin/cvs/src/cvsbug.sh
+++ /dev/null
@@ -1,538 +0,0 @@
-#!/bin/sh
-# Submit a problem report to a GNATS site.
-# Copyright (C) 1993 Free Software Foundation, Inc.
-# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a
-# version written by Heinz G. Seidl (hgs@ide.com).
-#
-# This file is part of GNU GNATS.
-# Modified by Berliner for CVS.
-# Modified by Jim Blandy for CVS 1.5.
-# $CVSid: @(#)cvsbug.sh 1.2 94/10/22 $
-#
-# GNU GNATS 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.
-#
-# GNU GNATS 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 GNU GNATS; see the file COPYING. If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# The version of this send-pr.
-VERSION=3.2
-
-# The submitter-id for your site.
-SUBMITTER=net
-
-## # Where the GNATS directory lives, if at all.
-## [ -z "$GNATS_ROOT" ] &&
-## GNATS_ROOT=/usr/local/lib/gnats/gnats-db
-
-# The default mail address for PR submissions.
-GNATS_ADDR=bug-cvs@prep.ai.mit.edu
-
-## # Where the gnats category tree lives.
-## DATADIR=/usr/local/lib
-
-## # If we've been moved around, try using GCC_EXEC_PREFIX.
-## [ ! -d $DATADIR/gnats -a -d "$GCC_EXEC_PREFIX" ] && DATADIR=${GCC_EXEC_PREFIX}..
-
-# The default release for this host.
-DEFAULT_RELEASE="post-cvs-1.5"
-
-# The default organization.
-DEFAULT_ORGANIZATION="net"
-
-## # The default site to look for.
-## GNATS_SITE=unknown
-
-## # Newer config information?
-## [ -f ${GNATS_ROOT}/gnats-adm/config ] && . ${GNATS_ROOT}/gnats-adm/config
-
-# What mailer to use. This must come after the config file, since it is
-# host-dependent.
-if [ -f /usr/sbin/sendmail ]; then
- MAIL_AGENT="/usr/sbin/sendmail -oi -t"
-else
- MAIL_AGENT="/usr/lib/sendmail -oi -t"
-fi
-MAILER=`echo $MAIL_AGENT | sed -e 's, .*,,'`
-if [ ! -f "$MAILER" ] ; then
- echo "$COMMAND: Cannot file mail program \"$MAILER\"."
- echo "$COMMAND: Please fix the MAIL_AGENT entry in the $COMMAND file."
- exit 1
-fi
-
-if test "`echo -n foo`" = foo ; then
- ECHON=bsd
-elif test "`echo 'foo\c'`" = foo ; then
- ECHON=sysv
-else
- ECHON=none
-fi
-
-if [ $ECHON = bsd ] ; then
- ECHON1="echo -n"
- ECHON2=
-elif [ $ECHON = sysv ] ; then
- ECHON1=echo
- ECHON2='\c'
-else
- ECHON1=echo
- ECHON2=
-fi
-
-#
-
-[ -z "$TMPDIR" ] && TMPDIR=/tmp
-
-TEMP=$TMPDIR/p$$
-BAD=$TMPDIR/pbad$$
-REF=$TMPDIR/pf$$
-
-if [ -z "$LOGNAME" -a -n "$USER" ]; then
- LOGNAME=$USER
-fi
-
-FROM="$LOGNAME"
-REPLY_TO="$LOGNAME"
-
-# Find out the name of the originator of this PR.
-if [ -n "$NAME" ]; then
- ORIGINATOR="$NAME"
-elif [ -f $HOME/.fullname ]; then
- ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
-elif [ -f /bin/domainname ]; then
- if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then
- # Must use temp file due to incompatibilities in quoting behavior
- # and to protect shell metacharacters in the expansion of $LOGNAME
- /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
- cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
- ORIGINATOR="`cat $TEMP`"
- rm -f $TEMP
- fi
-fi
-
-if [ "$ORIGINATOR" = "" ]; then
- grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
- ORIGINATOR="`cat $TEMP`"
- rm -f $TEMP
-fi
-
-if [ -n "$ORGANIZATION" ]; then
- if [ -f "$ORGANIZATION" ]; then
- ORGANIZATION="`cat $ORGANIZATION`"
- fi
-else
- if [ -n "$DEFAULT_ORGANIZATION" ]; then
- ORGANIZATION="$DEFAULT_ORGANIZATION"
- elif [ -f $HOME/.organization ]; then
- ORGANIZATION="`cat $HOME/.organization`"
- elif [ -f $HOME/.signature ]; then
- ORGANIZATION="`cat $HOME/.signature`"
- fi
-fi
-
-# If they don't have a preferred editor set, then use
-if [ -z "$VISUAL" ]; then
- if [ -z "$EDITOR" ]; then
- EDIT=vi
- else
- EDIT="$EDITOR"
- fi
-else
- EDIT="$VISUAL"
-fi
-
-# Find out some information.
-SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
- ( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
-ARCH=`[ -f /bin/arch ] && /bin/arch`
-MACHINE=`[ -f /bin/machine ] && /bin/machine`
-
-COMMAND=`echo $0 | sed -e 's,.*/,,'`
-## USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--request-id]
-USAGE="Usage: $COMMAND [-PVL]
-[--version]"
-REMOVE=
-BATCH=
-
-while [ $# -gt 0 ]; do
- case "$1" in
- -r) ;; # Ignore for backward compat.
-## -t | --to) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi
-## shift ; GNATS_ADDR="$1"
-## EXPLICIT_GNATS_ADDR=true
-## ;;
-## -f | --file) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi
-## shift ; IN_FILE="$1"
-## if [ "$IN_FILE" != "-" -a ! -r "$IN_FILE" ]; then
-## echo "$COMMAND: cannot read $IN_FILE"
-## exit 1
-## fi
-## ;;
- -b | --batch) BATCH=true ;;
- -p | -P | --print) PRINT=true ;;
- -L | --list) FORMAT=norm ;;
- -l | -CL | --lisp) FORMAT=lisp ;;
-## --request-id) REQUEST_ID=true ;;
- -h | --help) echo "$USAGE"; exit 0 ;;
- -V | --version) echo "$VERSION"; exit 0 ;;
- -*) echo "$USAGE" ; exit 1 ;;
- *) echo "$USAGE" ; exit 1
-## if [ -z "$USER_GNATS_SITE" ]; then
-## if [ ! -r "$DATADIR/gnats/$1" ]; then
-## echo "$COMMAND: the GNATS site $1 does not have a categories list."
-## exit 1
-## else
-## # The site name is the alias they'll have to have created.
-## USER_GNATS_SITE=$1
-## fi
-## else
-## echo "$USAGE" ; exit 1
-## fi
- ;;
- esac
- shift
-done
-
-if [ -n "$USER_GNATS_SITE" ]; then
- GNATS_SITE=$USER_GNATS_SITE
- GNATS_ADDR=$USER_GNATS_SITE-gnats
-fi
-
-if [ "$SUBMITTER" = "unknown" -a -z "$REQUEST_ID" -a -z "$IN_FILE" ]; then
- cat << '__EOF__'
-It seems that send-pr is not installed with your unique submitter-id.
-You need to run
-
- install-sid YOUR-SID
-
-where YOUR-SID is the identification code you received with `send-pr'.
-`send-pr' will automatically insert this value into the template field
-`>Submitter-Id'. If you've downloaded `send-pr' from the Net, use `net'
-for this value. If you do not know your id, run `send-pr --request-id' to
-get one from your support site.
-__EOF__
- exit 1
-fi
-
-## if [ -r "$DATADIR/gnats/$GNATS_SITE" ]; then
-## CATEGORIES=`grep -v '^#' $DATADIR/gnats/$GNATS_SITE | sort`
-## else
-## echo "$COMMAND: could not read $DATADIR/gnats/$GNATS_SITE for categories list."
-## exit 1
-## fi
-CATEGORIES="contrib cvs doc pcl-cvs portability"
-
-if [ -z "$CATEGORIES" ]; then
- echo "$COMMAND: the categories list for $GNATS_SITE was empty!"
- exit 1
-fi
-
-case "$FORMAT" in
- lisp) echo "$CATEGORIES" | \
- awk 'BEGIN {printf "( "} {printf "(\"%s\") ",$0} END {printf ")\n"}'
- exit 0
- ;;
- norm) l=`echo "$CATEGORIES" | \
- awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } }
- END {print max + 1;}'`
- c=`expr 70 / $l`
- if [ $c -eq 0 ]; then c=1; fi
- echo "$CATEGORIES" | \
- awk 'BEGIN {print "Known categories:"; i = 0 }
- { printf ("%-'$l'.'$l's", $0); if ((++i % '$c') == 0) { print "" } }
- END { print ""; }'
- exit 0
- ;;
-esac
-
-ORIGINATOR_C='<name of the PR author (one line)>'
-ORGANIZATION_C='<organization of PR author (multiple lines)>'
-CONFIDENTIAL_C='<[ yes | no ] (one line)>'
-SYNOPSIS_C='<synopsis of the problem (one line)>'
-SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
-PRIORITY_C='<[ low | medium | high ] (one line)>'
-CATEGORY_C='<name of the product (one line)>'
-CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
-RELEASE_C='<release number or tag (one line)>'
-ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
-DESCRIPTION_C='<precise description of the problem (multiple lines)>'
-HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
-FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
-
-# Catch some signals. ($xs kludge needed by Sun /bin/sh)
-xs=0
-trap 'rm -f $REF $TEMP; exit $xs' 0
-trap 'echo "$COMMAND: Aborting ..."; rm -f $REF $TEMP; xs=1; exit' 1 2 3 13 15
-
-# If they told us to use a specific file, then do so.
-if [ -n "$IN_FILE" ]; then
- if [ "$IN_FILE" = "-" ]; then
- # The PR is coming from the standard input.
- if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
- sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" > $TEMP
- else
- cat > $TEMP
- fi
- else
- # Use the file they named.
- if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
- sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" $IN_FILE > $TEMP
- else
- cat $IN_FILE > $TEMP
- fi
- fi
-else
-
- if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
- # If their PR_FORM points to a bogus entry, then bail.
- if [ ! -f "$PR_FORM" -o ! -r "$PR_FORM" -o ! -s "$PR_FORM" ]; then
- echo "$COMMAND: can't seem to read your template file (\`$PR_FORM'), ignoring PR_FORM"
- sleep 1
- PRINT_INTERN=bad_prform
- fi
- fi
-
- if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
- cp $PR_FORM $TEMP ||
- ( echo "$COMMAND: could not copy $PR_FORM" ; xs=1; exit )
- else
- for file in $TEMP $REF ; do
- cat > $file << '__EOF__'
-SEND-PR: -*- send-pr -*-
-SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
-SEND-PR: will all comments (text enclosed in `<' and `>').
-SEND-PR:
-SEND-PR: Choose from the following categories:
-SEND-PR:
-__EOF__
-
- # Format the categories so they fit onto lines.
- l=`echo "$CATEGORIES" | \
- awk 'BEGIN {max = 0; } { if (length($0) > max) { max = length($0); } }
- END {print max + 1;}'`
- c=`expr 61 / $l`
- if [ $c -eq 0 ]; then c=1; fi
- echo "$CATEGORIES" | \
- awk 'BEGIN {printf "SEND-PR: "; i = 0 }
- { printf ("%-'$l'.'$l's", $0);
- if ((++i % '$c') == 0) { printf "\nSEND-PR: " } }
- END { printf "\nSEND-PR:\n"; }' >> $file
-
- cat >> $file << __EOF__
-To: $GNATS_ADDR
-Subject:
-From: $FROM
-Reply-To: $REPLY_TO
-X-send-pr-version: $VERSION
-
-
->Submitter-Id: $SUBMITTER
->Originator: $ORIGINATOR
->Organization:
-`
- if [ -n "$ORGANIZATION" ]; then
- echo "$ORGANIZATION"
- else
- echo " $ORGANIZATION_C" ;
- fi ;
-`
->Confidential: $CONFIDENTIAL_C
->Synopsis: $SYNOPSIS_C
->Severity: $SEVERITY_C
->Priority: $PRIORITY_C
->Category: $CATEGORY_C
->Class: $CLASS_C
->Release: `if [ -n "$DEFAULT_RELEASE" ]; then
- echo "$DEFAULT_RELEASE"
- else
- echo " $RELEASE_C"
- fi; `
->Environment:
- $ENVIRONMENT_C
-`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
-`[ -n "$ARCH" ] && echo Architecture: $ARCH`
-`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
->Description:
- $DESCRIPTION_C
->How-To-Repeat:
- $HOW_TO_REPEAT_C
->Fix:
- $FIX_C
-__EOF__
- done
- fi
-
- if [ "$PRINT" = true -o "$PRINT_INTERN" = true ]; then
- cat $TEMP
- xs=0; exit
- fi
-
- chmod u+w $TEMP
- if [ -z "$REQUEST_ID" ]; then
- eval $EDIT $TEMP
- else
- ed -s $TEMP << '__EOF__'
-/^Subject/s/^Subject:.*/Subject: request for a customer id/
-/^>Category/s/^>Category:.*/>Category: send-pr/
-w
-q
-__EOF__
- fi
-
- if cmp -s $REF $TEMP ; then
- echo "$COMMAND: problem report not filled out, therefore not sent"
- xs=1; exit
- fi
-fi
-
-#
-# Check the enumeration fields
-
-# This is a "sed-subroutine" with one keyword parameter
-# (with workaround for Sun sed bug)
-#
-SED_CMD='
-/$PATTERN/{
-s|||
-s|<.*>||
-s|^[ ]*||
-s|[ ]*$||
-p
-q
-}'
-
-
-while [ -z "$REQUEST_ID" ]; do
- CNT=0
-
- # 1) Confidential
- #
- PATTERN=">Confidential:"
- CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
- case "$CONFIDENTIAL" in
- ""|yes|no) CNT=`expr $CNT + 1` ;;
- *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;;
- esac
- #
- # 2) Severity
- #
- PATTERN=">Severity:"
- SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
- case "$SEVERITY" in
- ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
- *) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
- esac
- #
- # 3) Priority
- #
- PATTERN=">Priority:"
- PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
- case "$PRIORITY" in
- ""|low|medium|high) CNT=`expr $CNT + 1` ;;
- *) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
- esac
- #
- # 4) Category
- #
- PATTERN=">Category:"
- CATEGORY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
- FOUND=
- for C in $CATEGORIES
- do
- if [ "$C" = "$CATEGORY" ]; then FOUND=true ; break ; fi
- done
- if [ -n "$FOUND" ]; then
- CNT=`expr $CNT + 1`
- else
- if [ -z "$CATEGORY" ]; then
- echo "$COMMAND: you must include a Category: field in your report."
- else
- echo "$COMMAND: \`$CATEGORY' is not a known category."
- fi
- fi
- #
- # 5) Class
- #
- PATTERN=">Class:"
- CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
- case "$CLASS" in
- ""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
- *) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
- esac
-
- [ $CNT -lt 5 -a -z "$BATCH" ] &&
- echo "Errors were found with the problem report."
-
- while true; do
- if [ -z "$BATCH" ]; then
- $ECHON1 "a)bort, e)dit or s)end? $ECHON2"
- read input
- else
- if [ $CNT -eq 5 ]; then
- input=s
- else
- input=a
- fi
- fi
- case "$input" in
- a*)
- if [ -z "$BATCH" ]; then
- echo "$COMMAND: the problem report remains in $BAD and is not sent."
- mv $TEMP $BAD
- else
- echo "$COMMAND: the problem report is not sent."
- fi
- xs=1; exit
- ;;
- e*)
- eval $EDIT $TEMP
- continue 2
- ;;
- s*)
- break 2
- ;;
- esac
- done
-done
-#
-# Remove comments and send the problem report
-# (we have to use patterns, where the comment contains regex chars)
-#
-# /^>Originator:/s;$ORIGINATOR;;
-sed -e "
-/^SEND-PR:/d
-/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
-/^>Confidential:/s;<.*>;;
-/^>Synopsis:/s;$SYNOPSIS_C;;
-/^>Severity:/s;<.*>;;
-/^>Priority:/s;<.*>;;
-/^>Category:/s;$CATEGORY_C;;
-/^>Class:/s;<.*>;;
-/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
-/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
-/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
-/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
-/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
-" $TEMP > $REF
-
-if $MAIL_AGENT < $REF; then
- echo "$COMMAND: problem report sent"
- xs=0; exit
-else
- echo "$COMMAND: mysterious mail failure."
- if [ -z "$BATCH" ]; then
- echo "$COMMAND: the problem report remains in $BAD and is not sent."
- mv $REF $BAD
- else
- echo "$COMMAND: the problem report is not sent."
- fi
- xs=1; exit
-fi
diff --git a/gnu/usr.bin/cvs/src/ignore.c b/gnu/usr.bin/cvs/src/ignore.c
index ebcdf853754..b04d10e932b 100644
--- a/gnu/usr.bin/cvs/src/ignore.c
+++ b/gnu/usr.bin/cvs/src/ignore.c
@@ -68,13 +68,13 @@ ign_setup ()
processing, and only if !ign_inhibit_server), letting the server
know about the files and letting it decide whether to ignore
them based on CVSROOOTADM_IGNORE. */
- if (!client_active)
+ if (!current_parsed_root->isremote)
#endif
{
- char *file = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM)
+ char *file = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM)
+ sizeof (CVSROOTADM_IGNORE) + 10);
/* Then add entries found in repository, if it exists */
- (void) sprintf (file, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (file, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_IGNORE);
ign_add_file (file, 0);
free (file);
@@ -379,6 +379,8 @@ ignore_files (ilist, entries, update_dir, proc)
struct stat sb;
char *file;
char *xdir;
+ List *files;
+ Node *p;
/* Set SUBDIRS if we have subdirectory information in ENTRIES. */
if (entries == NULL)
@@ -407,14 +409,16 @@ ignore_files (ilist, entries, update_dir, proc)
ign_add_file (CVSDOTIGNORE, 1);
wrap_add_file (CVSDOTWRAPPER, 1);
- errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ /* Make a list for the files. */
+ files = getlist ();
+
+ while (errno = 0, (dp = CVS_READDIR (dirp)) != NULL)
{
file = dp->d_name;
if (strcmp (file, ".") == 0 || strcmp (file, "..") == 0)
- goto continue_loop;
+ continue;
if (findnode_fn (ilist, file) != NULL)
- goto continue_loop;
+ continue;
if (subdirs)
{
Node *node;
@@ -435,14 +439,14 @@ ignore_files (ilist, entries, update_dir, proc)
dir = isdir (p);
free (p);
if (dir)
- goto continue_loop;
+ continue;
}
}
/* We could be ignoring FIFOs and other files which are neither
regular files nor directories here. */
if (ign_name (file))
- goto continue_loop;
+ continue;
if (
#ifdef DT_DIR
@@ -469,7 +473,7 @@ ignore_files (ilist, entries, update_dir, proc)
if (isdir (temp))
{
free (temp);
- goto continue_loop;
+ continue;
}
free (temp);
}
@@ -484,16 +488,22 @@ ignore_files (ilist, entries, update_dir, proc)
#endif
)
{
- goto continue_loop;
+ continue;
}
#endif
- }
+ }
- (*proc) (file, xdir);
- continue_loop:
- errno = 0;
+ p = getnode ();
+ p->type = FILES;
+ p->key = xstrdup (file);
+ (void) addnode (files, p);
}
if (errno != 0)
error (0, errno, "error reading current directory");
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
+
+ sortlist (files, fsortcmp);
+ for (p = files->list->next; p != files->list; p = p->next)
+ (*proc) (p->key, xdir);
+ dellist (&files);
}
diff --git a/gnu/usr.bin/cvs/src/import.c b/gnu/usr.bin/cvs/src/import.c
index 3387914fb02..833c74e2434 100644
--- a/gnu/usr.bin/cvs/src/import.c
+++ b/gnu/usr.bin/cvs/src/import.c
@@ -171,16 +171,17 @@ import (argc, argv)
if (! isabsolute (argv[0])
&& pathname_levels (argv[0]) == 0)
{
- if (CVSroot_directory == NULL)
+ 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 = xmalloc (strlen (CVSroot_directory) + strlen (argv[0])
- + 10);
- (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]);
- repos_len = strlen (CVSroot_directory);
+ repository = xmalloc (strlen (current_parsed_root->directory)
+ + strlen (argv[0])
+ + 2);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
+ repos_len = strlen (current_parsed_root->directory);
}
else
{
@@ -207,7 +208,7 @@ import (argc, argv)
*cp = '\0';
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* For rationale behind calling start_server before do_editor, see
commit.c */
@@ -236,7 +237,7 @@ import (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int err;
@@ -290,8 +291,7 @@ import (argc, argv)
make_directories (repository);
/* Create the logfile that will be logged upon completion */
- tmpfile = cvs_temp_name ();
- if ((logfp = CVS_FOPEN (tmpfile, "w+")) == NULL)
+ 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
@@ -425,7 +425,7 @@ import_descend (message, vtag, targc, targv)
else
{
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (strcmp (dp->d_name, ".") == 0 || strcmp (dp->d_name, "..") == 0)
goto one_more_time_boys;
@@ -476,7 +476,7 @@ import_descend (message, vtag, targc, targv)
else
{
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
err += client_process_import_file (message, dp->d_name,
vtag, targc, targv,
repository,
@@ -496,7 +496,7 @@ import_descend (message, vtag, targc, targv)
error (0, errno, "cannot read directory");
++err;
}
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
}
if (dirlist != NULL)
@@ -1567,7 +1567,7 @@ import_descend_dir (message, dir, vtag, targc, targv)
}
#ifdef CLIENT_SUPPORT
- if (!quiet && !client_active)
+ if (!quiet && !current_parsed_root->isremote)
#else
if (!quiet)
#endif
@@ -1582,7 +1582,7 @@ import_descend_dir (message, dir, vtag, targc, targv)
goto out;
}
#ifdef CLIENT_SUPPORT
- if (!client_active && !isdir (repository))
+ if (!current_parsed_root->isremote && !isdir (repository))
#else
if (!isdir (repository))
#endif
diff --git a/gnu/usr.bin/cvs/src/lock.c b/gnu/usr.bin/cvs/src/lock.c
index b0c75ab3d93..72f7adbfaed 100644
--- a/gnu/usr.bin/cvs/src/lock.c
+++ b/gnu/usr.bin/cvs/src/lock.c
@@ -172,12 +172,13 @@ lock_name (repository, name)
/* The interesting part of the repository is the part relative
to CVSROOT. */
- assert (CVSroot_directory != NULL);
- assert (strncmp (repository, CVSroot_directory,
- strlen (CVSroot_directory)) == 0);
- short_repos = repository + strlen (CVSroot_directory) + 1;
+ assert (current_parsed_root != NULL);
+ assert (current_parsed_root->directory != NULL);
+ assert (strncmp (repository, current_parsed_root->directory,
+ strlen (current_parsed_root->directory)) == 0);
+ short_repos = repository + strlen (current_parsed_root->directory) + 1;
- if (strcmp (repository, CVSroot_directory) == 0)
+ if (strcmp (repository, current_parsed_root->directory) == 0)
short_repos = ".";
else
assert (short_repos[-1] == '/');
@@ -633,7 +634,7 @@ again:
error (1, 0, "cannot open directory %s", repository);
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (CVS_FNMATCH (CVSRFLPAT, dp->d_name, 0) == 0)
{
@@ -654,7 +655,7 @@ again:
*/
if (now >= (sb.st_ctime + CVSLCKAGE) && CVS_UNLINK (line) != -1)
{
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
free (line);
goto again;
}
@@ -680,7 +681,7 @@ again:
if (errno != 0)
error (0, errno, "error reading directory %s", repository);
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
return (ret);
}
@@ -890,10 +891,11 @@ lock_filesdoneproc (callerdat, err, repository, update_dir, entries)
}
void
-lock_tree_for_write (argc, argv, local, aflag)
+lock_tree_for_write (argc, argv, local, which, aflag)
int argc;
char **argv;
int local;
+ int which;
int aflag;
{
int err;
@@ -904,7 +906,7 @@ lock_tree_for_write (argc, argv, local, aflag)
lock_tree_list = getlist ();
err = start_recursion ((FILEPROC) NULL, lock_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, argc,
- argv, local, W_LOCAL, aflag, 0, (char *) NULL, 0);
+ argv, local, which, aflag, 0, (char *) NULL, 0);
sortlist (lock_tree_list, fsortcmp);
if (Writer_Lock (lock_tree_list) != 0)
error (1, 0, "lock failed - giving up");
diff --git a/gnu/usr.bin/cvs/src/main.c b/gnu/usr.bin/cvs/src/main.c
index 40a0f3bba2c..96fc22fe406 100644
--- a/gnu/usr.bin/cvs/src/main.c
+++ b/gnu/usr.bin/cvs/src/main.c
@@ -66,8 +66,12 @@ char *Editor = EDITOR_DFLT;
List *root_directories = NULL;
/* We step through the above values. This variable is set to reflect
- the currently active value. */
-char *current_root = NULL;
+ * the currently active value.
+ *
+ * Now static. FIXME - this variable should be removable (well, localizable)
+ * with a little more work.
+ */
+static char *current_root = NULL;
static const struct cmd
@@ -98,47 +102,50 @@ static const struct cmd
char *nick2;
int (*func) (); /* Function takes (argc, argv) arguments. */
+ unsigned long attr; /* Attributes. */
} cmds[] =
{
- { "add", "ad", "new", add },
- { "admin", "adm", "rcs", admin },
- { "annotate", "ann", NULL, annotate },
- { "checkout", "co", "get", checkout },
- { "commit", "ci", "com", commit },
- { "diff", "di", "dif", diff },
- { "edit", NULL, NULL, edit },
- { "editors", NULL, NULL, editors },
- { "export", "exp", "ex", checkout },
- { "history", "hi", "his", history },
- { "import", "im", "imp", import },
- { "init", NULL, NULL, init },
+ { "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 }, /* placeholder */
+ { "kserver", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
#endif
- { "log", "lo", "rlog", cvslog },
+ { "log", "lo", NULL, cvslog, CVS_CMD_USES_WORK_DIR },
#ifdef AUTH_CLIENT_SUPPORT
- { "login", "logon", "lgn", login },
- { "logout", NULL, NULL, logout },
+ { "login", "logon", "lgn", login, 0 },
+ { "logout", NULL, NULL, logout, 0 },
#endif /* AUTH_CLIENT_SUPPORT */
#if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && defined(SERVER_SUPPORT)
- { "pserver", NULL, NULL, server }, /* placeholder */
+ { "pserver", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
#endif
- { "rdiff", "patch", "pa", patch },
- { "release", "re", "rel", release },
- { "remove", "rm", "delete", cvsremove },
- { "rtag", "rt", "rfreeze", rtag },
+ { "rannotate","rann", "ra", annotate, 0 },
+ { "rdiff", "patch", "pa", patch, 0 },
+ { "release", "re", "rel", release, 0 },
+ { "remove", "rm", "delete", cvsremove, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "rlog", "rl", NULL, cvslog, 0 },
+ { "rtag", "rt", "rfreeze", cvstag, CVS_CMD_MODIFIES_REPOSITORY },
#ifdef SERVER_SUPPORT
- { "server", NULL, NULL, server },
+ { "server", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
#endif
- { "status", "st", "stat", cvsstatus },
- { "tag", "ta", "freeze", cvstag },
- { "unedit", NULL, NULL, unedit },
- { "update", "up", "upd", update },
- { "version", "ve", "ver", version },
- { "watch", NULL, NULL, watch },
- { "watchers", NULL, NULL, watchers },
- { NULL, NULL, NULL, NULL },
+ { "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[] =
@@ -213,9 +220,11 @@ static const char *const cmd_usage[] =
#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",
" rtag Add a symbolic tag to a module\n",
#ifdef SERVER_SUPPORT
" server Server mode\n",
@@ -224,6 +233,7 @@ static const char *const cmd_usage[] =
" 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",
@@ -318,51 +328,14 @@ unsigned long int
lookup_command_attribute (cmd_name)
char *cmd_name;
{
- unsigned long int ret = 0;
-
- if (strcmp (cmd_name, "import") != 0)
- {
- ret |= CVS_CMD_IGNORE_ADMROOT;
- }
-
-
- /* The following commands do not use a checked-out working
- directory. We conservatively assume that everything else does.
- Feel free to add to this list if you are _certain_ something
- something doesn't use the WD. */
- if ((strcmp (cmd_name, "checkout") != 0) &&
- (strcmp (cmd_name, "init") != 0) &&
- (strcmp (cmd_name, "login") != 0) &&
- (strcmp (cmd_name, "logout") != 0) &&
- (strcmp (cmd_name, "rdiff") != 0) &&
- (strcmp (cmd_name, "release") != 0) &&
- (strcmp (cmd_name, "rtag") != 0))
- {
- ret |= CVS_CMD_USES_WORK_DIR;
- }
-
+ const struct cmd *cm;
- /* The following commands do not modify the repository; we
- conservatively assume that everything else does. Feel free to
- add to this list if you are _certain_ something is safe. */
- if ((strcmp (cmd_name, "annotate") != 0) &&
- (strcmp (cmd_name, "checkout") != 0) &&
- (strcmp (cmd_name, "diff") != 0) &&
- (strcmp (cmd_name, "rdiff") != 0) &&
- (strcmp (cmd_name, "update") != 0) &&
- (strcmp (cmd_name, "editors") != 0) &&
- (strcmp (cmd_name, "export") != 0) &&
- (strcmp (cmd_name, "history") != 0) &&
- (strcmp (cmd_name, "log") != 0) &&
- (strcmp (cmd_name, "noop") != 0) &&
- (strcmp (cmd_name, "watchers") != 0) &&
- (strcmp (cmd_name, "release") != 0) &&
- (strcmp (cmd_name, "status") != 0))
+ for (cm = cmds; cm->fullname; cm++)
{
- ret |= CVS_CMD_MODIFIES_REPOSITORY;
+ if (strcmp (cmd_name, cm->fullname) == 0)
+ break;
}
-
- return ret;
+ return cm->attr;
}
@@ -581,7 +554,7 @@ main (argc, argv)
version (0, (char **) NULL);
(void) fputs ("\n", stdout);
(void) fputs ("\
-Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
+Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\
Jeff Polk, and other authors\n", stdout);
(void) fputs ("\n", stdout);
(void) fputs ("CVS may be copied only under the terms of the GNU General Public License,\n", stdout);
@@ -612,6 +585,8 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
if (CVSroot_cmdline != NULL)
free (CVSroot_cmdline);
CVSroot_cmdline = xstrdup (optarg);
+ if (free_CVSroot)
+ free (CVSroot);
CVSroot = xstrdup (optarg);
free_CVSroot = 1;
cvs_update_env = 1; /* need to update environment */
@@ -687,15 +662,6 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
else
command_name = cm->fullname; /* Global pointer for later use */
- /* This should probably remain a warning, rather than an error,
- for quite a while. For one thing the version of VC distributed
- with GNU emacs 19.34 invokes 'cvs rlog' instead of 'cvs log'. */
- if (strcmp (argv[0], "rlog") == 0)
- {
- error (0, 0, "warning: the rlog command is deprecated");
- error (0, 0, "use the synonymous log command instead");
- }
-
if (help)
{
argc = -1; /* some functions only check for this */
@@ -844,8 +810,7 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
specify a different repository than the one we are
importing to. */
- if ((lookup_command_attribute (command_name)
- & CVS_CMD_IGNORE_ADMROOT)
+ if (!(cm->attr & CVS_CMD_IGNORE_ADMROOT)
/* -d overrides CVS/Root, so don't give an error if the
latter points to a nonexistent repository. */
@@ -937,25 +902,29 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
variable. Parse it to see if we're supposed to do
remote accesses or use a special access method. */
- if (parse_cvsroot (current_root))
+ if (current_parsed_root != NULL)
+ free_cvsroot_t (current_parsed_root);
+ if ((current_parsed_root = parse_cvsroot (current_root)) == NULL)
error (1, 0, "Bad CVSROOT.");
if (trace)
- error (0, 0, "notice: main loop with CVSROOT=%s",
- current_root);
+ fprintf (stderr, "%s-> main loop with CVSROOT=%s\n",
+ CLIENT_SERVER_STR, current_root);
/*
* Check to see if the repository exists.
*/
- if (!client_active)
+#ifdef CLIENT_SUPPORT
+ if (!current_parsed_root->isremote)
+#endif /* CLIENT_SUPPORT */
{
char *path;
int save_errno;
- path = xmalloc (strlen (CVSroot_directory)
+ path = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ 20);
- (void) sprintf (path, "%s/%s", CVSroot_directory, CVSROOTADM);
+ (void) sprintf (path, "%s/%s", current_parsed_root->directory, CVSROOTADM);
if (readonlyfs == 0 && !isaccessible (path, R_OK | X_OK))
{
save_errno = errno;
@@ -1000,7 +969,7 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
&& !server_active
#endif
#ifdef CLIENT_SUPPORT
- && !client_active
+ && !current_parsed_root->isremote
#endif
)
{
@@ -1008,11 +977,15 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
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! */
- parse_config (CVSroot_directory);
+ parse_config (current_parsed_root->directory);
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ /* 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. */
@@ -1130,31 +1103,55 @@ date_from_time_t (unixtime)
void
date_to_internet (dest, source)
char *dest;
- char *source;
+ const char *source;
{
- int year, month, day, hour, minute, second;
+ struct tm date;
- /* 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"};
+ date_to_tm (&date, source);
+ tm_to_internet (dest, &date);
+}
+void
+date_to_tm (dest, source)
+ struct tm *dest;
+ const char *source;
+{
if (sscanf (source, SDATEFORM,
- &year, &month, &day, &hour, &minute, &second)
- != 6)
+ &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);
- /* Always send a four digit year. */
- if (year < 100)
- year += 1900;
+ 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.
- sprintf (dest, "%d %s %d %02d:%02d:%02d -0000", day,
- month < 1 || month > 12 ? "???" : month_names[month - 1],
- year, hour, minute, second);
+ 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 (dest, source)
+ 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);
}
void
diff --git a/gnu/usr.bin/cvs/src/mkmodules.c b/gnu/usr.bin/cvs/src/mkmodules.c
index a18a161c815..e252536efd6 100644
--- a/gnu/usr.bin/cvs/src/mkmodules.c
+++ b/gnu/usr.bin/cvs/src/mkmodules.c
@@ -857,7 +857,7 @@ init (argc, argv)
usage (init_usage);
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
@@ -871,12 +871,10 @@ init (argc, argv)
old cvsinit.sh script did. Few utilities do that, and a
non-existent parent directory is as likely to be a typo as something
which needs to be created. */
- mkdir_if_needed (CVSroot_directory);
+ mkdir_if_needed (current_parsed_root->directory);
- adm = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM) + 10);
- strcpy (adm, CVSroot_directory);
- strcat (adm, "/");
- strcat (adm, CVSROOTADM);
+ adm = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM) + 2);
+ sprintf (adm, "%s/%s", current_parsed_root->directory, CVSROOTADM);
mkdir_if_needed (adm);
/* This is needed because we pass "fileptr->filename" not "info"
diff --git a/gnu/usr.bin/cvs/src/parseinfo.c b/gnu/usr.bin/cvs/src/parseinfo.c
index 6d5b481ec49..9d501ffcb53 100644
--- a/gnu/usr.bin/cvs/src/parseinfo.c
+++ b/gnu/usr.bin/cvs/src/parseinfo.c
@@ -37,7 +37,7 @@ Parse_Info (infofile, repository, callproc, all)
char *cp, *exp, *value, *srepos, bad;
const char *regex_err;
- if (CVSroot_original == NULL)
+ if (current_parsed_root == NULL)
{
/* XXX - should be error maybe? */
error (0, 0, "CVSROOT variable not set");
@@ -45,11 +45,11 @@ Parse_Info (infofile, repository, callproc, all)
}
/* find the info file and open it */
- infopath = xmalloc (strlen (CVSroot_directory)
+ infopath = xmalloc (strlen (current_parsed_root->directory)
+ strlen (infofile)
+ sizeof (CVSROOTADM)
- + 10);
- (void) sprintf (infopath, "%s/%s/%s", CVSroot_directory,
+ + 3);
+ (void) sprintf (infopath, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, infofile);
fp_info = CVS_FOPEN (infopath, "r");
if (fp_info == NULL)
@@ -204,7 +204,7 @@ Parse_Info (infofile, repository, callproc, all)
KEYWORD=VALUE. There is currently no way to have a multi-line
VALUE (would be nice if there was, probably).
- CVSROOT is the $CVSROOT directory (CVSroot_directory might not be
+ CVSROOT is the $CVSROOT directory (current_parsed_root->directory might not be
set yet).
Returns 0 for success, negative value for failure. Call
diff --git a/gnu/usr.bin/cvs/src/patch.c b/gnu/usr.bin/cvs/src/patch.c
index 9aa26f3342e..5a208776abc 100644
--- a/gnu/usr.bin/cvs/src/patch.c
+++ b/gnu/usr.bin/cvs/src/patch.c
@@ -12,6 +12,7 @@
* release as either a date or a revision number.
*/
+#include <assert.h>
#include "cvs.h"
#include "getline.h"
@@ -189,7 +190,7 @@ patch (argc, argv)
options = xstrdup ("");
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* We're the client side. Fire up the remote server. */
start_server ();
@@ -252,7 +253,7 @@ patch (argc, argv)
db = open_module ();
for (i = 0; i < argc; i++)
err += do_module (db, argv[i], PATCH, "Patching", patch_proc,
- (char *) NULL, 0, 0, 0, (char *) NULL);
+ (char *) NULL, 0, 0, 0, 0, (char *) NULL);
close_module (db);
free (options);
patch_cleanup ();
@@ -282,11 +283,11 @@ patch_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
char *repository;
char *where;
- repository = xmalloc (strlen (CVSroot_directory) + strlen (argv[0])
- + (mfile == NULL ? 0 : strlen (mfile)) + 30);
- (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]);
- where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile))
- + 10);
+ 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 */
@@ -307,7 +308,7 @@ patch_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
}
/* take care of the rest */
- path = xmalloc (strlen (repository) + strlen (mfile) + 5);
+ path = xmalloc (strlen (repository) + strlen (mfile) + 2);
(void) sprintf (path, "%s/%s", repository, mfile);
if (isdir (path))
{
@@ -502,10 +503,15 @@ patch_fileproc (callerdat, finfo)
}
/* Create 3 empty files. I'm not really sure there is any advantage
- to doing so now rather than just waiting until later. */
- tmpfile1 = cvs_temp_name ();
- fp1 = CVS_FOPEN (tmpfile1, "w+");
- if (fp1 == NULL)
+ * to doing so now rather than just waiting until later.
+ *
+ * There is - cvs_temp_file opens the file so that it can guarantee that
+ * we have exclusive write access to the file. Unfortunately we spoil that
+ * by closing it and reopening it again. Of course any better solution
+ * requires that the RCS functions accept open file pointers rather than
+ * simple file names.
+ */
+ if ((fp1 = cvs_temp_file (&tmpfile1)) == NULL)
{
error (0, errno, "cannot create temporary file %s", tmpfile1);
ret = 1;
@@ -514,9 +520,7 @@ patch_fileproc (callerdat, finfo)
else
if (fclose (fp1) < 0)
error (0, errno, "warning: cannot close %s", tmpfile1);
- tmpfile2 = cvs_temp_name ();
- fp2 = CVS_FOPEN (tmpfile2, "w+");
- if (fp2 == NULL)
+ if ((fp2 = cvs_temp_file (&tmpfile2)) == NULL)
{
error (0, errno, "cannot create temporary file %s", tmpfile2);
ret = 1;
@@ -525,9 +529,7 @@ patch_fileproc (callerdat, finfo)
else
if (fclose (fp2) < 0)
error (0, errno, "warning: cannot close %s", tmpfile2);
- tmpfile3 = cvs_temp_name ();
- fp3 = CVS_FOPEN (tmpfile3, "w+");
- if (fp3 == NULL)
+ if ((fp3 = cvs_temp_file (&tmpfile3)) == NULL)
{
error (0, errno, "cannot create temporary file %s", tmpfile3);
ret = 1;
@@ -580,7 +582,7 @@ patch_fileproc (callerdat, finfo)
(void) utime (tmpfile2, &t);
}
- switch (diff_exec (tmpfile1, tmpfile2, unidiff ? "-u" : "-c", tmpfile3))
+ switch (diff_exec (tmpfile1, tmpfile2, NULL, NULL, unidiff ? "-u" : "-c", tmpfile3))
{
case -1: /* fork/wait failure */
error (1, errno, "fork for diff failed on %s", rcs);
@@ -643,13 +645,14 @@ failed to read diff file header %s for %s: end of file", tmpfile3, rcs);
goto out;
}
}
- if (CVSroot_directory != NULL)
+ assert (current_parsed_root != NULL);
+ assert (current_parsed_root->directory != NULL);
{
- strippath = xmalloc (strlen (CVSroot_directory) + 10);
- (void) sprintf (strippath, "%s/", CVSroot_directory);
+ strippath = xmalloc (strlen (current_parsed_root->directory) + 2);
+ (void) sprintf (strippath, "%s/", current_parsed_root->directory);
}
- else
- strippath = xstrdup (REPOS_STRIP);
+ /*else
+ strippath = xstrdup (REPOS_STRIP); */
if (strncmp (rcs, strippath, strlen (strippath)) == 0)
rcs += strlen (strippath);
free (strippath);
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c
index 3719e5561a5..52fdb8100e9 100644
--- a/gnu/usr.bin/cvs/src/rcs.c
+++ b/gnu/usr.bin/cvs/src/rcs.c
@@ -92,11 +92,6 @@ static void expand_keywords PROTO((RCSNode *, RCSVers *, const char *,
size_t, char **, size_t *));
static void cmp_file_buffer PROTO((void *, const char *, size_t));
-enum rcs_delta_op {RCS_ANNOTATE, RCS_FETCH};
-static void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, char *,
- enum rcs_delta_op, char **, size_t *,
- char **, size_t *));
-
/* Routines for reading, parsing and writing RCS files. */
static RCSVers *getdelta PROTO ((struct rcsbuffer *, char *, char **,
char **));
@@ -2126,7 +2121,7 @@ RCS_getversion (rcs, tag, date, force_tag_match, simple_tag)
* -- 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,
- * exit with error.
+ * return NULL.
*/
char *
RCS_tag2rev (rcs, tag)
@@ -2205,9 +2200,8 @@ RCS_tag2rev (rcs, tag)
if (rev)
return rev;
- error (1, 0, "tag `%s' does not exist", tag);
- /* NOT REACHED -- error (1 ... ) does not return here */
- return 0;
+ /* Trust the caller to print warnings. */
+ return NULL;
}
/*
@@ -4157,7 +4151,7 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout, pfn, callerdat)
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 (unlink (dest) < 0 && !existence_error (errno))
+ 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",
@@ -4327,7 +4321,7 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout, pfn, callerdat)
/* Unlink `dest', just in case. It's okay if this provokes a
ENOENT error. */
- if (unlink (dest) < 0 && existence_error (errno))
+ 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",
@@ -5270,7 +5264,7 @@ workfile);
memset (commitpt->text, 0, sizeof (Deltatext));
bufsize = 0;
- switch (diff_exec (workfile, tmpfile, diffopts, changefile))
+ switch (diff_exec (workfile, tmpfile, NULL, NULL, diffopts, changefile))
{
case 0:
case 1:
@@ -5318,7 +5312,7 @@ workfile);
/* 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, diffopts, changefile))
+ switch (diff_exec (tmpfile, workfile, NULL, NULL, diffopts, changefile))
{
case 0:
case 1:
@@ -5698,7 +5692,7 @@ RCS_setbranch (rcs, rev)
int
RCS_lock (rcs, rev, lock_quiet)
RCSNode *rcs;
- const char *rev;
+ char *rev;
int lock_quiet;
{
List *locks;
@@ -5717,32 +5711,16 @@ RCS_lock (rcs, rev, lock_quiet)
/* A revision number of NULL means lock the head or default branch. */
if (rev == NULL)
xrev = RCS_head (rcs);
-
- /* If rev is a branch number, lock the latest revision on that
- branch. I think that if the branch doesn't exist, it's
- okay to return 0 -- that just means that the branch is new,
- so we don't need to lock it anyway. -twp */
- else if (RCS_nodeisbranch (rcs, rev))
- {
- xrev = RCS_getbranch (rcs, (char *) rev, 1);
- if (xrev == NULL)
- {
- if (!lock_quiet)
- error (0, 0, "%s: branch %s absent", rcs->path, rev);
- return 1;
- }
- }
-
- if (xrev == NULL)
- xrev = xstrdup (rev);
+ else
+ xrev = RCS_gettag (rcs, rev, 1, (int *) 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 (findnode (rcs->versions, xrev) == NULL)
+ if (xrev == NULL || findnode (rcs->versions, xrev) == NULL)
{
if (!lock_quiet)
- error (0, 0, "%s: revision %s absent", rcs->path, xrev);
+ error (0, 0, "%s: revision %s absent", rcs->path, rev);
free (xrev);
return 1;
}
@@ -5808,7 +5786,7 @@ RCS_lock (rcs, rev, lock_quiet)
int
RCS_unlock (rcs, rev, unlock_quiet)
RCSNode *rcs;
- const char *rev;
+ char *rev;
int unlock_quiet;
{
Node *lock;
@@ -5858,20 +5836,15 @@ RCS_unlock (rcs, rev, unlock_quiet)
return 0; /* no lock found, ergo nothing to do */
xrev = xstrdup (lock->key);
}
- else if (RCS_nodeisbranch (rcs, rev))
+ else
{
- /* If rev is a branch number, unlock the latest revision on that
- branch. */
- xrev = RCS_getbranch (rcs, (char *) rev, 1);
+ xrev = RCS_gettag (rcs, rev, 1, (int *) NULL);
if (xrev == NULL)
{
- error (0, 0, "%s: branch %s absent", rcs->path, rev);
+ error (0, 0, "%s: revision %s absent", rcs->path, rev);
return 1;
}
}
- else
- /* REV is an exact revision number. */
- xrev = xstrdup (rev);
lock = findnode (RCS_getlocks (rcs), xrev);
if (lock == NULL)
@@ -6393,7 +6366,7 @@ RCS_delete_revs (rcs, tag1, tag2, inclusive)
goto delrev_done;
outfile = cvs_temp_name();
- status = diff_exec (beforefile, afterfile, "-an", outfile);
+ status = diff_exec (beforefile, afterfile, NULL, NULL, "-an", outfile);
if (status == 2)
{
@@ -7032,7 +7005,7 @@ rcs_change_text (name, textbuf, textlen, diffbuf, difflen, retbuf, retlen)
On error, give a fatal error. */
-static void
+void
RCS_deltas (rcs, fp, rcsbuf, version, op, text, len, log, loglen)
RCSNode *rcs;
FILE *fp;
@@ -8391,138 +8364,6 @@ RCS_abandon (rcs)
rcs->flags |= PARTIAL;
}
-
-/* Annotate command. In rcs.c for historical reasons (from back when
- what is now RCS_deltas was part of annotate_fileproc). */
-
-/* Options from the command line. */
-
-static int force_tag_match = 1;
-static char *tag = NULL;
-static char *date = NULL;
-
-static int annotate_fileproc PROTO ((void *callerdat, struct file_info *));
-
-static int
-annotate_fileproc (callerdat, finfo)
- void *callerdat;
- struct file_info *finfo;
-{
- FILE *fp = NULL;
- struct rcsbuffer *rcsbufp = NULL;
- struct rcsbuffer rcsbuf;
- char *version;
-
- if (finfo->rcs == NULL)
- return (1);
-
- if (finfo->rcs->flags & PARTIAL)
- {
- RCS_reparsercsfile (finfo->rcs, &fp, &rcsbuf);
- rcsbufp = &rcsbuf;
- }
-
- version = RCS_getversion (finfo->rcs, tag, date, force_tag_match,
- (int *) NULL);
- if (version == NULL)
- return 0;
-
- /* Distinguish output for various files if we are processing
- several files. */
- cvs_outerr ("Annotations for ", 0);
- cvs_outerr (finfo->fullname, 0);
- cvs_outerr ("\n***************\n", 0);
-
- RCS_deltas (finfo->rcs, fp, rcsbufp, version, RCS_ANNOTATE, NULL,
- NULL, NULL, NULL);
- free (version);
- return 0;
-}
-
-static const char *const annotate_usage[] =
-{
- "Usage: %s %s [-lRf] [-r rev|-D date] [files...]\n",
- "\t-l\tLocal directory only, no recursion.\n",
- "\t-R\tProcess directories recursively.\n",
- "\t-f\tUse head revision if tag/date not found.\n",
- "\t-r rev\tAnnotate file as of specified revision/tag.\n",
- "\t-D date\tAnnotate file as of specified date.\n",
- "(Specify the --help global option for a list of other help options)\n",
- NULL
-};
-
-/* Command to show the revision, date, and author where each line of a
- file was modified. */
-
-int
-annotate (argc, argv)
- int argc;
- char **argv;
-{
- int local = 0;
- int c;
-
- if (argc == -1)
- usage (annotate_usage);
-
- optind = 0;
- while ((c = getopt (argc, argv, "+lr:D:fR")) != -1)
- {
- switch (c)
- {
- case 'l':
- local = 1;
- break;
- case 'R':
- local = 0;
- break;
- case 'r':
- tag = optarg;
- break;
- case 'D':
- date = Make_Date (optarg);
- break;
- case 'f':
- force_tag_match = 0;
- break;
- case '?':
- default:
- usage (annotate_usage);
- break;
- }
- }
- argc -= optind;
- argv += optind;
-
-#ifdef CLIENT_SUPPORT
- if (client_active)
- {
- start_server ();
- ign_setup ();
-
- if (local)
- send_arg ("-l");
- if (!force_tag_match)
- send_arg ("-f");
- option_with_arg ("-r", tag);
- if (date)
- client_senddate (date);
- send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
- send_file_names (argc, argv, SEND_EXPAND_WILD);
- send_to_server ("annotate\012", 0);
- return get_responses_and_close ();
- }
-#endif /* CLIENT_SUPPORT */
-
- if (tag != NULL)
- tag_check_valid (tag, argc, argv, local, 0, "");
-
- return start_recursion (annotate_fileproc, (FILESDONEPROC) NULL,
- (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc, argv, local, W_LOCAL, 0, 1, (char *)NULL,
- 1);
-}
-
/*
* For a given file with full pathname PATH and revision number REV,
* produce a file label suitable for passing to diff. The default
@@ -8532,6 +8373,11 @@ annotate (argc, argv)
*
* 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 (path, rev, rcs)
@@ -8539,37 +8385,45 @@ make_file_label (path, rev, rcs)
char *rev;
RCSNode *rcs;
{
- char datebuf[MAXDATELEN];
+ char datebuf[MAXDATELEN + 1];
char *label;
- char *file;
- file = last_component (path);
label = (char *) xmalloc (strlen (path)
- + (rev == NULL ? 0 : strlen (rev))
- + 50);
+ + (rev == NULL ? 0 : strlen (rev) + 1)
+ + MAXDATELEN
+ + 2);
if (rev)
{
- char *date;
+ char date[MAXDATELEN + 1];
+ /* revs cannot be attached to /dev/null ... duh. */
+ assert (strcmp(DEVNULL, path));
RCS_getrevtime (rcs, rev, datebuf, 0);
- date = printable_date (datebuf);
+ (void) date_to_internet (date, datebuf);
(void) sprintf (label, "-L%s\t%s\t%s", path, date, rev);
- free (date);
}
else
{
struct stat sb;
- struct tm *wm;
+ struct tm *wm = NULL;
- if (CVS_STAT (file, &sb) < 0)
- error (0, 1, "could not get info for `%s'", path);
+ if (strcmp(DEVNULL, path))
+ {
+ char *file = last_component (path);
+ if (CVS_STAT (file, &sb) < 0)
+ error (0, 1, "could not get info for `%s'", path);
+ else
+ wm = gmtime (&sb.st_mtime);
+ }
else
{
- wm = gmtime (&sb.st_mtime);
- (void) sprintf (datebuf, "%04d/%02d/%02d %02d:%02d:%02d",
- wm->tm_year + 1900, wm->tm_mon + 1,
- wm->tm_mday, wm->tm_hour,
- wm->tm_min, wm->tm_sec);
+ time_t t = 0;
+ wm = gmtime(&t);
+ }
+
+ if (wm)
+ {
+ (void) tm_to_internet (datebuf, wm);
(void) sprintf (label, "-L%s\t%s", path, datebuf);
}
}
diff --git a/gnu/usr.bin/cvs/src/rcscmds.c b/gnu/usr.bin/cvs/src/rcscmds.c
index ab94e407bd7..43be16839df 100644
--- a/gnu/usr.bin/cvs/src/rcscmds.c
+++ b/gnu/usr.bin/cvs/src/rcscmds.c
@@ -530,9 +530,11 @@ RCS file: ", 0);
message on stderr. */
int
-diff_exec (file1, file2, options, out)
+diff_exec (file1, file2, label1, label2, options, out)
char *file1;
char *file2;
+ char *label1;
+ char *label2;
char *options;
char *out;
{
@@ -575,6 +577,10 @@ diff_exec (file1, file2, options, out)
/* The first word in this string is used only for error reporting. */
sprintf (args, "diff %s", options);
call_diff_setup (args);
+ if (label1)
+ call_diff_arg (label1);
+ if (label2)
+ call_diff_arg (label2);
call_diff_arg (file1);
call_diff_arg (file2);
free (args);
diff --git a/gnu/usr.bin/cvs/src/recurse.c b/gnu/usr.bin/cvs/src/recurse.c
index 1cb2fbbf35d..2235193d1cb 100644
--- a/gnu/usr.bin/cvs/src/recurse.c
+++ b/gnu/usr.bin/cvs/src/recurse.c
@@ -157,10 +157,10 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
#ifdef CLIENT_SUPPORT
if (!just_subdirs
&& CVSroot_cmdline == NULL
- && client_active)
+ && current_parsed_root->isremote)
{
char *root = Name_Root (NULL, update_dir);
- if (root && strcmp (root, current_root) != 0)
+ if (root && strcmp (root, current_parsed_root->original) != 0)
/* We're skipping this directory because it is for
a different root. Therefore, we just want to
do the subdirectories only. Processing files would
@@ -204,7 +204,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
program_name);
}
#ifdef CLIENT_SUPPORT
- else if (client_active && server_started)
+ else if (current_parsed_root->isremote && server_started)
{
/* In the the case "cvs update foo bar baz", a call to
send_file_names in update.c will have sent the
@@ -290,7 +290,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
{
if ((which & W_LOCAL) && isdir (CVSADM)
#ifdef CLIENT_SUPPORT
- && !client_active
+ && !current_parsed_root->isremote
#endif
)
{
@@ -363,8 +363,8 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
/* FIXME (njc): in the multiroot case, we don't want to send
argument commands for those top-level directories which do
not contain any subdirectories which have files checked out
- from current_root. If we do, and two repositories have a
- module with the same name, nasty things could happen.
+ from current_parsed_root->original. If we do, and two repositories
+ have a module with the same name, nasty things could happen.
This is hard. Perhaps we should send the Argument commands
later in this procedure, after we've had a chance to notice
@@ -440,7 +440,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
"Directory xxx" command, which forces the server to descend
and serve the files there. client.c (send_file_names) has
also been modified to send only those arguments which are
- appropriate to current_root.
+ appropriate to current_parsed_root->original.
*/
@@ -599,8 +599,9 @@ do_recursion (frame)
}
- process_this_directory = (strcmp (current_root, this_root) == 0);
-
+ process_this_directory =
+ (strcmp (current_parsed_root->original, this_root) == 0);
+
free (this_root);
}
}
@@ -710,7 +711,7 @@ do_recursion (frame)
place (server_notify). For local, we can't do them here--we don't
have writelocks in place, and there is no way to get writelocks
here. */
- if (client_active)
+ if (current_parsed_root->isremote)
notify_check (repository, update_dir);
#endif /* CLIENT_SUPPORT */
@@ -1024,7 +1025,8 @@ but CVS uses %s for its own purposes; skipping %s directory",
}
- process_this_directory = (strcmp (current_root, this_root) == 0);
+ process_this_directory = (strcmp (current_parsed_root->original, this_root) == 0);
+
free (this_root);
}
}
diff --git a/gnu/usr.bin/cvs/src/root.c b/gnu/usr.bin/cvs/src/root.c
index 1c92b1561e8..08dab3e94a6 100644
--- a/gnu/usr.bin/cvs/src/root.c
+++ b/gnu/usr.bin/cvs/src/root.c
@@ -12,11 +12,11 @@
#include "cvs.h"
#include "getline.h"
-/* Printable names for things in the CVSroot_method enum variable.
+/* Printable names for things in the current_parsed_root->method enum variable.
Watch out if the enum is changed in cvs.h! */
char *method_names[] = {
- "local", "server (ssh)", "pserver", "kserver", "gserver", "ext", "fork"
+ "undefined", "local", "server (ssh)", "pserver", "kserver", "gserver", "ext", "fork"
};
#ifndef DEBUG
@@ -265,12 +265,16 @@ error 0 Server configuration missing --allow-root in inetd.conf\n");
return 0;
}
+
+
/* 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;
+
+
/* Parse a CVSROOT variable into its constituent parts -- method,
* username, hostname, directory. The prototypical CVSROOT variable
* looks like:
@@ -280,50 +284,103 @@ char *CVSroot_cmdline;
* Some methods may omit fields; local, for example, doesn't need user
* and host.
*
- * Returns zero on success, non-zero on failure. */
+ * Returns pointer to new cvsroot_t on success, NULL on failure. */
-char *CVSroot_original = NULL; /* the CVSroot that was passed in */
-int client_active; /* nonzero if we are doing remote access */
-CVSmethod CVSroot_method; /* one of the enum values defined in cvs.h */
-char *CVSroot_username; /* the username or NULL if method == local */
-char *CVSroot_hostname; /* the hostname or NULL if method == local */
-char *CVSroot_directory; /* the directory name */
+cvsroot_t *current_parsed_root = NULL;
-int
-parse_cvsroot (CVSroot)
- char *CVSroot;
+
+
+/* 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
+ */
+static cvsroot_t *
+new_cvsroot_t ()
{
- static int cvsroot_parsed = 0;
- char *cvsroot_copy, *cvsroot_save, *p;
- int check_hostname;
+ cvsroot_t *newroot;
+
+ /* gotta store it somewhere */
+ newroot = xmalloc(sizeof(cvsroot_t));
+
+ newroot->original = NULL;
+ newroot->method = null_method;
+ newroot->username = NULL;
+ newroot->password = NULL;
+ newroot->hostname = NULL;
+ newroot->port = 0;
+ newroot->directory = NULL;
+#ifdef CLIENT_SUPPORT
+ newroot->isremote = 0;
+#endif /* CLIENT_SUPPORT */
- /* Don't go through the trouble twice. */
- if (cvsroot_parsed)
+ return newroot;
+}
+
+
+
+/* Dispose of a cvsroot_t and its component parts */
+void
+free_cvsroot_t (root)
+ cvsroot_t *root;
+{
+ if (root->original != NULL)
+ free (root->original);
+ if (root->username != NULL)
+ free (root->username);
+ if (root->password != NULL)
{
- error (0, 0, "WARNING (parse_cvsroot): someone called me twice!\n");
- return 0;
+ /* I like to be paranoid */
+ memset (root->password, 0, strlen (root->password));
+ free (root->password);
}
+ if (root->hostname != NULL)
+ free (root->hostname);
+ if (root->directory != NULL)
+ free (root->directory);
+ free (root);
+}
+
- if (CVSroot_original != NULL)
- free (CVSroot_original);
- if (CVSroot_directory != NULL)
- free (CVSroot_directory);
- if (CVSroot_username != NULL)
- free (CVSroot_username);
- if (CVSroot_hostname != NULL)
- free (CVSroot_hostname);
- CVSroot_original = xstrdup (CVSroot);
- cvsroot_save = cvsroot_copy = xstrdup (CVSroot);
+/*
+ * parse a CVSROOT string to allocate and return a new cvsroot_t structure
+ */
+cvsroot_t *
+parse_cvsroot (root_in)
+ 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 *firstslash; /* save where the path spec starts
+ * while we parse
+ * [[user][:password]@]host[:[port]]
+ */
+ char *cvsroot_copy, *p, *q; /* temporary pointers for parsing */
+ char *new_hostname;
+ int check_hostname, no_port, no_password;
+
+ /* 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 :pserver:user@host:/path",
+ * "cvs -d :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path",
+ * "cvs -d [:(ext|server):][[user]@]host[:]/path",
* "cvs -d :local:e:\path",
- * "cvs -d :kserver:user@host:/path", or
* "cvs -d :fork:/path".
* We need to get past that part of CVSroot before parsing the
* rest of it.
@@ -331,9 +388,9 @@ parse_cvsroot (CVSroot)
if (! (p = strchr (method, ':')))
{
- error (0, 0, "bad CVSroot: %s", CVSroot);
+ error (0, 0, "bad CVSroot: %s", root_in);
free (cvsroot_save);
- return 1;
+ goto error_exit;
}
*p = '\0';
cvsroot_copy = ++p;
@@ -341,24 +398,24 @@ parse_cvsroot (CVSroot)
/* Now we have an access method -- see if it's valid. */
if (strcmp (method, "local") == 0)
- CVSroot_method = local_method;
+ newroot->method = local_method;
else if (strcmp (method, "pserver") == 0)
- CVSroot_method = pserver_method;
+ newroot->method = pserver_method;
else if (strcmp (method, "kserver") == 0)
- CVSroot_method = kserver_method;
+ newroot->method = kserver_method;
else if (strcmp (method, "gserver") == 0)
- CVSroot_method = gserver_method;
+ newroot->method = gserver_method;
else if (strcmp (method, "server") == 0)
- CVSroot_method = server_method;
+ newroot->method = server_method;
else if (strcmp (method, "ext") == 0)
- CVSroot_method = ext_method;
+ newroot->method = ext_method;
else if (strcmp (method, "fork") == 0)
- CVSroot_method = fork_method;
+ newroot->method = fork_method;
else
{
- error (0, 0, "unknown method in CVSroot: %s", CVSroot);
+ error (0, 0, "unknown method in CVSroot: %s", root_in);
free (cvsroot_save);
- return 1;
+ goto error_exit;
}
}
else
@@ -367,183 +424,348 @@ parse_cvsroot (CVSroot)
SERVER_METHOD/EXT_METHOD if the string contains a colon or
LOCAL_METHOD otherwise. */
- CVSroot_method = ((strchr (cvsroot_copy, ':'))
-#ifdef RSH_NOT_TRANSPARENT
+ newroot->method = ((*cvsroot_copy != '/' && strchr (cvsroot_copy, '/'))
+/*#ifdef RSH_NOT_TRANSPARENT
? server_method
-#else
+#else*/
? ext_method
-#endif
+/*#endif*/
: local_method);
}
- client_active = (CVSroot_method != local_method);
-
- /* Check for username/hostname if we're not LOCAL_METHOD. */
+#ifdef CLIENT_SUPPORT
+ newroot->isremote = (newroot->method != local_method);
+#endif /* CLIENT_SUPPORT */
- CVSroot_username = NULL;
- CVSroot_hostname = NULL;
- if ((CVSroot_method != local_method)
- && (CVSroot_method != fork_method))
+ if ((newroot->method != local_method)
+ && (newroot->method != fork_method))
{
- /* Check to see if there is a username in the string. */
+ /* split the string into [[user][:password]@]host[:[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 (\"%s\")", root_in);
+ error (0, 0, "requires a path spec");
+ error (0, 0, ":(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path");
+ error (0, 0, "[:(ext|server):][[user]@]host[:]/path");
+ free (cvsroot_save);
+ 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';
- CVSroot_username = xstrdup (cvsroot_copy);
+ /* 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;
- if (*CVSroot_username == '\0')
- CVSroot_username = NULL;
}
+ new_hostname = NULL;
if (*cvsroot_copy == '[')
{
p = strchr(cvsroot_copy, ']');
if (p != NULL)
{
*p = '\0';
- CVSroot_hostname = xstrdup (cvsroot_copy+1);
+ new_hostname = xstrdup (cvsroot_copy+1);
*p++ = ']';
if (*p == ':')
- cvsroot_copy = p+1;
+ cvsroot_copy = p;
}
}
- else if ((p = strchr (cvsroot_copy, ':')) != NULL)
+
+ /* now deal with host[:[port]] */
+
+ /* the port */
+ if ((p = strchr (cvsroot_copy, ':')) != NULL)
{
- *p = '\0';
- CVSroot_hostname = xstrdup (cvsroot_copy);
- cvsroot_copy = ++p;
-
- if (*CVSroot_hostname == '\0')
- CVSroot_hostname = NULL;
+ *p++ = '\0';
+ if (strlen(p))
+ {
+ q = p;
+ if (*q == '-') q++;
+ while (*q)
+ {
+ if (!isdigit(*q++))
+ {
+ error(0, 0, "CVSROOT (\"%s\")", root_in);
+ error(0, 0, "may only specify a positive, non-zero, integer port (not \"%s\").",
+ p);
+ error(0, 0, "perhaps you entered a relative pathname?");
+ free (cvsroot_save);
+ if (new_hostname != NULL)
+ free (new_hostname);
+ goto error_exit;
+ }
+ }
+ if ((newroot->port = atoi (p)) <= 0)
+ {
+ error (0, 0, "CVSROOT (\"%s\")", root_in);
+ error(0, 0, "may only specify a positive, non-zero, integer port (not \"%s\").",
+ p);
+ error(0, 0, "perhaps you entered a relative pathname?");
+ if (new_hostname != NULL)
+ free (new_hostname);
+ free (cvsroot_save);
+ goto error_exit;
+ }
+ }
}
+
+ /* copy host */
+ if (new_hostname != NULL)
+ newroot->hostname = new_hostname;
+ else 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 = '/';
}
- CVSroot_directory = xstrdup(cvsroot_copy);
+ /* parse the path for all methods */
+ newroot->directory = xstrdup(cvsroot_copy);
free (cvsroot_save);
+ /*
+ * Do various sanity checks.
+ */
+
#if ! defined (CLIENT_SUPPORT) && ! defined (DEBUG)
- if (CVSroot_method != local_method)
+ if (newroot->method != local_method)
{
- error (0, 0, "Your CVSROOT is set for a remote access method");
- error (0, 0, "but your CVS executable doesn't support it");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set for a remote access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
}
#endif
-
- /* Do various sanity checks. */
- if (CVSroot_username && ! CVSroot_hostname)
+#if ! defined (SERVER_SUPPORT) && ! defined (DEBUG)
+ if (newroot->method == fork_method)
+ {
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set to use the :fork: access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
+ }
+#endif
+
+ if (newroot->username && ! newroot->hostname)
{
- error (0, 0, "missing hostname in CVSROOT: %s", CVSroot);
- return 1;
+ error (0, 0, "missing hostname in CVSROOT: \"%s\"", root_in);
+ goto error_exit;
}
check_hostname = 0;
- switch (CVSroot_method)
+ no_password = 0;
+ no_port = 0;
+ switch (newroot->method)
{
case local_method:
- if (CVSroot_username || CVSroot_hostname)
+ if (newroot->username || newroot->hostname)
{
error (0, 0, "can't specify hostname and username in CVSROOT");
+ error (0, 0, "(\"%s\")", root_in);
error (0, 0, "when using local access method");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ goto error_exit;
}
/* 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 (CVSroot_directory))
- error (1, 0, "CVSROOT %s must be an absolute pathname",
- CVSroot_directory);
+ if (!isabsolute (newroot->directory))
+ {
+ error (0, 0, "CVSROOT \"%s\" must be an absolute pathname",
+ newroot->directory);
+ goto error_exit;
+ }
+ no_port = 1;
+ no_password = 1;
break;
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 (CVSroot_username || CVSroot_hostname)
+ if (newroot->username || newroot->hostname)
{
error (0, 0, "can't specify hostname and username in CVSROOT");
+ error (0, 0, "(\"%s\")", root_in);
error (0, 0, "when using fork access method");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ goto error_exit;
+ }
+ if (!isabsolute (newroot->directory))
+ {
+ error (0, 0, "CVSROOT \"%s\" must be an absolute pathname",
+ newroot->directory);
+ goto error_exit;
}
+ no_port = 1;
+ no_password = 1;
break;
case kserver_method:
#ifndef HAVE_KERBEROS
- error (0, 0, "Your CVSROOT is set for a kerberos access method");
- error (0, 0, "but your CVS executable doesn't support it");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set for a kerberos access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
#else
check_hostname = 1;
break;
#endif
case gserver_method:
#ifndef HAVE_GSSAPI
- error (0, 0, "Your CVSROOT is set for a GSSAPI access method");
- error (0, 0, "but your CVS executable doesn't support it");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set for a GSSAPI access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
#else
check_hostname = 1;
break;
#endif
case server_method:
case ext_method:
+ no_port = 1;
+ no_password = 1;
+ check_hostname = 1;
+ break;
case pserver_method:
check_hostname = 1;
break;
}
- if (check_hostname)
+ 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 (check_hostname && !newroot->hostname)
{
- if (! CVSroot_hostname)
+ error (0, 0, "didn't specify hostname in CVSROOT: %s", root_in);
+ goto error_exit;
+ }
+
+ if (no_port && newroot->port)
{
- error (0, 0, "didn't specify hostname in CVSROOT: %s", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT port specification is only valid for gserver, kserver,");
+ error (0, 0, "and pserver connection methods.");
+ goto error_exit;
}
- }
- if (*CVSroot_directory == '\0')
+ if (*newroot->directory == '\0')
{
- error (0, 0, "missing directory in CVSROOT: %s", CVSroot);
- return 1;
+ error (0, 0, "missing directory in CVSROOT: %s", root_in);
+ goto error_exit;
}
/* Hooray! We finally parsed it! */
- return 0;
+ return newroot;
+
+error_exit:
+ free_cvsroot_t (newroot);
+ return NULL;
}
-/* Set up the global CVSroot* variables as if we're using the local
- repository DIR. */
-void
-set_local_cvsroot (dir)
+#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
+ */
+char *
+normalize_cvsroot (root)
+ const cvsroot_t *root;
+{
+ char *cvsroot_canonical;
+ char *p, *hostname, *username;
+ char port_s[64];
+
+ /* get the appropriate port string */
+ sprintf (port_s, "%d", get_cvs_port_number (root));
+
+ /* 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++;
+ }
+
+ /* get the username string */
+ username = root->username ? root->username : getcaller();
+ cvsroot_canonical = xmalloc ( strlen(username)
+ + strlen(hostname) + strlen(port_s)
+ + strlen(root->directory) + 12);
+ sprintf (cvsroot_canonical, ":pserver:%s@%s:%s%s",
+ username, hostname, port_s, root->directory);
+
+ free (hostname);
+ return cvsroot_canonical;
+}
+#endif /* AUTH_CLIENT_SUPPORT */
+
+
+
+/* allocate and return a cvsroot_t structure set up as if we're using the local
+ * repository DIR. */
+cvsroot_t *
+local_cvsroot (dir)
char *dir;
{
- if (CVSroot_original != NULL)
- free (CVSroot_original);
- CVSroot_original = xstrdup(dir);
- CVSroot_method = local_method;
- if (CVSroot_directory != NULL)
- free (CVSroot_directory);
- CVSroot_directory = xstrdup(dir);
- if (CVSroot_username != NULL)
- free (CVSroot_username);
- CVSroot_username = NULL;
- if (CVSroot_hostname != NULL)
- free (CVSroot_hostname);
- CVSroot_hostname = NULL;
- client_active = 0;
+ cvsroot_t *newroot = new_cvsroot_t();
+
+ newroot->original = xstrdup(dir);
+ newroot->method = local_method;
+ newroot->directory = xstrdup(dir);
+
+ return newroot;
}
+
#ifdef DEBUG
/* This is for testing the parsing function. Use
@@ -553,7 +775,6 @@ set_local_cvsroot (dir)
#include <stdio.h>
-char *CVSroot;
char *program_name = "testing";
char *command_name = "parse_cvsroot"; /* XXX is this used??? */
@@ -567,13 +788,6 @@ error_exit PROTO ((void))
exit (1);
}
-char *
-xstrdup (str)
- const char *str;
-{
- return strdup (str);
-}
-
int
isabsolute (dir)
const char *dir;
@@ -594,18 +808,18 @@ main (argc, argv)
exit (2);
}
- if (parse_cvsroot (argv[1]))
+ 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 ("CVSroot_method: %s\n", method_names[CVSroot_method]);
- printf ("CVSroot_username: %s\n",
- CVSroot_username ? CVSroot_username : "NULL");
- printf ("CVSroot_hostname: %s\n",
- CVSroot_hostname ? CVSroot_hostname : "NULL");
- printf ("CVSroot_directory: %s\n", CVSroot_directory);
+ 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 */
diff --git a/gnu/usr.bin/cvs/src/rtag.c b/gnu/usr.bin/cvs/src/rtag.c
deleted file mode 100644
index 238ff7db595..00000000000
--- a/gnu/usr.bin/cvs/src/rtag.c
+++ /dev/null
@@ -1,692 +0,0 @@
-/*
- * Copyright (c) 1992, Brian Berliner and Jeff Polk
- * 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 1.4 kit.
- *
- * Rtag
- *
- * Add or delete a symbolic name to an RCS file, or a collection of RCS files.
- * Uses the modules database, if necessary.
- */
-
-#include "cvs.h"
-
-#ifndef lint
-static const char rcsid[] = "$CVSid: @(#)rtag.c 1.61 94/09/30 $";
-USE(rcsid);
-#endif
-
-static int check_fileproc PROTO((char *file, char *update_dir,
- char *repository, List * entries,
- List * srcfiles));
-static int check_filesdoneproc PROTO((int err, char *repos, char *update_dir));
-static int pretag_proc PROTO((char *repository, char *filter));
-static void masterlist_delproc PROTO((Node *p));
-static void tag_delproc PROTO((Node *p));
-static int pretag_list_proc PROTO((Node *p, void *closure));
-
-static Dtype rtag_dirproc PROTO((char *dir, char *repos, char *update_dir));
-static int rtag_fileproc PROTO((char *file, char *update_dir,
- char *repository, List * entries,
- List * srcfiles));
-static int rtag_proc PROTO((int *pargc, char **argv, char *xwhere,
- char *mwhere, char *mfile, int shorten,
- int local_specified, char *mname, char *msg));
-static int rtag_delete PROTO((RCSNode *rcsfile));
-
-
-struct tag_info
-{
- Ctype status;
- char *rev;
- char *tag;
- char *options;
-};
-
-struct master_lists
-{
- List *tlist;
-};
-
-static List *mtlist;
-static List *tlist;
-
-static char *symtag;
-static char *numtag;
-static int delete; /* adding a tag by default */
-static int attic_too; /* remove tag from Attic files */
-static int branch_mode; /* make an automagic "branch" tag */
-static char *date;
-static int local; /* recursive by default */
-static int force_tag_match = 1; /* force by default */
-static int force_tag_move; /* don't move existing tags by default */
-
-static const char *const rtag_usage[] =
-{
- "Usage: %s %s [-aflRnF] [-b] [-d] [-r tag|-D date] tag modules...\n",
- "\t-a\tClear tag from removed files that would not otherwise be tagged.\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-n\tNo execution of 'tag program'\n",
- "\t-d\tDelete the given Tag.\n",
- "\t-b\tMake the tag a \"branch\" tag, allowing concurrent development.\n",
- "\t-[rD]\tExisting tag or Date.\n",
- "\t-F\tMove tag if it already exists\n",
- NULL
-};
-
-int
-rtag (argc, argv)
- int argc;
- char **argv;
-{
- register int i;
- int c;
- DBM *db;
- int run_module_prog = 1;
- int err = 0;
-
- if (argc == -1)
- usage (rtag_usage);
-
- optind = 1;
- while ((c = getopt (argc, argv, "FanfQqlRdbr:D:")) != -1)
- {
- switch (c)
- {
- case 'a':
- attic_too = 1;
- break;
- case 'n':
- run_module_prog = 0;
- break;
- case 'Q':
- case 'q':
-#ifdef SERVER_SUPPORT
- /* The CVS 1.5 client sends these options (in addition to
- Global_option requests), so we must ignore them. */
- if (!server_active)
-#endif
- error (1, 0,
- "-q or -Q must be specified before \"%s\"",
- command_name);
- break;
- case 'l':
- local = 1;
- break;
- case 'R':
- local = 0;
- break;
- case 'd':
- delete = 1;
- break;
- case 'f':
- force_tag_match = 0;
- break;
- case 'b':
- branch_mode = 1;
- break;
- case 'r':
- numtag = optarg;
- break;
- case 'D':
- if (date)
- free (date);
- date = Make_Date (optarg);
- break;
- case 'F':
- force_tag_move = 1;
- break;
- case '?':
- default:
- usage (rtag_usage);
- break;
- }
- }
- argc -= optind;
- argv += optind;
- if (argc < 2)
- usage (rtag_usage);
- symtag = argv[0];
- argc--;
- argv++;
-
- if (date && numtag)
- error (1, 0, "-r and -D options are mutually exclusive");
- if (delete && branch_mode)
- error (0, 0, "warning: -b ignored with -d options");
- RCS_check_tag (symtag);
-
-#ifdef CLIENT_SUPPORT
- if (client_active)
- {
- /* We're the client side. Fire up the remote server. */
- start_server ();
-
- ign_setup ();
-
- if (local)
- send_arg("-l");
- if (delete)
- send_arg("-d");
- if (branch_mode)
- send_arg("-b");
- if (force_tag_move)
- send_arg("-T");
- if (run_module_prog)
- send_arg("-n");
- if (attic_too)
- send_arg("-a");
-
- if (numtag)
- option_with_arg ("-r", numtag);
- if (date)
- client_senddate (date);
-
- send_arg (symtag);
-
- {
- int i;
- for (i = 0; i < argc; ++i)
- send_arg (argv[i]);
- }
-
- if (fprintf (to_server, "rtag\n") < 0)
- error (1, errno, "writing to server");
- return get_responses_and_close ();
- }
-#endif
-
- 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 ? "D" : (numtag ? numtag :
- (date ? date : "A"))), symtag, argv[i], "");
- err += do_module (db, argv[i], TAG, delete ? "Untagging" : "Tagging",
- rtag_proc, (char *) NULL, 0, 0, run_module_prog,
- symtag);
- }
- close_module (db);
- return (err);
-}
-
-/*
- * callback proc for doing the real work of tagging
- */
-/* ARGSUSED */
-static int
-rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified,
- mname, msg)
- int *pargc;
- char **argv;
- char *xwhere;
- char *mwhere;
- char *mfile;
- int shorten;
- int local_specified;
- char *mname;
- char *msg;
-{
- int err = 0;
- int which;
- char repository[PATH_MAX];
- char where[PATH_MAX];
-
- (void) sprintf (repository, "%s/%s", CVSroot, argv[0]);
- (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[PATH_MAX];
-
- /* 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 */
- (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
- {
- int i;
-
- /* a file means muck argv */
- for (i = 1; i < *pargc; i++)
- free (argv[i]);
- argv[1] = xstrdup (mfile);
- (*pargc) = 2;
- }
- }
-
- /* chdir to the starting directory */
- if (chdir (repository) < 0)
- {
- error (0, errno, "cannot chdir to %s", repository);
- return (1);
- }
-
- if (delete || attic_too || (force_tag_match && numtag))
- which = W_REPOS | W_ATTIC;
- else
- which = W_REPOS;
-
- /* 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,
- (Dtype (*) ()) NULL, (int (*) ()) NULL,
- *pargc - 1, argv + 1, local, which, 0, 1,
- where, 1, 1);
-
- if (err)
- {
- error (1, 0, "correct the above errors first!");
- }
-
- /* start the recursion processor */
- err = start_recursion (rtag_fileproc, (int (*) ()) NULL, rtag_dirproc,
- (int (*) ()) NULL, *pargc - 1, argv + 1, local,
- which, 0, 1, where, 1, 1);
-
- dellist(&mtlist);
-
- return (err);
-}
-
-/* check file that is to be tagged */
-/* All we do here is add it to our list */
-
-static int
-check_fileproc(file, update_dir, repository, entries, srcfiles)
- char *file;
- char *update_dir;
- char *repository;
- List * entries;
- List * srcfiles;
-{
- char *xdir;
- Node *p;
- Vers_TS *vers;
-
- if (update_dir[0] == '\0')
- xdir = ".";
- else
- xdir = 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 = (struct master_lists *)
- xmalloc (sizeof (struct master_lists));
- ml->tlist = tlist;
- p->data = (char *) ml;
- p->delproc = masterlist_delproc;
- (void) addnode (mtlist, p);
- }
- /* do tlist */
- p = getnode ();
- p->key = xstrdup (file);
- p->type = UPDATE;
- p->delproc = tag_delproc;
- vers = Version_TS (repository, (char *) NULL, (char *) NULL,
- (char *) NULL, file, 0, 0, entries, srcfiles);
- p->data = RCS_getversion(vers->srcfile, numtag, date, force_tag_match);
- if (p->data != NULL)
- {
- int addit = 1;
- char *oversion;
-
- oversion = RCS_getversion (vers->srcfile, symtag, (char *) NULL, 1);
- if (oversion == NULL)
- {
- if (delete)
- {
- addit = 0;
- }
- }
- else if (strcmp(oversion, p->data) == 0)
- {
- addit = 0;
- }
- else if (!force_tag_move)
- {
- addit = 0;
- }
- if (oversion != NULL)
- {
- free(oversion);
- }
- if (!addit)
- {
- free(p->data);
- p->data = NULL;
- }
- }
- freevers_ts (&vers);
- (void) addnode (tlist, p);
- return (0);
-}
-
-static int
-check_filesdoneproc(err, repos, update_dir)
- int err;
- char *repos;
- char *update_dir;
-{
- int n;
- Node *p;
-
- p = findnode(mtlist, update_dir);
- if (p != NULL)
- {
- tlist = ((struct master_lists *) p->data)->tlist;
- }
- else
- {
- tlist = (List *) NULL;
- }
- if ((tlist == NULL) || (tlist->list->next == tlist->list))
- {
- return (err);
- }
- if ((n = Parse_Info(CVSROOTADM_TAGINFO, repos, pretag_proc, 1)) > 0)
- {
- error (0, 0, "Pre-tag check failed");
- err += n;
- }
- return (err);
-}
-
-static int
-pretag_proc(repository, filter)
- char *repository;
- char *filter;
-{
- if (filter[0] == '/')
- {
- char *s, *cp;
-
- s = xstrdup(filter);
- for (cp=s; *cp; cp++)
- {
- if (isspace(*cp))
- {
- *cp = '\0';
- break;
- }
- }
- if (!isfile(s))
- {
- error (0, errno, "cannot find pre-tag filter '%s'", s);
- free(s);
- return (1);
- }
- free(s);
- }
- run_setup("%s %s %s %s",
- filter,
- symtag,
- delete ? "del" : force_tag_move ? "mov" : "add",
- repository);
- walklist(tlist, pretag_list_proc, NULL);
- return (run_exec(RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL|RUN_REALLY));
-}
-
-static void
-masterlist_delproc(p)
- Node *p;
-{
- struct master_lists *ml;
-
- ml = (struct master_lists *)p->data;
- dellist(&ml->tlist);
- free(ml);
- return;
-}
-
-static void
-tag_delproc(p)
- Node *p;
-{
- if (p->data != NULL)
- {
- free(p->data);
- p->data = NULL;
- }
- return;
-}
-
-static int
-pretag_list_proc(p, closure)
- Node *p;
- void *closure;
-{
- if (p->data != NULL)
- {
- run_arg(p->key);
- run_arg(p->data);
- }
- return (0);
-}
-
-/*
- * Called to tag a particular file, as appropriate with the options that were
- * set above.
- */
-/* ARGSUSED */
-static int
-rtag_fileproc (file, update_dir, repository, entries, srcfiles)
- char *file;
- char *update_dir;
- char *repository;
- List *entries;
- List *srcfiles;
-{
- Node *p;
- RCSNode *rcsfile;
- char *version, *rev;
- int retcode = 0;
-
- /* find the parsed RCS data */
- p = findnode (srcfiles, file);
- if (p == NULL)
- return (1);
- rcsfile = (RCSNode *) p->data;
-
- /*
- * 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)
- return (rtag_delete (rcsfile));
-
- /*
- * 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))
- return (rtag_delete (rcsfile));
- }
-
- version = RCS_getversion (rcsfile, numtag, date, force_tag_match);
- 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);
- return (1);
- }
- return (0);
- }
- if (numtag && isdigit (*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->path, symtag, numtag);
- }
- 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 Version_Number 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, (char *) 0, 1);
- if (oversion != NULL)
- {
- int isbranch = RCS_isbranch (file, symtag, srcfiles);
-
- /*
- * 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);
- free (version);
- return (0);
- }
-
- if (!force_tag_move) { /* we're NOT going to move the tag */
- if (update_dir[0])
- (void) printf ("W %s/%s", update_dir, file);
- else
- (void) printf ("W %s", file);
-
- (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);
- free (version);
- return (0);
- }
- free (oversion);
- }
- retcode = RCS_settag(rcsfile->path, symtag, rev);
- }
-
- if (retcode != 0)
- {
- error (1, retcode == -1 ? errno : 0,
- "failed to set tag `%s' to revision `%s' in `%s'",
- symtag, rev, rcsfile->path);
- free (version);
- return (1);
- }
- free (version);
- return (0);
-}
-
-/*
- * If -d is specified, "force_tag_match" is set, so that this call to
- * Version_Number() 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 (rcsfile)
- RCSNode *rcsfile;
-{
- char *version;
- int retcode;
-
- if (numtag)
- {
- version = RCS_getversion (rcsfile, numtag, (char *) 0, 1);
- if (version == NULL)
- return (0);
- free (version);
- }
-
- version = RCS_getversion (rcsfile, symtag, (char *) 0, 1);
- if (version == NULL)
- return (0);
- free (version);
-
- if ((retcode = RCS_deltag(rcsfile->path, symtag, 1)) != 0)
- {
- if (!quiet)
- error (0, retcode == -1 ? errno : 0,
- "failed to remove tag `%s' from `%s'", symtag,
- rcsfile->path);
- return (1);
- }
- return (0);
-}
-
-/*
- * Print a warm fuzzy message
- */
-/* ARGSUSED */
-static Dtype
-rtag_dirproc (dir, repos, update_dir)
- char *dir;
- char *repos;
- char *update_dir;
-{
- if (!quiet)
- error (0, 0, "%s %s", delete ? "Untagging" : "Tagging", update_dir);
- return (R_PROCESS);
-}
-
-
-
diff --git a/gnu/usr.bin/cvs/src/server.c b/gnu/usr.bin/cvs/src/server.c
index c55c416d484..eae6ae95004 100644
--- a/gnu/usr.bin/cvs/src/server.c
+++ b/gnu/usr.bin/cvs/src/server.c
@@ -16,50 +16,19 @@
#include "getline.h"
#include "buffer.h"
-#ifdef SERVER_SUPPORT
-
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-
-#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS) || defined (HAVE_GSSAPI)
-#include <sys/socket.h>
-#endif
-
-#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
-
-#ifdef HAVE_GSSAPI
-
-#include <netdb.h>
-
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
-#include <gssapi/gssapi_generic.h>
-#endif
-
-#ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
-
+#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
+# ifdef HAVE_GSSAPI
+/* 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.
+ */
+# include <netdb.h>
+# include "xgssapi.h"
/* We use Kerberos 5 routines to map the GSSAPI credential to a user
name. */
-#include <krb5.h>
+# include <krb5.h>
/* We need this to wrap data. */
static gss_ctx_id_t gcontext;
@@ -69,37 +38,46 @@ static void gserver_authenticate_connection PROTO((void));
/* Whether we are already wrapping GSSAPI communication. */
static int cvs_gssapi_wrapping;
-# ifdef ENCRYPTION
+# ifdef ENCRYPTION
/* Whether to encrypt GSSAPI communication. We use a global variable
like this because we use the same buffer type (gssapi_wrap) to
handle both authentication and encryption, and we don't want
multiple instances of that buffer in the communication stream. */
int cvs_gssapi_encrypt;
-# endif
+# endif
+# endif /* HAVE_GSSAPI */
+#endif /* defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) */
+#ifdef SERVER_SUPPORT
+
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
#endif
-/* for select */
-#include <sys/types.h>
-#ifdef HAVE_SYS_BSDTYPES_H
-#include <sys/bsdtypes.h>
+#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS) || defined (HAVE_GSSAPI)
+#include <sys/socket.h>
#endif
-#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
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.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
+/* for select */
+#include "xselect.h"
+
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
@@ -112,18 +90,16 @@ int cvs_gssapi_encrypt;
#define blocking_error(err) ((err) == EAGAIN)
#endif
-#ifdef AUTH_SERVER_SUPPORT
-#ifdef HAVE_GETSPNAM
-#include <shadow.h>
-#endif
-#endif /* AUTH_SERVER_SUPPORT */
-
/* For initgroups(). */
#if HAVE_INITGROUPS
#include <grp.h>
#endif /* HAVE_INITGROUPS */
-
-#ifdef AUTH_SERVER_SUPPORT
+
+# 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
@@ -139,7 +115,7 @@ static char *Pserver_Repos = NULL;
CVSROOT/config. */
int system_auth = 1;
-#endif /* AUTH_SERVER_SUPPORT */
+# endif /* AUTH_SERVER_SUPPORT */
/* While processing requests, this buffer accumulates data to be sent to
@@ -420,10 +396,10 @@ create_adm_p (base_dir, dir)
differently. */
char *empty;
- empty = malloc (strlen (CVSroot_directory)
+ empty = malloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ sizeof (CVSNULLREPOS)
- + 10);
+ + 3);
if (! empty)
{
retval = ENOMEM;
@@ -431,7 +407,7 @@ create_adm_p (base_dir, dir)
}
/* Create the directory name. */
- (void) sprintf (empty, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (empty, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSNULLREPOS);
/* Create the directory if it doesn't exist. */
@@ -597,10 +573,16 @@ print_error (status)
int status;
{
char *msg;
+ char tmpstr[80];
+
buf_output0 (buf_to_net, "error ");
msg = strerror (status);
- if (msg)
- buf_output0 (buf_to_net, msg);
+ 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);
@@ -767,7 +749,7 @@ serve_root (arg)
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 (CVSroot_directory != NULL)
+ if (current_parsed_root != NULL)
{
if (alloc_pending (80 + strlen (arg)))
sprintf (pending_error_text,
@@ -790,21 +772,24 @@ E Protocol error: Root says \"%s\" but pserver says \"%s\"",
}
}
#endif
- set_local_cvsroot (arg);
+
+ if (current_parsed_root != NULL)
+ free_cvsroot_t (current_parsed_root);
+ current_parsed_root = local_cvsroot (arg);
/* For pserver, this will already have happened, and the call will do
nothing. But for rsh, we need to do it now. */
- parse_config (CVSroot_directory);
+ parse_config (current_parsed_root->directory);
- path = malloc (strlen (CVSroot_directory)
+ path = malloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
- + 10);
+ + 2);
if (path == NULL)
{
pending_error = ENOMEM;
return;
}
- (void) sprintf (path, "%s/%s", CVSroot_directory, CVSROOTADM);
+ (void) sprintf (path, "%s/%s", current_parsed_root->directory, CVSROOTADM);
if (readonlyfs == 0 && !isaccessible (path, R_OK | X_OK))
{
int save_errno = errno;
@@ -815,13 +800,13 @@ E Protocol error: Root says \"%s\" but pserver says \"%s\"",
free (path);
#ifdef HAVE_PUTENV
- env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 1 + 1);
+ env = malloc (strlen (CVSROOT_ENV) + strlen (current_parsed_root->directory) + 2);
if (env == NULL)
{
pending_error = ENOMEM;
return;
}
- (void) sprintf (env, "%s=%s", CVSROOT_ENV, CVSroot_directory);
+ (void) sprintf (env, "%s=%s", CVSROOT_ENV, current_parsed_root->directory);
(void) putenv (env);
/* do not free env, as putenv has control of it */
#endif
@@ -864,14 +849,14 @@ server_pathname_check (path)
static int outside_root PROTO ((char *));
/* Is file or directory REPOS an absolute pathname within the
- CVSroot_directory? If yes, return 0. If no, set pending_error
+ current_parsed_root->directory? If yes, return 0. If no, set pending_error
and return 1. */
static int
outside_root (repos)
char *repos;
{
size_t repos_len = strlen (repos);
- size_t root_len = strlen (CVSroot_directory);
+ size_t root_len = strlen (current_parsed_root->directory);
/* I think isabsolute (repos) should always be true, and that
any RELATIVE_REPOS stuff should only be in CVS/Repository
@@ -886,15 +871,15 @@ E protocol error: %s is not absolute", repos);
}
if (repos_len < root_len
- || strncmp (CVSroot_directory, repos, root_len) != 0)
+ || strncmp (current_parsed_root->directory, repos, root_len) != 0)
{
not_within:
- if (alloc_pending (strlen (CVSroot_directory)
+ 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, CVSroot_directory);
+ repos, current_parsed_root->directory);
return 1;
}
if (repos_len > root_len)
@@ -1097,8 +1082,9 @@ dirswitch (dir, repos)
(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
- && CVSroot_directory != NULL
- && strcmp (CVSroot_directory, repos) == 0)
+ && current_parsed_root != NULL
+ && current_parsed_root->directory != NULL
+ && strcmp (current_parsed_root->directory, repos) == 0)
{
if (fprintf (f, "/.") < 0)
{
@@ -2428,6 +2414,9 @@ error ENOMEM Virtual memory exhausted.\n";
/* 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
error_exit ();
}
@@ -2485,13 +2474,13 @@ check_command_legal_p (cmd_name)
int found_it = 0;
/* else */
- flen = strlen (CVSroot_directory)
+ flen = strlen (current_parsed_root->directory)
+ strlen (CVSROOTADM)
+ strlen (CVSROOTADM_READERS)
+ 3;
fname = xmalloc (flen);
- (void) sprintf (fname, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_READERS);
fp = fopen (fname, "r");
@@ -2537,13 +2526,13 @@ check_command_legal_p (cmd_name)
/* Now check the writers file. */
- flen = strlen (CVSroot_directory)
+ flen = strlen (current_parsed_root->directory)
+ strlen (CVSROOTADM)
+ strlen (CVSROOTADM_WRITERS)
+ 3;
fname = xmalloc (flen);
- (void) sprintf (fname, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_WRITERS);
fp = fopen (fname, "r");
@@ -2785,7 +2774,9 @@ error \n");
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 */
@@ -2802,11 +2793,11 @@ error \n");
exitstatus = (*command) (argument_count, argument_vector);
/* Output any partial lines. If the client doesn't support
- "MT", we just throw out the partial line, like old versions
- of CVS did, since the protocol can't support this. */
- if (supported_response ("MT") && ! buf_empty_p (saved_output))
+ "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, "MT text ");
+ buf_output0 (protocol, supported_response ("MT") ? "MT text " : "M ");
buf_append_buffer (protocol, saved_output);
buf_output (protocol, "\n", 1);
buf_send_counted (protocol);
@@ -2829,7 +2820,7 @@ error \n");
struct buffer *protocol_inbuf;
/* Number of file descriptors to check in select (). */
int num_to_check;
- int count_needed = 0;
+ int count_needed = 1;
#ifdef SERVER_FLOWCONTROL
int have_flowcontrolled = 0;
#endif /* SERVER_FLOWCONTROL */
@@ -2917,13 +2908,16 @@ error \n");
while (stdout_pipe[0] >= 0
|| stderr_pipe[0] >= 0
- || protocol_pipe[0] >= 0)
+ || protocol_pipe[0] >= 0
+ || count_needed <= 0)
{
fd_set readfds;
fd_set writefds;
int numfds;
#ifdef SERVER_FLOWCONTROL
int bufmemsize;
+ struct timeval *timeout_ptr;
+ struct timeval timeout;
/*
* See if we are swamping the remote client and filling our VM.
@@ -2944,8 +2938,24 @@ error \n");
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);
+ FD_SET (STDOUT_FILENO, &writefds);
if (stdout_pipe[0] >= 0)
{
@@ -2961,28 +2971,34 @@ error \n");
}
/* 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. */
+ 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,
- (fd_set *)0, (struct timeval *)NULL);
+ (fd_set *)0, timeout_ptr);
if (numfds < 0
- && errno != EINTR)
+ && 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? */
@@ -2994,7 +3010,6 @@ error \n");
{
int status;
int count_read;
- int special;
status = buf_input_data (protocol_inbuf, &count_read);
@@ -3017,29 +3032,49 @@ error \n");
* have.
*/
count_needed -= count_read;
- while (count_needed <= 0)
- {
- count_needed = buf_copy_counted (buf_to_net,
+ }
+ /* 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);
+ /* What should we do with errors? syslog() them? */
+ buf_send_output (buf_to_net);
- /* If SPECIAL got set to -1, it means that the child
- wants us to flush the pipe. We don't want to block
- on the network, but we flush what we can. If the
- client supports the 'F' command, we send it. */
- if (special == -1)
+ /* 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"))
{
- if (supported_response ("F"))
- {
- buf_append_char (buf_to_net, 'F');
- buf_append_char (buf_to_net, '\n');
- }
-
- cvs_flusherr ();
+ buf_append_char (buf_to_net, 'F');
+ buf_append_char (buf_to_net, '\n');
}
+ cvs_flusherr ();
+ break;
}
}
@@ -3426,6 +3461,11 @@ server_scratch (fname)
* 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)
{
@@ -3585,6 +3625,15 @@ serve_log (arg)
}
static void
+serve_rlog (arg)
+ char *arg;
+{
+ /* Tell cvslog() to behave like rlog not log. */
+ command_name = "rlog";
+ do_cvs_command ("rlog", cvslog);
+}
+
+static void
serve_add (arg)
char *arg;
{
@@ -3623,7 +3672,9 @@ static void
serve_rtag (arg)
char *arg;
{
- do_cvs_command ("rtag", rtag);
+ /* Tell cvstag() to behave like rtag not tag. */
+ command_name = "rtag";
+ do_cvs_command ("rtag", cvstag);
}
static void
@@ -3747,7 +3798,10 @@ serve_init (arg)
/* Fall through to do_cvs_command which will return the
actual error. */
}
- set_local_cvsroot (arg);
+
+ if (current_parsed_root != NULL)
+ free_cvsroot_t (current_parsed_root);
+ current_parsed_root = local_cvsroot (arg);
do_cvs_command ("init", init);
}
@@ -3760,6 +3814,17 @@ serve_annotate (arg)
{
do_cvs_command ("annotate", annotate);
}
+
+static void serve_rannotate PROTO ((char *));
+
+static void
+serve_rannotate (arg)
+ char *arg;
+{
+ /* Tell annotate() to behave like rannotate not annotate. */
+ command_name = "rannotate";
+ do_cvs_command ("rannotate", annotate);
+}
static void
serve_co (arg)
@@ -4157,6 +4222,23 @@ CVS server internal error: unhandled case in server_updated");
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)
{
@@ -4490,7 +4572,7 @@ serve_expand_modules (arg)
for (i = 1; i < argument_count; i++)
err += do_module (db, argument_vector[i],
CHECKOUT, "Updating", expand_proc,
- NULL, 0, 0, 0,
+ NULL, 0, 0, 0, 0,
(char *) NULL);
close_module (db);
server_expanding = 0;
@@ -4691,6 +4773,7 @@ struct request requests[] =
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("add", serve_add, 0),
REQ_LINE("remove", serve_remove, 0),
REQ_LINE("update-patches", serve_ignore, 0),
@@ -4712,6 +4795,7 @@ struct request requests[] =
REQ_LINE("editors", serve_editors, 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)
@@ -4745,7 +4829,7 @@ serve_valid_requests (arg)
buf_flush (buf_to_net, 1);
}
-#ifdef sun
+#ifdef SUNOS_KLUDGE
/*
* Delete temporary files. SIG is the signal making this happen, or
* 0 if not called as a result of a signal.
@@ -4762,7 +4846,7 @@ static void wait_sig (sig)
command_pid_is_dead++;
errno = save_errno;
}
-#endif
+#endif /* SUNOS_KLUDGE */
void
server_cleanup (sig)
@@ -4806,7 +4890,7 @@ server_cleanup (sig)
/* 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 sun
+#ifdef SUNOS_KLUDGE
if (command_pid > 0)
{
/* To avoid crashes on SunOS due to bugs in SunOS tmpfs
@@ -4879,7 +4963,7 @@ server_cleanup (sig)
}
}
}
-#endif
+#endif /* SUNOS_KLUDGE */
CVS_CHDIR (Tmpdir);
/* Temporarily clear noexec, so that we clean up our temp directory
@@ -5017,19 +5101,25 @@ error ENOMEM Virtual memory exhausted.\n");
pending_error = status;
}
#ifndef CHMOD_BROKEN
- else
+ else if (chmod (server_temp_dir, S_IRWXU) < 0)
{
- if (chmod (server_temp_dir, S_IRWXU) < 0)
- {
- int save_errno = errno;
- if (alloc_pending (80 + strlen (server_temp_dir)))
- sprintf (pending_error_text,
+ 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;
- }
+ 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;
+ }
}
}
@@ -5125,7 +5215,7 @@ error ENOMEM Virtual memory exhausted.\n");
continue;
if (!(rq->flags & RQ_ROOTLESS)
- && CVSroot_directory == NULL)
+ && current_parsed_root == NULL)
{
/* For commands which change the way in which data
is sent and received, for example Gzip-stream,
@@ -5259,10 +5349,10 @@ error 0 %s: no such user\n", username);
#endif
#if HAVE_PUTENV
- /* Set LOGNAME and USER in the environment, in case they are
- already set to something else. */
+ /* Set LOGNAME, USER and CVS_USER in the environment, in case they
+ are already set to something else. */
{
- char *env;
+ char *env, *cvs_user;
env = xmalloc (sizeof "LOGNAME=" + strlen (username));
(void) sprintf (env, "LOGNAME=%s", username);
@@ -5271,6 +5361,11 @@ error 0 %s: no such user\n", username);
env = xmalloc (sizeof "USER=" + strlen (username));
(void) sprintf (env, "USER=%s", username);
(void) putenv (env);
+
+ cvs_user = NULL != CVS_Username ? CVS_Username : "";
+ env = xmalloc (sizeof "CVS_USER=" + strlen (cvs_user));
+ (void) sprintf (env, "CVS_USER=%s", cvs_user);
+ (void) putenv (env);
}
#endif /* HAVE_PUTENV */
}
@@ -5305,7 +5400,7 @@ check_repository_password (username, password, repository, host_user_ptr)
int found_it = 0;
int namelen;
- /* We don't use CVSroot_directory because it hasn't been set yet
+ /* 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.
*/
@@ -5635,8 +5730,13 @@ pserver_authenticate_connection ()
{
int on = 1;
- (void) setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
- (char *) &on, sizeof on);
+ 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
+ }
}
#endif
@@ -5692,13 +5792,13 @@ pserver_authenticate_connection ()
error (1, 0, "bad auth protocol end: %s", tmp);
}
if (!root_allow_ok (repository))
- /* Just give a generic I HATE YOU. This is because CVS 1.9.10
- and older clients do not support "error". Once more recent
- clients are more widespread, probably want to fix this (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 %s: no such repository\n", repository);
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_NOTICE, "login refused for %s", repository);
+#endif
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
@@ -5714,6 +5814,13 @@ pserver_authenticate_connection ()
free (descrambled_password);
if (host_user == NULL)
{
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_NOTICE, "login failure (for %s)", repository);
+#ifdef LOG_AUTHPRIV
+ syslog (LOG_AUTHPRIV | LOG_NOTICE, "login failure by %s / %s (for %s)",
+ username, descrambled_password, repository);
+#endif
+#endif
i_hate_you:
printf ("I HATE YOU\n");
fflush (stdout);
@@ -5795,8 +5902,13 @@ error %s getpeername or getsockname failed\n", strerror (errno));
{
int on = 1;
- (void) setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
- (char *) &on, sizeof on);
+ 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
+ }
}
#endif
@@ -6392,13 +6504,20 @@ cvs_flusherr ()
#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, -1);
+ buf_send_special_count (protocol, -2);
}
else
#endif
@@ -6424,7 +6543,13 @@ cvs_flushout ()
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. */
+ 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
diff --git a/gnu/usr.bin/cvs/src/update.c b/gnu/usr.bin/cvs/src/update.c
index fc93e0da6a7..ec6e81831bd 100644
--- a/gnu/usr.bin/cvs/src/update.c
+++ b/gnu/usr.bin/cvs/src/update.c
@@ -58,7 +58,7 @@ static int patch_file PROTO ((struct file_info *finfo,
static void patch_file_write PROTO ((void *, const char *, size_t));
#endif
static int merge_file PROTO ((struct file_info *finfo, Vers_TS *vers));
-static int scratch_file PROTO((struct file_info *finfo));
+static int scratch_file PROTO((struct file_info *finfo, Vers_TS *vers));
static Dtype update_dirent_proc PROTO ((void *callerdat, char *dir,
char *repository, char *update_dir,
List *entries));
@@ -99,6 +99,7 @@ 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 int patches = 0;
static int rcs_diff_patches = 0;
@@ -107,7 +108,7 @@ static List *ignlist = (List *) NULL;
static time_t last_register_time;
static const char *const update_usage[] =
{
- "Usage: %s %s [-APdflRp] [-k kopt] [-r rev|-D date] [-j rev]\n",
+ "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",
@@ -117,7 +118,7 @@ static const char *const update_usage[] =
"\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.\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",
@@ -233,7 +234,7 @@ update (argc, argv)
argv += optind;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int pass;
@@ -409,7 +410,7 @@ update (argc, argv)
/* 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, join_rev1, join_rev2, (char *) NULL);
+ pipeout, which, join_rev1, join_rev2, (char *) NULL, 1);
/* free the space Make_Date allocated if necessary */
if (date != NULL)
@@ -423,7 +424,8 @@ update (argc, argv)
*/
int
do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
- xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir)
+ xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir,
+ xdotemplate)
int argc;
char **argv;
char *xoptions;
@@ -439,6 +441,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
char *xjoin_rev1;
char *xjoin_rev2;
char *preload_update_dir;
+ int xdotemplate;
{
int err = 0;
char *cp;
@@ -452,6 +455,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
aflag = xaflag;
update_prune_dirs = xprune;
pipeout = xpipeout;
+ dotemplate = xdotemplate;
/* setup the join support */
join_rev1 = xjoin_rev1;
@@ -503,11 +507,15 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
argc, argv, local, which, aflag, 1,
preload_update_dir, 1);
+#ifdef SERVER_SUPPORT
+ if (server_active)
+ return err;
+#endif
+
/* see if we need to sleep before returning to avoid time-stamp races */
if (last_register_time)
{
- while (time ((time_t *) NULL) == last_register_time)
- sleep (1);
+ sleep_past (last_register_time);
}
return (err);
@@ -575,9 +583,6 @@ update_fileproc (callerdat, finfo)
int retval;
Ctype status;
Vers_TS *vers;
- int resurrecting;
-
- resurrecting = 0;
status = Classify_File (finfo, tag, date, options, force_tag_match,
aflag, &vers, pipeout);
@@ -623,9 +628,7 @@ update_fileproc (callerdat, finfo)
case T_MODIFIED: /* locally modified */
case T_REMOVED: /* removed but not committed */
case T_CHECKOUT: /* needs checkout */
-#ifdef SERVER_SUPPORT
case T_PATCH: /* needs patch */
-#endif
retval = checkout_file (finfo, vers, 0, 0, 0);
break;
@@ -650,8 +653,12 @@ update_fileproc (callerdat, finfo)
write_letter (finfo, 'C');
break;
case T_NEEDS_MERGE: /* needs merging */
- retval = merge_file (finfo, vers);
- break;
+ if (! toss_local_changes)
+ {
+ retval = merge_file (finfo, vers);
+ break;
+ }
+ /* else FALL THROUGH */
case T_MODIFIED: /* locally modified */
retval = 0;
if (toss_local_changes)
@@ -731,8 +738,8 @@ update_fileproc (callerdat, finfo)
}
}
break;
-#ifdef SERVER_SUPPORT
case T_PATCH: /* needs patch */
+#ifdef SERVER_SUPPORT
if (patches)
{
int docheckout;
@@ -754,11 +761,11 @@ update_fileproc (callerdat, finfo)
break;
}
}
+#endif
/* If we're not running as a server, just check the
file out. It's simpler and faster than producing
and applying patches. */
/* Fall through. */
-#endif
case T_CHECKOUT: /* needs checkout */
retval = checkout_file (finfo, vers, 0, 0, 1);
break;
@@ -771,18 +778,7 @@ update_fileproc (callerdat, finfo)
retval = 0;
break;
case T_REMOVE_ENTRY: /* needs to be un-registered */
- retval = scratch_file (finfo);
-#ifdef SERVER_SUPPORT
- if (server_active && retval == 0)
- {
- if (vers->ts_user == NULL)
- server_scratch_entry_only ();
- server_updated (finfo, vers,
- SERVER_UPDATED, (mode_t) -1,
- (unsigned char *) NULL,
- (struct buffer *) NULL);
- }
-#endif
+ retval = scratch_file (finfo, vers);
break;
default: /* can't ever happen :-) */
error (0, 0,
@@ -797,7 +793,7 @@ update_fileproc (callerdat, finfo)
join_file (finfo, vers);
/* if this directory has an ignore list, add this file to it */
- if (ignlist)
+ if (ignlist && (status != T_UNKNOWN || vers->ts_user == NULL))
{
Node *p;
@@ -877,7 +873,7 @@ update_filesdone_proc (callerdat, err, repository, update_dir, entries)
{
/* If there is no CVS/Root file, add one */
if (!isfile (CVSADM_ROOT))
- Create_Root ((char *) NULL, CVSroot_original);
+ Create_Root ((char *) NULL, current_parsed_root->original);
}
return (err);
@@ -970,7 +966,7 @@ update_dirent_proc (callerdat, dir, repository, update_dir, entries)
via WriteTag. */
0,
0,
- 1);
+ dotemplate);
rewrite_tag = 1;
nonbranch = 0;
Subdir_Register (entries, (char *) NULL, dir);
@@ -1173,7 +1169,7 @@ isemptydir (dir, might_not_exist)
return (0);
}
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (strcmp (dp->d_name, ".") != 0
&& strcmp (dp->d_name, "..") != 0)
@@ -1182,7 +1178,7 @@ isemptydir (dir, might_not_exist)
{
/* An entry other than the CVS directory. The directory
is certainly not empty. */
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
else
@@ -1213,7 +1209,7 @@ isemptydir (dir, might_not_exist)
{
/* There are files that have been removed, but not
committed! Do not consider the directory empty. */
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
}
@@ -1223,10 +1219,10 @@ isemptydir (dir, might_not_exist)
if (errno != 0)
{
error (0, errno, "cannot read directory %s", dir);
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (1);
}
@@ -1234,13 +1230,46 @@ isemptydir (dir, might_not_exist)
* scratch the Entries file entry associated with a file
*/
static int
-scratch_file (finfo)
+scratch_file (finfo, vers)
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,
+ (unsigned char *) NULL,
+ (struct buffer *) NULL);
+ }
+#endif
if (unlink_file (finfo->file) < 0 && ! existence_error (errno))
error (0, errno, "unable to remove %s", finfo->fullname);
+ else
+#ifdef SERVER_SUPPORT
+ /* skip this step when the server is running since
+ * server_updated should have handled it */
+ if (!server_active)
+#endif
+ {
+ /* 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);
}
@@ -1744,7 +1773,7 @@ patch_file (finfo, vers_ts, docheckout, file_info, checksum)
diff_options = "-n";
}
- retcode = diff_exec (file1, file2, diff_options, finfo->file);
+ retcode = diff_exec (file1, file2, NULL, NULL, diff_options, finfo->file);
/* A retcode of 0 means no differences. 1 means some differences. */
if (retcode != 0
@@ -2120,6 +2149,17 @@ join_file (finfo, vers)
char *jdate1;
char *jdate2;
+ if (trace)
+ fprintf (stderr, "%s-> join_file(%s, %s%s%s%s, %s, %s)\n",
+ CLIENT_SERVER_STR,
+ 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 = date_rev1;
@@ -2288,7 +2328,14 @@ join_file (finfo, vers)
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. */
+ 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 = xmalloc (strlen (vers->vn_user) + 2);
+ sprintf (mrev, "-%s", vers->vn_user);
#ifdef SERVER_SUPPORT
if (server_active)
{
@@ -2297,8 +2344,6 @@ join_file (finfo, vers)
(unsigned char *) NULL, (struct buffer *) NULL);
}
#endif
- mrev = xmalloc (strlen (vers->vn_user) + 2);
- sprintf (mrev, "-%s", vers->vn_user);
Register (finfo->entries, finfo->file, mrev, vers->ts_rcs,
vers->options, vers->tag, vers->date, vers->ts_conflict);
free (mrev);
@@ -2341,6 +2386,7 @@ join_file (finfo, vers)
addition. */
if (vers->vn_user == NULL)
{
+ char *saved_options = options;
Vers_TS *xvers;
xvers = Version_TS (finfo, vers->options, jrev2, jdate2, 1, 0);
@@ -2355,6 +2401,7 @@ join_file (finfo, vers)
/* FIXME: If checkout_file fails, we should arrange to
return a non-zero exit status. */
status = checkout_file (finfo, xvers, 1, 0, 1);
+ options = saved_options;
freevers_ts (&xvers);
diff --git a/gnu/usr.bin/cvs/stamp-h.in b/gnu/usr.bin/cvs/stamp-h.in
deleted file mode 100644
index bb5e5e3873f..00000000000
--- a/gnu/usr.bin/cvs/stamp-h.in
+++ /dev/null
@@ -1 +0,0 @@
-Wed Oct 5 15:45:29 EDT 1994
diff --git a/gnu/usr.bin/cvs/zlib/algorithm.doc b/gnu/usr.bin/cvs/zlib/algorithm.doc
deleted file mode 100644
index 01902aff666..00000000000
--- a/gnu/usr.bin/cvs/zlib/algorithm.doc
+++ /dev/null
@@ -1,105 +0,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by zlib (also zip and gzip) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data. The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length). Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes. (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for a
-longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the longer match is emitted afterwards. Otherwise,
-the original match is kept, and the next match search is attempted only
-N steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-The real question is, given a Huffman tree, how to decode fast. The most
-important realization is that shorter codes are much more common than
-longer codes, so pay attention to decoding the short codes fast, and let
-the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code. It gets that many bits from the
-stream, and looks it up in the table. The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table. If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code. However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table. What inflate() does is
-simply to make the number of bits in the first table a variable, and set it
-for the maximum speed.
-
-inflate() sends new trees relatively often, so it is possibly set for a
-smaller first level table than an application that has only one tree for
-all the data. For inflate, which has 286 possible codes for the
-literal/length tree, the size of the first table is nine bits. Also the
-distance trees have 30 possible values, and the size of the first table is
-six bits. Note that for each of those cases, the table ended up one bit
-longer than the ``average'' code length, i.e. the code length of an
-approximately flat code which would be a little more than eight bits for
-286 symbols and a little less than five bits for 30 symbols. It would be
-interesting to see if optimizing the first level table for other
-applications gave values within a bit or two of the flat code size.
-
-
-Jean-loup Gailly Mark Adler
-gzip@prep.ai.mit.edu madler@alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-ftp://ds.internic.net/rfc/rfc1951.txt
diff --git a/gnu/usr.bin/cvs/zlib/build_zlib.com b/gnu/usr.bin/cvs/zlib/build_zlib.com
deleted file mode 100644
index cd998fc4918..00000000000
--- a/gnu/usr.bin/cvs/zlib/build_zlib.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$ CC :== CC/DEBUG/NOOPTIMIZE/STANDARD=VAXC/DEFINE=HAVE_CONFIG_H-
-/INCLUDE_DIRECTORY=([-],[-.LIB],[-.SRC],[-.VMS])/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
-$ CC adler32.c
-$ CC compress.c
-$ CC crc32.c
-$ CC uncompr.c
-$ CC deflate.c
-$ CC trees.c
-$ CC zutil.c
-$ CC inflate.c
-$ CC infblock.c
-$ CC inftrees.c
-$ CC infcodes.c
-$ CC infutil.c
-$ CC inffast.c
-$ library/create zlib.olb adler32.obj,-
-compress.obj,crc32.obj,uncompr.obj,deflate.obj,trees.obj,zutil.obj,-
-inflate.obj,infblock.obj,inftrees.obj,infcodes.obj,infutil.obj,inffast.obj
diff --git a/gnu/usr.bin/cvs/zlib/zlib.def b/gnu/usr.bin/cvs/zlib/zlib.def
deleted file mode 100644
index 08c6d5501a4..00000000000
--- a/gnu/usr.bin/cvs/zlib/zlib.def
+++ /dev/null
@@ -1,46 +0,0 @@
-LIBRARY "zlib"
-
-DESCRIPTION '"""zlib data compression library"""'
-
-EXETYPE NT
-
-SUBSYSTEM WINDOWS
-
-STUB 'WINSTUB.EXE'
-
-VERSION 1.04
-
-CODE EXECUTE READ
-
-DATA READ WRITE
-
-HEAPSIZE 1048576,4096
-
-EXPORTS
- zlibVersion
- deflate
- deflateEnd
- inflate
- inflateEnd
- deflateSetDictionary
- deflateCopy
- deflateReset
- deflateParams
- inflateSetDictionary
- inflateSync
- inflateReset
- compress
- uncompress
- gzopen
- gzdopen
- gzread
- gzwrite
- gzflush
- gzclose
- gzerror
- adler32
- crc32
- deflateInit_
- inflateInit_
- deflateInit2_
- inflateInit2_
diff --git a/gnu/usr.bin/cvs/zlib/zlib.dsp b/gnu/usr.bin/cvs/zlib/zlib.dsp
deleted file mode 100644
index 7a20a8f9cbf..00000000000
--- a/gnu/usr.bin/cvs/zlib/zlib.dsp
+++ /dev/null
@@ -1,146 +0,0 @@
-# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=zlib - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "zlib.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "zlib - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-
-!IF "$(CFG)" == "zlib - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "zlib - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "zlib - Win32 Release"
-# Name "zlib - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "*.c"
-# Begin Source File
-
-SOURCE=.\adler32.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\compress.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\crc32.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\deflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\example.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\gzio.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\infblock.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\infcodes.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\inffast.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\inflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\inftrees.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\infutil.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\minigzip.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\trees.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\uncompr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\zutil.c
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/gnu/usr.bin/cvs/zlib/zlib.rc b/gnu/usr.bin/cvs/zlib/zlib.rc
deleted file mode 100644
index 2c0a3e4defc..00000000000
--- a/gnu/usr.bin/cvs/zlib/zlib.rc
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <windows.h>
-
-#define IDR_VERSION1 1
-IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
- FILEVERSION 1,0,4,0
- PRODUCTVERSION 1,0,4,0
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
- FILEFLAGS 0
- FILEOS VOS_DOS_WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE 0 // not used
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904E4"
- //language ID = U.S. English, char set = Windows, Multilingual
-
- BEGIN
- VALUE "FileDescription", "zlib data compression library\0"
- VALUE "FileVersion", "1.0.4\0"
- VALUE "InternalName", "zlib\0"
- VALUE "OriginalFilename", "zlib.lib\0"
- VALUE "ProductName", "ZLib.DLL\0"
- VALUE "Comments", "DLL support by Alessandro Iacopetti\0"
- VALUE "LegalCopyright", "(C) 1995-1996 Jean-loup Gailly & Mark Adler\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0409, 1252
- END
-END