]> git.cworth.org Git - gzip/commitdiff
Imported Debian patch 1.3.12-1
authorBdale Garbee <bdale@gag.com>
Wed, 13 Jun 2007 22:55:42 +0000 (18:55 -0400)
committerBdale Garbee <bdale@gag.com>
Fri, 6 Jun 2008 04:29:40 +0000 (22:29 -0600)
73 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
README
aclocal.m4
build-aux/config.guess [new file with mode: 0755]
build-aux/config.sub [new file with mode: 0755]
build-aux/depcomp
build-aux/install-sh
build-aux/mdate-sh
build-aux/texinfo.tex
configure
configure.ac
debian/changelog
debian/copyright
debian/rules
doc/Makefile.in
doc/gzip.info
doc/gzip.texi
doc/stamp-vti
doc/version.texi
gunzip.in [new file with mode: 0644]
gzexe.1
gzexe.in
gzip.c
gzip.h
lib/Makefile.in
lib/config.hin
lib/dup-safer.c
lib/exit.h [deleted file]
lib/exitfail.c
lib/fcntl_.h
lib/getopt_.h
lib/gnulib.mk
lib/stat-time.h
lib/stat_.h
lib/stdbool_.h
lib/stdlib_.h [new file with mode: 0644]
lib/sys_time_.h [new file with mode: 0644]
lib/time_.h [new file with mode: 0644]
lib/timespec.h [deleted file]
lib/unistd_.h [new file with mode: 0644]
lib/utimens.c
lib/utimens.h
lib/xalloc.h
m4/fcntl-safer.m4
m4/gnulib-common.m4 [new file with mode: 0644]
m4/gnulib-comp.m4
m4/shell.m4
m4/stat-time.m4
m4/stdlib_h.m4 [new file with mode: 0644]
m4/sys_time_h.m4 [new file with mode: 0644]
m4/time_h.m4 [new file with mode: 0644]
m4/timespec.m4 [deleted file]
m4/unistd_h.m4
m4/utimbuf.m4
m4/utimens.m4
zcat.in [new file with mode: 0644]
zcmp.in [new file with mode: 0644]
zdiff.1
zdiff.in
zegrep.in [new file with mode: 0644]
zfgrep.in [new file with mode: 0644]
zforce.in
zgrep.1
zgrep.in
zip.c
zless.1
zless.in
zmore.1
zmore.in
znew.in

index bd6e350c535a3ed0b9b31b1de115847650b330a3..c20f14537818351a838381722e936cbb92415808 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,199 @@
+2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Version 1.3.12 released.
+       * configure.ac (AC_INIT): Likewise.
+
+       * README: Update year in copyright notice.
+       * m4/shell.m4: Add copyright notice.
+
+       * bootstrap (gnulib_tool_option_extras): Put this back; it was
+       inadvertently omitted from gnulib.
+       (gnulib_tool_option): Use it.
+       * .cvsignore: Add *._bootmp*.
+       * lib/.cvsignore: Add stdlib.h, stdlib_.h, time.h, time_.h, unistd.h.
+       Remove alloca.c, alloca.h, alloca_.h, exit.h, getdelim.c, getdelim.h,
+       getline.c, getline.h, malloc.c, mbchar.c, mbchar.h, mbuiter.h, memchr.c,
+       regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
+       regexec.c, rpmatch.c, stdint.h, stdint_.h, strcase.h, strcasecmp.c,
+       strncasecmp.c, strnlen1.c, strnlen1.h, timespec.h, wcwidth.h.
+       * m4/.cvsignore: Add stdlib_h.m4, time_h.m4.
+       Remove alloca.m4, codeset.m4, getdelim.m4, getline.m4,
+       longlong.m4, mbchar.m4, mbiter.m4, mbrtowc.m4, memchr.m4, regex.m4,
+       rpmatch.m4, ssize_t.m4, stdint.m4 strcase.m4, timespec.m4, ulonglong.m4,
+       wchar_t.m4, wcwidth.m4, wint_t.m4.
+
+2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
+
+       * znew.in (tmp): Use $TMPDIR as temp directory, if given.
+       Suggested by Juan Manuel Guerrero.
+
+2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * README-hacking: New file, renamed from README-cvs.
+       * README-cvs: Remove.
+       * bootstrap: Sync from today's gnulib.
+       * bootstrap.conf (gnulib_modules): Add 'time'.
+       * gzip.c: Don't include timespec.h; 'time' fixes time.h for that.
+       * zip.c: Likewise.
+       * gzip.c: Don't include time.h or sys/time.h; gzip.h now includes
+       time.h, which is now enough.
+       * gzip.h: Include <time.h>.
+
+2007-03-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * README (WARNING): Reword to avoid mention of no-longer-existing
+       section in INSTALL file.  Problem reported by Paul Townsend in
+       <http://lists.gnu.org/archive/html/bug-gzip/2007-03/msg00000.html>.
+
+2007-02-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * gzip.c (foreground): Initialize to zero.  This doesn't fix a bug
+       since C guarantees it's zero, but it's more consistent with the
+       rest of the code.  Problem reported by Mark Adler.
+
+2007-02-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * zdiff.in: Don't use '((' in a shell script, as it's not portable
+       to some ksh implementations, e.g., Solaris 10 ksh M-11/16/88i.
+       Problem reported by Nelson H. F. Beebe in
+       <http://lists.gnu.org/archive/html/bug-gzip/2007-02/msg00005.html>.
+
+2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Version 1.3.11 released.
+       * configure.ac (AC_INIT): Likewise.
+
+       * doc/gzip.texi: Convert Texinfo format into a more modern style.
+       Put in current output samples.
+
+       * .cvsignore: Add *.gz, gunzip, zcat, zcmp, zegrep, zfgrep.
+       * lib/.cvsignore: Add sys_time_.h, unistd_.h.
+       * m4/.cvsignore: Add gnulib-common.m4, sys_time_h.m4.
+
+       * gunzip.in, zcat.in, zcmp.in, zegrep.in, zfgrep.in: New files.
+       * Makefile.am (EXTRA_DIST): Add them.
+       (bin_SCRIPTS, MOSTLYCLEANFILES): Add gunzip, zcat, zcmp, zdgrep, zfgrep.
+       (.in): Use GZIP_BINDIR as the location of gzip binaries, if it is set.
+       (check-local): Use GZIP_BINDIR.
+       (install-exec-hook, remove-installed-links): Make 'uncompress' an
+       alias for gunzip.
+       * gzexe.1: At least one arg is required.  Don't give cat as an
+       example, since gzexe refuses to compress cat due to a bootstrapping
+       issue.  List more utilities in this category.
+       * gzexe.in, zdiff.in, zforce.in, zgrep.in, zless.in, zmore.in, znew.in:
+       Report our name in usage.
+       * gzexe.in: Don't compress bash.  Don't use rmdir, so it's
+       OK to compress rmdir.
+       * gzip.c: Now requires that you compile with -DGNU_STANDARD=0 to
+       get non GNU-standard behavior.  We now build with GNU-standard
+       behavior by default, so that programs do not depend on the names
+       of their executables.
+       * zdiff.in: Don't depend on the name of the executable, as per
+       GNU standard.  Instead, rely on an internal --__cmp option.
+       Support ' in options.  Check for failures in subsidiary gzip
+       invocations.
+       * zgrep.1: Clarify compression issues.
+       * zgrep.in: Don't assume POSIX-style case syntax.  Remove unused var
+       have_optarg.
+       * zless.1: zless sets LESSMETACHARS now.
+
+2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * m4/shell.m4 (AC_PROG_SHELL): Test that $(...) works.
+       Problem reported for SGI IRIX 6 by Nelson H. F. Beebe in
+       <http://lists.gnu.org/archive/html/bug-gzip/2007-01/msg00007.html>.
+
+2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * zdiff.in (cmp0): New var.
+       Rewrite test for /dev/fd/3 to detect bugs in Solaris 8
+       /bin/bash 2.03.  Problem reported by Nelson H. F. Beebe in
+       <http://lists.gnu.org/archive/html/bug-gzip/2007-01/msg00001.html>.
+       Avoid "for file; do", which doesn't work with Solaris 8 /bin/sh.
+
+2007-01-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * zdiff.in: Test /dev//fd/3, not /dev/fd/3, to work around a problem
+       with Tru64 4.0F ksh M-11/16/88f reported by Thomas Koutcher in
+       <http://lists.gnu.org/archive/html/bug-gzip/2007-01/msg00000.html>.
+
+2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Version 1.3.10 released.
+       * configure.ac (AC_INIT): Likewise.
+
+       * Makefile.am (check-local): Don't assume $(srcdir) is '.'.
+       (MAINTAINERCLEANFILES): Move gzip.doc.gz from here ...
+       (MOSTLYCLEANFILES): ... to here.
+
+2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * zless.in: Work around a bug in less 394 and earlier; it
+       mishandles $%=~ in file names.  Problem reported by
+       Sami Liedes in <http://bugs.debian.org/383358>.
+
+       * doc/gzip.texi: Swap order of dircategory entries, to pacify
+       Debian install-info 1.10.28.  This should fix
+       <http://bugs.debian.org/404048>.
+
+       * zgrep.in (version): Fix bug: $grep wasn't evaluated.
+
+       * zgrep.in: Rewrite to make the option processing more
+       compatible with GNU and POSIX grep.  Assume POSIX shell
+       for more stuff, since we're already assuming that.
+       * Makefile.am (check-local): Check zgrep -iV.
+
+2006-12-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix Debian bug 367673 <http://bugs.debian.org/367673> plus several
+       other bugs discovered in the neighborhood.
+       * NEWS: gzip -q now exits with status 2 (not 1) on SIGPIPE.
+       zgrep has many bugs fixed with argument handling, special characters,
+       and exit status.
+       * gzip.c (abort_gzip_signal): Implement gzip -q change.
+       * zgrep.in: Implement zgrep change.
+
+2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Fix bug reported by Martin Mares in
+       <http://bugs.debian.org/177942>.
+       * gzip.c (treat_stdin): Remove NO_STDIN_FSTAT and NO_PIPE_TIMESTAMP
+       stuff.  It didn't work (led to syntax errors) and was confusing.
+       Report an error if stdin cannot be statted even if !list && no_time.
+       Get stdin's size if it is regular.
+       (treat_file): Do not report an error with setuid, setgid,
+       sticky, or non-regular, non-directory files if to_stdout.
+       Allow 'force' to override the caution about sticky files.
+       Use the same form for time stamps that treat_stdin uses.
+
+       * zdiff.in: Fix typo that broke most usages.  Problem reported by
+       Jari Aalto in <http://bugs.debian.org/404114>.  While we're at it,
+       fix a bunch of other problems.  Handle "-" better.  Send
+       diagnostics to stderr, not stdout.  Use expr rather than echo |
+       sed, to handle special characters better.  Report a diagnostic in
+       the 1-arg case, if the argument doesn't end in .gz or the like,
+       rather than having incomprehensible behavior.  Do not require that
+       the inputs be regular files.  Avoid creating a temporary entirely,
+       if /dev/fd works.  If not, then resist denial-of-service attacks
+       better, by using mktemp.
+       * NEWS: Document this.
+       * Makefile.am (gzip.doc.gz): New rule.
+       (check-local): Depend on it, and test zdiff for Debian bug 404114.
+
+2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * zdiff.1: Mention that these programs currently understand only
+       formats that gzip does.  Problem reported by Jari Aalto in
+       <http://bugs.debian.org/404099>.
+
+2006-12-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * inflate.c (huft_build): Fix regression that caused gzip to
+       refuse to uncompress null input (all zero length codes).  Problem
+       reported by Yiorgos Adamopoulos.  This regression was caused by
+       the security patch installed 2006-11-20, which in turn came from
+       Debian, which in turn apparently came from Thomas Biege of SuSe.
+
 2006-12-15  Paul Eggert  <eggert@cs.ucla.edu>
 
        * NEWS, configure.ac (AC_INIT):
@@ -1510,7 +1706,7 @@ Sat Oct 31 12:46:00 1992  Jean-loup Gailly  (jloup@chorus.fr)
 
        -----
 
-       Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2006 Free
+       Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2006, 2007 Free
        Software Foundation, Inc.
 
        Copyright (C) 1992, 1993 Jean-loup Gailly
index 917641d4ee042642651c2b32a8df393f03787827..5799d753936e96c2a4d45e33e05286ae1179e560 100644 (file)
@@ -1,6 +1,6 @@
 # Make gzip (GNU zip).
 
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2006, 2007 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
@@ -26,7 +26,7 @@ man_MANS = gunzip.1 gzexe.1 gzip.1 \
 EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
   algorithm.doc amiga/match.a amiga/Makefile.gcc amiga/Makefile.sasc \
   amiga/tailor.c amiga/utime.h atari/Makefile.st crypt.h \
-  gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
+  gunzip.in gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
   msdos/gzip.prj msdos/doturboc.bat msdos/Makefile.msc msdos/Makefile.bor \
   msdos/Makefile.djg nt/Makefile.nt os2/gzip.def os2/Makefile.os2 \
   os2/gzip16.def primos/include/errno.h primos/include/fcntl.h \
@@ -35,11 +35,12 @@ EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
   primos/primos.c primos/ci.opts revision.h sample/makecrc.c \
   sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \
   tailor.h vms/Makefile.mms vms/gzip.hlp vms/vms.c vms/Readme.vms \
-  vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zdiff.in \
-  zforce.in zgrep.in zless.in zmore.in znew.in
+  vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zcat.in zcmp.in zdiff.in \
+  zegrep.in zfgrep.in zforce.in zgrep.in zless.in zmore.in znew.in
 
 bin_PROGRAMS = gzip
-bin_SCRIPTS = gzexe zdiff zgrep zforce zless zmore znew
+bin_SCRIPTS = gunzip gzexe zcat zcmp zdiff \
+  zegrep zfgrep zforce zgrep zless zmore znew
 gzip_SOURCES = \
   bits.c crypt.c deflate.c gzip.c inflate.c lzw.c \
   trees.c unlzh.c unlzw.c unpack.c unzip.c util.c zip.c
@@ -48,11 +49,14 @@ gzip_LDADD = lib/libgzip.a
 gzip.doc: gzip.1
        groff -man -Tascii $(srcdir)/gzip.1 | col -b | uniq >$@
 
+gzip.doc.gz: gzip.doc
+       gzip <$? >$@
+
 SUFFIXES = .in
 .in:
        sed \
                -e 's|/bin/sh|$(SHELL)|g' \
-               -e 's|BINDIR|$(bindir)|g' \
+               -e 's|BINDIR|$${GZIP_BINDIR-'\''$(bindir)'\''}|g' \
                -e 's|[@]VERSION@|$(VERSION)|g' \
                $(srcdir)/$@.in >$@
        chmod a+x $@
@@ -60,7 +64,13 @@ SUFFIXES = .in
 # A simple test, just of gzip -- more of a sanity check than anything else.
 FILES_TO_CHECK = $(bin_SCRIPTS) $(gzip_LDADD) \
   $(top_srcdir)/ChangeLog $(top_srcdir)/configure $(top_srcdir)/gzip.c
-check-local: $(FILES_TO_CHECK)
+check-local: $(FILES_TO_CHECK) gzip.doc.gz
+       { test '$(srcdir)' != . || GZIP_BINDIR=. ./zdiff -c gzip.doc.gz; }
+       GZIP_BINDIR=. ./zdiff -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc
+       GZIP_BINDIR=. ./zdiff $(srcdir)/gzip.doc gzip.doc.gz
+       GZIP_BINDIR=. ./zdiff -c - $(srcdir)/gzip.doc <gzip.doc.gz
+       GZIP_BINDIR=. ./zdiff -c gzip.doc.gz gzip.doc.gz
+       GZIP_BINDIR=. ./zgrep -iV >/dev/null
        for file in $(FILES_TO_CHECK); do \
          ./gzip -cv -- "$$file" | ./gzip -d | cmp - "$$file" || exit; \
        done
@@ -71,9 +81,7 @@ install-exec-hook remove-installed-links:
        @for prog_ext in $(bin_PROGRAMS) $(bin_SCRIPTS); do \
          prog=`echo "$$prog_ext"|sed 's/$(EXEEXT)$$//'`; \
          case $$prog in \
-         gzip) aliases='gunzip zcat';; \
-         zdiff) aliases='zcmp';; \
-         zgrep) aliases='zegrep zfgrep';; \
+         gunzip) aliases='uncompress';; \
          *) continue;; \
          esac; \
          transform='$(transform)'; \
@@ -98,5 +106,5 @@ uninstall-local: remove-installed-links
 
 MAINTAINERCLEANFILES = gzip.doc
 
-MOSTLYCLEANFILES = _match.i match_.s _match.S \
-  gzexe zdiff zforce zgrep zless zmore znew
+MOSTLYCLEANFILES = _match.i match_.s _match.S gzip.doc.gz \
+  gunzip gzexe zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
index 91f760419e2765daeda34d5aa877aae988a7872f..baf3e1de3e45b5ffcb6c93220cadb9eef55055af 100644 (file)
@@ -16,7 +16,7 @@
 
 # Make gzip (GNU zip).
 
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2006, 2007 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
@@ -54,17 +54,20 @@ subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
        ChangeLog INSTALL NEWS README-alpha THANKS TODO \
-       build-aux/compile build-aux/depcomp build-aux/install-sh \
-       build-aux/mdate-sh build-aux/missing build-aux/texinfo.tex
+       build-aux/compile build-aux/config.guess build-aux/config.sub \
+       build-aux/depcomp build-aux/install-sh build-aux/mdate-sh \
+       build-aux/missing build-aux/texinfo.tex
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
        $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \
        $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
        $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/inline.m4 \
        $(top_srcdir)/m4/shell.m4 $(top_srcdir)/m4/stat-time.m4 \
-       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
-       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+       $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
+       $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
        $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/utimbuf.m4 \
        $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes.m4 \
        $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/yesno.m4 \
@@ -124,7 +127,11 @@ GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
+ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
 ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@
+ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@
+ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@
+ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 ASCPPFLAGS = @ASCPPFLAGS@
@@ -149,7 +156,26 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FCNTL_H = @FCNTL_H@
 GETOPT_H = @GETOPT_H@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_READLINK = @GNULIB_READLINK@
 GREP = @GREP@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE__BOOL = @HAVE__BOOL@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -159,9 +185,11 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
 LIBGZIP_LIBDEPS = @LIBGZIP_LIBDEPS@
 LIBGZIP_LTLIBDEPS = @LIBGZIP_LTLIBDEPS@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN_S = @LN_S@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
@@ -175,12 +203,23 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STDBOOL_H = @STDBOOL_H@
 STRIP = @STRIP@
 SYS_STAT_H = @SYS_STAT_H@
-UNISTD_H = @UNISTD_H@
+SYS_TIME_H = @SYS_TIME_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
 VERSION = @VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -235,7 +274,7 @@ man_MANS = gunzip.1 gzexe.1 gzip.1 \
 EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
   algorithm.doc amiga/match.a amiga/Makefile.gcc amiga/Makefile.sasc \
   amiga/tailor.c amiga/utime.h atari/Makefile.st crypt.h \
-  gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
+  gunzip.in gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
   msdos/gzip.prj msdos/doturboc.bat msdos/Makefile.msc msdos/Makefile.bor \
   msdos/Makefile.djg nt/Makefile.nt os2/gzip.def os2/Makefile.os2 \
   os2/gzip16.def primos/include/errno.h primos/include/fcntl.h \
@@ -244,10 +283,12 @@ EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
   primos/primos.c primos/ci.opts revision.h sample/makecrc.c \
   sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \
   tailor.h vms/Makefile.mms vms/gzip.hlp vms/vms.c vms/Readme.vms \
-  vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zdiff.in \
-  zforce.in zgrep.in zless.in zmore.in znew.in
+  vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zcat.in zcmp.in zdiff.in \
+  zegrep.in zfgrep.in zforce.in zgrep.in zless.in zmore.in znew.in
+
+bin_SCRIPTS = gunzip gzexe zcat zcmp zdiff \
+  zegrep zfgrep zforce zgrep zless zmore znew
 
-bin_SCRIPTS = gzexe zdiff zgrep zforce zless zmore znew
 gzip_SOURCES = \
   bits.c crypt.c deflate.c gzip.c inflate.c lzw.c \
   trees.c unlzh.c unlzw.c unpack.c unzip.c util.c zip.c
@@ -260,8 +301,8 @@ FILES_TO_CHECK = $(bin_SCRIPTS) $(gzip_LDADD) \
   $(top_srcdir)/ChangeLog $(top_srcdir)/configure $(top_srcdir)/gzip.c
 
 MAINTAINERCLEANFILES = gzip.doc
-MOSTLYCLEANFILES = _match.i match_.s _match.S \
-  gzexe zdiff zforce zgrep zless zmore znew
+MOSTLYCLEANFILES = _match.i match_.s _match.S gzip.doc.gz \
+  gunzip gzexe zcat zcmp zdiff zegrep zfgrep zforce zgrep zless zmore znew
 
 all: all-recursive
 
@@ -861,14 +902,23 @@ uninstall-man: uninstall-man1
 
 gzip.doc: gzip.1
        groff -man -Tascii $(srcdir)/gzip.1 | col -b | uniq >$@
+
+gzip.doc.gz: gzip.doc
+       gzip <$? >$@
 .in:
        sed \
                -e 's|/bin/sh|$(SHELL)|g' \
-               -e 's|BINDIR|$(bindir)|g' \
+               -e 's|BINDIR|$${GZIP_BINDIR-'\''$(bindir)'\''}|g' \
                -e 's|[@]VERSION@|$(VERSION)|g' \
                $(srcdir)/$@.in >$@
        chmod a+x $@
-check-local: $(FILES_TO_CHECK)
+check-local: $(FILES_TO_CHECK) gzip.doc.gz
+       { test '$(srcdir)' != . || GZIP_BINDIR=. ./zdiff -c gzip.doc.gz; }
+       GZIP_BINDIR=. ./zdiff -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc
+       GZIP_BINDIR=. ./zdiff $(srcdir)/gzip.doc gzip.doc.gz
+       GZIP_BINDIR=. ./zdiff -c - $(srcdir)/gzip.doc <gzip.doc.gz
+       GZIP_BINDIR=. ./zdiff -c gzip.doc.gz gzip.doc.gz
+       GZIP_BINDIR=. ./zgrep -iV >/dev/null
        for file in $(FILES_TO_CHECK); do \
          ./gzip -cv -- "$$file" | ./gzip -d | cmp - "$$file" || exit; \
        done
@@ -879,9 +929,7 @@ install-exec-hook remove-installed-links:
        @for prog_ext in $(bin_PROGRAMS) $(bin_SCRIPTS); do \
          prog=`echo "$$prog_ext"|sed 's/$(EXEEXT)$$//'`; \
          case $$prog in \
-         gzip) aliases='gunzip zcat';; \
-         zdiff) aliases='zcmp';; \
-         zgrep) aliases='zegrep zfgrep';; \
+         gunzip) aliases='uncompress';; \
          *) continue;; \
          esac; \
          transform='$(transform)'; \
diff --git a/NEWS b/NEWS
index 881c9d61abe33394ef9f896501567f27dedd839f..b809273a5efef6d6ab26cdca6bf092f811faaca7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,27 @@
+Major changes in Gzip 1.3.12 (2007-04-13)
+
+* znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
+
+Major changes in Gzip 1.3.11 (2007-02-05)
+
+* As per the GNU coding standards, the behavior of gzip and its
+  companion executables no longer depend on the name used to invoke them.
+  For example, 'gzip' and 'gunzip' are no longer hard links;
+  instead, 'gunzip' is now a small program that invokes 'gzip -d'.
+
+* zdiff now checks for subsidiary gzip failures, and works around
+  bugs in IRIX 6 sh, Tru64 4.0F ksh, and Solaris 8 bash.
+
+Major changes in Gzip 1.3.10 (2006-12-30)
+
+* gzip -c and zcat now work on special files, files with special mode bits,
+  and files with multiple hard links.
+* gzip -q now exits with status 2 (not 1) when SIGPIPE is received.
+* zcmp and zdiff did not work in the usual case, due to a typo.
+* zgrep has many bugs fixed with argument handling, special characters,
+  and exit status.
+* zless no longer mishandles $%=~ in file names.
+
 Gzip 1.3.9 (2006-12-15)
 
 * No major changes; only porting fixes.
@@ -309,7 +333,7 @@ Major changes form 0.5 to 0.6:
 
 ========================================================================
 
-Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
 Copyright (C) 1992, 1993 Jean-loup Gailly
 
 Permission is granted to copy, distribute and/or modify this document
diff --git a/README b/README
index e75fba86ea038efce33c45c4e9f4663ae3e7af39..ee5eab7bb97824dd2d7b6f4f236f1bdd6f93b58e 100644 (file)
--- a/README
+++ b/README
@@ -32,10 +32,8 @@ INSTALL for installation instructions. Some answers to frequently
 asked questions are given in the file INSTALL, please read it. (In
 particular, please don't ask me once more for an /etc/magic entry.)
 
-WARNING: on several systems, compiler bugs cause gzip to fail, in
-particular when optimization options are on.  See the section "Special
-targets" at the end of the INSTALL file for a list of known problems.
-For all machines, use "make check" to check that gzip was compiled
+WARNING: gzip is sensitive to compiler bugs, particularly when
+optimizing.  Use "make check" to check that gzip was compiled
 correctly.  Try compiling gzip without any optimization if you have a
 problem.
 
@@ -134,7 +132,7 @@ See http://www.cdrom.com/pub/infozip/ for more about zip and unzip.
 
 ========================================================================
 
-Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
 Copyright (C) 1992, 1993 Jean-loup Gailly
 
 Permission is granted to copy, distribute and/or modify this document
index 012b91b3bca242f63aa8c9a32f85ffcd7e34d50a..ea896e9bb1489634cf3654fcb15031c077b5a10c 100644 (file)
@@ -901,13 +901,16 @@ m4_include([m4/extensions.m4])
 m4_include([m4/fcntl-safer.m4])
 m4_include([m4/fcntl_h.m4])
 m4_include([m4/getopt.m4])
+m4_include([m4/gnulib-common.m4])
 m4_include([m4/gnulib-comp.m4])
 m4_include([m4/inline.m4])
 m4_include([m4/shell.m4])
 m4_include([m4/stat-time.m4])
 m4_include([m4/stdbool.m4])
+m4_include([m4/stdlib_h.m4])
 m4_include([m4/sys_stat_h.m4])
-m4_include([m4/timespec.m4])
+m4_include([m4/sys_time_h.m4])
+m4_include([m4/time_h.m4])
 m4_include([m4/unistd-safer.m4])
 m4_include([m4/unistd_h.m4])
 m4_include([m4/utimbuf.m4])
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755 (executable)
index 0000000..0f0fe71
--- /dev/null
@@ -0,0 +1,1516 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
+
+timestamp='2007-03-06'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit ;;
+    *:OpenBSD:*:*)
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    alpha:OSF1:*:*)
+       case $UNAME_RELEASE in
+       *4.0)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Pn.n version is a patched version.
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7; exit ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit ;;
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
+       echo unknown-hitachi-hiuxwe2
+       exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    *:UNICOS/mp:*:*)
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit ;;
+    *:FreeBSD:*:*)
+       case ${UNAME_MACHINE} in
+           pc98)
+               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
+       exit ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit ;;
+    *:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit ;;
+    *:Interix*:[3456]*)
+       case ${UNAME_MACHINE} in
+           x86) 
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           EM64T | authenticamd)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^CPU/{
+               s: ::g
+               p
+           }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^CPU/{
+               s: ::g
+               p
+           }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+       ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    xtensa:Linux:*:*)
+       echo xtensa-unknown-linux-gnu
+       exit ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^LIBC/{
+               s: ::g
+               p
+           }'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit ;;
+    *:Darwin:*:*)
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit ;;
+    c34*)
+       echo c34-convex-bsd
+       exit ;;
+    c38*)
+       echo c38-convex-bsd
+       exit ;;
+    c4*)
+       echo c4-convex-bsd
+       exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755 (executable)
index 0000000..5defff6
--- /dev/null
@@ -0,0 +1,1622 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
+
+timestamp='2007-01-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#      CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple | -axis | -knuth | -cray)
+               os=
+               basic_machine=$1
+               ;;
+       -sim | -cisco | -oki | -wec | -winbond)
+               os=
+               basic_machine=$1
+               ;;
+       -scout)
+               ;;
+       -wrs)
+               os=-vxworks
+               basic_machine=$1
+               ;;
+       -chorusos*)
+               os=-chorusos
+               basic_machine=$1
+               ;;
+       -chorusrdb)
+               os=-chorusrdb
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5)
+               os=-sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -udk*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+       -mint | -mint[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       1750a | 580 \
+       | a29k \
+       | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+       | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
+       | c4x | clipper \
+       | d10v | d30v | dlx | dsp16xx \
+       | fido | fr30 | frv \
+       | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+       | i370 | i860 | i960 | ia64 \
+       | ip2k | iq2000 \
+       | m32c | m32r | m32rle | m68000 | m68k | m88k \
+       | maxq | mb | microblaze | mcore | mep \
+       | mips | mipsbe | mipseb | mipsel | mipsle \
+       | mips16 \
+       | mips64 | mips64el \
+       | mips64vr | mips64vrel \
+       | mips64orion | mips64orionel \
+       | mips64vr4100 | mips64vr4100el \
+       | mips64vr4300 | mips64vr4300el \
+       | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
+       | mipsisa32 | mipsisa32el \
+       | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64sb1 | mipsisa64sb1el \
+       | mipsisa64sr71k | mipsisa64sr71kel \
+       | mipstx39 | mipstx39el \
+       | mn10200 | mn10300 \
+       | mt \
+       | msp430 \
+       | nios | nios2 \
+       | ns16k | ns32k \
+       | or32 \
+       | pdp10 | pdp11 | pj | pjl \
+       | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+       | pyramid \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh64 | sh64le \
+       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+       | spu | strongarm \
+       | tahoe | thumb | tic4x | tic80 | tron \
+       | v850 | v850e \
+       | we32k \
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+       | z8k)
+               basic_machine=$basic_machine-unknown
+               ;;
+       m6811 | m68hc11 | m6812 | m68hc12)
+               # Motorola 68HC11/12.
+               basic_machine=$basic_machine-unknown
+               os=-none
+               ;;
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+               ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
+
+       # We use `pc' rather than `unknown'
+       # because (1) that's what they normally are, and
+       # (2) the word "unknown" tends to confuse beginning users.
+       i*86 | x86_64)
+         basic_machine=$basic_machine-pc
+         ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       580-* \
+       | a29k-* \
+       | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+       | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+       | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | clipper-* | craynv-* | cydra-* \
+       | d10v-* | d30v-* | dlx-* \
+       | elxsi-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+       | h8300-* | h8500-* \
+       | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+       | i*86-* | i860-* | i960-* | ia64-* \
+       | ip2k-* | iq2000-* \
+       | m32c-* | m32r-* | m32rle-* \
+       | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
+       | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+       | mips16-* \
+       | mips64-* | mips64el-* \
+       | mips64vr-* | mips64vrel-* \
+       | mips64orion-* | mips64orionel-* \
+       | mips64vr4100-* | mips64vr4100el-* \
+       | mips64vr4300-* | mips64vr4300el-* \
+       | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
+       | mipsisa32-* | mipsisa32el-* \
+       | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64sb1-* | mipsisa64sb1el-* \
+       | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+       | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
+       | msp430-* \
+       | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
+       | orion-* \
+       | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+       | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+       | pyramid-* \
+       | romp-* | rs6000-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+       | tahoe-* | thumb-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tron-* \
+       | v850-* | v850e-* | vax-* \
+       | we32k-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
+       | ymp-* \
+       | z8k-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       386bsd)
+               basic_machine=i386-unknown
+               os=-bsd
+               ;;
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       a29khif)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
+       adobe68k)
+               basic_machine=m68010-adobe
+               os=-scout
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amd64)
+               basic_machine=x86_64-pc
+               ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-unknown
+               ;;
+       amigaos | amigados)
+               basic_machine=m68k-unknown
+               os=-amigaos
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-unknown
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       apollo68bsd)
+               basic_machine=m68k-apollo
+               os=-bsd
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       c90)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | j90)
+               basic_machine=j90-cray
+               os=-unicos
+               ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
+       cris | cris-* | etrax*)
+               basic_machine=cris-axis
+               ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       decsystem10* | dec10*)
+               basic_machine=pdp10-dec
+               os=-tops10
+               ;;
+       decsystem20* | dec20*)
+               basic_machine=pdp10-dec
+               os=-tops20
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       es1800 | OSE68k | ose68k | ose | OSE)
+               basic_machine=m68k-ericsson
+               os=-ose
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       go32)
+               basic_machine=i386-pc
+               os=-go32
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       h8300xray)
+               basic_machine=h8300-hitachi
+               os=-xray
+               ;;
+       h8500hms)
+               basic_machine=h8500-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp3k9[0-9][0-9] | hp9[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k6[0-9][0-9] | hp6[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hp9k7[0-79][0-9] | hp7[0-79][0-9])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k78[0-9] | hp78[0-9])
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+               # FIXME: really hppa2.0-hp
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][13679] | hp8[0-9][13679])
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       hppa-next)
+               os=-nextstep3
+               ;;
+       hppaosf)
+               basic_machine=hppa1.1-hp
+               os=-osf
+               ;;
+       hppro)
+               basic_machine=hppa1.1-hp
+               os=-proelf
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i*86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv32
+               ;;
+       i*86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv4
+               ;;
+       i*86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-sysv
+               ;;
+       i*86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               os=-solaris2
+               ;;
+       i386mach)
+               basic_machine=i386-mach
+               os=-mach
+               ;;
+       i386-vsta | vsta)
+               basic_machine=i386-unknown
+               os=-vsta
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       mingw32)
+               basic_machine=i386-pc
+               os=-mingw32
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+               basic_machine=m68k-atari
+               os=-mint
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       monitor)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       morphos)
+               basic_machine=powerpc-unknown
+               os=-morphos
+               ;;
+       msdos)
+               basic_machine=i386-pc
+               os=-msdos
+               ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
+       mvs)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       netbsd386)
+               basic_machine=i386-unknown
+               os=-netbsd
+               ;;
+       netwinder)
+               basic_machine=armv4l-rebel
+               os=-linux
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       necv70)
+               basic_machine=v70-nec
+               os=-sysv
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       mon960)
+               basic_machine=i960-intel
+               os=-mon960
+               ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       nsr-tandem)
+               basic_machine=nsr-tandem
+               ;;
+       op50n-* | op60c-*)
+               basic_machine=hppa1.1-oki
+               os=-proelf
+               ;;
+       openrisc | openrisc-*)
+               basic_machine=or32-unknown
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
+               ;;
+       OSE68000 | ose68000)
+               basic_machine=m68000-ericsson
+               os=-ose
+               ;;
+       os68k)
+               basic_machine=m68k-none
+               os=-os68k
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+       pc532 | pc532-*)
+               basic_machine=ns32k-pc532
+               ;;
+       pc98)
+               basic_machine=i386-pc
+               ;;
+       pc98-*)
+               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium | p5 | k5 | k6 | nexgen | viac3)
+               basic_machine=i586-pc
+               ;;
+       pentiumpro | p6 | 6x86 | athlon | athlon_*)
+               basic_machine=i686-pc
+               ;;
+       pentiumii | pentium2 | pentiumiii | pentium3)
+               basic_machine=i686-pc
+               ;;
+       pentium4)
+               basic_machine=i786-pc
+               ;;
+       pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-* | 6x86-* | athlon-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentium4-*)
+               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=power-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64)  basic_machine=powerpc64-unknown
+               ;;
+       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+               basic_machine=powerpc64le-unknown
+               ;;
+       ppc64le-* | powerpc64little-*)
+               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
+       rom68k)
+               basic_machine=m68k-rom68k
+               os=-coff
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
+       sa29200)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       sb1)
+               basic_machine=mipsisa64sb1-unknown
+               ;;
+       sb1el)
+               basic_machine=mipsisa64sb1el-unknown
+               ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
+       sei)
+               basic_machine=mips-sei
+               os=-seiux
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
+       sh64)
+               basic_machine=sh64-unknown
+               ;;
+       sparclite-wrs | simso-wrs)
+               basic_machine=sparclite-wrs
+               os=-vxworks
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       st2000)
+               basic_machine=m68k-tandem
+               ;;
+       stratus)
+               basic_machine=i860-stratus
+               os=-sysv4
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       sv1)
+               basic_machine=sv1-cray
+               os=-unicos
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       t3e)
+               basic_machine=alphaev5-cray
+               os=-unicos
+               ;;
+       t90)
+               basic_machine=t90-cray
+               os=-unicos
+               ;;
+       tic54x | c54x*)
+               basic_machine=tic54x-unknown
+               os=-coff
+               ;;
+       tic55x | c55x*)
+               basic_machine=tic55x-unknown
+               os=-coff
+               ;;
+       tic6x | c6x*)
+               basic_machine=tic6x-unknown
+               os=-coff
+               ;;
+       tx39)
+               basic_machine=mipstx39-unknown
+               ;;
+       tx39el)
+               basic_machine=mipstx39el-unknown
+               ;;
+       toad1)
+               basic_machine=pdp10-xkl
+               os=-tops20
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       v810 | necv810)
+               basic_machine=v810-nec
+               os=-none
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       w65*)
+               basic_machine=w65-wdc
+               os=-none
+               ;;
+       w89k-*)
+               basic_machine=hppa1.1-winbond
+               os=-proelf
+               ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
+       xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       z8k-*-coff)
+               basic_machine=z8k-unknown
+               os=-sim
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       w89k)
+               basic_machine=hppa1.1-winbond
+               ;;
+       op50n)
+               basic_machine=hppa1.1-oki
+               ;;
+       op60c)
+               basic_machine=hppa1.1-oki
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp10)
+               # there are many clones, so DEC is not a safe bet
+               basic_machine=pdp10-unknown
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+               basic_machine=sh-unknown
+               ;;
+       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+               basic_machine=sparc-sun
+               ;;
+       cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       mac | mpw | mac-mpw)
+               basic_machine=m68k-apple
+               ;;
+       pmac | pmac-mpw)
+               basic_machine=powerpc-apple
+               ;;
+       *-unknown)
+               # Make sure to match an already-canonicalized machine name.
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -svr4*)
+               os=-sysv4
+               ;;
+       -unixware*)
+               os=-sysv4.2uw
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+             | -aos* \
+             | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+             | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -chorusos* | -chorusrdb* \
+             | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+             | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+             | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -qnx*)
+               case $basic_machine in
+                   x86-* | i*86-*)
+                       ;;
+                   *)
+                       os=-nto$os
+                       ;;
+               esac
+               ;;
+       -nto-qnx*)
+               ;;
+       -nto*)
+               os=`echo $os | sed -e 's|nto|nto-qnx|'`
+               ;;
+       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+             | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+               ;;
+       -mac*)
+               os=`echo $os | sed -e 's|mac|macos|'`
+               ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
+       -linux*)
+               os=`echo $os | sed -e 's|linux|linux-gnu|'`
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -opened*)
+               os=-openedition
+               ;;
+        -os400*)
+               os=-os400
+               ;;
+       -wince*)
+               os=-wince
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -atheos*)
+               os=-atheos
+               ;;
+       -syllable*)
+               os=-syllable
+               ;;
+       -386bsd)
+               os=-bsd
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -nova*)
+               os=-rtmk-nova
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       -nsk*)
+               os=-nsk
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+        -tpf*)
+               os=-tpf
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -ose*)
+               os=-ose
+               ;;
+       -es1800*)
+               os=-ose
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+               os=-mint
+               ;;
+       -aros*)
+               os=-aros
+               ;;
+       -kaos*)
+               os=-kaos
+               ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
+        spu-*)
+               os=-elf
+               ;;
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-rebel)
+               os=-linux
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+        c4x-* | tic4x-*)
+               os=-coff
+               ;;
+       # This must come before the *-dec entry.
+       pdp10-*)
+               os=-tops20
+               ;;
+       pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       m68*-cisco)
+               os=-aout
+               ;;
+        mep-*)
+               os=-elf
+               ;;
+       mips*-cisco)
+               os=-elf
+               ;;
+       mips*-*)
+               os=-elf
+               ;;
+       or32-*)
+               os=-coff
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-be)
+               os=-beos
+               ;;
+       *-haiku)
+               os=-haiku
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-knuth)
+               os=-mmixware
+               ;;
+       *-wec)
+               os=-proelf
+               ;;
+       *-winbond)
+               os=-proelf
+               ;;
+       *-oki)
+               os=-proelf
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigaos
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+       *-gould)
+               os=-sysv
+               ;;
+       *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+       *-sgi)
+               os=-irix
+               ;;
+       *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       f30[01]-fujitsu | f700-fujitsu)
+               os=-uxpv
+               ;;
+       *-rom68k)
+               os=-coff
+               ;;
+       *-*bug)
+               os=-coff
+               ;;
+       *-apple)
+               os=-macos
+               ;;
+       *-atari*)
+               os=-mint
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -beos*)
+                               vendor=be
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -mpeix*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs* | -opened*)
+                               vendor=ibm
+                               ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
+                       -vxsim* | -vxworks* | -windiss*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -hms*)
+                               vendor=hitachi
+                               ;;
+                       -mpw* | -macos*)
+                               vendor=apple
+                               ;;
+                       -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+                               vendor=atari
+                               ;;
+                       -vos*)
+                               vendor=stratus
+                               ;;
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
index ca5ea4e1ef9c125b1cb1fc7d51c93d8747637deb..e5f9736c7239301c765e2d7abefb9bb9b9237ac5 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2006-10-15.18
+scriptversion=2007-03-29.01
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -215,34 +215,39 @@ aix)
   # current directory.  Also, the AIX compiler puts `$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
-  tmpdepfile="$stripped.u"
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
   if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
     "$@" -Wc,-M
   else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
     "$@" -M
   fi
   stat=$?
 
-  if test -f "$tmpdepfile"; then :
-  else
-    stripped=`echo "$stripped" | sed 's,^.*/,,'`
-    tmpdepfile="$stripped.u"
-  fi
-
   if test $stat -eq 0; then :
   else
-    rm -f "$tmpdepfile"
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
   fi
 
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
   if test -f "$tmpdepfile"; then
-    outname="$stripped.o"
     # Each line is of the form `foo.o: dependent.h'.
     # Do two passes, one to just change these to
     # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
-    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
index 4fbbae7b7ff932e5af542dbe9612f193a68ed4d1..a5897de6ea7f74f83fd793474bb4738d32884719 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2006-10-14.15
+scriptversion=2006-12-25.00
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -48,7 +48,7 @@ IFS=" ""      $nl"
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
 if test -z "$doit"; then
   doit_exec=exec
 else
@@ -58,34 +58,49 @@ fi
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
 
-posix_glob=
 posix_mkdir=
 
 # Desired mode of installed file.
 mode=0755
 
+chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
-chgrpcmd=
-stripcmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
+stripcmd=
+
 src=
 dst=
 dir_arg=
-dstarg=
+dst_arg=
+
+copy_on_change=false
 no_target_directory=
 
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
    or: $0 [OPTION]... SRCFILES... DIRECTORY
    or: $0 [OPTION]... -t DIRECTORY SRCFILES...
    or: $0 [OPTION]... -d DIRECTORIES...
@@ -95,65 +110,55 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
 In the 4th, create DIRECTORIES.
 
 Options:
--c         (ignored)
--d         create directories instead of installing files.
--g GROUP   $chgrpprog installed files to GROUP.
--m MODE    $chmodprog installed files to MODE.
--o USER    $chownprog installed files to USER.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
 "
 
 while test $# -ne 0; do
   case $1 in
-    -c) shift
-        continue;;
+    -c) ;;
+
+    -C) copy_on_change=true;;
 
-    -d) dir_arg=true
-        shift
-        continue;;
+    -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-        shift
-        shift
        case $mode in
          *' '* | *'    '* | *'
 '*       | *'*'* | *'?'* | *'['*)
            echo "$0: invalid mode: $mode" >&2
            exit 1;;
        esac
-        continue;;
+       shift;;
 
     -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
+       shift;;
 
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
+    -s) stripcmd=$stripprog;;
 
-    -t) dstarg=$2
-       shift
-       shift
-       continue;;
+    -t) dst_arg=$2
+       shift;;
 
-    -T) no_target_directory=true
-       shift
-       continue;;
+    -T) no_target_directory=true;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
@@ -165,21 +170,22 @@ while test $# -ne 0; do
 
     *)  break;;
   esac
+  shift
 done
 
-if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
   # Otherwise, the last argument is the destination.  Remove it from $@.
   for arg
   do
-    if test -n "$dstarg"; then
+    if test -n "$dst_arg"; then
       # $@ is not empty: it contains at least $arg.
-      set fnord "$@" "$dstarg"
+      set fnord "$@" "$dst_arg"
       shift # fnord
     fi
     shift # arg
-    dstarg=$arg
+    dst_arg=$arg
   done
 fi
 
@@ -224,7 +230,7 @@ for src
 do
   # Protect names starting with `-'.
   case $src in
-    -*) src=./$src ;;
+    -*) src=./$src;;
   esac
 
   if test -n "$dir_arg"; then
@@ -242,22 +248,22 @@ do
       exit 1
     fi
 
-    if test -z "$dstarg"; then
+    if test -z "$dst_arg"; then
       echo "$0: no destination specified." >&2
       exit 1
     fi
 
-    dst=$dstarg
+    dst=$dst_arg
     # Protect names starting with `-'.
     case $dst in
-      -*) dst=./$dst ;;
+      -*) dst=./$dst;;
     esac
 
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
       if test -n "$no_target_directory"; then
-       echo "$0: $dstarg: Is a directory" >&2
+       echo "$0: $dst_arg: Is a directory" >&2
        exit 1
       fi
       dstdir=$dst
@@ -378,26 +384,19 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix=;;
-       -*) prefix=./ ;;
-       *)  prefix= ;;
+       /*) prefix='/';;
+       -*) prefix='./';;
+       *)  prefix='';;
       esac
 
-      case $posix_glob in
-        '')
-         if (set -f) 2>/dev/null; then
-           posix_glob=true
-         else
-           posix_glob=false
-         fi ;;
-      esac
+      eval "$initialize_posix_glob"
 
       oIFS=$IFS
       IFS=/
-      $posix_glob && set -f
+      $posix_glob set -f
       set fnord $dstdir
       shift
-      $posix_glob && set +f
+      $posix_glob set +f
       IFS=$oIFS
 
       prefixes=
@@ -459,41 +458,54 @@ do
     # ignore errors from any of these, just make sure not to ignore
     # errors from the above "$doit $cpprog $src $dsttmp" command.
     #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
-      || {
-          # The rename failed, perhaps because mv can't rename something else
-          # to itself, or perhaps because mv is so ancient that it does not
-          # support -f.
-
-          # Now remove or move aside any old file at destination location.
-          # We try this two ways since rm can't unlink itself on some
-          # systems and the destination file might be busy for other
-          # reasons.  In this case, the final cleanup might fail but the new
-          # file should still install successfully.
-          {
-            if test -f "$dst"; then
-              $doit $rmcmd -f "$dst" 2>/dev/null \
-              || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
-                    && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
-              || {
-                echo "$0: cannot unlink or rename $dst" >&2
-                (exit 1); exit 1
-              }
-            else
-              :
-            fi
-          } &&
-
-          # Now rename the file to the real destination.
-          $doit $mvcmd "$dsttmp" "$dst"
-        }
-    } || exit 1
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+       # Now remove or move aside any old file at destination location.
+       # We try this two ways since rm can't unlink itself on some
+       # systems and the destination file might be busy for other
+       # reasons.  In this case, the final cleanup might fail but the new
+       # file should still install successfully.
+       {
+         test ! -f "$dst" ||
+         $doit $rmcmd -f "$dst" 2>/dev/null ||
+         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+         } ||
+         { echo "$0: cannot unlink or rename $dst" >&2
+           (exit 1); exit 1
+         }
+       } &&
+
+       # Now rename the file to the real destination.
+       $doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
     trap '' 0
   fi
index cd916c0a34003205a3773df2c9a178a8139b4aad..83d27009dc223aaabde59623ce8873c8c6689f86 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Get modification time of a file or directory and pretty-print it.
 
-scriptversion=2005-06-29.22
+scriptversion=2007-03-30.02
 
-# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software
+# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
 # Foundation, Inc.
 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
 #
@@ -75,6 +75,10 @@ if ls -L /dev/null 1>/dev/null 2>&1; then
 else
   ls_command='ls -l -d'
 fi
+# Avoid user/group names that might have spaces, when possible.
+if ls -n /dev/null 1>/dev/null 2>&1; then
+  ls_command="$ls_command -n"
+fi
 
 # A `ls -l' line looks as follows on OS/2.
 #  drwxrwx---        0 Aug 11  2001 foo
@@ -89,7 +93,7 @@ fi
 # words should be skipped to get the date.
 
 # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
-set x`ls -l -d /`
+set x`$ls_command /`
 
 # Find which argument is the month.
 month=
index 5aadf1cb92f6a7afc12d6920d3fbd73dc36336dc..f6ab675ce11319d3df0884155c83f0b22ebf133c 100644 (file)
@@ -3,11 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2006-12-05.11}
+\def\texinfoversion{2007-04-08.09}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
-% Software Foundation, Inc.
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+% 2007 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software; you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -67,7 +67,7 @@
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
-\message{Basics,}
+
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
@@ -1225,8 +1225,9 @@ where each line of input produces a line of output.}
 
 % To handle parens, we must adopt a different approach, since parens are
 % not active characters.  hyperref.dtx (which has the same problem as
-% us) handles it with this amazing macro to replace tokens.  I've
-% tinkered with it a little for texinfo, but it's definitely from there.
+% us) handles it with this amazing macro to replace tokens, with minor
+% changes for Texinfo.  It is included here under the GPL by permission
+% from the author, Heiko Oberdiek.
 % 
 % #1 is the tokens to replace.
 % #2 is the replacement.
@@ -1262,7 +1263,8 @@ output) for that.)}
 
 \ifpdf
   \input pdfcolor
-  \pdfcatalog{/PageMode /UseOutlines}%
+  \pdfcatalog{/PageMode /UseOutlines}
+  %
   % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
   \def\dopdfimage#1#2#3{%
     \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
@@ -1279,20 +1281,15 @@ output) for that.)}
               \openin 1 #1.pdf \ifeof 1
                 \errhelp = \nopdfimagehelp
                 \errmessage{Could not find image file #1 for pdf}%
-              \else
-                \gdef\pdfimgext{pdf}%
+              \else \gdef\pdfimgext{pdf}%
               \fi
-            \else
-              \gdef\pdfimgext{JPG}%
+            \else \gdef\pdfimgext{JPG}%
             \fi
-          \else
-            \gdef\pdfimgext{jpeg}%
+          \else \gdef\pdfimgext{jpeg}%
           \fi
-        \else
-          \gdef\pdfimgext{jpg}%
+        \else \gdef\pdfimgext{jpg}%
         \fi
-      \else
-        \gdef\pdfimgext{png}%
+      \else \gdef\pdfimgext{png}%
       \fi
       \closein 1
     \endgroup
@@ -1314,21 +1311,25 @@ output) for that.)}
     \ifnum\pdftexversion < 14 \else
       \pdfrefximage \pdflastximage
     \fi}
+  %
   \def\pdfmkdest#1{{%
     % We have to set dummies so commands such as @code, and characters
     % such as \, aren't expanded when present in a section title.
-    \atdummies
+    \indexnofonts
+    \turnoffactive
     \activebackslashdouble
+    \makevalueexpandable
     \def\pdfdestname{#1}%
     \backslashparens\pdfdestname
-    \pdfdest name{\pdfdestname} xyz%
-  }}%
+    \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+  }}
   %
   % used to mark target names; must be expandable.
-  \def\pdfmkpgn#1{#1}%
+  \def\pdfmkpgn#1{#1}
   %
   \let\linkcolor = \Blue  % was Cyan, but that seems light?
   \def\endlink{\Black\pdfendlink}
+  %
   % Adding outlines to PDF; macros for calculating structure of outlines
   % come from Petr Olsak
   \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -1583,7 +1584,7 @@ output) for that.)}
 % Definitions for a main text size of 11pt.  This is the default in
 % Texinfo.
 % 
-\def\definetextfontsizexi{
+\def\definetextfontsizexi{%
 % Text fonts (11.2pt, magstep1).
 \def\textnominalsize{11pt}
 \edef\mainmagstep{\magstephalf}
@@ -3746,11 +3747,7 @@ output) for that.)}
     %
     \edef\writeto{\csname#1indfile\endcsname}%
     %
-    \ifvmode
-      \dosubindsanitize
-    \else
-      \dosubindwrite
-    \fi
+    \safewhatsit\dosubindwrite
   }%
   \fi
 }
@@ -3787,13 +3784,13 @@ output) for that.)}
   \temp
 }
 
-% Take care of unwanted page breaks:
+% Take care of unwanted page breaks/skips around a whatsit:
 %
 % If a skip is the last thing on the list now, preserve it
 % by backing up by \lastskip, doing the \write, then inserting
 % the skip again.  Otherwise, the whatsit generated by the
-% \write will make \lastskip zero.  The result is that sequences
-% like this:
+% \write or \pdfdest will make \lastskip zero.  The result is that
+% sequences like this:
 % @end defun
 % @tindex whatever
 % @defun ...
@@ -3817,13 +3814,19 @@ output) for that.)}
 %
 \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
 %
+\newskip\whatsitskip
+\newcount\whatsitpenalty
+%
 % ..., ready, GO:
 %
-\def\dosubindsanitize{%
+\def\safewhatsit#1{%
+\ifhmode
+  #1%
+\else
   % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
-  \skip0 = \lastskip
+  \whatsitskip = \lastskip
   \edef\lastskipmacro{\the\lastskip}%
-  \count255 = \lastpenalty
+  \whatsitpenalty = \lastpenalty
   %
   % If \lastskip is nonzero, that means the last item was a
   % skip.  And since a skip is discardable, that means this
@@ -3832,10 +3835,10 @@ output) for that.)}
   % breakpoint, therefore no \nobreak needed.
   \ifx\lastskipmacro\zeroskipmacro
   \else
-    \vskip-\skip0
+    \vskip-\whatsitskip
   \fi
   %
-  \dosubindwrite
+  #1%
   %
   \ifx\lastskipmacro\zeroskipmacro
     % If \lastskip was zero, perhaps the last item was a penalty, and
@@ -3849,13 +3852,14 @@ output) for that.)}
     %   Description.
     % would allow a break between the index-whatever whatsit
     % and the "Description." paragraph.
-    \ifnum\count255>9999 \penalty\count255 \fi
+    \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
   \else
     % On the other hand, if we had a nonzero \lastskip,
     % this make-up glue would be preceded by a non-discardable item
     % (the whatsit from the \write), so we must insert a \nobreak.
-    \nobreak\vskip\skip0
+    \nobreak\vskip\whatsitskip
   \fi
+\fi
 }
 
 % The index entry written in the file actually looks like
@@ -3898,6 +3902,7 @@ output) for that.)}
   %
   \smallfonts \rm
   \tolerance = 9500
+  \plainfrenchspacing
   \everypar = {}% don't want the \kern\-parindent from indentation suppression.
   %
   % See if the index file exists and is nonempty.
@@ -4167,6 +4172,34 @@ output) for that.)}
 %
 % All done with double columns.
 \def\enddoublecolumns{%
+  % The following penalty ensures that the page builder is exercised
+  % _before_ we change the output routine.  This is necessary in the
+  % following situation:
+  %
+  % The last section of the index consists only of a single entry.
+  % Before this section, \pagetotal is less than \pagegoal, so no
+  % break occurs before the last section starts.  However, the last
+  % section, consisting of \initial and the single \entry, does not
+  % fit on the page and has to be broken off.  Without the following
+  % penalty the page builder will not be exercised until \eject
+  % below, and by that time we'll already have changed the output
+  % routine to the \balancecolumns version, so the next-to-last
+  % double-column page will be processed with \balancecolumns, which
+  % is wrong:  The two columns will go to the main vertical list, with
+  % the broken-off section in the recent contributions.  As soon as
+  % the output routine finishes, TeX starts reconsidering the page
+  % break.  The two columns and the broken-off section both fit on the
+  % page, because the two columns now take up only half of the page
+  % goal.  When TeX sees \eject from below which follows the final
+  % section, it invokes the new output routine that we've set after
+  % \balancecolumns below; \onepageout will try to fit the two columns
+  % and the final section into the vbox of \pageheight (see
+  % \pagebody), causing an overfull box.
+  %
+  % Note that glue won't work here, because glue does not exercise the
+  % page builder, unlike penalties (see The TeXbook, pp. 280-281).
+  \penalty0
+  %
   \output = {%
     % Split the last of the double-column material.  Leave it on the
     % current page, no automatic page break.
@@ -5283,12 +5316,18 @@ output) for that.)}
 \let\SETdispenvsize\relax
 \def\setnormaldispenv{%
   \ifx\SETdispenvsize\smallword
+    % end paragraph for sake of leading, in case document has no blank
+    % line.  This is redundant with what happens in \aboveenvbreak, but
+    % we need to do it before changing the fonts, and it's inconvenient
+    % to change the fonts afterward.
+    \ifnum \lastpenalty=10000 \else \endgraf \fi
     \smallexamplefonts \rm
   \fi
 }
 \def\setsmalldispenv{%
   \ifx\SETdispenvsize\nosmallword
   \else
+    \ifnum \lastpenalty=10000 \else \endgraf \fi
     \smallexamplefonts \rm
   \fi
 }
@@ -5589,27 +5628,35 @@ output) for that.)}
   \endgroup
 }
 
+
 \message{defuns,}
 % @defun etc.
 
 \newskip\defbodyindent \defbodyindent=.4in
 \newskip\defargsindent \defargsindent=50pt
 \newskip\deflastargmargin \deflastargmargin=18pt
+\newcount\defunpenalty
 
 % Start the processing of @deffn:
 \def\startdefun{%
   \ifnum\lastpenalty<10000
     \medbreak
+    \defunpenalty=10003 % Will keep this @deffn together with the
+                        % following @def command, see below.
   \else
     % If there are two @def commands in a row, we'll have a \nobreak,
     % which is there to keep the function description together with its
     % header.  But if there's nothing but headers, we need to allow a
     % break somewhere.  Check specifically for penalty 10002, inserted
-    % by \defargscommonending, instead of 10000, since the sectioning
+    % by \printdefunline, instead of 10000, since the sectioning
     % commands also insert a nobreak penalty, and we don't want to allow
     % a break between a section heading and a defun.
-    % 
-    \ifnum\lastpenalty=10002 \penalty2000 \fi
+    %
+    % As a minor refinement, we avoid "club" headers by signalling
+    % with penalty of 10003 after the very first @deffn in the
+    % sequence (see above), and penalty of 10002 after any following
+    % @def command.
+    \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
     %
     % Similarly, after a section heading, do not allow a break.
     % But do insert the glue.
@@ -5627,7 +5674,7 @@ output) for that.)}
   %
   % As above, allow line break if we have multiple x headers in a row.
   % It's not a great place, though.
-  \ifnum\lastpenalty=10002 \penalty3000 \fi
+  \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
   %
   % And now, it's time to reuse the body of the original defun:
   \expandafter\gobbledefun#1%
@@ -5645,7 +5692,7 @@ output) for that.)}
     \advance\rightskip by 0pt plus 1fil
     \endgraf
     \nobreak\vskip -\parskip
-    \penalty 10002  % signal to \startdefun and \dodefunx
+    \penalty\defunpenalty  % signal to \startdefun and \dodefunx
     % Some of the @defun-type tags do not enable magic parentheses,
     % rendering the following check redundant.  But we don't optimize.
     \checkparencounts
@@ -6245,7 +6292,6 @@ output) for that.)}
 \message{cross references,}
 
 \newwrite\auxfile
-
 \newif\ifhavexrefs    % True if xref values are known.
 \newif\ifwarnedxrefs  % True if we warned once that they aren't known.
 
@@ -6312,7 +6358,7 @@ output) for that.)}
       \toks0 = \expandafter{\thissection}%
       \immediate \writexrdef{title}{\the\toks0 }%
       \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
-      \writexrdef{pg}{\folio}% will be written later, during \shipout
+      \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
     }%
   \fi
 }
@@ -6358,7 +6404,8 @@ output) for that.)}
   \ifpdf
     \leavevmode
     \getfilename{#4}%
-    {\turnoffactive
+    {\indexnofonts
+     \turnoffactive
      % See comments at \activebackslashdouble.
      {\activebackslashdouble \xdef\pdfxrefdest{#1}%
       \backslashparens\pdfxrefdest}%
@@ -6505,10 +6552,18 @@ output) for that.)}
 % collisions).  But if this is a float type, we have more work to do.
 %
 \def\xrdef#1#2{%
-  \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value.
+  {% The node name might contain 8-bit characters, which in our current
+   % implementation are changed to commands like @'e.  Don't let these
+   % mess up the control sequence name.
+    \indexnofonts
+    \turnoffactive
+    \xdef\safexrefname{#1}%
+  }%
+  %
+  \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
   %
   % Was that xref control sequence that we just defined for a float?
-  \expandafter\iffloat\csname XR#1\endcsname
+  \expandafter\iffloat\csname XR\safexrefname\endcsname
     % it was a float, and we have the (safe) float type in \iffloattype.
     \expandafter\let\expandafter\floatlist
       \csname floatlist\iffloattype\endcsname
@@ -6523,7 +6578,8 @@ output) for that.)}
     %
     % Remember this xref in the control sequence \floatlistFLOATTYPE,
     % for later use in \listoffloats.
-    \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}%
+    \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
+      {\safexrefname}}%
   \fi
 }
 
@@ -6627,6 +6683,7 @@ output) for that.)}
   \input\jobname.#1
 \endgroup}
 
+
 \message{insertions,}
 % including footnotes.
 
@@ -7101,8 +7158,8 @@ output) for that.)}
   \writeentry
 }}
 
+
 \message{localization,}
-% and i18n.
 
 % @documentlanguage is usually given very early, just after
 % @setfilename.  If done too late, it may not override everything
@@ -7128,7 +7185,7 @@ should work if nowhere else does.}
 
 % Set the catcode of characters 128 through 255 to the specified number.
 %
-\def\setnonasciicharscatcode#1{
+\def\setnonasciicharscatcode#1{%
    \count255=128
    \loop\ifnum\count255<256
       \global\catcode\count255=#1
@@ -7145,10 +7202,11 @@ should work if nowhere else does.}
   %
   % Supported encodings: names converted to tokens in order to be able
   % to compare them with \ifx.
-  \def\latone{\csname ISO-8859-1.enc\endcsname}%
+  \def\ascii{\csname US-ASCII.enc\endcsname}%
   \def\latnine{\csname ISO-8859-15.enc\endcsname}%
+  \def\latone{\csname ISO-8859-1.enc\endcsname}%
   \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
-  \def\ascii{\csname US-ASCII.enc\endcsname}%
+  \def\utfeight{\csname UTF-8.enc\endcsname}%
   %
   \ifx \declaredencoding \ascii
      \asciichardefs
@@ -7165,9 +7223,14 @@ should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \latninechardefs
   %
+  \else \ifx \declaredencoding \utfeight
+     \setnonasciicharscatcode\active
+     \utfeightchardefs
+  %
   \else 
     \message{Unknown document encoding #1, ignoring.}%
   %
+  \fi % utfeight
   \fi % latnine
   \fi % latone
   \fi % lattwo
@@ -7189,234 +7252,728 @@ should work if nowhere else does.}
 %
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-    \gdef^^a0{~} 
-    \gdef^^a1{\exclamdown}
-    \gdef^^a2{\missingcharmsg{CENT SIGN}} 
-    \gdef^^a3{{\pounds}}
-    \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
-    \gdef^^a5{\missingcharmsg{YEN SIGN}}
-    \gdef^^a6{\missingcharmsg{BROKEN BAR}} 
-    \gdef^^a7{\S}
-    \gdef^^a8{\"{}} 
-    \gdef^^a9{\copyright} 
-    \gdef^^aa{\ordf}
-    \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
-    \gdef^^ac{$\lnot$}
-    \gdef^^ad{\-} 
-    \gdef^^ae{\registeredsymbol} 
-    \gdef^^af{\={}}
-    %
-    \gdef^^b0{\textdegree}
-    \gdef^^b1{$\pm$}
-    \gdef^^b2{$^2$}
-    \gdef^^b3{$^3$}
-    \gdef^^b4{\'{}}
-    \gdef^^b5{$\mu$}
-    \gdef^^b6{\P}
-    %
-    \gdef^^b7{$^.$}
-    \gdef^^b8{\cedilla\ }
-    \gdef^^b9{$^1$}
-    \gdef^^ba{\ordm}
-    %
-    \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
-    \gdef^^bc{$1\over4$}
-    \gdef^^bd{$1\over2$}
-    \gdef^^be{$3\over4$}
-    \gdef^^bf{\questiondown}
-    %
-    \gdef^^c0{\`A}
-    \gdef^^c1{\'A}
-    \gdef^^c2{\^A}
-    \gdef^^c3{\~A}
-    \gdef^^c4{\"A}
-    \gdef^^c5{\ringaccent A} 
-    \gdef^^c6{\AE}
-    \gdef^^c7{\cedilla C}
-    \gdef^^c8{\`E}
-    \gdef^^c9{\'E}
-    \gdef^^ca{\^E}
-    \gdef^^cb{\"E}
-    \gdef^^cc{\`I}
-    \gdef^^cd{\'I}
-    \gdef^^ce{\^I}
-    \gdef^^cf{\"I}
-    %
-    \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
-    \gdef^^d1{\~N}
-    \gdef^^d2{\`O}
-    \gdef^^d3{\'O}
-    \gdef^^d4{\^O}
-    \gdef^^d5{\~O}
-    \gdef^^d6{\"O}
-    \gdef^^d7{$\times$}
-    \gdef^^d8{\O}
-    \gdef^^d9{\`U}
-    \gdef^^da{\'U}
-    \gdef^^db{\^U}
-    \gdef^^dc{\"U}
-    \gdef^^dd{\'Y}
-    \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
-    \gdef^^df{\ss}
-    %
-    \gdef^^e0{\`a}
-    \gdef^^e1{\'a}
-    \gdef^^e2{\^a}
-    \gdef^^e3{\~a}
-    \gdef^^e4{\"a}
-    \gdef^^e5{\ringaccent a}
-    \gdef^^e6{\ae}
-    \gdef^^e7{\cedilla c}
-    \gdef^^e8{\`e}
-    \gdef^^e9{\'e}
-    \gdef^^ea{\^e}
-    \gdef^^eb{\"e}
-    \gdef^^ec{\`{\dotless i}}
-    \gdef^^ed{\'{\dotless i}}
-    \gdef^^ee{\^{\dotless i}}
-    \gdef^^ef{\"{\dotless i}}
-    %
-    \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
-    \gdef^^f1{\~n}
-    \gdef^^f2{\`o}
-    \gdef^^f3{\'o}
-    \gdef^^f4{\^o}
-    \gdef^^f5{\~o}
-    \gdef^^f6{\"o}
-    \gdef^^f7{$\div$}
-    \gdef^^f8{\o}
-    \gdef^^f9{\`u}
-    \gdef^^fa{\'u}
-    \gdef^^fb{\^u}
-    \gdef^^fc{\"u}
-    \gdef^^fd{\'y}
-    \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
-    \gdef^^ff{\"y}
+  \gdef^^a0{~} 
+  \gdef^^a1{\exclamdown}
+  \gdef^^a2{\missingcharmsg{CENT SIGN}} 
+  \gdef^^a3{{\pounds}}
+  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+  \gdef^^a5{\missingcharmsg{YEN SIGN}}
+  \gdef^^a6{\missingcharmsg{BROKEN BAR}} 
+  \gdef^^a7{\S}
+  \gdef^^a8{\"{}} 
+  \gdef^^a9{\copyright} 
+  \gdef^^aa{\ordf}
+  \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
+  \gdef^^ac{$\lnot$}
+  \gdef^^ad{\-} 
+  \gdef^^ae{\registeredsymbol} 
+  \gdef^^af{\={}}
+  %
+  \gdef^^b0{\textdegree}
+  \gdef^^b1{$\pm$}
+  \gdef^^b2{$^2$}
+  \gdef^^b3{$^3$}
+  \gdef^^b4{\'{}}
+  \gdef^^b5{$\mu$}
+  \gdef^^b6{\P}
+  %
+  \gdef^^b7{$^.$}
+  \gdef^^b8{\cedilla\ }
+  \gdef^^b9{$^1$}
+  \gdef^^ba{\ordm}
+  %
+  \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
+  \gdef^^bc{$1\over4$}
+  \gdef^^bd{$1\over2$}
+  \gdef^^be{$3\over4$}
+  \gdef^^bf{\questiondown}
+  %
+  \gdef^^c0{\`A}
+  \gdef^^c1{\'A}
+  \gdef^^c2{\^A}
+  \gdef^^c3{\~A}
+  \gdef^^c4{\"A}
+  \gdef^^c5{\ringaccent A} 
+  \gdef^^c6{\AE}
+  \gdef^^c7{\cedilla C}
+  \gdef^^c8{\`E}
+  \gdef^^c9{\'E}
+  \gdef^^ca{\^E}
+  \gdef^^cb{\"E}
+  \gdef^^cc{\`I}
+  \gdef^^cd{\'I}
+  \gdef^^ce{\^I}
+  \gdef^^cf{\"I}
+  %
+  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+  \gdef^^d1{\~N}
+  \gdef^^d2{\`O}
+  \gdef^^d3{\'O}
+  \gdef^^d4{\^O}
+  \gdef^^d5{\~O}
+  \gdef^^d6{\"O}
+  \gdef^^d7{$\times$}
+  \gdef^^d8{\O}
+  \gdef^^d9{\`U}
+  \gdef^^da{\'U}
+  \gdef^^db{\^U}
+  \gdef^^dc{\"U}
+  \gdef^^dd{\'Y}
+  \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+  \gdef^^df{\ss}
+  %
+  \gdef^^e0{\`a}
+  \gdef^^e1{\'a}
+  \gdef^^e2{\^a}
+  \gdef^^e3{\~a}
+  \gdef^^e4{\"a}
+  \gdef^^e5{\ringaccent a}
+  \gdef^^e6{\ae}
+  \gdef^^e7{\cedilla c}
+  \gdef^^e8{\`e}
+  \gdef^^e9{\'e}
+  \gdef^^ea{\^e}
+  \gdef^^eb{\"e}
+  \gdef^^ec{\`{\dotless i}}
+  \gdef^^ed{\'{\dotless i}}
+  \gdef^^ee{\^{\dotless i}}
+  \gdef^^ef{\"{\dotless i}}
+  %
+  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+  \gdef^^f1{\~n}
+  \gdef^^f2{\`o}
+  \gdef^^f3{\'o}
+  \gdef^^f4{\^o}
+  \gdef^^f5{\~o}
+  \gdef^^f6{\"o}
+  \gdef^^f7{$\div$}
+  \gdef^^f8{\o}
+  \gdef^^f9{\`u}
+  \gdef^^fa{\'u}
+  \gdef^^fb{\^u}
+  \gdef^^fc{\"u}
+  \gdef^^fd{\'y}
+  \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+  \gdef^^ff{\"y}
 }
 
 % Latin9 (ISO-8859-15) encoding character definitions.
 \def\latninechardefs{%
-   % Encoding is almost identical to Latin1.
-   \latonechardefs
-   %
-   \gdef^^a4{\euro}
-   \gdef^^a6{\v S}
-   \gdef^^a8{\v s}
-   \gdef^^b4{\v Z}
-   \gdef^^b8{\v z}
-   \gdef^^bc{\OE}
-   \gdef^^bd{\oe}
-   \gdef^^be{\"Y}
+  % Encoding is almost identical to Latin1.
+  \latonechardefs
+  %
+  \gdef^^a4{\euro}
+  \gdef^^a6{\v S}
+  \gdef^^a8{\v s}
+  \gdef^^b4{\v Z}
+  \gdef^^b8{\v z}
+  \gdef^^bc{\OE}
+  \gdef^^bd{\oe}
+  \gdef^^be{\"Y}
 }
 
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
-   \gdef^^a0{~}
-   \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
-   \gdef^^a2{\u{}}
-   \gdef^^a3{\L}
-   \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
-   \gdef^^a5{\v L}
-   \gdef^^a6{\'S}
-   \gdef^^a7{\S}
-   \gdef^^a8{\"{}}
-   \gdef^^a9{\v S}
-   \gdef^^aa{\cedilla S}
-   \gdef^^ab{\v T}
-   \gdef^^ac{\'Z}
-   \gdef^^ad{\-}
-   \gdef^^ae{\v Z}
-   \gdef^^af{\dotaccent Z}
-   %
-   \gdef^^b0{\textdegree}
-   \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
-   \gdef^^b2{\missingcharmsg{OGONEK}}
-   \gdef^^b3{\l}
-   \gdef^^b4{\'{}}
-   \gdef^^b5{\v l}
-   \gdef^^b6{\'s}
-   \gdef^^b7{\v{}}
-   \gdef^^b8{\cedilla\ }
-   \gdef^^b9{\v s}
-   \gdef^^ba{\cedilla s}
-   \gdef^^bb{\v t}
-   \gdef^^bc{\'z}
-   \gdef^^bd{\H{}}
-   \gdef^^be{\v z}
-   \gdef^^bf{\dotaccent z}
-   %
-   \gdef^^c0{\'R}
-   \gdef^^c1{\'A}
-   \gdef^^c2{\^A}
-   \gdef^^c3{\u A}
-   \gdef^^c4{\"A}
-   \gdef^^c5{\'L}
-   \gdef^^c6{\'C}
-   \gdef^^c7{\cedilla C}
-   \gdef^^c8{\v C}
-   \gdef^^c9{\'E}
-   \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
-   \gdef^^cb{\"E}
-   \gdef^^cc{\v E}
-   \gdef^^cd{\'I}
-   \gdef^^ce{\^I}
-   \gdef^^cf{\v D}
-   %
-   \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
-   \gdef^^d1{\'N}
-   \gdef^^d2{\v N}
-   \gdef^^d3{\'O}
-   \gdef^^d4{\^O}
-   \gdef^^d5{\H O}
-   \gdef^^d6{\"O}
-   \gdef^^d7{$\times$}
-   \gdef^^d8{\v R}
-   \gdef^^d9{\ringaccent U} 
-   \gdef^^da{\'U}
-   \gdef^^db{\H U}
-   \gdef^^dc{\"U}
-   \gdef^^dd{\'Y}
-   \gdef^^de{\cedilla T}
-   \gdef^^df{\ss}
-   %
-   \gdef^^e0{\'r}
-   \gdef^^e1{\'a}
-   \gdef^^e2{\^a}
-   \gdef^^e3{\u a}
-   \gdef^^e4{\"a}
-   \gdef^^e5{\'l}
-   \gdef^^e6{\'c}
-   \gdef^^e7{\cedilla c}
-   \gdef^^e8{\v c}
-   \gdef^^e9{\'e}
-   \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
-   \gdef^^eb{\"e}
-   \gdef^^ec{\v e}
-   \gdef^^ed{\'\i}
-   \gdef^^ee{\^\i}
-   \gdef^^ef{\v d}
-   %
-   \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
-   \gdef^^f1{\'n}
-   \gdef^^f2{\v n}
-   \gdef^^f3{\'o}
-   \gdef^^f4{\^o}
-   \gdef^^f5{\H o}
-   \gdef^^f6{\"o}
-   \gdef^^f7{$\div$}
-   \gdef^^f8{\v r}
-   \gdef^^f9{\ringaccent u}
-   \gdef^^fa{\'u}
-   \gdef^^fb{\H u}
-   \gdef^^fc{\"u}
-   \gdef^^fd{\'y}
-   \gdef^^fe{\cedilla t}
-   \gdef^^ff{\dotaccent{}}
+  \gdef^^a0{~}
+  \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
+  \gdef^^a2{\u{}}
+  \gdef^^a3{\L}
+  \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+  \gdef^^a5{\v L}
+  \gdef^^a6{\'S}
+  \gdef^^a7{\S}
+  \gdef^^a8{\"{}}
+  \gdef^^a9{\v S}
+  \gdef^^aa{\cedilla S}
+  \gdef^^ab{\v T}
+  \gdef^^ac{\'Z}
+  \gdef^^ad{\-}
+  \gdef^^ae{\v Z}
+  \gdef^^af{\dotaccent Z}
+  %
+  \gdef^^b0{\textdegree}
+  \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
+  \gdef^^b2{\missingcharmsg{OGONEK}}
+  \gdef^^b3{\l}
+  \gdef^^b4{\'{}}
+  \gdef^^b5{\v l}
+  \gdef^^b6{\'s}
+  \gdef^^b7{\v{}}
+  \gdef^^b8{\cedilla\ }
+  \gdef^^b9{\v s}
+  \gdef^^ba{\cedilla s}
+  \gdef^^bb{\v t}
+  \gdef^^bc{\'z}
+  \gdef^^bd{\H{}}
+  \gdef^^be{\v z}
+  \gdef^^bf{\dotaccent z}
+  %
+  \gdef^^c0{\'R}
+  \gdef^^c1{\'A}
+  \gdef^^c2{\^A}
+  \gdef^^c3{\u A}
+  \gdef^^c4{\"A}
+  \gdef^^c5{\'L}
+  \gdef^^c6{\'C}
+  \gdef^^c7{\cedilla C}
+  \gdef^^c8{\v C}
+  \gdef^^c9{\'E}
+  \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
+  \gdef^^cb{\"E}
+  \gdef^^cc{\v E}
+  \gdef^^cd{\'I}
+  \gdef^^ce{\^I}
+  \gdef^^cf{\v D}
+  %
+  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+  \gdef^^d1{\'N}
+  \gdef^^d2{\v N}
+  \gdef^^d3{\'O}
+  \gdef^^d4{\^O}
+  \gdef^^d5{\H O}
+  \gdef^^d6{\"O}
+  \gdef^^d7{$\times$}
+  \gdef^^d8{\v R}
+  \gdef^^d9{\ringaccent U} 
+  \gdef^^da{\'U}
+  \gdef^^db{\H U}
+  \gdef^^dc{\"U}
+  \gdef^^dd{\'Y}
+  \gdef^^de{\cedilla T}
+  \gdef^^df{\ss}
+  %
+  \gdef^^e0{\'r}
+  \gdef^^e1{\'a}
+  \gdef^^e2{\^a}
+  \gdef^^e3{\u a}
+  \gdef^^e4{\"a}
+  \gdef^^e5{\'l}
+  \gdef^^e6{\'c}
+  \gdef^^e7{\cedilla c}
+  \gdef^^e8{\v c}
+  \gdef^^e9{\'e}
+  \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
+  \gdef^^eb{\"e}
+  \gdef^^ec{\v e}
+  \gdef^^ed{\'\i}
+  \gdef^^ee{\^\i}
+  \gdef^^ef{\v d}
+  %
+  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+  \gdef^^f1{\'n}
+  \gdef^^f2{\v n}
+  \gdef^^f3{\'o}
+  \gdef^^f4{\^o}
+  \gdef^^f5{\H o}
+  \gdef^^f6{\"o}
+  \gdef^^f7{$\div$}
+  \gdef^^f8{\v r}
+  \gdef^^f9{\ringaccent u}
+  \gdef^^fa{\'u}
+  \gdef^^fb{\H u}
+  \gdef^^fc{\"u}
+  \gdef^^fd{\'y}
+  \gdef^^fe{\cedilla t}
+  \gdef^^ff{\dotaccent{}}
+}
+
+% UTF-8 character definitions.
+% 
+% This code to support UTF-8 is based on LaTeX's utf8.def, with some
+% changes for Texinfo conventions.  It is included here under the GPL by
+% permission from Frank Mittelbach and the LaTeX team.
+% 
+\newcount\countUTFx
+\newcount\countUTFy
+\newcount\countUTFz
+
+\gdef\UTFviiiTwoOctets#1#2{\expandafter
+   \UTFviiiDefined\csname u8:#1\string #2\endcsname}
+%
+\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
+   \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
+%
+\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
+   \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
+
+\gdef\UTFviiiDefined#1{%
+  \ifx #1\relax
+    \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+  \else
+    \expandafter #1%
+  \fi
 }
 
+\begingroup
+  \catcode`\~13
+  \catcode`\"12
+
+  \def\UTFviiiLoop{%
+    \global\catcode\countUTFx\active
+    \uccode`\~\countUTFx
+    \uppercase\expandafter{\UTFviiiTmp}%
+    \advance\countUTFx by 1
+    \ifnum\countUTFx < \countUTFy
+      \expandafter\UTFviiiLoop
+    \fi}
+
+  \countUTFx = "C2
+  \countUTFy = "E0
+  \def\UTFviiiTmp{%
+    \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+  \UTFviiiLoop
+
+  \countUTFx = "E0
+  \countUTFy = "F0
+  \def\UTFviiiTmp{%
+    \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+  \UTFviiiLoop
+
+  \countUTFx = "F0
+  \countUTFy = "F4
+  \def\UTFviiiTmp{%
+    \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+  \UTFviiiLoop
+\endgroup
+
+\begingroup
+  \catcode`\"=12
+  \catcode`\<=12
+  \catcode`\.=12
+  \catcode`\,=12
+  \catcode`\;=12
+  \catcode`\!=12
+  \catcode`\~=13
+
+  \gdef\DeclareUnicodeCharacter#1#2{%
+    \countUTFz = "#1\relax
+    \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+    \begingroup
+      \parseXMLCharref
+      \def\UTFviiiTwoOctets##1##2{%
+        \csname u8:##1\string ##2\endcsname}%
+      \def\UTFviiiThreeOctets##1##2##3{%
+        \csname u8:##1\string ##2\string ##3\endcsname}%
+      \def\UTFviiiFourOctets##1##2##3##4{%
+        \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
+      \expandafter\expandafter\expandafter\expandafter
+       \expandafter\expandafter\expandafter
+       \gdef\UTFviiiTmp{#2}%
+    \endgroup}
+
+  \gdef\parseXMLCharref{%
+    \ifnum\countUTFz < "A0\relax
+      \errhelp = \EMsimple
+      \errmessage{Cannot define Unicode char value < 00A0}%
+    \else\ifnum\countUTFz < "800\relax
+      \parseUTFviiiA,%
+      \parseUTFviiiB C\UTFviiiTwoOctets.,%
+    \else\ifnum\countUTFz < "10000\relax
+      \parseUTFviiiA;%
+      \parseUTFviiiA,%
+      \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+    \else
+      \parseUTFviiiA;%
+      \parseUTFviiiA,%
+      \parseUTFviiiA!%
+      \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+    \fi\fi\fi
+  }
+
+  \gdef\parseUTFviiiA#1{%
+    \countUTFx = \countUTFz
+    \divide\countUTFz by 64
+    \countUTFy = \countUTFz
+    \multiply\countUTFz by 64
+    \advance\countUTFx by -\countUTFz
+    \advance\countUTFx by 128
+    \uccode `#1\countUTFx
+    \countUTFz = \countUTFy}
+
+  \gdef\parseUTFviiiB#1#2#3#4{%
+    \advance\countUTFz by "#10\relax
+    \uccode `#3\countUTFz
+    \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
+\endgroup
+
+\def\utfeightchardefs{%
+  \DeclareUnicodeCharacter{00A0}{\tie}
+  \DeclareUnicodeCharacter{00A1}{\exclamdown}
+  \DeclareUnicodeCharacter{00A3}{\pounds}
+  \DeclareUnicodeCharacter{00A8}{\"{ }}
+  \DeclareUnicodeCharacter{00A9}{\copyright}
+  \DeclareUnicodeCharacter{00AA}{\ordf}
+  \DeclareUnicodeCharacter{00AD}{\-}
+  \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
+  \DeclareUnicodeCharacter{00AF}{\={ }}
+
+  \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
+  \DeclareUnicodeCharacter{00B4}{\'{ }}
+  \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
+  \DeclareUnicodeCharacter{00BA}{\ordm}
+  \DeclareUnicodeCharacter{00BF}{\questiondown}
+
+  \DeclareUnicodeCharacter{00C0}{\`A}
+  \DeclareUnicodeCharacter{00C1}{\'A}
+  \DeclareUnicodeCharacter{00C2}{\^A}
+  \DeclareUnicodeCharacter{00C3}{\~A}
+  \DeclareUnicodeCharacter{00C4}{\"A}
+  \DeclareUnicodeCharacter{00C5}{\AA}
+  \DeclareUnicodeCharacter{00C6}{\AE}
+  \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
+  \DeclareUnicodeCharacter{00C8}{\`E}
+  \DeclareUnicodeCharacter{00C9}{\'E}
+  \DeclareUnicodeCharacter{00CA}{\^E}
+  \DeclareUnicodeCharacter{00CB}{\"E}
+  \DeclareUnicodeCharacter{00CC}{\`I}
+  \DeclareUnicodeCharacter{00CD}{\'I}
+  \DeclareUnicodeCharacter{00CE}{\^I}
+  \DeclareUnicodeCharacter{00CF}{\"I}
+
+  \DeclareUnicodeCharacter{00D1}{\~N}
+  \DeclareUnicodeCharacter{00D2}{\`O}
+  \DeclareUnicodeCharacter{00D3}{\'O}
+  \DeclareUnicodeCharacter{00D4}{\^O}
+  \DeclareUnicodeCharacter{00D5}{\~O}
+  \DeclareUnicodeCharacter{00D6}{\"O}
+  \DeclareUnicodeCharacter{00D8}{\O}
+  \DeclareUnicodeCharacter{00D9}{\`U}
+  \DeclareUnicodeCharacter{00DA}{\'U}
+  \DeclareUnicodeCharacter{00DB}{\^U}
+  \DeclareUnicodeCharacter{00DC}{\"U}
+  \DeclareUnicodeCharacter{00DD}{\'Y}
+  \DeclareUnicodeCharacter{00DF}{\ss}
+
+  \DeclareUnicodeCharacter{00E0}{\`a}
+  \DeclareUnicodeCharacter{00E1}{\'a}
+  \DeclareUnicodeCharacter{00E2}{\^a}
+  \DeclareUnicodeCharacter{00E3}{\~a}
+  \DeclareUnicodeCharacter{00E4}{\"a}
+  \DeclareUnicodeCharacter{00E5}{\aa}
+  \DeclareUnicodeCharacter{00E6}{\ae}
+  \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
+  \DeclareUnicodeCharacter{00E8}{\`e}
+  \DeclareUnicodeCharacter{00E9}{\'e}
+  \DeclareUnicodeCharacter{00EA}{\^e}
+  \DeclareUnicodeCharacter{00EB}{\"e}
+  \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
+  \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
+  \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
+  \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+
+  \DeclareUnicodeCharacter{00F1}{\~n}
+  \DeclareUnicodeCharacter{00F2}{\`o}
+  \DeclareUnicodeCharacter{00F3}{\'o}
+  \DeclareUnicodeCharacter{00F4}{\^o}
+  \DeclareUnicodeCharacter{00F5}{\~o}
+  \DeclareUnicodeCharacter{00F6}{\"o}
+  \DeclareUnicodeCharacter{00F8}{\o}
+  \DeclareUnicodeCharacter{00F9}{\`u}
+  \DeclareUnicodeCharacter{00FA}{\'u}
+  \DeclareUnicodeCharacter{00FB}{\^u}
+  \DeclareUnicodeCharacter{00FC}{\"u}
+  \DeclareUnicodeCharacter{00FD}{\'y}
+  \DeclareUnicodeCharacter{00FF}{\"y}
+
+  \DeclareUnicodeCharacter{0100}{\=A}
+  \DeclareUnicodeCharacter{0101}{\=a}
+  \DeclareUnicodeCharacter{0102}{\u{A}}
+  \DeclareUnicodeCharacter{0103}{\u{a}}
+  \DeclareUnicodeCharacter{0106}{\'C}
+  \DeclareUnicodeCharacter{0107}{\'c}
+  \DeclareUnicodeCharacter{0108}{\^C}
+  \DeclareUnicodeCharacter{0109}{\^c}
+  \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
+  \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
+  \DeclareUnicodeCharacter{010C}{\v{C}}
+  \DeclareUnicodeCharacter{010D}{\v{c}}
+  \DeclareUnicodeCharacter{010E}{\v{D}}
+
+  \DeclareUnicodeCharacter{0112}{\=E}
+  \DeclareUnicodeCharacter{0113}{\=e}
+  \DeclareUnicodeCharacter{0114}{\u{E}}
+  \DeclareUnicodeCharacter{0115}{\u{e}}
+  \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
+  \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
+  \DeclareUnicodeCharacter{011A}{\v{E}}
+  \DeclareUnicodeCharacter{011B}{\v{e}}
+  \DeclareUnicodeCharacter{011C}{\^G}
+  \DeclareUnicodeCharacter{011D}{\^g}
+  \DeclareUnicodeCharacter{011E}{\u{G}}
+  \DeclareUnicodeCharacter{011F}{\u{g}}
+
+  \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
+  \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
+  \DeclareUnicodeCharacter{0124}{\^H}
+  \DeclareUnicodeCharacter{0125}{\^h}
+  \DeclareUnicodeCharacter{0128}{\~I}
+  \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
+  \DeclareUnicodeCharacter{012A}{\=I}
+  \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
+  \DeclareUnicodeCharacter{012C}{\u{I}}
+  \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
+
+  \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
+  \DeclareUnicodeCharacter{0131}{\dotless{i}}
+  \DeclareUnicodeCharacter{0132}{IJ}
+  \DeclareUnicodeCharacter{0133}{ij}
+  \DeclareUnicodeCharacter{0134}{\^J}
+  \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
+  \DeclareUnicodeCharacter{0139}{\'L}
+  \DeclareUnicodeCharacter{013A}{\'l}
+
+  \DeclareUnicodeCharacter{0141}{\L}
+  \DeclareUnicodeCharacter{0142}{\l}
+  \DeclareUnicodeCharacter{0143}{\'N}
+  \DeclareUnicodeCharacter{0144}{\'n}
+  \DeclareUnicodeCharacter{0147}{\v{N}}
+  \DeclareUnicodeCharacter{0148}{\v{n}}
+  \DeclareUnicodeCharacter{014C}{\=O}
+  \DeclareUnicodeCharacter{014D}{\=o}
+  \DeclareUnicodeCharacter{014E}{\u{O}}
+  \DeclareUnicodeCharacter{014F}{\u{o}}
+
+  \DeclareUnicodeCharacter{0150}{\H{O}}
+  \DeclareUnicodeCharacter{0151}{\H{o}}
+  \DeclareUnicodeCharacter{0152}{\OE}
+  \DeclareUnicodeCharacter{0153}{\oe}
+  \DeclareUnicodeCharacter{0154}{\'R}
+  \DeclareUnicodeCharacter{0155}{\'r}
+  \DeclareUnicodeCharacter{0158}{\v{R}}
+  \DeclareUnicodeCharacter{0159}{\v{r}}
+  \DeclareUnicodeCharacter{015A}{\'S}
+  \DeclareUnicodeCharacter{015B}{\'s}
+  \DeclareUnicodeCharacter{015C}{\^S}
+  \DeclareUnicodeCharacter{015D}{\^s}
+  \DeclareUnicodeCharacter{015E}{\cedilla{S}}
+  \DeclareUnicodeCharacter{015F}{\cedilla{s}}
+
+  \DeclareUnicodeCharacter{0160}{\v{S}}
+  \DeclareUnicodeCharacter{0161}{\v{s}}
+  \DeclareUnicodeCharacter{0162}{\cedilla{t}}
+  \DeclareUnicodeCharacter{0163}{\cedilla{T}}
+  \DeclareUnicodeCharacter{0164}{\v{T}}
+
+  \DeclareUnicodeCharacter{0168}{\~U}
+  \DeclareUnicodeCharacter{0169}{\~u}
+  \DeclareUnicodeCharacter{016A}{\=U}
+  \DeclareUnicodeCharacter{016B}{\=u}
+  \DeclareUnicodeCharacter{016C}{\u{U}}
+  \DeclareUnicodeCharacter{016D}{\u{u}}
+  \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
+  \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
+
+  \DeclareUnicodeCharacter{0170}{\H{U}}
+  \DeclareUnicodeCharacter{0171}{\H{u}}
+  \DeclareUnicodeCharacter{0174}{\^W}
+  \DeclareUnicodeCharacter{0175}{\^w}
+  \DeclareUnicodeCharacter{0176}{\^Y}
+  \DeclareUnicodeCharacter{0177}{\^y}
+  \DeclareUnicodeCharacter{0178}{\"Y}
+  \DeclareUnicodeCharacter{0179}{\'Z}
+  \DeclareUnicodeCharacter{017A}{\'z}
+  \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
+  \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
+  \DeclareUnicodeCharacter{017D}{\v{Z}}
+  \DeclareUnicodeCharacter{017E}{\v{z}}
+
+  \DeclareUnicodeCharacter{01C4}{D\v{Z}}
+  \DeclareUnicodeCharacter{01C5}{D\v{z}}
+  \DeclareUnicodeCharacter{01C6}{d\v{z}}
+  \DeclareUnicodeCharacter{01C7}{LJ}
+  \DeclareUnicodeCharacter{01C8}{Lj}
+  \DeclareUnicodeCharacter{01C9}{lj}
+  \DeclareUnicodeCharacter{01CA}{NJ}
+  \DeclareUnicodeCharacter{01CB}{Nj}
+  \DeclareUnicodeCharacter{01CC}{nj}
+  \DeclareUnicodeCharacter{01CD}{\v{A}}
+  \DeclareUnicodeCharacter{01CE}{\v{a}}
+  \DeclareUnicodeCharacter{01CF}{\v{I}}
+
+  \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
+  \DeclareUnicodeCharacter{01D1}{\v{O}}
+  \DeclareUnicodeCharacter{01D2}{\v{o}}
+  \DeclareUnicodeCharacter{01D3}{\v{U}}
+  \DeclareUnicodeCharacter{01D4}{\v{u}}
+
+  \DeclareUnicodeCharacter{01E2}{\={\AE}}
+  \DeclareUnicodeCharacter{01E3}{\={\ae}}
+  \DeclareUnicodeCharacter{01E6}{\v{G}}
+  \DeclareUnicodeCharacter{01E7}{\v{g}}
+  \DeclareUnicodeCharacter{01E8}{\v{K}}
+  \DeclareUnicodeCharacter{01E9}{\v{k}}
+
+  \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
+  \DeclareUnicodeCharacter{01F1}{DZ}
+  \DeclareUnicodeCharacter{01F2}{Dz}
+  \DeclareUnicodeCharacter{01F3}{dz}
+  \DeclareUnicodeCharacter{01F4}{\'G}
+  \DeclareUnicodeCharacter{01F5}{\'g}
+  \DeclareUnicodeCharacter{01F8}{\`N}
+  \DeclareUnicodeCharacter{01F9}{\`n}
+  \DeclareUnicodeCharacter{01FC}{\'{\AE}}
+  \DeclareUnicodeCharacter{01FD}{\'{\ae}}
+  \DeclareUnicodeCharacter{01FE}{\'{\O}}
+  \DeclareUnicodeCharacter{01FF}{\'{\o}}
+
+  \DeclareUnicodeCharacter{021E}{\v{H}}
+  \DeclareUnicodeCharacter{021F}{\v{h}}
+
+  \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
+  \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
+  \DeclareUnicodeCharacter{0228}{\cedilla{E}}
+  \DeclareUnicodeCharacter{0229}{\cedilla{e}}
+  \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
+  \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
+
+  \DeclareUnicodeCharacter{0232}{\=Y}
+  \DeclareUnicodeCharacter{0233}{\=y}
+  \DeclareUnicodeCharacter{0237}{\dotless{j}}
+
+  \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
+  \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
+  \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
+  \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
+  \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
+  \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
+  \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
+  \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
+  \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
+  \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
+  \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
+  \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
+
+  \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
+  \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
+
+  \DeclareUnicodeCharacter{1E20}{\=G}
+  \DeclareUnicodeCharacter{1E21}{\=g}
+  \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
+  \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
+  \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
+  \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
+  \DeclareUnicodeCharacter{1E26}{\"H}
+  \DeclareUnicodeCharacter{1E27}{\"h}
+
+  \DeclareUnicodeCharacter{1E30}{\'K}
+  \DeclareUnicodeCharacter{1E31}{\'k}
+  \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
+  \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
+  \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
+  \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
+  \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
+  \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
+  \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
+  \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
+  \DeclareUnicodeCharacter{1E3E}{\'M}
+  \DeclareUnicodeCharacter{1E3F}{\'m}
+
+  \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
+  \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
+  \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
+  \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
+  \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
+  \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
+  \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
+  \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
+  \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
+  \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
+
+  \DeclareUnicodeCharacter{1E54}{\'P}
+  \DeclareUnicodeCharacter{1E55}{\'p}
+  \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
+  \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
+  \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
+  \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
+  \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
+  \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
+  \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
+  \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
+
+  \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
+  \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
+  \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
+  \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
+  \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
+  \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
+  \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
+  \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
+  \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
+  \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
+
+  \DeclareUnicodeCharacter{1E7C}{\~V}
+  \DeclareUnicodeCharacter{1E7D}{\~v}
+  \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
+  \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
+
+  \DeclareUnicodeCharacter{1E80}{\`W}
+  \DeclareUnicodeCharacter{1E81}{\`w}
+  \DeclareUnicodeCharacter{1E82}{\'W}
+  \DeclareUnicodeCharacter{1E83}{\'w}
+  \DeclareUnicodeCharacter{1E84}{\"W}
+  \DeclareUnicodeCharacter{1E85}{\"w}
+  \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
+  \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
+  \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
+  \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
+  \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
+  \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
+  \DeclareUnicodeCharacter{1E8C}{\"X}
+  \DeclareUnicodeCharacter{1E8D}{\"x}
+  \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
+  \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
+
+  \DeclareUnicodeCharacter{1E90}{\^Z}
+  \DeclareUnicodeCharacter{1E91}{\^z}
+  \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
+  \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
+  \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
+  \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
+  \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
+  \DeclareUnicodeCharacter{1E97}{\"t}
+  \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
+  \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
+
+  \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
+  \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
+
+  \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
+  \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
+  \DeclareUnicodeCharacter{1EBC}{\~E}
+  \DeclareUnicodeCharacter{1EBD}{\~e}
+
+  \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
+  \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
+  \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
+  \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
+
+  \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
+  \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
+
+  \DeclareUnicodeCharacter{1EF2}{\`Y}
+  \DeclareUnicodeCharacter{1EF3}{\`y}
+  \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
+
+  \DeclareUnicodeCharacter{1EF8}{\~Y}
+  \DeclareUnicodeCharacter{1EF9}{\~y}
+
+  \DeclareUnicodeCharacter{2013}{--}
+  \DeclareUnicodeCharacter{2014}{---}
+  \DeclareUnicodeCharacter{2022}{\bullet}
+  \DeclareUnicodeCharacter{2026}{\dots}
+  \DeclareUnicodeCharacter{20AC}{\euro}
+
+  \DeclareUnicodeCharacter{2192}{\expansion}
+  \DeclareUnicodeCharacter{21D2}{\result}
+
+  \DeclareUnicodeCharacter{2212}{\minus}
+  \DeclareUnicodeCharacter{2217}{\point}
+  \DeclareUnicodeCharacter{2261}{\equiv}
+}% end of \utfeightchardefs
+
+
 % US-ASCII character definitions.
-\def\asciichardefs{%
-    % Nothing needs to be done
+\def\asciichardefs{% nothing need be done
    \relax
 }
 
@@ -7426,8 +7983,9 @@ should work if nowhere else does.}
 %
 \setnonasciicharscatcode \other
 
-% Page size parameters.
-%
+
+\message{formatting,}
+
 \newdimen\defaultparindent \defaultparindent = 15pt
 
 \chapheadingskip = 15pt plus 4pt minus 2pt
index 1cd472d90b5a4ba4d6462bc58e243314395361c1..16c37b34ae447ca37e62adf425ad4ff5d0e90149 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for gzip 1.3.9.
+# Generated by GNU Autoconf 2.61 for gzip 1.3.12.
 #
 # Report bugs to <bug-gzip@gnu.org>.
 #
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='gzip'
 PACKAGE_TARNAME='gzip'
-PACKAGE_VERSION='1.3.9'
-PACKAGE_STRING='gzip 1.3.9'
+PACKAGE_VERSION='1.3.12'
+PACKAGE_STRING='gzip 1.3.12'
 PACKAGE_BUGREPORT='bug-gzip@gnu.org'
 
 ac_unique_file="gzip.c"
@@ -703,11 +703,47 @@ GL_COND_LIBTOOL_FALSE
 ABSOLUTE_FCNTL_H
 FCNTL_H
 GETOPT_H
+LIBINTL
+LTLIBINTL
 STDBOOL_H
 HAVE__BOOL
+GNULIB_GETSUBOPT
+GNULIB_MKDTEMP
+GNULIB_MKSTEMP
+HAVE_GETSUBOPT
+HAVE_MKDTEMP
+REPLACE_MKSTEMP
+ABSOLUTE_STDLIB_H
 ABSOLUTE_SYS_STAT_H
 SYS_STAT_H
-UNISTD_H
+ABSOLUTE_SYS_TIME_H
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+REPLACE_GETTIMEOFDAY
+SYS_TIME_H
+REPLACE_LOCALTIME_R
+REPLACE_NANOSLEEP
+REPLACE_STRPTIME
+REPLACE_TIMEGM
+ABSOLUTE_TIME_H
+TIME_H_DEFINES_STRUCT_TIMESPEC
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
+GNULIB_CHOWN
+GNULIB_DUP2
+GNULIB_FCHDIR
+GNULIB_FTRUNCATE
+GNULIB_GETCWD
+GNULIB_GETLOGIN_R
+GNULIB_READLINK
+HAVE_DUP2
+HAVE_FTRUNCATE
+HAVE_READLINK
+HAVE_DECL_GETLOGIN_R
+REPLACE_CHOWN
+REPLACE_FCHDIR
+REPLACE_GETCWD
+HAVE_UNISTD_H
+ABSOLUTE_UNISTD_H
 LIBGZIP_LIBDEPS
 LIBGZIP_LTLIBDEPS
 ASCPPPOST
@@ -1230,7 +1266,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gzip 1.3.9 to adapt to many kinds of systems.
+\`configure' configures gzip 1.3.12 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1296,7 +1332,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gzip 1.3.9:";;
+     short | recursive ) echo "Configuration of gzip 1.3.12:";;
    esac
   cat <<\_ACEOF
 
@@ -1381,7 +1417,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gzip configure 1.3.9
+gzip configure 1.3.12
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1395,7 +1431,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gzip $as_me 1.3.9, which was
+It was created by gzip $as_me 1.3.12, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -1669,16 +1705,18 @@ echo "$as_me: creating cache $cache_file" >&6;}
 fi
 
 ac_header_list="$ac_header_list fcntl.h"
+ac_header_list="$ac_header_list sys/time.h"
+ac_header_list="$ac_header_list stdlib.h"
 ac_func_list="$ac_func_list lstat"
 ac_header_list="$ac_header_list sys/stat.h"
-ac_header_list="$ac_header_list sys/time.h"
+ac_header_list="$ac_header_list time.h"
+ac_header_list="$ac_header_list unistd.h"
 ac_func_list="$ac_func_list pipe"
 ac_header_list="$ac_header_list utime.h"
 ac_func_list="$ac_func_list futimes"
 ac_func_list="$ac_func_list futimesat"
 ac_header_list="$ac_header_list limits.h"
 ac_header_list="$ac_header_list memory.h"
-ac_header_list="$ac_header_list time.h"
 ac_func_list="$ac_func_list chown"
 ac_func_list="$ac_func_list fchmod"
 ac_func_list="$ac_func_list fchown"
@@ -2104,7 +2142,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='gzip'
- VERSION='1.3.9'
+ VERSION='1.3.12'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4254,6 +4292,8 @@ else
        >conftest.c || exit
        >|conftest.c || exit
        !>conftest.c || exit
+       # Test that $(...) works.
+       test "$(expr 3 + 4)" -eq 7 || exit
       '
       ac_cv_path_shell=no
 
@@ -6348,6 +6388,8 @@ _ACEOF
     ;;
 esac
 
+
+
 { echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; }
 if test "${ac_cv_header_stdbool_h+set}" = set; then
@@ -6534,6 +6576,16 @@ _ACEOF
 
    fi
 
+  GNULIB_GETSUBOPT=0;
+  GNULIB_MKDTEMP=0;
+  GNULIB_MKSTEMP=0;
+    HAVE_GETSUBOPT=1;
+  HAVE_MKDTEMP=1;
+  REPLACE_MKSTEMP=0;
+
+
+
+
 
 
 
 
 
 
-{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
-if test "${ac_cv_header_time+set}" = set; then
+{ echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
+echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_cv_c_restrict=no
+   # Try the official restrict keyword, then gcc's __restrict, and
+   # the less common variants.
+   for ac_kw in restrict __restrict __restrict__ _Restrict; do
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+typedef int * int_ptr;
+        int foo (int_ptr $ac_kw ip) {
+        return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+        int * $ac_kw t = s;
+        t[0] = 0;
+        return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_restrict=$ac_kw
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
+echo "${ECHO_T}$ac_cv_c_restrict" >&6; }
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no)
+cat >>confdefs.h <<\_ACEOF
+#define restrict
+_ACEOF
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_header_sys_time_h = yes; then
+      { echo "$as_me:$LINENO: checking absolute name of <sys/time.h>" >&5
+echo $ECHO_N "checking absolute name of <sys/time.h>... $ECHO_C" >&6; }
+if test "${gl_cv_absolute_sys_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+
+
+    if test $ac_cv_header_sys_time_h = yes; then
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
 #include <sys/time.h>
+_ACEOF
+      gl_cv_absolute_sys_time_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+sed -n '\#/sys/time.h#{s#.*"\(.*/sys/time.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
+    fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_time_h" >&5
+echo "${ECHO_T}$gl_cv_absolute_sys_time_h" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define ABSOLUTE_SYS_TIME_H "$gl_cv_absolute_sys_time_h"
+_ACEOF
+
+
+    ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\"
+    HAVE_SYS_TIME_H=1
+  else
+    ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\"
+    HAVE_SYS_TIME_H=0
+  fi
+
+
+
+  { echo "$as_me:$LINENO: checking for struct timeval" >&5
+echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+            #include <sys/time.h>
+           #endif
+           #include <time.h>
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  gl_cv_sys_struct_timeval=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       gl_cv_sys_struct_timeval=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5
+echo "${ECHO_T}$gl_cv_sys_struct_timeval" >&6; }
+  if test $gl_cv_sys_struct_timeval = yes; then
+    HAVE_STRUCT_TIMEVAL=1
+  else
+    HAVE_STRUCT_TIMEVAL=0
+  fi
+
+
+    REPLACE_GETTIMEOFDAY=0
+
+  if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
+    SYS_TIME_H=sys/time.h
+  else
+    SYS_TIME_H=
+  fi
+
+
+
+        REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+  REPLACE_STRPTIME=GNULIB_PORTCHECK;
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;
+
+
+
+
+
+
+
+
+
+
+  { echo "$as_me:$LINENO: checking for struct timespec in <time.h>" >&5
+echo $ECHO_N "checking for struct timespec in <time.h>... $ECHO_C" >&6; }
+if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <time.h>
 
 int
 main ()
 {
-if ((struct tm *) 0)
-return 0;
+static struct timespec x; x.tv_sec = x.tv_nsec;
   ;
   return 0;
 }
@@ -6743,25 +7001,134 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_header_time=yes
+  gl_cv_sys_struct_timespec_in_time_h=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_header_time=no
+       gl_cv_sys_struct_timespec_in_time_h=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6; }
-if test $ac_cv_header_time = yes; then
+{ echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+echo "${ECHO_T}$gl_cv_sys_struct_timespec_in_time_h" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    { echo "$as_me:$LINENO: checking for struct timespec in <sys/time.h>" >&5
+echo $ECHO_N "checking for struct timespec in <sys/time.h>... $ECHO_C" >&6; }
+if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+echo "${ECHO_T}$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+    if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    fi
+  fi
+
+
+
+
+
+
+    { echo "$as_me:$LINENO: checking absolute name of <time.h>" >&5
+echo $ECHO_N "checking absolute name of <time.h>... $ECHO_C" >&6; }
+if test "${gl_cv_absolute_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+
+
+    if test $ac_cv_header_time_h = yes; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
 _ACEOF
+      gl_cv_absolute_time_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+sed -n '\#/time.h#{s#.*"\(.*/time.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
+    fi
 
 fi
+{ echo "$as_me:$LINENO: result: $gl_cv_absolute_time_h" >&5
+echo "${ECHO_T}$gl_cv_absolute_time_h" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define ABSOLUTE_TIME_H "$gl_cv_absolute_time_h"
+_ACEOF
+
+
+  ABSOLUTE_TIME_H=\"$gl_cv_absolute_time_h\"
+
+
+
+
+  GNULIB_CHOWN=0;
+  GNULIB_DUP2=0;
+  GNULIB_FCHDIR=0;
+  GNULIB_FTRUNCATE=0;
+  GNULIB_GETCWD=0;
+  GNULIB_GETLOGIN_R=0;
+  GNULIB_READLINK=0;
+    HAVE_DUP2=1;
+  HAVE_FTRUNCATE=1;
+  HAVE_READLINK=1;
+  HAVE_DECL_GETLOGIN_R=1;
+  REPLACE_CHOWN=0;
+  REPLACE_FCHDIR=0;
+  REPLACE_GETCWD=0;
 
 
 
@@ -6891,10 +7258,9 @@ _ACEOF
 
 
 
-
   { echo "$as_me:$LINENO: checking for struct utimbuf" >&5
 echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
-if test "${fu_cv_sys_struct_utimbuf+set}" = set; then
+if test "${gl_cv_sys_struct_utimbuf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -6903,20 +7269,13 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.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 HAVE_UTIME_H
-# include <utime.h>
-#endif
+#if HAVE_SYS_TIME_H
+            #include <sys/time.h>
+           #endif
+           #include <time.h>
+           #ifdef HAVE_UTIME_H
+            #include <utime.h>
+           #endif
 
 int
 main ()
@@ -6943,21 +7302,20 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  fu_cv_sys_struct_utimbuf=yes
+  gl_cv_sys_struct_utimbuf=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       fu_cv_sys_struct_utimbuf=no
+       gl_cv_sys_struct_utimbuf=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ echo "$as_me:$LINENO: result: $fu_cv_sys_struct_utimbuf" >&5
-echo "${ECHO_T}$fu_cv_sys_struct_utimbuf" >&6; }
+{ echo "$as_me:$LINENO: result: $gl_cv_sys_struct_utimbuf" >&5
+echo "${ECHO_T}$gl_cv_sys_struct_utimbuf" >&6; }
 
-  if test $fu_cv_sys_struct_utimbuf = yes; then
+  if test $gl_cv_sys_struct_utimbuf = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_STRUCT_UTIMBUF 1
@@ -6984,7 +7342,7 @@ fi
   gl_cond_libtool=false
   gl_libdeps=
   gl_ltlibdeps=
-  gl_source_base='.#bootmp/lib'
+  gl_source_base='lib'
 
   { echo "$as_me:$LINENO: checking for error_at_line" >&5
 echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6; }
@@ -7214,6 +7572,8 @@ _ACEOF
   gl_LIBOBJS="$gl_LIBOBJS open-safer.$ac_objext"
   gl_LIBOBJS="$gl_LIBOBJS creat-safer.$ac_objext"
 
+
+
 cat >>confdefs.h <<\_ACEOF
 #define GNULIB_FCNTL_SAFER 1
 _ACEOF
@@ -7246,6 +7606,8 @@ fi
 
 
 
+
+
   { echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5
 echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6; }
 if test "${gl_cv_c_inline_effective+set}" = set; then
@@ -7314,6 +7676,12 @@ _ACEOF
 
 
 
+
+
+
+
+
+
   { echo "$as_me:$LINENO: checking for struct stat.st_atim.tv_nsec" >&5
 echo $ECHO_N "checking for struct stat.st_atim.tv_nsec... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_atim_tv_nsec+set}" = set; then
@@ -7430,17 +7798,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
            #include <sys/types.h>
-           #if TIME_WITH_SYS_TIME
+           #include <sys/stat.h>
+           #if HAVE_SYS_TIME_H
            # include <sys/time.h>
-           # include <time.h>
-           #else
-           # if HAVE_SYS_TIME_H
-           #  include <sys/time.h>
-           # else
-           #  include <time.h>
-           # endif
            #endif
-           #include <sys/stat.h>
+           #include <time.h>
            struct timespec ts;
            struct stat st;
 
@@ -7805,10 +8167,27 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-else
-  { echo "$as_me:$LINENO: checking for struct stat.st_spare1" >&5
-echo $ECHO_N "checking for struct stat.st_spare1... $ECHO_C" >&6; }
-if test "${ac_cv_member_struct_stat_st_spare1+set}" = set; then
+fi
+
+fi
+
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+  { echo "$as_me:$LINENO: checking for struct stat.st_birthtimespec.tv_nsec" >&5
+echo $ECHO_N "checking for struct stat.st_birthtimespec.tv_nsec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_birthtimespec_tv_nsec+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -7818,13 +8197,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <sys/types.h>
-                #include <sys/stat.h>
+     #include <sys/stat.h>
 
 int
 main ()
 {
 static struct stat ac_aggr;
-if (ac_aggr.st_spare1)
+if (ac_aggr.st_birthtimespec.tv_nsec)
 return 0;
   ;
   return 0;
@@ -7847,7 +8226,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_stat_st_spare1=yes
+  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -7859,13 +8238,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <sys/types.h>
-                #include <sys/stat.h>
+     #include <sys/stat.h>
 
 int
 main ()
 {
 static struct stat ac_aggr;
-if (sizeof ac_aggr.st_spare1)
+if (sizeof ac_aggr.st_birthtimespec.tv_nsec)
 return 0;
   ;
   return 0;
@@ -7888,12 +8267,12 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_member_struct_stat_st_spare1=yes
+  ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_member_struct_stat_st_spare1=no
+       ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7901,56 +8280,19 @@ fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_spare1" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_spare1" >&6; }
-if test $ac_cv_member_struct_stat_st_spare1 = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&6; }
+if test $ac_cv_member_struct_stat_st_birthtimespec_tv_nsec = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_SPARE1 1
+#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
 _ACEOF
 
 
-fi
-
-fi
-
-fi
-
-fi
-
-fi
-
-
-
-
-
-  # Define two additional variables used in the Makefile substitution.
-
-  if test "$ac_cv_header_stdbool_h" = yes; then
-    STDBOOL_H=''
-  else
-    STDBOOL_H='stdbool.h'
-  fi
-
-
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
-  fi
-
-
-
-
-
-
-
-
-
-
-      { echo "$as_me:$LINENO: checking whether mkdir is declared" >&5
-echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_mkdir+set}" = set; then
+else
+  { echo "$as_me:$LINENO: checking for struct stat.st_birthtimensec" >&5
+echo $ECHO_N "checking for struct stat.st_birthtimensec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_birthtimensec+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -7959,15 +8301,56 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/stat.h>
+#include <sys/types.h>
+       #include <sys/stat.h>
 
 int
 main ()
 {
-#ifndef mkdir
-  (void) mkdir;
-#endif
+static struct stat ac_aggr;
+if (ac_aggr.st_birthtimensec)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_stat_st_birthtimensec=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+       #include <sys/stat.h>
 
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_birthtimensec)
+return 0;
   ;
   return 0;
 }
@@ -7989,55 +8372,52 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_mkdir=yes
+  ac_cv_member_struct_stat_st_birthtimensec=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_mkdir=no
+       ac_cv_member_struct_stat_st_birthtimensec=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_mkdir" >&5
-echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; }
-if test $ac_cv_have_decl_mkdir = yes; then
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimensec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtimensec" >&6; }
+if test $ac_cv_member_struct_stat_st_birthtimensec = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MKDIR 1
+#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
 _ACEOF
 
 
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MKDIR 0
-_ACEOF
-
-
-for ac_header in io.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for struct stat.st_birthtim.tv_nsec" >&5
+echo $ECHO_N "checking for struct stat.st_birthtim.tv_nsec... $ECHO_C" >&6; }
+if test "${ac_cv_member_struct_stat_st_birthtim_tv_nsec+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
 else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#include <sys/types.h>
+         #include <sys/stat.h>
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_birthtim.tv_nsec)
+return 0;
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext
 if { (ac_try="$ac_compile"
@@ -8056,246 +8436,142 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
+  ac_cv_member_struct_stat_st_birthtim_tv_nsec=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <sys/types.h>
+         #include <sys/stat.h>
+
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_birthtim.tv_nsec)
+return 0;
+  ;
+  return 0;
+}
 _ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
+       } && test -s conftest.$ac_objext; then
+  ac_cv_member_struct_stat_st_birthtim_tv_nsec=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+       ac_cv_member_struct_stat_st_birthtim_tv_nsec=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## ------------------------------- ##
-## Report this to bug-gzip@gnu.org ##
-## ------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-              { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-done
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtim_tv_nsec" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtim_tv_nsec" >&6; }
+if test $ac_cv_member_struct_stat_st_birthtim_tv_nsec = yes; then
 
-
-
-
-
-
-    { echo "$as_me:$LINENO: checking absolute name of <sys/stat.h>" >&5
-echo $ECHO_N "checking absolute name of <sys/stat.h>... $ECHO_C" >&6; }
-if test "${gl_cv_absolute_sys_stat_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-
-
-    if test $ac_cv_header_sys_stat_h = yes; then
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/stat.h>
-_ACEOF
-      gl_cv_absolute_sys_stat_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-sed -n '\#/sys/stat.h#{s#.*"\(.*/sys/stat.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
-    fi
-
-fi
-{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_stat_h" >&5
-echo "${ECHO_T}$gl_cv_absolute_sys_stat_h" >&6; }
 cat >>confdefs.h <<_ACEOF
-#define ABSOLUTE_SYS_STAT_H "$gl_cv_absolute_sys_stat_h"
+#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
 _ACEOF
 
 
-  ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\"
-
-  SYS_STAT_H='sys/stat.h'
-
-
+fi
 
+fi
 
+fi
 
 
 
 
 
+  # Define two additional variables used in the Makefile substitution.
 
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
 
 
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
 
 
 
 
+    { echo "$as_me:$LINENO: checking absolute name of <stdlib.h>" >&5
+echo $ECHO_N "checking absolute name of <stdlib.h>... $ECHO_C" >&6; }
+if test "${gl_cv_absolute_stdlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
 
 
 
 
 
-  { echo "$as_me:$LINENO: checking for struct timespec" >&5
-echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; }
-if test "${fu_cv_sys_struct_timespec+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+    if test $ac_cv_header_stdlib_h = yes; then
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#      if TIME_WITH_SYS_TIME
-#       include <sys/time.h>
-#       include <time.h>
-#      else
-#       if HAVE_SYS_TIME_H
-#        include <sys/time.h>
-#       else
-#        include <time.h>
-#       endif
-#      endif
-
-int
-main ()
-{
-static struct timespec x; x.tv_sec = x.tv_nsec;
-  ;
-  return 0;
-}
+#include <stdlib.h>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  fu_cv_sys_struct_timespec=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+      gl_cv_absolute_stdlib_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+sed -n '\#/stdlib.h#{s#.*"\(.*/stdlib.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
+    fi
 
-       fu_cv_sys_struct_timespec=no
 fi
+{ echo "$as_me:$LINENO: result: $gl_cv_absolute_stdlib_h" >&5
+echo "${ECHO_T}$gl_cv_absolute_stdlib_h" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define ABSOLUTE_STDLIB_H "$gl_cv_absolute_stdlib_h"
+_ACEOF
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ echo "$as_me:$LINENO: result: $fu_cv_sys_struct_timespec" >&5
-echo "${ECHO_T}$fu_cv_sys_struct_timespec" >&6; }
+  ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\"
 
-  if test $fu_cv_sys_struct_timespec = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_TIMESPEC 1
-_ACEOF
 
-  fi
 
 
 
 
-  { echo "$as_me:$LINENO: checking whether nanosleep is declared" >&5
-echo $ECHO_N "checking whether nanosleep is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_nanosleep+set}" = set; then
+
+
+
+      { echo "$as_me:$LINENO: checking whether mkdir is declared" >&5
+echo $ECHO_N "checking whether mkdir is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_mkdir+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -8304,13 +8580,13 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <time.h>
+#include <sys/stat.h>
 
 int
 main ()
 {
-#ifndef nanosleep
-  (void) nanosleep;
+#ifndef mkdir
+  (void) mkdir;
 #endif
 
   ;
@@ -8334,38 +8610,32 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_nanosleep=yes
+  ac_cv_have_decl_mkdir=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_have_decl_nanosleep=no
+       ac_cv_have_decl_mkdir=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_nanosleep" >&5
-echo "${ECHO_T}$ac_cv_have_decl_nanosleep" >&6; }
-if test $ac_cv_have_decl_nanosleep = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_mkdir" >&5
+echo "${ECHO_T}$ac_cv_have_decl_mkdir" >&6; }
+if test $ac_cv_have_decl_mkdir = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NANOSLEEP 1
+#define HAVE_DECL_MKDIR 1
 _ACEOF
 
 
 else
   cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_NANOSLEEP 0
+#define HAVE_DECL_MKDIR 0
 _ACEOF
 
 
-fi
-
-
-
-
-
-for ac_header in unistd.h
+for ac_header in io.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -8505,15 +8775,189 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-    UNISTD_H=''
+fi
+
+done
+
+fi
+
+
+
+
+
+
+    { echo "$as_me:$LINENO: checking absolute name of <sys/stat.h>" >&5
+echo $ECHO_N "checking absolute name of <sys/stat.h>... $ECHO_C" >&6; }
+if test "${gl_cv_absolute_sys_stat_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+
+
+    if test $ac_cv_header_sys_stat_h = yes; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/stat.h>
+_ACEOF
+      gl_cv_absolute_sys_stat_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+sed -n '\#/sys/stat.h#{s#.*"\(.*/sys/stat.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
+    fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_absolute_sys_stat_h" >&5
+echo "${ECHO_T}$gl_cv_absolute_sys_stat_h" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define ABSOLUTE_SYS_STAT_H "$gl_cv_absolute_sys_stat_h"
+_ACEOF
+
+
+  ABSOLUTE_SYS_STAT_H=\"$gl_cv_absolute_sys_stat_h\"
+
+  SYS_STAT_H='sys/stat.h'
+
 
+  { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
+done
+IFS=$as_save_IFS
 
-    UNISTD_H='unistd.h'
+fi
 
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
 fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+
 
+
+  { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+        for ac_exec_ext in '' $ac_executable_extensions; do
+          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+            'mkdir (GNU coreutils) '* | \
+            'mkdir (coreutils) '* | \
+            'mkdir (fileutils) '4.1*)
+              ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+              break 3;;
+          esac
+        done
+       done
 done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
+      { echo "$as_me:$LINENO: checking absolute name of <unistd.h>" >&5
+echo $ECHO_N "checking absolute name of <unistd.h>... $ECHO_C" >&6; }
+if test "${gl_cv_absolute_unistd_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+
+
+    if test $ac_cv_header_unistd_h = yes; then
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <unistd.h>
+_ACEOF
+      gl_cv_absolute_unistd_h=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+sed -n '\#/unistd.h#{s#.*"\(.*/unistd.h\)".*#\1#;s#^/[^/]#//&#;p;q;}'`
+    fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_absolute_unistd_h" >&5
+echo "${ECHO_T}$gl_cv_absolute_unistd_h" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define ABSOLUTE_UNISTD_H "$gl_cv_absolute_unistd_h"
+_ACEOF
+
+
+    ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\"
+  else
+    HAVE_UNISTD_H=0
+  fi
 
 
 
@@ -8544,7 +8988,6 @@ done
 
 
 
-
   gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext"
 
 
@@ -9093,8 +9536,6 @@ fi
 
 
 
-
-
 
 
 
@@ -10046,7 +10487,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gzip $as_me 1.3.9, which was
+This file was extended by gzip $as_me 1.3.12, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10099,7 +10540,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-gzip config.status 1.3.9
+gzip config.status 1.3.12
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -10366,17 +10807,17 @@ GL_COND_LIBTOOL_FALSE!$GL_COND_LIBTOOL_FALSE$ac_delim
 ABSOLUTE_FCNTL_H!$ABSOLUTE_FCNTL_H$ac_delim
 FCNTL_H!$FCNTL_H$ac_delim
 GETOPT_H!$GETOPT_H$ac_delim
+LIBINTL!$LIBINTL$ac_delim
+LTLIBINTL!$LTLIBINTL$ac_delim
 STDBOOL_H!$STDBOOL_H$ac_delim
 HAVE__BOOL!$HAVE__BOOL$ac_delim
-ABSOLUTE_SYS_STAT_H!$ABSOLUTE_SYS_STAT_H$ac_delim
-SYS_STAT_H!$SYS_STAT_H$ac_delim
-UNISTD_H!$UNISTD_H$ac_delim
-LIBGZIP_LIBDEPS!$LIBGZIP_LIBDEPS$ac_delim
-LIBGZIP_LTLIBDEPS!$LIBGZIP_LTLIBDEPS$ac_delim
-ASCPPPOST!$ASCPPPOST$ac_delim
-ASCPPFLAGS!$ASCPPFLAGS$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-ASFLAGS_config!$ASFLAGS_config$ac_delim
+GNULIB_GETSUBOPT!$GNULIB_GETSUBOPT$ac_delim
+GNULIB_MKDTEMP!$GNULIB_MKDTEMP$ac_delim
+GNULIB_MKSTEMP!$GNULIB_MKSTEMP$ac_delim
+HAVE_GETSUBOPT!$HAVE_GETSUBOPT$ac_delim
+HAVE_MKDTEMP!$HAVE_MKDTEMP$ac_delim
+REPLACE_MKSTEMP!$REPLACE_MKSTEMP$ac_delim
+ABSOLUTE_STDLIB_H!$ABSOLUTE_STDLIB_H$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -10418,13 +10859,49 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+ABSOLUTE_SYS_STAT_H!$ABSOLUTE_SYS_STAT_H$ac_delim
+SYS_STAT_H!$SYS_STAT_H$ac_delim
+ABSOLUTE_SYS_TIME_H!$ABSOLUTE_SYS_TIME_H$ac_delim
+HAVE_SYS_TIME_H!$HAVE_SYS_TIME_H$ac_delim
+HAVE_STRUCT_TIMEVAL!$HAVE_STRUCT_TIMEVAL$ac_delim
+REPLACE_GETTIMEOFDAY!$REPLACE_GETTIMEOFDAY$ac_delim
+SYS_TIME_H!$SYS_TIME_H$ac_delim
+REPLACE_LOCALTIME_R!$REPLACE_LOCALTIME_R$ac_delim
+REPLACE_NANOSLEEP!$REPLACE_NANOSLEEP$ac_delim
+REPLACE_STRPTIME!$REPLACE_STRPTIME$ac_delim
+REPLACE_TIMEGM!$REPLACE_TIMEGM$ac_delim
+ABSOLUTE_TIME_H!$ABSOLUTE_TIME_H$ac_delim
+TIME_H_DEFINES_STRUCT_TIMESPEC!$TIME_H_DEFINES_STRUCT_TIMESPEC$ac_delim
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC!$SYS_TIME_H_DEFINES_STRUCT_TIMESPEC$ac_delim
+GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim
+GNULIB_DUP2!$GNULIB_DUP2$ac_delim
+GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim
+GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim
+GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim
+GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim
+GNULIB_READLINK!$GNULIB_READLINK$ac_delim
+HAVE_DUP2!$HAVE_DUP2$ac_delim
+HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim
+HAVE_READLINK!$HAVE_READLINK$ac_delim
+HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim
+REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim
+REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim
+REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim
+HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim
+ABSOLUTE_UNISTD_H!$ABSOLUTE_UNISTD_H$ac_delim
+LIBGZIP_LIBDEPS!$LIBGZIP_LIBDEPS$ac_delim
+LIBGZIP_LTLIBDEPS!$LIBGZIP_LTLIBDEPS$ac_delim
+ASCPPPOST!$ASCPPPOST$ac_delim
+ASCPPFLAGS!$ASCPPFLAGS$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+ASFLAGS_config!$ASFLAGS_config$ac_delim
 ac_prefix_program!$ac_prefix_program$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 gl_LIBOBJS!$gl_LIBOBJS$ac_delim
 gl_LTLIBOBJS!$gl_LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 4; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index 1b854d3697d1552b0d07d3e88eca4135044ec1e9..555bb9c04804e8a29081e07e95e4bf7bae721666 100644 (file)
@@ -1,6 +1,8 @@
 # Configure template for gzip.
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007 Free Software
+# Foundation, Inc.
+
 # Copyright (C) 1992-1993 Jean-loup Gailly
 
 # This program is free software; you can redistribute it and/or modify
@@ -19,7 +21,7 @@
 # 02111-1307, USA.
 
 AC_PREREQ([2.60])
-AC_INIT([gzip], [1.3.9], [bug-gzip@gnu.org])
+AC_INIT([gzip], [1.3.12], [bug-gzip@gnu.org])
 AC_CONFIG_SRCDIR(gzip.c)
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
index 077ef39d19e209cd82d1895c6f76d7b8c5f0036a..19fbec9610ee91745e2bae2462ca66878a66050d 100644 (file)
@@ -1,3 +1,11 @@
+gzip (1.3.12-1) unstable; urgency=low
+
+  * new upstream version, closes: #177942, #225864, #362786, #366660, #367400, 
+    #383358, #402042, #404099, #404114, #419895
+  * fix delivery of upstream ChangeLog, closes: #404062
+
+ -- Bdale Garbee <bdale@gag.com>  Wed, 13 Jun 2007 18:55:42 -0400
+
 gzip (1.3.9-2) unstable; urgency=low
 
   * change direntry ordering in gzip.texi to work around bug in install-info,
index d7192da440a82fd2e22dcd2a2565bc383d29d6e0..b0e1c4ae35d1a0f2f13480be006cabbd51ec293c 100644 (file)
@@ -1,28 +1,24 @@
 This package is maintained for Debian by Bdale Garbee <bdale@gag.com>, and
 was built from the sources found at:
 
-        ftp://alpha.gnu.org/gnu/gzip/
+        ftp://ftp.gnu.org/gnu/gzip/
 
-Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
-Copyright (C) 19921993 Jean-loup Gailly
+Copyright (C) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
+Copyright (C) 1992-1993 Jean-loup Gailly
 
-       This file is part of gzip (GNU zip).
+   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.
 
-       gzip 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.
-
-       gzip 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 tar; see the file COPYING.  If not, write to
-       the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 
-       Boston, MA 02110-1301, USA.
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 On Debian GNU/Linux systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
index a13ad0c7a010853511c8c01f562d5e319b2bc7bc..09d3d007335193ee0ad2702af6cea0742ff59804 100755 (executable)
@@ -43,7 +43,7 @@ install: build
 
        make install prefix=debian/gzip/usr bindir=debian/gzip/bin \
                 scriptdir=debian/gzip/usr/bin
-       ln debian/gzip/bin/gzip debian/gzip/bin/uncompress
+#      ln debian/gzip/bin/gzip debian/gzip/bin/uncompress
        install -o root -g root -m 0644 debian/gzip.lintian \
                debian/gzip/usr/share/lintian/overrides/gzip
 
@@ -55,7 +55,7 @@ binary-arch:  build install
        dh_installdocs README* TODO
        dh_installmanpages
        dh_installinfo doc/gzip.info
-       dh_installchangelogs
+       dh_installchangelogs ChangeLog
        dh_link
        dh_strip
        dh_compress
index 4a585d2a363604fe260e67eafca405dbf249a1b5..95e252b2ce206ade64b602c6d3f067c05222ca4c 100644 (file)
@@ -57,10 +57,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
        $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \
        $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
        $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/inline.m4 \
        $(top_srcdir)/m4/shell.m4 $(top_srcdir)/m4/stat-time.m4 \
-       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
-       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+       $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
+       $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
        $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/utimbuf.m4 \
        $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes.m4 \
        $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/yesno.m4 \
@@ -94,7 +96,11 @@ am__vpath_adj = case $$p in \
 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
+ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
 ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@
+ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@
+ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@
+ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 ASCPPFLAGS = @ASCPPFLAGS@
@@ -119,7 +125,26 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FCNTL_H = @FCNTL_H@
 GETOPT_H = @GETOPT_H@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_READLINK = @GNULIB_READLINK@
 GREP = @GREP@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE__BOOL = @HAVE__BOOL@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -129,9 +154,11 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
 LIBGZIP_LIBDEPS = @LIBGZIP_LIBDEPS@
 LIBGZIP_LTLIBDEPS = @LIBGZIP_LTLIBDEPS@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN_S = @LN_S@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
@@ -145,12 +172,23 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STDBOOL_H = @STDBOOL_H@
 STRIP = @STRIP@
 SYS_STAT_H = @SYS_STAT_H@
-UNISTD_H = @UNISTD_H@
+SYS_TIME_H = @SYS_TIME_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
 VERSION = @VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
index b017e57633e490593340daa21910501f8571eae0..50fa7e994f6bcbd8125955a0161212d35602a7bc 100644 (file)
@@ -1,10 +1,10 @@
 This is gzip.info, produced by makeinfo version 4.8 from gzip.texi.
 
-   This manual is for Gzip (version 1.3.9, 8 December 2006), and
+   This manual is for Gzip (version 1.3.12, 5 February 2007), and
 documents commands for compressing and decompressing data.
 
-   Copyright (C) 1998, 1999, 2001, 2002, 2006 Free Software Foundation,
-Inc.
+   Copyright (C) 1998, 1999, 2001, 2002, 2006, 2007 Free Software
+Foundation, Inc.
 
    Copyright (C) 1992, 1993 Jean-loup Gailly
 
@@ -15,27 +15,27 @@ Inc.
      and with no Back-Cover Texts.  A copy of the license is included
      in the section entitled "GNU Free Documentation License".
 
-INFO-DIR-SECTION Individual utilities
+INFO-DIR-SECTION Utilities
 START-INFO-DIR-ENTRY
-* gzip: (gzip)Invoking gzip.                    Compress files.
+* Gzip: (gzip).                 The gzip command for compressing files.
 END-INFO-DIR-ENTRY
 
-INFO-DIR-SECTION Utilities
+INFO-DIR-SECTION Individual utilities
 START-INFO-DIR-ENTRY
-* Gzip: (gzip).                 The gzip command for compressing files.
+* gzip: (gzip)Invoking gzip.                    Compress files.
 END-INFO-DIR-ENTRY
 
 \1f
-File: gzip.info,  Node: Top,  Up: (dir)
+File: gzip.info,  Node: Top,  Next: Overview,  Up: (dir)
 
 Compressing Files
 *****************
 
-This manual is for Gzip (version 1.3.9, 8 December 2006), and documents
-commands for compressing and decompressing data.
+This manual is for Gzip (version 1.3.12, 5 February 2007), and
+documents commands for compressing and decompressing data.
 
-   Copyright (C) 1998, 1999, 2001, 2002, 2006 Free Software Foundation,
-Inc.
+   Copyright (C) 1998, 1999, 2001, 2002, 2006, 2007 Free Software
+Foundation, Inc.
 
    Copyright (C) 1992, 1993 Jean-loup Gailly
 
@@ -59,7 +59,7 @@ Inc.
 * Concept Index::      Index of concepts.
 
 \1f
-File: gzip.info,  Node: Overview,  Next: Sample,  Up: Top
+File: gzip.info,  Node: Overview,  Next: Sample,  Prev: Top,  Up: Top
 
 1 Overview
 **********
@@ -81,14 +81,14 @@ For example, if file names are limited to 14 characters, gzip.msdos.exe
 is compressed to gzi.msd.exe.gz.  Names are not truncated on systems
 which do not have a limit on file name length.
 
-   By default, `gzip' keeps the original file name and timestamp in the
-compressed file. These are used when decompressing the file with the
-`-N' option. This is useful when the compressed file name was truncated
-or when the time stamp was not preserved after a file transfer.
-However, due to limitations in the current `gzip' file format,
-fractional seconds are discarded.  Also, time stamps must fall within
-the range 1970-01-01 00:00:00 through 2106-02-07 06:28:15 UTC, and
-hosts whose operating systems use 32-bit time stamps are further
+   By default, `gzip' keeps the original file name and time stamp in
+the compressed file.  These are used when decompressing the file with
+the `-N' option.  This is useful when the compressed file name was
+truncated or when the time stamp was not preserved after a file
+transfer.  However, due to limitations in the current `gzip' file
+format, fractional seconds are discarded.  Also, time stamps must fall
+within the range 1970-01-01 00:00:00 through 2106-02-07 06:28:15 UTC,
+and hosts whose operating systems use 32-bit time stamps are further
 restricted to time stamps no later than 2038-01-19 03:14:07 UTC.  The
 upper bounds assume the typical case where leap seconds are ignored.
 
@@ -102,24 +102,24 @@ file whose name ends with `.gz', `.z', `.Z', `-gz', `-z' or `_z' and
 which begins with the correct magic number with an uncompressed file
 without the original extension.  `gunzip' also recognizes the special
 extensions `.tgz' and `.taz' as shorthands for `.tar.gz' and `.tar.Z'
-respectively. When compressing, `gzip' uses the `.tgz' extension if
+respectively.  When compressing, `gzip' uses the `.tgz' extension if
 necessary instead of truncating a file with a `.tar' extension.
 
    `gunzip' can currently decompress files created by `gzip', `zip',
-`compress' or `pack'. The detection of the input format is automatic.
+`compress' or `pack'.  The detection of the input format is automatic.
 When using the first two formats, `gunzip' checks a 32 bit CRC (cyclic
-redundancy check). For `pack', `gunzip' checks the uncompressed length.
-The `compress' format was not designed to allow consistency checks.
-However `gunzip' is sometimes able to detect a bad `.Z' file. If you
-get an error when uncompressing a `.Z' file, do not assume that the
-`.Z' file is correct simply because the standard `uncompress' does not
-complain.  This generally means that the standard `uncompress' does not
-check its input, and happily generates garbage output.  The SCO
-`compress -H' format (`lzh' compression method) does not include a CRC
-but also allows some consistency checks.
+redundancy check).  For `pack', `gunzip' checks the uncompressed
+length.  The `compress' format was not designed to allow consistency
+checks.  However `gunzip' is sometimes able to detect a bad `.Z' file.
+If you get an error when uncompressing a `.Z' file, do not assume that
+the `.Z' file is correct simply because the standard `uncompress' does
+not complain.  This generally means that the standard `uncompress' does
+not check its input, and happily generates garbage output.  The SCO
+`compress -H' format (LZH compression method) does not include a CRC but
+also allows some consistency checks.
 
    Files created by `zip' can be uncompressed by `gzip' only if they
-have a single member compressed with the 'deflation' method. This
+have a single member compressed with the 'deflation' method.  This
 feature is only intended to help conversion of `tar.zip' files to the
 `tar.gz' format.  To extract a `zip' file with a single member, use a
 command like `gunzip <foo.zip' or `gunzip -S .zip foo.zip'.  To extract
@@ -139,9 +139,9 @@ than that achieved by LZW (as used in `compress'), Huffman coding (as
 used in `pack'), or adaptive Huffman coding (`compact').
 
    Compression is always performed, even if the compressed file is
-slightly larger than the original. The worst case expansion is a few
+slightly larger than the original.  The worst case expansion is a few
 bytes for the `gzip' file header, plus 5 bytes every 32K block, or an
-expansion ratio of 0.015% for large files. Note that the actual number
+expansion ratio of 0.015% for large files.  Note that the actual number
 of used disk blocks almost never increases.  `gzip' normally preserves
 the mode, ownership and time stamps of files when compressing or
 decompressing.
@@ -163,36 +163,48 @@ Here are some realistic examples of running `gzip'.
 
    This is the output of the command `gzip -h':
 
-     gzip VERSION-NUMBER
-     usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
-      -c --stdout      write on standard output, keep original files unchanged
-      -d --decompress  decompress
-      -f --force       force overwrite of output file and compress links
-      -h --help        give this help
-      -l --list        list compressed file contents
-      -L --license     display software license
-      -n --no-name     do not save or restore the original name and time stamp
-      -N --name        save or restore the original name and time stamp
-      -q --quiet       suppress all warnings
-      -r --recursive   operate recursively on directories
-      -S .suf  --suffix .suf     use suffix .suf on compressed files
-      -t --test        test compressed file integrity
-      -v --verbose     verbose mode
-      -V --version     display version number
-      -1 --fast        compress faster
-      -9 --best        compress better
-      file...          files to (de)compress. If none given, use standard input.
+     Usage: gzip [OPTION]... [FILE]...
+     Compress or uncompress FILEs (by default, compress FILES in-place).
+
+     Mandatory arguments to long options are mandatory for short options too.
+
+       -c, --stdout      write on standard output, keep original files unchanged
+       -d, --decompress  decompress
+       -f, --force       force overwrite of output file and compress links
+       -h, --help        give this help
+       -l, --list        list compressed file contents
+       -L, --license     display software license
+       -n, --no-name     do not save or restore the original name and time stamp
+       -N, --name        save or restore the original name and time stamp
+       -q, --quiet       suppress all warnings
+       -r, --recursive   operate recursively on directories
+       -S, --suffix=SUF  use suffix SUF on compressed files
+       -t, --test        test compressed file integrity
+       -v, --verbose     verbose mode
+       -V, --version     display version number
+       -1, --fast        compress faster
+       -9, --best        compress better
+
+     With no FILE, or when FILE is -, read standard input.
+
      Report bugs to <bug-gzip@gnu.org>.
 
    This is the output of the command `gzip -v texinfo.tex':
 
-     texinfo.tex:             69.7% -- replaced with texinfo.tex.gz
+     texinfo.tex:     69.3% -- replaced with texinfo.tex.gz
 
-   The following command will find all `gzip' files in the current
-directory and subdirectories, and extract them in place without
-destroying the original:
+   The following command will find all regular `.gz' files in the
+current directory and subdirectories (skipping file names that contain
+newlines), and extract them in place without destroying the original,
+stopping on the first failure:
 
-     find . -name '*.gz' -print | sed 's/^\(.*\)[.]gz$/gunzip < "&" > "\1"/' | sh
+     find . -name '*
+     *' -prune -o -name '*.gz' -type f -print |
+       sed "
+         s/'/'\\''/g
+         s/^\\(.*\\)\\.gz$/gunzip <'\\1.gz' >'\\1'/
+       " |
+       sh -e
 
 \1f
 File: gzip.info,  Node: Invoking gzip,  Next: Advanced usage,  Prev: Sample,  Up: Top
@@ -211,7 +223,7 @@ The format for running the `gzip' program is:
 `-c'
      Write output on standard output; keep original files unchanged.
      If there are several input files, the output consists of a
-     sequence of independently compressed members. To obtain better
+     sequence of independently compressed members.  To obtain better
      compression, concatenate all input files before compressing them.
 
 `--decompress'
@@ -223,11 +235,11 @@ The format for running the `gzip' program is:
 `-f'
      Force compression or decompression even if the file has multiple
      links or the corresponding file already exists, or if the
-     compressed data is read from or written to a terminal. If the
+     compressed data is read from or written to a terminal.  If the
      input data is not in a format recognized by `gzip', and if the
      option `--stdout' is also given, copy the input data without
-     change to the standard output: let `zcat' behave as `cat'. If `-f'
-     is not given, and when not running in the background, `gzip'
+     change to the standard output: let `zcat' behave as `cat'.  If
+     `-f' is not given, and when not running in the background, `gzip'
      prompts to verify whether an existing file should be overwritten.
 
 `--help'
@@ -243,8 +255,8 @@ The format for running the `gzip' program is:
           ratio: compression ratio (0.0% if unknown)
           uncompressed_name: name of the uncompressed file
 
-     The uncompressed size is given as `-1' for files not in `gzip'
-     format, such as compressed `.Z' files. To get the uncompressed
+     The uncompressed size is given as -1 for files not in `gzip'
+     format, such as compressed `.Z' files.  To get the uncompressed
      size for such a file, you can use:
 
           zcat file.Z | wc -c
@@ -256,15 +268,15 @@ The format for running the `gzip' program is:
           crc: the 32-bit CRC of the uncompressed data
           date & time: time stamp for the uncompressed file
 
-     The crc is given as ffffffff for a file not in gzip format.
+     The CRC is given as ffffffff for a file not in gzip format.
 
      With `--verbose', the size totals and compression ratio for all
-     files is also displayed, unless some sizes are unknown. With
+     files is also displayed, unless some sizes are unknown.  With
      `--quiet', the title and totals lines are not displayed.
 
      The `gzip' format represents the input size modulo 2^32, so the
      uncompressed size and compression ratio are listed incorrectly for
-     uncompressed files 4 GB and larger. To work around this problem,
+     uncompressed files 4 GiB and larger.  To work around this problem,
      you can use the following command to discover a large uncompressed
      file's true size:
 
@@ -277,18 +289,18 @@ The format for running the `gzip' program is:
 `--no-name'
 `-n'
      When compressing, do not save the original file name and time
-     stamp by default. (The original name is always saved if the name
-     had to be truncated.) When decompressing, do not restore the
+     stamp by default.  (The original name is always saved if the name
+     had to be truncated.)  When decompressing, do not restore the
      original file name if present (remove only the `gzip' suffix from
      the compressed file name) and do not restore the original time
-     stamp if present (copy it from the compressed file). This option
+     stamp if present (copy it from the compressed file).  This option
      is the default when decompressing.
 
 `--name'
 `-N'
      When compressing, always save the original file name and time
-     stamp; this is the default. When decompressing, restore the
-     original file name and time stamp if present. This option is
+     stamp; this is the default.  When decompressing, restore the
+     original file name and time stamp if present.  This option is
      useful on systems which have a limit on file name length or when
      the time stamp has been lost after a file transfer.
 
@@ -298,14 +310,14 @@ The format for running the `gzip' program is:
 
 `--recursive'
 `-r'
-     Travel the directory structure recursively. If any of the file
+     Travel the directory structure recursively.  If any of the file
      names specified on the command line are directories, `gzip' will
      descend into the directory and compress all the files it finds
      there (or decompress them in the case of `gunzip').
 
 `--suffix SUF'
 `-S SUF'
-     Use suffix `SUF' instead of `.gz'. Any suffix can be given, but
+     Use suffix SUF instead of `.gz'.  Any suffix can be given, but
      suffixes other than `.z' and `.gz' should be avoided to avoid
      confusion when files are transferred to other systems.  A null
      suffix forces gunzip to try decompression on all given files
@@ -313,21 +325,21 @@ The format for running the `gzip' program is:
 
           gunzip -S "" *        (*.* for MSDOS)
 
-     Previous versions of gzip used the `.z' suffix. This was changed to
-     avoid a conflict with `pack'.
+     Previous versions of gzip used the `.z' suffix.  This was changed
+     to avoid a conflict with `pack'.
 
 `--test'
 `-t'
-     Test. Check the compressed file integrity.
+     Test.  Check the compressed file integrity.
 
 `--verbose'
 `-v'
-     Verbose. Display the name and percentage reduction for each file
+     Verbose.  Display the name and percentage reduction for each file
      compressed.
 
 `--version'
 `-V'
-     Version. Display the version number and compilation options, then
+     Version.  Display the version number and compilation options, then
      quit.
 
 `--fast'
@@ -346,8 +358,8 @@ File: gzip.info,  Node: Advanced usage,  Next: Environment,  Prev: Invoking gzip
 4 Advanced usage
 ****************
 
-Multiple compressed files can be concatenated. In this case, `gunzip'
-will extract all members at once. If one member is damaged, other
+Multiple compressed files can be concatenated.  In this case, `gunzip'
+will extract all members at once.  If one member is damaged, other
 members might still be recovered after removal of the damaged member.
 Better compression can be usually obtained if all members are
 decompressed and then recompressed in a single step.
@@ -357,21 +369,21 @@ decompressed and then recompressed in a single step.
      gzip -c file1  > foo.gz
      gzip -c file2 >> foo.gz
 
-   Then
+Then
 
      gunzip -c foo
 
-   is equivalent to
+is equivalent to
 
      cat file1 file2
 
    In case of damage to one member of a `.gz' file, other members can
-still be recovered (if the damaged member is removed). However, you can
-get better compression by compressing all members at once:
+still be recovered (if the damaged member is removed).  However, you
+can get better compression by compressing all members at once:
 
      cat file1 file2 | gzip > foo.gz
 
-   compresses better than
+compresses better than
 
      gzip -c file1 file2 > foo.gz
 
@@ -382,14 +394,14 @@ compression, do:
 
    If a compressed file consists of several members, the uncompressed
 size and CRC reported by the `--list' option applies to the last member
-only. If you need the uncompressed size for all members, you can use:
+only.  If you need the uncompressed size for all members, you can use:
 
      zcat file.gz | wc -c
 
    If you wish to create a single archive file with multiple members so
 that members can later be extracted independently, use an archiver such
-as `tar' or `zip'. GNU `tar' supports the `-z' option to invoke `gzip'
-transparently. `gzip' is designed as a complement to `tar', not as a
+as `tar' or `zip'.  GNU `tar' supports the `-z' option to invoke `gzip'
+transparently.  `gzip' is designed as a complement to `tar', not as a
 replacement.
 
 \1f
@@ -406,8 +418,8 @@ explicit command line parameters.  For example:
      for csh:   setenv GZIP "-8v --name"
      for MSDOS: set GZIP=-8v --name
 
-   On Vax/VMS, the name of the environment variable is `GZIP_OPT', to
-avoid a conflict with the symbol set for invocation of the program.
+   On VMS, the name of the environment variable is `GZIP_OPT', to avoid
+a conflict with the symbol set for invocation of the program.
 
 \1f
 File: gzip.info,  Node: Tapes,  Next: Problems,  Prev: Environment,  Up: Top
@@ -416,11 +428,11 @@ File: gzip.info,  Node: Tapes,  Next: Problems,  Prev: Environment,  Up: Top
 ***********************
 
 When writing compressed data to a tape, it is generally necessary to pad
-the output with zeroes up to a block boundary. When the data is read and
-the whole block is passed to `gunzip' for decompression, `gunzip'
+the output with zeroes up to a block boundary.  When the data is read
+and the whole block is passed to `gunzip' for decompression, `gunzip'
 detects that there is extra trailing garbage after the compressed data
 and emits a warning by default if the garbage contains nonzero bytes.
-You have to use the `--quiet' option to suppress the warning. This
+You have to use the `--quiet' option to suppress the warning.  This
 option can be set in the `GZIP' environment variable, as in:
 
      for sh:    GZIP="-q"  tar -xfz --block-compress /dev/rst0
@@ -908,16 +920,16 @@ Appendix B Concept Index
 
 \1f
 Tag Table:
-Node: Top\7f1011
-Node: Overview\7f2133
-Node: Sample\7f7309
-Node: Invoking gzip\7f8964
-Node: Advanced usage\7f13942
-Node: Environment\7f15532
-Node: Tapes\7f16101
-Node: Problems\7f17116
-Node: Copying This Manual\7f17575
-Node: GNU Free Documentation License\7f17813
-Node: Concept Index\7f40209
+Node: Top\7f1018
+Node: Overview\7f2164
+Node: Sample\7f7362
+Node: Invoking gzip\7f9298
+Node: Advanced usage\7f14290
+Node: Environment\7f15877
+Node: Tapes\7f16442
+Node: Problems\7f17459
+Node: Copying This Manual\7f17918
+Node: GNU Free Documentation License\7f18156
+Node: Concept Index\7f40552
 \1f
 End Tag Table
index 51caca6f9dfc6ecc06075e49b3e62dacbde30a9c..c7f8d62ad94c338c02e09b95468663c169f17c59 100644 (file)
@@ -11,8 +11,8 @@ This manual is for Gzip
 (version @value{VERSION}, @value{UPDATED}),
 and documents commands for compressing and decompressing data.
 
-Copyright @copyright{} 1998, 1999, 2001, 2002, 2006 Free Software
-Foundation, Inc.
+Copyright @copyright{} 1998, 1999, 2001, 2002, 2006, 2007 Free
+Software Foundation, Inc.
 
 Copyright @copyright{} 1992, 1993 Jean-loup Gailly
 
@@ -27,13 +27,15 @@ Free Documentation License''.
 @end copying
 
 @c Debian install-info (up through at least version 1.9.20) uses only the
-@c first dircategory.  Put this one first, as it is more useful in practice.
-@dircategory Individual utilities
+@c first dircategory.  But install-info 1.10.28 rejects any attempt to
+@c put the more-useful individual utility first.  So put the less-useful
+@c general category first.
+@dircategory Utilities
 @direntry
 * Gzip: (gzip).                 The gzip command for compressing files.
 @end direntry
 
-@dircategory Utilities
+@dircategory Individual utilities
 @direntry
 * gzip: (gzip)Invoking gzip.                    Compress files.
 @end direntry
@@ -53,7 +55,7 @@ Free Documentation License''.
 @contents
 
 @ifnottex
-@node Top, , , (dir)
+@node Top
 @top Compressing Files
 
 @insertcopying
@@ -61,180 +63,194 @@ Free Documentation License''.
 
 @menu
 * Overview::           Preliminary information.
-* Sample::             Sample output from @code{gzip}.
-* Invoking gzip::      How to run @code{gzip}.
+* Sample::             Sample output from @command{gzip}.
+* Invoking gzip::      How to run @command{gzip}.
 * Advanced usage::     Concatenated files.
-* Environment::                The @code{GZIP} environment variable
-* Tapes::               Using @code{gzip} on tapes.
+* Environment::                The @env{GZIP} environment variable
+* Tapes::               Using @command{gzip} on tapes.
 * Problems::           Reporting bugs.
 * Copying This Manual:: How to make copies of this manual.
 * Concept Index::      Index of concepts.
 @end menu
 
-@node Overview, Sample, , Top
+@node Overview
 @chapter Overview
 @cindex overview
 
-@code{gzip} reduces the size of the named files using Lempel-Ziv coding
+@command{gzip} reduces the size of the named files using Lempel-Ziv coding
 (LZ77).  Whenever possible, each file is replaced by one with the
 extension @samp{.gz}, while keeping the same ownership modes, access and
-modification times.  (The default extension is @samp{-gz} for VMS,
-@samp{z} for MSDOS, OS/2 FAT and Atari.)  If no files are specified or
+modification times.  (The default extension is @option{-gz} for @abbr{VMS},
+@samp{z} for @abbr{MSDOS}, @abbr{OS/2} @abbr{FAT} and Atari.)
+If no files are specified or
 if a file name is "-", the standard input is compressed to the standard
-output. @code{gzip} will only attempt to compress regular files.  In
+output.  @command{gzip} will only attempt to compress regular files.  In
 particular, it will ignore symbolic links.
 
-If the new file name is too long for its file system, @code{gzip}
-truncates it.  @code{gzip} attempts to truncate only the parts of the
+If the new file name is too long for its file system, @command{gzip}
+truncates it.  @command{gzip} attempts to truncate only the parts of the
 file name longer than 3 characters.  (A part is delimited by dots.) If
 the name consists of small parts only, the longest parts are truncated.
 For example, if file names are limited to 14 characters, gzip.msdos.exe
 is compressed to gzi.msd.exe.gz.  Names are not truncated on systems
 which do not have a limit on file name length.
 
-By default, @code{gzip} keeps the original file name and timestamp in
-the compressed file. These are used when decompressing the file with the
-@samp{-N} option. This is useful when the compressed file name was
+By default, @command{gzip} keeps the original file name and time stamp in
+the compressed file.  These are used when decompressing the file with the
+@option{-N} option.  This is useful when the compressed file name was
 truncated or when the time stamp was not preserved after a file
-transfer.  However, due to limitations in the current @code{gzip} file
+transfer.  However, due to limitations in the current @command{gzip} file
 format, fractional seconds are discarded.  Also, time stamps must fall
 within the range 1970-01-01 00:00:00 through 2106-02-07 06:28:15
-@acronym{UTC}, and hosts whose operating systems use 32-bit time
+@abbr{UTC}, and hosts whose operating systems use 32-bit time
 stamps are further restricted to time stamps no later than 2038-01-19
-03:14:07 @acronym{UTC}.  The upper bounds assume the typical case
+03:14:07 @abbr{UTC}.  The upper bounds assume the typical case
 where leap seconds are ignored.
 
 Compressed files can be restored to their original form using @samp{gzip -d}
-or @code{gunzip} or @code{zcat}.  If the original name saved in the
+or @command{gunzip} or @command{zcat}.  If the original name saved in the
 compressed file is not suitable for its file system, a new name is
 constructed from the original one to make it legal.
 
-@code{gunzip} takes a list of files on its command line and replaces
+@command{gunzip} takes a list of files on its command line and replaces
 each file whose name ends with @samp{.gz}, @samp{.z}, @samp{.Z},
-@samp{-gz}, @samp{-z} or @samp{_z} and which begins with the correct
+@option{-gz}, @option{-z} or @samp{_z} and which begins with the correct
 magic number with an uncompressed file without the original extension.
-@code{gunzip} also recognizes the special extensions @samp{.tgz} and
+@command{gunzip} also recognizes the special extensions @samp{.tgz} and
 @samp{.taz} as shorthands for @samp{.tar.gz} and @samp{.tar.Z}
-respectively. When compressing, @code{gzip} uses the @samp{.tgz}
+respectively.  When compressing, @command{gzip} uses the @samp{.tgz}
 extension if necessary instead of truncating a file with a @samp{.tar}
 extension.
 
-@code{gunzip} can currently decompress files created by @code{gzip},
-@code{zip}, @code{compress} or @code{pack}. The detection of the input
-format is automatic.  When using the first two formats, @code{gunzip}
-checks a 32 bit CRC (cyclic redundancy check). For @code{pack},
-@code{gunzip} checks the uncompressed length. The @code{compress} format
-was not designed to allow consistency checks. However @code{gunzip} is
-sometimes able to detect a bad @samp{.Z} file. If you get an error when
+@command{gunzip} can currently decompress files created by @command{gzip},
+@command{zip}, @command{compress} or @command{pack}.  The detection of the input
+format is automatic.  When using the first two formats, @command{gunzip}
+checks a 32 bit @abbr{CRC} (cyclic redundancy check).  For @command{pack},
+@command{gunzip} checks the uncompressed length.  The @command{compress} format
+was not designed to allow consistency checks.  However @command{gunzip} is
+sometimes able to detect a bad @samp{.Z} file.  If you get an error when
 uncompressing a @samp{.Z} file, do not assume that the @samp{.Z} file is
-correct simply because the standard @code{uncompress} does not complain.
-This generally means that the standard @code{uncompress} does not check
-its input, and happily generates garbage output.  The SCO @samp{compress
--H} format (@code{lzh} compression method) does not include a CRC but
+correct simply because the standard @command{uncompress} does not complain.
+This generally means that the standard @command{uncompress} does not check
+its input, and happily generates garbage output.  The @abbr{SCO} @samp{compress
+-H} format (@abbr{LZH} compression method) does not include a @abbr{CRC} but
 also allows some consistency checks.
 
-Files created by @code{zip} can be uncompressed by @code{gzip} only if
-they have a single member compressed with the 'deflation' method. This
-feature is only intended to help conversion of @code{tar.zip} files to
-the @code{tar.gz} format.  To extract a @code{zip} file with a single
+Files created by @command{zip} can be uncompressed by @command{gzip} only if
+they have a single member compressed with the 'deflation' method.  This
+feature is only intended to help conversion of @file{tar.zip} files to
+the @file{tar.gz} format.  To extract a @command{zip} file with a single
 member, use a command like @samp{gunzip <foo.zip} or @samp{gunzip -S
-.zip foo.zip}.  To extract @code{zip} files with several
-members, use @code{unzip} instead of @code{gunzip}.
+.zip foo.zip}.  To extract @command{zip} files with several
+members, use @command{unzip} instead of @command{gunzip}.
 
-@code{zcat} is identical to @samp{gunzip -c}.  @code{zcat}
+@command{zcat} is identical to @samp{gunzip -c}.  @command{zcat}
 uncompresses either a list of files on the command line or its standard
-input and writes the uncompressed data on standard output.  @code{zcat}
+input and writes the uncompressed data on standard output.  @command{zcat}
 will uncompress files that have the correct magic number whether they
 have a @samp{.gz} suffix or not.
 
-@code{gzip} uses the Lempel-Ziv algorithm used in @code{zip} and PKZIP.
+@command{gzip} uses the Lempel-Ziv algorithm used in @command{zip} and
+@abbr{PKZIP}@.
 The amount of compression obtained depends on the size of the input and
 the distribution of common substrings.  Typically, text such as source
 code or English is reduced by 60-70%.  Compression is generally much
-better than that achieved by LZW (as used in @code{compress}), Huffman
-coding (as used in @code{pack}), or adaptive Huffman coding
-(@code{compact}).
+better than that achieved by @abbr{LZW} (as used in @command{compress}), Huffman
+coding (as used in @command{pack}), or adaptive Huffman coding
+(@command{compact}).
 
 Compression is always performed, even if the compressed file is slightly
-larger than the original. The worst case expansion is a few bytes for
-the @code{gzip} file header, plus 5 bytes every 32K block, or an expansion
-ratio of 0.015% for large files. Note that the actual number of used
-disk blocks almost never increases.  @code{gzip} normally preserves the mode,
+larger than the original.  The worst case expansion is a few bytes for
+the @command{gzip} file header, plus 5 bytes every 32K block, or an expansion
+ratio of 0.015% for large files.  Note that the actual number of used
+disk blocks almost never increases.  @command{gzip} normally preserves the mode,
 ownership and time stamps of files when compressing or decompressing.
 
-The @code{gzip} file format is specified in P. Deutsch, @sc{gzip} file
+The @command{gzip} file format is specified in P. Deutsch, @sc{gzip} file
 format specification version 4.3,
-@uref{ftp://ftp.isi.edu/in-notes/rfc1952.txt, Internet RFC 1952} (May
-1996).  The @code{zip} deflation format is specified in P. Deutsch,
+@uref{ftp://ftp.isi.edu/in-notes/rfc1952.txt, Internet @abbr{RFC} 1952} (May
+1996).  The @command{zip} deflation format is specified in P. Deutsch,
 @sc{deflate} Compressed Data Format Specification version 1.3,
-@uref{ftp://ftp.isi.edu/in-notes/rfc1951.txt, Internet RFC 1951} (May
+@uref{ftp://ftp.isi.edu/in-notes/rfc1951.txt, Internet @abbr{RFC} 1951} (May
 1996).
 
-@node Sample, Invoking gzip, Overview, Top
+@node Sample
 @chapter Sample Output
 @cindex sample
 
-Here are some realistic examples of running @code{gzip}.
+Here are some realistic examples of running @command{gzip}.
 
 This is the output of the command @samp{gzip -h}:
 
 @example
-gzip @var{version-number}
-usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
- -c --stdout      write on standard output, keep original files unchanged
- -d --decompress  decompress
- -f --force       force overwrite of output file and compress links
- -h --help        give this help
- -l --list        list compressed file contents
- -L --license     display software license
- -n --no-name     do not save or restore the original name and time stamp
- -N --name        save or restore the original name and time stamp
- -q --quiet       suppress all warnings
- -r --recursive   operate recursively on directories
- -S .suf  --suffix .suf     use suffix .suf on compressed files
- -t --test        test compressed file integrity
- -v --verbose     verbose mode
- -V --version     display version number
- -1 --fast        compress faster
- -9 --best        compress better
- file...          files to (de)compress. If none given, use standard input.
+Usage: gzip [OPTION]... [FILE]...
+Compress or uncompress FILEs (by default, compress FILES in-place).
+
+Mandatory arguments to long options are mandatory for short options too.
+
+  -c, --stdout      write on standard output, keep original files unchanged
+  -d, --decompress  decompress
+  -f, --force       force overwrite of output file and compress links
+  -h, --help        give this help
+  -l, --list        list compressed file contents
+  -L, --license     display software license
+  -n, --no-name     do not save or restore the original name and time stamp
+  -N, --name        save or restore the original name and time stamp
+  -q, --quiet       suppress all warnings
+  -r, --recursive   operate recursively on directories
+  -S, --suffix=SUF  use suffix SUF on compressed files
+  -t, --test        test compressed file integrity
+  -v, --verbose     verbose mode
+  -V, --version     display version number
+  -1, --fast        compress faster
+  -9, --best        compress better
+
+With no FILE, or when FILE is -, read standard input.
+
 Report bugs to <bug-gzip@@gnu.org>.
 @end example
 
 This is the output of the command @samp{gzip -v texinfo.tex}:
 
 @example
-texinfo.tex:             69.7% -- replaced with texinfo.tex.gz
+texinfo.tex:     69.3% -- replaced with texinfo.tex.gz
 @end example
 
-The following command will find all @code{gzip} files in the current
-directory and subdirectories, and extract them in place without
-destroying the original:
+The following command will find all regular @samp{.gz} files in the
+current directory and subdirectories (skipping file names that contain
+newlines), and extract them in place without destroying the original,
+stopping on the first failure:
 
 @example
-find . -name '*.gz' -print | sed 's/^\(.*\)[.]gz$/gunzip < "&" > "\1"/' | sh
+find . -name '*
+*' -prune -o -name '*.gz' -type f -print |
+  sed "
+    s/'/'\\''/g
+    s/^\\(.*\\)\\.gz$/gunzip <'\\1.gz' >'\\1'/
+  " |
+  sh -e
 @end example
 
-@node Invoking gzip, Advanced usage, Sample, Top
-@chapter Invoking @code{gzip}
+@node Invoking gzip
+@chapter Invoking @command{gzip}
 @cindex invoking
 @cindex options
 
-The format for running the @code{gzip} program is:
+The format for running the @command{gzip} program is:
 
 @example
 gzip @var{option} @dots{}
 @end example
 
-@code{gzip} supports the following options:
+@command{gzip} supports the following options:
 
-@table @samp
+@table @option
 @item --stdout
 @itemx --to-stdout
 @itemx -c
 Write output on standard output; keep original files unchanged.
 If there are several input files, the output consists of a sequence of
-independently compressed members. To obtain better compression,
+independently compressed members.  To obtain better compression,
 concatenate all input files before compressing them.
 
 @item --decompress
@@ -246,11 +262,11 @@ Decompress.
 @itemx -f
 Force compression or decompression even if the file has multiple links
 or the corresponding file already exists, or if the compressed data
-is read from or written to a terminal. If the input data is not in
-a format recognized by @code{gzip}, and if the option @samp{--stdout} is also
+is read from or written to a terminal.  If the input data is not in
+a format recognized by @command{gzip}, and if the option @option{--stdout} is also
 given, copy the input data without change to the standard output: let
-@code{zcat} behave as @code{cat}. If @samp{-f} is not given, and
-when not running in the background, @code{gzip} prompts to verify
+@command{zcat} behave as @command{cat}.  If @option{-f} is not given, and
+when not running in the background, @command{gzip} prompts to verify
 whether an existing file should be overwritten.
 
 @item --help
@@ -268,15 +284,15 @@ ratio: compression ratio (0.0% if unknown)
 uncompressed_name: name of the uncompressed file
 @end example
 
-The uncompressed size is given as @samp{-1} for files not in @code{gzip}
-format, such as compressed @samp{.Z} files. To get the uncompressed size for
+The uncompressed size is given as @minus{}1 for files not in @command{gzip}
+format, such as compressed @samp{.Z} files.  To get the uncompressed size for
 such a file, you can use:
 
 @example
 zcat file.Z | wc -c
 @end example
 
-In combination with the @samp{--verbose} option, the following fields are also
+In combination with the @option{--verbose} option, the following fields are also
 displayed:
 
 @example
@@ -285,15 +301,15 @@ crc: the 32-bit CRC of the uncompressed data
 date & time: time stamp for the uncompressed file
 @end example
 
-The crc is given as ffffffff for a file not in gzip format.
+The @abbr{CRC} is given as ffffffff for a file not in gzip format.
 
-With @samp{--verbose}, the size totals and compression ratio for all files
-is also displayed, unless some sizes are unknown. With @samp{--quiet},
+With @option{--verbose}, the size totals and compression ratio for all files
+is also displayed, unless some sizes are unknown.  With @option{--quiet},
 the title and totals lines are not displayed.
 
-The @code{gzip} format represents the input size modulo
+The @command{gzip} format represents the input size modulo
 @math{2^32}, so the uncompressed size and compression ratio are listed
-incorrectly for uncompressed files 4 GB and larger. To work around
+incorrectly for uncompressed files 4 GiB and larger.  To work around
 this problem, you can use the following command to discover a large
 uncompressed file's true size:
 
@@ -303,23 +319,23 @@ zcat file.gz | wc -c
 
 @item --license
 @itemx -L
-Display the @code{gzip} license then quit.
+Display the @command{gzip} license then quit.
 
 @item --no-name
 @itemx -n
 When compressing, do not save the original file name and time stamp by
-default. (The original name is always saved if the name had to be
-truncated.) When decompressing, do not restore the original file name
-if present (remove only the @code{gzip}
+default.  (The original name is always saved if the name had to be
+truncated.)  When decompressing, do not restore the original file name
+if present (remove only the @command{gzip}
 suffix from the compressed file name) and do not restore the original
-time stamp if present (copy it from the compressed file). This option
+time stamp if present (copy it from the compressed file).  This option
 is the default when decompressing.
 
 @item --name
 @itemx -N
 When compressing, always save the original file name and time stamp; this
-is the default. When decompressing, restore the original file name and
-time stamp if present. This option is useful on systems which have
+is the default.  When decompressing, restore the original file name and
+time stamp if present.  This option is useful on systems which have
 a limit on file name length or when the time stamp has been lost after
 a file transfer.
 
@@ -329,14 +345,14 @@ Suppress all warning messages.
 
 @item --recursive
 @itemx -r
-Travel the directory structure recursively. If any of the file names
-specified on the command line are directories, @code{gzip} will descend
+Travel the directory structure recursively.  If any of the file names
+specified on the command line are directories, @command{gzip} will descend
 into the directory and compress all the files it finds there (or
-decompress them in the case of @code{gunzip}).
+decompress them in the case of @command{gunzip}).
 
 @item --suffix @var{suf}
 @itemx -S @var{suf}
-Use suffix @samp{@var{suf}} instead of @samp{.gz}. Any suffix can be
+Use suffix @var{suf} instead of @samp{.gz}.  Any suffix can be
 given, but suffixes other than @samp{.z} and @samp{.gz} should be
 avoided to avoid confusion when files are transferred to other systems.
 A null suffix forces gunzip to try decompression on all given files
@@ -346,55 +362,57 @@ regardless of suffix, as in:
 gunzip -S "" *        (*.* for MSDOS)
 @end example
 
-Previous versions of gzip used the @samp{.z} suffix. This was changed to
-avoid a conflict with @code{pack}.
+Previous versions of gzip used the @samp{.z} suffix.  This was changed to
+avoid a conflict with @command{pack}.
 
 @item --test
 @itemx -t
-Test. Check the compressed file integrity.
+Test.  Check the compressed file integrity.
 
 @item --verbose
 @itemx -v
-Verbose. Display the name and percentage reduction for each file compressed.
+Verbose.  Display the name and percentage reduction for each file compressed.
 
 @item --version
 @itemx -V
-Version. Display the version number and compilation options, then quit.
+Version.  Display the version number and compilation options, then quit.
 
 @item --fast
 @itemx --best
 @itemx -@var{n}
 Regulate the speed of compression using the specified digit @var{n},
-where @samp{-1} or @samp{--fast} indicates the fastest compression
-method (less compression) and @samp{--best} or @samp{-9} indicates the
+where @option{-1} or @option{--fast} indicates the fastest compression
+method (less compression) and @option{--best} or @option{-9} indicates the
 slowest compression method (optimal compression).  The default
-compression level is @samp{-6} (that is, biased towards high compression at
+compression level is @option{-6} (that is, biased towards high compression at
 expense of speed).
 @end table
 
-@node Advanced usage, Environment, Invoking gzip, Top
+@node Advanced usage
 @chapter Advanced usage
 @cindex concatenated files
 
-Multiple compressed files can be concatenated. In this case,
-@code{gunzip} will extract all members at once. If one member is
+Multiple compressed files can be concatenated.  In this case,
+@command{gunzip} will extract all members at once.  If one member is
 damaged, other members might still be recovered after removal of the
-damaged member. Better compression can be usually obtained if all
+damaged member.  Better compression can be usually obtained if all
 members are decompressed and then recompressed in a single step.
 
-This is an example of concatenating @code{gzip} files:
+This is an example of concatenating @command{gzip} files:
 
 @example
 gzip -c file1  > foo.gz
 gzip -c file2 >> foo.gz
 @end example
 
+@noindent
 Then
 
 @example
 gunzip -c foo
 @end example
 
+@noindent
 is equivalent to
 
 @example
@@ -402,13 +420,14 @@ cat file1 file2
 @end example
 
 In case of damage to one member of a @samp{.gz} file, other members can
-still be recovered (if the damaged member is removed). However,
+still be recovered (if the damaged member is removed).  However,
 you can get better compression by compressing all members at once:
 
 @example
 cat file1 file2 | gzip > foo.gz
 @end example
 
+@noindent
 compresses better than
 
 @example
@@ -422,8 +441,9 @@ zcat old.gz | gzip > new.gz
 @end example
 
 If a compressed file consists of several members, the uncompressed
-size and CRC reported by the @samp{--list} option applies to the last member
-only. If you need the uncompressed size for all members, you can use:
+size and @abbr{CRC} reported by the @option{--list} option applies to
+the last member
+only.  If you need the uncompressed size for all members, you can use:
 
 @example
 zcat file.gz | wc -c
@@ -431,16 +451,17 @@ zcat file.gz | wc -c
 
 If you wish to create a single archive file with multiple members so
 that members can later be extracted independently, use an archiver such
-as @code{tar} or @code{zip}. GNU @code{tar} supports the @samp{-z}
-option to invoke @code{gzip} transparently. @code{gzip} is designed as a
-complement to @code{tar}, not as a replacement.
+as @command{tar} or @command{zip}.  @acronym{GNU} @command{tar}
+supports the @option{-z}
+option to invoke @command{gzip} transparently.  @command{gzip} is designed as a
+complement to @command{tar}, not as a replacement.
 
-@node Environment, Tapes, Advanced usage, Top
+@node Environment
 @chapter Environment
 @cindex Environment
 
-The environment variable @code{GZIP} can hold a set of default options for
-@code{gzip}.  These options are interpreted first and can be overwritten by
+The environment variable @env{GZIP} can hold a set of default options for
+@command{gzip}.  These options are interpreted first and can be overwritten by
 explicit command line parameters.  For example:
 
 @example
@@ -449,46 +470,48 @@ for csh:   setenv GZIP "-8v --name"
 for MSDOS: set GZIP=-8v --name
 @end example
 
-On Vax/VMS, the name of the environment variable is @code{GZIP_OPT}, to
+On @abbr{VMS}, the name of the environment variable is @env{GZIP_OPT}, to
 avoid a conflict with the symbol set for invocation of the program.
 
-@node Tapes, Problems, Environment, Top
-@chapter Using @code{gzip} on tapes
+@node Tapes
+@chapter Using @command{gzip} on tapes
 @cindex tapes
 
 When writing compressed data to a tape, it is generally necessary to pad
-the output with zeroes up to a block boundary. When the data is read and
-the whole block is passed to @code{gunzip} for decompression,
-@code{gunzip} detects that there is extra trailing garbage after the
+the output with zeroes up to a block boundary.  When the data is read and
+the whole block is passed to @command{gunzip} for decompression,
+@command{gunzip} detects that there is extra trailing garbage after the
 compressed data and emits a warning by default if the garbage contains
-nonzero bytes. You have to use the
-@samp{--quiet} option to suppress the warning. This option can be set in the
-@code{GZIP} environment variable, as in:
+nonzero bytes.  You have to use the
+@option{--quiet} option to suppress the warning.  This option can be set in the
+@env{GZIP} environment variable, as in:
 
 @example
 for sh:    GZIP="-q"  tar -xfz --block-compress /dev/rst0
 for csh:   (setenv GZIP "-q"; tar -xfz --block-compress /dev/rst0)
 @end example
 
-In the above example, @code{gzip} is invoked implicitly by the @samp{-z}
-option of GNU @code{tar}.  Make sure that the same block size (@samp{-b}
-option of @code{tar}) is used for reading and writing compressed data on
-tapes.  (This example assumes you are using the GNU version of
-@code{tar}.)
+In the above example, @command{gzip} is invoked implicitly by the @option{-z}
+option of @acronym{GNU} @command{tar}.  Make sure that the same block
+size (@option{-b}
+option of @command{tar}) is used for reading and writing compressed data on
+tapes.  (This example assumes you are using the @acronym{GNU} version of
+@command{tar}.)
 
-@node Problems, Copying This Manual, Tapes, Top
+@node Problems
 @chapter Reporting Bugs
 @cindex bugs
 
-If you find a bug in @code{gzip}, please send electronic mail to
+If you find a bug in @command{gzip}, please send electronic mail to
 @email{bug-gzip@@gnu.org}.  Include the version number,
 which you can find by running @w{@samp{gzip -V}}.  Also include in your
 message the hardware and operating system, the compiler used to compile
-@code{gzip},
-a description of the bug behavior, and the input to @code{gzip} that triggered
+@command{gzip},
+a description of the bug behavior, and the input to @command{gzip}
+that triggered
 the bug.@refill
 
-@node Copying This Manual, Concept Index, Problems, Top
+@node Copying This Manual
 @appendix Copying This Manual
 
 @menu
@@ -497,7 +520,7 @@ the bug.@refill
 
 @include fdl.texi
 
-@node Concept Index, , Copying This Manual, Top
+@node Concept Index
 @appendix Concept Index
 
 @printindex cp
index 9642a4fc673ba99e846b360d06006953925216d5..9ddd22fee465d0c61fd13f51d2b42ba6bd68b0f4 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 8 December 2006
-@set UPDATED-MONTH December 2006
-@set EDITION 1.3.9
-@set VERSION 1.3.9
+@set UPDATED 5 February 2007
+@set UPDATED-MONTH February 2007
+@set EDITION 1.3.12
+@set VERSION 1.3.12
index 9642a4fc673ba99e846b360d06006953925216d5..9ddd22fee465d0c61fd13f51d2b42ba6bd68b0f4 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 8 December 2006
-@set UPDATED-MONTH December 2006
-@set EDITION 1.3.9
-@set VERSION 1.3.9
+@set UPDATED 5 February 2007
+@set UPDATED-MONTH February 2007
+@set EDITION 1.3.12
+@set VERSION 1.3.12
diff --git a/gunzip.in b/gunzip.in
new file mode 100644 (file)
index 0000000..9490f16
--- /dev/null
+++ b/gunzip.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+PATH=BINDIR:$PATH
+exec gzip -d "$@"
diff --git a/gzexe.1 b/gzexe.1
index 8b62cd60637cf0ed08f49c5ba75ae6f78ea051cf..01ad9ade5d105fcdc893b59ba1d692f65a75d83c 100644 (file)
--- a/gzexe.1
+++ b/gzexe.1
@@ -3,22 +3,22 @@
 gzexe \- compress executable files in place
 .SH SYNOPSIS
 .B gzexe
-[ name ...  ]
+.I "name .\|.\|."
 .SH DESCRIPTION
 The
 .I  gzexe
 utility allows you to compress executables in place and have them
 automatically uncompress and execute when you run them (at a penalty
-in performance).  For example if you execute ``gzexe /bin/cat'' it
+in performance).  For example if you execute ``gzexe /usr/bin/gdb'' it
 will create the following two files:
 .nf
 .br
-    -r-xr-xr-x  1 root  bin   9644 Feb 11 11:16 /bin/cat
-    -r-xr-xr-x  1 bin   bin  24576 Nov 23 13:21 /bin/cat~
+    -rwxr-xr-x  1 root root 1026675 Jun  7 13:53 /usr/bin/gdb
+    -rwxr-xr-x  1 root root 2304524 May 30 13:02 /usr/bin/gdb~
 .fi
-/bin/cat~ is the original file and /bin/cat is the self-uncompressing
-executable file.  You can remove /bin/cat~ once you are sure that
-/bin/cat works properly.
+/usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing
+executable file.  You can remove /usr/bin/gdb~ once you are sure that
+/usr/bin/gdb works properly.
 .PP
 This utility is most useful on systems with very small disks.
 .SH OPTIONS
@@ -28,16 +28,24 @@ Decompress the given executables instead of compressing them.
 .SH "SEE ALSO"
 gzip(1), znew(1), zmore(1), zcmp(1), zforce(1)
 .SH CAVEATS
-The compressed executable is a shell script. This may create some
-security holes. In particular, the compressed executable relies
+The compressed executable is a shell script.  This may create some
+security holes.  In particular, the compressed executable relies
 on the PATH environment variable to find
 .I gzip
-and some other utilities
-.I (tail, chmod, ln, sleep).
+and some standard utilities
+.RI ( basename ,
+.IR chmod ,
+.IR ln ,
+.IR mkdir ,
+.IR mktemp ,
+.IR rm ,
+.IR sleep ,
+and
+.IR tail ).
 .SH "BUGS"
-.I gzexe 
+.I gzexe
 attempts to retain the original file attributes on the compressed executable,
 but you may have to fix them manually in some cases, using
 .I chmod
 or
-.I chown.
+.IR chown .
index a27ec5c3828a31c6ef881c0aa3e8a48f3e7ecd9e..0acd3bbb4deb8bfb3e3fae4265ecd26bb24ac420 100644 (file)
--- a/gzexe.in
+++ b/gzexe.in
@@ -13,7 +13,7 @@
 # On Ultrix, /bin/sh is too buggy, change the first line to: #!/bin/sh5
 
 
-# Copyright (C) 1998, 2002, 2004, 2006 Free Software Foundation
+# Copyright (C) 1998, 2002, 2004, 2006, 2007 Free Software Foundation
 # Copyright (C) 1993 Jean-loup Gailly
 
 # This program is free software; you can redistribute it and/or modify
@@ -36,21 +36,21 @@ nl='
 IFS=" $tab$nl"
 
 version='gzexe (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Jean-loup Gailly.'
 
-usage='Usage: gzexe [OPTION] FILE...
+usage="Usage: $0 [OPTION] FILE...
 Rename each FILE with a compressed version of itself, renaming FILE to FILE~.
 
   -d             Decompress each FILE instead of compressing it.
       --help     display this help and exit
       --version  output version information and exit
 
-Report bugs to <bug-gzip@gnu.org>.'
+Report bugs to <bug-gzip@gnu.org>."
 
 
 PATH="BINDIR:$PATH"
@@ -106,11 +106,11 @@ for i do
     continue
   fi
   case /$file in
-  */basename | */cat | */chmod | */cp | \
+  */basename | */bash | */cat | */chmod | */cp | \
   */dirname | */echo | */expr | */gzip | \
-  */ln | */mkdir | */mktemp | */mv | */rm | */rmdir | \
+  */ln | */mkdir | */mktemp | */mv | */rm | \
   */sed | */sh | */sleep | */test | */tail)
-    echo >&2 "$0: $i would depend on itself"; continue;;
+    echo >&2 "$0: $i might depend on itself"; continue;;
   esac
 
   dir=`dirname "$file"` || dir=$TMPDIR
@@ -167,7 +167,7 @@ fi || { (exit 127); exit 127; }
 gztmp=$gztmpdir/$0
 case $0 in
 -* | */*'
-') mkdir -p "$gztmp" && rmdir "$gztmp";;
+') mkdir -p "$gztmp" && rm -r "$gztmp";;
 */*) gztmp=$gztmpdir/`basename "$0"`;;
 esac || { (exit 127); exit 127; }
 
diff --git a/gzip.c b/gzip.c
index 08b5c5fbd6c8fa80d2be549c9becf36973403422..3131e860873cdc5f70fc6cb3260db732df445550 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -1,6 +1,6 @@
 /* gzip (GNU zip) -- compress files with zip algorithm and 'compress' interface
 
-   Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
    Copyright (C) 1992-1993 Jean-loup Gailly
 
    This program is free software; you can redistribute it and/or modify
@@ -28,7 +28,7 @@
  */
 
 static char  *license_msg[] = {
-"Copyright (C) 2006 Free Software Foundation, Inc.",
+"Copyright (C) 2007 Free Software Foundation, Inc.",
 "Copyright (C) 1993 Jean-loup Gailly.",
 "This is free software.  You may redistribute copies of it under the terms of",
 "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.",
@@ -54,7 +54,7 @@ static char  *license_msg[] = {
  */
 
 #ifdef RCSID
-static char rcsid[] = "$Id: gzip.c,v 1.11 2006/12/12 00:03:17 eggert Exp $";
+static char rcsid[] = "$Id: gzip.c,v 1.16 2007/03/20 05:09:51 eggert Exp $";
 #endif
 
 #include <config.h>
@@ -72,16 +72,9 @@ static char rcsid[] = "$Id: gzip.c,v 1.11 2006/12/12 00:03:17 eggert Exp $";
 #include "fcntl-safer.h"
 #include "getopt.h"
 #include "stat-time.h"
-#include "timespec.h"
 
                /* configuration */
 
-#ifdef HAVE_TIME_H
-#  include <time.h>
-#else
-#  include <sys/time.h>
-#endif
-
 #ifdef HAVE_FCNTL_H
 #  include <fcntl.h>
 #endif
@@ -199,7 +192,7 @@ int verbose = 0;      /* be verbose (-v) */
 int quiet = 0;        /* be very quiet (-q) */
 int do_lzw = 0;       /* generate output compatible with old compress (-Z) */
 int test = 0;         /* test .gz file integrity */
-int foreground;       /* set if program run in foreground */
+int foreground = 0;   /* set if program run in foreground */
 char *program_name;   /* program name */
 int maxbits = BITS;   /* max bits per code for LZW */
 int method = DEFLATED;/* compression method */
@@ -218,7 +211,7 @@ size_t z_len;         /* strlen(z_suffix) */
 /* The set of signals that are caught.  */
 static sigset_t caught_signals;
 
-/* If nonzero then exit with status 1, rather than with the usual
+/* If nonzero then exit with status WARNING, rather than with the usual
    signal status, on receipt of a signal with this value.  This
    suppresses a "Broken Pipe" message with some shells.  */
 static int volatile exiting_signal;
@@ -412,8 +405,11 @@ int main (argc, argv)
     if (env != NULL) args = argv;
 
 #ifndef GNU_STANDARD
+# define GNU_STANDARD 1
+#endif
+#if !GNU_STANDARD
     /* For compatibility with old compress, use program name as an option.
-     * If you compile with -DGNU_STANDARD, this program will behave as
+     * Unless you compile with -DGNU_STANDARD=0, this program will behave as
      * gzip even if it is invoked under the name gunzip or zcat.
      *
      * Systems which do not support links can still use -d or -dc.
@@ -621,22 +617,16 @@ local void treat_stdin()
     strcpy(ifname, "stdin");
     strcpy(ofname, "stdout");
 
-    /* Get the time stamp on the input file. */
-    time_stamp.tv_nsec = -1;  /* The time is unknown by default.  */
-
-#ifndef NO_STDIN_FSTAT
-    if (list || !no_time) {
-       if (fstat(fileno(stdin), &istat) != 0) {
-           progerror("standard input");
-           do_exit(ERROR);
-       }
-# ifdef NO_PIPE_TIMESTAMP
-       if (S_ISREG(istat.st_mode))
-# endif
-           time_stamp = get_stat_mtime (&istat);
-#endif /* NO_STDIN_FSTAT */
-    }
-    ifile_size = -1L; /* convention for unknown size */
+    /* Get the file's time stamp and size.  */
+    if (fstat (fileno (stdin), &istat) != 0)
+      {
+       progerror ("standard input");
+       do_exit (ERROR);
+      }
+    ifile_size = S_ISREG (istat.st_mode) ? istat.st_size : -1;
+    time_stamp.tv_nsec = -1;
+    if (!no_time || list)
+      time_stamp = get_stat_mtime (&istat);
 
     clear_bufs(); /* clear input and output buffers */
     to_stdout = 1;
@@ -715,48 +705,57 @@ local void treat_file(iname)
               program_name, ifname));
        return;
     }
-    if (!S_ISREG(istat.st_mode)) {
-       WARN((stderr,
-             "%s: %s is not a directory or a regular file - ignored\n",
-             program_name, ifname));
-       close (ifd);
-       return;
-    }
 
-    if (istat.st_mode & S_ISUID)
-      {
-       WARN ((stderr, "%s: %s is set-user-ID on execution - ignored\n",
-              program_name, ifname));
-       close (ifd);
-       return;
-      }
-    if (istat.st_mode & S_ISGID)
-      {
-       WARN ((stderr, "%s: %s is set-group-ID on execution - ignored\n",
-              program_name, ifname));
-       close (ifd);
-       return;
-      }
-    if (istat.st_mode & S_ISVTX)
+    if (! to_stdout)
       {
-       WARN ((stderr, "%s: %s has the sticky bit set - file ignored\n",
-              program_name, ifname));
-       close (ifd);
-       return;
-      }
+       if (! S_ISREG (istat.st_mode))
+         {
+           WARN ((stderr,
+                  "%s: %s is not a directory or a regular file - ignored\n",
+                  program_name, ifname));
+           close (ifd);
+           return;
+         }
+       if (istat.st_mode & S_ISUID)
+         {
+           WARN ((stderr, "%s: %s is set-user-ID on execution - ignored\n",
+                  program_name, ifname));
+           close (ifd);
+           return;
+         }
+       if (istat.st_mode & S_ISGID)
+         {
+           WARN ((stderr, "%s: %s is set-group-ID on execution - ignored\n",
+                  program_name, ifname));
+           close (ifd);
+           return;
+         }
 
-    if (istat.st_nlink > 1 && !to_stdout && !force) {
-       WARN((stderr, "%s: %s has %lu other link%c -- unchanged\n",
-             program_name, ifname, (unsigned long) istat.st_nlink - 1,
-             istat.st_nlink > 2 ? 's' : ' '));
-       close (ifd);
-       return;
-    }
+       if (! force)
+         {
+           if (istat.st_mode & S_ISVTX)
+             {
+               WARN ((stderr,
+                      "%s: %s has the sticky bit set - file ignored\n",
+                      program_name, ifname));
+               close (ifd);
+               return;
+             }
+           if (2 <= istat.st_nlink)
+             {
+               WARN ((stderr, "%s: %s has %lu other link%c -- unchanged\n",
+                      program_name, ifname,
+                      (unsigned long int) istat.st_nlink - 1,
+                      istat.st_nlink == 2 ? ' ' : 's'));
+               close (ifd);
+               return;
+             }
+         }
+      }
 
-    ifile_size = istat.st_size;
-    if (no_time && !list)
-      time_stamp.tv_nsec = -1;
-    else
+    ifile_size = S_ISREG (istat.st_mode) ? istat.st_size : -1;
+    time_stamp.tv_nsec = -1;
+    if (!no_time || list)
       time_stamp = get_stat_mtime (&istat);
 
     /* Generate output file name. For -r and (-t or -l), skip files
@@ -1887,7 +1886,7 @@ abort_gzip_signal (sig)
     signal (sig, SIG_IGN);
    remove_output_file ();
    if (sig == exiting_signal)
-     _exit (ERROR);
+     _exit (WARNING);
    signal (sig, SIG_DFL);
    raise (sig);
 }
diff --git a/gzip.h b/gzip.h
index ae273a6bc44a784bb7b47bf32232b10fe9a936ba..bd0bfe386797591b78bcb6b0c2eb91cd5b680764 100644 (file)
--- a/gzip.h
+++ b/gzip.h
@@ -1,6 +1,8 @@
 /* gzip.h -- common declarations for all gzip modules
 
-   Copyright (C) 1997, 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2001, 2006, 2007 Free Software
+   Foundation, Inc.
+
    Copyright (C) 1992-1993 Jean-loup Gailly.
 
    This program is free software; you can redistribute it and/or modify
@@ -43,7 +45,8 @@
  * too often
  */
 #include <stdio.h>
-#include <sys/types.h> /* for off_t, time_t */
+#include <sys/types.h> /* for off_t */
+#include <time.h>
 #if defined HAVE_STRING_H || defined STDC_HEADERS
 #  include <string.h>
 #  if !defined STDC_HEADERS && defined HAVE_MEMORY_H && !defined __GNUC__
index 2e5df1f1912bd517d4f0c38e3e501b13e0b2546c..f492178400f01c60bfc7b55fd44cbae29c234dba 100644 (file)
@@ -32,7 +32,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-# Copyright (C) 2004-2006 Free Software Foundation, Inc.
+# Copyright (C) 2004-2007 Free Software Foundation, Inc.
 #
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
@@ -41,7 +41,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgzip --source-base=.#bootmp/lib --m4-base=.#bootmp/m4 --doc-base=.#bootmp/doc --aux-dir=.#bootmp/build-aux --avoid=getline --avoid=rpmatch --no-libtool --macro-prefix=gl fcntl fcntl-safer fdl getopt stat-time sys_stat utimens xalloc yesno
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgzip --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --avoid=getline --avoid=rpmatch --no-libtool --macro-prefix=gl fcntl fcntl-safer fdl getopt stat-time sys_stat time utimens xalloc yesno
 
 
 
@@ -70,10 +70,12 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \
        $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \
        $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fcntl-safer.m4 \
        $(top_srcdir)/m4/fcntl_h.m4 $(top_srcdir)/m4/getopt.m4 \
+       $(top_srcdir)/m4/gnulib-common.m4 \
        $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/inline.m4 \
        $(top_srcdir)/m4/shell.m4 $(top_srcdir)/m4/stat-time.m4 \
-       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
-       $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/unistd-safer.m4 \
+       $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+       $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \
+       $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/unistd-safer.m4 \
        $(top_srcdir)/m4/unistd_h.m4 $(top_srcdir)/m4/utimbuf.m4 \
        $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes.m4 \
        $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/yesno.m4 \
@@ -105,7 +107,11 @@ ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@
+ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@
 ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@
+ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@
+ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@
+ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
 ASCPPFLAGS = @ASCPPFLAGS@
@@ -130,7 +136,26 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 FCNTL_H = @FCNTL_H@
 GETOPT_H = @GETOPT_H@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_READLINK = @GNULIB_READLINK@
 GREP = @GREP@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE__BOOL = @HAVE__BOOL@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -140,9 +165,11 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 LDFLAGS = @LDFLAGS@
 LIBGZIP_LIBDEPS = @LIBGZIP_LIBDEPS@
 LIBGZIP_LTLIBDEPS = @LIBGZIP_LTLIBDEPS@
+LIBINTL = @LIBINTL@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN_S = @LN_S@
+LTLIBINTL = @LTLIBINTL@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
@@ -156,12 +183,23 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STDBOOL_H = @STDBOOL_H@
 STRIP = @STRIP@
 SYS_STAT_H = @SYS_STAT_H@
-UNISTD_H = @UNISTD_H@
+SYS_TIME_H = @SYS_TIME_H@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
 VERSION = @VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -214,26 +252,28 @@ noinst_LTLIBRARIES =
 EXTRA_DIST = error.c error.h exitfail.c exitfail.h fcntl_.h \
        creat-safer.c fcntl--.h fcntl-safer.h open-safer.c getopt.c \
        getopt1.c getopt_.h getopt_int.h stat-time.h stdbool_.h \
-       stat_.h timespec.h dup-safer.c fd-safer.c pipe-safer.c \
-       unistd--.h unistd-safer.h utimens.c utimens.h xalloc.h \
-       xmalloc.c yesno.c yesno.h
-BUILT_SOURCES = $(FCNTL_H) $(GETOPT_H) $(STDBOOL_H) $(SYS_STAT_H) \
-       $(UNISTD_H)
+       stdlib_.h stat_.h sys_time_.h time_.h unistd_.h dup-safer.c \
+       fd-safer.c pipe-safer.c unistd--.h unistd-safer.h utimens.c \
+       utimens.h xalloc.h xmalloc.c yesno.c yesno.h
+BUILT_SOURCES = $(FCNTL_H) $(GETOPT_H) $(STDBOOL_H) stdlib.h \
+       $(SYS_STAT_H) $(SYS_TIME_H) time.h unistd.h
 SUFFIXES = 
 MOSTLYCLEANFILES = core *.stackdump fcntl.h fcntl.h-t getopt.h \
-       getopt.h-t stdbool.h stdbool.h-t sys/stat.h sys/stat.h-t \
-       unistd.h _match.S _match.i match_.s
+       getopt.h-t stdbool.h stdbool.h-t stdlib.h stdlib.h-t \
+       sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t time.h \
+       time.h-t unistd.h unistd.h-t _match.S _match.i match_.s
 MOSTLYCLEANDIRS = sys
 CLEANFILES = 
 DISTCLEANFILES = 
 MAINTAINERCLEANFILES = 
 AM_CPPFLAGS = 
-libgzip_a_SOURCES = exit.h gettext.h xalloc-die.c
+libgzip_a_SOURCES = gettext.h xalloc-die.c
 libgzip_a_LIBADD = $(gl_LIBOBJS) $(LIBOBJS)
 libgzip_a_DEPENDENCIES = $(gl_LIBOBJS) $(LIBOBJS)
 EXTRA_libgzip_a_SOURCES = error.c exitfail.c creat-safer.c \
        open-safer.c getopt.c getopt1.c dup-safer.c fd-safer.c \
        pipe-safer.c utimens.c xmalloc.c yesno.c
+LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h
 all: $(BUILT_SOURCES) config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -548,10 +588,27 @@ stdbool.h: stdbool_.h
        } > $@-t
        mv $@-t $@
 
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib_.h
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''ABSOLUTE_STDLIB_H''@|$(ABSOLUTE_STDLIB_H)|g' \
+             -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+             -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+             -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+             -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+             -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+             -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             < $(srcdir)/stdlib_.h; \
+       } > $@-t
+       mv $@-t $@
+
 # We need the following in order to create <sys/stat.h> when the system
 # has one that is incomplete.
 sys/stat.h: stat_.h
-       test -d sys || mkdir sys
+       @MKDIR_P@ sys
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
@@ -559,12 +616,60 @@ sys/stat.h: stat_.h
        } > $@-t
        mv $@-t $@
 
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time_.h
+       @MKDIR_P@ sys
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+             -e 's|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \
+             -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+             -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+             < $(srcdir)/sys_time_.h; \
+       } > $@-t
+       mv $@-t $@
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time_.h
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@ABSOLUTE_TIME_H''@|$(ABSOLUTE_TIME_H)|g' \
+             -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+             -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+             -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
+             -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+             -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             < $(srcdir)/time_.h; \
+       } > $@-t
+       mv $@-t $@
+
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
-unistd.h:
+unistd.h: unistd_.h
+       rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         echo '/* Empty placeholder for $@.  */'; \
-       } > $@
+         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+             -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
+             -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+             -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+             -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+             -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+             -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+             -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+             -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+             -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+             -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+             -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+             -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+             -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+             -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+             < $(srcdir)/unistd_.h; \
+       } > $@-t
+       mv $@-t $@
 
 mostlyclean-local: mostlyclean-generic
        @for dir in '' $(MOSTLYCLEANDIRS); do \
index fc252c23a9015c87dd310f5a6d4ffed0e1e607b0..377a81b9ebbbc52b4f8192983fc0f1325d56da08 100644 (file)
@@ -3,13 +3,25 @@
 /* Define this to an absolute name of <fcntl.h>. */
 #undef ABSOLUTE_FCNTL_H
 
+/* Define this to an absolute name of <stdlib.h>. */
+#undef ABSOLUTE_STDLIB_H
+
 /* Define this to an absolute name of <sys/stat.h>. */
 #undef ABSOLUTE_SYS_STAT_H
 
+/* Define this to an absolute name of <sys/time.h>. */
+#undef ABSOLUTE_SYS_TIME_H
+
+/* Define this to an absolute name of <time.h>. */
+#undef ABSOLUTE_TIME_H
+
+/* Define this to an absolute name of <unistd.h>. */
+#undef ABSOLUTE_UNISTD_H
+
 /* Define if an assembler version of longest_match is available. */
 #undef ASMV
 
-/* Define to 1 when using the gnulib fcntl-safer module. */
+/* Define to 1 when using the gnulib module fcntl-safer. */
 #undef GNULIB_FCNTL_SAFER
 
 /* Define to 1 if you have the `chown' function. */
    */
 #undef HAVE_DECL_MKDIR
 
-/* Define to 1 if you have the declaration of `nanosleep', and to 0 if you
-   don't. */
-#undef HAVE_DECL_NANOSLEEP
-
 /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
    don't. */
 #undef HAVE_DECL_STRERROR_R
 /* Define to 1 if `st_atim.tv_nsec' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
 
-/* Define to 1 if `st_spare1' is member of `struct stat'. */
-#undef HAVE_STRUCT_STAT_ST_SPARE1
+/* Define to 1 if `st_birthtimensec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+
+/* Define to 1 if `st_birthtimespec.tv_nsec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
 
-/* Define if struct timespec is declared in <time.h>. */
-#undef HAVE_STRUCT_TIMESPEC
+/* Define to 1 if `st_birthtim.tv_nsec' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC
 
 /* Define if struct utimbuf is declared -- usually in <utime.h>. Some systems
    have utime.h but don't declare the struct anywhere. */
 /* Define to 1 if strerror_r returns char *. */
 #undef STRERROR_R_CHAR_P
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
 /* Define to 1 if the type of the st_atim member of a struct stat is struct
    timespec. */
 #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
 /* Define to `long int' if <sys/types.h> does not define. */
 #undef off_t
 
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+   supported. Do not define if restrict is supported directly. */
+#undef restrict
+
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 #undef size_t
index d0606eeb4cef6b83429858d7618a70dff992ad2f..7b12b615ca08ffabef1213bbe6769c0e4fdeea04 100644 (file)
@@ -35,7 +35,7 @@
 int
 dup_safer (int fd)
 {
-#ifdef F_DUPFD
+#if defined F_DUPFD && !defined FCHDIR_REPLACEMENT
   return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
 #else
   /* fd_safer calls us back, but eventually the recursion unwinds and
diff --git a/lib/exit.h b/lib/exit.h
deleted file mode 100644 (file)
index e8f7738..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* exit() function.
-   Copyright (C) 1995, 2001 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#ifndef _EXIT_H
-#define _EXIT_H
-
-/* Get exit() declaration.  */
-#include <stdlib.h>
-
-/* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
-#ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
-#endif /* _EXIT_H */
index 97abc674ecb10a6168080f5985aa03fad802dfa1..373d325c5ad732230eb91622476705a0808df919 100644 (file)
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2005, 2006, 2007 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
@@ -20,6 +20,7 @@
 #include <config.h>
 
 #include "exitfail.h"
-#include "exit.h"
+
+#include <stdlib.h>
 
 int volatile exit_failure = EXIT_FAILURE;
index 5c2857caef685106ac4818676dafdc06aa1bf6c3..e16ad54afe1b330258462a6a1ce39d64909fa018 100644 (file)
 #include <unistd.h>
 #include @ABSOLUTE_FCNTL_H@
 
+
+/* Declare overridden functions.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef FCHDIR_REPLACEMENT
+# define open rpl_open
+extern int open (const char *, int, ...);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* Fix up the O_* macros.  */
+
 #if !defined O_DIRECT && defined O_DIRECTIO
 /* Tru64 spells it `O_DIRECTIO'.  */
 # define O_DIRECT O_DIRECTIO
index 27fce3dc799e0012f8033608cb1b8307bdb9d695..615ef9a3b6fe19f779d5ed7e8f51506b3704735f 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
 # endif
 #endif
 
-#ifdef __cplusplus
+#ifdef __cplusplus
 extern "C" {
 #endif
 
@@ -216,7 +216,7 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
 
 #endif
 
-#ifdef __cplusplus
+#ifdef __cplusplus
 }
 #endif
 
index 755a75d91e80072b78a2fd449d205488173fb10b..4308bdd4dc3300aae4a715d5cb0527b11925643a 100644 (file)
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2004-2006 Free Software Foundation, Inc.
+# Copyright (C) 2004-2007 Free Software Foundation, Inc.
 #
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
@@ -9,7 +9,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgzip --source-base=.#bootmp/lib --m4-base=.#bootmp/m4 --doc-base=.#bootmp/doc --aux-dir=.#bootmp/build-aux --avoid=getline --avoid=rpmatch --no-libtool --macro-prefix=gl fcntl fcntl-safer fdl getopt stat-time sys_stat utimens xalloc yesno
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgzip --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --avoid=getline --avoid=rpmatch --no-libtool --macro-prefix=gl fcntl fcntl-safer fdl getopt stat-time sys_stat time utimens xalloc yesno
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -43,12 +43,6 @@ EXTRA_libgzip_a_SOURCES += error.c
 
 ## end   gnulib module error
 
-## begin gnulib module exit
-
-libgzip_a_SOURCES += exit.h
-
-## end   gnulib module exit
-
 ## begin gnulib module exitfail
 
 
@@ -111,6 +105,12 @@ libgzip_a_SOURCES += gettext.h
 
 ## end   gnulib module gettext-h
 
+## begin gnulib module link-warning
+
+LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
+
+## end   gnulib module link-warning
+
 ## begin gnulib module stat-time
 
 
@@ -136,6 +136,32 @@ EXTRA_DIST += stdbool_.h
 
 ## end   gnulib module stdbool
 
+## begin gnulib module stdlib
+
+BUILT_SOURCES += stdlib.h
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib_.h
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''ABSOLUTE_STDLIB_H''@|$(ABSOLUTE_STDLIB_H)|g' \
+             -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+             -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+             -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+             -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+             -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+             -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+             -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             < $(srcdir)/stdlib_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+
+EXTRA_DIST += stdlib_.h
+
+## end   gnulib module stdlib
+
 ## begin gnulib module sys_stat
 
 BUILT_SOURCES += $(SYS_STAT_H)
@@ -143,7 +169,7 @@ BUILT_SOURCES += $(SYS_STAT_H)
 # We need the following in order to create <sys/stat.h> when the system
 # has one that is incomplete.
 sys/stat.h: stat_.h
-       test -d sys || mkdir sys
+       @MKDIR_P@ sys
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
@@ -157,24 +183,85 @@ EXTRA_DIST += stat_.h
 
 ## end   gnulib module sys_stat
 
-## begin gnulib module timespec
+## begin gnulib module sys_time
+
+BUILT_SOURCES += $(SYS_TIME_H)
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time_.h
+       @MKDIR_P@ sys
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+             -e 's|@''ABSOLUTE_SYS_TIME_H''@|$(ABSOLUTE_SYS_TIME_H)|g' \
+             -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+             -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+             < $(srcdir)/sys_time_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += sys/time.h sys/time.h-t
 
+EXTRA_DIST += sys_time_.h
 
-EXTRA_DIST += timespec.h
+## end   gnulib module sys_time
 
-## end   gnulib module timespec
+## begin gnulib module time
+
+BUILT_SOURCES += time.h
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time_.h
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@ABSOLUTE_TIME_H''@|$(ABSOLUTE_TIME_H)|g' \
+             -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+             -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+             -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
+             -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+             -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+             < $(srcdir)/time_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += time.h time.h-t
+
+EXTRA_DIST += time_.h
+
+## end   gnulib module time
 
 ## begin gnulib module unistd
 
-BUILT_SOURCES += $(UNISTD_H)
+BUILT_SOURCES += unistd.h
 
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
-unistd.h:
+unistd.h: unistd_.h
+       rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         echo '/* Empty placeholder for $@.  */'; \
-       } > $@
-MOSTLYCLEANFILES += unistd.h
+         sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+             -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
+             -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+             -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+             -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+             -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+             -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+             -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+             -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+             -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+             -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+             -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+             -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+             -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+             -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+             -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+             < $(srcdir)/unistd_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t
+
+EXTRA_DIST += unistd_.h
 
 ## end   gnulib module unistd
 
index 734e366574c49db5c55b838d7166e6bacb42bf58..649c848732bd8b184f39b08989ed7b11c7ca420c 100644 (file)
@@ -1,6 +1,6 @@
 /* stat-related time functions.
 
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2007 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
 #ifndef STAT_TIME_H
 #define STAT_TIME_H 1
 
-#include "timespec.h"
+#include <sys/stat.h>
+#include <time.h>
 
 /* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type
    struct timespec, if available.  If not, then STAT_TIMESPEC_NS (ST,
    ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST,
-   if available.  ST_XTIM can be st_atim, st_ctim, or st_mtim for
-   access, status change, or data modification time, respectively.
+   if available.  ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim
+   for access, status change, data modification, or birth (creation)
+   time respectively.
 
    These macros are private to stat-time.h.  */
 #if defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
@@ -52,8 +54,6 @@ get_stat_atime_ns (struct stat const *st)
   return STAT_TIMESPEC (st, st_atim).tv_nsec;
 # elif defined STAT_TIMESPEC_NS
   return STAT_TIMESPEC_NS (st, st_atim);
-# elif defined HAVE_STRUCT_STAT_ST_SPARE1
-  return st->st_spare1 * 1000;
 # else
   return 0;
 # endif
@@ -67,8 +67,6 @@ get_stat_ctime_ns (struct stat const *st)
   return STAT_TIMESPEC (st, st_ctim).tv_nsec;
 # elif defined STAT_TIMESPEC_NS
   return STAT_TIMESPEC_NS (st, st_ctim);
-# elif defined HAVE_STRUCT_STAT_ST_SPARE1
-  return st->st_spare3 * 1000;
 # else
   return 0;
 # endif
@@ -82,8 +80,19 @@ get_stat_mtime_ns (struct stat const *st)
   return STAT_TIMESPEC (st, st_mtim).tv_nsec;
 # elif defined STAT_TIMESPEC_NS
   return STAT_TIMESPEC_NS (st, st_mtim);
-# elif defined HAVE_STRUCT_STAT_ST_SPARE1
-  return st->st_spare2 * 1000;
+# else
+  return 0;
+# endif
+}
+
+/* Return the nanosecond component of *ST's birth time.  */
+static inline long int
+get_stat_birthtime_ns (struct stat const *st)
+{
+# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC
+  return STAT_TIMESPEC (st, st_birthtim).tv_nsec;
+# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+  return STAT_TIMESPEC_NS (st, st_birthtim);
 # else
   return 0;
 # endif
@@ -131,4 +140,45 @@ get_stat_mtime (struct stat const *st)
 #endif
 }
 
+/* Return *ST's birth time, if available; otherwise return a value
+   with negative tv_nsec.  */
+static inline struct timespec
+get_stat_birthtime (struct stat const *st)
+{
+  struct timespec t;
+
+#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
+     || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC)
+  t = STAT_TIMESPEC (st, st_birthtim);
+#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
+  t.tv_sec = st->st_birthtime;
+  t.tv_nsec = st->st_birthtimensec;
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  /* Woe32 native platforms (but not Cygwin) put the "file creation
+     time" in st_ctime (!).  See
+     <http://msdn2.microsoft.com/de-de/library/14h5k7ff(VS.80).aspx>.  */
+  t.tv_sec = st->st_ctime;
+  t.tv_nsec = 0;
+#else
+  /* Birth time is not supported.  Set tv_sec to avoid undefined behavior.  */
+  t.tv_sec = -1;
+  t.tv_nsec = -1;
+#endif
+
+#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
+     || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \
+     || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
+  /* FreeBSD and NetBSD sometimes signal the absence of knowledge by
+     using zero.  Attempt to work around this problem.  Alas, this can
+     report failure even for valid time stamps.  Also, NetBSD
+     sometimes returns junk in the birth time fields; work around this
+     bug if it it is detected.  There's no need to detect negative
+     tv_nsec junk as negative tv_nsec already indicates an error.  */
+  if (t.tv_sec == 0 || 1000000000 <= t.tv_nsec)
+    t.tv_nsec = -1;
+#endif
+
+  return t;
+}
+
 #endif
index cbf5ac00ac14ca1db30c9f734a520c36bdb721ab..de3add575974adf47fdbd59d1206bad99d9f4113 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat header file.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007 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
@@ -17,8 +17,8 @@
 
 /* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
 
-#ifndef _gl_SYS_STAT_H
-#define _gl_SYS_STAT_H
+#ifndef _GL_SYS_STAT_H
+#define _GL_SYS_STAT_H
 
 /* This file is supposed to be used on platforms where <sys/stat.h> is
    incomplete.  It is intended to provide definitions and prototypes
@@ -272,4 +272,4 @@ rpl_mkdir (char const *name, mode_t mode)
 # define mkdir rpl_mkdir
 #endif
 
-#endif /* _gl_SYS_STAT_H */
+#endif /* _GL_SYS_STAT_H */
index efa80ba921ed759564a462bdfca2bf91871b0c48..150a0102e1de452e33a65da2f3771d202e7f010b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -15,8 +15,8 @@
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
 
 /* ISO C 99 <stdbool.h> for platforms that lack it.  */
 
@@ -41,6 +41,9 @@
 
        - You cannot assume that _Bool is a typedef; it might be a macro.
 
+       - Bit-fields of type 'bool' are not supported.  Portable code
+         should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
+
        - In C99, casts and automatic conversions to '_Bool' or 'bool' are
          performed in such a way that every nonzero value gets converted
          to 'true', and zero gets converted to 'false'.  This doesn't work
@@ -112,4 +115,4 @@ typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
 #define true 1
 #define __bool_true_false_are_defined 1
 
-#endif /* _STDBOOL_H */
+#endif /* _GL_STDBOOL_H */
diff --git a/lib/stdlib_.h b/lib/stdlib_.h
new file mode 100644 (file)
index 0000000..0581509
--- /dev/null
@@ -0,0 +1,148 @@
+/* A GNU-like <stdlib.h>.
+
+   Copyright (C) 1995, 2001-2002, 2006-2007 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#if defined __need_malloc_and_calloc
+/* Special invocation convention inside glibc header files.  */
+
+/* This #pragma avoids a warning with "gcc -Wall" on some glibc systems
+   on which <stdlib.h> has an inappropriate declaration, see
+   <http://sourceware.org/bugzilla/show_bug.cgi?id=1079>.  */
+#ifdef __GNUC__
+# pragma GCC system_header
+#endif
+
+#include @ABSOLUTE_STDLIB_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifdef __DECC
+# include_next <stdlib.h>
+#endif
+
+#ifndef _GL_STDLIB_H
+#define _GL_STDLIB_H
+
+/* This #pragma avoids a warning with "gcc -Wall" on some glibc systems
+   on which <stdlib.h> has an inappropriate declaration, see
+   <http://sourceware.org/bugzilla/show_bug.cgi?id=1079>.  */
+#ifdef __GNUC__
+# pragma GCC system_header
+#endif
+
+#ifndef __DECC
+# include @ABSOLUTE_STDLIB_H@
+#endif
+
+
+/* The definition of GL_LINK_WARNING is copied here.  */
+
+
+/* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
+   with proper operation of xargs.  */
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#elif EXIT_FAILURE != 1
+# undef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_GETSUBOPT@
+/* Assuming *OPTIONP is a comma separated list of elements of the form
+   "token" or "token=value", getsubopt parses the first of these elements.
+   If the first element refers to a "token" that is member of the given
+   NULL-terminated array of tokens:
+     - It replaces the comma with a NUL byte, updates *OPTIONP to point past
+       the first option and the comma, sets *VALUEP to the value of the
+       element (or NULL if it doesn't contain an "=" sign),
+     - It returns the index of the "token" in the given array of tokens.
+   Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
+   For more details see the POSIX:2001 specification.
+   http://www.opengroup.org/susv3xsh/getsubopt.html */
+# if !@HAVE_GETSUBOPT@
+extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getsubopt
+# define getsubopt(o,t,v) \
+    (GL_LINK_WARNING ("getsubopt is unportable - " \
+                      "use gnulib module getsubopt for portability"), \
+     getsubopt (o, t, v))
+#endif
+
+
+#if @GNULIB_MKDTEMP@
+# if !@HAVE_MKDTEMP@
+/* Create a unique temporary directory from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the directory name unique.
+   Returns TEMPLATE, or a null pointer if it cannot get a unique name.
+   The directory is created mode 700.  */
+extern char * mkdtemp (char *template);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkdtemp
+# define mkdtemp(t) \
+    (GL_LINK_WARNING ("mkdtemp is unportable - " \
+                      "use gnulib module mkdtemp for portability"), \
+     mkdtemp (t))
+#endif
+
+
+#if @GNULIB_MKSTEMP@
+# if @REPLACE_MKSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+   The last six characters of TEMPLATE must be "XXXXXX";
+   they are replaced with a string that makes the file name unique.
+   The file is then created, ensuring it didn't exist before.
+   The file is created read-write (mask at least 0600 & ~umask), but it may be
+   world-readable and world-writable (mask 0666 & ~umask), depending on the
+   implementation.
+   Returns the open file descriptor if successful, otherwise -1 and errno
+   set.  */
+#  define mkstemp rpl_mkstemp
+extern int mkstemp (char *template);
+# else
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
+#  include <unistd.h>
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemp
+# define mkstemp(t) \
+    (GL_LINK_WARNING ("mkstemp is unportable - " \
+                      "use gnulib module mkstemp for portability"), \
+     mkstemp (t))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STDLIB_H */
+#endif
diff --git a/lib/sys_time_.h b/lib/sys_time_.h
new file mode 100644 (file)
index 0000000..9337be3
--- /dev/null
@@ -0,0 +1,44 @@
+/* Provide a more complete sys/time.h.
+
+   Copyright (C) 2007 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Written by Paul Eggert.  */
+
+#ifndef _GL_SYS_TIME_H
+#define _GL_SYS_TIME_H
+
+#if @HAVE_SYS_TIME_H@
+# include @ABSOLUTE_SYS_TIME_H@
+#else
+# include <time.h>
+#endif
+
+#if ! @HAVE_STRUCT_TIMEVAL@
+struct timeval
+{
+  time_t tv_sec;
+  long int tv_usec;
+};
+#endif
+
+#if @REPLACE_GETTIMEOFDAY@
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
+int gettimeofday (struct timeval *restrict, void *restrict);
+#endif
+
+#endif /* _GL_SYS_TIME_H */
diff --git a/lib/time_.h b/lib/time_.h
new file mode 100644 (file)
index 0000000..28fb04d
--- /dev/null
@@ -0,0 +1,118 @@
+/* A more-standard <time.h>.
+
+   Copyright (C) 2007 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+/* Don't get in the way of glibc when it includes time.h merely to
+   declare a few standard symbols, rather than to declare all the
+   symbols.  */
+#if defined __need_time_t || defined __need_clock_t || defined __need_timespec
+# include @ABSOLUTE_TIME_H@
+
+#else
+/* Normal invocation convention.  */
+
+# ifdef __DECC
+#  include_next <time.h>
+# endif
+
+# if ! defined _GL_TIME_H
+#  define _GL_TIME_H
+
+#  ifndef __DECC
+#   include @ABSOLUTE_TIME_H@
+#  endif
+
+#  ifdef __cplusplus
+extern "C" {
+#  endif
+
+/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
+   Or they define it with the wrong member names or define it in <sys/time.h>
+   (e.g., FreeBSD circa 1997).  */
+#  if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
+#   if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+#    include <sys/time.h>
+#   else
+#    undef timespec
+#    define timespec rpl_timespec
+struct timespec
+{
+  time_t tv_sec;
+  long int tv_nsec;
+};
+#   endif
+#  endif
+
+/* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
+   return -1 and store the remaining time into RMTP.  See
+   <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
+#  if @REPLACE_NANOSLEEP@
+#   define nanosleep rpl_nanosleep
+int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
+#  endif
+
+/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
+   <http://www.opengroup.org/susv3xsh/localtime_r.html> and
+   <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */
+#  if @REPLACE_LOCALTIME_R@
+#   undef localtime_r
+#   define localtime_r rpl_localtime_r
+#   undef gmtime_r
+#   define gmtime_r rpl_gmtime_r
+struct tm *localtime_r (time_t const *restrict __timer,
+                       struct tm *restrict __result);
+struct tm *gmtime_r (time_t const *restrict __timer,
+                    struct tm *restrict __result);
+#  endif
+
+/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+   the resulting broken-down time into TM.  See
+   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
+#  if @REPLACE_STRPTIME@
+#   undef strptime
+#   define strptime rpl_strptime
+char *strptime (char const *restrict __buf, char const *restrict __format,
+               struct tm *restrict __tm);
+#  endif
+
+/* Convert TM to a time_t value, assuming UTC.  */
+#  if @REPLACE_TIMEGM@
+#   undef timegm
+#   define timegm rpl_timegm
+time_t timegm (struct tm *__tm);
+#  endif
+
+/* Encourage applications to avoid unsafe functions that can overrun
+   buffers when given outlandish struct tm values.  Portable
+   applications should use strftime (or even sprintf) instead.  */
+#  if GNULIB_PORTCHECK
+#   undef asctime
+#   define asctime eschew_asctime
+#   undef asctime_r
+#   define asctime_r eschew_asctime_r
+#   undef ctime
+#   define ctime eschew_ctime
+#   undef ctime_r
+#   define ctime_r eschew_ctime_r
+#  endif
+
+#  ifdef __cplusplus
+}
+#  endif
+
+# endif
+#endif
diff --git a/lib/timespec.h b/lib/timespec.h
deleted file mode 100644 (file)
index 8188c20..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* timespec -- System time interface
-
-   Copyright (C) 2000, 2002, 2004, 2005 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
-
-#if ! defined TIMESPEC_H
-# define TIMESPEC_H
-
-# include <sys/types.h>
-# if TIME_WITH_SYS_TIME
-#  include <sys/time.h>
-#  include <time.h>
-# else
-#  if HAVE_SYS_TIME_H
-#   include <sys/time.h>
-#  else
-#   include <time.h>
-#  endif
-# endif
-
-# if ! HAVE_STRUCT_TIMESPEC
-/* Some systems don't define this struct, e.g., AIX 4.1, Ultrix 4.3.  */
-struct timespec
-{
-  time_t tv_sec;
-  long tv_nsec;
-};
-# endif
-
-/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
-   Assume the nanosecond components are in range, or close to it.  */
-static inline int
-timespec_cmp (struct timespec a, struct timespec b)
-{
-  return (a.tv_sec < b.tv_sec ? -1
-         : a.tv_sec > b.tv_sec ? 1
-         : a.tv_nsec - b.tv_nsec);
-}
-
-# if ! HAVE_DECL_NANOSLEEP
-/* Don't specify a prototype here.  Some systems (e.g., OSF) declare
-   nanosleep with a conflicting one (const-less first parameter).  */
-int nanosleep ();
-# endif
-
-void gettime (struct timespec *);
-int settime (struct timespec const *);
-
-#endif
diff --git a/lib/unistd_.h b/lib/unistd_.h
new file mode 100644 (file)
index 0000000..77df861
--- /dev/null
@@ -0,0 +1,192 @@
+/* Substitute for and wrapper around <unistd.h>.
+   Copyright (C) 2004-2007 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#ifndef _GL_UNISTD_H
+#define _GL_UNISTD_H
+
+#if @HAVE_UNISTD_H@
+# include @ABSOLUTE_UNISTD_H@
+#endif
+
+
+/* The definition of GL_LINK_WARNING is copied here.  */
+
+
+/* Declare overridden functions.  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_CHOWN@
+# if @REPLACE_CHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+   to GID (if GID is not -1).
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/chown.html>.  */
+#  define chown rpl_chown
+extern int chown (const char *file, uid_t uid, gid_t gid);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef chown
+# define chown(f,u,g) \
+    (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \
+                      "doesn't treat a uid or gid of -1 on some systems - " \
+                      "use gnulib module chown for portability"), \
+     chown (f, u, g))
+#endif
+
+
+#if @GNULIB_DUP2@
+# if !@HAVE_DUP2@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD.  Do nothing if
+   NEWFD = OLDFD, otherwise close NEWFD first if it is open.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/dup2.html>.  */
+extern int dup2 (int oldfd, int newfd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dup2
+# define dup2(o,n) \
+    (GL_LINK_WARNING ("dup2 is unportable - " \
+                      "use gnulib module dup2 for portability"), \
+     dup2 (o, n))
+#endif
+
+
+#if @GNULIB_FCHDIR@
+# if @REPLACE_FCHDIR@
+
+/* Change the process' current working directory to the directory on which
+   the given file descriptor is open.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/fchdir.html>.  */
+extern int fchdir (int /*fd*/);
+
+#  define close rpl_close
+extern int close (int);
+#  define dup rpl_dup
+extern int dup (int);
+#  define dup2 rpl_dup2
+extern int dup2 (int, int);
+
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchdir
+# define fchdir(f) \
+    (GL_LINK_WARNING ("fchdir is unportable - " \
+                      "use gnulib module fchdir for portability"), \
+     fchdir (f))
+#endif
+
+
+#if @GNULIB_FTRUNCATE@
+# if !@HAVE_FTRUNCATE@
+/* Change the size of the file to which FD is opened to become equal to LENGTH.
+   Return 0 if successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/ftruncate.html>.  */
+extern int ftruncate (int fd, off_t length);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef ftruncate
+# define ftruncate(f,l) \
+    (GL_LINK_WARNING ("ftruncate is unportable - " \
+                      "use gnulib module ftruncate for portability"), \
+     ftruncate (f, l))
+#endif
+
+
+#if @GNULIB_GETCWD@
+/* Include the headers that might declare getcwd so that they will not
+   cause confusion if included after this file.  */
+# include <stdlib.h>
+# if @REPLACE_GETCWD@
+/* Get the name of the current working directory, and put it in SIZE bytes
+   of BUF.
+   Return BUF if successful, or NULL if the directory couldn't be determined
+   or SIZE was too small.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/getcwd.html>.
+   Additionally, the gnulib module 'getcwd' guarantees the following GNU
+   extension: If BUF is NULL, an array is allocated with 'malloc'; the array
+   is SIZE bytes long, unless SIZE == 0, in which case it is as big as
+   necessary.  */
+#  define getcwd rpl_getcwd
+extern char * getcwd (char *buf, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getcwd
+# define getcwd(b,s) \
+    (GL_LINK_WARNING ("getcwd is unportable - " \
+                      "use gnulib module getcwd for portability"), \
+     getcwd (b, s))
+#endif
+
+
+#if @GNULIB_GETLOGIN_R@
+/* Copies the user's login name to NAME.
+   The array pointed to by NAME has room for SIZE bytes.
+
+   Returns 0 if successful.  Upon error, an error number is returned, or -1 in
+   the case that the login name cannot be found but no specific error is
+   provided (this case is hopefully rare but is left open by the POSIX spec).
+
+   See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+ */
+# if !@HAVE_DECL_GETLOGIN_R@
+#  include <stddef.h>
+extern int getlogin_r (char *name, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin_r
+# define getlogin_r(n,s) \
+    (GL_LINK_WARNING ("getlogin_r is unportable - " \
+                      "use gnulib module getlogin_r for portability"), \
+     getlogin_r (n, s))
+#endif
+
+
+#if @GNULIB_READLINK@
+/* Read the contents of the symbolic link FILE and place the first BUFSIZE
+   bytes of it into BUF.  Return the number of bytes placed into BUF if
+   successful, otherwise -1 and errno set.
+   See the POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/readlink.html>.  */
+# if !@HAVE_READLINK@
+#  include <stddef.h>
+extern int readlink (const char *file, char *buf, size_t bufsize);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef readlink
+# define readlink(f,b,s) \
+    (GL_LINK_WARNING ("readlink is unportable - " \
+                      "use gnulib module readlink for portability"), \
+     readlink (f, b, s))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_UNISTD_H */
index 8f4273c80876bf8216ccd77a60769948a906556d..71bc510d86bb57db59203877a55fdd25d45ab694 100644 (file)
@@ -1,6 +1,7 @@
 /* Set file access and modification times.
 
-   Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2006, 2007 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
@@ -26,6 +27,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <sys/time.h>
 #include <unistd.h>
 
 #if HAVE_UTIME_H
index d42d792c21d758eeb2770bbf24eda09811067ef0..0097aaaf7524d00906674963c7c1a7905e457a08 100644 (file)
@@ -1,3 +1,3 @@
-#include "timespec.h"
+#include <time.h>
 int futimens (int, char const *, struct timespec const [2]);
 int utimens (char const *, struct timespec const [2]);
index 17ab5142187ed0dff35dc6c5e8dff445bfa76f63..0c6d8dcf508df85a48ec654393519f37352ae9cf 100644 (file)
@@ -1,7 +1,7 @@
 /* xalloc.h -- malloc with out-of-memory checking
 
    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2003, 2004, 2006 Free Software Foundation, Inc.
+   1999, 2000, 2003, 2004, 2006, 2007 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
@@ -139,10 +139,10 @@ xnrealloc (void *p, size_t n, size_t s)
    allocating an initial block with a nonzero size, or by allocating a
    larger block.
 
-   In the following implementation, nonzero sizes are doubled so that
-   repeated reallocations have O(N log N) overall cost rather than
-   O(N**2) cost, but the specification for this function does not
-   guarantee that sizes are doubled.
+   In the following implementation, nonzero sizes are increased by a
+   factor of approximately 1.5 so that repeated reallocations have
+   O(N) overall cost rather than O(N**2) cost, but the
+   specification for this function does not guarantee that rate.
 
    Here is an example of use:
 
@@ -204,9 +204,13 @@ x2nrealloc (void *p, size_t *pn, size_t s)
     }
   else
     {
-      if (((size_t) -1) / 2 / s < n)
+      /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
+        Check for overflow, so that N * S stays in size_t range.
+        The check is slightly conservative, but an exact check isn't
+        worth the trouble.  */
+      if ((size_t) -1 / 3 * 2 / s <= n)
        xalloc_die ();
-      n *= 2;
+      n += (n + 1) / 2;
     }
 
   *pn = n;
index 143466e41234a610f8bf7fc19e2429bebb077668..3475b0a7cf42772500c12e1eb79c4cb2f3cfc22a 100644 (file)
@@ -1,5 +1,5 @@
-#serial 4
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+#serial 5
+dnl Copyright (C) 2005-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,6 +8,4 @@ AC_DEFUN([gl_FCNTL_SAFER],
 [
   AC_LIBOBJ([open-safer])
   AC_LIBOBJ([creat-safer])
-  AC_DEFINE([GNULIB_FCNTL_SAFER], [1],
-    [Define to 1 when using the gnulib fcntl-safer module.])
 ])
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
new file mode 100644 (file)
index 0000000..5398010
--- /dev/null
@@ -0,0 +1,22 @@
+# gnulib-common.m4 serial 2
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_MODULE_INDICATOR([modulename])
+# defines a C macro indicating the presence of the given module.
+AC_DEFUN([gl_MODULE_INDICATOR],
+[
+  AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+    [Define to 1 when using the gnulib module ]$1[.])
+])
+
+# AC_PROG_MKDIR_P
+# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
+# Remove this macro when we can assume autoconf >= 2.60.
+m4_ifdef([AC_PROG_MKDIR_P], [], [
+  AC_DEFUN([AC_PROG_MKDIR_P],
+    [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+     MKDIR_P='$(mkdir_p)'
+     AC_SUBST([MKDIR_P])])])
index a106f3e818c23b3bb9774723fa9eabc981a4aef9..4e681165b7489ecdd69d05e9a69435b67d68f8f3 100644 (file)
@@ -1,7 +1,7 @@
 # -*- buffer-read-only: t -*- vi: set ro:
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2004-2006 Free Software Foundation, Inc.
+# Copyright (C) 2004-2007 Free Software Foundation, Inc.
 #
 # This file is free software, distributed under the terms of the GNU
 # General Public License.  As a special exception to the GNU General
@@ -42,19 +42,26 @@ AC_DEFUN([gl_INIT],
   gl_cond_libtool=false
   gl_libdeps=
   gl_ltlibdeps=
-  gl_source_base='.#bootmp/lib'
+  gl_source_base='lib'
   gl_ERROR
   gl_EXITFAIL
-  dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
   gl_FCNTL_H
   gl_FCNTL_SAFER
+  gl_MODULE_INDICATOR([fcntl-safer])
   gl_GETOPT
+  AC_SUBST([LIBINTL])
+  AC_SUBST([LTLIBINTL])
   gl_INLINE
   gl_STAT_TIME
+  gl_STAT_BIRTHTIME
   AM_STDBOOL_H
+  gl_STDLIB_H
   gl_HEADER_SYS_STAT_H
-  gl_TIMESPEC
-  gl_HEADER_UNISTD
+  AC_PROG_MKDIR_P
+  gl_HEADER_SYS_TIME_H
+  AC_PROG_MKDIR_P
+  gl_HEADER_TIME_H
+  gl_UNISTD_H
   gl_UNISTD_SAFER
   gl_UTIMENS
   gl_XALLOC
@@ -100,12 +107,12 @@ AC_DEFUN([gl_LIBSOURCES],
 # This macro records the list of files which have been installed by
 # gnulib-tool and may be removed by future gnulib-tool invocations.
 AC_DEFUN([gl_FILE_LIST], [
+  build-aux/link-warning.h
   doc/fdl.texi
   lib/creat-safer.c
   lib/dup-safer.c
   lib/error.c
   lib/error.h
-  lib/exit.h
   lib/exitfail.c
   lib/exitfail.h
   lib/fcntl--.h
@@ -122,9 +129,12 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stat-time.h
   lib/stat_.h
   lib/stdbool_.h
-  lib/timespec.h
+  lib/stdlib_.h
+  lib/sys_time_.h
+  lib/time_.h
   lib/unistd--.h
   lib/unistd-safer.h
+  lib/unistd_.h
   lib/utimens.c
   lib/utimens.h
   lib/xalloc-die.c
@@ -139,11 +149,14 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/fcntl-safer.m4
   m4/fcntl_h.m4
   m4/getopt.m4
+  m4/gnulib-common.m4
   m4/inline.m4
   m4/stat-time.m4
   m4/stdbool.m4
+  m4/stdlib_h.m4
   m4/sys_stat_h.m4
-  m4/timespec.m4
+  m4/sys_time_h.m4
+  m4/time_h.m4
   m4/unistd-safer.m4
   m4/unistd_h.m4
   m4/utimbuf.m4
index 7eb470761eb244bc6f06f3c56e0a5b152a41cecb..abdd2ba4f6bb0c040ee236521647f510aa233fbc 100644 (file)
@@ -1,4 +1,20 @@
-#serial 4
+# Check for a working shell.
+
+# Copyright (C) 2000, 2001, 2007 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.
 
 # AC_PROG_SHELL
 # -------------
@@ -15,6 +31,8 @@ AC_DEFUN([AC_PROG_SHELL],
        >conftest.c || exit
        >|conftest.c || exit
        !>conftest.c || exit
+       # Test that $(...) works.
+       test "$(expr 3 + 4)" -eq 7 || exit
       '
       ac_cv_path_shell=no
 
index 1e46a09fe4fdd4bafde2e35fd910663fb4301ad2..84dc26f4ac32c06e13878e4fbfaa3c2e60f65ebd 100644 (file)
@@ -1,6 +1,6 @@
 # Checks for stat-related time functions.
 
-# Copyright (C) 1998, 1999, 2001, 2003, 2005, 2006 Free Software
+# Copyright (C) 1998, 1999, 2001, 2003, 2005, 2006, 2007 Free Software
 # Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
@@ -9,16 +9,19 @@
 
 dnl From Paul Eggert.
 
-# st_atim.tv_nsec - Linux, Solaris
-# st_atimespec.tv_nsec - FreeBSD, if ! defined _POSIX_SOURCE
-# st_atimensec - FreeBSD, if defined _POSIX_SOURCE
+# st_atim.tv_nsec - Linux, Solaris, Cygwin
+# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
+# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
 # st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
-# st_spare1 - Cygwin?
+
+# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
+# st_birthtim - Cygwin 1.7.0+
 
 AC_DEFUN([gl_STAT_TIME],
 [
   AC_REQUIRE([AC_C_INLINE])
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
 
   AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
     [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
@@ -26,17 +29,11 @@ AC_DEFUN([gl_STAT_TIME],
        [AC_TRY_COMPILE(
          [
            #include <sys/types.h>
-           #if TIME_WITH_SYS_TIME
+           #include <sys/stat.h>
+           #if HAVE_SYS_TIME_H
            # include <sys/time.h>
-           # include <time.h>
-           #else
-           # if HAVE_SYS_TIME_H
-           #  include <sys/time.h>
-           # else
-           #  include <time.h>
-           # endif
            #endif
-           #include <sys/stat.h>
+           #include <time.h>
            struct timespec ts;
            struct stat st;
          ],
@@ -47,16 +44,12 @@ AC_DEFUN([gl_STAT_TIME],
          [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
        AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], 1,
-         [Define to 1 if the type of the st_atim member of a struct stat is
+        [Define to 1 if the type of the st_atim member of a struct stat is
          struct timespec.])
      fi],
     [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
        [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
-         [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [],
-            [AC_CHECK_MEMBERS([struct stat.st_spare1], [],
-               [],
-               [#include <sys/types.h>
-                #include <sys/stat.h>])],
+         [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
             [#include <sys/types.h>
              #include <sys/stat.h>])],
          [#include <sys/types.h>
@@ -66,3 +59,27 @@ AC_DEFUN([gl_STAT_TIME],
     [#include <sys/types.h>
      #include <sys/stat.h>])
 ])
+
+# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
+# and NTFS (Cygwin).
+# There was a time when this field was named st_createtime (21 June
+# 2002 to 16 July 2002) But that window is very small and applied only
+# to development code, so systems still using that configuration are
+# not supported.  See revisions 1.10 and 1.11 of FreeBSD's
+# src/sys/ufs/ufs/dinode.h.
+#
+AC_DEFUN([gl_STAT_BIRTHTIME],
+[
+  AC_REQUIRE([AC_C_INLINE])
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
+    [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
+      [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
+        [#include <sys/types.h>
+         #include <sys/stat.h>])],
+       [#include <sys/types.h>
+       #include <sys/stat.h>])],
+    [#include <sys/types.h>
+     #include <sys/stat.h>])
+])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
new file mode 100644 (file)
index 0000000..d46a5f0
--- /dev/null
@@ -0,0 +1,31 @@
+# stdlib_h.m4 serial 1
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDLIB_H],
+[
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  gl_ABSOLUTE_HEADER([stdlib.h])
+  ABSOLUTE_STDLIB_H=\"$gl_cv_absolute_stdlib_h\"
+  AC_SUBST([ABSOLUTE_STDLIB_H])
+])
+
+AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDLIB_H_DEFAULTS],
+[
+  GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
+  GNULIB_MKDTEMP=0;   AC_SUBST([GNULIB_MKDTEMP])
+  GNULIB_MKSTEMP=0;   AC_SUBST([GNULIB_MKSTEMP])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_GETSUBOPT=1;   AC_SUBST([HAVE_GETSUBOPT])
+  HAVE_MKDTEMP=1;     AC_SUBST([HAVE_MKDTEMP])
+  REPLACE_MKSTEMP=0;  AC_SUBST([REPLACE_MKSTEMP])
+])
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
new file mode 100644 (file)
index 0000000..b38e1bc
--- /dev/null
@@ -0,0 +1,61 @@
+# Configure a replacement for <sys/time.h>.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Martin Lambers.
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+  dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+  dnl statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+  if test $ac_cv_header_sys_time_h = yes; then
+    gl_ABSOLUTE_HEADER([sys/time.h])
+    ABSOLUTE_SYS_TIME_H=\"$gl_cv_absolute_sys_time_h\"
+    HAVE_SYS_TIME_H=1
+  else
+    ABSOLUTE_SYS_TIME_H=\"no/such/file/sys/time.h\"
+    HAVE_SYS_TIME_H=0
+  fi
+  AC_SUBST([ABSOLUTE_SYS_TIME_H])
+  AC_SUBST([HAVE_SYS_TIME_H])
+
+  AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[#if HAVE_SYS_TIME_H
+            #include <sys/time.h>
+           #endif
+           #include <time.h>
+         ]],
+         [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+       [gl_cv_sys_struct_timeval=yes],
+       [gl_cv_sys_struct_timeval=no])])
+  if test $gl_cv_sys_struct_timeval = yes; then
+    HAVE_STRUCT_TIMEVAL=1
+  else
+    HAVE_STRUCT_TIMEVAL=0
+  fi
+  AC_SUBST([HAVE_STRUCT_TIMEVAL])
+
+  dnl Assume POSIX behavior unless another module says otherwise.
+  REPLACE_GETTIMEOFDAY=0
+  AC_SUBST([REPLACE_GETTIMEOFDAY])
+  if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
+    SYS_TIME_H=sys/time.h
+  else
+    SYS_TIME_H=
+  fi
+  AC_SUBST([SYS_TIME_H])
+])
diff --git a/m4/time_h.m4 b/m4/time_h.m4
new file mode 100644 (file)
index 0000000..e90ed7a
--- /dev/null
@@ -0,0 +1,76 @@
+# Configure a more-standard replacement for <time.h>.
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software
+# Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_HEADER_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  gl_ABSOLUTE_HEADER([time.h])
+  ABSOLUTE_TIME_H=\"$gl_cv_absolute_time_h\"
+  AC_SUBST([ABSOLUTE_TIME_H])
+  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+[
+  dnl If another module says to replace or to not replace, do that.
+  dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+  dnl this lets maintainers check for portability.
+  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;  AC_SUBST([REPLACE_LOCALTIME_R])
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
+  REPLACE_STRPTIME=GNULIB_PORTCHECK;     AC_SUBST([REPLACE_STRPTIME])
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
+])
+
+dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl in time.h or sys/time.h.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
+[
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  AC_CACHE_CHECK([for struct timespec in <time.h>],
+    [gl_cv_sys_struct_timespec_in_time_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[#include <time.h>
+         ]],
+         [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+       [gl_cv_sys_struct_timespec_in_time_h=yes],
+       [gl_cv_sys_struct_timespec_in_time_h=no])])
+
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
+      [gl_cv_sys_struct_timespec_in_sys_time_h],
+      [AC_COMPILE_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <sys/time.h>
+           ]],
+           [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+        [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+        [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+    if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    fi
+  fi
+  AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+  AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+])
diff --git a/m4/timespec.m4 b/m4/timespec.m4
deleted file mode 100644 (file)
index c281128..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#serial 12
-
-# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-dnl From Jim Meyering
-
-AC_DEFUN([gl_TIMESPEC],
-[
-  dnl Prerequisites of lib/timespec.h.
-  AC_REQUIRE([AC_C_INLINE])
-  AC_REQUIRE([AC_HEADER_TIME])
-  AC_CHECK_HEADERS_ONCE(sys/time.h)
-  gl_CHECK_TYPE_STRUCT_TIMESPEC
-
-  dnl Persuade glibc and Solaris <time.h> to declare nanosleep.
-  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
-  AC_CHECK_DECLS(nanosleep, , , [#include <time.h>])
-])
-
-dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
-dnl in time.h or sys/time.h.
-
-AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
-[
-  dnl Persuade pedantic Solaris to declare struct timespec.
-  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
-  AC_REQUIRE([AC_HEADER_TIME])
-  AC_CHECK_HEADERS_ONCE(sys/time.h)
-  AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec,
-    [AC_TRY_COMPILE(
-      [
-#      if TIME_WITH_SYS_TIME
-#       include <sys/time.h>
-#       include <time.h>
-#      else
-#       if HAVE_SYS_TIME_H
-#        include <sys/time.h>
-#       else
-#        include <time.h>
-#       endif
-#      endif
-      ],
-      [static struct timespec x; x.tv_sec = x.tv_nsec;],
-      fu_cv_sys_struct_timespec=yes,
-      fu_cv_sys_struct_timespec=no)
-    ])
-
-  if test $fu_cv_sys_struct_timespec = yes; then
-    AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1,
-             [Define if struct timespec is declared in <time.h>. ])
-  fi
-])
index 9c77f9bd0d4969b8cae68f4a2321a42159b03a61..628b8186830ee2c5febeb6f23773905049afb9b2 100644 (file)
@@ -1,18 +1,51 @@
-# unistd_h.m4 serial 2
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# unistd_h.m4 serial 5
+dnl Copyright (C) 2006-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-dnl Written by Simon Josefsson
+dnl Written by Simon Josefsson, Bruno Haible.
 
-AC_DEFUN([gl_HEADER_UNISTD],
+AC_DEFUN([gl_UNISTD_H],
 [
-  dnl Prerequisites of lib/unistd.h.
-  AC_CHECK_HEADERS([unistd.h], [
-    UNISTD_H=''
-  ], [
-    UNISTD_H='unistd.h'
-  ])
-  AC_SUBST(UNISTD_H)
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+  AC_CHECK_HEADERS_ONCE([unistd.h])
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
+    gl_ABSOLUTE_HEADER([unistd.h])
+    ABSOLUTE_UNISTD_H=\"$gl_cv_absolute_unistd_h\"
+  else
+    HAVE_UNISTD_H=0
+  fi
+  AC_SUBST([HAVE_UNISTD_H])
+  AC_SUBST([ABSOLUTE_UNISTD_H])
+])
+
+AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_UNISTD_H_DEFAULTS],
+[
+  GNULIB_CHOWN=0;         AC_SUBST([GNULIB_CHOWN])
+  GNULIB_DUP2=0;          AC_SUBST([GNULIB_DUP2])
+  GNULIB_FCHDIR=0;        AC_SUBST([GNULIB_FCHDIR])
+  GNULIB_FTRUNCATE=0;     AC_SUBST([GNULIB_FTRUNCATE])
+  GNULIB_GETCWD=0;        AC_SUBST([GNULIB_GETCWD])
+  GNULIB_GETLOGIN_R=0;    AC_SUBST([GNULIB_GETLOGIN_R])
+  GNULIB_READLINK=0;      AC_SUBST([GNULIB_READLINK])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DUP2=1;            AC_SUBST([HAVE_DUP2])
+  HAVE_FTRUNCATE=1;       AC_SUBST([HAVE_FTRUNCATE])
+  HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
+  HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+  REPLACE_CHOWN=0;        AC_SUBST([REPLACE_CHOWN])
+  REPLACE_FCHDIR=0;       AC_SUBST([REPLACE_FCHDIR])
+  REPLACE_GETCWD=0;       AC_SUBST([REPLACE_GETCWD])
 ])
index 56f1bce666fdb999e9331baa24fb077fd012cd74..9927908ff5a92eae9312146d6fe9c06c7ce2ef84 100644 (file)
@@ -1,6 +1,6 @@
-#serial 7
+#serial 8
 
-# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004 Free Software
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007 Free Software
 # Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -16,30 +16,22 @@ dnl Some systems have utime.h but don't declare the struct anywhere.
 AC_DEFUN([gl_CHECK_TYPE_STRUCT_UTIMBUF],
 [
   AC_CHECK_HEADERS_ONCE(sys/time.h utime.h)
-  AC_REQUIRE([AC_HEADER_TIME])
-  AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
-    [AC_TRY_COMPILE(
-      [
-#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 HAVE_UTIME_H
-# include <utime.h>
-#endif
-      ],
-      [static struct utimbuf x; x.actime = x.modtime;],
-      fu_cv_sys_struct_utimbuf=yes,
-      fu_cv_sys_struct_utimbuf=no)
-    ])
+  AC_CACHE_CHECK([for struct utimbuf], [gl_cv_sys_struct_utimbuf],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+         [[#if HAVE_SYS_TIME_H
+            #include <sys/time.h>
+           #endif
+           #include <time.h>
+           #ifdef HAVE_UTIME_H
+            #include <utime.h>
+           #endif
+         ]],
+         [[static struct utimbuf x; x.actime = x.modtime;]])],
+       [gl_cv_sys_struct_utimbuf=yes],
+       [gl_cv_sys_struct_utimbuf=no])])
 
-  if test $fu_cv_sys_struct_utimbuf = yes; then
+  if test $gl_cv_sys_struct_utimbuf = yes; then
     AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1,
       [Define if struct utimbuf is declared -- usually in <utime.h>.
        Some systems have utime.h but don't declare the struct anywhere. ])
index 97a99ea25c2b8de2135f3ebf7f633742616b95e6..9ac9c3ea1ec66abf7e66e0113f5339165e7728af 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -8,7 +8,6 @@ AC_DEFUN([gl_UTIMENS],
   AC_LIBOBJ([utimens])
 
   dnl Prerequisites of lib/utimens.c.
-  AC_REQUIRE([gl_TIMESPEC])
   AC_REQUIRE([gl_FUNC_UTIMES])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF])
diff --git a/zcat.in b/zcat.in
new file mode 100644 (file)
index 0000000..0ef85cf
--- /dev/null
+++ b/zcat.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+PATH=BINDIR:$PATH
+exec gzip -cd "$@"
diff --git a/zcmp.in b/zcmp.in
new file mode 100644 (file)
index 0000000..23284ff
--- /dev/null
+++ b/zcmp.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+PATH=BINDIR:$PATH
+exec zdiff --__cmp "$@"
diff --git a/zdiff.1 b/zdiff.1
index ea3bf4103fc7cb27570fad77b0db42b04aeb17f1..588974c1150e316aa391ea76108d899d0a10b0eb 100644 (file)
--- a/zdiff.1
+++ b/zdiff.1
@@ -11,13 +11,15 @@ zcmp, zdiff \- compare compressed files
 [ file2 ]
 .SH DESCRIPTION
 .I  Zcmp
-and 
+and
 .I zdiff
 are used to invoke the
 .I cmp
 or the
 .I diff
-program on compressed files.  All options specified are passed directly to
+program on files compressed via
+.IR gzip "."
+All options specified are passed directly to
 .I cmp
 or
 .IR diff "."
@@ -29,7 +31,7 @@ If two files are specified, then they are uncompressed if necessary and fed to
 .I cmp
 or
 .IR diff "."
-The exit status from 
+The exit status from
 .I cmp
 or
 .I diff
index 6194cf914176d1f60c9be6c07e97d9e5917a1860..fda3259fe1a808d18d40e00e5337fc6b2aeebe55 100644 (file)
--- a/zdiff.in
+++ b/zdiff.in
@@ -1,29 +1,40 @@
 #!/bin/sh
 # sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
 
-# Zcmp and zdiff are used to invoke the cmp or the  diff  pro-
-# gram  on compressed files.  All options specified are passed
-# directly to cmp or diff.  If only 1 file is specified,  then
-# the  files  compared  are file1 and an uncompressed file1.gz.
-# If two files are specified, then they are  uncompressed  (if
-# necessary) and fed to cmp or diff.  The exit status from cmp
-# or diff is preserved.
-
-PATH="BINDIR:$PATH"; export PATH
-case "$0" in
-  *cmp) prog=cmp ; comp=${CMP-cmp}   ;;
-  *)    prog=diff; comp=${DIFF-diff} ;;
+# Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
+# Copyright (C) 1993 Jean-loup Gailly
+
+# 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 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+PATH=BINDIR:$PATH
+
+case $1 in
+  --__cmp) shift
+       prog=cmp;  cmp='${CMP-cmp}'  ;;
+  *)    prog=diff; cmp='${DIFF-diff}';;
 esac
 
 version="z$prog (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Jean-loup Gailly."
 
-usage="Usage: z$prog [OPTION]... FILE1 [FILE2]
+usage="Usage: $0 [OPTION]... FILE1 [FILE2]
 Compare FILE1 to FILE2, using their uncompressed contents if they are
 compressed.  If FILE2 is omitted, compare FILE1 to the uncompressed
 contents of FILE1.gz.  Do comparisons like '$prog' does.
@@ -32,50 +43,119 @@ OPTIONs are the same as for '$prog'.
 
 Report bugs to <bug-gzip@gnu.org>."
 
-OPTIONS=
-FILES=
+# sed script to escape all ' for the shell, and then (to handle trailing
+# newlines correctly) turn trailing X on last line into '.
+escape='
+  s/'\''/'\''\\'\'''\''/g
+  $s/X$/'\''/
+'
+
 while :; do
   case $1 in
-  --h*) echo "$usage" || exit 2; exit;;
+  --h*) printf '%s\n' "$usage" || exit 2; exit;;
   --v*) echo "$version" || exit 2; exit;;
   --) shift; break;;
-  -*) OPTIONS="$OPTIONS $ARG"; shift;;
+  -*\'*) cmp="$cmp '"`printf '%sX\n' "$1" | sed "$escape"`;;
+  -?*) cmp="$cmp '$1'";;
+  *) break;;
   esac
+  shift
 done
-for file; do
-  test -f "$file" || {
-    echo "$prog: $file not found or not a regular file"
-    exit 2
-  }
+cmp="$cmp --"
+
+for file
+do
+  test "X$file" = X- || <"$file" || exit 2
 done
-if test $# -eq 1; then
-       FILE=`echo "$1" | sed 's/[-.][zZtga]*$//'`
-       gzip -cd -- "$1" | $comp $OPTIONS - "$FILE"
 
+gzip_status=0
+exec 3>&1
+
+if test $# -eq 1; then
+  case $1 in
+  *[-.]gz* | *[-.][zZ] | *.t[ga]z)
+    FILE=`expr "X$1" : 'X\(.*\)[-.][zZtga]*$'`
+    gzip_status=$(
+      exec 4>&1
+      (gzip -cd -- "$1" 4>&-; echo $? >&4) 3>&- | eval "$cmp" - '"$FILE"' >&3
+    );;
+  *)
+    echo >&2 "$0: $1: unknown compressed file extension"
+    exit 2;;
+  esac
 elif test $# -eq 2; then
        case "$1" in
-        *[-.]gz* | *[-.][zZ] | *.t[ga]z)
+       *[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
                 case "$2" in
-               *[-.]gz* | *[-.][zZ] | *.t[ga]z)
-                       F=`echo "$2" | sed 's|.*/||;s|[-.][zZtga]*||'`
-                       set -C
-                       trap 'rm -f /tmp/"$F".$$; exit 2' HUP INT PIPE TERM 0
-                       gzip -cdfq -- "$2" > /tmp/"$F".$$ || exit
-                       gzip -cdfq -- "$1" | $comp $OPTIONS - /tmp/"$F".$$
-                        STAT="$?"
-                       /bin/rm -f /tmp/"$F".$$ || STAT=2
+               *[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
+                   if test "$1$2" = --; then
+                       gzip_status=$(
+                         exec 4>&1
+                         (gzip -cdfq - 4>&-; echo $? >&4) 3>&- |
+                           eval "$cmp" - - >&3
+                       )
+                   elif
+                       # Reject Solaris 8's buggy /bin/bash 2.03.
+                       echo X |
+                        (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) \
+                               5<&0
+                   then
+                       gzip_status=$(
+                         exec 4>&1
+                         (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
+                           ( (gzip -cdfq -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |
+                              eval "$cmp" /dev/fd/5 -) 5<&0
+                       )
+                       case $gzip_status in
+                         *[1-9]*) gzip_status=1;;
+                         *) gzip_status=0;;
+                       esac
+                   else
+                       F=`expr "/$2" : '.*/\(.*\)[-.][zZtga]*$'` || F=$prog
+                       tmp=
+                       trap '
+                         test -n "$tmp" && rm -f "$tmp"
+                         (exit 2); exit 2
+                       ' HUP INT PIPE TERM 0
+                       if type mktemp >/dev/null 2>&1; then
+                         tmp=`mktemp -t -- "$F.XXXXXX"` || exit 2
+                       else
+                         set -C
+                         tmp=${TMPDIR-/tmp}/$F.$$
+                       fi
+                       gzip -cdfq -- "$2" > "$tmp" || exit 2
+                       gzip_status=$(
+                         exec 4>&1
+                         (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
+                           eval "$cmp" - '"$tmp"' >&3
+                       )
+                        cmp_status=$?
+                       rm -f "$tmp" || gzip_status=$?
                        trap - HUP INT PIPE TERM 0
-                       exit $STAT;;
-
-               *)      gzip -cdfq -- "$1" | $comp $OPTIONS - "$2";;
+                       (exit $cmp_status)
+                   fi;;
+               *)
+                   gzip_status=$(
+                     exec 4>&1
+                     (gzip -cdfq -- "$1" 4>&-; echo $? >&4) 3>&- |
+                       eval "$cmp" - '"$2"' >&3
+                   );;
                 esac;;
         *)      case "$2" in
-               *[-.]gz* | *[-.][zZ] | *.t[ga]z)
-                       gzip -cdfq -- "$2" | $comp $OPTIONS "$1" -;;
-                *)      $comp $OPTIONS "$1" "$2";;
+               *[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
+                       gzip_status=$(
+                         exec 4>&1
+                         (gzip -cdfq -- "$2" 4>&-; echo $? >&4) 3>&- |
+                           eval "$cmp" '"$1"' - >&3
+                       );;
+               *)      eval "$cmp" '"$1"' '"$2"';;
                 esac;;
        esac
 else
-       echo "$usage"
+       echo >&2 "$0: invalid number of operands; try \`$0 --help' for help"
        exit 2
 fi
+
+cmp_status=$?
+test "$gzip_status" -eq 0 || exit 2
+exit $cmp_status
diff --git a/zegrep.in b/zegrep.in
new file mode 100644 (file)
index 0000000..620b8cb
--- /dev/null
+++ b/zegrep.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+PATH=BINDIR:$PATH
+exec zgrep -E "$@"
diff --git a/zfgrep.in b/zfgrep.in
new file mode 100644 (file)
index 0000000..7962364
--- /dev/null
+++ b/zfgrep.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+PATH=BINDIR:$PATH
+exec zgrep -F "$@"
index 58a34891f0d511cfc6446fc65ebaed706fd164cc..b1a995eb1f5229ac8e7d50bffea61647563cfebb 100644 (file)
--- a/zforce.in
+++ b/zforce.in
@@ -6,7 +6,7 @@
 # 12345678901234 is renamed to 12345678901.gz
 
 
-# Copyright (C) 2002 Free Software Foundation
+# Copyright (C) 2002, 2007 Free Software Foundation
 # Copyright (C) 1993 Jean-loup Gailly
 
 # This program is free software; you can redistribute it and/or modify
 PATH="BINDIR:$PATH"; export PATH
 
 version="zforce (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Jean-loup Gailly."
 
-usage="Usage: zforce [FILE]...
+usage="Usage: $0 [FILE]...
 Force a .gz extension on all compressed FILEs so that gzip will
 not compress them twice.
 
diff --git a/zgrep.1 b/zgrep.1
index a52a88abcf802802bc4d1729bdba60c776e4af3b..ef37bd8b0660054bc496b25ecdabc8f60ad2056b 100644 (file)
--- a/zgrep.1
+++ b/zgrep.1
@@ -7,38 +7,23 @@ zgrep \- search possibly compressed files for a regular expression
 .BI  [\ -e\ ] " pattern"
 .IR filename ".\|.\|."
 .SH DESCRIPTION
-.I Zgrep
-is used to invoke the
+.I Zgrep
+invokes
 .I grep
-on compress'ed or gzip'ed files. All options specified are passed directly to
-.I grep.
+on compressed or gzipped files.
+All options specified are passed directly to
+.IR grep .
 If no file is specified, then the standard input is decompressed
 if necessary and fed to grep.
 Otherwise the given files are uncompressed if necessary and fed to
-.I grep.
+.IR grep .
 .PP
-If
-.I zgrep
-is invoked as
-.I zegrep
-or
-.I zfgrep
-then
-.I egrep
-or
-.I fgrep
-is used instead of
-.I grep.
 If the GREP environment variable is set,
 .I zgrep
 uses it as the
 .I grep
-program to be invoked. For example:
-
-    for sh:  GREP=fgrep  zgrep string files
-    for csh: (setenv GREP fgrep; zgrep string files)
+program to be invoked.
 .SH AUTHOR
 Charles Levert (charles@comm.polymtl.ca)
 .SH "SEE ALSO"
-grep(1), egrep(1), fgrep(1), zdiff(1), zmore(1), znew(1), zforce(1),
-gzip(1), gzexe(1)
+grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)
index 1046ecc5a0ab9c8554085c9601eadda766d57451..4b1b50940cbaa00b0a65ad885974846573445599 100644 (file)
--- a/zgrep.in
+++ b/zgrep.in
@@ -3,7 +3,7 @@
 # zgrep -- a wrapper around a grep program that decompresses files as needed
 # Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
 
-# Copyright (C) 1998, 2001, 2002, 2006 Free Software Foundation
+# Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation
 # Copyright (C) 1993 Jean-loup Gailly
 
 # This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,8 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-PATH="BINDIR:$PATH"; export PATH
+PATH=BINDIR:$PATH
+grep='${GREP-grep}'
 
 prog=`echo "$0" | sed 's|.*/||'`
 case "$prog" in
@@ -30,125 +31,165 @@ case "$prog" in
 esac
 
 version="z$grep (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Jean-loup Gailly."
 
-usage="Usage: z$grep [OPTION]... [-e] PATTERN [FILE]...
+usage="Usage: $0 [OPTION]... [-e] PATTERN [FILE]...
 Look for instances of PATTERN in the input FILEs, using their
 uncompressed contents if they are compressed.
 
-OPTIONs are the same as for '$grep'.
+OPTIONs are the same as for 'grep'.
 
 Report bugs to <bug-gzip@gnu.org>."
 
-pat=""
-after_dash_dash=""
+# sed script to escape all ' for the shell, and then (to handle trailing
+# newlines correctly) turn trailing X on last line into '.
+escape='
+  s/'\''/'\''\\'\'''\''/g
+  $s/X$/'\''/
+'
+operands=
+have_pat=0
 files_with_matches=0
 files_without_matches=0
 no_filename=0
 with_filename=0
 
 while test $# -ne 0; do
-  case "$after_dash_dash$1" in
-  --d* | --rec*)       echo >&2 "$0: $1: option not supported"; exit 2;;
-  --h*)                        echo "$usage" || exit 2; exit;;
-  --files-with-*)      files_with_matches=1;;
-  --files-witho*)      files_without_matches=1;;
-  --no-f*)     no_filename=1;;
-  --v*)                echo "$version" || exit 2; exit;;
-  --wi*)       with_filename=1;;
-  --*) ;;
-  -*)
-       case "$1" in
-       -*[dr]*) echo >&2 "$0: $1: option not supported"; exit 2;;
-       esac
-       case "$1" in
-       -*H*)   with_filename=1;;
-       esac
-       case "$1" in
-       -*h*)   no_filename=1;;
-       esac
-       case "$1" in
-       -*L*)   files_without_matches=1;;
-       esac
-       case "$1" in
-       -*l*)   files_with_matches=1;;
-       esac;;
+  option=$1
+  shift
+  optarg=
+
+  case $option in
+  (-[0123456789abcdhHiIKLlnoqrRsTuUvVwxyzZ]?*)
+    arg2=-\'$(expr "X${option}X" : 'X-.[0-9]*\(.*\)' | sed "$escape")
+    eval "set -- $arg2 "'${1+"$@"}'
+    option=$(expr "X$option" : 'X\(-.[0-9]*\)');;
+  (--binary-*=* | --[lm]a*=* | --reg*=*)
+    ;;
+  (-[ABCDefm] | --binary-* | --file | --[lm]a* | --reg*)
+    case ${1?"$option option requires an argument"} in
+    (*\'*)
+      optarg=" '"$(printf '%sX\n' "$1" | sed "$escape");;
+    (*)
+      optarg=" '$1'";;
+    esac
+    shift;;
+  (--)
+    break;;
+  (-?*)
+    ;;
+  (*)
+    case $option in
+    (*\'*)
+      operands="$operands '"$(printf '%sX\n' "$option" | sed "$escape");;
+    (*)
+      operands="$operands '$option'";;
+    esac
+    ${POSIXLY_CORRECT+break}
+    continue;;
   esac
-  case "$after_dash_dash$1" in
-  -[ef])   opt="$opt $1"; shift; pat="$1"
-           if test "$grep" = grep; then  # grep is buggy with -e on SVR4
-             grep=egrep
-           fi;;
-  -[ABCdm])opt="$opt $1 $2"; shift;;
-  --)      opt="$opt $1"; after_dash_dash=1;;
-  -*)     opt="$opt $1";;
-   *)      if test -z "$pat"; then
-            pat="$1"
-          else
-            break;
-           fi;;
+
+  case $option in
+  (-[drRzZ] | --di* | --exc* | --inc* | --rec* | --nu*)
+    printf >&2 '%s: %s: option not supported\n' "$0" "$option"
+    exit 2;;
+  (-[ef]* | --file | --file=* | --reg*)
+    have_pat=1;;
+  (--h | --he | --hel | --help)
+    echo "$usage" || exit 2
+    exit;;
+  (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \
+  | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \
+  | --with-filename)
+    with_filename=1
+    continue;;
+  (-l | --files-with-*)
+    files_with_matches=1;;
+  (-L | --files-witho*)
+    files_without_matches=1;;
+  (--no-f*)
+    no_filename=1;;
+  (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
+    echo "$version" || exit 2
+    exit;;
   esac
-  shift
+
+  case $option in
+  (*\'?*)
+    option=\'$(expr "X${option}X" : 'X\(.*\)' | sed "$escape");;
+  (*)
+    option="'$option'";;
+  esac
+
+  grep="$grep $option$optarg"
 done
 
-if test -z "$pat"; then
-  echo "$usage"
-  exit 2
+eval "set -- $operands "'${1+"$@"}'
+
+if test $have_pat -eq 0; then
+  case ${1?"missing pattern; try \`$0 --help' for help"} in
+  (*\'*)
+    grep="$grep -- '"$(printf '%sX\n' "$1" | sed "$escape");;
+  (*)
+    grep="$grep -- '$1'";;
+  esac
+  shift
 fi
 
 if test $# -eq 0; then
-  gzip -cdfq | $grep $opt "$pat"
-  exit $?
+  set -- -
 fi
 
+exec 3>&1
 res=0
-for i do
-  gzip -cdfq -- "$i" |
+
+for i
+do
+  # Fail if gzip or grep (or sed) fails.
+  gzip_status=$(
+    exec 5>&1
+    (gzip -cdfq -- "$i" 5>&-; echo $? >&5) 3>&- |
     if test $files_with_matches -eq 1; then
-      $grep $opt "$pat" > /dev/null && printf '%s\n' "$i"
+      eval "$grep" >/dev/null && { printf '%s\n' "$i" || exit 2; }
     elif test $files_without_matches -eq 1; then
-      $grep $opt "$pat" > /dev/null || printf '%s\n' "$i"
-    elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then
-      $grep $opt "$pat"
+      eval "$grep" >/dev/null || {
+       r=$?
+       if test $r -eq 1; then
+         printf '%s\n' "$i" || r=2
+       fi
+       exit $r
+      }
+    elif test $with_filename -eq 0 &&
+        { test $# -eq 1 || test $no_filename -eq 1; }; then
+      eval "$grep"
     else
-      escaped=
-      while :; do
-       case $i in
-       *'
-'*)
-         char='
-'        repl='\\n';;
-       *'&'*) char='&' repl='\&';;
-       *'\'*) char='\\' repl='\\';;
-       *'|'*) char='|' repl='\|';;
-       *) break;;
-       esac
-       up_to_first_char="\\([^$char]*\\)"
-       after_first_char="[^$char]*$char\\(.*\\)"
-       escaped=$escaped`expr "X$i" : "X$up_to_first_char"`$repl
-       i=`expr "X$i" : "$after_first_char"`
-      done
-      if test $with_filename -eq 1; then
-       sed_script="s|[^:]*|$escaped$i|"
-      else
-       sed_script="s|^|$escaped$i:|"
-      fi
-
-      # Fail if either grep or sed fails.
-      # Bash has ${PIPESTATUS[0]}, but that's not portable.
-      exec 3>&1
-      r=`
+      case $i in
+      (*'
+'* | *'&'* | *'\'* | *'|'*)
+        i=$(printf '%s\n' "$i" |
+           sed '
+             $!N
+             $s/[&\|]/\\&/g
+             $s/\n/\\n/g
+           ');;
+      esac
+      sed_script="s|^|$i:|"
+
+      # Fail if grep or sed fails.
+      r=$(
        exec 4>&1
-       ($grep $opt "$pat" 4>&-; echo $? >&4) 3>&- | sed "$sed_script" >&3 4>&-
-      ` &&
+       (eval "$grep" 4>&-; echo $? >&4) 3>&- | sed "$sed_script" >&3 4>&-
+      ) || r=2
       exit $r
-    fi
+    fi >&3 5>&-
+  )
   r=$?
+  test "$gzip_status" -eq 0 || test "$gzip_status" -eq 2 || r=2
   test $res -lt $r && res=$r
 done
 exit $res
diff --git a/zip.c b/zip.c
index 6b6d527da19a17a1441f9a55c9257a633da1fe30..090fbdfc9feb47be6ee4106df5f410427848acfa 100644 (file)
--- a/zip.c
+++ b/zip.c
@@ -1,6 +1,6 @@
 /* zip.c -- compress files to the gzip or pkzip format
 
-   Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2006, 2007 Free Software Foundation, Inc.
    Copyright (C) 1992-1993 Jean-loup Gailly
 
    This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef RCSID
-static char rcsid[] = "$Id: zip.c,v 1.6 2006/12/11 18:54:39 eggert Exp $";
+static char rcsid[] = "$Id: zip.c,v 1.7 2007/03/20 05:09:51 eggert Exp $";
 #endif
 
 #include <config.h>
@@ -28,8 +28,6 @@ static char rcsid[] = "$Id: zip.c,v 1.6 2006/12/11 18:54:39 eggert Exp $";
 #include "gzip.h"
 #include "crypt.h"
 
-#include "timespec.h"
-
 #ifdef HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
diff --git a/zless.1 b/zless.1
index d4acd2d05cb3c51a9b91505eab6d236b023d3a18..ca02423126157d32b6657a56c29575b9fcce889b 100644 (file)
--- a/zless.1
+++ b/zless.1
@@ -8,7 +8,9 @@ zless \- file perusal filter for crt viewing of compressed text
 .I  Zless
 is a filter which allows examination of compressed or plain text files
 one screenful at a time on a soft-copy terminal.  It is the equivalent of
-setting the environment variable LESSOPEN to "|gzip -cdfq -- %s",
+setting the environment variable LESSOPEN to '|gzip -cdfq -- %s',
+and the environment variable LESSMETACHARS to
+"'<space><tab><newline>;*?"()<>[|&^`#\\$%=~'",
 and then running
 .IR less .
 However, enough people seem to think that having the
@@ -18,7 +20,7 @@ available is important to be worth providing it.
 
 Note that zless does not work with files piped to it on stdin, it only works
 with files specified as arguments.  If you really want to use less in a pipe,
-then do the uncompress explicitly and pipe to less instead of zless.
+then do the uncompress explicitly and pipe to less instead of using zless.
 .SH "SEE ALSO"
 zmore(1), less(1)
 .SH "BUGS"
index dae346f82e9fc55d9d3fbc033da127d2afdd55b0..52352cb09f45482756e7644aae3443bf6d075552 100644 (file)
--- a/zless.in
+++ b/zless.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 1998, 2002, 2006 Free Software Foundation
+# Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
 
 # 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
 PATH="BINDIR:$PATH"; export PATH
 
 version="zless (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Paul Eggert."
 
-usage="Usage: zless [OPTION]... [FILE]...
+usage="Usage: $0 [OPTION]... [FILE]...
 Like 'less', but operate on the uncompressed contents of any compressed FILEs.
 
 Options are the same as for 'less'.
@@ -38,5 +38,16 @@ case $1 in
 --version) exec echo "$version";;
 esac
 
+if test "${LESSMETACHARS+set}" != set; then
+  # Work around a bug in less 394 and earlier;
+  # it mishandles the metacharacters '$%=~'.
+  space=' '
+  tab='        '
+  newline='
+'
+  LESSMETACHARS="$space$tab$newline'"';*?"()<>[|&^`#\$%=~'
+  export LESSMETACHARS
+fi
+
 LESSOPEN="|gzip -cdfq -- %s"; export LESSOPEN
 exec less "$@"
diff --git a/zmore.1 b/zmore.1
index b0c6a83c03be717dbb0d6b4a7a8761cfcc455202..b64be235090c0bd3a34e05a6520602d00fa733b4 100644 (file)
--- a/zmore.1
+++ b/zmore.1
@@ -32,7 +32,6 @@ to determine terminal characteristics,
 and to determine the default window size.
 On a terminal capable of displaying 24 lines,
 the default window size is 22 lines.
-To use a pager other than the default
 .PP
 Other sequences which may be typed when
 .I zmore
index bd6b947446b5aff4fcd2e57fca8c13eb3c680d9a..33f6798e9c8de1b220f393aa99755e1cee570e7d 100644 (file)
--- a/zmore.in
+++ b/zmore.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2001, 2002 Free Software Foundation
+# Copyright (C) 2001, 2002, 2007 Free Software Foundation
 # Copyright (C) 1992, 1993 Jean-loup Gailly
 
 # This program is free software; you can redistribute it and/or modify
 PATH="BINDIR:$PATH"; export PATH
 
 version="zmore (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Jean-loup Gailly."
 
-usage="Usage: zmore [OPTION]... [FILE]...
+usage="Usage: $0 [OPTION]... [FILE]...
 Like 'more', but operate on the uncompressed contents of any compressed FILEs.
 
 Report bugs to <bug-gzip@gnu.org>."
diff --git a/znew.in b/znew.in
index 986ffc7f874415addd30f7471bec2a86853b7c5d..97faa0402abf6f7d87487b066ca55009fab1799e 100644 (file)
--- a/znew.in
+++ b/znew.in
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 1998, 2002, 2004 Free Software Foundation
+# Copyright (C) 1998, 2002, 2004, 2007 Free Software Foundation
 # Copyright (C) 1993 Jean-loup Gailly
 
 # This program is free software; you can redistribute it and/or modify
 PATH="BINDIR:$PATH"; export PATH
 
 version="znew (gzip) @VERSION@
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software.  You may redistribute copies of it under the terms of
 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
 There is NO WARRANTY, to the extent permitted by law.
 
 Written by Jean-loup Gailly."
 
-usage="Usage: znew [OPTION]... [FILE]...
+usage="Usage: $0 [OPTION]... [FILE]...
 Recompress files from .Z (compress) format to .gz (gzip) format.
 
 Options:
@@ -55,7 +55,7 @@ block=1024
 # block is the disk block size (best guess, need not be exact)
 
 warn="(does not preserve modes and timestamp)"
-tmp=/tmp/zfoo.$$
+tmp=${TMPDIR-/tmp}/zfoo.$$
 set -C
 echo hi > $tmp || exit
 if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then